diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-30 18:02:11 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-30 18:02:11 +0000 |
commit | 5ad8fdbf162cf819cf1c48d2ddd8aed9113ab718 (patch) | |
tree | a2f76da0912085453b974e590005753ca279457b /systemsettings/kcmsearch.cpp | |
parent | 70a90e54dfa3b5ab2133aebda71f310d29d6a680 (diff) | |
download | tde-systemsettings-5ad8fdbf162cf819cf1c48d2ddd8aed9113ab718.tar.gz tde-systemsettings-5ad8fdbf162cf819cf1c48d2ddd8aed9113ab718.zip |
TQt4 convert kde-systemsettings
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kde-systemsettings@1234247 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'systemsettings/kcmsearch.cpp')
-rw-r--r-- | systemsettings/kcmsearch.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/systemsettings/kcmsearch.cpp b/systemsettings/kcmsearch.cpp index 3dd41ce..91f3675 100644 --- a/systemsettings/kcmsearch.cpp +++ b/systemsettings/kcmsearch.cpp @@ -21,20 +21,20 @@ #include "kcmsearch.h" -#include <qregexp.h> +#include <tqregexp.h> #include <kdebug.h> #include "modulesview.h" #include "moduleiconitem.h" -KcmSearch::KcmSearch( QPtrList<ModulesView> *moduleViewList, QWidget *parent, const char *name ) - : KIconViewSearchLine(parent, moduleViewList->at(0)->groups[0], name){ +KcmSearch::KcmSearch( TQPtrList<ModulesView> *moduleViewList, TQWidget *tqparent, const char *name ) + : KIconViewSearchLine(tqparent, moduleViewList->at(0)->groups[0], name){ this->moduleViewList = moduleViewList; } -void KcmSearch::updateSearch( const QString &search ) { - QValueList<RowIconView*>::iterator it; - QPtrListIterator<ModulesView> moduleViewListIt(*moduleViewList); +void KcmSearch::updateSearch( const TQString &search ) { + TQValueList<RowIconView*>::iterator it; + TQPtrListIterator<ModulesView> moduleViewListIt(*moduleViewList); ModulesView *mainView; int page = 0; @@ -45,7 +45,7 @@ void KcmSearch::updateSearch( const QString &search ) { int count = 0; for ( it = mainView->groups.begin(); it != mainView->groups.end(); ++it ){ - QIconViewItem *item = (*it)->firstItem(); + TQIconViewItem *item = (*it)->firstItem(); while( item ) { bool hit = itemMatches(item, search); ((ModuleIconItem*)item)->loadIcon(hit); @@ -62,13 +62,13 @@ void KcmSearch::updateSearch( const QString &search ) { delete[] hitArray; } -bool KcmSearch::itemMatches( const KCModuleInfo &module, const QString &search ) const +bool KcmSearch::itemMatches( const KCModuleInfo &module, const TQString &search ) const { // Look in keywords - QStringList kw = module.keywords(); - for(QStringList::ConstIterator it = kw.begin(); it != kw.end(); ++it) { - QString name = (*it).lower(); - if ( QRegExp(search+"*", false, true).search(name) >= 0){ + TQStringList kw = module.keywords(); + for(TQStringList::ConstIterator it = kw.begin(); it != kw.end(); ++it) { + TQString name = (*it).lower(); + if ( TQRegExp(search+"*", false, true).search(name) >= 0){ //kdDebug() << "MATCH:" << module.moduleName().latin1() // << "keyword:" << name.latin1() << endl; return true; @@ -76,20 +76,20 @@ bool KcmSearch::itemMatches( const KCModuleInfo &module, const QString &search ) } // Don't forget to check the name :) - if ( QRegExp(search+"*", false, true).search(module.moduleName()) >= 0) + if ( TQRegExp(search+"*", false, true).search(module.moduleName()) >= 0) return true; //kdDebug() << "No MATCH:" << module.moduleName().latin1() << endl; return false; } -bool KcmSearch::itemMatches( const QIconViewItem *item, const QString & search ) const +bool KcmSearch::itemMatches( const TQIconViewItem *item, const TQString & search ) const { if( !item ) return false; ModuleIconItem *mItem = (ModuleIconItem*)item; - QValueList<KCModuleInfo>::iterator it; + TQValueList<KCModuleInfo>::iterator it; for ( it = mItem->modules.begin(); it != mItem->modules.end(); ++it ){ if( itemMatches( (*it), search ) ) return true; |