summaryrefslogtreecommitdiffstats
path: root/src/modules/my
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-28 18:31:12 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-28 18:31:12 +0000
commit0a80cfd57d271dd44221467efb426675fa470356 (patch)
tree6f503a31aa078eaf8fa015cf1749808529d49fc9 /src/modules/my
parent3329e5a804e28ef3f5eb51d1e7affdd5a508e8f2 (diff)
downloadkvirc-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/my')
-rw-r--r--src/modules/my/idle.cpp22
-rw-r--r--src/modules/my/idle.h19
-rw-r--r--src/modules/my/idle_mac.cpp6
-rw-r--r--src/modules/my/idle_x11.cpp12
-rw-r--r--src/modules/my/libkvimy.cpp2
5 files changed, 31 insertions, 30 deletions
diff --git a/src/modules/my/idle.cpp b/src/modules/my/idle.cpp
index 56720c77..daa5c209 100644
--- a/src/modules/my/idle.cpp
+++ b/src/modules/my/idle.cpp
@@ -20,9 +20,9 @@
#include"idle.h"
-#include<qcursor.h>
-#include<qdatetime.h>
-#include<qtimer.h>
+#include<tqcursor.h>
+#include<tqdatetime.h>
+#include<tqtimer.h>
static IdlePlatform *platform = 0;
static int platform_ref = 0;
@@ -45,7 +45,7 @@ Idle::Idle()
if(platform)
++platform_ref;
- connect(&d->checkTimer, SIGNAL(timeout()), SLOT(doCheck()));
+ connect(&d->checkTimer, TQT_SIGNAL(timeout()), TQT_SLOT(doCheck()));
}
Idle::~Idle()
@@ -72,12 +72,12 @@ bool Idle::usingPlatform() const
void Idle::start()
{
- d->startTime = QDateTime::currentDateTime();
+ d->startTime = TQDateTime::tqcurrentDateTime();
if(!platform) {
// generic idle
- d->lastMousePos = QCursor::pos();
- d->idleSince = QDateTime::currentDateTime();
+ d->lastMousePos = TQCursor::pos();
+ d->idleSince = TQDateTime::tqcurrentDateTime();
}
// poll every second (use a lower value if you need more accuracy)
@@ -95,8 +95,8 @@ int Idle::secondsIdle()
if(platform)
i = platform->secondsIdle();
else {
- QPoint curMousePos = QCursor::pos();
- QDateTime curDateTime = QDateTime::currentDateTime();
+ TQPoint curMousePos = TQCursor::pos();
+ TQDateTime curDateTime = TQDateTime::tqcurrentDateTime();
if(d->lastMousePos != curMousePos) {
d->lastMousePos = curMousePos;
d->idleSince = curDateTime;
@@ -105,7 +105,7 @@ int Idle::secondsIdle()
}
// set 'beginIdle' to the beginning of the idle time (by backtracking 'i' seconds from now)
- QDateTime beginIdle = QDateTime::currentDateTime().addSecs(-i);
+ TQDateTime beginIdle = TQDateTime::tqcurrentDateTime().addSecs(-i);
// set 't' to hold the number of seconds between 'beginIdle' and 'startTime'
int t = beginIdle.secsTo(d->startTime);
@@ -121,7 +121,7 @@ int Idle::secondsIdle()
}
// how long have we been idle?
- int idleTime = d->startTime.secsTo(QDateTime::currentDateTime());
+ int idleTime = d->startTime.secsTo(TQDateTime::tqcurrentDateTime());
return idleTime;
}
diff --git a/src/modules/my/idle.h b/src/modules/my/idle.h
index 647b2691..449d36fa 100644
--- a/src/modules/my/idle.h
+++ b/src/modules/my/idle.h
@@ -22,16 +22,17 @@
#define IDLE_H
#include "kvi_settings.h"
-#include<qobject.h>
-#include<qcursor.h>
-#include<qdatetime.h>
-#include<qtimer.h>
+#include<tqobject.h>
+#include<tqcursor.h>
+#include<tqdatetime.h>
+#include<tqtimer.h>
class IdlePlatform;
-class Idle : public QObject
+class Idle : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
Idle();
~Idle();
@@ -72,13 +73,13 @@ class Idle::Private
public:
Private() {}
- QPoint lastMousePos;
- QDateTime idleSince;
+ TQPoint lastMousePos;
+ TQDateTime idleSince;
bool active;
int idleTime;
- QDateTime startTime;
- QTimer checkTimer;
+ TQDateTime startTime;
+ TQTimer checkTimer;
};
#endif
diff --git a/src/modules/my/idle_mac.cpp b/src/modules/my/idle_mac.cpp
index 92de564d..4e116fa9 100644
--- a/src/modules/my/idle_mac.cpp
+++ b/src/modules/my/idle_mac.cpp
@@ -24,8 +24,8 @@
#include <Carbon/Carbon.h>
// Why does Apple have to make this so complicated?
-static OSStatus LoadFrameworkBundle(CFStringRef framework, CFBundleRef *bundlePtr) {
- OSStatus err;
+static OStqStatus LoadFrameworkBundle(CFStringRef framework, CFBundleRef *bundlePtr) {
+ OStqStatus err;
FSRef frameworksFolderRef;
CFURLRef baseURL;
CFURLRef bundleURL;
@@ -117,7 +117,7 @@ IdlePlatform::~IdlePlatform() {
// Typedef for the function we're getting back from CFBundleGetFunctionPointerForName.
-typedef OSStatus (*InstallEventLoopIdleTimerPtr)(EventLoopRef inEventLoop,
+typedef OStqStatus (*InstallEventLoopIdleTimerPtr)(EventLoopRef inEventLoop,
EventTimerInterval inFireDelay,
EventTimerInterval inInterval,
EventLoopIdleTimerUPP inTimerProc,
diff --git a/src/modules/my/idle_x11.cpp b/src/modules/my/idle_x11.cpp
index fa2f1f15..af29801e 100644
--- a/src/modules/my/idle_x11.cpp
+++ b/src/modules/my/idle_x11.cpp
@@ -31,14 +31,14 @@ int IdlePlatform::secondsIdle() { return 0; }
#else
-#include<qapplication.h>
+#include<tqapplication.h>
#include<X11/Xlib.h>
#include<X11/Xutil.h>
#include<X11/extensions/scrnsaver.h>
#ifdef COMPILE_USE_QT4
- #include <qdesktopwidget.h>
+ #include <tqdesktopwidget.h>
#endif
static XErrorHandler old_handler = 0;
@@ -83,7 +83,7 @@ bool IdlePlatform::init()
old_handler = XSetErrorHandler(xerrhandler);
int event_base, error_base;
- if(XScreenSaverQueryExtension(QApplication::desktop()->screen()->x11Display(), &event_base, &error_base)) {
+ if(XScreenSaverQueryExtension(TQT_TQPAINTDEVICE(TQApplication::desktop()->screen())->x11Display(), &event_base, &error_base)) {
d->ss_info = XScreenSaverAllocInfo();
return true;
}
@@ -91,7 +91,7 @@ bool IdlePlatform::init()
}
#ifdef COMPILE_USE_QT4
- #include <qx11info_x11.h>
+ #include <tqx11info_x11.h>
#endif
int IdlePlatform::secondsIdle()
@@ -99,9 +99,9 @@ int IdlePlatform::secondsIdle()
if(!d->ss_info)
return 0;
#ifdef COMPILE_USE_QT4
- if(!XScreenSaverQueryInfo(QApplication::desktop()->screen()->x11Display(), QX11Info::appRootWindow(), d->ss_info))
+ if(!XScreenSaverQueryInfo(TQT_TQPAINTDEVICE(TQApplication::desktop()->screen())->x11Display(), QX11Info::appRootWindow(), d->ss_info))
#else
- if(!XScreenSaverQueryInfo(QApplication::desktop()->screen()->x11Display(), qt_xrootwin(), d->ss_info))
+ if(!XScreenSaverQueryInfo(TQT_TQPAINTDEVICE(TQApplication::desktop()->screen())->x11Display(), qt_xrootwin(), d->ss_info))
#endif
return 0;
return d->ss_info->idle / 1000;
diff --git a/src/modules/my/libkvimy.cpp b/src/modules/my/libkvimy.cpp
index d98d44af..07a93760 100644
--- a/src/modules/my/libkvimy.cpp
+++ b/src/modules/my/libkvimy.cpp
@@ -247,7 +247,7 @@ static bool my_kvs_fnc_host(KviKvsModuleFunctionCall * c)
@description:
Returns the ip address of the current irc context as known by the IRC server.[br]
The ip address is resolved as soon as the hostname is received from the server.
- If the hostname is masked or there is an error in the DNS lookup then
+ If the hostname is tqmasked or there is an error in the DNS lookup then
you may get the real local host ip address as determined at connection startup.[br]
If the irc context is not connected then an empty string is returned.[br]
If <irc_context_id> is specified this function returns acts as it was called