--- ./src/customtraylabel.cpp	2005-04-05 19:16:12.000000000 +0200
+++ ./src/customtraylabel.cpp	2018-05-05 20:36:19.634317087 +0200
@@ -19,14 +19,14 @@
 
 // $Id: customtraylabel.cpp,v 1.13 2005/04/05 17:16:12 cs19713 Exp $
 
-#include <qsettings.h>
-#include <qpopupmenu.h>
-#include <qmessagebox.h>
-#include <qfiledialog.h>
-#include <qinputdialog.h>
-#include <qaction.h>
-#include <qtimer.h>
-#include <qsize.h>
+#include <tqt3/ntqsettings.h>
+#include <tqt3/ntqpopupmenu.h>
+#include <tqt3/ntqmessagebox.h>
+#include <tqt3/ntqfiledialog.h>
+#include <tqt3/ntqinputdialog.h>
+#include <tqt3/ntqaction.h>
+#include <tqt3/ntqtimer.h>
+#include <tqt3/ntqsize.h>
 #include <stdlib.h>
 
 #include "trace.h"
@@ -34,14 +34,14 @@
 #include "traylabelmgr.h"
 #include "kdocker.h"
 
-CustomTrayLabel::CustomTrayLabel(Window w, QWidget* p, const QString& t)
+CustomTrayLabel::CustomTrayLabel(Window w, TQWidget* p, const TQString& t)
   : QTrayLabel(w, p, t), mUndockWhenDead(false)
 { 
   installMenu(); 
 }
 
-CustomTrayLabel::CustomTrayLabel(const QStringList& argv, pid_t pid, 
-                                 QWidget* parent)
+CustomTrayLabel::CustomTrayLabel(const TQStringList& argv, pid_t pid, 
+                                 TQWidget* parent)
   : QTrayLabel(argv, pid, parent), mUndockWhenDead(false)
 { 
   installMenu(); 
@@ -52,20 +52,20 @@
  */
 void CustomTrayLabel::installMenu()
 {
-  QPixmap kdocker_png(QString(ICONS_PATH) + "/kdocker.png");
+  TQPixmap kdocker_png(TQString(ICONS_PATH) + "/kdocker.png");
   if (kdocker_png.isNull()) 
-    kdocker_png.load(qApp->applicationDirPath() + "/icons/kdocker.png");
+    kdocker_png.load(tqApp->applicationDirPath() + "/icons/kdocker.png");
   setIcon(kdocker_png);
   TrayLabelMgr *tlMgr = TrayLabelMgr::instance();
 
-  mOptionsMenu = new QPopupMenu(this);
-  mSessionManagement = new QAction(tr("Dock when session restored"), 0, this);
+  mOptionsMenu = new TQPopupMenu(this);
+  mSessionManagement = new TQAction(tr("Dock when session restored"), 0, this);
   mSessionManagement->setToggleAction(true);
   connect(mSessionManagement, SIGNAL(toggled(bool)),
           this, SLOT(enableSessionManagement(bool)));
   mSessionManagement->addTo(mOptionsMenu);
 
-  mAutoLaunch = new QAction(tr("Launch on startup"), 0, this);
+  mAutoLaunch = new TQAction(tr("Launch on startup"), 0, this);
 	mAutoLaunch->setToggleAction(true);
   connect(mAutoLaunch, SIGNAL(activated()), 
           this, SLOT(slotSetLaunchOnStartup()));
@@ -73,31 +73,31 @@
 
   mOptionsMenu->insertItem(tr("Set Icon"), this, SLOT(setCustomIcon()));
 
-  mBalloonTimeout = new QAction(tr("Set balloon timeout"), 0, this);
+  mBalloonTimeout = new TQAction(tr("Set balloon timeout"), 0, this);
   connect(mBalloonTimeout, SIGNAL(activated()), 
 	        this, SLOT(slotSetBalloonTimeout()));
   mBalloonTimeout->addTo(mOptionsMenu);
 
-  mDockWhenObscured = new QAction(tr("Dock when obscured"), 0, this);
+  mDockWhenObscured = new TQAction(tr("Dock when obscured"), 0, this);
   mDockWhenObscured->setToggleAction(true);
   connect(mDockWhenObscured, SIGNAL(toggled(bool)),
           this, SLOT(setDockWhenObscured(bool)));
   mDockWhenObscured->addTo(mOptionsMenu);
 
-  mDockWhenMinimized = new QAction(tr("Dock when minimized"), 0, this);
+  mDockWhenMinimized = new TQAction(tr("Dock when minimized"), 0, this);
   mDockWhenMinimized->setToggleAction(true);
   connect(mDockWhenMinimized, SIGNAL(toggled(bool)),
           this, SLOT(setDockWhenMinimized(bool)));
   mDockWhenMinimized->addTo(mOptionsMenu);
 
-  mSkipTaskbar = new QAction(tr("Skip taskbar"), 0, this);
+  mSkipTaskbar = new TQAction(tr("Skip taskbar"), 0, this);
   mSkipTaskbar->setToggleAction(true);
   connect(mSkipTaskbar, SIGNAL(toggled(bool)), 
           this, SLOT(setSkipTaskbar(bool)));
   mSkipTaskbar->addTo(mOptionsMenu);
 
-  mMainMenu = new QPopupMenu(this);
-  mMainMenu->insertItem(QIconSet(kdocker_png),
+  mMainMenu = new TQPopupMenu(this);
+  mMainMenu->insertItem(TQIconSet(kdocker_png),
                         tr("About KDocker"), tlMgr, SLOT(about()));
   mMainMenu->insertSeparator();
   mMainMenu->insertItem(tr("Options"), mOptionsMenu);
@@ -105,10 +105,10 @@
   mMainMenu->insertItem(tr("Undock All"), tlMgr, SLOT(undockAll()));
   mMainMenu->insertSeparator();
 
-  mShowId = mMainMenu->insertItem(QString("Show/Hide [untitled]"), 
+  mShowId = mMainMenu->insertItem(TQString("Show/Hide [untitled]"), 
                                   this, SLOT(toggleShow()));
-  mMainMenu->insertItem(QString(tr("Undock")), this, SLOT(undock()));
-  mMainMenu->insertItem(QString(tr("Close")), this, SLOT(close()));
+  mMainMenu->insertItem(TQString(tr("Undock")), this, SLOT(undock()));
+  mMainMenu->insertItem(TQString(tr("Close")), this, SLOT(close()));
 
   connect(mMainMenu, SIGNAL(aboutToShow()), this, SLOT(updateMenu()));
 
@@ -124,7 +124,7 @@
 /*
  * Session Management
  */
-bool CustomTrayLabel::restoreState(QSettings& settings)
+bool CustomTrayLabel::restoreState(TQSettings& settings)
 {
   mAutoLaunch->setOn(settings.readBoolEntry("/LaunchOnStartup"));
   setDockWhenObscured(settings.readBoolEntry("/DockWhenObscured"));
@@ -133,7 +133,7 @@
   return QTrayLabel::restoreState(settings);
 }
 
-bool CustomTrayLabel::saveState(QSettings& settings)
+bool CustomTrayLabel::saveState(TQSettings& settings)
 {
   if (!mSessionManagement->isOn()) return false;
   
@@ -179,7 +179,7 @@
   mSkipTaskbar->setOn(isSkippingTaskbar());
 }
 
-void CustomTrayLabel::setAppName(const QString& name)
+void CustomTrayLabel::setAppName(const TQString& name)
 {
   QTrayLabel::setAppName(name.lower());
 }
@@ -197,16 +197,16 @@
 // Get icon from user, load it and if successful load it.
 void CustomTrayLabel::setCustomIcon(void)
 {
-  QString icon;
+  TQString icon;
   
   while (true)
   {
     // Nag the user to give us a valid icon or press cancel
-    icon = QFileDialog::getOpenFileName();
+    icon = TQFileDialog::getOpenFileName();
     if (icon.isNull()) return;     // user cancelled
-    if (!QPixmap(icon).isNull()) break;
+    if (!TQPixmap(icon).isNull()) break;
     TRACE("Attempting to set icon to %s", icon.latin1());
-    QMessageBox::critical(this, tr("KDocker"), 
+    TQMessageBox::critical(this, tr("KDocker"), 
                           tr("%1 is not a valid icon").arg(icon));
   }
     
@@ -217,7 +217,7 @@
 void CustomTrayLabel::slotSetBalloonTimeout(void)
 {
   bool ok;
-  int timeout = QInputDialog::getInteger(tr("KDocker"), 
+  int timeout = TQInputDialog::getInteger(tr("KDocker"), 
       tr("Enter balloon timeout (secs). 0 to disable ballooning"), 
 			balloonTimeout()/1000, 0, 60, 1, &ok);
 	
@@ -235,7 +235,7 @@
 {
   TRACE("%i", mAutoLaunch->isOn());
   if (!mAutoLaunch->isOn()) return;
-  QString app = appName();
+  TQString app = appName();
 
   TRACE("Validating %s", app.latin1());
 
@@ -250,7 +250,7 @@
     }
 
     // Request user to provide file name himself
-    if (QMessageBox::critical(NULL, tr("KDocker"),
+    if (TQMessageBox::critical(NULL, tr("KDocker"),
         tr("\"%1\" is not a valid executable "
 	  	    "or was not found in your $PATH").arg(app),
         tr("Select program"), tr("Cancel")) == 1) 
@@ -259,7 +259,7 @@
       return; // cancelled
     }
 
-    app = QFileDialog::getOpenFileName();
+    app = TQFileDialog::getOpenFileName();
     if (app.isNull()) 
     {
       TRACE("Disabling auto launch");
@@ -272,9 +272,9 @@
 // Called when we are just about to display the menu
 void CustomTrayLabel::updateMenu(void)
 {
-  QString title = appClass(); // + "(" + appTitle() + ")";
-  mMainMenu->changeItem(mShowId, QIconSet(*pixmap()),
-      QString((isWithdrawn() ? tr("Show %1") : tr("Hide %1")).arg(title)));
+  TQString title = appClass(); // + "(" + appTitle() + ")";
+  mMainMenu->changeItem(mShowId, TQIconSet(*pixmap()),
+      TQString((isWithdrawn() ? tr("Show %1") : tr("Hide %1")).arg(title)));
 }
 
 void CustomTrayLabel::mapEvent(void)
@@ -287,7 +287,7 @@
    * the window. So we disable it for sometime and reanable.
    */
     mDockWhenObscured->setOn(false);
-    QTimer::singleShot(800, mDockWhenObscured, SLOT(toggle()));
+    TQTimer::singleShot(800, mDockWhenObscured, SLOT(toggle()));
     TRACE("Turning off DWO for some time");
   }
 }
@@ -299,9 +299,9 @@
     withdraw();
 }
 
-void CustomTrayLabel::mouseReleaseEvent(QMouseEvent * ev)
+void CustomTrayLabel::mouseReleaseEvent(TQMouseEvent * ev)
 {  
-  if (ev->button() == Qt::RightButton)
+  if (ev->button() == TQt::RightButton)
     mMainMenu->popup(ev->globalPos());
   else
     toggleShow();
@@ -342,7 +342,7 @@
 
 void CustomTrayLabel::dropEvent(QDropEvent *)
 {
-  QMessageBox::information(NULL, "KDocker", 
+  TQMessageBox::information(NULL, "KDocker", 
     tr("You cannot drop an item into the tray icon. Drop it on the window\n"
        "that is brought in front when you hover the item over the tray icon"));
 }
--- ./src/customtraylabel.h	2005-02-09 04:38:00.000000000 +0100
+++ ./src/customtraylabel.h	2018-05-05 20:36:19.634317087 +0200
@@ -22,32 +22,32 @@
 #ifndef _CUSTOMTRAYLABEL_H
 #define _CUSTOMTRAYLABEL_H
 
-#include <qaction.h>
+#include <tqt3/ntqaction.h>
 #include "qtraylabel.h"
 
-class QStringList;
-class QPopupMenu;
-class QString;
-class QSettings;
-class QWidget;
+class TQStringList;
+class TQPopupMenu;
+class TQString;
+class TQSettings;
+class TQWidget;
 class QDropEvent;
 
 class CustomTrayLabel : public QTrayLabel
 {
-  Q_OBJECT
+  TQ_OBJECT
 
 public:
-  CustomTrayLabel(Window w, QWidget* p = 0, const QString& t = QString::null);
-  CustomTrayLabel(const QStringList& argv, pid_t pid, QWidget* parent = 0);
+  CustomTrayLabel(Window w, TQWidget* p = 0, const TQString& t = TQString::null);
+  CustomTrayLabel(const TQStringList& argv, pid_t pid, TQWidget* parent = 0);
 
   // Session management
-  bool saveState(QSettings& settings);
-  bool restoreState(QSettings& settings);
+  bool saveState(TQSettings& settings);
+  bool restoreState(TQSettings& settings);
 
   bool isLaunchOnStartup(void) const   { return mAutoLaunch->isOn(); }
   bool isDockWhenObscured(void) const { return mDockWhenObscured->isOn(); }
   
-  void setAppName(const QString& name);
+  void setAppName(const TQString& name);
 
 public slots:
   // overridden to update our menu
@@ -64,7 +64,7 @@
   void mapEvent(void);
   void obscureEvent(void);
   void destroyEvent(void);
-  void mouseReleaseEvent(QMouseEvent * ev);
+  void mouseReleaseEvent(TQMouseEvent * ev);
   bool canDockWindow(Window w);
   void processDead(void);
 
@@ -77,8 +77,8 @@
 private:
   void installMenu();
   bool mUndockWhenDead;
-  QPopupMenu *mOptionsMenu, *mMainMenu;
-  QAction *mDockOnRestore, *mAutoLaunch, *mBalloonTimeout, *mSkipTaskbar,
+  TQPopupMenu *mOptionsMenu, *mMainMenu;
+  TQAction *mDockOnRestore, *mAutoLaunch, *mBalloonTimeout, *mSkipTaskbar,
           *mDockWhenMinimized, *mDockWhenObscured, *mSessionManagement;
   int mShowId;
 };
--- ./src/kdocker.cpp	2005-02-04 11:25:46.000000000 +0100
+++ ./src/kdocker.cpp	2018-05-05 20:36:19.634317087 +0200
@@ -19,14 +19,14 @@
 
 // $Id: kdocker.cpp,v 1.24 2005/02/04 10:25:46 cs19713 Exp $
 
-#include <qsessionmanager.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qtranslator.h>
-#include <qtextcodec.h>
-#include <qtextstream.h>
-#include <qtimer.h>
-#include <qstring.h>
+#include <tqt3/ntqsessionmanager.h>
+#include <tqt3/ntqdir.h>
+#include <tqt3/ntqfile.h>
+#include <tqt3/ntqtranslator.h>
+#include <tqt3/ntqtextcodec.h>
+#include <tqt3/ntqtextstream.h>
+#include <tqt3/ntqtimer.h>
+#include <tqt3/ntqstring.h>
 
 #include "trace.h"
 #include "traylabelmgr.h"
@@ -38,28 +38,28 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-// #define TMPFILE_PREFIX QString("/tmp/kdocker.")
-#define TMPFILE_PREFIX QDir::homeDirPath() + "/.kdocker."
+// #define TMPFILE_PREFIX TQString("/tmp/kdocker.")
+#define TMPFILE_PREFIX TQDir::homeDirPath() + "/.kdocker."
 
 KDocker::KDocker(int& argc, char** argv)
-  :QApplication(argc, argv), mTrayLabelMgr(0)
+  :TQApplication(argc, argv), mTrayLabelMgr(0)
 {
   INIT_TRACE();
 
   /*
-   * Load localisation strings. Most examples I have seen load QTranslator
+   * Load localisation strings. Most examples I have seen load TQTranslator
    * in main(). As a result the translator object lingers around till the end
    * of the program. I tried the same thing here and all i got was translations
    * for usage(). You dont want to know about the sleepless night i spent
    * trying to figure this out (yup, the source helped)
    */
-  QTranslator *translator = new QTranslator(0);
-  QString f = QString("kdocker_") + QTextCodec::locale();
+  TQTranslator *translator = new TQTranslator(0);
+  TQString f = TQString("kdocker_") + TQTextCodec::locale();
 
-  if (!translator->load(f, QString(TRANSLATIONS_PATH)) &&
+  if (!translator->load(f, TQString(TRANSLATIONS_PATH)) &&
       !translator->load(f, applicationDirPath() + "/i18n") &&
-      !translator->load(f, QDir::currentDirPath() + "/i18n")) {
-      qDebug("Sorry, your locale is not supported. If you are interested "
+      !translator->load(f, TQDir::currentDirPath() + "/i18n")) {
+      tqDebug("Sorry, your locale is not supported. If you are interested "
              "in providing translations for your locale, contact "
              "gramakri@uiuc.edu\n");
   }
@@ -83,13 +83,13 @@
    * selection owner. If someone else owns it, transfer control to that
    * instance of KDocker
    */
-  Display *display = QPaintDevice::x11AppDisplay();
+  Display *display = TQPaintDevice::x11AppDisplay();
   Atom kdocker = XInternAtom(display, "_KDOCKER_RUNNING", False);
   Window prev_instance = XGetSelectionOwner(display, kdocker);
 
   if (prev_instance == None)
   {
-    mSelectionOwner = XCreateSimpleWindow(display, qt_xrootwin(), 1, 1, 1,
+    mSelectionOwner = XCreateSimpleWindow(display, tqt_xrootwin(), 1, 1, 1,
                                           1, 1, 1, 1);
     XSetSelectionOwner(display, kdocker, mSelectionOwner, CurrentTime);
     TRACE("Selection owner set to 0x%x", (unsigned) mSelectionOwner);
@@ -101,51 +101,51 @@
 
 void KDocker::printVersion(void)
 {
-  qDebug("Qt: %s", qVersion());
-  qDebug("KDocker: %s", KDOCKER_APP_VERSION);
+  tqDebug("Qt: %s", tqVersion());
+  tqDebug("KDocker: %s", KDOCKER_APP_VERSION);
 }
 
 // Prints the CLI arguments. Does not return
 void KDocker::printUsage(char optopt)
 {
-  if (optopt != 'h') qDebug(tr("kdocker: invalid option -- %1").arg(optopt));
+  if (optopt != 'h') tqDebug(tr("kdocker: invalid option -- %1").arg(optopt));
 
-  qDebug(tr("Usage: KDocker [options] command\n"));
-  qDebug(tr("Docks any application into the system tray\n"));
-  qDebug(tr("command \tCommand to execute\n"));
-  qDebug(tr("Options"));
-  qDebug(tr("-a     \tShow author information"));
-  qDebug(tr("-b     \tDont warn about non-normal windows (blind mode)"));
-  qDebug(tr("-d     \tDisable session management"));
-  qDebug(tr("-e     \tEnable session management"));
-  qDebug(tr("-f     \tDock window that has the focus(active window)"));
-  qDebug(tr("-h     \tDisplay this help"));
-  qDebug(tr("-i icon\tCustom dock Icon"));
-  qDebug(tr("-l     \tLaunch on startup"));
-  qDebug(tr("-m     \tKeep application window mapped (dont hide on dock)"));
-  qDebug(tr("-o     \tDock when obscured"));
-	qDebug(tr("-p secs\tSet ballooning timeout (popup time)"));
-  qDebug(tr("-q     \tDisable ballooning title changes (quiet)"));
-  qDebug(tr("-t     \tRemove this application from the task bar"));
-  qDebug(tr("-v     \tDisplay version"));
-  qDebug(tr("-w wid \tWindow id of the application to dock\n"));
+  tqDebug(tr("Usage: KDocker [options] command\n"));
+  tqDebug(tr("Docks any application into the system tray\n"));
+  tqDebug(tr("command \tCommand to execute\n"));
+  tqDebug(tr("Options"));
+  tqDebug(tr("-a     \tShow author information"));
+  tqDebug(tr("-b     \tDont warn about non-normal windows (blind mode)"));
+  tqDebug(tr("-d     \tDisable session management"));
+  tqDebug(tr("-e     \tEnable session management"));
+  tqDebug(tr("-f     \tDock window that has the focus(active window)"));
+  tqDebug(tr("-h     \tDisplay this help"));
+  tqDebug(tr("-i icon\tCustom dock Icon"));
+  tqDebug(tr("-l     \tLaunch on startup"));
+  tqDebug(tr("-m     \tKeep application window mapped (dont hide on dock)"));
+  tqDebug(tr("-o     \tDock when obscured"));
+	tqDebug(tr("-p secs\tSet ballooning timeout (popup time)"));
+  tqDebug(tr("-q     \tDisable ballooning title changes (quiet)"));
+  tqDebug(tr("-t     \tRemove this application from the task bar"));
+  tqDebug(tr("-v     \tDisplay version"));
+  tqDebug(tr("-w wid \tWindow id of the application to dock\n"));
   
-  qDebug(tr("NOTE: Use -d for all startup scripts.\n"));
+  tqDebug(tr("NOTE: Use -d for all startup scripts.\n"));
 
-  qDebug(tr("Bugs and wishes to gramakri@uiuc.edu"));
-  qDebug(tr("Project information at http://kdocker.sourceforge.net"));
+  tqDebug(tr("Bugs and wishes to gramakri@uiuc.edu"));
+  tqDebug(tr("Project information at http://kdocker.sourceforge.net"));
 }
 
 void KDocker::notifyPreviousInstance(Window prevInstance)
 {
-  Display *display = QPaintDevice::x11AppDisplay();
+  Display *display = TQPaintDevice::x11AppDisplay();
 
   TRACE("Notifying previous instance [%x]", (unsigned) prevInstance);
 
   // Dump all arguments in temporary file
-  QFile f(TMPFILE_PREFIX + QString().setNum(getpid()));
+  TQFile f(TMPFILE_PREFIX + TQString().setNum(getpid()));
   if (!f.open(IO_WriteOnly)) return;
-  QTextStream s(&f);
+  TQTextStream s(&f);
 	
   /*
    * Its normal to use KDocker in startup scripts. We could be getting restored
@@ -212,11 +212,11 @@
       unlink(tmp);
       return TRUE;
     }
-    QFile f(tmp);
+    TQFile f(tmp);
     if (!f.open(IO_ReadOnly)) return TRUE;
-    QTextStream s(&f);
-    QStringList argv;
-    while (!s.atEnd()) { QString x; s >> x; argv += x; }
+    TQTextStream s(&f);
+    TQStringList argv;
+    while (!s.atEnd()) { TQString x; s >> x; argv += x; }
     f.close();
     unlink(tmp); // delete the tmp file
     mTrayLabelMgr->processCommand(argv);
@@ -228,22 +228,22 @@
 /*
  * XSMP Support
  */
-void KDocker::saveState(QSessionManager &sm)
+void KDocker::saveState(TQSessionManager &sm)
 {
-  QString sf = mTrayLabelMgr->saveSession();
+  TQString sf = mTrayLabelMgr->saveSession();
 
-  QStringList discard_command;
+  TQStringList discard_command;
   discard_command << "rm" << sf;
   sm.setDiscardCommand(discard_command);
 
-  sm.setRestartHint(QSessionManager::RestartIfRunning);
-  QStringList restart_command;
+  sm.setRestartHint(TQSessionManager::RestartIfRunning);
+  TQStringList restart_command;
   restart_command << this->argv()[0]
                   << "-session" << sm.sessionId();
   sm.setRestartCommand(restart_command);
 
   TRACE("SessionFile=%s AppName=%s", sf.latin1(), this->argv()[0]);
-  DUMP_TRACE(QDir::homeDirPath() + "/kdocker.trace");
+  DUMP_TRACE(TQDir::homeDirPath() + "/kdocker.trace");
   // sm.setRestartCommand(applicationFilePath());
 }
 
--- ./src/kdocker.h	2005-02-09 04:32:26.000000000 +0100
+++ ./src/kdocker.h	2018-05-05 20:36:19.634317087 +0200
@@ -22,31 +22,31 @@
 #ifndef _KDOCKER_H
 #define _KDOCKER_H
 
-#include <qapplication.h>
+#include <tqt3/ntqapplication.h>
 #include <X11/Xlib.h>
 
 #define KDOCKER_APP_VERSION "1.3"
 
 class TrayLabelMgr;
 
-class KDocker : public QApplication
+class KDocker : public TQApplication
 {
-  Q_OBJECT
+  TQ_OBJECT
 
 public:
   KDocker(int& argc, char** argv);
 
   TrayLabelMgr *trayLabelMgr(void) { return mTrayLabelMgr; }
 
-  void dumpState(const QString &file);
+  void dumpState(const TQString &file);
   void printUsage(char optopt = 'h');
 
 protected:
   bool x11EventFilter(XEvent * event);
-  void saveState(QSessionManager &sm);
+  void saveState(TQSessionManager &sm);
 
 private:
-  QString saveSession();
+  TQString saveSession();
   bool restoreSession();
   void notifyPreviousInstance(Window prevInstance);
 
--- ./src/main.cpp	2004-11-08 08:14:18.000000000 +0100
+++ ./src/main.cpp	2018-05-05 20:36:19.634317087 +0200
@@ -24,7 +24,7 @@
 #include <unistd.h>
 #include <signal.h>
 
-#include <qdir.h>
+#include <tqt3/ntqdir.h>
 #include "kdocker.h"
 #include "traylabelmgr.h"
 #include "trace.h"
@@ -34,12 +34,12 @@
 {
   if (sig == SIGUSR1)
   {
-    DUMP_TRACE(QDir::homeDirPath() + "/kdocker.trace");
+    DUMP_TRACE(TQDir::homeDirPath() + "/kdocker.trace");
     return;
   }
   
-  qDebug(qApp->translate("KDocker", "Caught signal %1. Cleaning up.").arg(sig));
-  ((KDocker *)qApp)->trayLabelMgr()->undockAll();
+  tqDebug(tqApp->translate("KDocker", "Caught signal %1. Cleaning up.").arg(sig));
+  ((KDocker *)tqApp)->trayLabelMgr()->undockAll();
 }
 
 int main(int argc, char *argv[])
--- ./src/qtraylabel.cpp	2005-02-09 04:34:06.000000000 +0100
+++ ./src/qtraylabel.cpp	2018-05-05 20:36:19.634317087 +0200
@@ -20,15 +20,15 @@
 // $Id: qtraylabel.cpp,v 1.30 2005/02/09 03:34:06 cs19713 Exp $
 
 // Include all Qt includes before X
-#include <qstring.h>
-#include <qevent.h>
-#include <qpoint.h>
-#include <qtooltip.h>
-#include <qtimer.h>
-#include <qimage.h>
-#include <qpixmap.h>
-#include <qfileinfo.h>
-#include <qapplication.h>
+#include <tqt3/ntqstring.h>
+#include <tqt3/ntqevent.h>
+#include <tqt3/ntqpoint.h>
+#include <tqt3/ntqtooltip.h>
+#include <tqt3/ntqtimer.h>
+#include <tqt3/ntqimage.h>
+#include <tqt3/ntqpixmap.h>
+#include <tqt3/ntqfileinfo.h>
+#include <tqt3/ntqapplication.h>
 #include "trace.h"
 #include "qtraylabel.h"
 
@@ -53,24 +53,24 @@
   mDesktop = 666; // setDockedWindow would set it a saner value
 
   // Balloon's properties are set to match a Qt tool tip (see Qt source)
-  mBalloon = new QLabel(0, "balloon", WType_TopLevel | WStyle_StaysOnTop |
+  mBalloon = new TQLabel(0, "balloon", WType_TopLevel | WStyle_StaysOnTop |
                                       WStyle_Customize | WStyle_NoBorder | 
                                       WStyle_Tool | WX11BypassWM);
-  mBalloon->setFont(QToolTip::font());
-  mBalloon->setPalette(QToolTip::palette());
-  mBalloon->setAlignment(Qt::AlignLeft | Qt::AlignTop);
+  mBalloon->setFont(TQToolTip::font());
+  mBalloon->setPalette(TQToolTip::palette());
+  mBalloon->setAlignment(TQt::AlignLeft | TQt::AlignTop);
   mBalloon->setAutoMask(FALSE);
   mBalloon->setAutoResize(true);
-  setAlignment(Qt::AlignCenter);
+  setAlignment(TQt::AlignCenter);
   setBackgroundMode(X11ParentRelative);
 
   connect(&mRealityMonitor, SIGNAL(timeout()), this, SLOT(realityCheck()));
   setDockedWindow(mDockedWindow);
 
-  sysTrayStatus(QPaintDevice::x11AppDisplay(), &mSysTray);
+  sysTrayStatus(TQPaintDevice::x11AppDisplay(), &mSysTray);
   // Subscribe to system tray window notifications
   if (mSysTray != None)
-    subscribe(QPaintDevice::x11AppDisplay(), mSysTray, 
+    subscribe(TQPaintDevice::x11AppDisplay(), mSysTray, 
               StructureNotifyMask, true);
 }
 
@@ -83,19 +83,19 @@
   return temp;
 }
 
-QTrayLabel::QTrayLabel(Window w, QWidget* parent, const QString& text)
-  :QLabel(parent, text,	WStyle_Customize | WStyle_NoBorder | WStyle_Tool),
+QTrayLabel::QTrayLabel(Window w, TQWidget* parent, const TQString& text)
+  :TQLabel(parent, text,	WStyle_Customize | WStyle_NoBorder | WStyle_Tool),
    mDockedWindow(w), mPid(0)
 {
   initialize();
 }
 
-QTrayLabel::QTrayLabel(const QStringList& pname, pid_t pid, QWidget* parent)
- :QLabel(parent, "TrayLabel", WStyle_Customize | WStyle_NoBorder | WStyle_Tool),
+QTrayLabel::QTrayLabel(const TQStringList& pname, pid_t pid, TQWidget* parent)
+ :TQLabel(parent, "TrayLabel", WStyle_Customize | WStyle_NoBorder | WStyle_Tool),
   mDockedWindow(None), mProgName(pname), mPid(pid)
 {
   if (pname[0].at(0) != '/' && pname[0].find('/', 1) > 0) 
-    mProgName[0] = QFileInfo(pname[0]).absFilePath(); // convert to absolute
+    mProgName[0] = TQFileInfo(pname[0]).absFilePath(); // convert to absolute
   initialize();
 }
 
@@ -117,10 +117,10 @@
 {
    Window r, parent, *children;
    unsigned nchildren = 0;
-   Display *display = QPaintDevice::x11AppDisplay();
-   QString ename = QFileInfo(mProgName[0]).fileName(); // strip out the path
+   Display *display = TQPaintDevice::x11AppDisplay();
+   TQString ename = TQFileInfo(mProgName[0]).fileName(); // strip out the path
 
-   XQueryTree(display, qt_xrootwin(), &r, &parent, &children, &nchildren);
+   XQueryTree(display, tqt_xrootwin(), &r, &parent, &children, &nchildren);
    TRACE("%s nchildren=%i", me(), nchildren);
    for(unsigned i=0; i<nchildren; i++)
    {
@@ -148,12 +148,12 @@
   if (mSysTray == None)
   {
     // Check the system tray status if we were docked
-    if (sysTrayStatus(QPaintDevice::x11AppDisplay(), &mSysTray) 
+    if (sysTrayStatus(TQPaintDevice::x11AppDisplay(), &mSysTray) 
             != SysTrayPresent) return; // no luck
 
     TRACE("%s System tray present", me());
     dock();
-    subscribe(QPaintDevice::x11AppDisplay(), mSysTray, 
+    subscribe(TQPaintDevice::x11AppDisplay(), mSysTray, 
               StructureNotifyMask, true);
     mRealityMonitor.stop();
     return;
@@ -169,9 +169,9 @@
    * scan existing client list and dock. I have never seen this happen 
    * but I see it likely to happen during session restoration
    */
-  Display *display = QPaintDevice::x11AppDisplay();
+  Display *display = TQPaintDevice::x11AppDisplay();
   XWindowAttributes attr;
-  XGetWindowAttributes(display, qt_xrootwin(), &attr);
+  XGetWindowAttributes(display, tqt_xrootwin(), &attr);
 
   if (!(attr.your_event_mask & SubstructureNotifyMask)) 
   {
@@ -197,9 +197,9 @@
 void QTrayLabel::showOnAllDesktops(void)
 {
   TRACE("Showing on all desktops");
-  Display *d = QPaintDevice::x11AppDisplay();
+  Display *d = TQPaintDevice::x11AppDisplay();
   long l[5] = { -1, 0, 0, 0, 0 }; // -1 = all, 0 = Desktop1, 1 = Desktop2 ...
-  sendMessage(d, qt_xrootwin(), mDockedWindow, "_NET_WM_DESKTOP", 32, 
+  sendMessage(d, tqt_xrootwin(), mDockedWindow, "_NET_WM_DESKTOP", 32, 
               SubstructureNotifyMask | SubstructureRedirectMask, l, sizeof(l));
 }
 
@@ -228,7 +228,7 @@
     return;
   }
 
-  Display *display = QPaintDevice::x11AppDisplay();
+  Display *display = TQPaintDevice::x11AppDisplay();
   Window wid = winId();
 
   // 1. GNOME and NET WM Specification
@@ -261,7 +261,7 @@
    * working with with a delay of as little as 50ms. But since I
    * dont understand why this delay is required, I am justifiably paranoid
    */
-  QTimer::singleShot(500, this, SLOT(show()));
+  TQTimer::singleShot(500, this, SLOT(show()));
 
   // let the world know
   emit docked(this);
@@ -278,7 +278,7 @@
 {
   TRACE("%s stopping reality monitor", me());
   mRealityMonitor.stop();
-  XUnmapWindow(QPaintDevice::x11AppDisplay(), winId());
+  XUnmapWindow(TQPaintDevice::x11AppDisplay(), winId());
   emit undocked(this);
   emit undocked();
 }
@@ -292,7 +292,7 @@
   mWithdrawn = false;
   if (mDockedWindow == None) return;
   
-  Display *display = QPaintDevice::x11AppDisplay();
+  Display *display = TQPaintDevice::x11AppDisplay();
 
   if (mDesktop == -1)
   {
@@ -303,7 +303,7 @@
        * the WM 200ms to do that. We will override that value to -1 (all
        * desktops) on showOnAllDesktops().        
        */
-       QTimer::singleShot(200, this, SLOT(showOnAllDesktops()));
+       TQTimer::singleShot(200, this, SLOT(showOnAllDesktops()));
   }
 
   /*
@@ -325,13 +325,13 @@
   XSetWMNormalHints(display, mDockedWindow, &mSizeHint);
   // make it the active window
   long l[5] = { None, CurrentTime, None, 0, 0 };
-  sendMessage(display, qt_xrootwin(), mDockedWindow, "_NET_ACTIVE_WINDOW", 32,
+  sendMessage(display, tqt_xrootwin(), mDockedWindow, "_NET_ACTIVE_WINDOW", 32,
 	            SubstructureNotifyMask | SubstructureRedirectMask, l, sizeof(l));
   // skipTaskbar modifies _NET_WM_STATE. Make sure we dont override WMs value
-  QTimer::singleShot(230, this, SLOT(skipTaskbar()));
+  TQTimer::singleShot(230, this, SLOT(skipTaskbar()));
   // disable docking when minized for some time (since we went to Iconic state)
   mDockWhenMinimized = !mDockWhenMinimized;
-  QTimer::singleShot(230, this, SLOT(toggleDockWhenMinimized()));
+  TQTimer::singleShot(230, this, SLOT(toggleDockWhenMinimized()));
 }
 
 void QTrayLabel::withdraw(void)
@@ -340,7 +340,7 @@
   mWithdrawn = true;
   if (mDockedWindow == None) return;
 
-  Display *display = QPaintDevice::x11AppDisplay();
+  Display *display = TQPaintDevice::x11AppDisplay();
   int screen = DefaultScreen(display);
   long dummy;
  
@@ -360,10 +360,10 @@
   memset(&ev, 0, sizeof(ev));
   ev.type = UnmapNotify;
   ev.display = display;
-  ev.event = qt_xrootwin();
+  ev.event = tqt_xrootwin();
   ev.window = mDockedWindow;
   ev.from_configure = false;
-  XSendEvent(display, qt_xrootwin(), False, 
+  XSendEvent(display, tqt_xrootwin(), False, 
              SubstructureRedirectMask|SubstructureNotifyMask, (XEvent *)&ev);
   XSync(display, False);
 }
@@ -380,7 +380,7 @@
   unsigned long __attribute__ ((unused)) left;
   Atom *data = NULL;
   unsigned long nitems = 0, num_states = 0;
-  Display *display = QPaintDevice::x11AppDisplay();
+  Display *display = TQPaintDevice::x11AppDisplay();
 
   TRACE("%s", me());
   Atom _NET_WM_STATE = XInternAtom(display, "_NET_WM_STATE", True);
@@ -439,10 +439,10 @@
 void QTrayLabel::close(void)
 {
   TRACE("%s", me());
-  Display *display = QPaintDevice::x11AppDisplay();
+  Display *display = TQPaintDevice::x11AppDisplay();
   long l[5] = { 0, 0, 0, 0, 0 };
   map();
-  sendMessage(display, qt_xrootwin(), mDockedWindow, "_NET_CLOSE_WINDOW", 32,
+  sendMessage(display, tqt_xrootwin(), mDockedWindow, "_NET_CLOSE_WINDOW", 32,
               SubstructureNotifyMask | SubstructureRedirectMask, 
               l, sizeof(l));
 }
@@ -450,10 +450,10 @@
 /*
  * Sets the tray icon. If the icon failed to load, we revert to application icon
  */
-void QTrayLabel::setTrayIcon(const QString& icon)
+void QTrayLabel::setTrayIcon(const TQString& icon)
 {
   mCustomIcon = icon;
-  if (QPixmap(mCustomIcon).isNull()) mCustomIcon = QString::null;
+  if (TQPixmap(mCustomIcon).isNull()) mCustomIcon = TQString::null;
   TRACE("%s mCustomIcon=%s", me(), mCustomIcon.latin1());
   updateIcon();
 }
@@ -476,7 +476,7 @@
   if (mDockedWindow == None) mRealityMonitor.start(500);
   else mRealityMonitor.stop();
 
-  Display *d = QPaintDevice::x11AppDisplay();
+  Display *d = TQPaintDevice::x11AppDisplay();
   
   // Subscribe for window or root window events
   if (w == None) subscribe(d, None, SubstructureNotifyMask, true);
@@ -499,7 +499,7 @@
 
     if (mWithdrawn) 
       // show the window for sometime before docking
-      QTimer::singleShot(1000, this, SLOT(withdraw()));
+      TQTimer::singleShot(1000, this, SLOT(withdraw()));
     else map();
     dock();
   }
@@ -511,9 +511,9 @@
 void QTrayLabel::balloonText()
 {
   TRACE("%s BalloonText=%s ToolTipText=%s", me(),
-        mBalloon->text().latin1(), QToolTip::textFor(this).latin1());
+        mBalloon->text().latin1(), TQToolTip::textFor(this).latin1());
                                           
-  if (mBalloon->text() == QToolTip::textFor(this)) return;
+  if (mBalloon->text() == TQToolTip::textFor(this)) return;
 #if 0 // I_GOT_NETWM_BALLOONING_TO_WORK
   // if you can get NET WM ballooning to work let me know
   static int id = 1;
@@ -535,18 +535,18 @@
   }
 #else
   // Manually do ballooning. See the Qt ToolTip code
-  QString oldText = mBalloon->text();
-  mBalloon->setText(QToolTip::textFor(this));
+  TQString oldText = mBalloon->text();
+  mBalloon->setText(TQToolTip::textFor(this));
   if (oldText.isEmpty()) return; // dont tool tip the first time
-  QPoint p = mapToGlobal(QPoint(0, -1 - mBalloon->height()));
-  if (p.x() + mBalloon->width() > QApplication::desktop()->width())
+  TQPoint p = mapToGlobal(TQPoint(0, -1 - mBalloon->height()));
+  if (p.x() + mBalloon->width() > TQApplication::desktop()->width())
     p.setX(p.x() + width() - mBalloon->width());
 
   if (p.y() < 0) p.setY(height() + 1);
 
   mBalloon->move(p);
   mBalloon->show();
-  QTimer::singleShot(mBalloonTimeout, mBalloon, SLOT(hide()));
+  TQTimer::singleShot(mBalloonTimeout, mBalloon, SLOT(hide()));
 #endif
 }
 
@@ -555,7 +555,7 @@
  */
 void QTrayLabel::handleTitleChange(void)
 {
-  Display *display = QPaintDevice::x11AppDisplay();
+  Display *display = TQPaintDevice::x11AppDisplay();
   char *window_name = NULL;
 
   XFetchName(display, mDockedWindow, &window_name);
@@ -566,8 +566,8 @@
   XClassHint ch;
   if (XGetClassHint(display, mDockedWindow, &ch))
   {
-    if (ch.res_class) mClass = QString(ch.res_class);
-    else if (ch.res_name) mClass = QString(ch.res_name);
+    if (ch.res_class) mClass = TQString(ch.res_class);
+    else if (ch.res_name) mClass = TQString(ch.res_name);
 
     if (ch.res_class) XFree(ch.res_class);
     if (ch.res_name) XFree(ch.res_name);
@@ -584,9 +584,9 @@
 void QTrayLabel::updateTitle()
 {
   TRACE("%s", me());
-  QString text = mTitle + " [" + mClass + "]";
-  QToolTip::remove(this);
-  QToolTip::add(this, text);
+  TQString text = mTitle + " [" + mClass + "]";
+  TQToolTip::remove(this);
+  TQToolTip::add(this, text);
 
   if (mBalloonTimeout) balloonText();
 }
@@ -598,7 +598,7 @@
   TRACE("%s", me());
   if (mDockedWindow == None) return;
 
-  Display *display = QPaintDevice::x11AppDisplay();
+  Display *display = TQPaintDevice::x11AppDisplay();
   XWMHints *wm_hints = XGetWMHints(display, mDockedWindow);
   if (wm_hints != NULL)
   {
@@ -614,13 +614,13 @@
                               wm_hints->icon_mask, NULL);
     XFree(wm_hints);
   }
-  QImage image;
+  TQImage image;
   if (!window_icon) 
   {
-    if (!image.load(QString(ICONS_PATH) + "/question.png"))
-      image.load(qApp->applicationDirPath() + "/icons/question.png");
+    if (!image.load(TQString(ICONS_PATH) + "/question.png"))
+      image.load(tqApp->applicationDirPath() + "/icons/question.png");
   }
-  else image = QPixmap((const char **) window_icon).convertToImage();
+  else image = TQPixmap((const char **) window_icon).convertToImage();
   if (window_icon) XpmFree(window_icon);
   mAppIcon = image.smoothScale(24, 24); // why?
   setMinimumSize(mAppIcon.size());
@@ -637,14 +637,14 @@
   TRACE("%s", me());
   setPixmap(mCustomIcon.isEmpty() ? mAppIcon : mCustomIcon);
   erase();
-  QPaintEvent pe(rect());
+  TQPaintEvent pe(rect());
   paintEvent(&pe);
 }
 
 /*
  * Mouse activity on our label. RightClick = Menu. LeftClick = Toggle Map
  */
-void QTrayLabel::mouseReleaseEvent(QMouseEvent * ev)
+void QTrayLabel::mouseReleaseEvent(TQMouseEvent * ev)
 {
   emit clicked(ev->button(), ev->globalPos());
 }
@@ -652,7 +652,7 @@
 /*
  * Track drag event
  */
-void QTrayLabel::dragEnterEvent(QDragEnterEvent *ev)
+void QTrayLabel::dragEnterEvent(TQDragEnterEvent *ev)
 {
   ev->accept(); 
   map();
@@ -702,11 +702,11 @@
 
   TRACE("%s Will analyze window 0x%x", me(), (int)((XMapEvent *)event)->window);
   // Check if this window is the soulmate we are looking for
-  Display *display = QPaintDevice::x11AppDisplay();
+  Display *display = TQPaintDevice::x11AppDisplay();
   Window w = XmuClientWindow(display, ((XMapEvent *) event)->window);
   if (!isNormalWindow(display, w)) return FALSE;
   if (!analyzeWindow(display, w, mPid, 
-         QFileInfo(mProgName[0]).fileName().latin1())) return FALSE;
+         TQFileInfo(mProgName[0]).fileName().latin1())) return FALSE;
   // All right. Lets dock this baby
   setDockedWindow(w);
   return true;
@@ -727,7 +727,7 @@
 
 void QTrayLabel::propertyChangeEvent(Atom property)
 {
-  Display *display = QPaintDevice::x11AppDisplay();
+  Display *display = TQPaintDevice::x11AppDisplay();
   static Atom WM_NAME = XInternAtom(display, "WM_NAME", True);
   static Atom WM_ICON = XInternAtom(display, "WM_ICON", True);
   static Atom WM_STATE = XInternAtom(display, "WM_STATE", True);
@@ -764,7 +764,7 @@
 }
 
 // Session Management
-bool QTrayLabel::saveState(QSettings &settings)
+bool QTrayLabel::saveState(TQSettings &settings)
 {
   TRACE("%s saving state", me());
   settings.writeEntry("/Application", mProgName.join(" "));
@@ -776,7 +776,7 @@
   return true;
 }
 
-bool QTrayLabel::restoreState(QSettings &settings)
+bool QTrayLabel::restoreState(TQSettings &settings)
 {
   TRACE("%s restoring state", me());
   mCustomIcon = settings.readEntry("/CustomIcon");
@@ -795,7 +795,7 @@
    * the application really shows itself up before we do a scan (the reason
    * why we have 2s
    */
-   if (!mPid) QTimer::singleShot(2000, this, SLOT(scanClients()));
+   if (!mPid) TQTimer::singleShot(2000, this, SLOT(scanClients()));
 
    return true;
 }
--- ./src/qtraylabel.h	2005-02-09 04:34:06.000000000 +0100
+++ ./src/qtraylabel.h	2018-05-05 20:36:19.634317087 +0200
@@ -22,15 +22,15 @@
 #ifndef _QTRAYLABEL_H
 #define _QTRAYLABEL_H
 
-#include <qlabel.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qpixmap.h>
-#include <qtimer.h>
-#include <qtextstream.h>
-#include <qsettings.h>
-#include <qevent.h>
-#include <qsize.h>
+#include <tqt3/ntqlabel.h>
+#include <tqt3/ntqstring.h>
+#include <tqt3/ntqstringlist.h>
+#include <tqt3/ntqpixmap.h>
+#include <tqt3/ntqtimer.h>
+#include <tqt3/ntqtextstream.h>
+#include <tqt3/ntqsettings.h>
+#include <tqt3/ntqevent.h>
+#include <tqt3/ntqsize.h>
 
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
@@ -39,17 +39,17 @@
 #include <sys/types.h>
 #include <unistd.h>
 
-class QMouseEvent;
-class QDragEnterEvent;
-class QPoint;
+class TQMouseEvent;
+class TQDragEnterEvent;
+class TQPoint;
 
-class QTrayLabel : public QLabel
+class QTrayLabel : public TQLabel
 {
-  Q_OBJECT
+  TQ_OBJECT
 
 public:
-  QTrayLabel(Window w, QWidget* p = 0, const QString& text = QString::null);
-  QTrayLabel(const QStringList& argv, pid_t pid, QWidget* parent = 0);
+  QTrayLabel(Window w, TQWidget* p = 0, const TQString& text = TQString::null);
+  QTrayLabel(const TQStringList& argv, pid_t pid, TQWidget* parent = 0);
   virtual ~QTrayLabel();
 
   // Accessors
@@ -59,18 +59,18 @@
   bool isWithdrawn(void) const { return mWithdrawn; }
   bool isDockWhenMinimized(void) const { return mDockWhenMinimized; }
 
-  QString appName(void) const { return mProgName[0]; }
-  virtual void setAppName(const QString& prog) { mProgName[0] = prog; }
-  QString appClass(void) const { return mClass; }
-  QString appTitle(void) const { return mTitle; }
-  QPixmap appIcon(void) const  { return mAppIcon;  }
+  TQString appName(void) const { return mProgName[0]; }
+  virtual void setAppName(const TQString& prog) { mProgName[0] = prog; }
+  TQString appClass(void) const { return mClass; }
+  TQString appTitle(void) const { return mTitle; }
+  TQPixmap appIcon(void) const  { return mAppIcon;  }
 
   // Pass on all events through this interface
   bool x11EventFilter(XEvent * event);
 
   // Session Management
-  virtual bool saveState(QSettings& settings);
-  virtual bool restoreState(QSettings& settings);
+  virtual bool saveState(TQSettings& settings);
+  virtual bool restoreState(TQSettings& settings);
 
 public slots:
   void dock(void);              // puts us in the system tray
@@ -80,7 +80,7 @@
   void toggleShow(void)         // convenience slot
         { if (mWithdrawn) map(); else withdraw(); }
   void close(void);             // close the docked window
-  void setTrayIcon(const QString& icon);  // sets custom icon
+  void setTrayIcon(const TQString& icon);  // sets custom icon
 
   // and some property setters
   virtual void setSkipTaskbar(bool skip);  // skip the taskbar
@@ -91,7 +91,7 @@
   void scanClients(void);       // scans existing client connections
  
 signals:
-  void clicked(const ButtonState&, const QPoint&);
+  void clicked(const ButtonState&, const TQPoint&);
   void docked(QTrayLabel *);   // emitted when we get docked
   void docked(void);           // emitted when we get docked
   void undocked(QTrayLabel *); // emitted when we get undocked
@@ -101,8 +101,8 @@
 
 protected:
   // reimplement these event handlers in subclass as needed
-  virtual void mouseReleaseEvent(QMouseEvent *event);
-  virtual void dragEnterEvent(QDragEnterEvent *event);
+  virtual void mouseReleaseEvent(TQMouseEvent *event);
+  virtual void dragEnterEvent(TQDragEnterEvent *event);
   
   // the events that follow are events of the docked window (NOT QTrayLabel)
   virtual void updateIcon(void);   // updates the icon
@@ -139,19 +139,19 @@
 
   // Member variables
   long mDesktop;      // desktop on which the window is being shown
-  QLabel *mBalloon;		// tooltip text simulator
-  QString mCustomIcon;		// CustomIcon of the docked application
+  TQLabel *mBalloon;		// tooltip text simulator
+  TQString mCustomIcon;		// CustomIcon of the docked application
   Window mDockedWindow;	// the window which is being docked
 	int mBalloonTimeout;
   bool mDocked, mWithdrawn, mSkippingTaskbar;
   bool mDockWhenMinimized;
 
-  QString mTitle, mClass;	// Title and hint of mDockedWindow
-  QPixmap mAppIcon;       // The current app icon (may not be same as pixmap())
+  TQString mTitle, mClass;	// Title and hint of mDockedWindow
+  TQPixmap mAppIcon;       // The current app icon (may not be same as pixmap())
   XSizeHints mSizeHint;		// SizeHint of mDockedWindow
 
-  QTimer mRealityMonitor;  // Helps us sync up with reality
-  QStringList mProgName;   // The program whose window we are docking
+  TQTimer mRealityMonitor;  // Helps us sync up with reality
+  TQStringList mProgName;   // The program whose window we are docking
   pid_t mPid;              // The PID of program whose window we are docking
 
   Window mSysTray;    // System tray window id
--- ./src/trace.cpp	2004-11-08 08:13:15.000000000 +0100
+++ ./src/trace.cpp	2018-05-05 20:36:19.638317087 +0200
@@ -1,7 +1,7 @@
 #ifdef ENABLE_TRACING
-#include <qapplication.h>
-#include <qtextedit.h>
-#include <qfile.h>
+#include <tqt3/ntqapplication.h>
+#include <tqt3/ntqtextedit.h>
+#include <tqt3/ntqfile.h>
 #include <stdio.h>
 
 static QTextEdit *tracer = NULL;
@@ -20,7 +20,7 @@
 {
   if (tracer) return;     // de javu
   tracer = new QTextEdit();
-  tracer->setTextFormat(Qt::LogText);
+  tracer->setTextFormat(TQt::LogText);
   tracer->setMaxLogLines(10000);
   tracer->resize(750, 300);
   qInstallMsgHandler(TRACER);
@@ -33,10 +33,10 @@
 
 void DUMP_TRACE(const char *f)
 {
-  QFile file(f); // Write the text to a file
+  TQFile file(f); // Write the text to a file
   if (file.open(IO_WriteOnly))
   {
-    QTextStream stream(&file);
+    TQTextStream stream(&file);
     stream << tracer->text();
   }
 }
--- ./src/trace.h	2004-11-16 05:02:50.000000000 +0100
+++ ./src/trace.h	2018-05-05 20:36:19.638317087 +0200
@@ -12,7 +12,7 @@
    * WARNING: fmt has to be a static string
    */
   #define TRACE(fmt,args...) \
-        do { qDebug("~%s - \t" fmt, __PRETTY_FUNCTION__, ##args); } while (0)
+        do { tqDebug("~%s - \t" fmt, __PRETTY_FUNCTION__, ##args); } while (0)
 
   #define SHOW_TRACE_TEXT "Show Trace"
   
@@ -21,7 +21,7 @@
   #define INIT_TRACE()
   #define TRACE(fmt, ...)
   #define SHOW_TRACE()
-  #define SHOW_TRACE_TEXT QString::null
+  #define SHOW_TRACE_TEXT TQString::null
   #define DUMP_TRACE(file)
 
 #endif  // ENABLE_TRACING
--- ./src/traylabelmgr.cpp	2005-02-09 04:38:43.000000000 +0100
+++ ./src/traylabelmgr.cpp	2018-05-05 20:36:19.638317087 +0200
@@ -19,15 +19,15 @@
 
 // $Id: traylabelmgr.cpp,v 1.10 2005/02/09 03:38:43 cs19713 Exp $
 
-#include <qdir.h>
-#include <qapplication.h>
-#include <qmessagebox.h>
-#include <qtimer.h>
-#include <qfile.h>
-#include <qaction.h>
-#include <qpopupmenu.h>
-#include <qtextstream.h>
-#include <qfiledialog.h>
+#include <tqt3/ntqdir.h>
+#include <tqt3/ntqapplication.h>
+#include <tqt3/ntqmessagebox.h>
+#include <tqt3/ntqtimer.h>
+#include <tqt3/ntqfile.h>
+#include <tqt3/ntqaction.h>
+#include <tqt3/ntqpopupmenu.h>
+#include <tqt3/ntqtextstream.h>
+#include <tqt3/ntqfiledialog.h>
 
 #include "trace.h"
 #include "traylabelmgr.h"
@@ -50,7 +50,7 @@
 TrayLabelMgr::TrayLabelMgr() : mReady(false), mHiddenLabelsCount(0)
 {
   // Set ourselves up to be called from the application loop
-  QTimer::singleShot(0, this, SLOT(startup()));
+  TQTimer::singleShot(0, this, SLOT(startup()));
 }
 
 TrayLabelMgr::~TrayLabelMgr()
@@ -60,11 +60,11 @@
 
 void TrayLabelMgr::about(void)
 {
-  if (QMessageBox::information(NULL, tr("About KDocker"),
+  if (TQMessageBox::information(NULL, tr("About KDocker"),
         tr("Bugs/wishes to Girish Ramakrishnan (gramakri@uiuc.edu)\n"
            "English translation by Girish (gramakri@uiuc.edu)\n\n"
            "http://kdocker.sourceforge.net for updates"),
-        QString::null, SHOW_TRACE_TEXT) == 1) SHOW_TRACE();
+        TQString::null, SHOW_TRACE_TEXT) == 1) SHOW_TRACE();
 }
 
 void TrayLabelMgr::startup(void)
@@ -76,25 +76,25 @@
    * stdout is a tty) OR if we are getting restored, wait for WAIT_TIME until
    * the system tray shows up (before informing the user)
    */
-  static bool do_wait = !isatty(fileno(stdout)) || qApp->isSessionRestored();
+  static bool do_wait = !isatty(fileno(stdout)) || tqApp->isSessionRestored();
 
-  SysTrayState state = sysTrayStatus(QPaintDevice::x11AppDisplay());
+  SysTrayState state = sysTrayStatus(TQPaintDevice::x11AppDisplay());
 
   if (state != SysTrayPresent)
   {
     if (wait_time-- > 0 && do_wait)
     {
       TRACE("Will check sys tray status after 1 second");
-      QTimer::singleShot(1000, this, SLOT(startup()));
+      TQTimer::singleShot(1000, this, SLOT(startup()));
       return;
     }
 
-    if (QMessageBox::warning(NULL, tr("KDocker"), 
+    if (TQMessageBox::warning(NULL, tr("KDocker"), 
           tr(state == SysTrayAbsent ? "No system tray found"
                                     : "System tray appears to be hidden"), 
-          QMessageBox::Abort, QMessageBox::Ignore) == QMessageBox::Abort)
+          TQMessageBox::Abort, TQMessageBox::Ignore) == TQMessageBox::Abort)
     {
-        qApp->quit();
+        tqApp->quit();
         return;
     }
   }
@@ -102,21 +102,21 @@
   // Things are fine or user with OK with the state of system tray
   mReady = true;
   bool ok = false;
-  if (qApp->isSessionRestored()) ok = restoreSession(qApp->sessionId());
-  else ok = processCommand(qApp->argc(), qApp->argv());
+  if (tqApp->isSessionRestored()) ok = restoreSession(tqApp->sessionId());
+  else ok = processCommand(tqApp->argc(), tqApp->argv());
   // Process the request Q from previous instances
 
   TRACE("Request queue has %i requests", mRequestQ.count());
   for(unsigned i=0; i < mRequestQ.count(); i++)
     ok |= processCommand(mRequestQ[i]);
-  if (!ok) qApp->quit();
+  if (!ok) tqApp->quit();
 }
 
 // Initialize a QTrayLabel after its creation
 void TrayLabelMgr::manageTrayLabel(QTrayLabel *t)
 {
-  connect(t, SIGNAL(destroyed(QObject *)), 
-          this, SLOT(trayLabelDestroyed(QObject *)));
+  connect(t, SIGNAL(destroyed(TQObject *)), 
+          this, SLOT(trayLabelDestroyed(TQObject *)));
   connect(t, SIGNAL(undocked(QTrayLabel *)), t, SLOT(deleteLater()));
 
   // All QTrayLabels will emit this signal. We just need one of them
@@ -140,7 +140,7 @@
 void TrayLabelMgr::undockAll()
 {
   TRACE("Number of tray labels = %i", mTrayLabels.count());
-  QPtrListIterator<QTrayLabel> it(mTrayLabels);
+  TQPtrListIterator<QTrayLabel> it(mTrayLabels);
   QTrayLabel *t;
   while ((t = it.current()) != 0)
   {
@@ -150,7 +150,7 @@
 }
 
 // Process the command line
-bool TrayLabelMgr::processCommand(const QStringList& args)
+bool TrayLabelMgr::processCommand(const TQStringList& args)
 {
   if (!mReady)
   {
@@ -184,7 +184,7 @@
   if (qstrcmp(argv[1], "-session") == 0)
   {
     TRACE("Restoring session %s (new instance request)", argv[2]);
-    return restoreSession(QString(argv[2]));
+    return restoreSession(TQString(argv[2]));
   }
 
   int option;
@@ -204,7 +204,7 @@
       case '?':
         return false;
       case 'a':
-        qDebug(tr("Girish Ramakrishnan (gramakri@uiuc.edu)"));
+        tqDebug(tr("Girish Ramakrishnan (gramakri@uiuc.edu)"));
         return false;
       case 'b':
         check_normality = false;
@@ -216,7 +216,7 @@
         enable_sm = true;
         break;
       case 'f':
-        w = activeWindow(QPaintDevice::x11AppDisplay());
+        w = activeWindow(TQPaintDevice::x11AppDisplay());
         TRACE("Active window is %i", (unsigned) w);
         break;
       case 'i':
@@ -245,9 +245,9 @@
           sscanf(optarg, "%x", (unsigned *) &w);
         else
           w = (Window) atoi(optarg);
-          if (!isValidWindowId(QPaintDevice::x11AppDisplay(), w))
+          if (!isValidWindowId(TQPaintDevice::x11AppDisplay(), w))
           {
-            qDebug("Window 0x%x invalid", (unsigned) w);
+            tqDebug("Window 0x%x invalid", (unsigned) w);
             return false;
           }
         break;
@@ -279,28 +279,28 @@
 {
   if (w == None)
   {
-    qDebug(tr("Select the application/window to dock with button1."));
-    qDebug(tr("Click any other button to abort\n"));
+    tqDebug(tr("Select the application/window to dock with button1."));
+    tqDebug(tr("Click any other button to abort\n"));
 
     const char *err = NULL;
  
-    if ((w = selectWindow(QPaintDevice::x11AppDisplay(), &err)) == None)
+    if ((w = selectWindow(TQPaintDevice::x11AppDisplay(), &err)) == None)
     {
-      if (err) QMessageBox::critical(NULL, tr("KDocker"), tr(err));
+      if (err) TQMessageBox::critical(NULL, tr("KDocker"), tr(err));
       return NULL;
     }
   }
 
-  if (checkNormality && !isNormalWindow(QPaintDevice::x11AppDisplay(), w))
+  if (checkNormality && !isNormalWindow(TQPaintDevice::x11AppDisplay(), w))
   {
     /*
      * Abort should be the only option here really. "Ignore" is provided here
      * for the curious user who wants to screw himself very badly
      */
-    if (QMessageBox::warning(NULL, tr("KDocker"),
+    if (TQMessageBox::warning(NULL, tr("KDocker"),
           tr("The window you are attempting to dock does not seem to be a"
-              " normal window."), QMessageBox::Abort,
-          QMessageBox::Ignore) == QMessageBox::Abort)
+              " normal window."), TQMessageBox::Abort,
+          TQMessageBox::Ignore) == TQMessageBox::Abort)
       return NULL;
   }
 
@@ -308,7 +308,7 @@
 
   TRACE("0x%x is not docked", (unsigned) w);
 
-  QMessageBox::message(tr("KDocker"),
+  TQMessageBox::message(tr("KDocker"),
     tr("This window is already docked.\n"
        "Click on system tray icon to toggle docking."));
   return NULL;
@@ -316,7 +316,7 @@
 
 bool TrayLabelMgr::isWindowDocked(Window w)
 {
-  QPtrListIterator<QTrayLabel> it(mTrayLabels);
+  TQPtrListIterator<QTrayLabel> it(mTrayLabels);
   for(QTrayLabel *t; (t = it.current()); ++it)
     if (t->dockedWindow() == w) return true;
  
@@ -350,7 +350,7 @@
 
     if (execvp(argv[0], argv) == -1)
     {
-      qDebug(tr("Failed to exec [%1]: %2").arg(argv[0]).arg(strerror(errno)));
+      tqDebug(tr("Failed to exec [%1]: %2").arg(argv[0]).arg(strerror(errno)));
       ::exit(0);                // will become a zombie in some systems :(
       return NULL;
     }
@@ -358,17 +358,17 @@
 
   if (pid == -1)
   {
-    QMessageBox::critical(NULL, "KDocker", 
+    TQMessageBox::critical(NULL, "KDocker", 
                           tr("Failed to fork: %1").arg(strerror(errno)));
     return NULL;
   }
 
-  QStringList cmd_line;
+  TQStringList cmd_line;
   for(int i=0;;i++)
     if (argv[i]) cmd_line << argv[i]; else break;
 
   QTrayLabel *label = new CustomTrayLabel(cmd_line, pid);
-  qApp->syncX();
+  tqApp->syncX();
   write(filedes[1], buf, sizeof(buf));
   close(filedes[0]);
   close(filedes[1]);
@@ -381,7 +381,7 @@
  */
 int TrayLabelMgr::hiddenLabelsCount(void) const
 {
-  QPtrListIterator<QTrayLabel> it(mTrayLabels);
+  TQPtrListIterator<QTrayLabel> it(mTrayLabels);
   int count = 0;
   for(QTrayLabel *t; (t=it.current()); ++it)
     if (t->dockedWindow() == None) ++count;
@@ -394,11 +394,11 @@
   return mTrayLabels.count() - hiddenLabelsCount();
 }
 
-void TrayLabelMgr::trayLabelDestroyed(QObject *t)
+void TrayLabelMgr::trayLabelDestroyed(TQObject *t)
 {
-  bool reconnect  = ((QObject *)mTrayLabels.getLast() == t);
+  bool reconnect  = ((TQObject *)mTrayLabels.getLast() == t);
   mTrayLabels.removeRef((QTrayLabel*)t);
-  if (mTrayLabels.isEmpty()) qApp->quit();
+  if (mTrayLabels.isEmpty()) tqApp->quit();
   else if (reconnect) 
   {
     TRACE("Reconnecting");
@@ -415,17 +415,17 @@
    * to not pop up a box when the user is logging out. So, we set ourselves
    * up to notify user after 3 seconds.
    */
-  QTimer::singleShot(3000, this, SLOT(notifySysTrayAbsence()));
+  TQTimer::singleShot(3000, this, SLOT(notifySysTrayAbsence()));
 }
 
 void TrayLabelMgr::notifySysTrayAbsence()
 {
-  SysTrayState state = sysTrayStatus(QPaintDevice::x11AppDisplay());
+  SysTrayState state = sysTrayStatus(TQPaintDevice::x11AppDisplay());
 
   if (state == SysTrayPresent) 
     return; // So sweet of the systray to come back so soon
 
-  if (QMessageBox::warning(NULL, tr("KDocker"), 
+  if (TQMessageBox::warning(NULL, tr("KDocker"), 
                            tr("The System tray was hidden or removed"),
                            tr("Undock All"), tr("Ignore")) == 0)
     undockAll();
@@ -434,28 +434,28 @@
 /*
  * Session Management. Always return "true". Atleast, for now
  */
-bool TrayLabelMgr::restoreSession(const QString& sessionId)
+bool TrayLabelMgr::restoreSession(const TQString& sessionId)
 {
-  QString session_file = "kdocker_" + sessionId;
+  TQString session_file = "kdocker_" + sessionId;
 
-  QSettings settings;
-  settings.beginGroup(QString("/" + session_file));
+  TQSettings settings;
+  settings.beginGroup(TQString("/" + session_file));
 
   for(int i = 1;; i++)
   {
-    settings.beginGroup(QString("/Instance") + QString("").setNum(i));
-    QString pname = settings.readEntry("/Application");
+    settings.beginGroup(TQString("/Instance") + TQString("").setNum(i));
+    TQString pname = settings.readEntry("/Application");
     TRACE("Restoring Application[%s]", pname.latin1());
     if (pname.isEmpty()) break;
     if (settings.readBoolEntry("/LaunchOnStartup"))
     {
-      QStringList args("kdocker");
-      args += QStringList::split(" ", pname);
+      TQStringList args("kdocker");
+      args += TQStringList::split(" ", pname);
       TRACE("Triggering AutoLaunch");
       if (!processCommand(args)) continue;
     }
     else 
-      manageTrayLabel(new CustomTrayLabel(QStringList::split(" ", pname), 0));
+      manageTrayLabel(new CustomTrayLabel(TQStringList::split(" ", pname), 0));
 
     QTrayLabel *tl = mTrayLabels.getFirst(); // the one that was created above
     tl->restoreState(settings);
@@ -465,32 +465,32 @@
   return true;
 }
 
-QString TrayLabelMgr::saveSession(void)
+TQString TrayLabelMgr::saveSession(void)
 {
-  QString session_file = "kdocker_" + qApp->sessionId();
+  TQString session_file = "kdocker_" + tqApp->sessionId();
 
-  QSettings settings;
-  settings.beginGroup(QString("/" + session_file));
+  TQSettings settings;
+  settings.beginGroup(TQString("/" + session_file));
 
   TRACE("Saving session");
 
-  QPtrListIterator <QTrayLabel> it(mTrayLabels);
+  TQPtrListIterator <QTrayLabel> it(mTrayLabels);
   QTrayLabel *t;
   int i = 1;
   while ((t = it.current()) != 0)
   {
     ++it;
     TRACE("Saving instance %i", i);
-    settings.beginGroup(QString("/Instance") + QString("").setNum(i));
+    settings.beginGroup(TQString("/Instance") + TQString("").setNum(i));
     bool ok = t->saveState(settings);
     settings.endGroup();
     if (ok) ++i; else TRACE("Saving of instance %i was skipped", i);
   }
 
   // Aaaaaaaaaaaaaa.........
-  settings.removeEntry(QString("/Instance") + QString("").setNum(i));
+  settings.removeEntry(TQString("/Instance") + TQString("").setNum(i));
 
-  return QDir::homeDirPath() + "/.qt/" + session_file + "rc";
+  return TQDir::homeDirPath() + "/.qt/" + session_file + "rc";
 }
 
 /*
@@ -505,7 +505,7 @@
  */
 bool TrayLabelMgr::x11EventFilter(XEvent *ev)
 {
-  QPtrListIterator<QTrayLabel> it(mTrayLabels);
+  TQPtrListIterator<QTrayLabel> it(mTrayLabels);
   bool ret = false;
   
   // We pass on the event to all tray labels
--- ./src/traylabelmgr.h	2005-01-07 13:16:07.000000000 +0100
+++ ./src/traylabelmgr.h	2018-05-05 20:36:19.638317087 +0200
@@ -21,29 +21,29 @@
 #ifndef _TRAYLABELMGR_H
 #define _TRAYLABELMGR_H
 
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qvaluelist.h>
-#include <qstringlist.h>
+#include <tqt3/ntqobject.h>
+#include <tqt3/ntqptrlist.h>
+#include <tqt3/ntqvaluelist.h>
+#include <tqt3/ntqstringlist.h>
 
 #include "customtraylabel.h"
 
 class CustomTrayLabel;
 
-class TrayLabelMgr : public QObject
+class TrayLabelMgr : public TQObject
 {
-  Q_OBJECT
+  TQ_OBJECT
 
 public:
   static TrayLabelMgr* instance();
-  static QString options(void) { return QString(mOptionString); }
+  static TQString options(void) { return TQString(mOptionString); }
 
   ~TrayLabelMgr();
 
-  QString saveSession();
+  TQString saveSession();
 
   bool x11EventFilter(XEvent *);
-  bool processCommand(const QStringList& argv);
+  bool processCommand(const TQStringList& argv);
   int  hiddenLabelsCount(void) const;
   int  dockedLabelsCount(void) const;
   bool isWindowDocked(Window w);
@@ -55,7 +55,7 @@
 
 private slots:
   void startup();
-  void trayLabelDestroyed(QObject *);
+  void trayLabelDestroyed(TQObject *);
   void sysTrayDestroyed(void);
   void notifySysTrayAbsence();
 
@@ -63,13 +63,13 @@
   TrayLabelMgr();
   bool processCommand(int argc, char** argv);
   void manageTrayLabel(QTrayLabel *l);
-  bool restoreSession(const QString& sessionId);
+  bool restoreSession(const TQString& sessionId);
   
   QTrayLabel *dockApplication(char *argv[]);
   QTrayLabel *selectAndDock(Window w = None, bool checkNormality = true);
 
-  QPtrList<QTrayLabel> mTrayLabels;
-  QValueList<QStringList> mRequestQ;
+  TQPtrList<QTrayLabel> mTrayLabels;
+  TQValueList<TQStringList> mRequestQ;
   bool mReady;
   int mHiddenLabelsCount;
   
--- ./src/util.cpp	2005-01-29 10:56:08.000000000 +0100
+++ ./src/util.cpp	2018-05-05 20:36:19.638317087 +0200
@@ -158,7 +158,7 @@
  * The Grand Window Analyzer. Checks if window w has a expected pid of epid
  * or a expected name of ename
  */
-bool analyzeWindow(Display *display, Window w, pid_t epid, const QString &ename)
+bool analyzeWindow(Display *display, Window w, pid_t epid, const TQString &ename)
 {
   XClassHint ch;
   pid_t apid = pid(display, w);
@@ -177,12 +177,12 @@
   // lets try the program name
   if (XGetClassHint(display, w, &ch))
   {
-    if (QString(ch.res_name).find(ename, 0, FALSE) != -1)
+    if (TQString(ch.res_name).find(ename, 0, FALSE) != -1)
     {
       TRACE("ResName [%s] matched", ch.res_name);
       this_is_our_man = true;
     }
-    else if (QString(ch.res_class).find(ename, 0, FALSE) != -1)
+    else if (TQString(ch.res_class).find(ename, 0, FALSE) != -1)
     {
       TRACE("ResClass [%s] matched", ch.res_class);
       this_is_our_man = true;
@@ -192,7 +192,7 @@
       // sheer desperation
       char *wm_name = NULL;
       XFetchName(display, w, &wm_name);
-      if (wm_name && (QString(wm_name).find(ename, 0, FALSE) != -1))
+      if (wm_name && (TQString(wm_name).find(ename, 0, FALSE) != -1))
       {
         TRACE("WM_NAME [%s] matched", wm_name);
         this_is_our_man = true;
--- ./src/util.h	2004-11-19 16:44:51.000000000 +0100
+++ ./src/util.h	2018-05-05 20:36:19.638317087 +0200
@@ -22,7 +22,7 @@
 #ifndef _UTIL_H
 #define _UTIL_H
 
-#include <qstring.h>
+#include <tqt3/ntqstring.h>
 #include <X11/Xlib.h>
 #include <sys/types.h>
 
@@ -32,7 +32,7 @@
 extern void sendMessage(Display *display, Window to, Window w, char *type, 
                        int format, long mask, void *data, int size);
 extern bool analyzeWindow(Display *display, Window w, pid_t epid, 
-                          const QString &ename);
+                          const TQString &ename);
 extern Window activeWindow(Display *display);
 extern Window selectWindow(Display *display, const char **err = 0);
 extern void subscribe(Display *display, Window w, long mask, bool set);
