From 5ad8fdbf162cf819cf1c48d2ddd8aed9113ab718 Mon Sep 17 00:00:00 2001 From: tpearson Date: Mon, 30 May 2011 18:02:11 +0000 Subject: 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 --- systemsettings/kcmodulemenu.cpp | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'systemsettings/kcmodulemenu.cpp') diff --git a/systemsettings/kcmodulemenu.cpp b/systemsettings/kcmodulemenu.cpp index 8208ec0..3d36388 100644 --- a/systemsettings/kcmodulemenu.cpp +++ b/systemsettings/kcmodulemenu.cpp @@ -22,18 +22,18 @@ #include #include #include -#include +#include class KCModuleMenuPrivate { public: KCModuleMenuPrivate(){ } - QMap > menus; - QString basePath; + TQMap > menus; + TQString basePath; }; -KCModuleMenu::KCModuleMenu( const QString &menuName ) : +KCModuleMenu::KCModuleMenu( const TQString &menuName ) : d( new KCModuleMenuPrivate ) { kdDebug() << "MenuName: \"" << menuName << "\"." << endl; @@ -53,7 +53,7 @@ KCModuleMenu::~KCModuleMenu() delete d; } -void KCModuleMenu::readMenu( const QString &pathName ) +void KCModuleMenu::readMenu( const TQString &pathName ) { KServiceGroup::Ptr group = KServiceGroup::group( pathName ); if ( !group || !group->isValid() ) @@ -64,7 +64,7 @@ void KCModuleMenu::readMenu( const QString &pathName ) return; caption = group->caption(); - QValueList currentMenu; + TQValueList currentMenu; for( KServiceGroup::List::ConstIterator it = list.begin(); it != list.end(); it++) @@ -108,12 +108,12 @@ bool KCModuleMenu::addEntry( KSycocaEntry *entry ){ } -QValueList KCModuleMenu::modules( const QString &menuPath ) +TQValueList KCModuleMenu::modules( const TQString &menuPath ) { - QValueList list; + TQValueList list; - QValueList subMenu = menuList(menuPath); - QValueList::iterator it; + TQValueList subMenu = menuList(menuPath); + TQValueList::iterator it; for ( it = subMenu.begin(); it != subMenu.end(); ++it ){ if ( !(*it).menu ) list.append( (*it).item ); @@ -122,12 +122,12 @@ QValueList KCModuleMenu::modules( const QString &menuPath ) return list; } -QStringList KCModuleMenu::submenus( const QString &menuPath ) +TQStringList KCModuleMenu::submenus( const TQString &menuPath ) { - QStringList list; + TQStringList list; - QValueList subMenu = menuList(menuPath); - QValueList::iterator it; + TQValueList subMenu = menuList(menuPath); + TQValueList::iterator it; for ( it = subMenu.begin(); it != subMenu.end(); ++it ){ if ( (*it).menu ) list.append( (*it).subMenu ); @@ -136,11 +136,11 @@ QStringList KCModuleMenu::submenus( const QString &menuPath ) return list; } -QValueList KCModuleMenu::menuList( const QString &menuPath ) +TQValueList KCModuleMenu::menuList( const TQString &menuPath ) { if( menuPath.isEmpty() ) { if( d->basePath.isEmpty()) - return QValueList(); + return TQValueList(); else return menuList( d->basePath ); } @@ -171,12 +171,12 @@ QValueList KCModuleMenu::menuList( const QString &menuPath ) * * "Michael D. Stemle, Jr." */ -QString KCModuleMenu::deriveCaptionFromPath( const QString &menuPath ) +TQString KCModuleMenu::deriveCaptionFromPath( const TQString &menuPath ) { - QStringList parts(QStringList::split("/",menuPath)); - QString result(""); + TQStringList parts(TQStringList::split("/",menuPath)); + TQString result(""); - QStringList::Iterator it = parts.end(); // Start at the end + TQStringList::Iterator it = parts.end(); // Start at the end // Find the last non-empty string in the split. for (; it != parts.begin(); --it) { -- cgit v1.2.3