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

List:       kde-commits
Subject:    branches/kdevelop/3.4/languages/cpp
From:       David Nolden <david.nolden.kde () art-master ! de>
Date:       2007-03-10 17:26:06
Message-ID: 1173547566.871356.8951.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 641250 by zwabel:

Do not update the problem-list for the current file with every single problem that is \
added. Insead use a timer and update the list once all problems were added. This \
removes very annoying regular short hangs when for example working on a file that has \
many missing include-files.

 M  +3 -1      problemreporter.cpp  
 M  +2 -1      problemreporter.h  


--- branches/kdevelop/3.4/languages/cpp/problemreporter.cpp #641249:641250
@@ -95,6 +95,8 @@
 	                           "<tt>//TODO: my todo</tt><br>"
 	                           "<tt>//FIXME fix this</tt>"));
 
+	m_initCurrentTimer = new QTimer( this );
+	connect( m_initCurrentTimer, SIGNAL(timeout()), this, SLOT(initCurrentList()) );
 	m_gridLayout = new QGridLayout(this,2,3);
 
 	m_errorList = new KListView(this);
@@ -391,7 +393,7 @@
         
 	}
 	
-	initCurrentList();
+	m_initCurrentTimer->start( 500, true );
 }
 
 void ProblemReporter::slotPartAdded( KParts::Part* part )
--- branches/kdevelop/3.4/languages/cpp/problemreporter.h #641249:641250
@@ -121,6 +121,7 @@
 	void slotSelected( QListViewItem* );
 	void slotTabSelected( int tabindex );
 	void slotFilter();
+	void initCurrentList();
 
 private:
 	QString levelToString( int level ) const;
@@ -128,13 +129,13 @@
 	void InitListView( KListView* listview );
 	void filterList( KListView* listview, const QString& level );
     void updateCurrentWith( EfficientKListView& listview, const QString& level, \
                const QString& filename );
-	void initCurrentList();
 
 private:
 	QGridLayout* m_gridLayout;
 	QTabBar* m_tabBar;
 	QWidgetStack* m_widgetStack;
 	KListView* m_currentList;
+    QTimer* m_initCurrentTimer;
 	EfficientKListView m_errorList;
 	EfficientKListView m_fixmeList;
 	EfficientKListView m_todoList;


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

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