summaryrefslogtreecommitdiffstats
path: root/kinit
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:46:43 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:46:43 +0000
commitffe8a83e053396df448e9413828527613ca3bd46 (patch)
treea73d4169e02df4a50f9a12cb165fcd0ab5bac7c6 /kinit
parent682bf3bfdcbcbb1fca85e8a36ed03e062e0555d5 (diff)
downloadtdelibs-ffe8a83e053396df448e9413828527613ca3bd46.tar.gz
tdelibs-ffe8a83e053396df448e9413828527613ca3bd46.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1157647 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kinit')
-rw-r--r--kinit/autostart.cpp32
-rw-r--r--kinit/autostart.h6
-rw-r--r--kinit/kdostartupconfig.cpp50
-rw-r--r--kinit/kinit.cpp116
-rw-r--r--kinit/kioslave.cpp4
-rw-r--r--kinit/klauncher.cpp366
-rw-r--r--kinit/klauncher.h110
-rw-r--r--kinit/klauncher_main.cpp6
-rw-r--r--kinit/tests/klaunchertest.cpp12
-rw-r--r--kinit/wrapper.c4
10 files changed, 353 insertions, 353 deletions
diff --git a/kinit/autostart.cpp b/kinit/autostart.cpp
index 7780f793c..c4dcbb543 100644
--- a/kinit/autostart.cpp
+++ b/kinit/autostart.cpp
@@ -30,13 +30,13 @@
class AutoStartItem
{
public:
- QString name;
- QString service;
- QString startAfter;
+ TQString name;
+ TQString service;
+ TQString startAfter;
int phase;
};
-class AutoStartList: public QPtrList<AutoStartItem>
+class AutoStartList: public TQPtrList<AutoStartItem>
{
public:
AutoStartList() { }
@@ -48,12 +48,12 @@ AutoStart::AutoStart( bool new_startup )
m_startList = new AutoStartList;
m_startList->setAutoDelete(true);
KGlobal::dirs()->addResourceType("autostart", "share/autostart");
- QString xdgdirs = getenv("XDG_CONFIG_DIRS");
+ TQString xdgdirs = getenv("XDG_CONFIG_DIRS");
if (xdgdirs.isEmpty())
xdgdirs = "/etc/xdg";
- QStringList xdgdirslist = QStringList::split( ':', xdgdirs );
- for ( QStringList::Iterator itr = xdgdirslist.begin(); itr != xdgdirslist.end(); ++itr ) {
+ TQStringList xdgdirslist = TQStringList::split( ':', xdgdirs );
+ for ( TQStringList::Iterator itr = xdgdirslist.begin(); itr != xdgdirslist.end(); ++itr ) {
KGlobal::dirs()->addResourceDir("autostart", (*itr) +"/autostart");
}
}
@@ -78,7 +78,7 @@ void AutoStart::setPhaseDone()
m_phasedone = true;
}
-static QString extractName(QString path)
+static TQString extractName(TQString path)
{
int i = path.findRev('/');
if (i >= 0)
@@ -89,12 +89,12 @@ static QString extractName(QString path)
return path;
}
-static bool startCondition(const QString &condition)
+static bool startCondition(const TQString &condition)
{
if (condition.isEmpty())
return true;
- QStringList list = QStringList::split(':', condition, true);
+ TQStringList list = TQStringList::split(':', condition, true);
if (list.count() < 4)
return true;
if (list[0].isEmpty() || list[2].isEmpty())
@@ -112,9 +112,9 @@ static bool startCondition(const QString &condition)
void
AutoStart::loadAutoStartList()
{
- QStringList files = KGlobal::dirs()->findAllResources("autostart", "*.desktop", false, true);
+ TQStringList files = KGlobal::dirs()->findAllResources("autostart", "*.desktop", false, true);
- for(QStringList::ConstIterator it = files.begin();
+ for(TQStringList::ConstIterator it = files.begin();
it != files.end();
++it)
{
@@ -167,7 +167,7 @@ AutoStart::startService()
{
// Check for items that depend on previously started items
- QString lastItem = m_started[0];
+ TQString lastItem = m_started[0];
for(AutoStartItem *item = m_startList->first();
item; item = m_startList->next())
{
@@ -175,7 +175,7 @@ AutoStart::startService()
&& item->startAfter == lastItem)
{
m_started.prepend(item->name);
- QString service = item->service;
+ TQString service = item->service;
m_startList->remove();
return service;
}
@@ -192,7 +192,7 @@ AutoStart::startService()
&& item->startAfter.isEmpty())
{
m_started.prepend(item->name);
- QString service = item->service;
+ TQString service = item->service;
m_startList->remove();
return service;
}
@@ -205,7 +205,7 @@ AutoStart::startService()
if (item->phase == m_phase)
{
m_started.prepend(item->name);
- QString service = item->service;
+ TQString service = item->service;
m_startList->remove();
return service;
}
diff --git a/kinit/autostart.h b/kinit/autostart.h
index a10bfa0dd..ce2efe2da 100644
--- a/kinit/autostart.h
+++ b/kinit/autostart.h
@@ -20,7 +20,7 @@
#ifndef _AUTOSTART_H_
#define _AUTOSTART_H_
-#include <qstringlist.h>
+#include <tqstringlist.h>
class AutoStartList;
@@ -31,7 +31,7 @@ public:
~AutoStart();
void loadAutoStartList();
- QString startService();
+ TQString startService();
void setPhase(int phase);
void setPhaseDone();
int phase() const { return m_phase; }
@@ -40,7 +40,7 @@ public:
private:
bool m_newStartup;
AutoStartList *m_startList;
- QStringList m_started;
+ TQStringList m_started;
int m_phase;
bool m_phasedone;
};
diff --git a/kinit/kdostartupconfig.cpp b/kinit/kdostartupconfig.cpp
index a0e9ccf43..b9885453b 100644
--- a/kinit/kdostartupconfig.cpp
+++ b/kinit/kdostartupconfig.cpp
@@ -26,20 +26,20 @@ DEALINGS IN THE SOFTWARE.
// See description in kstartupconfig.cpp .
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#include <kinstance.h>
#include <kstandarddirs.h>
#include <kconfig.h>
#include <kdebug.h>
-QString get_entry( QString* ll )
+TQString get_entry( TQString* ll )
{
- QString& l = *ll;
+ TQString& l = *ll;
l = l.stripWhiteSpace();
if( l.isEmpty())
- return QString::null;
- QString ret;
+ return TQString::null;
+ TQString ret;
if( l[ 0 ] == '\'' )
{
unsigned int pos = 1;
@@ -47,8 +47,8 @@ QString get_entry( QString* ll )
ret += l[ pos++ ];
if( pos >= l.length())
{
- *ll = QString::null;
- return QString::null;
+ *ll = TQString::null;
+ return TQString::null;
}
*ll = l.mid( pos + 1 );
return ret;
@@ -64,29 +64,29 @@ int main()
{
KInstance inst( "kdostartupconfig" );
kdDebug() << "Running kdostartupconfig." << endl;
- QString keysname = locateLocal( "config", "startupconfigkeys" );
- QFile keys( keysname );
+ TQString keysname = locateLocal( "config", "startupconfigkeys" );
+ TQFile keys( keysname );
if( !keys.open( IO_ReadOnly ))
return 3;
- QFile f1( locateLocal( "config", "startupconfig" ));
+ TQFile f1( locateLocal( "config", "startupconfig" ));
if( !f1.open( IO_WriteOnly ))
return 4;
- QFile f2( locateLocal( "config", "startupconfigfiles" ));
+ TQFile f2( locateLocal( "config", "startupconfigfiles" ));
if( !f2.open( IO_WriteOnly ))
return 5;
- QTextStream startupconfig( &f1 );
- QTextStream startupconfigfiles( &f2 );
+ TQTextStream startupconfig( &f1 );
+ TQTextStream startupconfigfiles( &f2 );
startupconfig << "#! /bin/sh\n";
for(;;)
{
- QString line;
+ TQString line;
if( keys.readLine( line, 1024 ) < 0 )
break;
line = line.stripWhiteSpace();
if( line.isEmpty())
break;
- QString tmp = line;
- QString file, group, key, def;
+ TQString tmp = line;
+ TQString file, group, key, def;
file = get_entry( &tmp );
group = get_entry( &tmp );
key = get_entry( &tmp );
@@ -97,14 +97,14 @@ int main()
{ // whole config group
KConfig cfg( file );
group = group.mid( 1, group.length() - 2 );
- QMap< QString, QString > entries = cfg.entryMap( group );
+ TQMap< TQString, TQString > entries = cfg.entryMap( group );
startupconfig << "# " << line << "\n";
- for( QMap< QString, QString >::ConstIterator it = entries.begin();
+ for( TQMap< TQString, TQString >::ConstIterator it = entries.begin();
it != entries.end();
++it )
{
- QString key = it.key();
- QString value = *it;
+ TQString key = it.key();
+ TQString value = *it;
startupconfig << file.replace( ' ', '_' ).lower()
<< "_" << group.replace( ' ', '_' ).lower()
<< "_" << key.replace( ' ', '_' ).lower()
@@ -117,7 +117,7 @@ int main()
return 7;
KConfig cfg( file );
cfg.setGroup( group );
- QString value = cfg.readEntry( key, def );
+ TQString value = cfg.readEntry( key, def );
startupconfig << "# " << line << "\n";
startupconfig << file.replace( ' ', '_' ).lower()
<< "_" << group.replace( ' ', '_' ).lower()
@@ -126,12 +126,12 @@ int main()
}
startupconfigfiles << line << endl;
// use even currently non-existing paths in $KDEDIRS
- QStringList dirs = QStringList::split( KPATH_SEPARATOR, KGlobal::dirs()->kfsstnd_prefixes());
- for( QStringList::ConstIterator it = dirs.begin();
+ TQStringList dirs = TQStringList::split( KPATH_SEPARATOR, KGlobal::dirs()->kfsstnd_prefixes());
+ for( TQStringList::ConstIterator it = dirs.begin();
it != dirs.end();
++it )
{
- QString cfg = *it + "share/config/" + file;
+ TQString cfg = *it + "share/config/" + file;
if( KStandardDirs::exists( cfg ))
startupconfigfiles << cfg << "\n";
else
diff --git a/kinit/kinit.cpp b/kinit/kinit.cpp
index 77608b94b..f34a6a219 100644
--- a/kinit/kinit.cpp
+++ b/kinit/kinit.cpp
@@ -45,13 +45,13 @@
#include <unistd.h>
#include <locale.h>
-#include <qstring.h>
-#include <qfile.h>
-#include <qdatetime.h>
-#include <qfileinfo.h>
-#include <qtextstream.h>
-#include <qregexp.h>
-#include <qfont.h>
+#include <tqstring.h>
+#include <tqfile.h>
+#include <tqdatetime.h>
+#include <tqfileinfo.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
+#include <tqfont.h>
#include <kinstance.h>
#include <kstandarddirs.h>
#include <kglobal.h>
@@ -153,7 +153,7 @@ static struct {
int (*launcher_func)(int);
bool debug_wait;
int lt_dlopen_flag;
- QCString errorMsg;
+ TQCString errorMsg;
bool launcher_ok;
bool suicide;
} d;
@@ -236,10 +236,10 @@ static void close_fds()
signal(SIGPIPE, SIG_DFL);
}
-static void exitWithErrorMsg(const QString &errorMsg)
+static void exitWithErrorMsg(const TQString &errorMsg)
{
fprintf( stderr, "%s\n", errorMsg.local8Bit().data() );
- QCString utf8ErrorMsg = errorMsg.utf8();
+ TQCString utf8ErrorMsg = errorMsg.utf8();
d.result = 3; // Error with msg
write(d.fd[1], &d.result, 1);
int l = utf8ErrorMsg.length();
@@ -355,24 +355,24 @@ static void complete_startup_info( KStartupInfoId& id, pid_t pid )
}
#endif
-QCString execpath_avoid_loops( const QCString& exec, int envc, const char* envs, bool avoid_loops )
+TQCString execpath_avoid_loops( const TQCString& exec, int envc, const char* envs, bool avoid_loops )
{
- QStringList paths;
+ TQStringList paths;
if( envc > 0 ) /* use the passed environment */
{
const char* path = get_env_var( "PATH=", envc, envs );
if( path != NULL )
- paths = QStringList::split( QRegExp( "[:\b]" ), path, true );
+ paths = TQStringList::split( TQRegExp( "[:\b]" ), path, true );
}
else
- paths = QStringList::split( QRegExp( "[:\b]" ), getenv( "PATH" ), true );
- QCString execpath = QFile::encodeName(
- s_instance->dirs()->findExe( exec, paths.join( QString( ":" ))));
+ paths = TQStringList::split( TQRegExp( "[:\b]" ), getenv( "PATH" ), true );
+ TQCString execpath = TQFile::encodeName(
+ s_instance->dirs()->findExe( exec, paths.join( TQString( ":" ))));
if( avoid_loops && !execpath.isEmpty())
{
int pos = execpath.findRev( '/' );
- QString bin_path = execpath.left( pos );
- for( QStringList::Iterator it = paths.begin();
+ TQString bin_path = execpath.left( pos );
+ for( TQStringList::Iterator it = paths.begin();
it != paths.end();
++it )
if( ( *it ) == bin_path || ( *it ) == bin_path + '/' )
@@ -380,8 +380,8 @@ QCString execpath_avoid_loops( const QCString& exec, int envc, const char* envs,
paths.remove( it );
break; // -->
}
- execpath = QFile::encodeName(
- s_instance->dirs()->findExe( exec, paths.join( QString( ":" ))));
+ execpath = TQFile::encodeName(
+ s_instance->dirs()->findExe( exec, paths.join( TQString( ":" ))));
}
return execpath;
}
@@ -425,9 +425,9 @@ static pid_t launch(int argc, const char *_name, const char *args,
const char* startup_id_str = "0" )
{
int launcher = 0;
- QCString lib;
- QCString name;
- QCString exec;
+ TQCString lib;
+ TQCString name;
+ TQCString exec;
if (strcmp(_name, "klauncher") == 0) {
/* klauncher is launched in a special way:
@@ -441,15 +441,15 @@ static pid_t launch(int argc, const char *_name, const char *args,
launcher = 1;
}
- QCString libpath;
- QCString execpath;
+ TQCString libpath;
+ TQCString execpath;
if (_name[0] != '/')
{
/* Relative name without '.la' */
name = _name;
lib = name + ".la";
exec = name;
- libpath = QFile::encodeName(KLibLoader::findLibrary( lib, s_instance ));
+ libpath = TQFile::encodeName(KLibLoader::findLibrary( lib, s_instance ));
execpath = execpath_avoid_loops( exec, envc, envs, avoid_loops );
}
else
@@ -525,16 +525,16 @@ static pid_t launch(int argc, const char *_name, const char *args,
if( reset_env ) // KWRAPPER/SHELL
{
- QStrList unset_envs;
+ TQStrList unset_envs;
for( int tmp_env_count = 0;
environ[tmp_env_count];
tmp_env_count++)
unset_envs.append( environ[ tmp_env_count ] );
- for( QStrListIterator it( unset_envs );
+ for( TQStrListIterator it( unset_envs );
it.current() != NULL ;
++it )
{
- QCString tmp( it.current());
+ TQCString tmp( it.current());
int pos = tmp.find( '=' );
if( pos >= 0 )
unsetenv( tmp.left( pos ));
@@ -557,7 +557,7 @@ static pid_t launch(int argc, const char *_name, const char *args,
#endif
{
int r;
- QCString procTitle;
+ TQCString procTitle;
d.argv = (char **) malloc(sizeof(char *) * (argc+1));
d.argv[0] = (char *) _name;
for (int i = 1; i < argc; i++)
@@ -586,7 +586,7 @@ static pid_t launch(int argc, const char *_name, const char *args,
d.handle = 0;
if (libpath.isEmpty() && execpath.isEmpty())
{
- QString errorMsg = i18n("Could not find '%1' executable.").arg(QFile::decodeName(_name));
+ TQString errorMsg = i18n("Could not find '%1' executable.").arg(TQFile::decodeName(_name));
exitWithErrorMsg(errorMsg);
}
@@ -595,15 +595,15 @@ static pid_t launch(int argc, const char *_name, const char *args,
if ( !libpath.isEmpty() )
{
- d.handle = lt_dlopen( QFile::encodeName(libpath) );
+ d.handle = lt_dlopen( TQFile::encodeName(libpath) );
if (!d.handle )
{
const char * ltdlError = lt_dlerror();
if (execpath.isEmpty())
{
// Error
- QString errorMsg = i18n("Could not open library '%1'.\n%2").arg(QFile::decodeName(libpath))
- .arg(ltdlError ? QFile::decodeName(ltdlError) : i18n("Unknown error"));
+ TQString errorMsg = i18n("Could not open library '%1'.\n%2").arg(TQFile::decodeName(libpath))
+ .arg(ltdlError ? TQFile::decodeName(ltdlError) : i18n("Unknown error"));
exitWithErrorMsg(errorMsg);
}
else
@@ -645,8 +645,8 @@ static pid_t launch(int argc, const char *_name, const char *args,
{
const char * ltdlError = lt_dlerror();
fprintf(stderr, "Could not find kdemain: %s\n", ltdlError != 0 ? ltdlError : "(null)" );
- QString errorMsg = i18n("Could not find 'kdemain' in '%1'.\n%2").arg(libpath)
- .arg(ltdlError ? QFile::decodeName(ltdlError) : i18n("Unknown error"));
+ TQString errorMsg = i18n("Could not find 'kdemain' in '%1'.\n%2").arg(libpath)
+ .arg(ltdlError ? TQFile::decodeName(ltdlError) : i18n("Unknown error"));
exitWithErrorMsg(errorMsg);
}
}
@@ -701,7 +701,7 @@ static pid_t launch(int argc, const char *_name, const char *args,
d.n = read(d.fd[0], &l, sizeof(int));
if (d.n == sizeof(int))
{
- QCString tmp;
+ TQCString tmp;
tmp.resize(l+1);
d.n = read(d.fd[0], tmp.data(), l);
tmp[l] = 0;
@@ -837,8 +837,8 @@ static void init_kdeinit_socket()
chdir(home_dir);
{
- QCString path = home_dir;
- QCString readOnly = getenv("KDE_HOME_READONLY");
+ TQCString path = home_dir;
+ TQCString readOnly = getenv("KDE_HOME_READONLY");
if (access(path.data(), R_OK|W_OK))
{
if (errno == ENOENT)
@@ -1226,8 +1226,8 @@ static void handle_launcher_request(int sock = -1)
}
// support for the old a bit broken way of setting DISPLAY for multihead
- QCString olddisplay = getenv(DISPLAY);
- QCString kdedisplay = getenv("KDE_DISPLAY");
+ TQCString olddisplay = getenv(DISPLAY);
+ TQCString kdedisplay = getenv("KDE_DISPLAY");
bool reset_display = (! olddisplay.isEmpty() &&
! kdedisplay.isEmpty() &&
olddisplay != kdedisplay);
@@ -1465,18 +1465,18 @@ static void handle_requests(pid_t waitForPid)
static void kdeinit_library_path()
{
- QStringList ltdl_library_path =
- QStringList::split(':', QFile::decodeName(getenv("LTDL_LIBRARY_PATH")));
- QStringList ld_library_path =
- QStringList::split(':', QFile::decodeName(getenv("LD_LIBRARY_PATH")));
-
- QCString extra_path;
- QStringList candidates = s_instance->dirs()->resourceDirs("lib");
- for (QStringList::ConstIterator it = candidates.begin();
+ TQStringList ltdl_library_path =
+ TQStringList::split(':', TQFile::decodeName(getenv("LTDL_LIBRARY_PATH")));
+ TQStringList ld_library_path =
+ TQStringList::split(':', TQFile::decodeName(getenv("LD_LIBRARY_PATH")));
+
+ TQCString extra_path;
+ TQStringList candidates = s_instance->dirs()->resourceDirs("lib");
+ for (TQStringList::ConstIterator it = candidates.begin();
it != candidates.end();
it++)
{
- QString d = *it;
+ TQString d = *it;
if (ltdl_library_path.contains(d))
continue;
if (ld_library_path.contains(d))
@@ -1492,7 +1492,7 @@ static void kdeinit_library_path()
if ((d == "/lib") || (d == "/usr/lib"))
continue;
- QCString dir = QFile::encodeName(d);
+ TQCString dir = TQFile::encodeName(d);
if (access(dir, R_OK))
continue;
@@ -1510,7 +1510,7 @@ static void kdeinit_library_path()
if (!extra_path.isEmpty())
lt_dlsetsearchpath(extra_path.data());
- QCString display = getenv(DISPLAY);
+ TQCString display = getenv(DISPLAY);
if (display.isEmpty())
{
fprintf(stderr, "kdeinit: Aborting. $"DISPLAY" is not set.\n");
@@ -1520,7 +1520,7 @@ static void kdeinit_library_path()
if((i = display.findRev('.')) > display.findRev(':') && i >= 0)
display.truncate(i);
- QCString socketName = QFile::encodeName(locateLocal("socket", QString("kdeinit-%1").arg(display), s_instance));
+ TQCString socketName = TQFile::encodeName(locateLocal("socket", TQString("kdeinit-%1").arg(display), s_instance));
if (socketName.length() >= MAX_SOCK_FILE)
{
fprintf(stderr, "kdeinit: Aborting. Socket name will be too long:\n");
@@ -1530,7 +1530,7 @@ static void kdeinit_library_path()
strcpy(sock_file_old, socketName.data());
display.replace(":","_");
- socketName = QFile::encodeName(locateLocal("socket", QString("kdeinit_%1").arg(display), s_instance));
+ socketName = TQFile::encodeName(locateLocal("socket", TQString("kdeinit_%1").arg(display), s_instance));
if (socketName.length() >= MAX_SOCK_FILE)
{
fprintf(stderr, "kdeinit: Aborting. Socket name will be too long:\n");
@@ -1806,9 +1806,9 @@ int main(int argc, char **argv, char **envp)
#ifndef __CYGWIN__
if (!d.suicide && !getenv("KDE_IS_PRELINKED"))
{
- QString konq = locate("lib", "libkonq.la", s_instance);
+ TQString konq = locate("lib", "libkonq.la", s_instance);
if (!konq.isEmpty())
- (void) lt_dlopen(QFile::encodeName(konq).data());
+ (void) lt_dlopen(TQFile::encodeName(konq).data());
}
#endif
if (launch_klauncher)
@@ -1836,13 +1836,13 @@ int main(int argc, char **argv, char **envp)
XftInitFtLibrary();
}
#endif
- QFont::initialize();
+ TQFont::initialize();
setlocale (LC_ALL, "");
setlocale (LC_NUMERIC, "C");
#ifdef Q_WS_X11
if (XSupportsLocale ())
{
- // Similar to QApplication::create_xim()
+ // Similar to TQApplication::create_xim()
// but we need to use our own display
XOpenIM (X11display, 0, 0, 0);
}
diff --git a/kinit/kioslave.cpp b/kinit/kioslave.cpp
index 0195f2867..215f53c67 100644
--- a/kinit/kioslave.cpp
+++ b/kinit/kioslave.cpp
@@ -29,7 +29,7 @@
#include <stdio.h>
#include <errno.h>
-#include <qstring.h>
+#include <tqstring.h>
#include "ltdl.h"
@@ -58,7 +58,7 @@ int main(int argc, char **argv)
fprintf(stderr, "Usage: kioslave <slave-lib> <protocol> <klauncher-socket> <app-socket>\n\nThis program is part of KDE.\n");
exit(1);
}
- QCString libpath = argv[1];
+ TQCString libpath = argv[1];
if (libpath.isEmpty())
{
diff --git a/kinit/klauncher.cpp b/kinit/klauncher.cpp
index ae4692d60..2b49a0ac8 100644
--- a/kinit/klauncher.cpp
+++ b/kinit/klauncher.cpp
@@ -27,7 +27,7 @@
#include <signal.h>
#include <sys/time.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -63,13 +63,13 @@
using namespace KIO;
-template class QPtrList<KLaunchRequest>;
-template class QPtrList<IdleSlave>;
+template class TQPtrList<KLaunchRequest>;
+template class TQPtrList<IdleSlave>;
IdleSlave::IdleSlave(KSocket *socket)
{
mConn.init(socket);
- mConn.connect(this, SLOT(gotInput()));
+ mConn.connect(this, TQT_SLOT(gotInput()));
mConn.send( CMD_SLAVE_STATUS );
mPid = 0;
mBirthDate = time(0);
@@ -80,7 +80,7 @@ void
IdleSlave::gotInput()
{
int cmd;
- QByteArray data;
+ TQByteArray data;
if (mConn.read( &cmd, data) == -1)
{
// Communication problem with slave.
@@ -98,10 +98,10 @@ IdleSlave::gotInput()
}
else
{
- QDataStream stream( data, IO_ReadOnly );
+ TQDataStream stream( data, IO_ReadOnly );
pid_t pid;
- QCString protocol;
- QString host;
+ TQCString protocol;
+ TQString host;
Q_INT8 b;
stream >> pid >> protocol >> host >> b;
// Overload with (bool) onHold, (KURL) url.
@@ -122,10 +122,10 @@ IdleSlave::gotInput()
}
void
-IdleSlave::connect(const QString &app_socket)
+IdleSlave::connect(const TQString &app_socket)
{
- QByteArray data;
- QDataStream stream( data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream stream( data, IO_WriteOnly);
stream << app_socket;
mConn.send( CMD_SLAVE_CONNECT, data );
// Timeout!
@@ -138,7 +138,7 @@ IdleSlave::reparseConfiguration()
}
bool
-IdleSlave::match(const QString &protocol, const QString &host, bool connected)
+IdleSlave::match(const TQString &protocol, const TQString &host, bool connected)
{
if (mOnHold) return false;
if (protocol != mProtocol) return false;
@@ -171,17 +171,17 @@ KLauncher::KLauncher(int _kdeinitSocket, bool new_startup)
#ifdef Q_WS_X11
mCached_dpy = NULL;
#endif
- connect(&mAutoTimer, SIGNAL(timeout()), this, SLOT(slotAutoStart()));
+ connect(&mAutoTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotAutoStart()));
requestList.setAutoDelete(true);
mSlaveWaitRequest.setAutoDelete(true);
dcopClient()->setNotifications( true );
- connect(dcopClient(), SIGNAL( applicationRegistered( const QCString &)),
- this, SLOT( slotAppRegistered( const QCString &)));
+ connect(dcopClient(), TQT_SIGNAL( applicationRegistered( const TQCString &)),
+ this, TQT_SLOT( slotAppRegistered( const TQCString &)));
dcopClient()->connectDCOPSignal( "DCOPServer", "", "terminateKDE()",
objId(), "terminateKDE()", false );
- QString prefix = locateLocal("socket", "klauncher");
- KTempFile domainname(prefix, QString::fromLatin1(".slave-socket"));
+ TQString prefix = locateLocal("socket", "klauncher");
+ KTempFile domainname(prefix, TQString::fromLatin1(".slave-socket"));
if (domainname.status() != 0)
{
// Sever error!
@@ -193,15 +193,15 @@ KLauncher::KLauncher(int _kdeinitSocket, bool new_startup)
domainname.close();
domainname.unlink();
#endif
- mPoolSocket = new KServerSocket(QFile::encodeName(mPoolSocketName));
- connect(mPoolSocket, SIGNAL(accepted( KSocket *)),
- SLOT(acceptSlave(KSocket *)));
+ mPoolSocket = new KServerSocket(TQFile::encodeName(mPoolSocketName));
+ connect(mPoolSocket, TQT_SIGNAL(accepted( KSocket *)),
+ TQT_SLOT(acceptSlave(KSocket *)));
- connect(&mTimer, SIGNAL(timeout()), SLOT(idleTimeout()));
+ connect(&mTimer, TQT_SIGNAL(timeout()), TQT_SLOT(idleTimeout()));
- kdeinitNotifier = new QSocketNotifier(kdeinitSocket, QSocketNotifier::Read);
- connect(kdeinitNotifier, SIGNAL( activated( int )),
- this, SLOT( slotKDEInitData( int )));
+ kdeinitNotifier = new TQSocketNotifier(kdeinitSocket, TQSocketNotifier::Read);
+ connect(kdeinitNotifier, TQT_SIGNAL( activated( int )),
+ this, TQT_SLOT( slotKDEInitData( int )));
kdeinitNotifier->setEnabled( true );
lastRequest = 0;
bProcessingQueue = false;
@@ -232,7 +232,7 @@ void KLauncher::close()
{
if (!mPoolSocketName.isEmpty())
{
- QCString filename = QFile::encodeName(mPoolSocketName);
+ TQCString filename = TQFile::encodeName(mPoolSocketName);
unlink(filename.data());
}
#if defined Q_WS_X11 && ! defined K_WS_QTONLY
@@ -251,65 +251,65 @@ KLauncher::destruct(int exit_code)
}
bool
-KLauncher::process(const QCString &fun, const QByteArray &data,
- QCString &replyType, QByteArray &replyData)
+KLauncher::process(const TQCString &fun, const TQByteArray &data,
+ TQCString &replyType, TQByteArray &replyData)
{
- if ((fun == "exec_blind(QCString,QValueList<QCString>)")
- || (fun == "exec_blind(QCString,QValueList<QCString>,QValueList<QCString>,QCString)"))
+ if ((fun == "exec_blind(TQCString,TQValueList<TQCString>)")
+ || (fun == "exec_blind(TQCString,TQValueList<TQCString>,TQValueList<TQCString>,TQCString)"))
{
- QDataStream stream(data, IO_ReadOnly);
+ TQDataStream stream(data, IO_ReadOnly);
replyType = "void";
- QCString name;
- QValueList<QCString> arg_list;
- QCString startup_id = "0";
- QValueList<QCString> envs;
+ TQCString name;
+ TQValueList<TQCString> arg_list;
+ TQCString startup_id = "0";
+ TQValueList<TQCString> envs;
stream >> name >> arg_list;
- if( fun == "exec_blind(QCString,QValueList<QCString>,QValueList<QCString>,QCString)" )
+ if( fun == "exec_blind(TQCString,TQValueList<TQCString>,TQValueList<TQCString>,TQCString)" )
stream >> envs >> startup_id;
kdDebug(7016) << "KLauncher: Got exec_blind('" << name << "', ...)" << endl;
exec_blind( name, arg_list, envs, startup_id);
return true;
}
- if ((fun == "start_service_by_name(QString,QStringList)") ||
- (fun == "start_service_by_desktop_path(QString,QStringList)")||
- (fun == "start_service_by_desktop_name(QString,QStringList)")||
- (fun == "kdeinit_exec(QString,QStringList)") ||
- (fun == "kdeinit_exec_wait(QString,QStringList)") ||
- (fun == "start_service_by_name(QString,QStringList,QValueList<QCString>,QCString)") ||
- (fun == "start_service_by_desktop_path(QString,QStringList,QValueList<QCString>,QCString)")||
- (fun == "start_service_by_desktop_name(QString,QStringList,QValueList<QCString>,QCString)") ||
- (fun == "start_service_by_name(QString,QStringList,QValueList<QCString>,QCString,bool)") ||
- (fun == "start_service_by_desktop_path(QString,QStringList,QValueList<QCString>,QCString,bool)")||
- (fun == "start_service_by_desktop_name(QString,QStringList,QValueList<QCString>,QCString,bool)") ||
- (fun == "kdeinit_exec(QString,QStringList,QValueList<QCString>)") ||
- (fun == "kdeinit_exec_wait(QString,QStringList,QValueList<QCString>)") ||
- (fun == "kdeinit_exec(QString,QStringList,QValueList<QCString>,QCString)") ||
- (fun == "kdeinit_exec_wait(QString,QStringList,QValueList<QCString>,QCString)"))
+ if ((fun == "start_service_by_name(TQString,TQStringList)") ||
+ (fun == "start_service_by_desktop_path(TQString,TQStringList)")||
+ (fun == "start_service_by_desktop_name(TQString,TQStringList)")||
+ (fun == "kdeinit_exec(TQString,TQStringList)") ||
+ (fun == "kdeinit_exec_wait(TQString,TQStringList)") ||
+ (fun == "start_service_by_name(TQString,TQStringList,TQValueList<TQCString>,TQCString)") ||
+ (fun == "start_service_by_desktop_path(TQString,TQStringList,TQValueList<TQCString>,TQCString)")||
+ (fun == "start_service_by_desktop_name(TQString,TQStringList,TQValueList<TQCString>,TQCString)") ||
+ (fun == "start_service_by_name(TQString,TQStringList,TQValueList<TQCString>,TQCString,bool)") ||
+ (fun == "start_service_by_desktop_path(TQString,TQStringList,TQValueList<TQCString>,TQCString,bool)")||
+ (fun == "start_service_by_desktop_name(TQString,TQStringList,TQValueList<TQCString>,TQCString,bool)") ||
+ (fun == "kdeinit_exec(TQString,TQStringList,TQValueList<TQCString>)") ||
+ (fun == "kdeinit_exec_wait(TQString,TQStringList,TQValueList<TQCString>)") ||
+ (fun == "kdeinit_exec(TQString,TQStringList,TQValueList<TQCString>,TQCString)") ||
+ (fun == "kdeinit_exec_wait(TQString,TQStringList,TQValueList<TQCString>,TQCString)"))
{
- QDataStream stream(data, IO_ReadOnly);
+ TQDataStream stream(data, IO_ReadOnly);
bool bNoWait = false;
- QString serviceName;
- QStringList urls;
- QValueList<QCString> envs;
- QCString startup_id = "";
+ TQString serviceName;
+ TQStringList urls;
+ TQValueList<TQCString> envs;
+ TQCString startup_id = "";
DCOPresult.result = -1;
DCOPresult.dcopName = 0;
- DCOPresult.error = QString::null;
+ DCOPresult.error = TQString::null;
DCOPresult.pid = 0;
stream >> serviceName >> urls;
- if ((fun == "start_service_by_name(QString,QStringList,QValueList<QCString>,QCString,bool)") ||
- (fun == "start_service_by_desktop_path(QString,QStringList,QValueList<QCString>,QCString,bool)")||
- (fun == "start_service_by_desktop_name(QString,QStringList,QValueList<QCString>,QCString,bool)"))
+ if ((fun == "start_service_by_name(TQString,TQStringList,TQValueList<TQCString>,TQCString,bool)") ||
+ (fun == "start_service_by_desktop_path(TQString,TQStringList,TQValueList<TQCString>,TQCString,bool)")||
+ (fun == "start_service_by_desktop_name(TQString,TQStringList,TQValueList<TQCString>,TQCString,bool)"))
stream >> envs >> startup_id >> bNoWait;
- else if ((fun == "start_service_by_name(QString,QStringList,QValueList<QCString>,QCString)") ||
- (fun == "start_service_by_desktop_path(QString,QStringList,QValueList<QCString>,QCString)")||
- (fun == "start_service_by_desktop_name(QString,QStringList,QValueList<QCString>,QCString)"))
+ else if ((fun == "start_service_by_name(TQString,TQStringList,TQValueList<TQCString>,TQCString)") ||
+ (fun == "start_service_by_desktop_path(TQString,TQStringList,TQValueList<TQCString>,TQCString)")||
+ (fun == "start_service_by_desktop_name(TQString,TQStringList,TQValueList<TQCString>,TQCString)"))
stream >> envs >> startup_id;
- else if ((fun == "kdeinit_exec(QString,QStringList,QValueList<QCString>)") ||
- (fun == "kdeinit_exec_wait(QString,QStringList,QValueList<QCString>)"))
+ else if ((fun == "kdeinit_exec(TQString,TQStringList,TQValueList<TQCString>)") ||
+ (fun == "kdeinit_exec_wait(TQString,TQStringList,TQValueList<TQCString>)"))
stream >> envs;
- else if ((fun == "kdeinit_exec(QString,QStringList,QValueList<QCString>,QCString)") ||
- (fun == "kdeinit_exec_wait(QString,QStringList,QValueList<QCString>,QCString)"))
+ else if ((fun == "kdeinit_exec(TQString,TQStringList,TQValueList<TQCString>,TQCString)") ||
+ (fun == "kdeinit_exec_wait(TQString,TQStringList,TQValueList<TQCString>,TQCString)"))
stream >> envs >> startup_id;
bool finished;
if (strncmp(fun, "start_service_by_name(", 22) == 0)
@@ -327,9 +327,9 @@ KLauncher::process(const QCString &fun, const QByteArray &data,
kdDebug(7016) << "KLauncher: Got start_service_by_desktop_name('" << serviceName << "', ...)" << endl;
finished = start_service_by_desktop_name(serviceName, urls, envs, startup_id, bNoWait );
}
- else if ((fun == "kdeinit_exec(QString,QStringList)")
- || (fun == "kdeinit_exec(QString,QStringList,QValueList<QCString>)")
- || (fun == "kdeinit_exec(QString,QStringList,QValueList<QCString>,QCString)"))
+ else if ((fun == "kdeinit_exec(TQString,TQStringList)")
+ || (fun == "kdeinit_exec(TQString,TQStringList,TQValueList<TQCString>)")
+ || (fun == "kdeinit_exec(TQString,TQStringList,TQValueList<TQCString>,TQCString)"))
{
kdDebug(7016) << "KLauncher: Got kdeinit_exec('" << serviceName << "', ...)" << endl;
finished = kdeinit_exec(serviceName, urls, envs, startup_id, false);
@@ -342,40 +342,40 @@ KLauncher::process(const QCString &fun, const QByteArray &data,
if (!finished)
{
replyType = "serviceResult";
- QDataStream stream2(replyData, IO_WriteOnly);
+ TQDataStream stream2(replyData, IO_WriteOnly);
stream2 << DCOPresult.result << DCOPresult.dcopName << DCOPresult.error << DCOPresult.pid;
}
return true;
}
- else if (fun == "requestSlave(QString,QString,QString)")
+ else if (fun == "requestSlave(TQString,TQString,TQString)")
{
- QDataStream stream(data, IO_ReadOnly);
- QString protocol;
- QString host;
- QString app_socket;
+ TQDataStream stream(data, IO_ReadOnly);
+ TQString protocol;
+ TQString host;
+ TQString app_socket;
stream >> protocol >> host >> app_socket;
- replyType = "QString";
- QString error;
+ replyType = "TQString";
+ TQString error;
pid_t pid = requestSlave(protocol, host, app_socket, error);
- QDataStream stream2(replyData, IO_WriteOnly);
+ TQDataStream stream2(replyData, IO_WriteOnly);
stream2 << pid << error;
return true;
}
- else if (fun == "requestHoldSlave(KURL,QString)")
+ else if (fun == "requestHoldSlave(KURL,TQString)")
{
- QDataStream stream(data, IO_ReadOnly);
+ TQDataStream stream(data, IO_ReadOnly);
KURL url;
- QString app_socket;
+ TQString app_socket;
stream >> url >> app_socket;
replyType = "pid_t";
pid_t pid = requestHoldSlave(url, app_socket);
- QDataStream stream2(replyData, IO_WriteOnly);
+ TQDataStream stream2(replyData, IO_WriteOnly);
stream2 << pid;
return true;
}
else if (fun == "waitForSlave(pid_t)")
{
- QDataStream stream(data, IO_ReadOnly);
+ TQDataStream stream(data, IO_ReadOnly);
pid_t pid;
stream >> pid;
waitForSlave(pid);
@@ -383,11 +383,11 @@ KLauncher::process(const QCString &fun, const QByteArray &data,
return true;
}
- else if (fun == "setLaunchEnv(QCString,QCString)")
+ else if (fun == "setLaunchEnv(TQCString,TQCString)")
{
- QDataStream stream(data, IO_ReadOnly);
- QCString name;
- QCString value;
+ TQDataStream stream(data, IO_ReadOnly);
+ TQCString name;
+ TQCString value;
stream >> name >> value;
setLaunchEnv(name, value);
replyType = "void";
@@ -425,7 +425,7 @@ KLauncher::process(const QCString &fun, const QByteArray &data,
else if (fun == "autoStart(int)")
{
kdDebug() << "KLauncher::process ---> autoStart(int)" << endl;
- QDataStream stream(data, IO_ReadOnly);
+ TQDataStream stream(data, IO_ReadOnly);
int phase;
stream >> phase;
autoStart(phase);
@@ -453,25 +453,25 @@ QCStringList
KLauncher::functions()
{
QCStringList funcs = DCOPObject::functions();
- funcs << "void exec_blind(QCString,QValueList<QCString>)";
- funcs << "void exec_blind(QCString,QValueList<QCString>,QValueList<QCString>,QCString)";
- funcs << "serviceResult start_service_by_name(QString,QStringList)";
- funcs << "serviceResult start_service_by_desktop_path(QString,QStringList)";
- funcs << "serviceResult start_service_by_desktop_name(QString,QStringList)";
- funcs << "serviceResult kdeinit_exec(QString,QStringList)";
- funcs << "serviceResult kdeinit_exec_wait(QString,QStringList)";
- funcs << "serviceResult start_service_by_name(QString,QStringList,QValueList<QCString>,QCString)";
- funcs << "serviceResult start_service_by_desktop_path(QString,QStringList,QValueList<QCString>,QCString)";
- funcs << "serviceResult start_service_by_desktop_name(QString,QStringList,QValueList<QCString>,QCString)";
- funcs << "serviceResult start_service_by_name(QString,QStringList,QValueList<QCString>,QCString,bool)";
- funcs << "serviceResult start_service_by_desktop_path(QString,QStringList,QValueList<QCString>,QCString,bool)";
- funcs << "serviceResult start_service_by_desktop_name(QString,QStringList,QValueList<QCString>,QCString,bool)";
- funcs << "serviceResult kdeinit_exec(QString,QStringList,QValueList<QCString>)";
- funcs << "serviceResult kdeinit_exec_wait(QString,QStringList,QValueList<QCString>)";
- funcs << "QString requestSlave(QString,QString,QString)";
- funcs << "pid_t requestHoldSlave(KURL,QString)";
+ funcs << "void exec_blind(TQCString,TQValueList<TQCString>)";
+ funcs << "void exec_blind(TQCString,TQValueList<TQCString>,TQValueList<TQCString>,TQCString)";
+ funcs << "serviceResult start_service_by_name(TQString,TQStringList)";
+ funcs << "serviceResult start_service_by_desktop_path(TQString,TQStringList)";
+ funcs << "serviceResult start_service_by_desktop_name(TQString,TQStringList)";
+ funcs << "serviceResult kdeinit_exec(TQString,TQStringList)";
+ funcs << "serviceResult kdeinit_exec_wait(TQString,TQStringList)";
+ funcs << "serviceResult start_service_by_name(TQString,TQStringList,TQValueList<TQCString>,TQCString)";
+ funcs << "serviceResult start_service_by_desktop_path(TQString,TQStringList,TQValueList<TQCString>,TQCString)";
+ funcs << "serviceResult start_service_by_desktop_name(TQString,TQStringList,TQValueList<TQCString>,TQCString)";
+ funcs << "serviceResult start_service_by_name(TQString,TQStringList,TQValueList<TQCString>,TQCString,bool)";
+ funcs << "serviceResult start_service_by_desktop_path(TQString,TQStringList,TQValueList<TQCString>,TQCString,bool)";
+ funcs << "serviceResult start_service_by_desktop_name(TQString,TQStringList,TQValueList<TQCString>,TQCString,bool)";
+ funcs << "serviceResult kdeinit_exec(TQString,TQStringList,TQValueList<TQCString>)";
+ funcs << "serviceResult kdeinit_exec_wait(TQString,TQStringList,TQValueList<TQCString>)";
+ funcs << "TQString requestSlave(TQString,TQString,TQString)";
+ funcs << "pid_t requestHoldSlave(KURL,TQString)";
funcs << "void waitForSlave(pid_t)";
- funcs << "void setLaunchEnv(QCString,QCString)";
+ funcs << "void setLaunchEnv(TQCString,TQCString)";
funcs << "void reparseConfiguration()";
// funcs << "void terminateKDE()";
funcs << "void autoStart()";
@@ -479,13 +479,13 @@ KLauncher::functions()
return funcs;
}
-void KLauncher::setLaunchEnv(const QCString &name, const QCString &_value)
+void KLauncher::setLaunchEnv(const TQCString &name, const TQCString &_value)
{
- QCString value(_value);
+ TQCString value(_value);
if (value.isNull())
value = "";
klauncher_header request_header;
- QByteArray requestData(name.length()+value.length()+2);
+ TQByteArray requestData(name.length()+value.length()+2);
memcpy(requestData.data(), name.data(), name.length()+1);
memcpy(requestData.data()+name.length()+1, value.data(), value.length()+1);
request_header.cmd = LAUNCHER_SETENV;
@@ -524,7 +524,7 @@ void
KLauncher::slotKDEInitData(int)
{
klauncher_header request_header;
- QByteArray requestData;
+ TQByteArray requestData;
if( dontBlockReading )
{
// in case we get a request to start an application and data arrive
@@ -600,7 +600,7 @@ KLauncher::slotKDEInitData(int)
{
lastRequest->status = KLaunchRequest::Error;
if (!requestData.isEmpty())
- lastRequest->errorMsg = QString::fromUtf8((char *) requestData.data());
+ lastRequest->errorMsg = TQString::fromUtf8((char *) requestData.data());
lastRequest = 0;
return;
}
@@ -631,7 +631,7 @@ KLauncher::processDied(pid_t pid, long /* exitStatus */)
}
void
-KLauncher::slotAppRegistered(const QCString &appId)
+KLauncher::slotAppRegistered(const TQCString &appId)
{
const char *cAppId = appId.data();
if (!cAppId) return;
@@ -694,7 +694,7 @@ KLauncher::slotAutoStart()
KService::Ptr s;
do
{
- QString service = mAutoStart.startService();
+ TQString service = mAutoStart.startService();
if (service.isEmpty())
{
// Done
@@ -704,24 +704,24 @@ KLauncher::slotAutoStart()
// Emit signal
if( newStartup )
{
- QCString autoStartSignal;
+ TQCString autoStartSignal;
autoStartSignal.sprintf( "autoStart%dDone()", mAutoStart.phase());
- emitDCOPSignal(autoStartSignal, QByteArray());
+ emitDCOPSignal(autoStartSignal, TQByteArray());
}
else
{
- QCString autoStartSignal( "autoStartDone()" );
+ TQCString autoStartSignal( "autoStartDone()" );
int phase = mAutoStart.phase();
if ( phase > 1 )
autoStartSignal.sprintf( "autoStart%dDone()", phase );
- emitDCOPSignal(autoStartSignal, QByteArray());
+ emitDCOPSignal(autoStartSignal, TQByteArray());
}
}
return;
}
s = new KService(service);
}
- while (!start_service(s, QStringList(), QValueList<QCString>(), "0", false, true));
+ while (!start_service(s, TQStringList(), TQValueList<TQCString>(), "0", false, true));
// Loop till we find a service that we can start.
}
@@ -733,7 +733,7 @@ KLauncher::requestDone(KLaunchRequest *request)
{
DCOPresult.result = 0;
DCOPresult.dcopName = request->dcop_name;
- DCOPresult.error = QString::null;
+ DCOPresult.error = TQString::null;
DCOPresult.pid = request->pid;
}
else
@@ -775,10 +775,10 @@ KLauncher::requestDone(KLaunchRequest *request)
if (request->transaction)
{
- QByteArray replyData;
- QCString replyType;
+ TQByteArray replyData;
+ TQCString replyType;
replyType = "serviceResult";
- QDataStream stream2(replyData, IO_WriteOnly);
+ TQDataStream stream2(replyData, IO_WriteOnly);
stream2 << DCOPresult.result << DCOPresult.dcopName << DCOPresult.error << DCOPresult.pid;
dcopClient()->endTransaction( request->transaction,
replyType, replyData);
@@ -792,18 +792,18 @@ KLauncher::requestStart(KLaunchRequest *request)
requestList.append( request );
// Send request to kdeinit.
klauncher_header request_header;
- QByteArray requestData;
+ TQByteArray requestData;
int length = 0;
length += sizeof(long); // Nr of. Args
length += request->name.length() + 1; // Cmd
- for(QValueList<QCString>::Iterator it = request->arg_list.begin();
+ for(TQValueList<TQCString>::Iterator it = request->arg_list.begin();
it != request->arg_list.end();
it++)
{
length += (*it).length() + 1; // Args...
}
length += sizeof(long); // Nr of. envs
- for(QValueList<QCString>::ConstIterator it = request->envs.begin();
+ for(TQValueList<TQCString>::ConstIterator it = request->envs.begin();
it != request->envs.end();
it++)
{
@@ -826,7 +826,7 @@ KLauncher::requestStart(KLaunchRequest *request)
p += sizeof(long);
strcpy(p, request->name.data());
p += strlen(p) + 1;
- for(QValueList<QCString>::Iterator it = request->arg_list.begin();
+ for(TQValueList<TQCString>::Iterator it = request->arg_list.begin();
it != request->arg_list.end();
it++)
{
@@ -836,7 +836,7 @@ KLauncher::requestStart(KLaunchRequest *request)
l = request->envs.count();
memcpy(p, &l, sizeof(long));
p += sizeof(long);
- for(QValueList<QCString>::ConstIterator it = request->envs.begin();
+ for(TQValueList<TQCString>::ConstIterator it = request->envs.begin();
it != request->envs.end();
it++)
{
@@ -878,8 +878,8 @@ KLauncher::requestStart(KLaunchRequest *request)
}
void
-KLauncher::exec_blind( const QCString &name, const QValueList<QCString> &arg_list,
- const QValueList<QCString> &envs, const QCString& startup_id )
+KLauncher::exec_blind( const TQCString &name, const TQValueList<TQCString> &arg_list,
+ const TQValueList<TQCString> &envs, const TQCString& startup_id )
{
KLaunchRequest *request = new KLaunchRequest;
request->autoStart = false;
@@ -895,7 +895,7 @@ KLauncher::exec_blind( const QCString &name, const QValueList<QCString> &arg_lis
KService::Ptr service = KService::serviceByDesktopName( name.mid( name.findRev( '/' ) + 1 ));
if (service != NULL)
send_service_startup_info( request, service,
- startup_id, QValueList< QCString >());
+ startup_id, TQValueList< TQCString >());
else // no .desktop file, no startup info
cancel_service_startup_info( request, startup_id, envs );
@@ -906,8 +906,8 @@ KLauncher::exec_blind( const QCString &name, const QValueList<QCString> &arg_lis
bool
-KLauncher::start_service_by_name(const QString &serviceName, const QStringList &urls,
- const QValueList<QCString> &envs, const QCString& startup_id, bool blind)
+KLauncher::start_service_by_name(const TQString &serviceName, const TQStringList &urls,
+ const TQValueList<TQCString> &envs, const TQCString& startup_id, bool blind)
{
KService::Ptr service = 0;
// Find service
@@ -923,8 +923,8 @@ KLauncher::start_service_by_name(const QString &serviceName, const QStringList &
}
bool
-KLauncher::start_service_by_desktop_path(const QString &serviceName, const QStringList &urls,
- const QValueList<QCString> &envs, const QCString& startup_id, bool blind)
+KLauncher::start_service_by_desktop_path(const TQString &serviceName, const TQStringList &urls,
+ const TQValueList<TQCString> &envs, const TQCString& startup_id, bool blind)
{
KService::Ptr service = 0;
// Find service
@@ -948,8 +948,8 @@ KLauncher::start_service_by_desktop_path(const QString &serviceName, const QStri
}
bool
-KLauncher::start_service_by_desktop_name(const QString &serviceName, const QStringList &urls,
- const QValueList<QCString> &envs, const QCString& startup_id, bool blind)
+KLauncher::start_service_by_desktop_name(const TQString &serviceName, const TQStringList &urls,
+ const TQValueList<TQCString> &envs, const TQCString& startup_id, bool blind)
{
KService::Ptr service = 0;
// Find service
@@ -965,10 +965,10 @@ KLauncher::start_service_by_desktop_name(const QString &serviceName, const QStri
}
bool
-KLauncher::start_service(KService::Ptr service, const QStringList &_urls,
- const QValueList<QCString> &envs, const QCString& startup_id, bool blind, bool autoStart)
+KLauncher::start_service(KService::Ptr service, const TQStringList &_urls,
+ const TQValueList<TQCString> &envs, const TQCString& startup_id, bool blind, bool autoStart)
{
- QStringList urls = _urls;
+ TQStringList urls = _urls;
if (!service->isValid())
{
DCOPresult.result = ENOEXEC;
@@ -986,19 +986,19 @@ KLauncher::start_service(KService::Ptr service, const QStringList &_urls,
// For the first file we launch the application in the
// usual way. The reported result is based on this
// application.
- QStringList::ConstIterator it = urls.begin();
+ TQStringList::ConstIterator it = urls.begin();
for(++it;
it != urls.end();
++it)
{
- QStringList singleUrl;
+ TQStringList singleUrl;
singleUrl.append(*it);
- QCString startup_id2 = startup_id;
+ TQCString startup_id2 = startup_id;
if( !startup_id2.isEmpty() && startup_id2 != "0" )
startup_id2 = "0"; // can't use the same startup_id several times
start_service( service, singleUrl, envs, startup_id2, true);
}
- QString firstURL = *(urls.begin());
+ TQString firstURL = *(urls.begin());
urls.clear();
urls.append(firstURL);
}
@@ -1022,12 +1022,12 @@ KLauncher::start_service(KService::Ptr service, const QStringList &_urls,
if ((request->dcop_service_type == KService::DCOP_Unique) ||
(request->dcop_service_type == KService::DCOP_Multi))
{
- QVariant v = service->property("X-DCOP-ServiceName");
+ TQVariant v = service->property("X-DCOP-ServiceName");
if (v.isValid())
request->dcop_name = v.toString().utf8();
if (request->dcop_name.isEmpty())
{
- request->dcop_name = QFile::encodeName(KRun::binaryName(service->exec(), true));
+ request->dcop_name = TQFile::encodeName(KRun::binaryName(service->exec(), true));
}
}
@@ -1046,8 +1046,8 @@ KLauncher::start_service(KService::Ptr service, const QStringList &_urls,
}
void
-KLauncher::send_service_startup_info( KLaunchRequest *request, KService::Ptr service, const QCString& startup_id,
- const QValueList<QCString> &envs )
+KLauncher::send_service_startup_info( KLaunchRequest *request, KService::Ptr service, const TQCString& startup_id,
+ const TQValueList<TQCString> &envs )
{
#if defined Q_WS_X11 && ! defined K_WS_QTONLY
//#ifdef Q_WS_X11 // KStartup* isn't implemented for Qt/Embedded yet
@@ -1055,13 +1055,13 @@ KLauncher::send_service_startup_info( KLaunchRequest *request, KService::Ptr ser
if( startup_id == "0" )
return;
bool silent;
- QCString wmclass;
- if( !KRun::checkStartupNotify( QString::null, service, &silent, &wmclass ))
+ TQCString wmclass;
+ if( !KRun::checkStartupNotify( TQString::null, service, &silent, &wmclass ))
return;
KStartupInfoId id;
id.initId( startup_id );
const char* dpy_str = NULL;
- for( QValueList<QCString>::ConstIterator it = envs.begin();
+ for( TQValueList<TQCString>::ConstIterator it = envs.begin();
it != envs.end();
++it )
if( strncmp( *it, "DISPLAY=", 8 ) == 0 )
@@ -1101,8 +1101,8 @@ KLauncher::send_service_startup_info( KLaunchRequest *request, KService::Ptr ser
}
void
-KLauncher::cancel_service_startup_info( KLaunchRequest* request, const QCString& startup_id,
- const QValueList<QCString> &envs )
+KLauncher::cancel_service_startup_info( KLaunchRequest* request, const TQCString& startup_id,
+ const TQValueList<TQCString> &envs )
{
#if defined Q_WS_X11 && ! defined K_WS_QTONLY
//#ifdef Q_WS_X11 // KStartup* isn't implemented for Qt/Embedded yet
@@ -1111,7 +1111,7 @@ KLauncher::cancel_service_startup_info( KLaunchRequest* request, const QCString&
if( !startup_id.isEmpty() && startup_id != "0" )
{
const char* dpy_str = NULL;
- for( QValueList<QCString>::ConstIterator it = envs.begin();
+ for( TQValueList<TQCString>::ConstIterator it = envs.begin();
it != envs.end();
++it )
if( strncmp( *it, "DISPLAY=", 8 ) == 0 )
@@ -1135,17 +1135,17 @@ KLauncher::cancel_service_startup_info( KLaunchRequest* request, const QCString&
}
bool
-KLauncher::kdeinit_exec(const QString &app, const QStringList &args,
- const QValueList<QCString> &envs, QCString startup_id, bool wait)
+KLauncher::kdeinit_exec(const TQString &app, const TQStringList &args,
+ const TQValueList<TQCString> &envs, TQCString startup_id, bool wait)
{
KLaunchRequest *request = new KLaunchRequest;
request->autoStart = false;
- for(QStringList::ConstIterator it = args.begin();
+ for(TQStringList::ConstIterator it = args.begin();
it != args.end();
it++)
{
- QString arg = *it;
+ TQString arg = *it;
request->arg_list.append(arg.local8Bit());
}
@@ -1167,7 +1167,7 @@ KLauncher::kdeinit_exec(const QString &app, const QStringList &args,
KService::Ptr service = KService::serviceByDesktopName( app.mid( app.findRev( '/' ) + 1 ));
if (service != NULL)
send_service_startup_info( request, service,
- startup_id, QValueList< QCString >());
+ startup_id, TQValueList< TQCString >());
else // no .desktop file, no startup info
cancel_service_startup_info( request, startup_id, envs );
}
@@ -1183,7 +1183,7 @@ KLauncher::queueRequest(KLaunchRequest *request)
if (!bProcessingQueue)
{
bProcessingQueue = true;
- QTimer::singleShot(0, this, SLOT( slotDequeue() ));
+ TQTimer::singleShot(0, this, TQT_SLOT( slotDequeue() ));
}
}
@@ -1207,22 +1207,22 @@ KLauncher::slotDequeue()
void
KLauncher::createArgs( KLaunchRequest *request, const KService::Ptr service ,
- const QStringList &urls)
+ const TQStringList &urls)
{
- QStringList params = KRun::processDesktopExec(*service, urls, false);
+ TQStringList params = KRun::processDesktopExec(*service, urls, false);
- for(QStringList::ConstIterator it = params.begin();
+ for(TQStringList::ConstIterator it = params.begin();
it != params.end(); ++it)
{
request->arg_list.append((*it).local8Bit());
}
- request->cwd = QFile::encodeName(service->path());
+ request->cwd = TQFile::encodeName(service->path());
}
///// IO-Slave functions
pid_t
-KLauncher::requestHoldSlave(const KURL &url, const QString &app_socket)
+KLauncher::requestHoldSlave(const KURL &url, const TQString &app_socket)
{
IdleSlave *slave;
for(slave = mSlaveList.first(); slave; slave = mSlaveList.next())
@@ -1241,10 +1241,10 @@ KLauncher::requestHoldSlave(const KURL &url, const QString &app_socket)
pid_t
-KLauncher::requestSlave(const QString &protocol,
- const QString &host,
- const QString &app_socket,
- QString &error)
+KLauncher::requestSlave(const TQString &protocol,
+ const TQString &host,
+ const TQString &app_socket,
+ TQString &error)
{
IdleSlave *slave;
for(slave = mSlaveList.first(); slave; slave = mSlaveList.next())
@@ -1264,7 +1264,7 @@ KLauncher::requestSlave(const QString &protocol,
{
for(slave = mSlaveList.first(); slave; slave = mSlaveList.next())
{
- if (slave->match(protocol, QString::null, false))
+ if (slave->match(protocol, TQString::null, false))
break;
}
}
@@ -1275,18 +1275,18 @@ KLauncher::requestSlave(const QString &protocol,
return slave->pid();
}
- QString _name = KProtocolInfo::exec(protocol);
+ TQString _name = KProtocolInfo::exec(protocol);
if (_name.isEmpty())
{
error = i18n("Unknown protocol '%1'.\n").arg(protocol);
return 0;
}
- QCString name = _name.latin1(); // ex: "kio_ftp"
- QCString arg1 = protocol.latin1();
- QCString arg2 = QFile::encodeName(mPoolSocketName);
- QCString arg3 = QFile::encodeName(app_socket);
- QValueList<QCString> arg_list;
+ TQCString name = _name.latin1(); // ex: "kio_ftp"
+ TQCString arg1 = protocol.latin1();
+ TQCString arg2 = TQFile::encodeName(mPoolSocketName);
+ TQCString arg3 = TQFile::encodeName(app_socket);
+ TQValueList<TQCString> arg_list;
arg_list.append(arg1);
arg_list.append(arg2);
arg_list.append(arg3);
@@ -1301,11 +1301,11 @@ KLauncher::requestSlave(const QString &protocol,
}
if (mSlaveValgrind == arg1)
{
- arg_list.prepend(QFile::encodeName(KLibLoader::findLibrary(name)));
- arg_list.prepend(QFile::encodeName(locate("exe", "kioslave")));
+ arg_list.prepend(TQFile::encodeName(KLibLoader::findLibrary(name)));
+ arg_list.prepend(TQFile::encodeName(locate("exe", "kioslave")));
name = "valgrind";
if (!mSlaveValgrindSkin.isEmpty()) {
- arg_list.prepend(QCString("--tool=") + mSlaveValgrindSkin);
+ arg_list.prepend(TQCString("--tool=") + mSlaveValgrindSkin);
} else
arg_list.prepend("--tool=memcheck");
}
@@ -1357,9 +1357,9 @@ KLauncher::acceptSlave(KSocket *slaveSocket)
IdleSlave *slave = new IdleSlave(slaveSocket);
// Send it a SLAVE_STATUS command.
mSlaveList.append(slave);
- connect(slave, SIGNAL(destroyed()), this, SLOT(slotSlaveGone()));
- connect(slave, SIGNAL(statusUpdate(IdleSlave *)),
- this, SLOT(slotSlaveStatus(IdleSlave *)));
+ connect(slave, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotSlaveGone()));
+ connect(slave, TQT_SIGNAL(statusUpdate(IdleSlave *)),
+ this, TQT_SLOT(slotSlaveStatus(IdleSlave *)));
if (!mTimer.isActive())
{
mTimer.start(1000*10);
@@ -1374,8 +1374,8 @@ KLauncher::slotSlaveStatus(IdleSlave *slave)
{
if (waitRequest->pid == slave->pid())
{
- QByteArray replyData;
- QCString replyType;
+ TQByteArray replyData;
+ TQCString replyType;
replyType = "void";
dcopClient()->endTransaction( waitRequest->transaction, replyType, replyData);
mSlaveWaitRequest.removeRef(waitRequest);
diff --git a/kinit/klauncher.h b/kinit/klauncher.h
index a9ed80f3b..e681939e1 100644
--- a/kinit/klauncher.h
+++ b/kinit/klauncher.h
@@ -23,11 +23,11 @@
#include <sys/types.h>
#include <unistd.h>
#include <time.h>
-#include <qstring.h>
-#include <qvaluelist.h>
-#include <qsocketnotifier.h>
-#include <qptrlist.h>
-#include <qtimer.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
+#include <tqsocketnotifier.h>
+#include <tqptrlist.h>
+#include <tqtimer.h>
#include <dcopclient.h>
#include <kio/connection.h>
@@ -44,13 +44,13 @@ class IdleSlave : public QObject
Q_OBJECT
public:
IdleSlave(KSocket *socket);
- bool match( const QString &protocol, const QString &host, bool connected);
- void connect( const QString &app_socket);
+ bool match( const TQString &protocol, const TQString &host, bool connected);
+ void connect( const TQString &app_socket);
pid_t pid() const { return mPid;}
int age(time_t now);
void reparseConfiguration();
bool onHold(const KURL &url);
- QString protocol() const {return mProtocol;}
+ TQString protocol() const {return mProtocol;}
signals:
void statusUpdate(IdleSlave *);
@@ -60,8 +60,8 @@ protected slots:
protected:
KIO::Connection mConn;
- QString mProtocol;
- QString mHost;
+ TQString mProtocol;
+ TQString mHost;
bool mConnected;
pid_t mPid;
time_t mBirthDate;
@@ -79,29 +79,29 @@ public:
class KLaunchRequest
{
public:
- QCString name;
- QValueList<QCString> arg_list;
- QCString dcop_name;
+ TQCString name;
+ TQValueList<TQCString> arg_list;
+ TQCString dcop_name;
enum status_t { Init = 0, Launching, Running, Error, Done };
pid_t pid;
status_t status;
DCOPClientTransaction *transaction;
KService::DCOPServiceType_t dcop_service_type;
bool autoStart;
- QString errorMsg;
+ TQString errorMsg;
#ifdef Q_WS_X11
- QCString startup_id; // "" is the default, "0" for none
- QCString startup_dpy; // Display to send startup notification to.
+ TQCString startup_id; // "" is the default, "0" for none
+ TQCString startup_dpy; // Display to send startup notification to.
#endif
- QValueList<QCString> envs; // env. variables to be app's environment
- QCString cwd;
+ TQValueList<TQCString> envs; // env. variables to be app's environment
+ TQCString cwd;
};
struct serviceResult
{
int result; // 0 means success. > 0 means error (-1 means pending)
- QCString dcopName; // Contains DCOP name on success
- QString error; // Contains error description on failure.
+ TQCString dcopName; // Contains DCOP name on success
+ TQString error; // Contains error description on failure.
pid_t pid;
};
@@ -118,8 +118,8 @@ public:
static void destruct(int exit_code); // exit!
// DCOP
- virtual bool process(const QCString &fun, const QByteArray &data,
- QCString &replyType, QByteArray &replyData);
+ virtual bool process(const TQCString &fun, const TQByteArray &data,
+ TQCString &replyType, TQByteArray &replyData);
virtual QCStringList functions();
virtual QCStringList interfaces();
@@ -129,68 +129,68 @@ protected:
void requestStart(KLaunchRequest *request);
void requestDone(KLaunchRequest *request);
- void setLaunchEnv(const QCString &name, const QCString &value);
- void exec_blind(const QCString &name, const QValueList<QCString> &arg_list,
- const QValueList<QCString> &envs, const QCString& startup_id = "" );
- bool start_service(KService::Ptr service, const QStringList &urls,
- const QValueList<QCString> &envs, const QCString& startup_id = "",
+ void setLaunchEnv(const TQCString &name, const TQCString &value);
+ void exec_blind(const TQCString &name, const TQValueList<TQCString> &arg_list,
+ const TQValueList<TQCString> &envs, const TQCString& startup_id = "" );
+ bool start_service(KService::Ptr service, const TQStringList &urls,
+ const TQValueList<TQCString> &envs, const TQCString& startup_id = "",
bool blind = false, bool autoStart = false );
- bool start_service_by_name(const QString &serviceName, const QStringList &urls,
- const QValueList<QCString> &envs, const QCString& startup_id, bool blind);
- bool start_service_by_desktop_path(const QString &serviceName, const QStringList &urls,
- const QValueList<QCString> &envs, const QCString& startup_id, bool blind);
- bool start_service_by_desktop_name(const QString &serviceName, const QStringList &urls,
- const QValueList<QCString> &envs, const QCString& startup_id, bool blind);
- bool kdeinit_exec(const QString &app, const QStringList &args,
- const QValueList<QCString> &envs, QCString startup_id, bool wait);
+ bool start_service_by_name(const TQString &serviceName, const TQStringList &urls,
+ const TQValueList<TQCString> &envs, const TQCString& startup_id, bool blind);
+ bool start_service_by_desktop_path(const TQString &serviceName, const TQStringList &urls,
+ const TQValueList<TQCString> &envs, const TQCString& startup_id, bool blind);
+ bool start_service_by_desktop_name(const TQString &serviceName, const TQStringList &urls,
+ const TQValueList<TQCString> &envs, const TQCString& startup_id, bool blind);
+ bool kdeinit_exec(const TQString &app, const TQStringList &args,
+ const TQValueList<TQCString> &envs, TQCString startup_id, bool wait);
void waitForSlave(pid_t pid);
void autoStart(int phase);
void createArgs( KLaunchRequest *request, const KService::Ptr service,
- const QStringList &url);
+ const TQStringList &url);
- pid_t requestHoldSlave(const KURL &url, const QString &app_socket);
- pid_t requestSlave(const QString &protocol, const QString &host,
- const QString &app_socket, QString &error);
+ pid_t requestHoldSlave(const KURL &url, const TQString &app_socket);
+ pid_t requestSlave(const TQString &protocol, const TQString &host,
+ const TQString &app_socket, TQString &error);
void queueRequest(KLaunchRequest *);
- void send_service_startup_info( KLaunchRequest *request, KService::Ptr service, const QCString& startup_id,
- const QValueList<QCString> &envs );
- void cancel_service_startup_info( KLaunchRequest *request, const QCString& startup_id,
- const QValueList<QCString> &envs );
+ void send_service_startup_info( KLaunchRequest *request, KService::Ptr service, const TQCString& startup_id,
+ const TQValueList<TQCString> &envs );
+ void cancel_service_startup_info( KLaunchRequest *request, const TQCString& startup_id,
+ const TQValueList<TQCString> &envs );
public slots:
void slotAutoStart();
void slotDequeue();
void slotKDEInitData(int);
- void slotAppRegistered(const QCString &appId);
+ void slotAppRegistered(const TQCString &appId);
void slotSlaveStatus(IdleSlave *);
void acceptSlave( KSocket *);
void slotSlaveGone();
void idleTimeout();
protected:
- QPtrList<KLaunchRequest> requestList; // Requests being handled
- QPtrList<KLaunchRequest> requestQueue; // Requests waiting to being handled
+ TQPtrList<KLaunchRequest> requestList; // Requests being handled
+ TQPtrList<KLaunchRequest> requestQueue; // Requests waiting to being handled
int kdeinitSocket;
- QSocketNotifier *kdeinitNotifier;
+ TQSocketNotifier *kdeinitNotifier;
serviceResult DCOPresult;
KLaunchRequest *lastRequest;
- QPtrList<SlaveWaitRequest> mSlaveWaitRequest;
- QString mPoolSocketName;
+ TQPtrList<SlaveWaitRequest> mSlaveWaitRequest;
+ TQString mPoolSocketName;
KServerSocket *mPoolSocket;
- QPtrList<IdleSlave> mSlaveList;
- QTimer mTimer;
- QTimer mAutoTimer;
+ TQPtrList<IdleSlave> mSlaveList;
+ TQTimer mTimer;
+ TQTimer mAutoTimer;
bool bProcessingQueue;
AutoStart mAutoStart;
- QCString mSlaveDebug;
- QCString mSlaveValgrind;
- QCString mSlaveValgrindSkin;
+ TQCString mSlaveDebug;
+ TQCString mSlaveValgrind;
+ TQCString mSlaveValgrindSkin;
bool dontBlockReading;
bool newStartup;
#ifdef Q_WS_X11
diff --git a/kinit/klauncher_main.cpp b/kinit/klauncher_main.cpp
index fd5ea813e..80b96980c 100644
--- a/kinit/klauncher_main.cpp
+++ b/kinit/klauncher_main.cpp
@@ -30,7 +30,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
-#include <qcstring.h>
+#include <tqcstring.h>
#include <klocale.h>
#include "klauncher_cmds.h"
@@ -60,7 +60,7 @@ extern "C" KDE_EXPORT int kdemain( int argc, char**argv )
return 1;
}
- QCString cname = KApplication::launcher();
+ TQCString cname = KApplication::launcher();
char *name = cname.data();
KCmdLineArgs::init(argc, argv, name, "KLauncher", "A service launcher.",
"v1.0");
@@ -79,7 +79,7 @@ extern "C" KDE_EXPORT int kdemain( int argc, char**argv )
int maxTry = 3;
while(true)
{
- QCString dcopName = KApplication::dcopClient()->registerAs(name, false);
+ TQCString dcopName = KApplication::dcopClient()->registerAs(name, false);
if (dcopName.isEmpty())
{
kdWarning() << "DCOP communication problem!" << endl;
diff --git a/kinit/tests/klaunchertest.cpp b/kinit/tests/klaunchertest.cpp
index 56cc93c24..c42fdf686 100644
--- a/kinit/tests/klaunchertest.cpp
+++ b/kinit/tests/klaunchertest.cpp
@@ -18,11 +18,11 @@
Boston, MA 02110-1301, USA.
*/
-#include <qstring.h>
+#include <tqstring.h>
#include <kapplication.h>
#include <dcopclient.h>
#include <stdio.h>
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include <kservice.h>
@@ -35,17 +35,17 @@ int main(int argc, char *argv[])
kapp->dcopClient()->registerAs( kapp->name()) ;
#if 0
- QString error;
- QCString dcopService;
+ TQString error;
+ TQCString dcopService;
int pid;
int result = KApplication::startServiceByDesktopName(
- QString::fromLatin1("konsole"), QString::null, &error, &dcopService, &pid );
+ TQString::fromLatin1("konsole"), TQString::null, &error, &dcopService, &pid );
printf("Result = %d, error = \"%s\", dcopService = \"%s\", pid = %d\n",
result, error.ascii(), dcopService.data(), pid);
result = KApplication::startServiceByDesktopName(
- QString::fromLatin1("konqueror"), QString::null, &error, &dcopService, &pid );
+ TQString::fromLatin1("konqueror"), TQString::null, &error, &dcopService, &pid );
printf("Result = %d, error = \"%s\", dcopService = \"%s\", pid = %d\n",
result, error.ascii(), dcopService.data(), pid);
diff --git a/kinit/wrapper.c b/kinit/wrapper.c
index d1d754b7b..27d208376 100644
--- a/kinit/wrapper.c
+++ b/kinit/wrapper.c
@@ -47,9 +47,9 @@ static char *getDisplay()
char *colon;
char *i;
/*
- don't test for a value from qglobal.h but instead distinguish
+ don't test for a value from tqglobal.h but instead distinguish
Qt/X11 from Qt/Embedded by the fact that Qt/E apps have -DQWS
- on the commandline (which in qglobal.h however triggers Q_WS_QWS,
+ on the commandline (which in tqglobal.h however triggers Q_WS_QWS,
but we don't want to include that here) (Simon)
#ifdef Q_WS_X11
*/