From a2277b6bc715464e83882b90c2a058139b8a6b54 Mon Sep 17 00:00:00 2001 From: tpearson Date: Thu, 23 Jun 2011 01:42:07 +0000 Subject: TQt4 port kdeutils This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1238125 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kdelirc/kcmlirc/addaction.cpp | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'kdelirc/kcmlirc/addaction.cpp') diff --git a/kdelirc/kcmlirc/addaction.cpp b/kdelirc/kcmlirc/addaction.cpp index f2d6ad3..1d13f19 100644 --- a/kdelirc/kcmlirc/addaction.cpp +++ b/kdelirc/kcmlirc/addaction.cpp @@ -32,7 +32,7 @@ #include "profileserver.h" #include "remoteserver.h" -AddAction::AddAction(TQWidget *parent, const char *name, const Mode &mode): AddActionBase(parent, name), theMode(mode) +AddAction::AddAction(TQWidget *tqparent, const char *name, const Mode &mode): AddActionBase(tqparent, name), theMode(mode) { connect(this, TQT_SIGNAL( selected(const TQString &) ), TQT_SLOT( updateForPageChange() )); connect(this, TQT_SIGNAL( selected(const TQString &) ), TQT_SLOT( slotCorrectPage() )); @@ -92,12 +92,12 @@ void AddAction::updateButton(const TQString &remote, const TQString &button) { if(theMode.remote() == remote) { // note this isn't the "correct" way of doing it; really i should iterate throughg the items and try to find the item which when put through buttonMap[item] returns the current button name. but i cant be arsed. - theButtons->setCurrentItem(theButtons->findItem(RemoteServer::remoteServer()->getButtonName(remote, button), 0)); - theButtons->ensureItemVisible(theButtons->findItem(RemoteServer::remoteServer()->getButtonName(remote, button), 0)); + theButtons->setCurrentItem(theButtons->tqfindItem(RemoteServer::remoteServer()->getButtonName(remote, button), 0)); + theButtons->ensureItemVisible(theButtons->tqfindItem(RemoteServer::remoteServer()->getButtonName(remote, button), 0)); } else KMessageBox::error(this, i18n( "You did not select a mode of that remote control. Please use %1, " - "or revert back to select a different mode." ).arg( theMode.remoteName() ), + "or revert back to select a different mode." ).tqarg( theMode.remoteName() ), i18n( "Incorrect Remote Control Detected" )); if(indexOf(currentPage()) == 1) @@ -149,7 +149,7 @@ const TQStringList AddAction::getFunctions(const TQString app, const TQString ob if( *i != "QCStringList interfaces()" && *i != "QCStringList functions()" && *i != "QCStringList objects()" && - *i != "QCStringList find(TQCString)" ) + *i != "QCStringList tqfind(TQCString)" ) ret += TQString::fromUtf8(*i); return ret; } @@ -180,7 +180,7 @@ void AddAction::updateOptions() else if(theUseDCOP->isChecked()) { if(!theObjects->selectedItem()) return; - TQListViewItem* i = theObjects->selectedItem()->parent(); + TQListViewItem* i = theObjects->selectedItem()->tqparent(); if(!i) return; isUnique = uniqueProgramMap[i]; TQRegExp r("(.*)-[0-9]+"); @@ -262,19 +262,19 @@ void AddAction::updateParameter() if(theParameters->currentItem()) { TQString type = theParameters->currentItem()->text(2); int index = theParameters->currentItem()->text(3).toInt() - 1; - if(type.find("int") != -1 || type.find("short") != -1 || type.find("long") != -1) + if(type.tqfind("int") != -1 || type.tqfind("short") != -1 || type.tqfind("long") != -1) { theValue->raiseWidget(2); theValueIntNumInput->setValue(theArguments[index].toInt()); } - else if(type.find("double") != -1 || type.find("float") != -1) + else if(type.tqfind("double") != -1 || type.tqfind("float") != -1) { theValue->raiseWidget(3); theValueDoubleNumInput->setValue(theArguments[index].toDouble()); } - else if(type.find("bool") != -1) + else if(type.tqfind("bool") != -1) { theValue->raiseWidget(1); theValueCheckBox->setChecked(theArguments[index].toBool()); } - else if(type.find("TQStringList") != -1) + else if(type.tqfind(TQSTRINGLIST_OBJECT_NAME_STRING) != -1) { theValue->raiseWidget(4); TQStringList backup = theArguments[index].toStringList(); // backup needed because calling clear will kill what ever has been saved. @@ -307,13 +307,13 @@ void AddAction::slotParameterChanged() if(!theParameters->currentItem()) return; int index = theParameters->currentItem()->text(3).toInt() - 1; TQString type = theParameters->currentItem()->text(2); - if(type.find("int") != -1 || type.find("short") != -1 || type.find("long") != -1) + if(type.tqfind("int") != -1 || type.tqfind("short") != -1 || type.tqfind("long") != -1) theArguments[index].asInt() = theValueIntNumInput->value(); - else if(type.find("double") != -1 || type.find("float") != -1) + else if(type.tqfind("double") != -1 || type.tqfind("float") != -1) theArguments[index].asDouble() = theValueDoubleNumInput->value(); - else if(type.find("bool") != -1) + else if(type.tqfind("bool") != -1) theArguments[index].asBool() = theValueCheckBox->isChecked(); - else if(type.find("TQStringList") != -1) + else if(type.tqfind(TQSTRINGLIST_OBJECT_NAME_STRING) != -1) theArguments[index].asStringList() = theValueEditListBox->items(); else theArguments[index].asString() = theValueLineEdit->text(); @@ -339,11 +339,11 @@ void AddAction::updateObjects() QCStringList theApps = theClient->registeredApplications(); for(QCStringList::iterator i = theApps.begin(); i != theApps.end(); ++i) { - if(!TQString(*i).find("anonymous")) continue; - if(!TQString(*i).find(i18n( "anonymous" ))) continue; + if(!TQString(*i).tqfind("anonymous")) continue; + if(!TQString(*i).tqfind(i18n( "anonymous" ))) continue; TQRegExp r("(.*)-[0-9]+"); TQString name = r.exactMatch(TQString(*i)) ? r.cap(1) : *i; - if(names.contains(name)) continue; + if(names.tqcontains(name)) continue; names += name; KListViewItem *a = new KListViewItem(theObjects, name); @@ -361,8 +361,8 @@ void AddAction::updateObjects() void AddAction::updateFunctions() { theFunctions->clear(); - if(theObjects->currentItem() && theObjects->currentItem()->parent()) - { TQStringList functions = getFunctions(nameProgramMap[theObjects->currentItem()->parent()], theObjects->currentItem()->text(0)); + if(theObjects->currentItem() && theObjects->currentItem()->tqparent()) + { TQStringList functions = getFunctions(nameProgramMap[theObjects->currentItem()->tqparent()], theObjects->currentItem()->text(0)); for(TQStringList::iterator i = functions.begin(); i != functions.end(); ++i) { Prototype p((TQString)(*i)); new KListViewItem(theFunctions, p.name(), p.argumentList(), *i); -- cgit v1.2.3