[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdevelop/lib/interfaces
From: Roberto Raggi <roberto () kdevelop ! org>
Date: 2004-08-28 19:22:30
Message-ID: 20040828192230.77B7D2322 () office ! kde ! org
[Download RAW message or body]
CVS commit by raggi:
compress the signals
M +15 -5 kdevproject.cpp 1.11
M +4 -0 kdevproject.h 1.29
--- kdevelop/lib/interfaces/kdevproject.cpp #1.10:1.11
@@ -28,13 +28,17 @@
#include <urlutil.h>
#include <qfileinfo.h>
+#include <qtimer.h>
KDevProject::KDevProject( const QString& pluginName, const QString& icon, QObject \
*parent, const char *name) : KDevPlugin( pluginName, icon, parent, name)
{
- connect( this, SIGNAL(addedFilesToProject(const QStringList& )), this, \
SLOT(slotBuildFileMap()) );
- connect( this, SIGNAL(removedFilesFromProject(const QStringList& )), this, \
SLOT(slotBuildFileMap()) ); + connect( this, SIGNAL(addedFilesToProject(const \
QStringList& )), this, SLOT(buildFileMap()) ); + connect( this, \
SIGNAL(removedFilesFromProject(const QStringList& )), this, SLOT(buildFileMap()) );
connect( this, SIGNAL(addedFilesToProject(const QStringList& )), this, \
SLOT(slotAddFilesToFileMap(const QStringList& )) );
connect( this, SIGNAL(removedFilesFromProject(const QStringList& )), this, \
SLOT(slotRemoveFilesFromFileMap(const QStringList& )) ); +
+ m_timer = new QTimer(this);
+ connect(m_timer, SIGNAL(timeout()), this, SLOT(slotBuildFileMap()));
}
@@ -74,5 +78,11 @@ QString KDevProject::relativeProjectFile
}
-void KDevProject::slotBuildFileMap( )
+void KDevProject::buildFileMap()
+{
+ m_timer->stop();
+ m_timer->start(0, true);
+}
+
+void KDevProject::slotBuildFileMap()
{
kdDebug(9000) << k_funcinfo << endl;
@@ -95,5 +105,5 @@ void KDevProject::slotBuildFileMap( )
void KDevProject::openProject( const QString & /*dirName*/, const QString & \
/*projectName*/ ) {
- slotBuildFileMap();
+ buildFileMap();
}
--- kdevelop/lib/interfaces/kdevproject.h #1.28:1.29
@@ -32,4 +32,6 @@
#include <qmap.h>
+class QTimer;
+
class KDevProject : public KDevPlugin
{
@@ -155,4 +157,5 @@ public:
private slots:
+ void buildFileMap();
void slotBuildFileMap();
void slotAddFilesToFileMap(const QStringList & fileList );
@@ -195,4 +198,5 @@ private:
QMap<QString, QString> m_absToRel;
QStringList m_symlinkList;
+ QTimer *m_timer;
};
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic