summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/actionQueue.h5
-rw-r--r--lib/actions.cc6
-rw-r--r--lib/actions.h2
-rw-r--r--lib/idmapperxml.h2
-rw-r--r--lib/kpilotdevicelink.cc66
-rw-r--r--lib/kpilotdevicelink.h19
-rw-r--r--lib/kpilotdevicelinkPrivate.h15
-rw-r--r--lib/kpilotlink.cc12
-rw-r--r--lib/kpilotlink.h7
-rw-r--r--lib/kpilotlocallink.cc8
-rw-r--r--lib/kpilotlocallink.h3
-rw-r--r--lib/options.cc4
-rw-r--r--lib/options.h10
-rw-r--r--lib/pilot.cc2
-rw-r--r--lib/pilot.h10
-rw-r--r--lib/pilotAddress.cc24
-rw-r--r--lib/pilotAddress.h10
-rw-r--r--lib/pilotAppInfo.h2
-rw-r--r--lib/pilotDatabase.h2
-rw-r--r--lib/pilotDateEntry.cc42
-rw-r--r--lib/pilotDateEntry.h2
-rw-r--r--lib/pilotLocalDatabase.cc4
-rw-r--r--lib/pilotMemo.cc14
-rw-r--r--lib/pilotMemo.h2
-rw-r--r--lib/pilotRecord.cc4
-rw-r--r--lib/pilotSerialDatabase.cc6
-rw-r--r--lib/pilotTodoEntry.cc20
-rw-r--r--lib/pilotTodoEntry.h2
-rw-r--r--lib/plugin.cc78
-rw-r--r--lib/plugin.h20
-rw-r--r--lib/pluginfactory.h20
-rw-r--r--lib/recordConduit.cc18
-rw-r--r--lib/recordConduit.h1
-rw-r--r--lib/syncAction.cc14
-rw-r--r--lib/syncAction.h29
35 files changed, 246 insertions, 239 deletions
diff --git a/lib/actionQueue.h b/lib/actionQueue.h
index 057b4be..b50e8aa 100644
--- a/lib/actionQueue.h
+++ b/lib/actionQueue.h
@@ -1,5 +1,5 @@
-#ifndef _KPILOT_ACTIONQUEUE_H
-#define _KPILOT_ACTIONQUEUE_H
+#ifndef _KPILOT_ACTIONTQUEUE_H
+#define _KPILOT_ACTIONTQUEUE_H
/*
**
** Copyright (C) 1998-2001,2003 by Dan Pilone
@@ -57,6 +57,7 @@
KDE_EXPORT class ActionQueue : public SyncAction
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor. Pass in a KPilot device link for it to act on.
diff --git a/lib/actions.cc b/lib/actions.cc
index 4f10cc4..03138a6 100644
--- a/lib/actions.cc
+++ b/lib/actions.cc
@@ -52,8 +52,8 @@ WelcomeAction::WelcomeAction(KPilotLink *p) :
FUNCTIONSETUP;
addSyncLogEntry(i18n("KPilot %1 HotSync starting...\n")
- .arg(TQString::tqfromLatin1(KPILOT_VERSION)));
- emit logMessage( i18n("Using encoding %1 on the handheld.").arg(Pilot::codecName()) );
+ .tqarg(TQString::tqfromLatin1(KPILOT_VERSION)));
+ emit logMessage( i18n("Using encoding %1 on the handheld.").tqarg(Pilot::codecName()) );
emit syncDone(this);
return true;
}
@@ -128,7 +128,7 @@ TestLink::TestLink(KPilotLink * p) :
// Let the KDE User know what's happening
// Pretty sure all database names are in latin1.
emit logMessage(i18n("Syncing database %1...")
- .arg(Pilot::fromPilot(db.name)));
+ .tqarg(Pilot::fromPilot(db.name)));
}
emit logMessage(i18n("HotSync finished."));
diff --git a/lib/actions.h b/lib/actions.h
index 2e3b9b2..35496d0 100644
--- a/lib/actions.h
+++ b/lib/actions.h
@@ -67,7 +67,7 @@ public:
* print that message (it must be i18n()ed already) instead of
* the standard message.
*/
- SorryAction(KPilotLink *device, const TQString &s=TQString::null);
+ SorryAction(KPilotLink *device, const TQString &s=TQString());
protected:
/** Reimplemented from SyncAction. */
diff --git a/lib/idmapperxml.h b/lib/idmapperxml.h
index 87c9123..dc50557 100644
--- a/lib/idmapperxml.h
+++ b/lib/idmapperxml.h
@@ -32,7 +32,7 @@
#include <tqstring.h>
#include <tqptrcollection.h>
-class IDMapperXml : public QXmlDefaultHandler
+class IDMapperXml : public TQXmlDefaultHandler
{
public:
IDMapperXml( const TQString &file );
diff --git a/lib/kpilotdevicelink.cc b/lib/kpilotdevicelink.cc
index 5fed796..e211eab 100644
--- a/lib/kpilotdevicelink.cc
+++ b/lib/kpilotdevicelink.cc
@@ -146,7 +146,7 @@ void DeviceCommThread::reset()
{
TQApplication::postEvent(link(), new DeviceCommEvent(EventLogMessage,
i18n("Could not open device: %1 (will retry)")
- .arg(link()->pilotPath() )));
+ .tqarg(link()->pilotPath() )));
}
link()->fMessages->reset();
@@ -155,7 +155,7 @@ void DeviceCommThread::reset()
// Timer already deleted by close() call.
startOpenTimer(this,fOpenTimer);
- link()->fLinkStatus = WaitingForDevice;
+ link()->fLinktqStatus = WaitingForDevice;
}
/**
@@ -176,16 +176,16 @@ void DeviceCommThread::openDevice()
// This transition (from Waiting to Found) can only be
// taken once.
//
- if (link()->fLinkStatus == WaitingForDevice)
+ if (link()->fLinktqStatus == WaitingForDevice)
{
- link()->fLinkStatus = FoundDevice;
+ link()->fLinktqStatus = FoundDevice;
}
if (link()->fMessages->shouldPrint(Messages::OpenMessage))
{
TQApplication::postEvent(link(), new DeviceCommEvent(EventLogMessage,
i18n("Trying to open device %1...")
- .arg(link()->fPilotPath)));
+ .tqarg(link()->fPilotPath)));
}
// if we're not supposed to be done, try to open the main pilot
@@ -244,7 +244,7 @@ bool DeviceCommThread::open(const TQString &device)
<< link()->fRealPilotPath << "] already connected." << endl;
WARNINGKPILOT << msg << endl;
- link()->fLinkStatus = PilotLinkError;
+ link()->fLinktqStatus = PilotLinkError;
TQApplication::postEvent(link(), new DeviceCommEvent(EventLogError, msg));
@@ -259,11 +259,11 @@ bool DeviceCommThread::open(const TQString &device)
{
e = errno;
msg = i18n("Cannot create socket for communicating "
- "with the Pilot (%1)").arg(errorMessage(e));
+ "with the Pilot (%1)").tqarg(errorMessage(e));
DEBUGKPILOT << msg << endl;
DEBUGKPILOT << "(" << strerror(e) << ")" << endl;
- link()->fLinkStatus = PilotLinkError;
+ link()->fLinktqStatus = PilotLinkError;
TQApplication::postEvent(link(), new DeviceCommEvent(EventLogError, msg));
@@ -272,7 +272,7 @@ bool DeviceCommThread::open(const TQString &device)
DEBUGKPILOT << fname << ": Got socket: [" << fTempSocket << "]" << endl;
- link()->fLinkStatus = CreatedSocket;
+ link()->fLinktqStatus = CreatedSocket;
DEBUGKPILOT << fname << ": Binding to path: ["
<< link()->fRealPilotPath << "]" << endl;
@@ -286,12 +286,12 @@ bool DeviceCommThread::open(const TQString &device)
<< strerror(errno) << "]" << endl;
e = errno;
- msg = i18n("Cannot open Pilot port \"%1\". ").arg(link()->fRealPilotPath);
+ msg = i18n("Cannot open Pilot port \"%1\". ").tqarg(link()->fRealPilotPath);
DEBUGKPILOT << msg << endl;
DEBUGKPILOT << "(" << strerror(e) << ")" << endl;
- link()->fLinkStatus = PilotLinkError;
+ link()->fLinktqStatus = PilotLinkError;
if (link()->fMessages->shouldPrint(Messages::OpenFailMessage))
{
@@ -301,7 +301,7 @@ bool DeviceCommThread::open(const TQString &device)
return false;
}
- link()->fLinkStatus = DeviceOpen;
+ link()->fLinktqStatus = DeviceOpen;
DeviceMap::self()->bindDevice(link()->fRealPilotPath);
fSocketNotifier = new TQSocketNotifier(fTempSocket,
@@ -394,7 +394,7 @@ void DeviceCommThread::acceptDevice()
return;
}
- TQApplication::postEvent(link(), new DeviceCommEvent(EventLogProgress, TQString::null, 10));
+ TQApplication::postEvent(link(), new DeviceCommEvent(EventLogProgress, TQString(), 10));
DEBUGKPILOT << fname <<
": Listening to pilot. Now trying accept..." << endl;
@@ -409,28 +409,28 @@ void DeviceCommThread::acceptDevice()
WARNINGKPILOT << "pi_accept returned: [" << s << "]" << endl;
TQApplication::postEvent(link(), new DeviceCommEvent(EventLogError, i18n("Cannot accept Pilot (%1)")
- .arg(TQString::fromLocal8Bit(s))));
+ .tqarg(TQString::fromLocal8Bit(s))));
- link()->fLinkStatus = PilotLinkError;
+ link()->fLinktqStatus = PilotLinkError;
reset();
return;
}
DEBUGKPILOT << fname << ": Link accept done." << endl;
- if ((link()->fLinkStatus != DeviceOpen) || (fPilotSocket == -1))
+ if ((link()->fLinktqStatus != DeviceOpen) || (fPilotSocket == -1))
{
- link()->fLinkStatus = PilotLinkError;
+ link()->fLinktqStatus = PilotLinkError;
WARNINGKPILOT << "Already connected or unable to connect!" << endl;
TQApplication::postEvent(link(), new DeviceCommEvent(EventLogError, i18n("Cannot accept Pilot (%1)")
- .arg(i18n("already connected"))));
+ .tqarg(i18n("already connected"))));
reset();
return;
}
- TQApplication::postEvent(link(), new DeviceCommEvent(EventLogProgress, TQString::null, 30));
+ TQApplication::postEvent(link(), new DeviceCommEvent(EventLogProgress, TQString(), 30));
DEBUGKPILOT << fname << ": doing dlp_ReadSysInfo..." << endl;
@@ -440,7 +440,7 @@ void DeviceCommThread::acceptDevice()
TQApplication::postEvent(link(), new DeviceCommEvent(EventLogError,
i18n("Unable to read system information from Pilot")));
- link()->fLinkStatus=PilotLinkError;
+ link()->fLinktqStatus=PilotLinkError;
reset();
return;
}
@@ -461,7 +461,7 @@ void DeviceCommThread::acceptDevice()
fWorkaroundUSBTimer->stop();
KPILOT_DELETE(fWorkaroundUSBTimer);
- TQApplication::postEvent(link(), new DeviceCommEvent(EventLogProgress, TQString::null, 60));
+ TQApplication::postEvent(link(), new DeviceCommEvent(EventLogProgress, TQString(), 60));
KPILOT_DELETE(link()->fPilotUser);
link()->fPilotUser = new KPilotUser;
@@ -488,9 +488,9 @@ void DeviceCommThread::acceptDevice()
"Perhaps you have a password set on the device?")));
}
- link()->fLinkStatus = AcceptedDevice;
+ link()->fLinktqStatus = AcceptedDevice;
- TQApplication::postEvent(link(), new DeviceCommEvent(EventLogProgress, TQString::null, 100));
+ TQApplication::postEvent(link(), new DeviceCommEvent(EventLogProgress, TQString(), 100));
DeviceCommEvent * ev = new DeviceCommEvent(EventDeviceReady);
ev->setCurrentSocket(fPilotSocket);
@@ -527,9 +527,9 @@ void DeviceCommThread::run()
DEBUGKPILOT << fname << ": comm thread now done..." << endl;
}
-KPilotDeviceLink::KPilotDeviceLink(TQObject * parent, const char *name,
+KPilotDeviceLink::KPilotDeviceLink(TQObject * tqparent, const char *name,
const TQString &tempDevice) :
- KPilotLink(parent, name), fLinkStatus(Init), fWorkaroundUSB(false),
+ KPilotLink(tqparent, name), fLinktqStatus(Init), fWorkaroundUSB(false),
fPilotSocket(-1), fTempDevice(tempDevice), fMessages(new Messages(this)), fDeviceCommThread(0L)
{
FUNCTIONSETUP;
@@ -550,7 +550,7 @@ KPilotDeviceLink::~KPilotDeviceLink()
/* virtual */bool KPilotDeviceLink::isConnected() const
{
- return fLinkStatus == AcceptedDevice;
+ return fLinktqStatus == AcceptedDevice;
}
/* virtual */bool KPilotDeviceLink::event(TQEvent *e)
@@ -640,12 +640,12 @@ void KPilotDeviceLink::reset(const TQString & dP)
{
FUNCTIONSETUP;
- fLinkStatus = Init;
+ fLinktqStatus = Init;
// Release all resources
//
close();
- fPilotPath = TQString::null;
+ fPilotPath = TQString();
fPilotPath = dP;
if (fPilotPath.isEmpty())
@@ -670,7 +670,7 @@ void KPilotDeviceLink::startCommThread()
TQString msg = i18n("The Pilot device is not configured yet.");
WARNINGKPILOT << msg << endl;
- fLinkStatus = PilotLinkError;
+ fLinktqStatus = PilotLinkError;
emit logError(msg);
return;
@@ -689,7 +689,7 @@ void KPilotDeviceLink::reset()
checkDevice();
- fLinkStatus = WaitingForDevice;
+ fLinktqStatus = WaitingForDevice;
startCommThread();
}
@@ -707,7 +707,7 @@ void KPilotDeviceLink::checkDevice()
if (!(fi.isReadable() && fi.isWritable()))
{
emit logError(i18n("Pilot device %1 is not read-write.")
- .arg(fPilotPath));
+ .tqarg(fPilotPath));
}
}
else
@@ -718,7 +718,7 @@ void KPilotDeviceLink::checkDevice()
emit
logError(i18n("Pilot device %1 does not exist. "
"Probably it is a USB device and will appear during a HotSync.")
- .arg(fPilotPath));
+ .tqarg(fPilotPath));
// Suppress all normal and error messages about opening the device.
fMessages->block(Messages::OpenMessage | Messages::OpenFailMessage,
true);
@@ -788,7 +788,7 @@ int KPilotDeviceLink::openConduit()
return dlp_OpenConduit(fPilotSocket);
}
-TQString KPilotDeviceLink::statusString(LinkStatus l)
+TQString KPilotDeviceLink::statusString(LinktqStatus l)
{
TQString s= CSL1("KPilotDeviceLink=");
diff --git a/lib/kpilotdevicelink.h b/lib/kpilotdevicelink.h
index a648b23..b912c19 100644
--- a/lib/kpilotdevicelink.h
+++ b/lib/kpilotdevicelink.h
@@ -42,7 +42,7 @@ class DeviceCommThread; ///< Thread for doing all palm device communications
* it waits for the actual device to become available, and
* then becomes ready to handle syncing.
*/
-enum LinkStatus {
+enum LinktqStatus {
Init,
WaitingForDevice,
FoundDevice,
@@ -75,20 +75,21 @@ friend class PilotSerialDatabase;
friend class DeviceCommThread;
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor. Creates a link that can sync to a physical handheld.
* Call reset() on it to start looking for a device.
*
- * @param parent Parent object.
+ * @param tqparent Parent object.
* @param name Name of this object.
* @param tempDevice Path to device node to use as an alternative
* to the "normal" one set by KPilot.
*/
- KPilotDeviceLink( TQObject *parent = 0,
+ KPilotDeviceLink( TQObject *tqparent = 0,
const char *name = 0,
- const TQString &tempDevice = TQString::null );
+ const TQString &tempDevice = TQString() );
/**
* Destructor. This rudely ends the communication with the handheld.
@@ -99,15 +100,15 @@ public:
/**
* Get the status (state enum) of this link.
- * @return The LinkStatus enum for the link's current state.
+ * @return The LinktqStatus enum for the link's current state.
*/
- LinkStatus status() const
+ LinktqStatus status() const
{
- return fLinkStatus;
+ return fLinktqStatus;
}
/** Get a human-readable string for the given status @p l. */
- static TQString statusString(LinkStatus l);
+ static TQString statusString(LinktqStatus l);
// The following API is the actual implementation of
// the KPilotLink API, for documentation see that file.
@@ -140,7 +141,7 @@ protected:
private:
- LinkStatus fLinkStatus;
+ LinktqStatus fLinktqStatus;
public:
diff --git a/lib/kpilotdevicelinkPrivate.h b/lib/kpilotdevicelinkPrivate.h
index 518f019..b0967ba 100644
--- a/lib/kpilotdevicelinkPrivate.h
+++ b/lib/kpilotdevicelinkPrivate.h
@@ -109,8 +109,8 @@ private:
class Messages
{
public:
- Messages(KPilotDeviceLink *parent) :
- fDeviceLink(parent)
+ Messages(KPilotDeviceLink *tqparent) :
+ fDeviceLink(tqparent)
{
reset();
}
@@ -170,10 +170,10 @@ protected:
KPilotDeviceLink *fDeviceLink;
};
-class DeviceCommEvent : public QEvent
+class DeviceCommEvent : public TQEvent
{
public:
- DeviceCommEvent(DeviceCustomEvents type, TQString msg = TQString::null,
+ DeviceCommEvent(DeviceCustomEvents type, TQString msg = TQString(),
int progress = 0) :
TQEvent( (TQEvent::Type)type ), fMessage(msg), fProgress(progress),
fPilotSocket(-1)
@@ -207,15 +207,16 @@ private:
};
/** Class that handles all device communications. We do this
- in a different thread so that we do not block the main Qt
+ in a different thread so that we do not block the main TQt
Event thread (similar to Swing's AWT event dispatch thread).
*/
-class DeviceCommThread : public TQObject, public QThread
+class DeviceCommThread : public TQObject, public TQThread
{
friend class KPilotDeviceLink;
Q_OBJECT
+ TQ_OBJECT
public:
DeviceCommThread(KPilotDeviceLink *d);
@@ -239,7 +240,7 @@ protected:
* Does the low-level opening of the device and handles the
* pilot-link library initialisation.
*/
- bool open(const TQString &device = TQString::null);
+ bool open(const TQString &device = TQString());
protected slots:
/**
diff --git a/lib/kpilotlink.cc b/lib/kpilotlink.cc
index da85d48..9ba4288 100644
--- a/lib/kpilotlink.cc
+++ b/lib/kpilotlink.cc
@@ -70,7 +70,7 @@
* the virtual tickle() method; deals with cancels through the
* shared fDone variable.
*/
-class TickleThread : public QThread
+class TickleThread : public TQThread
{
public:
TickleThread(KPilotLink *d, bool *done, int timeout) :
@@ -137,9 +137,9 @@ void TickleThread::run()
-KPilotLink::KPilotLink( TQObject *parent, const char *name ) :
- TQObject( parent, name ),
- fPilotPath(TQString::null),
+KPilotLink::KPilotLink( TQObject *tqparent, const char *name ) :
+ TQObject( tqparent, name ),
+ fPilotPath(TQString()),
fPilotUser(0L),
fPilotSysInfo(0L),
fTickleDone(true),
@@ -229,14 +229,14 @@ unsigned int KPilotLink::installFiles(const TQStringList & l, const bool deleteF
for (i = l.begin(), e = l.end(); i != e; ++i)
{
- emit logProgress(TQString::null,
+ emit logProgress(TQString(),
(int) ((100.0 / total) * (float) n));
if (installFile(*i, deleteFiles))
k++;
n++;
}
- emit logProgress(TQString::null, 100);
+ emit logProgress(TQString(), 100);
return k;
}
diff --git a/lib/kpilotlink.h b/lib/kpilotlink.h
index 4389cb8..3816094 100644
--- a/lib/kpilotlink.h
+++ b/lib/kpilotlink.h
@@ -168,16 +168,17 @@ class PilotDatabase;
* with a non-zero timeout and that timeout has elapsed. The
* tickler is stopped before timeout is emitted.
*/
-class KDE_EXPORT KPilotLink : public QObject
+class KDE_EXPORT KPilotLink : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
friend class SyncAction;
public:
/** A list of DBInfo structures. */
typedef TQValueList<struct DBInfo> DBInfoList;
/** Constructor. Use reset() to start looking for a device. */
- KPilotLink( TQObject *parent = 0, const char *name = 0 );
+ KPilotLink( TQObject *tqparent = 0, const char *name = 0 );
/** Destructor. This rudely interrupts any communication in progress.
* It is best to call endOfSync() or finishSync() before destroying
@@ -381,7 +382,7 @@ signals:
* time startTickle() is called, you can state how long
* tickling should last (at most) before timing out.
*
- * You can only get a timeout when the Qt event loop is
+ * You can only get a timeout when the TQt event loop is
* running, which somewhat limits the usefulness of timeouts.
*/
void timeout();
diff --git a/lib/kpilotlocallink.cc b/lib/kpilotlocallink.cc
index 13c9cbc..aaf14c6 100644
--- a/lib/kpilotlocallink.cc
+++ b/lib/kpilotlocallink.cc
@@ -65,7 +65,7 @@
#include "kpilotlocallink.moc"
-typedef QPair<TQString, struct DBInfo> DatabaseDescriptor;
+typedef TQPair<TQString, struct DBInfo> DatabaseDescriptor;
typedef TQValueList<DatabaseDescriptor> DatabaseDescriptorList;
class KPilotLocalLink::Private
@@ -99,7 +99,7 @@ unsigned int KPilotLocalLink::findAvailableDatabases( KPilotLocalLink::Private &
TQString dbname = (*i);
dbname.remove(dbname.length()-4,4);
- TQString dbnamecheck = (*i).left((*i).findRev(CSL1(".pdb")));
+ TQString dbnamecheck = (*i).left((*i).tqfindRev(CSL1(".pdb")));
Q_ASSERT(dbname == dbnamecheck);
if (PilotLocalDatabase::infoFromFile( path + CSL1("/") + (*i), &dbi))
@@ -118,8 +118,8 @@ unsigned int KPilotLocalLink::findAvailableDatabases( KPilotLocalLink::Private &
}
-KPilotLocalLink::KPilotLocalLink( TQObject *parent, const char *name ) :
- KPilotLink(parent,name),
+KPilotLocalLink::KPilotLocalLink( TQObject *tqparent, const char *name ) :
+ KPilotLink(tqparent,name),
fReady(false),
d( new Private )
{
diff --git a/lib/kpilotlocallink.h b/lib/kpilotlocallink.h
index ca37bb5..99df9b9 100644
--- a/lib/kpilotlocallink.h
+++ b/lib/kpilotlocallink.h
@@ -43,8 +43,9 @@
class KDE_EXPORT KPilotLocalLink : public KPilotLink
{
Q_OBJECT
+ TQ_OBJECT
public:
- KPilotLocalLink( TQObject *parent=0L, const char *name=0L );
+ KPilotLocalLink( TQObject *tqparent=0L, const char *name=0L );
virtual ~KPilotLocalLink();
virtual TQString statusString() const;
diff --git a/lib/options.cc b/lib/options.cc
index 0499177..749a57b 100644
--- a/lib/options.cc
+++ b/lib/options.cc
@@ -55,9 +55,9 @@ static const char debug_spaces[61] =
" ";
-TQString rtExpand(const TQString &s, Qt::TextFormat richText)
+TQString rtExpand(const TQString &s, TQt::TextFormat richText)
{
- if (richText == Qt::RichText)
+ if (richText == TQt::RichText)
{
TQString t(s);
return t.tqreplace(CSL1("\n"), CSL1("<br/>\n"));
diff --git a/lib/options.h b/lib/options.h
index edf3a6f..e1c6742 100644
--- a/lib/options.h
+++ b/lib/options.h
@@ -40,10 +40,6 @@
#include <tqnamespace.h>
#include <tqstring.h>
-#if (QT_VERSION < 0x030300)
-#error "This is KPilot for KDE3.5 and won't compile with Qt < 3.3.0"
-#endif
-
#include <kdebug.h>
#include <kdeversion.h>
#include <klocale.h>
@@ -144,12 +140,12 @@ inline std::ostream& operator <<(std::ostream &o, const KPilotDepthCount &d)
// Function to expand newlines in rich text to <br>\n
-TQString rtExpand(const TQString &s, Qt::TextFormat richText);
+TQString rtExpand(const TQString &s, TQt::TextFormat richText);
/**
- * Convert a struct tm from the pilot-link package to a QDateTime
+ * Convert a struct tm from the pilot-link package to a TQDateTime
*/
KDE_EXPORT TQDateTime readTm(const struct tm &t);
/**
@@ -183,7 +179,7 @@ KDE_EXPORT struct tm writeTm(const TQDate &dt);
#define TODO_I18N(a) TQString::tqfromLatin1(a)
#define TODO_I18N_P(a,b,c) ((c>1) ? a : b)
-// Handle some cases for QT_NO_CAST_ASCII and NO_ASCII_CAST.
+// Handle some cases for TQT_NO_CAST_ASCII and NO_ASCII_CAST.
// Where possible in the source, known constant strings in
// latin1 encoding are marked with CSL1(), to avoid gobs
// of latin1() or fromlatin1() calls which might obscure
diff --git a/lib/pilot.cc b/lib/pilot.cc
index 6fdec5e..18e61f6 100644
--- a/lib/pilot.cc
+++ b/lib/pilot.cc
@@ -144,7 +144,7 @@ TQString category(const struct CategoryAppInfo *info, unsigned int i)
{
if (!info || (i>=CATEGORY_COUNT))
{
- return TQString::null;
+ return TQString();
}
mutex->lock();
diff --git a/lib/pilot.h b/lib/pilot.h
index 4ae7030..5638b70 100644
--- a/lib/pilot.h
+++ b/lib/pilot.h
@@ -55,7 +55,7 @@ class PilotCategoryInfo; // ... and category information
/**
* The Pilot namespace holds constants that are global for
-* the handheld data structures. Also tqcontains some global
+* the handheld data structures. Also contains some global
* functions that deal with pilot-link structures as well
* as mapping user-visible strings from UTF8 (KDE side) to
* the encoding used on the handheld.
@@ -106,7 +106,7 @@ namespace Pilot
* native 8 bit encoding of the handheld.
*
* @param s String to encode
- * @return Encoded string in a QCString
+ * @return Encoded string in a TQCString
*/
TQCString toPilot( const TQString &s );
@@ -141,9 +141,9 @@ namespace Pilot
}
/** Returns the TQString for the requested category @p i
- * in the category structure @p info. Returns @c TQString::null
+ * in the category structure @p info. Returns @c TQString()
* on error (bad pointer or bad category number). May also
- * return @c TQString::null if the category name is empty.
+ * return @c TQString() if the category name is empty.
*/
inline TQString categoryName(const struct CategoryAppInfo *info, unsigned int i)
{
@@ -157,7 +157,7 @@ namespace Pilot
}
else
{
- return TQString::null;
+ return TQString();
}
}
diff --git a/lib/pilotAddress.cc b/lib/pilotAddress.cc
index 4589688..11fdd12 100644
--- a/lib/pilotAddress.cc
+++ b/lib/pilotAddress.cc
@@ -171,7 +171,7 @@ unsigned int PhoneSlot::toField() const
PhoneSlot::operator TQString() const
{
- return TQString("%1,%2").arg(toOffset()).arg(toField());
+ return TQString("%1,%2").tqarg(toOffset()).tqarg(toField());
}
#define MAXFIELDS 19
@@ -273,13 +273,13 @@ PilotAddress::~PilotAddress()
free_Address(&fAddressInfo);
}
-TQString PilotAddress::getTextRepresentation(const PilotAddressInfo *info, Qt::TextFormat richText) const
+TQString PilotAddress::getTextRepresentation(const PilotAddressInfo *info, TQt::TextFormat richText) const
{
TQString text, tmp;
- TQString par = (richText==Qt::RichText) ?CSL1("<p>"): TQString();
- TQString ps = (richText==Qt::RichText) ?CSL1("</p>"):CSL1("\n");
- TQString br = (richText==Qt::RichText) ?CSL1("<br/>"):CSL1("\n");
+ TQString par = (richText==TQt::RichText) ?CSL1("<p>"): TQString();
+ TQString ps = (richText==TQt::RichText) ?CSL1("</p>"):CSL1("\n");
+ TQString br = (richText==TQt::RichText) ?CSL1("<br/>"):CSL1("\n");
// title + name
text += par;
@@ -293,14 +293,14 @@ TQString PilotAddress::getTextRepresentation(const PilotAddressInfo *info, Qt::T
TQString firstName = getField(entryFirstname);
if (firstName.isEmpty())
{
- // So tqreplace placeholder for first name (%1) with empty
- tmp = tmp.arg(TQString());
+ // So replace placeholder for first name (%1) with empty
+ tmp = tmp.tqarg(TQString());
}
else
{
- tmp = tmp.arg(rtExpand(firstName,richText));
+ tmp = tmp.tqarg(rtExpand(firstName,richText));
}
- tmp=tmp.arg(rtExpand(getField(entryLastname), richText));
+ tmp=tmp.tqarg(rtExpand(getField(entryLastname), richText));
text += tmp;
text += ps;
@@ -335,13 +335,13 @@ TQString PilotAddress::getTextRepresentation(const PilotAddressInfo *info, Qt::T
}
if (info)
{
- tmp=tmp.arg(info->phoneLabel( getPhoneType( i ) ));
+ tmp=tmp.tqarg(info->phoneLabel( getPhoneType( i ) ));
}
else
{
- tmp=tmp.arg(CSL1("Contact: "));
+ tmp=tmp.tqarg(CSL1("Contact: "));
}
- tmp=tmp.arg(rtExpand(getField(i.toField()), richText));
+ tmp=tmp.tqarg(rtExpand(getField(i.toField()), richText));
text += tmp;
text += br;
}
diff --git a/lib/pilotAddress.h b/lib/pilotAddress.h
index 94ae3f6..f5c2bcb 100644
--- a/lib/pilotAddress.h
+++ b/lib/pilotAddress.h
@@ -182,9 +182,9 @@ public:
* - phone[6] = Pager
* - phone[7] = Mobile
*
- * Apparently, this order is kept for all languages, just with localized
+ * Aptqparently, this order is kept for all languages, just with localized
* strings. The implementation of the internal methods will assume
- * this order is kept. In other languages, main can tqreplaced with
+ * this order is kept. In other languages, main can replaced with
* Corporation.
*/
class KDE_EXPORT PilotAddress : public PilotRecordBase
@@ -198,11 +198,11 @@ public:
virtual ~PilotAddress();
/** Returns a text representation of the address. If @p richText is true, the
- * text will be formatted with Qt-HTML tags. The AppInfo structure @p info
+ * text will be formatted with TQt-HTML tags. The AppInfo structure @p info
* is used to figure out the phone labels; if it is NULL then bogus labels are
* used to identify phone types.
*/
- TQString getTextRepresentation(const PilotAddressInfo *info, Qt::TextFormat richText) const;
+ TQString getTextRepresentation(const PilotAddressInfo *info, TQt::TextFormat richText) const;
/**
* @param text set the field value
@@ -225,7 +225,7 @@ public:
}
}
- /** Returns the text value of a given field @p field (or TQString::null
+ /** Returns the text value of a given field @p field (or TQString()
* if there is no such field).
*/
TQString getField(int field) const;
diff --git a/lib/pilotAppInfo.h b/lib/pilotAppInfo.h
index b14cf0a..43e8eb5 100644
--- a/lib/pilotAppInfo.h
+++ b/lib/pilotAppInfo.h
@@ -102,7 +102,7 @@ public:
return Pilot::findCategory(fC,name,unknownIsUnfiled);
} ;
- /** Gets a single category name. Returns TQString::null if there is no
+ /** Gets a single category name. Returns TQString() if there is no
* such category number @p i . */
inline TQString categoryName(unsigned int i) const
{
diff --git a/lib/pilotDatabase.h b/lib/pilotDatabase.h
index 82a6431..7c952d2 100644
--- a/lib/pilotDatabase.h
+++ b/lib/pilotDatabase.h
@@ -50,7 +50,7 @@
class KDE_EXPORT PilotDatabase
{
public:
- PilotDatabase(const TQString &name = TQString::null);
+ PilotDatabase(const TQString &name = TQString());
virtual ~PilotDatabase();
diff --git a/lib/pilotDateEntry.cc b/lib/pilotDateEntry.cc
index bae18ef..42becf2 100644
--- a/lib/pilotDateEntry.cc
+++ b/lib/pilotDateEntry.cc
@@ -160,23 +160,23 @@ PilotDateEntry & PilotDateEntry::operator = (const PilotDateEntry & e)
} // end of assignment operator
-TQString PilotDateEntry::getTextRepresentation(Qt::TextFormat richText)
+TQString PilotDateEntry::getTextRepresentation(TQt::TextFormat richText)
{
TQString text, tmp;
- TQString par = (richText==Qt::RichText) ?CSL1("<p>"):TQString::null;
- TQString ps = (richText==Qt::RichText) ?CSL1("</p>"):CSL1("\n");
- TQString br = (richText==Qt::RichText) ?CSL1("<br/>"):CSL1("\n");
+ TQString par = (richText==TQt::RichText) ?CSL1("<p>"):TQString();
+ TQString ps = (richText==TQt::RichText) ?CSL1("</p>"):CSL1("\n");
+ TQString br = (richText==TQt::RichText) ?CSL1("<br/>"):CSL1("\n");
// title + name
text += par;
tmp=richText?CSL1("<b><big>%1</big></b>"):CSL1("%1");
- text += tmp.arg(rtExpand(getDescription(), richText));
+ text += tmp.tqarg(rtExpand(getDescription(), richText));
text += ps;
TQDateTime dt(readTm(getEventStart()));
TQString startDate(dt.toString(Qt::LocalDate));
text+=par;
- text+=i18n("Start date: %1").arg(startDate);
+ text+=i18n("Start date: %1").tqarg(startDate);
text+=ps;
if (isEvent())
@@ -190,7 +190,7 @@ TQString PilotDateEntry::getTextRepresentation(Qt::TextFormat richText)
dt=readTm(getEventEnd());
TQString endDate(dt.toString(Qt::LocalDate));
text+=par;
- text+=i18n("End date: %1").arg(endDate);
+ text+=i18n("End date: %1").tqarg(endDate);
text+=ps;
}
@@ -201,10 +201,10 @@ TQString PilotDateEntry::getTextRepresentation(Qt::TextFormat richText)
arg(getAdvance());
switch (getAdvanceUnits())
{
- case advMinutes: tmp=tmp.arg(i18n("minutes")); break;
- case advHours: tmp=tmp.arg(i18n("hours")); break;
- case advDays: tmp=tmp.arg(i18n("days")); break;
- default: tmp=tmp.arg(TQString::null); break;;
+ case advMinutes: tmp=tmp.tqarg(i18n("minutes")); break;
+ case advHours: tmp=tmp.tqarg(i18n("hours")); break;
+ case advDays: tmp=tmp.tqarg(i18n("days")); break;
+ default: tmp=tmp.tqarg(TQString()); break;;
}
text+=tmp;
text+=ps;
@@ -215,16 +215,16 @@ TQString PilotDateEntry::getTextRepresentation(Qt::TextFormat richText)
text+=par;
tmp=i18n("Recurrence: every %1 %2");
int freq = getRepeatFrequency();
- tmp=tmp.arg(freq);
+ tmp=tmp.tqarg(freq);
switch(getRepeatType())
{
- case repeatDaily: tmp=tmp.arg(i18n("day(s)")); break;
- case repeatWeekly: tmp=tmp.arg(i18n("week(s)")); break;
+ case repeatDaily: tmp=tmp.tqarg(i18n("day(s)")); break;
+ case repeatWeekly: tmp=tmp.tqarg(i18n("week(s)")); break;
case repeatMonthlyByDay:
- case repeatMonthlyByDate: tmp=tmp.arg(i18n("month(s)")); break;
- case repeatYearly: tmp=tmp.arg(i18n("year(s)")); break;
- default: tmp=tmp.arg(TQString::null); break;
+ case repeatMonthlyByDate: tmp=tmp.tqarg(i18n("month(s)")); break;
+ case repeatYearly: tmp=tmp.tqarg(i18n("year(s)")); break;
+ default: tmp=tmp.tqarg(TQString()); break;
}
text+=tmp;
text+=br;
@@ -237,7 +237,7 @@ TQString PilotDateEntry::getTextRepresentation(Qt::TextFormat richText)
else
{
dt = readTm(getRepeatEnd()).date();
- text+=i18n("Until %1").arg(dt.toString(Qt::LocalDate));
+ text+=i18n("Until %1").tqarg(dt.toString(Qt::LocalDate));
}
text+=br;
@@ -245,7 +245,7 @@ TQString PilotDateEntry::getTextRepresentation(Qt::TextFormat richText)
if (getRepeatType()==repeatMonthlyByDate) text+=i18n("Repeating on the n-th day of the month")+br;
// TODO: show the dayArray when repeating weekly
/*TQBitArray dayArray(7);
- if (getRepeatType()==repeatWeekly) text+=i18n("Repeat day flags: %1").arg(getRepeatDays
+ if (getRepeatType()==repeatWeekly) text+=i18n("Repeat day flags: %1").tqarg(getRepeatDays
const int *days = dateEntry->getRepeatDays();
// Rotate the days of the week, since day numbers on the Pilot and
// in vCal / Events are different.
@@ -421,7 +421,7 @@ void PilotDateEntry::setLocation(const TQString &s)
else
{
TQString location = "Location: " + s + "\n";
- int pos = note.find(rxp);
+ int pos = note.tqfind(rxp);
if(pos >= 0)
{
@@ -441,7 +441,7 @@ TQString PilotDateEntry::getLocation() const
// one from PilotDateEntry::getNote();
TQString note = Pilot::fromPilot(getNoteP());
TQRegExp rxp = TQRegExp("^[Ll]ocation:[^\n]+\n");
- int pos = note.find(rxp, 0);
+ int pos = note.tqfind(rxp, 0);
if(pos >= 0)
{
diff --git a/lib/pilotDateEntry.h b/lib/pilotDateEntry.h
index 4360101..765a562 100644
--- a/lib/pilotDateEntry.h
+++ b/lib/pilotDateEntry.h
@@ -94,7 +94,7 @@ public:
* If @p richText is true, then the text representation uses qt style
* tags as well.
*/
- TQString getTextRepresentation(Qt::TextFormat richText);
+ TQString getTextRepresentation(TQt::TextFormat richText);
/** Is this appointment a "floating" appointment?
*
diff --git a/lib/pilotLocalDatabase.cc b/lib/pilotLocalDatabase.cc
index 8e94d4e..71de3eb 100644
--- a/lib/pilotLocalDatabase.cc
+++ b/lib/pilotLocalDatabase.cc
@@ -125,7 +125,7 @@ PilotLocalDatabase::PilotLocalDatabase(const TQString &dbName) :
{
FUNCTIONSETUP;
- int p = dbName.findRev( '/' );
+ int p = dbName.tqfindRev( '/' );
if (p<0)
{
// No slash
@@ -279,7 +279,7 @@ TQValueList<recordid_t> PilotLocalDatabase::idList()
return idlist;
}
- // now create the QValue list from the idarr:
+ // now create the TQValue list from the idarr:
for (int i=0; i<idlen; i++)
{
idlist.append((*d)[i]->id());
diff --git a/lib/pilotMemo.cc b/lib/pilotMemo.cc
index 946a995..fab0ae8 100644
--- a/lib/pilotMemo.cc
+++ b/lib/pilotMemo.cc
@@ -74,25 +74,25 @@ PilotRecord *PilotMemo::pack()
}
-TQString PilotMemo::getTextRepresentation(Qt::TextFormat richText)
+TQString PilotMemo::getTextRepresentation(TQt::TextFormat richText)
{
- if (richText==Qt::RichText)
+ if (richText==TQt::RichText)
{
return i18n("<i>Title:</i> %1<br>\n<i>MemoText:</i><br>%2").
- arg(rtExpand(getTitle(), richText)).arg(rtExpand(text(), richText));
+ tqarg(rtExpand(getTitle(), richText)).tqarg(rtExpand(text(), richText));
}
else
{
- return i18n("Title: %1\nMemoText:\n%2").arg(getTitle()).arg(text());
+ return i18n("Title: %1\nMemoText:\n%2").tqarg(getTitle()).tqarg(text());
}
}
TQString PilotMemo::getTitle() const
{
- if (fText.isEmpty()) return TQString::null;
+ if (fText.isEmpty()) return TQString();
- int memoTitleLen = fText.find('\n');
+ int memoTitleLen = fText.tqfind('\n');
if (-1 == memoTitleLen) memoTitleLen=fText.length();
return fText.left(memoTitleLen);
}
@@ -106,7 +106,7 @@ TQString PilotMemo::shortTitle() const
return t;
t.truncate(40);
- int spaceIndex = t.findRev(' ');
+ int spaceIndex = t.tqfindRev(' ');
if (spaceIndex > 32)
{
diff --git a/lib/pilotMemo.h b/lib/pilotMemo.h
index f4436ab..cc5389d 100644
--- a/lib/pilotMemo.h
+++ b/lib/pilotMemo.h
@@ -73,7 +73,7 @@ public:
~PilotMemo() { } ;
- virtual TQString getTextRepresentation(Qt::TextFormat richText);
+ virtual TQString getTextRepresentation(TQt::TextFormat richText);
TQString text(void) const { return fText; } ;
void setText(const TQString &text) { fText = text.left(MAX_MEMO_LEN); } ;
TQString getTitle(void) const ;
diff --git a/lib/pilotRecord.cc b/lib/pilotRecord.cc
index 59f055c..5abeaaf 100644
--- a/lib/pilotRecord.cc
+++ b/lib/pilotRecord.cc
@@ -54,8 +54,8 @@
/* virtual */ TQString PilotRecord::textRepresentation() const
{
return CSL1("[ %1,%2 ]")
- .arg(PilotRecordBase::textRepresentation())
- .arg(size());
+ .tqarg(PilotRecordBase::textRepresentation())
+ .tqarg(size());
}
diff --git a/lib/pilotSerialDatabase.cc b/lib/pilotSerialDatabase.cc
index f57cac9..d1d7ee9 100644
--- a/lib/pilotSerialDatabase.cc
+++ b/lib/pilotSerialDatabase.cc
@@ -56,8 +56,8 @@ PilotSerialDatabase::PilotSerialDatabase(KPilotDeviceLink *l,
}
PilotSerialDatabase::PilotSerialDatabase( KPilotDeviceLink *l, const DBInfo *info ) :
- PilotDatabase( info ? Pilot::fromPilot( info->name ) : TQString::null ),
- fDBName( TQString::null ),
+ PilotDatabase( info ? Pilot::fromPilot( info->name ) : TQString() ),
+ fDBName( TQString() ),
fDBHandle( -1 ),
fDBSocket( l->pilotSocket() )
{
@@ -157,7 +157,7 @@ TQValueList<recordid_t> PilotSerialDatabase::idList()
return idlist;
}
- // now create the QValue list from the idarr:
+ // now create the TQValue list from the idarr:
for (idlen=0; idlen<idlenread; idlen++)
{
idlist.append(idarr[idlen]);
diff --git a/lib/pilotTodoEntry.cc b/lib/pilotTodoEntry.cc
index 1ed9dfa..8aa17ec 100644
--- a/lib/pilotTodoEntry.cc
+++ b/lib/pilotTodoEntry.cc
@@ -115,17 +115,17 @@ PilotTodoEntry & PilotTodoEntry::operator = (const PilotTodoEntry & e)
return *this;
}
-TQString PilotTodoEntry::getTextRepresentation(Qt::TextFormat richText)
+TQString PilotTodoEntry::getTextRepresentation(TQt::TextFormat richText)
{
TQString text, tmp;
- TQString par = (richText==Qt::RichText) ?CSL1("<p>"): TQString();
- TQString ps = (richText==Qt::RichText) ?CSL1("</p>"):CSL1("\n");
- TQString br = (richText==Qt::RichText) ?CSL1("<br/>"):CSL1("\n");
+ TQString par = (richText==TQt::RichText) ?CSL1("<p>"): TQString();
+ TQString ps = (richText==TQt::RichText) ?CSL1("</p>"):CSL1("\n");
+ TQString br = (richText==TQt::RichText) ?CSL1("<br/>"):CSL1("\n");
// title + name
text += par;
- tmp= (richText==Qt::RichText) ?CSL1("<b><big>%1</big></b>"):CSL1("%1");
- text += tmp.arg(rtExpand(getDescription(), richText));
+ tmp= (richText==TQt::RichText) ?CSL1("<b><big>%1</big></b>"):CSL1("%1");
+ text += tmp.tqarg(rtExpand(getDescription(), richText));
text += ps;
text += par;
@@ -140,7 +140,7 @@ TQString PilotTodoEntry::getTextRepresentation(Qt::TextFormat richText)
TQDate dt(readTm(getDueDate()).date());
TQString dueDate(dt.toString(Qt::LocalDate));
text+=par;
- text+=i18n("Due date: %1").arg(dueDate);
+ text+=i18n("Due date: %1").tqarg(dueDate);
text+=ps;
}
@@ -148,14 +148,14 @@ TQString PilotTodoEntry::getTextRepresentation(Qt::TextFormat richText)
text+=ps;
text+=par;
- text+=i18n("Priority: %1").arg(getPriority());
+ text+=i18n("Priority: %1").tqarg(getPriority());
text+=ps;
if (!getNote().isEmpty())
{
- text += (richText==Qt::RichText) ?CSL1("<hr/>"):CSL1("-------------------------\n");
+ text += (richText==TQt::RichText) ?CSL1("<hr/>"):CSL1("-------------------------\n");
text+=par;
- text+= (richText==Qt::RichText) ?i18n("<b><em>Note:</em></b><br>"):i18n("Note:\n");
+ text+= (richText==TQt::RichText) ?i18n("<b><em>Note:</em></b><br>"):i18n("Note:\n");
text+=rtExpand(getNote(), richText);
text+=ps;
}
diff --git a/lib/pilotTodoEntry.h b/lib/pilotTodoEntry.h
index 020912f..999bb1f 100644
--- a/lib/pilotTodoEntry.h
+++ b/lib/pilotTodoEntry.h
@@ -72,7 +72,7 @@ public:
/** Return a string for the ToDo item. If @param richText is true, then
* use qt style markup to make the string clearer when displayed.
*/
- TQString getTextRepresentation(Qt::TextFormat richText);
+ TQString getTextRepresentation(TQt::TextFormat richText);
/** Assign an existing ToDo item to this one. */
PilotTodoEntry& operator=(const PilotTodoEntry &e);
diff --git a/lib/plugin.cc b/lib/plugin.cc
index 27631ce..98c110d 100644
--- a/lib/plugin.cc
+++ b/lib/plugin.cc
@@ -65,9 +65,9 @@
#include "plugin.moc"
-ConduitConfigBase::ConduitConfigBase(TQWidget *parent,
+ConduitConfigBase::ConduitConfigBase(TQWidget *tqparent,
const char *name) :
- TQObject(parent,name),
+ TQObject(tqparent,name),
fModified(false),
fWidget(0L),
fConduitName(i18n("Unnamed"))
@@ -91,7 +91,7 @@ ConduitConfigBase::~ConduitConfigBase()
FUNCTIONSETUP;
return i18n("<qt>The <i>%1</i> conduit's settings have been changed. Do you "
- "want to save the changes before continuing?</qt>").arg(this->conduitName());
+ "want to save the changes before continuing?</qt>").tqarg(this->conduitName());
}
/* virtual */ bool ConduitConfigBase::maybeSave()
@@ -102,17 +102,17 @@ ConduitConfigBase::~ConduitConfigBase()
int r = KMessageBox::questionYesNoCancel(fWidget,
maybeSaveText(),
- i18n("%1 Conduit").arg(this->conduitName()), KStdGuiItem::save(), KStdGuiItem::discard());
+ i18n("%1 Conduit").tqarg(this->conduitName()), KStdGuiItem::save(), KStdGuiItem::discard());
if (r == KMessageBox::Cancel) return false;
if (r == KMessageBox::Yes) commit();
return true;
}
-TQWidget *ConduitConfigBase::aboutPage(TQWidget *parent, KAboutData *ad)
+TQWidget *ConduitConfigBase::aboutPage(TQWidget *tqparent, KAboutData *ad)
{
FUNCTIONSETUP;
- TQWidget *w = new TQWidget(parent, "aboutpage");
+ TQWidget *w = new TQWidget(tqparent, "aboutpage");
TQString s;
TQLabel *text;
@@ -138,7 +138,7 @@ TQWidget *ConduitConfigBase::aboutPage(TQWidget *parent, KAboutData *ad)
}
text = new TQLabel(w);
- // Experiment with a long non-<qt> string. Use that to find
+ // Experiment with a long non-<qt> string. Use that to tqfind
// sensible widths for the columns.
//
text->setText(i18n("Send questions and comments to kdepim-users@kde.org"));
@@ -148,7 +148,7 @@ TQWidget *ConduitConfigBase::aboutPage(TQWidget *parent, KAboutData *ad)
int lineheight = text->size().height();
// Use the label to display the applciation icon
- text->setText(TQString::null);
+ text->setText(TQString());
text->setPixmap(applicationIcon);
text->adjustSize();
grid->addWidget(text, 0, 1);
@@ -183,27 +183,27 @@ TQWidget *ConduitConfigBase::aboutPage(TQWidget *parent, KAboutData *ad)
if (!p->homepage().isEmpty())
{
- s = TQString::null;
- s += CSL1("<a href=\"%1\">").arg(p->homepage());
+ s = TQString();
+ s += CSL1("<a href=\"%1\">").tqarg(p->homepage());
s += p->homepage();
s += CSL1("</a><br>");
linktext->append(s);
}
- s = TQString::null;
+ s = TQString();
s += i18n("Send questions and comments to <a href=\"mailto:%1\">%2</a>.")
- .arg( CSL1("kdepim-users@kde.org") )
- .arg( CSL1("kdepim-users@kde.org") );
+ .tqarg( CSL1("kdepim-users@kde.org") )
+ .tqarg( CSL1("kdepim-users@kde.org") );
s += ' ';
s += i18n("Send bug reports to <a href=\"mailto:%1\">%2</a>.")
- .arg(p->bugAddress())
- .arg(p->bugAddress());
+ .tqarg(p->bugAddress())
+ .tqarg(p->bugAddress());
s += ' ';
s += i18n("For trademark information, see the "
"<a href=\"help:/kpilot/trademarks.html\">KPilot User's Guide</a>.");
s += CSL1("<br>");
linktext->append(s);
- linktext->append(TQString::null);
+ linktext->append(TQString());
@@ -218,15 +218,15 @@ TQWidget *ConduitConfigBase::aboutPage(TQWidget *parent, KAboutData *ad)
for (i=pl.begin(); i!=pl.end(); ++i)
{
s.append(CSL1("%1 (<i>%2</i>)%3")
- .arg((*i).name())
- .arg((*i).task())
- .arg(count<pl.count() ? comma : TQString::null)
+ .tqarg((*i).name())
+ .tqarg((*i).task())
+ .tqarg(count<pl.count() ? comma : TQString())
);
count++;
}
linktext->append(s);
- s = TQString::null;
+ s = TQString();
pl = p->credits();
if (pl.count()>0)
{
@@ -235,9 +235,9 @@ TQWidget *ConduitConfigBase::aboutPage(TQWidget *parent, KAboutData *ad)
for (i=pl.begin(); i!=pl.end(); ++i)
{
s.append(CSL1("%1 (<i>%2</i>)%3")
- .arg((*i).name())
- .arg((*i).task())
- .arg(count<pl.count() ? comma : TQString::null)
+ .tqarg((*i).name())
+ .tqarg((*i).task())
+ .tqarg(count<pl.count() ? comma : TQString())
);
count++;
}
@@ -485,8 +485,8 @@ void ConduitAction::finished()
if (hhVolatility > allowedVolatility)
{
- query = query.arg(fConduitName)
- .arg(fCtrHH->type()).arg(fCtrHH->moo());
+ query = query.tqarg(fConduitName)
+ .tqarg(fCtrHH->type()).tqarg(fCtrHH->moo());
DEBUGKPILOT << fname << ": Yikes, lots of volatility "
<< "caught. Check with user: [" << query
@@ -494,7 +494,7 @@ void ConduitAction::finished()
/*
int rc = questionYesNo(query, caption,
- TQString::null, 0 );
+ TQString(), 0 );
if (rc == KMessageBox::Yes)
{
// TODO: add commit and rollback code.
@@ -533,7 +533,7 @@ ConduitProxy::ConduitProxy(KPilotLink *p,
WARNINGKPILOT << "Can't find desktop file for conduit "
<< fDesktopName
<< endl;
- addSyncLogEntry(i18n("Could not find conduit %1.").arg(fDesktopName));
+ addSyncLogEntry(i18n("Could not find conduit %1.").tqarg(fDesktopName));
return false;
}
@@ -556,7 +556,7 @@ ConduitProxy::ConduitProxy(KPilotLink *p,
<< " - "
<< KLibLoader::self()->lastErrorMessage()
<< endl;
- addSyncLogEntry(i18n("Could not load conduit %1.").arg(fDesktopName));
+ addSyncLogEntry(i18n("Could not load conduit %1.").tqarg(fDesktopName));
return false;
}
@@ -568,7 +568,7 @@ ConduitProxy::ConduitProxy(KPilotLink *p,
<< " has version "
<< version
<< endl;
- addSyncLogEntry(i18n("Conduit %1 has wrong version (%2).").arg(fDesktopName).arg(version));
+ addSyncLogEntry(i18n("Conduit %1 has wrong version (%2).").tqarg(fDesktopName).tqarg(version));
return false;
}
@@ -578,7 +578,7 @@ ConduitProxy::ConduitProxy(KPilotLink *p,
WARNINGKPILOT << "Can't find factory in library "
<< fLibraryName
<< endl;
- addSyncLogEntry(i18n("Could not initialize conduit %1.").arg(fDesktopName));
+ addSyncLogEntry(i18n("Could not initialize conduit %1.").tqarg(fDesktopName));
return false;
}
@@ -591,7 +591,7 @@ ConduitProxy::ConduitProxy(KPilotLink *p,
if (!object)
{
WARNINGKPILOT << "Can't create SyncAction." << endl;
- addSyncLogEntry(i18n("Could not create conduit %1.").arg(fDesktopName));
+ addSyncLogEntry(i18n("Could not create conduit %1.").tqarg(fDesktopName));
return false;
}
@@ -600,11 +600,11 @@ ConduitProxy::ConduitProxy(KPilotLink *p,
if (!fConduit)
{
WARNINGKPILOT << "Can't cast to ConduitAction." << endl;
- addSyncLogEntry(i18n("Could not create conduit %1.").arg(fDesktopName));
+ addSyncLogEntry(i18n("Could not create conduit %1.").tqarg(fDesktopName));
return false;
}
- addSyncLogEntry(i18n("[Conduit %1]").arg(fDesktopName));
+ addSyncLogEntry(i18n("[Conduit %1]").tqarg(fDesktopName));
// Handle the syncDone signal properly & unload the conduit.
TQObject::connect(fConduit,TQT_SIGNAL(syncDone(SyncAction *)),
@@ -676,7 +676,7 @@ TQString findArgument(const TQStringList &a, const TQString &arg)
}
}
- return TQString::null;
+ return TQString();
}
/* static */ bool isRunning(const TQCString &n)
@@ -704,7 +704,7 @@ TQString findArgument(const TQStringList &a, const TQString &arg)
TQString symbol= CSL1("id_");
symbol.append(lib->name());
- if (!lib->hasSymbol(symbol.latin1())) return TQString::null;
+ if (!lib->hasSymbol(symbol.latin1())) return TQString();
return TQString::tqfromLatin1(*((const char **)(lib->symbol(symbol.latin1()))));
}
@@ -746,11 +746,11 @@ void CUDCounter::setEndCount(unsigned int t)
TQString CUDCounter::moo() const
{
TQString result = fType + ": " +
- i18n("Start: %1. End: %2. ").arg(fStart).arg(fEnd);
+ i18n("Start: %1. End: %2. ").tqarg(fStart).tqarg(fEnd);
- if (fC > 0) result += i18n("%1 new. ").arg(fC);
- if (fU > 0) result += i18n("%1 changed. ").arg(fU);
- if (fD > 0) result += i18n("%1 deleted. ").arg(fD);
+ if (fC > 0) result += i18n("%1 new. ").tqarg(fC);
+ if (fU > 0) result += i18n("%1 changed. ").tqarg(fU);
+ if (fD > 0) result += i18n("%1 deleted. ").tqarg(fD);
if ( (fC+fU+fD) <= 0) result += i18n("No changes made. ");
diff --git a/lib/plugin.h b/lib/plugin.h
index 5300c58..817d753 100644
--- a/lib/plugin.h
+++ b/lib/plugin.h
@@ -75,15 +75,16 @@ namespace Pilot
* seems a little foolish.
*
*/
-class KDE_EXPORT ConduitConfigBase : public QObject
+class KDE_EXPORT ConduitConfigBase : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor. Creates a conduit configuration support object
- * with the given parent @p parent and name (optional) @p n.
+ * with the given tqparent @p tqparent and name (optional) @p n.
*/
- ConduitConfigBase(TQWidget *parent=0L, const char *n=0L);
+ ConduitConfigBase(TQWidget *tqparent=0L, const char *n=0L);
/** Destructor. */
virtual ~ConduitConfigBase();
@@ -151,10 +152,10 @@ public:
* application's icon. This widget can be used pretty much
* anywhere. Copied from KAboutDialog, mostly.
*
- * @param parent The widget that holds the about widget.
+ * @param tqparent The widget that holds the about widget.
* @param data The KAboutData that is used to populate the widget.
*/
- static TQWidget *aboutPage(TQWidget *parent, KAboutData *data=0L);
+ static TQWidget *aboutPage(TQWidget *tqparent, KAboutData *data=0L);
protected:
/**
@@ -260,6 +261,7 @@ private:
class KDE_EXPORT ConduitAction : public SyncAction
{
Q_OBJECT
+ TQ_OBJECT
public:
ConduitAction(KPilotLink *,
@@ -367,6 +369,7 @@ private:
class ConduitProxy : public ConduitAction
{
Q_OBJECT
+ TQ_OBJECT
public:
ConduitProxy(KPilotLink *,
@@ -387,7 +390,7 @@ protected:
/** A namespace containing only static helper methods. */
namespace PluginUtility
{
- /** Searches the argument list for --foo=bar and returns bar, TQString::null if not found.
+ /** Searches the argument list for --foo=bar and returns bar, TQString() if not found.
* Don't include the -- in the argname. */
TQString findArgument(const TQStringList &a, const TQString argname);
@@ -418,6 +421,7 @@ namespace PluginUtility
* class KPilotPlugin : public KLibFactory
* {
* Q_OBJECT
+ TQ_OBJECT
*
* public:
* KPilotPlugin(TQObject * = 0L,const char * = 0L) ;
@@ -440,9 +444,9 @@ namespace PluginUtility
*
* <pre>
* protected:
-* virtual TQObject* createObject( TQObject* parent = 0,
+* virtual TQObject* createObject( TQObject* tqparent = 0,
* const char* name = 0,
-* const char* classname = "TQObject",
+* const char* classname = TQOBJECT_OBJECT_NAME_STRING,
* const TQStringList &args = TQStringList() );
* </pre>
*
diff --git a/lib/pluginfactory.h b/lib/pluginfactory.h
index f43c706..4fa2d6f 100644
--- a/lib/pluginfactory.h
+++ b/lib/pluginfactory.h
@@ -45,26 +45,26 @@ class KPilotLink;
template <class Widget, class Action> class ConduitFactory : public KLibFactory
{
public:
- ConduitFactory(TQObject *parent = 0, const char *name = 0) :
- KLibFactory(parent,name)
+ ConduitFactory(TQObject *tqparent = 0, const char *name = 0) :
+ KLibFactory(tqparent,name)
{ fInstance = new KInstance(name); } ;
virtual ~ConduitFactory()
{ delete fInstance; } ;
protected:
virtual TQObject *createObject(
- TQObject* parent = 0,
+ TQObject* tqparent = 0,
const char* name = 0,
- const char* classname = "TQObject",
+ const char* classname = TQOBJECT_OBJECT_NAME_STRING,
const TQStringList &args = TQStringList() )
{
if (qstrcmp(classname,"ConduitConfigBase")==0)
{
- TQWidget *w = dynamic_cast<TQWidget *>(parent);
+ TQWidget *w = dynamic_cast<TQWidget *>(tqparent);
if (w) return new Widget(w,name);
else
{
- WARNINGKPILOT << "Could not cast parent to widget." << endl;
+ WARNINGKPILOT << "Could not cast tqparent to widget." << endl;
return 0L;
}
}
@@ -72,11 +72,11 @@ protected:
if (qstrcmp(classname,"SyncAction")==0)
{
KPilotLink *d = 0L;
- if (parent) d = dynamic_cast<KPilotLink *>(parent);
+ if (tqparent) d = dynamic_cast<KPilotLink *>(tqparent);
- if (d || !parent)
+ if (d || !tqparent)
{
- if (!parent)
+ if (!tqparent)
{
kdDebug() << k_funcinfo << ": Using NULL device." << endl;
}
@@ -84,7 +84,7 @@ protected:
}
else
{
- WARNINGKPILOT << "Could not cast parent to KPilotLink" << endl;
+ WARNINGKPILOT << "Could not cast tqparent to KPilotLink" << endl;
return 0L;
}
}
diff --git a/lib/recordConduit.cc b/lib/recordConduit.cc
index 0ffbbcf..ee01063 100644
--- a/lib/recordConduit.cc
+++ b/lib/recordConduit.cc
@@ -66,7 +66,7 @@ long version_record_conduit = Pilot::PLUGIN_API;
bool retrieved = false;
if (!openDatabases( fDBName, &retrieved))
{
- emit logError(i18n("Unable to open the %1 database on the handheld.").arg( fDBName ) );
+ emit logError(i18n("Unable to open the %1 database on the handheld.").tqarg( fDBName ) );
return false;
}
if (retrieved) setFirstSync(true);
@@ -286,13 +286,13 @@ RecordConduit::~RecordConduit()
// Database names probably in latin1.
if( !openDatabases( dbName(), &fFirstSync ) )
{
- emit logError(i18n("Unable to open the %1 database on the handheld.").arg( dbName() ) );
+ emit logError(i18n("Unable to open the %1 database on the handheld.").tqarg( dbName() ) );
return false;
}
_getAppInfo();
if( !mPCData->loadData() )
{
- emit logError( i18n("Unable to open %1.").arg( mPCData->description() ) );
+ emit logError( i18n("Unable to open %1.").tqarg( mPCData->description() ) );
return false;
}
// get the addresseMap which maps Pilot unique record(address) id's to
@@ -496,7 +496,7 @@ void RecordConduit::slotDeletedRecord()
}
TQString uid = mEntryMap[ backupRec->id() ];
- PCEntry *pcEntry = mPCData->tqfindByUid( uid );
+ PCEntry *pcEntry = mPCData->findByUid( uid );
PilotRecord *palmRec = fDatabase->readRecordById( backupRec->id() );
PilotAppCategory *backupEntry = 0L;
if (backupRec)
@@ -696,16 +696,16 @@ int RecordConduit::compareStr( const TQString & str1, const TQString & str2 )
/**
* _getCat returns the id of the category from the given categories list.
- * If the address has no categories on the PC, TQString::null is returned.
+ * If the address has no categories on the PC, TQString() is returned.
* If the current category exists in the list of cats, it is returned
* Otherwise the first cat in the list that exists on the HH is returned
- * If none of the categories exists on the palm, TQString::null is returned
+ * If none of the categories exists on the palm, TQString() is returned
*/
TQString RecordConduit::getCatForHH( const TQStringList cats, const TQString curr ) const
{
FUNCTIONSETUP;
if ( cats.size() < 1 )
- return TQString::null;
+ return TQString();
if ( cats.tqcontains( curr ) )
return curr;
for ( TQStringList::ConstIterator it = cats.begin(); it != cats.end(); ++it)
@@ -721,7 +721,7 @@ TQString RecordConduit::getCatForHH( const TQStringList cats, const TQString cur
}
// If we have a free label, return the first possible cat
TQString lastCat( category( Pilot::CATEGORY_COUNT-1 ) );
- return ( lastCat.isEmpty() ) ? ( cats.first() ) : ( TQString::null );
+ return ( lastCat.isEmpty() ) ? ( cats.first() ) : ( TQString() );
}
void RecordConduit::setCategory(PCEntry * pcEntry, TQString cat)
@@ -1102,7 +1102,7 @@ RecordConduit::PCEntry *RecordConduit::findMatch( PilotAppCategory *palmEntry )
#endif
if( !id.isEmpty() )
{
- PCEntry *res = mPCData->tqfindByUid( id );
+ PCEntry *res = mPCData->findByUid( id );
if ( !res && !res->isEmpty() ) return res;
KPILOT_DELETE( res );
#ifdef DEBUG
diff --git a/lib/recordConduit.h b/lib/recordConduit.h
index 9c7e5c6..87aa44e 100644
--- a/lib/recordConduit.h
+++ b/lib/recordConduit.h
@@ -56,6 +56,7 @@ class KPilotDeviceLink;
class RecordConduitBase : public ConduitAction
{
Q_OBJECT
+ TQ_OBJECT
public:
/** Constructor. The TQStringList @p a sets flags for the ConduitAction.
*/
diff --git a/lib/syncAction.cc b/lib/syncAction.cc
index 3e29ad3..d0227f4 100644
--- a/lib/syncAction.cc
+++ b/lib/syncAction.cc
@@ -65,11 +65,11 @@ SyncAction::SyncAction(KPilotLink *p,
}
SyncAction::SyncAction(KPilotLink *p,
- TQWidget * visibleparent,
+ TQWidget * visibletqparent,
const char *name) :
TQObject(p, name),
fHandle(p),
- fParent(visibleparent)
+ fParent(visibletqparent)
{
FUNCTIONSETUP;
}
@@ -101,7 +101,7 @@ SyncAction::~SyncAction()
if (!r)
{
emit logError(i18n("The conduit %1 could not be executed.")
- .arg(TQString::tqfromLatin1(name())));
+ .tqarg(TQString::tqfromLatin1(name())));
delayDone();
}
}
@@ -217,11 +217,11 @@ TQString SyncAction::SyncMode::name() const
if (isTest())
{
- s.append(CSL1(" [%1]").arg(i18n("Test Sync")));
+ s.append(CSL1(" [%1]").tqarg(i18n("Test Sync")));
}
if (isLocal())
{
- s.append(CSL1(" [%1]").arg(i18n("Local Sync")));
+ s.append(CSL1(" [%1]").tqarg(i18n("Local Sync")));
}
return s;
}
@@ -332,7 +332,7 @@ int SyncAction::questionYesNo(const TQString & text,
TQMessageBox::Question,
text,
TQStringList(),
- (key.isEmpty() ? TQString::null : i18n("&Do not ask again")),
+ (key.isEmpty() ? TQString() : i18n("&Do not ask again")),
&checkboxReturn,
0);
@@ -445,7 +445,7 @@ int SyncAction::questionYesNoCancel(const TQString & text,
TQMessageBox::Question,
text,
TQStringList(),
- (key.isEmpty() ? TQString::null : i18n("&Do not ask again")),
+ (key.isEmpty() ? TQString() : i18n("&Do not ask again")),
&checkboxReturn,
0);
#else
diff --git a/lib/syncAction.h b/lib/syncAction.h
index f91ab3c..5f493f4 100644
--- a/lib/syncAction.h
+++ b/lib/syncAction.h
@@ -47,19 +47,20 @@ class TQTimer;
class KPilotUser;
class SyncAction;
-class KDE_EXPORT SyncAction : public QObject
+class KDE_EXPORT SyncAction : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
SyncAction(KPilotLink *p,
const char *name=0L);
SyncAction(KPilotLink *p,
- TQWidget *visibleparent,
+ TQWidget *visibletqparent,
const char *name=0L);
~SyncAction();
- typedef enum { Error=-1 } Status;
+ typedef enum { Error=-1 } tqStatus;
/** A syncaction has a status, which can be expressed as an
* integer. Subclasses are expected to define their own status
@@ -67,7 +68,7 @@ public:
*/
int status() const
{
- return fActionStatus;
+ return fActiontqStatus;
}
/** Return a human-readable representation of the status. */
virtual TQString statusString() const;
@@ -155,7 +156,7 @@ public:
protected:
/** Connection to the device. @todo make private. */
KPilotLink *fHandle;
- int fActionStatus;
+ int fActiontqStatus;
/** Returns a pointer to the connection to the device. */
inline KPilotLink *deviceLink() const
@@ -184,7 +185,7 @@ public:
/**
* This class encapsulates the different sync modes that
* can be used, and enforces a little discipline in changing
- * the mode and messing around in general. It tqreplaces a
+ * the mode and messing around in general. It replaces a
* simple enum by not much more, but it makes things like
* local test backups less likely to happen.
*
@@ -393,17 +394,17 @@ protected:
* @p timeout Timeout, in seconds.
*/
int questionYesNo(const TQString &question ,
- const TQString &caption = TQString::null,
- const TQString &key = TQString::null,
+ const TQString &caption = TQString(),
+ const TQString &key = TQString(),
unsigned timeout = 20,
- const TQString &yes = TQString::null,
- const TQString &no = TQString::null );
+ const TQString &yes = TQString(),
+ const TQString &no = TQString() );
int questionYesNoCancel(const TQString &question ,
- const TQString &caption = TQString::null,
- const TQString &key = TQString::null,
+ const TQString &caption = TQString(),
+ const TQString &key = TQString(),
unsigned timeout = 20,
- const TQString &yes = TQString::null,
- const TQString &no = TQString::null ) ;
+ const TQString &yes = TQString(),
+ const TQString &no = TQString() ) ;
};