Changeset View
Changeset View
Standalone View
Standalone View
plugins/patchreview/patchhighlighter.cpp
Show First 20 Lines • Show All 435 Lines • ▼ Show 20 Line(s) | 422 | } else { | |||
---|---|---|---|---|---|
436 | if ( !insertedLines.empty() ) { | 436 | if ( !insertedLines.empty() ) { | ||
437 | insertedLines.first() = prefix + insertedLines.first(); | 437 | insertedLines.first() = prefix + insertedLines.first(); | ||
438 | insertedLines.last() = insertedLines.last() + suffix; | 438 | insertedLines.last() = insertedLines.last() + suffix; | ||
439 | } | 439 | } | ||
440 | performContentChange( doc, QStringList() << removedLine, insertedLines, startLine + 1 ); | 440 | performContentChange( doc, QStringList() << removedLine, insertedLines, startLine + 1 ); | ||
441 | } | 441 | } | ||
442 | } | 442 | } | ||
443 | 443 | | |||
444 | PatchHighlighter::PatchHighlighter( Diff2::DiffModel* model, IDocument* kdoc, PatchReviewPlugin* plugin, bool updatePatchFromEdits ) throw( QString ) | 444 | PatchHighlighter::PatchHighlighter( Diff2::DiffModel* model, IDocument* kdoc, PatchReviewPlugin* plugin, bool updatePatchFromEdits ) | ||
445 | : m_doc( kdoc ), m_plugin( plugin ), m_model( model ), m_applying( false ) { | 445 | : m_doc( kdoc ), m_plugin( plugin ), m_model( model ), m_applying( false ) { | ||
446 | KTextEditor::Document* doc = kdoc->textDocument(); | 446 | KTextEditor::Document* doc = kdoc->textDocument(); | ||
447 | // connect( kdoc, SIGNAL(destroyed(QObject*)), this, SLOT(documentDestroyed()) ); | 447 | // connect( kdoc, SIGNAL(destroyed(QObject*)), this, SLOT(documentDestroyed()) ); | ||
448 | if (updatePatchFromEdits) { | 448 | if (updatePatchFromEdits) { | ||
449 | connect(doc, &KTextEditor::Document::textInserted, this, &PatchHighlighter::textInserted); | 449 | connect(doc, &KTextEditor::Document::textInserted, this, &PatchHighlighter::textInserted); | ||
450 | connect(doc, &KTextEditor::Document::textRemoved, this, &PatchHighlighter::textRemoved); | 450 | connect(doc, &KTextEditor::Document::textRemoved, this, &PatchHighlighter::textRemoved); | ||
451 | } | 451 | } | ||
452 | connect(doc, &KTextEditor::Document::destroyed, this, &PatchHighlighter::documentDestroyed); | 452 | connect(doc, &KTextEditor::Document::destroyed, this, &PatchHighlighter::documentDestroyed); | ||
▲ Show 20 Lines • Show All 174 Lines • Show Last 20 Lines |