[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    =?utf-8?q?=5Bkdevplatform/1=2E2=5D_plugins/problemreporter=3A_pr?=
From:       Milian Wolff <mail () milianw ! de>
Date:       2011-03-03 16:40:43
Message-ID: 20110303164043.C03DDA60C9 () git ! kde ! org
[Download RAW message or body]

Git commit 686a7c982d1032ea3d1b8a578899375c207be4b4 by Milian Wolff.
Committed on 03/03/2011 at 17:40.
Pushed by mwolff into branch '1.2'.

properly re-highlight problems on document reload

M  +7    -0    plugins/problemreporter/problemhighlighter.cpp     
M  +3    -3    plugins/problemreporter/problemhighlighter.h     

http://commits.kde.org/kdevplatform/686a7c982d1032ea3d1b8a578899375c207be4b4

diff --git a/plugins/problemreporter/problemhighlighter.cpp \
b/plugins/problemreporter/problemhighlighter.cpp index f4865a8..725395c 100644
--- a/plugins/problemreporter/problemhighlighter.cpp
+++ b/plugins/problemreporter/problemhighlighter.cpp
@@ -58,6 +58,8 @@ ProblemHighlighter::ProblemHighlighter(KTextEditor::Document* \
document)  this, SLOT(aboutToInvalidateMovingInterfaceContent()));
     connect(m_document, SIGNAL(aboutToRemoveText(KTextEditor::Range)),
             this, SLOT(aboutToRemoveText(KTextEditor::Range)));
+    connect(m_document, SIGNAL(reloaded(KTextEditor::Document*)),
+            this, SLOT(documentReloaded()));
 }
 
 void ProblemHighlighter::settingsChanged()
@@ -235,4 +237,9 @@ void ProblemHighlighter::aboutToRemoveText( const \
KTextEditor::Range& range )  }
 }
 
+void ProblemHighlighter::documentReloaded()
+{
+    setProblems(m_problems);
+}
+
 #include "problemhighlighter.moc"
diff --git a/plugins/problemreporter/problemhighlighter.h \
b/plugins/problemreporter/problemhighlighter.h index 8b52237..25af5a8 100644
--- a/plugins/problemreporter/problemhighlighter.h
+++ b/plugins/problemreporter/problemhighlighter.h
@@ -42,14 +42,14 @@ private slots:
     void textHintRequested(const KTextEditor::Cursor&, QString&);
     void aboutToInvalidateMovingInterfaceContent();
     void aboutToRemoveText(const KTextEditor::Range& range);
-private:
-
-    void clearHighlights();
+    void documentReloaded();
 
+private:
     QPointer<KTextEditor::Document> m_document;
     QList<KTextEditor::MovingRange*> m_topHLRanges;
     QList<KDevelop::ProblemPointer> m_problems;
     QMap<KTextEditor::MovingRange*, KDevelop::ProblemPointer> m_problemsForRanges;
+
 public slots:
     void settingsChanged();
 };


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic