summaryrefslogtreecommitdiffstats
path: root/conduits/sysinfoconduit
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-01 00:37:32 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-01 00:37:32 +0000
commitf6f9c296c3f9d39a8c3d0ee64a542a47f450be28 (patch)
treed38fce8091ce66977004a5cb115768c7810aee30 /conduits/sysinfoconduit
parente340db64991a06761aa6395ffe760b53e4c1dfbc (diff)
downloadkpilot-f6f9c296c3f9d39a8c3d0ee64a542a47f450be28.tar.gz
kpilot-f6f9c296c3f9d39a8c3d0ee64a542a47f450be28.zip
TQt4 port kpilot
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kpilot@1238903 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'conduits/sysinfoconduit')
-rw-r--r--conduits/sysinfoconduit/Makefile.am2
-rw-r--r--conduits/sysinfoconduit/Template.html2
-rw-r--r--conduits/sysinfoconduit/sysinfo-conduit.cc56
-rw-r--r--conduits/sysinfoconduit/sysinfo-conduit.h1
-rw-r--r--conduits/sysinfoconduit/sysinfo-setup.cc4
-rw-r--r--conduits/sysinfoconduit/sysinfo-setup.h2
-rw-r--r--conduits/sysinfoconduit/sysinfo-setup_dialog.ui20
7 files changed, 44 insertions, 43 deletions
diff --git a/conduits/sysinfoconduit/Makefile.am b/conduits/sysinfoconduit/Makefile.am
index b89b4df..3a5b59a 100644
--- a/conduits/sysinfoconduit/Makefile.am
+++ b/conduits/sysinfoconduit/Makefile.am
@@ -15,7 +15,7 @@ conduit_sysinfo_la_SOURCES = sysinfoSettings.kcfgc \
sysinfo-setup.cc \
sysinfo-conduit.cc \
sysinfo-setup_dialog.ui
-conduit_sysinfo_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries)
+conduit_sysinfo_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) $(PISOCK_LIB) $(LIB_QT) -lkdecore -lkio -lkdeui
conduit_sysinfo_la_LIBADD = ../../lib/libkpilot.la $(LIB_KDEUI) $(LIB_KIO)
kpilot_sysinfo_data_DATA = Template.html Template.txt
diff --git a/conduits/sysinfoconduit/Template.html b/conduits/sysinfoconduit/Template.html
index e5a33e0..56aa328 100644
--- a/conduits/sysinfoconduit/Template.html
+++ b/conduits/sysinfoconduit/Template.html
@@ -147,7 +147,7 @@
<tbody>
<tr><td><b>Operating System:</b></td><td>#os#</td></tr>
<tr><td><b>Hostname:</b></td><td>#hostname#</td></tr>
- <tr><td><b>Qt Version:</b></td><td>#qt#</td></tr>
+ <tr><td><b>TQt Version:</b></td><td>#qt#</td></tr>
<tr><td><b>KDE Libraries Version:</b></td><td>#kde#</td></tr>
<tr><td><b>KPilot Version:</b></td><td>#kpilot#</td></tr>
<tr><td><b>Pilot-Link Version:</b></td><td>#pilotlink#</td></tr>
diff --git a/conduits/sysinfoconduit/sysinfo-conduit.cc b/conduits/sysinfoconduit/sysinfo-conduit.cc
index 64c53bc..b46f5a3 100644
--- a/conduits/sysinfoconduit/sysinfo-conduit.cc
+++ b/conduits/sysinfoconduit/sysinfo-conduit.cc
@@ -107,7 +107,7 @@ const TQString SysInfoConduit::defaultpage = CSL1("KPilot System Information Pag
"-) Version Information (Desktop)\n"
" Operating System: #os#\n"
" Hostname: #hostname#\n"
-" Qt Version: #qt#\n"
+" TQt Version: #qt#\n"
" KDE Version: #kde#\n"
" KPilot Version: #kpilot#\n"
" Pilot-Link Version: #pilotlink#\n"
@@ -299,10 +299,10 @@ void SysInfoConduit::storageInfo()
const KPilotCard *device = fHandle->getCardInfo(1);
if (device) {
fValues[CSL1("cards")] = CSL1("%1 (%2, %3 kB of %3 kB free)")
- .arg(TQString::tqfromLatin1(device->getCardName()))
- .arg(TQString::tqfromLatin1(device->getCardManufacturer()))
- .arg(device->getRamFree()/1024)
- .arg(device->getRamSize()/1024);
+ .tqarg(TQString::tqfromLatin1(device->getCardName()))
+ .tqarg(TQString::tqfromLatin1(device->getCardManufacturer()))
+ .tqarg(device->getRamFree()/1024)
+ .tqarg(device->getRamSize()/1024);
KPILOT_DELETE(device);
} else {
fValues[CSL1("cards")] = i18n("No Cards available via pilot-link");
@@ -408,25 +408,25 @@ void SysInfoConduit::pcVersionInfo()
struct utsname name;
if (uname (&name) >= 0) {
fValues[CSL1("os")] = CSL1("%1 %3, %5")
- .arg(TQString::tqfromLatin1(name.sysname))
- .arg(TQString::tqfromLatin1(name.release))
- .arg(TQString::tqfromLatin1(name.machine));
- fValues[CSL1("hostname")] = CSL1("%2").arg(TQString::tqfromLatin1(name.nodename));
+ .tqarg(TQString::tqfromLatin1(name.sysname))
+ .tqarg(TQString::tqfromLatin1(name.release))
+ .tqarg(TQString::tqfromLatin1(name.machine));
+ fValues[CSL1("hostname")] = CSL1("%2").tqarg(TQString::tqfromLatin1(name.nodename));
}
#ifdef KDE_VERSION_STRING
fValues[CSL1("kde")] = TQString::tqfromLatin1(KDE_VERSION_STRING);
#endif
-#ifdef QT_VERSION_STR
- fValues[CSL1("qt")] = TQString::tqfromLatin1(QT_VERSION_STR);
+#ifdef TQT_VERSION_STR
+ fValues[CSL1("qt")] = TQString::tqfromLatin1(TQT_VERSION_STR);
#endif
fValues[CSL1("pilotlink")] = CSL1("%1.%2.%3%4")
- .arg(PILOT_LINK_VERSION)
- .arg(PILOT_LINK_MAJOR)
- .arg(PILOT_LINK_MINOR)
+ .tqarg(PILOT_LINK_VERSION)
+ .tqarg(PILOT_LINK_MAJOR)
+ .tqarg(PILOT_LINK_MINOR)
#ifdef PILOT_LINK_PATCH
- .arg(TQString::tqfromLatin1(PILOT_LINK_PATCH));
+ .tqarg(TQString::tqfromLatin1(PILOT_LINK_PATCH));
#else
- .arg(TQString());
+ .tqarg(TQString());
#endif
keepParts.append(CSL1("pcversion"));
} else removeParts.append(CSL1("pcversion"));
@@ -441,12 +441,12 @@ void SysInfoConduit::palmVersionInfo()
* - #palmos#
*/
/* fValues["palmos"] = TQString("PalmOS %1.%2 (compat %3.%4)")
- .arg(fHandle->getSysInfo()->getMajorVersion())
- .arg(fHandle->getSysInfo()->getMinorVersion())
- .arg(fHandle->getSysInfo()->getCompatMajorVersion())
- .arg(fHandle->getSysInfo()->getCompatMinorVersion());*/
+ .tqarg(fHandle->getSysInfo()->getMajorVersion())
+ .tqarg(fHandle->getSysInfo()->getMinorVersion())
+ .tqarg(fHandle->getSysInfo()->getCompatMajorVersion())
+ .tqarg(fHandle->getSysInfo()->getCompatMinorVersion());*/
KPilotSysInfo i = deviceLink()->getSysInfo();
- fValues[CSL1("palmos")] = CSL1("PalmOS %1.%2").arg(i.getMajorVersion()).arg(i.getMinorVersion());
+ fValues[CSL1("palmos")] = CSL1("PalmOS %1.%2").tqarg(i.getMajorVersion()).tqarg(i.getMinorVersion());
keepParts.append(CSL1("palmversion"));
} else removeParts.append(CSL1("palmversion"));
@@ -513,12 +513,12 @@ void SysInfoConduit::writeFile()
// Remove all parts not extracted
for ( TQStringList::Iterator it = removeParts.begin(); it != removeParts.end(); ++it ) {
- TQRegExp re(CSL1("<!--#if%1#.*#endif%1#-->").arg(*it).arg(*it));
+ TQRegExp re(CSL1("<!--#if%1#.*#endif%1#-->").tqarg(*it).tqarg(*it));
re.setMinimal(true);
output.remove(re);
}
for ( TQStringList::Iterator it = keepParts.begin(); it != keepParts.end(); ++it ) {
- TQRegExp re(CSL1("<!--#if%1#(.*)#endif%1#-->").arg(*it).arg(*it));
+ TQRegExp re(CSL1("<!--#if%1#(.*)#endif%1#-->").tqarg(*it).tqarg(*it));
re.setMinimal(true);
output.tqreplace(re, CSL1("\\1"));
}
@@ -526,7 +526,7 @@ void SysInfoConduit::writeFile()
// Do a loop through all keys in fValues
TQMap<TQString,TQString>::Iterator it;
for ( it = fValues.begin(); it != fValues.end(); ++it ) {
- output.tqreplace(CSL1("#%1#").arg(it.key()), it.data());
+ output.tqreplace(CSL1("#%1#").tqarg(it.key()), it.data());
}
// Insert the list of databases
@@ -571,7 +571,7 @@ void SysInfoConduit::writeFile()
dbstring.append(newpatt);
}
- // Now, just tqreplace the whole found pattern by the string we just constructed.
+ // Now, just replace the whole found pattern by the string we just constructed.
output.tqreplace(re.cap(0), dbstring);
}
@@ -584,11 +584,11 @@ void SysInfoConduit::writeFile()
TQFileInfo fi(TQDir::home(), CSL1("KPilotSysInfo.")+TQFileInfo(templatefile).extension() );
fOutputFile=fi.absFilePath();
WARNINGKPILOT << "Unable to open output file, using " << fOutputFile << " instead." << endl;
- emit logMessage(i18n("Unable to open output file, using %1 instead.").arg(fOutputFile));
+ emit logMessage(i18n("Unable to open output file, using %1 instead.").tqarg(fOutputFile));
outfile.setName(fOutputFile);
if (!outfile.open(IO_WriteOnly)) {
WARNINGKPILOT<< "Unable to open " << fOutputFile << endl;
- emit logError(i18n("Unable to open %1").arg(fOutputFile));
+ emit logError(i18n("Unable to open %1").tqarg(fOutputFile));
TQTimer::singleShot(0, this, TQT_SLOT(cleanup()));
return;
}
@@ -599,7 +599,7 @@ void SysInfoConduit::writeFile()
outstream<<output;
outfile.close();
- emit logMessage(i18n("Handheld system information written to the file %1").arg(fOutputFile));
+ emit logMessage(i18n("Handheld system information written to the file %1").tqarg(fOutputFile));
TQTimer::singleShot(0, this, TQT_SLOT(cleanup()));
}
diff --git a/conduits/sysinfoconduit/sysinfo-conduit.h b/conduits/sysinfoconduit/sysinfo-conduit.h
index 803bc73..6fde73c 100644
--- a/conduits/sysinfoconduit/sysinfo-conduit.h
+++ b/conduits/sysinfoconduit/sysinfo-conduit.h
@@ -33,6 +33,7 @@
class SysInfoConduit : public ConduitAction
{
Q_OBJECT
+ TQ_OBJECT
public:
SysInfoConduit(
KPilotLink *o,
diff --git a/conduits/sysinfoconduit/sysinfo-setup.cc b/conduits/sysinfoconduit/sysinfo-setup.cc
index 271db65..7818e09 100644
--- a/conduits/sysinfoconduit/sysinfo-setup.cc
+++ b/conduits/sysinfoconduit/sysinfo-setup.cc
@@ -64,7 +64,7 @@ const sysinfoEntry_t sysinfoEntries[] =
/*
-** The QCheckListItems used in the list of parts to print have
+** The TQCheckListItems used in the list of parts to print have
** several text fields with special meanings.
** 0: The text displayed in the list.
** 1: The index of the item in the sysinfoEntries array.
@@ -82,7 +82,7 @@ const sysinfoEntry_t sysinfoEntries[] =
** This is a convenience define to update an item's "original setting".
*/
#define updateSetting(i) { TQCheckListItem *ubbu=(i); \
- ubbu->setText(PART_SETTING,(ubbu->isOn() ? CSL1("1") : TQString::null)); }
+ ubbu->setText(PART_SETTING,(ubbu->isOn() ? CSL1("1") : TQString())); }
SysInfoWidgetConfig::SysInfoWidgetConfig(TQWidget *w, const char *n) :
diff --git a/conduits/sysinfoconduit/sysinfo-setup.h b/conduits/sysinfoconduit/sysinfo-setup.h
index 400dea3..ae15b51 100644
--- a/conduits/sysinfoconduit/sysinfo-setup.h
+++ b/conduits/sysinfoconduit/sysinfo-setup.h
@@ -36,7 +36,7 @@ class SysInfoWidget;
class SysInfoWidgetConfig : public ConduitConfigBase
{
public:
- SysInfoWidgetConfig(TQWidget *parent, const char *);
+ SysInfoWidgetConfig(TQWidget *tqparent, const char *);
virtual void commit();
virtual void load();
virtual bool isModified() const;
diff --git a/conduits/sysinfoconduit/sysinfo-setup_dialog.ui b/conduits/sysinfoconduit/sysinfo-setup_dialog.ui
index 935db05..6b8e2b9 100644
--- a/conduits/sysinfoconduit/sysinfo-setup_dialog.ui
+++ b/conduits/sysinfoconduit/sysinfo-setup_dialog.ui
@@ -1,7 +1,7 @@
<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
<class>SysInfoWidget</class>
<author>Reinhold Kainhofer</author>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>Form2</cstring>
</property>
@@ -23,11 +23,11 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QTabWidget" row="0" column="0">
+ <widget class="TQTabWidget" row="0" column="0">
<property name="name">
<cstring>tabWidget</cstring>
</property>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>tab</cstring>
</property>
@@ -63,7 +63,7 @@
<string>&lt;qt&gt;Enter here, or select by clicking the file picker button, the location and file name of the output file used to store the handheld's system information.&lt;/qt&gt;</string>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel4</cstring>
</property>
@@ -77,7 +77,7 @@
<string>&lt;qt&gt;Enter here, or select by clicking the file picker button, the location and file name of the output file used to store the handheld's system information.&lt;/qt&gt;</string>
</property>
</widget>
- <widget class="QButtonGroup" row="1" column="0" rowspan="1" colspan="2">
+ <widget class="TQButtonGroup" row="1" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>fOutputType</cstring>
</property>
@@ -88,7 +88,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QRadioButton" row="0" column="0" rowspan="1" colspan="2">
+ <widget class="TQRadioButton" row="0" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>radioButton3</cstring>
</property>
@@ -102,7 +102,7 @@
<string>&lt;qt&gt;Select this option to output the system information data as a HTML document.&lt;/qt&gt;</string>
</property>
</widget>
- <widget class="QRadioButton" row="1" column="0" rowspan="1" colspan="2">
+ <widget class="TQRadioButton" row="1" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>radioButton4</cstring>
</property>
@@ -124,7 +124,7 @@
<string>&lt;qt&gt;Enter here, or select by clicking on the file picker button, the location of the template to be used if you select the Custom template option.&lt;/qt&gt;</string>
</property>
</widget>
- <widget class="QRadioButton" row="2" column="0">
+ <widget class="TQRadioButton" row="2" column="0">
<property name="name">
<cstring>radioButton5</cstring>
</property>
@@ -139,7 +139,7 @@
</widget>
</grid>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>tab</cstring>
</property>
@@ -167,7 +167,7 @@
</size>
</property>
</spacer>
- <widget class="QListView" row="0" column="0">
+ <widget class="TQListView" row="0" column="0">
<column>
<property name="text">
<string>Output Type</string>