summaryrefslogtreecommitdiffstats
path: root/kdelirc/irkick
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-23 01:42:07 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-23 01:42:07 +0000
commita2277b6bc715464e83882b90c2a058139b8a6b54 (patch)
treeab09b14014f59b4d8e2ddd12226aa0b22e4dfc5d /kdelirc/irkick
parentd3f79e04b34bd1f70a458b81b28fc8799498c8dc (diff)
downloadtdeutils-a2277b6bc715464e83882b90c2a058139b8a6b54.tar.gz
tdeutils-a2277b6bc715464e83882b90c2a058139b8a6b54.zip
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
Diffstat (limited to 'kdelirc/irkick')
-rw-r--r--kdelirc/irkick/irkick.cpp16
-rw-r--r--kdelirc/irkick/irkick.h3
-rw-r--r--kdelirc/irkick/klircclient.cpp8
-rw-r--r--kdelirc/irkick/klircclient.h5
4 files changed, 17 insertions, 15 deletions
diff --git a/kdelirc/irkick/irkick.cpp b/kdelirc/irkick/irkick.cpp
index fdcfa3a..036974c 100644
--- a/kdelirc/irkick/irkick.cpp
+++ b/kdelirc/irkick/irkick.cpp
@@ -44,10 +44,10 @@
void IRKTrayIcon::mousePressEvent(TQMouseEvent *e)
{
- KSystemTray::mousePressEvent(new TQMouseEvent(TQEvent::MouseButtonPress, e->pos(), e->globalPos(), e->button() == LeftButton ? RightButton : e->button(), e->state()));
+ KSystemTray::mousePressEvent(new TQMouseEvent(TQEvent::MouseButtonPress, e->pos(), e->globalPos(), e->button() == Qt::LeftButton ? Qt::RightButton : e->button(), e->state()));
}
-IRKick::IRKick(const TQCString &obj) : TQObject(), DCOPObject(obj), npApp(TQString::null)
+IRKick::IRKick(const TQCString &obj) : TQObject(), DCOPObject(obj), npApp(TQString())
{
kapp->dcopClient()->setDefaultObject(obj);
theClient = new KLircClient();
@@ -195,7 +195,7 @@ bool IRKick::getPrograms(const IRAction &action, TQStringList &programs)
for(QCStringList::iterator i = buf.begin(); i != buf.end(); ++i)
{
TQString program = TQString::fromUtf8(*i);
- if(program.contains(r))
+ if(program.tqcontains(r))
programs += program;
}
if(programs.size() > 1 && action.ifMulti() == IM_DONTSEND)
@@ -206,7 +206,7 @@ bool IRKick::getPrograms(const IRAction &action, TQStringList &programs)
for(TQValueList<WId>::iterator i = s.fromLast(); i != s.end(); i--)
{ int p = KWin::info(*i).pid;
TQString id = action.program() + "-" + TQString().setNum(p);
- if(programs.contains(id))
+ if(programs.tqcontains(id))
{ programs.clear();
programs += id;
break;
@@ -220,7 +220,7 @@ bool IRKick::getPrograms(const IRAction &action, TQStringList &programs)
for(TQValueList<WId>::iterator i = s.begin(); i != s.end(); ++i)
{ int p = KWin::info(*i).pid;
TQString id = action.program() + "-" + TQString().setNum(p);
- if(programs.contains(id))
+ if(programs.tqcontains(id))
{ programs.clear();
programs += id;
break;
@@ -244,7 +244,7 @@ void IRKick::executeAction(const IRAction &action)
{ TQString sname = ProfileServer::profileServer()->getServiceName(action.program());
if(!sname.isNull())
{
- KPassivePopup::message("IRKick", i18n("Starting <b>%1</b>...").arg(action.application()), SmallIcon("irkick"), theTrayIcon);
+ KPassivePopup::message("IRKick", i18n("Starting <b>%1</b>...").tqarg(action.application()), SmallIcon("irkick"), theTrayIcon);
KApplication::startServiceByDesktopName(sname);
}
}
@@ -282,7 +282,7 @@ void IRKick::gotMessage(const TQString &theRemote, const TQString &theButton, in
if(!npApp.isNull())
{
TQString theApp = npApp;
- npApp = TQString::null;
+ npApp = TQString();
// send notifier by DCOP to npApp/npModule/npMethod(theRemote, theButton);
TQByteArray data; TQDataStream arg(data, IO_WriteOnly);
arg << theRemote << theButton;
@@ -330,7 +330,7 @@ void IRKick::stealNextPress(TQString app, TQString module, TQString method)
void IRKick::dontStealNextPress()
{
- npApp = TQString::null;
+ npApp = TQString();
}
#include "irkick.moc"
diff --git a/kdelirc/irkick/irkick.h b/kdelirc/irkick/irkick.h
index 92c2d9c..d55dcee 100644
--- a/kdelirc/irkick/irkick.h
+++ b/kdelirc/irkick/irkick.h
@@ -36,12 +36,13 @@ public:
KPopupMenu* contextMenu() const { return KSystemTray::contextMenu(); }
KActionCollection* actionCollection() { return KSystemTray::actionCollection(); }
- IRKTrayIcon(TQWidget *parent = 0, const char *name = 0): KSystemTray(parent, name) {}
+ IRKTrayIcon(TQWidget *tqparent = 0, const char *name = 0): KSystemTray(tqparent, name) {}
};
class IRKick: public TQObject, public DCOPObject
{
Q_OBJECT
+// TQ_OBJECT
K_DCOP
TQString npApp, npModule, npMethod;
diff --git a/kdelirc/irkick/klircclient.cpp b/kdelirc/irkick/klircclient.cpp
index 3ce33d6..544eb2a 100644
--- a/kdelirc/irkick/klircclient.cpp
+++ b/kdelirc/irkick/klircclient.cpp
@@ -43,7 +43,7 @@
#include "klircclient.h"
-KLircClient::KLircClient(TQWidget *parent, const char *name) : TQObject(parent, name), theSocket(0), listIsUpToDate(false)
+KLircClient::KLircClient(TQWidget *tqparent, const char *name) : TQObject(tqparent, name), theSocket(0), listIsUpToDate(false)
{
connectToLirc();
}
@@ -177,14 +177,14 @@ void KLircClient::slotRead()
{
// <code> <repeat> <button name> <remote control name>
line.remove(0, 17); // strip code
- int pos = line.find(' ');
+ int pos = line.tqfind(' ');
if (pos < 0) return;
bool ok;
int repeat = line.left(pos).toInt(&ok, 16);
if (!ok) return;
line.remove(0, pos + 1);
- pos = line.find(' ');
+ pos = line.tqfind(' ');
if (pos < 0) return;
TQString btn = line.left(pos);
if(btn.startsWith("'") && btn.endsWith("'"))
@@ -223,7 +223,7 @@ const TQString KLircClient::readLine()
theSocket->waitForMore(500, &timeout);
if (timeout)
{ // something's wrong. there ain't no line comin!
- return TQString::null;
+ return TQString();
}
}
TQString line = theSocket->readLine();
diff --git a/kdelirc/irkick/klircclient.h b/kdelirc/irkick/klircclient.h
index e271b23..24089c8 100644
--- a/kdelirc/irkick/klircclient.h
+++ b/kdelirc/irkick/klircclient.h
@@ -26,9 +26,10 @@ class TQSocketNotifier;
@author Gav Wood
*/
-class KLircClient: public QObject
+class KLircClient: public TQObject
{
Q_OBJECT
+ TQ_OBJECT
private:
struct lirc_config *theConfig;
@@ -107,7 +108,7 @@ public:
*/
bool connectToLirc();
- KLircClient(TQWidget *parent = 0, const char *name = 0);
+ KLircClient(TQWidget *tqparent = 0, const char *name = 0);
~KLircClient();
};