diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2013-10-08 00:13:25 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2013-10-08 05:14:53 +0200 |
commit | 84f5a315c3429b47a7eff15e626e2efdbe4f6e5e (patch) | |
tree | 770861aa9033e1dc6c5168358194ff85b32dd429 /src/dirscanner.cpp | |
parent | 57d8bb3d12aed373eee08915f0ff19f5233aabe3 (diff) | |
download | kscope-84f5a315c3429b47a7eff15e626e2efdbe4f6e5e.tar.gz kscope-84f5a315c3429b47a7eff15e626e2efdbe4f6e5e.zip |
Initial TQt conversion
Diffstat (limited to 'src/dirscanner.cpp')
-rw-r--r-- | src/dirscanner.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/dirscanner.cpp b/src/dirscanner.cpp index 517237e..ba8717e 100644 --- a/src/dirscanner.cpp +++ b/src/dirscanner.cpp @@ -25,7 +25,7 @@ * ***************************************************************************/ -#include <qapplication.h> +#include <ntqapplication.h> #include "dirscanner.h" /** @@ -34,7 +34,7 @@ * @param bFinished true if all files were scanned, false otherwise */ DirScanEvent::DirScanEvent(int nFiles, bool bFinished) - : QCustomEvent(EventId), + : TQCustomEvent(EventId), m_nFiles(nFiles), m_bFinished(bFinished) { @@ -47,8 +47,8 @@ DirScanEvent::DirScanEvent(int nFiles, bool bFinished) * @param pDicFiles Pointer to a map of current project files (to avoid duplication) */ -DirScanner::DirScanner(QObject* pEventReceiver, - QDict<QListViewItem>* pDicFiles) : QThread(), +DirScanner::DirScanner(TQObject* pEventReceiver, + TQDict<TQListViewItem>* pDicFiles) : TQThread(), m_pEventReceiver(pEventReceiver), m_pDicFiles(pDicFiles) { @@ -70,18 +70,18 @@ DirScanner::~DirScanner() * @param sNameFilter Defines the search pattern * @param bRecursive true to descend into sub-dorectories, false otherwise */ -void DirScanner::start(const QString& sDir, const QString& sNameFilter, +void DirScanner::start(const TQString& sDir, const TQString& sNameFilter, bool bRecursive) { // Initialise the search parameters - m_dir = QDir(sDir); + m_dir = TQDir(sDir); m_sNameFilter = sNameFilter; m_bCancel = false; m_bRecursive = bRecursive; m_slFiles.clear(); // Invoke the thread - QThread::start(); + TQThread::start(); } /** @@ -93,7 +93,7 @@ void DirScanner::run() int nFiles; nFiles = scanDir(m_dir); - QApplication::postEvent(m_pEventReceiver, + TQApplication::postEvent(m_pEventReceiver, new DirScanEvent(nFiles, true)); m_setScanned.clear(); @@ -105,12 +105,12 @@ void DirScanner::run() * added * @return The total number of files added */ -int DirScanner::scanDir(QDir& dir) +int DirScanner::scanDir(TQDir& dir) { - QString sCanon; - QStringList slDirFiles, slDirs; - QStringList::const_iterator itr; - QString sFile; + TQString sCanon; + TQStringList slDirFiles, slDirs; + TQStringList::const_iterator itr; + TQString sFile; int nFiles = 0; if (m_bCancel) @@ -125,7 +125,7 @@ int DirScanner::scanDir(QDir& dir) m_setScanned.insert(sCanon); // Add all files in this directory - slDirFiles = dir.entryList(m_sNameFilter, QDir::Files); + slDirFiles = dir.entryList(m_sNameFilter, TQDir::Files); for (itr = slDirFiles.begin(); itr != slDirFiles.end(); ++itr) { sFile = dir.absPath() + "/" + *itr; @@ -136,14 +136,14 @@ int DirScanner::scanDir(QDir& dir) } } - QApplication::postEvent(m_pEventReceiver, + TQApplication::postEvent(m_pEventReceiver, new DirScanEvent(nFiles, false)); // Recurse into sub-directories, if requested if (!m_bRecursive) return nFiles; - slDirs = dir.entryList(QDir::Dirs); + slDirs = dir.entryList(TQDir::Dirs); // Iterate the list of sub-directories for (itr = slDirs.begin(); itr != slDirs.end(); ++itr) { @@ -155,7 +155,7 @@ int DirScanner::scanDir(QDir& dir) continue; // Add the files in each sub-directory - QDir dirSub(dir); + TQDir dirSub(dir); if (dirSub.cd(*itr)) nFiles += scanDir(dirSub); } |