diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-28 18:31:12 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-28 18:31:12 +0000 |
commit | 0a80cfd57d271dd44221467efb426675fa470356 (patch) | |
tree | 6f503a31aa078eaf8fa015cf1749808529d49fc9 /src/modules/toolbar | |
parent | 3329e5a804e28ef3f5eb51d1e7affdd5a508e8f2 (diff) | |
download | kvirc-0a80cfd57d271dd44221467efb426675fa470356.tar.gz kvirc-0a80cfd57d271dd44221467efb426675fa470356.zip |
TQt4 port kvirc
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kvirc@1238719 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/modules/toolbar')
-rw-r--r-- | src/modules/toolbar/libkvitoolbar.cpp | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/src/modules/toolbar/libkvitoolbar.cpp b/src/modules/toolbar/libkvitoolbar.cpp index a72949ca..714de08f 100644 --- a/src/modules/toolbar/libkvitoolbar.cpp +++ b/src/modules/toolbar/libkvitoolbar.cpp @@ -72,7 +72,7 @@ static bool toolbar_kvs_cmd_create(KviKvsModuleCommandCall * c) { - QString szId,szLabel,szIconId; + TQString szId,szLabel,szIconId; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("id",KVS_PT_NONEMPTYSTRING,0,szId) KVSM_PARAMETER("label",KVS_PT_STRING,KVS_PF_OPTIONAL,szLabel) @@ -87,10 +87,10 @@ static bool toolbar_kvs_cmd_create(KviKvsModuleCommandCall * c) */ if(szLabel.isEmpty())szLabel = "$tr(Unnamed)"; - KviCustomToolBarDescriptor * d = KviCustomToolBarManager::instance()->find(szId); + KviCustomToolBarDescriptor * d = KviCustomToolBarManager::instance()->tqfind(szId); if(d) { - if(!c->switches()->find('p',"preserve"))d->clear(); + if(!c->switches()->tqfind('p',"preserve"))d->clear(); d->rename(szLabel); } else { d = KviCustomToolBarManager::instance()->create(szId,szLabel); @@ -127,15 +127,15 @@ static bool toolbar_kvs_cmd_create(KviKvsModuleCommandCall * c) static bool toolbar_kvs_cmd_clear(KviKvsModuleCommandCall * c) { - QString szId; + TQString szId; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("id",KVS_PT_NONEMPTYSTRING,0,szId) KVSM_PARAMETERS_END(c) - KviCustomToolBarDescriptor * d = KviCustomToolBarManager::instance()->find(szId); + KviCustomToolBarDescriptor * d = KviCustomToolBarManager::instance()->tqfind(szId); if(d)d->clear(); else { - if(!c->switches()->find('q',"quiet")) + if(!c->switches()->tqfind('q',"quiet")) c->warning(__tr2qs("The specified toolbar doesn't exist")); } @@ -171,14 +171,14 @@ static bool toolbar_kvs_cmd_clear(KviKvsModuleCommandCall * c) static bool toolbar_kvs_cmd_destroy(KviKvsModuleCommandCall * c) { - QString szId; + TQString szId; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("id",KVS_PT_NONEMPTYSTRING,0,szId) KVSM_PARAMETERS_END(c) if(!KviCustomToolBarManager::instance()->destroyDescriptor(szId)) { - if(!c->switches()->find('q',"quiet")) + if(!c->switches()->tqfind('q',"quiet")) c->warning(__tr2qs("The specified toolbar doesn't exist")); } @@ -214,16 +214,16 @@ static bool toolbar_kvs_cmd_destroy(KviKvsModuleCommandCall * c) static bool toolbar_kvs_cmd_show(KviKvsModuleCommandCall * c) { - QString szId; + TQString szId; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("id",KVS_PT_NONEMPTYSTRING,0,szId) KVSM_PARAMETERS_END(c) - KviCustomToolBarDescriptor * d = KviCustomToolBarManager::instance()->find(szId); + KviCustomToolBarDescriptor * d = KviCustomToolBarManager::instance()->tqfind(szId); if(!d) { - if(!c->switches()->find('q',"quiet")) + if(!c->switches()->tqfind('q',"quiet")) c->warning(__tr2qs("The specified toolbar doesn't exist")); return true; } @@ -263,16 +263,16 @@ static bool toolbar_kvs_cmd_show(KviKvsModuleCommandCall * c) static bool toolbar_kvs_cmd_hide(KviKvsModuleCommandCall * c) { - QString szId; + TQString szId; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("id",KVS_PT_NONEMPTYSTRING,0,szId) KVSM_PARAMETERS_END(c) - KviCustomToolBarDescriptor * d = KviCustomToolBarManager::instance()->find(szId); + KviCustomToolBarDescriptor * d = KviCustomToolBarManager::instance()->tqfind(szId); if(!d) { - if(!c->switches()->find('q',"quiet")) + if(!c->switches()->tqfind('q',"quiet")) c->warning(__tr2qs("The specified toolbar doesn't exist")); return true; } @@ -302,12 +302,12 @@ static bool toolbar_kvs_cmd_hide(KviKvsModuleCommandCall * c) static bool toolbar_kvs_fnc_exists(KviKvsModuleFunctionCall * c) { - QString szId; + TQString szId; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("id",KVS_PT_NONEMPTYSTRING,0,szId) KVSM_PARAMETERS_END(c) - c->returnValue()->setBoolean(KviCustomToolBarManager::instance()->find(szId) ? true : false); + c->returnValue()->setBoolean(KviCustomToolBarManager::instance()->tqfind(szId) ? true : false); return true; } @@ -330,11 +330,11 @@ static bool toolbar_kvs_fnc_exists(KviKvsModuleFunctionCall * c) static bool toolbar_kvs_fnc_isVisible(KviKvsModuleFunctionCall * c) { - QString szId; + TQString szId; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("id",KVS_PT_NONEMPTYSTRING,0,szId) KVSM_PARAMETERS_END(c) - KviCustomToolBarDescriptor * d = KviCustomToolBarManager::instance()->find(szId); + KviCustomToolBarDescriptor * d = KviCustomToolBarManager::instance()->tqfind(szId); c->returnValue()->setBoolean(d ? (d->toolBar() ? true : false) : false); return true; } @@ -359,7 +359,7 @@ static bool toolbar_kvs_fnc_list(KviKvsModuleFunctionCall * c) { KviKvsArray * a = new KviKvsArray(); - KviPointerHashTableIterator<QString,KviCustomToolBarDescriptor> it(*(KviCustomToolBarManager::instance()->descriptors())); + KviPointerHashTableIterator<TQString,KviCustomToolBarDescriptor> it(*(KviCustomToolBarManager::instance()->descriptors())); kvs_uint_t id = 0; @@ -409,49 +409,49 @@ static bool toolbar_kvs_fnc_list(KviKvsModuleFunctionCall * c) static bool toolbar_kvs_cmd_removeitem(KviKvsModuleCommandCall * c) { - QString szId; + TQString szId; KviKvsVariant * pvAction; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("id",KVS_PT_NONEMPTYSTRING,0,szId) KVSM_PARAMETER("action",KVS_PT_VARIANT,0,pvAction) KVSM_PARAMETERS_END(c) - KviCustomToolBarDescriptor * d = KviCustomToolBarManager::instance()->find(szId); + KviCustomToolBarDescriptor * d = KviCustomToolBarManager::instance()->tqfind(szId); if(!pvAction) { - if(!c->switches()->find('q',"quiet")) + if(!c->switches()->tqfind('q',"quiet")) c->error(__tr2qs("No action name/index specified")); // syntax error return false; } if(!d) { - if(!c->switches()->find('q',"quiet")) + if(!c->switches()->tqfind('q',"quiet")) c->warning(__tr2qs("The specified toolbar doesn't exist")); return true; } - if(c->switches()->find('i',"index")) + if(c->switches()->tqfind('i',"index")) { kvs_int_t iAction; if(!pvAction->asInteger(iAction)) { - if(!c->switches()->find('q',"quiet")) + if(!c->switches()->tqfind('q',"quiet")) c->warning(__tr2qs("The action parameter didn't evaluate to an index")); } else { if(!d->removeAction(iAction)) { - if(!c->switches()->find('q',"quiet")) + if(!c->switches()->tqfind('q',"quiet")) c->warning(__tr2qs("The toolbar does not contain the specified item")); } } } else { - QString szAction; + TQString szAction; pvAction->asString(szAction); if(!d->removeAction(szAction)) { - if(!c->switches()->find('q',"quiet")) + if(!c->switches()->tqfind('q',"quiet")) c->warning(__tr2qs("The toolbar does not contain the specified item")); } } @@ -492,25 +492,25 @@ static bool toolbar_kvs_cmd_removeitem(KviKvsModuleCommandCall * c) static bool toolbar_kvs_cmd_additem(KviKvsModuleCommandCall * c) { - QString szId; - QString szAction; + TQString szId; + TQString szAction; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("id",KVS_PT_NONEMPTYSTRING,0,szId) KVSM_PARAMETER("action",KVS_PT_NONEMPTYSTRING,0,szAction) KVSM_PARAMETERS_END(c) - KviCustomToolBarDescriptor * d = KviCustomToolBarManager::instance()->find(szId); + KviCustomToolBarDescriptor * d = KviCustomToolBarManager::instance()->tqfind(szId); if(!d) { - if(!c->switches()->find('q',"quiet")) + if(!c->switches()->tqfind('q',"quiet")) c->warning(__tr2qs("The specified toolbar doesn't exist")); return true; } if(!d->addAction(szAction)) { - if(!c->switches()->find('q',"quiet"))c->warning(__tr2qs("The action \"%Q\" doesn't exist"),&szAction); + if(!c->switches()->tqfind('q',"quiet"))c->warning(__tr2qs("The action \"%Q\" doesn't exist"),&szAction); } return true; @@ -535,12 +535,12 @@ static bool toolbar_kvs_cmd_additem(KviKvsModuleCommandCall * c) static bool toolbar_kvs_fnc_items(KviKvsModuleFunctionCall * c) { - QString szId; + TQString szId; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("id",KVS_PT_NONEMPTYSTRING,0,szId) KVSM_PARAMETERS_END(c) - KviCustomToolBarDescriptor * d = KviCustomToolBarManager::instance()->find(szId); + KviCustomToolBarDescriptor * d = KviCustomToolBarManager::instance()->tqfind(szId); if(!d) { @@ -550,11 +550,11 @@ static bool toolbar_kvs_fnc_items(KviKvsModuleFunctionCall * c) KviKvsArray * a = new KviKvsArray(); - KviPointerHashTableIterator<QString,KviCustomToolBarDescriptor> it(*(KviCustomToolBarManager::instance()->descriptors())); + KviPointerHashTableIterator<TQString,KviCustomToolBarDescriptor> it(*(KviCustomToolBarManager::instance()->descriptors())); kvs_uint_t id = 0; - for(QString * s = d->actions()->first();s;s = d->actions()->next()) + for(TQString * s = d->actions()->first();s;s = d->actions()->next()) { a->set(id,new KviKvsVariant(*s)); id++; |