diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-05 22:07:15 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-05 22:07:15 +0000 |
commit | 421b60af92c83b889f8903c2898f2bd07186fcd8 (patch) | |
tree | ad873a24c9438baed4942fda795430a4c3dc9a9a /plugins | |
parent | 39e896bddf25bf34cbf8be814d959181e2c1d1dd (diff) | |
download | kbfx-421b60af92c83b889f8903c2898f2bd07186fcd8.tar.gz kbfx-421b60af92c83b889f8903c2898f2bd07186fcd8.zip |
TQt4 port kbfx
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kbfx@1230544 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/applications/kbfxplasmadataplugin.cpp | 16 | ||||
-rw-r--r-- | plugins/common/kbfxplasmadataplugin-common.h | 8 | ||||
-rw-r--r-- | plugins/plasmoids/kbfxplasmadatapluginplosmoid.cpp | 44 | ||||
-rw-r--r-- | plugins/recentstuff/kbfxplasmarecentstuff.cpp | 44 | ||||
-rw-r--r-- | plugins/settings/kbfxplasmadatapluginsettings.cpp | 10 | ||||
-rw-r--r-- | plugins/strigi/kbfxstrigiplugin.cpp | 30 | ||||
-rw-r--r-- | plugins/strigi/kbfxstrigiplugin.h | 8 |
7 files changed, 80 insertions, 80 deletions
diff --git a/plugins/applications/kbfxplasmadataplugin.cpp b/plugins/applications/kbfxplasmadataplugin.cpp index cffb72f..070bda2 100644 --- a/plugins/applications/kbfxplasmadataplugin.cpp +++ b/plugins/applications/kbfxplasmadataplugin.cpp @@ -158,16 +158,16 @@ view () } -QString +TQString name () { - return QString ( "Applications" ); + return TQString ( "Applications" ); } -QString +TQString type () { - return QString ( "Stub Type" ); + return TQString ( "Stub Type" ); } @@ -180,7 +180,7 @@ id () #include <ktrader.h> KbfxDataGroup * -search ( QString _keyword ) +search ( TQString _keyword ) { @@ -192,7 +192,7 @@ search ( QString _keyword ) int *count = new int; *count = 0; - QValueListIterator < KService::Ptr > s = offers.begin (); + TQValueListIterator < KService::Ptr > s = offers.begin (); for ( ; s != offers.end (); ++s ) { @@ -201,10 +201,10 @@ search ( QString _keyword ) if ( (*s)->noDisplay () == true ) continue; - QString *sPtr = new QString (); + TQString *sPtr = new TQString (); ( *sPtr ) = ( *s )->name () + ( *s )->genericName () + ( *s )->comment (); - if ( ( !sPtr->isNull () ) && sPtr->contains ( _keyword, false ) > 0 ) + if ( ( !sPtr->isNull () ) && sPtr->tqcontains ( _keyword, false ) > 0 ) { KbfxDataSource *data = new KbfxDataSource (); data->setName ( ( *s )->name () ); diff --git a/plugins/common/kbfxplasmadataplugin-common.h b/plugins/common/kbfxplasmadataplugin-common.h index d446ef8..8777216 100644 --- a/plugins/common/kbfxplasmadataplugin-common.h +++ b/plugins/common/kbfxplasmadataplugin-common.h @@ -26,12 +26,12 @@ extern "C" { -// static QString check = "Static Check for Plugin"; +// static TQString check = "Static Check for Plugin"; KbfxDataStack * view(); - QString name(); //Name of the Plugin My Music .if TOM Create..Configure .. - QString type(); //Type of the plugin ex: Application : Amork : kio ..etc + TQString name(); //Name of the Plugin My Music .if TOM Create..Configure .. + TQString type(); //Type of the plugin ex: Application : Amork : kio ..etc uint id(); //A id for menus - KbfxDataGroup * search ( QString str ); + KbfxDataGroup * search ( TQString str ); } #endif diff --git a/plugins/plasmoids/kbfxplasmadatapluginplosmoid.cpp b/plugins/plasmoids/kbfxplasmadatapluginplosmoid.cpp index 998fafb..36d22e8 100644 --- a/plugins/plasmoids/kbfxplasmadatapluginplosmoid.cpp +++ b/plugins/plasmoids/kbfxplasmadatapluginplosmoid.cpp @@ -24,8 +24,8 @@ #include <kservicegroup.h> #include <kdebug.h> #include <kstandarddirs.h> -#include <qdir.h> -#include <qfileinfo.h> +#include <tqdir.h> +#include <tqfileinfo.h> #include <kbfxplasmadataplugin-common.h> @@ -47,19 +47,19 @@ view () glist->setIcon ( "plasmagik" ); appGroup->setName ( "Plasmoids" ); - QString path = locate ( "data", "kicker/applets/lockout.desktop" ); + TQString path = locate ( "data", "kicker/applets/lockout.desktop" ); path.remove ( "lockout.desktop" ); - QDir d ( path ); - d.setFilter ( QDir::Files | QDir::Hidden | QDir::NoSymLinks ); - d.setSorting ( QDir::Size | QDir::Reversed ); + TQDir d ( path ); + d.setFilter ( TQDir::Files | TQDir::Hidden | TQDir::NoSymLinks ); + d.setSorting ( TQDir::Size | TQDir::Reversed ); d.setNameFilter ( "*.desktop" ); - const QFileInfoList *list = d.entryInfoList (); - QFileInfoListIterator it ( *list ); - QFileInfo *fi; + const TQFileInfoList *list = d.entryInfoList (); + TQFileInfoListIterator it ( *list ); + TQFileInfo *fi; while ( ( fi = it.current () ) != 0 ) { @@ -87,16 +87,16 @@ view () } -QString +TQString name () { - return QString ( "Plasmoids" ); + return TQString ( "Plasmoids" ); } -QString +TQString type () { - return QString ( "Stub Type" ); + return TQString ( "Stub Type" ); } @@ -110,28 +110,28 @@ id () #include <ktrader.h> KbfxDataGroup * -search ( QString _keyword ) +search ( TQString _keyword ) { KbfxDataGroup *appGroup = new KbfxDataGroup (); - QString path = locate ( "data", "kicker/applets/lockout.desktop" ); + TQString path = locate ( "data", "kicker/applets/lockout.desktop" ); path.remove ( "lockout.desktop" ); - QDir d ( path ); - d.setFilter ( QDir::Files | QDir::Hidden | QDir::NoSymLinks ); - d.setSorting ( QDir::Size | QDir::Reversed ); + TQDir d ( path ); + d.setFilter ( TQDir::Files | TQDir::Hidden | TQDir::NoSymLinks ); + d.setSorting ( TQDir::Size | TQDir::Reversed ); d.setNameFilter ( "*.desktop" ); - const QFileInfoList *list = d.entryInfoList (); - QFileInfoListIterator it ( *list ); - QFileInfo *fi; + const TQFileInfoList *list = d.entryInfoList (); + TQFileInfoListIterator it ( *list ); + TQFileInfo *fi; while ( ( fi = it.current () ) != 0 ) { - if ( fi->fileName ().contains ( _keyword ) > 0 ) + if ( fi->fileName ().tqcontains ( _keyword ) > 0 ) { KDesktopFile *desktop = new KDesktopFile ( fi->filePath () ); diff --git a/plugins/recentstuff/kbfxplasmarecentstuff.cpp b/plugins/recentstuff/kbfxplasmarecentstuff.cpp index b0c4f8c..0f1c8fb 100644 --- a/plugins/recentstuff/kbfxplasmarecentstuff.cpp +++ b/plugins/recentstuff/kbfxplasmarecentstuff.cpp @@ -24,8 +24,8 @@ #include <kservicegroup.h> #include <kdebug.h> #include <kstandarddirs.h> -#include <qdir.h> -#include <qfileinfo.h> +#include <tqdir.h> +#include <tqfileinfo.h> #include <kbfxplasmadataplugin-common.h> #include <kstandarddirs.h> @@ -42,19 +42,19 @@ view () glist->setIcon ( "newstuff" ); appGroup->setName ( "RecentStuff" ); - QString path = + TQString path = KStandardDirs ().localkdedir () + "/share/apps/RecentDocuments/"; - QDir d ( path ); - d.setFilter ( QDir::Files | QDir::Hidden | QDir::NoSymLinks ); - d.setSorting ( QDir::Size | QDir::Reversed ); + TQDir d ( path ); + d.setFilter ( TQDir::Files | TQDir::Hidden | TQDir::NoSymLinks ); + d.setSorting ( TQDir::Size | TQDir::Reversed ); d.setNameFilter ( "*.desktop" ); - const QFileInfoList *list = d.entryInfoList (); - QFileInfoListIterator it ( *list ); - QFileInfo *fi; + const TQFileInfoList *list = d.entryInfoList (); + TQFileInfoListIterator it ( *list ); + TQFileInfo *fi; while ( ( fi = it.current () ) != 0 ) { @@ -84,16 +84,16 @@ view () } -QString +TQString name () { - return QString ( "RecentStuff" ); + return TQString ( "RecentStuff" ); } -QString +TQString type () { - return QString ( "Stub Type" ); + return TQString ( "Stub Type" ); } @@ -107,7 +107,7 @@ id () #include <ktrader.h> KbfxDataGroup * -search ( QString _keyword ) +search ( TQString _keyword ) { KbfxDataGroup *appGroup = new KbfxDataGroup (); // KbfxDataGroupList *glist = new KbfxDataGroupList (); @@ -115,21 +115,21 @@ search ( QString _keyword ) - QString path = + TQString path = KStandardDirs ().localkdedir () + "/share/apps/RecentDocuments/"; - QDir d ( path ); - d.setFilter ( QDir::Files | QDir::Hidden | QDir::NoSymLinks ); - d.setSorting ( QDir::Size | QDir::Reversed ); + TQDir d ( path ); + d.setFilter ( TQDir::Files | TQDir::Hidden | TQDir::NoSymLinks ); + d.setSorting ( TQDir::Size | TQDir::Reversed ); d.setNameFilter ( "*.desktop" ); - const QFileInfoList *list = d.entryInfoList (); - QFileInfoListIterator it ( *list ); - QFileInfo *fi; + const TQFileInfoList *list = d.entryInfoList (); + TQFileInfoListIterator it ( *list ); + TQFileInfo *fi; while ( ( fi = it.current () ) != 0 ) { - if ( fi->fileName ().contains ( _keyword ) > 0 ) + if ( fi->fileName ().tqcontains ( _keyword ) > 0 ) { KDesktopFile *desktop = new KDesktopFile ( fi->filePath () ); diff --git a/plugins/settings/kbfxplasmadatapluginsettings.cpp b/plugins/settings/kbfxplasmadatapluginsettings.cpp index bc02003..e04df1e 100644 --- a/plugins/settings/kbfxplasmadatapluginsettings.cpp +++ b/plugins/settings/kbfxplasmadatapluginsettings.cpp @@ -159,16 +159,16 @@ view () } -QString +TQString name () { - return QString ( "Settings" ); + return TQString ( "Settings" ); } -QString +TQString type () { - return QString ( "Stub Type" ); + return TQString ( "Stub Type" ); } uint @@ -180,7 +180,7 @@ id () KbfxDataGroup * -search ( QString _keyword ) +search ( TQString _keyword ) { _keyword = _keyword; return new KbfxDataGroup(); diff --git a/plugins/strigi/kbfxstrigiplugin.cpp b/plugins/strigi/kbfxstrigiplugin.cpp index dd9471b..8039fa4 100644 --- a/plugins/strigi/kbfxstrigiplugin.cpp +++ b/plugins/strigi/kbfxstrigiplugin.cpp @@ -23,8 +23,8 @@ #include <kservice.h> #include <kservicegroup.h> #include <kdebug.h> -#include <qdir.h> -#include <qfileinfo.h> +#include <tqdir.h> +#include <tqfileinfo.h> #include <kurl.h> #include "kbfxstrigiplugin.h" @@ -107,16 +107,16 @@ view () } -QString +TQString name () { - return QString ( "Strigi" ); + return TQString ( "Strigi" ); } -QString +TQString type () { - return QString ( "Stub Type" ); + return TQString ( "Stub Type" ); } @@ -129,13 +129,13 @@ id () KbfxDataGroup * -search ( QString _keyword ) +search ( TQString _keyword ) { KbfxDataGroup *datagroup = new KbfxDataGroup (); datagroup->setName ( "Strigi" ); - QString socketpath = QDir::homeDirPath () + "/.strigi/socket"; + TQString socketpath = TQDir::homeDirPath () + "/.strigi/socket"; startDaemon (); kdDebug() << socketpath << endl; AsyncSocketClient socket; @@ -165,13 +165,13 @@ search ( QString _keyword ) jstreams::IndexedDocument hit = hits.hits[i]; KbfxDataSource *data = new KbfxDataSource (); - QString name; + TQString name; std::map < std::string, std::string >::const_iterator it = - hits.hits[i].properties.find ( "title" ); + hits.hits[i].properties.tqfind ( "title" ); - QString filename ( hits.hits[i].uri.c_str () ); + TQString filename ( hits.hits[i].uri.c_str () ); - if ( filename.contains ( ".tar." ) > 0 ) + if ( filename.tqcontains ( ".tar." ) > 0 ) { filename = "tar:" + filename; kdDebug() << filename << endl; @@ -183,7 +183,7 @@ search ( QString _keyword ) } else { - uint pos = hits.hits[i].uri.rfind ( '/' ); + uint pos = hits.hits[i].uri.rtqfind ( '/' ); if ( pos == std::string::npos ) { name = hits.hits[i].uri; @@ -203,9 +203,9 @@ search ( QString _keyword ) - QString iconname = + TQString iconname = KMimeType::mimeType ( hits.hits[i].mimetype.c_str () )-> - icon ( QString::null, 0 ); + icon ( TQString(), 0 ); data->setIconPath ( iconname ); datagroup->addItem ( data ); diff --git a/plugins/strigi/kbfxstrigiplugin.h b/plugins/strigi/kbfxstrigiplugin.h index a2e3137..5028593 100644 --- a/plugins/strigi/kbfxstrigiplugin.h +++ b/plugins/strigi/kbfxstrigiplugin.h @@ -32,11 +32,11 @@ extern "C" { KbfxDataStack * view(); - QString name(); //Name of the Plugin My Music .if TOM Create..Configure .. - QString type(); //Type of the plugin ex: Application : Amork : kio ..etc + TQString name(); //Name of the Plugin My Music .if TOM Create..Configure .. + TQString type(); //Type of the plugin ex: Application : Amork : kio ..etc uint id(); //A id for menus - KbfxDataGroup * search ( QString str ); -// KbfxPlasmaCanvasGroup * search(QString _keyword,QCanvas * canvas); //search and return a group + KbfxDataGroup * search ( TQString str ); +// KbfxPlasmaCanvasGroup * search(TQString _keyword,TQCanvas * canvas); //search and return a group } #endif |