From 031143c754a9709533c99d796ba563ad59c9178f Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Wed, 13 Mar 2024 10:33:25 +0900 Subject: [PATCH] Replace Qt with TQt Signed-off-by: Michele Calgaro (cherry picked from commit 0a2a45331d762f6e555e2d14c093f35822f868ec) --- .../ConduitProgrammingTutorial/index.tex | 12 ++++++------ Documentation/HOWTO-CODE.txt | 2 +- Documentation/README-3.2.1+ | 18 +++++------------- Mainpage.dox | 2 +- TODO | 2 +- conduits/docconduit/bmkSpecification.txt | 2 +- conduits/sysinfoconduit/Template.html | 4 ++-- conduits/sysinfoconduit/Template.txt | 4 ++-- conduits/sysinfoconduit/sysinfo-conduit.cpp | 16 ++++++++-------- kpilot/pilotDaemon.h | 2 +- lib/pilotDateEntry.h | 2 +- lib/pilotTodoEntry.h | 2 +- 12 files changed, 30 insertions(+), 38 deletions(-) diff --git a/Documentation/ConduitProgrammingTutorial/index.tex b/Documentation/ConduitProgrammingTutorial/index.tex index d334c15..e852eeb 100644 --- a/Documentation/ConduitProgrammingTutorial/index.tex +++ b/Documentation/ConduitProgrammingTutorial/index.tex @@ -371,8 +371,8 @@ To provide a consistent experience to KPilot users, there already exists a class \class{ConduitConfig} which is a subclass of \class{KDialog}. This dialog does most of the basic work for you. -\subsection{The dialog template, using QT Designer} -Of course, first we need to have a dialog template in the form of a QT +\subsection{The dialog template, using TQt Designer} +Of course, first we need to have a dialog template in the form of a TQt Designer file (which has an extension .ui). Start up \file{designer} and create a new widget (no dialogbox, i.e. no OK or cancel buttons, these will be added automatically). The dialogbox should contain a QTabWidget, even if you only need one tab. A second tab "About" will be added more or less automatically by the conduit listing the copyright and the authors of your conduit. A typical example of the coknduit setup widget dialog is shown in the following screenshot: \includegraphics[width=14cm]{pictures/ProxyTab} @@ -437,7 +437,7 @@ The first two lines create an instance of our dialog template and add it as the tab widget to the dialog. Since we will have to set and read the values of the controls in that tab widget, we need to store a pointer to the instance in the variable \code{fConfigWidget} which is of the same type -(\code{MALWidget}) we assigned to our dialog template in QT Designer. The +(\code{MALWidget}) we assigned to our dialog template in TQt Designer. The third line of code adds the about page (which is created by the factory, see last section) to the tab widget, while the last two line just adjust the size of the dialog box and are not always needed. @@ -453,7 +453,7 @@ char*} variable of the conduit factory class), and then we can use the methods \item \code{fConfig->readEntry("entryname", \em{defaultstring})} \item \code{fConfig->readBoolEntry("entryname", \em{defaultBoolValue})} \end{itemize} -to retrieve the settings from the configuration file. We then use the methods of the QT and KDE widgets to assign the text or value to the controls: +to retrieve the settings from the configuration file. We then use the methods of the TQt and TDE widgets to assign the text or value to the controls: {\footnotesize\begin{verbatim} /* virtual */ void MALWidgetSetup::readSettings() @@ -945,7 +945,7 @@ Another issue is how to propagate log messages from the external library to KPil emit logMessage(i18n("My own log message")); \end{verbatim} -The problem with these slots is that they are Qt-specific, while most libraries are written in C, and expect a hook function that will be called whenever a message needs to be written out. Unfortunately you cannot pass a member of your SyncAction-derived class, either, so the way out is to store a pointer to the current conduit instance (only one will be active at any time, anyway) in a static variable, and call the member method from this pointer: +The problem with these slots is that they are TQt-specific, while most libraries are written in C, and expect a hook function that will be called whenever a message needs to be written out. Unfortunately you cannot pass a member of your SyncAction-derived class, either, so the way out is to store a pointer to the current conduit instance (only one will be active at any time, anyway) in a static variable, and call the member method from this pointer: {\footnotesize \begin{verbatim} @@ -1632,7 +1632,7 @@ This is also varpoware > 5) How about responsiveness of the front end? I realized there are no -> QTimer::singleShot to let qt process the queue between syncing two records. +> TQTimer::singleShot to let tqt process the queue between syncing two records. > Or did I miss something? currenlty this is true. While we aim for ASYNC the syncing is currently diff --git a/Documentation/HOWTO-CODE.txt b/Documentation/HOWTO-CODE.txt index 99c093c..f28a319 100644 --- a/Documentation/HOWTO-CODE.txt +++ b/Documentation/HOWTO-CODE.txt @@ -58,7 +58,7 @@ Header Files ============ One thing we *do* need to agree on is how to protect -.h files from double-inclusion. In Qt and KDE there's: +.h files from double-inclusion. In TQt and TDE there's: #ifndef QTCLASS_H #ifndef _KDECLASS_H diff --git a/Documentation/README-3.2.1+ b/Documentation/README-3.2.1+ index ca9a1cc..611c5b9 100644 --- a/Documentation/README-3.2.1+ +++ b/Documentation/README-3.2.1+ @@ -48,8 +48,7 @@ Current features include: INSTALLATION ============ - KPilot 4.0.0 _REQUIRES_ KDE 2 (http://www.kde.org/) and -v2.2.0 or better of the QT widget set (http://www.troll.no/). + KPilot 4.0.0 _REQUIRES_ TDE and the TQt library KPilot also _REQUIRES_ pilot-link, which is not distributed with all the linux distro's out there. You may have to go looking. @@ -60,11 +59,6 @@ all the linux distro's out there. You may have to go looking. make install from the kpilot-4.0.0 directory should configure and install KPilot. -If you are using KPanel (the panel that comes with KDE) restarting it -should insert an icon into the Utilities submenu. If you are not using -KPanel, the executable is named kpilot and will be installed in either -/opt/kde/bin/ or /usr/local/kde/bin (whichever is appropriate for your -system). In some cases KPilot will not compile due to configuration differences; in this case a less simple @@ -79,14 +73,12 @@ should do the trick. If this fails as well, you can subscribe to the KPilot mailing list and state the nature of the failure there. *NOTE* that KPilot makes assumptions about where pilot-link and -the Qt libraries are; in particular it is important to set TQTDIR correctly -(to the Qt 1.44 directories) when compiling KPilot. On many systems the -command to do this will be +the TQt libraries are; in particular it is important to set TQTDIR correctly +when compiling KPilot. On many systems the command to do this will be - export TQTDIR=/usr/lib/qt-2* + export TQTDIR=/usr/lib/tqt -but your mileage may vary. RedHat 6.2 systems ship with Qt 1.45 and Qt 2.1, -in which case it is doubly important to set TQTDIR properly. +but your mileage may vary. USING THE SOFTWARE ================== diff --git a/Mainpage.dox b/Mainpage.dox index 7e0b086..428e542 100644 --- a/Mainpage.dox +++ b/Mainpage.dox @@ -14,7 +14,7 @@ with the handheld. The lib/ directory holds the base library for KPilot. This boils down to a bunch of wrappers for pilot-link classes (not using p-l's C++ code because that isn't -Qt-ish) and a few classes that do interesting things: +TQt-ish) and a few classes that do interesting things: KPilotDeviceLink for managing the device connection, and SyncAction for doing stuff during a sync. diff --git a/TODO b/TODO index 15dc053..dad9000 100644 --- a/TODO +++ b/TODO @@ -141,7 +141,7 @@ FINISHED TODO jobs RESOLUTION: Implemented the InternalEditorAction that syncs these modifications +(19a)Implement the internal editor sync +(19a)When syncing, also backup the databases (if option is set) -+(19b)Add all codecs that are supported by Qt, automatically fill the ++(19b)Add all codecs that are supported by TQt, automatically fill the combobox in the config dialog. Change the combobox to an editable Combobox so that the user can also give other encodings (if he installed the corresponding plugins). diff --git a/conduits/docconduit/bmkSpecification.txt b/conduits/docconduit/bmkSpecification.txt index f8a68d9..a67b533 100644 --- a/conduits/docconduit/bmkSpecification.txt +++ b/conduits/docconduit/bmkSpecification.txt @@ -24,7 +24,7 @@ RegExps, while the PalmDoc conduit uses the QRegExp, which have some slight differences (especially concerning the ^ and $ patterns as well as backreferences). So if you used MakeDocJ, the .bmk file syntax will be quite familiar, but you will still -have to adapt your bookmark files for Qt regular expressions +have to adapt your bookmark files for TQt regular expressions instead of Java regular expressions diff --git a/conduits/sysinfoconduit/Template.html b/conduits/sysinfoconduit/Template.html index 56aa328..057617f 100644 --- a/conduits/sysinfoconduit/Template.html +++ b/conduits/sysinfoconduit/Template.html @@ -147,8 +147,8 @@ Operating System:#os# Hostname:#hostname# - TQt Version:#qt# - KDE Libraries Version:#kde# + TQt Version:#tqt# + TDE Libraries Version:#tde# KPilot Version:#kpilot# Pilot-Link Version:#pilotlink# diff --git a/conduits/sysinfoconduit/Template.txt b/conduits/sysinfoconduit/Template.txt index 8796e44..4db133a 100644 --- a/conduits/sysinfoconduit/Template.txt +++ b/conduits/sysinfoconduit/Template.txt @@ -55,8 +55,8 @@ KPilot System Information Page -) Version Information (Desktop) Operating System: #os# Hostname: #hostname# - Qt Version: #qt# - KDE Version: #kde# + TQt Version: #tqt# + TDE Version: #tde# KPilot Version: #kpilot# Pilot-Link Version: #pilotlink# #endifpcversion#--> diff --git a/conduits/sysinfoconduit/sysinfo-conduit.cpp b/conduits/sysinfoconduit/sysinfo-conduit.cpp index 71e1310..4ec46be 100644 --- a/conduits/sysinfoconduit/sysinfo-conduit.cpp +++ b/conduits/sysinfoconduit/sysinfo-conduit.cpp @@ -107,8 +107,8 @@ const TQString SysInfoConduit::defaultpage = CSL1("KPilot System Information Pag "-) Version Information (Desktop)\n" " Operating System: #os#\n" " Hostname: #hostname#\n" -" TQt Version: #qt#\n" -" KDE Version: #kde#\n" +" TQt Version: #tqt#\n" +" TDE Version: #tde#\n" " KPilot Version: #kpilot#\n" " Pilot-Link Version: #pilotlink#\n" "#endifpcversion#-->\n" @@ -395,14 +395,14 @@ void SysInfoConduit::pcVersionInfo() if (fKDEVersion) { /* Retrieve values for * - #os# - * - #qt# - * - #kde# + * - #tqt# + * - #tde# * - #kpilot# * - #pilotlink# */ fValues[CSL1("kpilot")] = TQString::fromLatin1(KPILOT_VERSION); - fValues[CSL1("kde")] = i18n("unknown"); - fValues[CSL1("qt")] = i18n("unknown"); + fValues[CSL1("tde")] = i18n("unknown"); + fValues[CSL1("tqt")] = i18n("unknown"); fValues[CSL1("os")] = i18n("unknown"); fValues[CSL1("hostname")] = i18n("unknown"); struct utsname name; @@ -414,10 +414,10 @@ void SysInfoConduit::pcVersionInfo() fValues[CSL1("hostname")] = CSL1("%2").arg(TQString::fromLatin1(name.nodename)); } #ifdef TDE_VERSION_STRING - fValues[CSL1("kde")] = TQString::fromLatin1(TDE_VERSION_STRING); + fValues[CSL1("tde")] = TQString::fromLatin1(TDE_VERSION_STRING); #endif #ifdef TQT_VERSION_STR - fValues[CSL1("qt")] = TQString::fromLatin1(TQT_VERSION_STR); + fValues[CSL1("tqt")] = TQString::fromLatin1(TQT_VERSION_STR); #endif fValues[CSL1("pilotlink")] = CSL1("%1.%2.%3%4") .arg(PILOT_LINK_VERSION) diff --git a/kpilot/pilotDaemon.h b/kpilot/pilotDaemon.h index a8896f9..45c3cb1 100644 --- a/kpilot/pilotDaemon.h +++ b/kpilot/pilotDaemon.h @@ -84,7 +84,7 @@ protected slots: void slotShowNotListening(); void slotBusyTimer(); - // "Regular" QT actions + // "Regular" TQt actions // // virtual void mousePressEvent(TQMouseEvent* e); diff --git a/lib/pilotDateEntry.h b/lib/pilotDateEntry.h index d960a22..34deb78 100644 --- a/lib/pilotDateEntry.h +++ b/lib/pilotDateEntry.h @@ -91,7 +91,7 @@ public: PilotDateEntry& operator=(const PilotDateEntry &e); /** Create a textual representation (human-readable) of this appointment. - * If @p richText is true, then the text representation uses qt style + * If @p richText is true, then the text representation uses tqt style * tags as well. */ TQString getTextRepresentation(TQt::TextFormat richText); diff --git a/lib/pilotTodoEntry.h b/lib/pilotTodoEntry.h index 89f0e06..e6bb05d 100644 --- a/lib/pilotTodoEntry.h +++ b/lib/pilotTodoEntry.h @@ -70,7 +70,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. + * use tqt style markup to make the string clearer when displayed. */ TQString getTextRepresentation(TQt::TextFormat richText);