summaryrefslogtreecommitdiffstats
path: root/kinit
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-03 04:12:51 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-03 04:12:51 +0000
commit560378aaca1784ba19806a0414a32b20c744de39 (patch)
treece0dfd7c3febf2a1adc7603d1019a8be2083c415 /kinit
parentd4d5af1cdbd3cc65d095e0afc5b1f4260091cf5d (diff)
downloadtdelibs-560378aaca1784ba19806a0414a32b20c744de39.tar.gz
tdelibs-560378aaca1784ba19806a0414a32b20c744de39.zip
Automated conversion for enhanced compatibility with TQt for Qt4 3.4.0 TP1
NOTE: This will not compile with Qt4 (yet), however it does compile with Qt3 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1211081 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kinit')
-rw-r--r--kinit/autostart.cpp16
-rw-r--r--kinit/configure.in.in2
-rw-r--r--kinit/kdostartupconfig.cpp16
-rw-r--r--kinit/kinit.cpp24
-rw-r--r--kinit/kioslave.cpp2
-rw-r--r--kinit/klauncher.cpp20
-rw-r--r--kinit/klauncher.h4
-rw-r--r--kinit/kstartupconfig.cpp2
-rw-r--r--kinit/lnusertemp.c2
-rw-r--r--kinit/tests/klaunchertest.cpp4
10 files changed, 46 insertions, 46 deletions
diff --git a/kinit/autostart.cpp b/kinit/autostart.cpp
index 8c54a255c..9647727f2 100644
--- a/kinit/autostart.cpp
+++ b/kinit/autostart.cpp
@@ -82,10 +82,10 @@ void AutoStart::setPhaseDone()
static TQString extractName(TQString path)
{
- int i = path.findRev('/');
+ int i = path.tqfindRev('/');
if (i >= 0)
path = path.mid(i+1);
- i = path.findRev('.');
+ i = path.tqfindRev('.');
if (i >= 0)
path = path.left(i);
return path;
@@ -141,14 +141,14 @@ AutoStart::loadAutoStartList()
// Same local file name?
TQString localOuter;
TQString localInner;
- int slashPos = (*it).findRev( '/', -1, TRUE );
+ int slashPos = (*it).tqfindRev( '/', -1, TRUE );
if (slashPos == -1) {
localOuter = (*it);
}
else {
localOuter = (*it).mid(slashPos+1);
}
- slashPos = (*localit).findRev( '/', -1, TRUE );
+ slashPos = (*localit).tqfindRev( '/', -1, TRUE );
if (slashPos == -1) {
localInner = (*localit);
}
@@ -172,23 +172,23 @@ AutoStart::loadAutoStartList()
if (config.hasKey("OnlyShowIn"))
{
- if (!config.readListEntry("OnlyShowIn", ';').contains("KDE"))
+ if (!config.readListEntry("OnlyShowIn", ';').tqcontains("KDE"))
continue;
}
if (config.hasKey("NotShowIn"))
{
- if (config.readListEntry("NotShowIn", ';').contains("KDE"))
+ if (config.readListEntry("NotShowIn", ';').tqcontains("KDE"))
continue;
}
if (config.hasKey("OnlyShowIn"))
{
- if (!config.readListEntry("OnlyShowIn", ';').contains("KDE"))
+ if (!config.readListEntry("OnlyShowIn", ';').tqcontains("KDE"))
continue;
}
if (config.hasKey("NotShowIn"))
{
- if (config.readListEntry("NotShowIn", ';').contains("KDE"))
+ if (config.readListEntry("NotShowIn", ';').tqcontains("KDE"))
continue;
}
diff --git a/kinit/configure.in.in b/kinit/configure.in.in
index 2ba692872..81504da15 100644
--- a/kinit/configure.in.in
+++ b/kinit/configure.in.in
@@ -3,7 +3,7 @@ dnl check if Qt is linked against Xft
KDE_CHECK_LIB(qt-mt,XftInit,[],[KDEINIT_USE_XFT=])
dnl Xft requires freetype to compile
-KDE_FIND_PATH(fontconfig-config, FONTCONFIG_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/bin /usr/local/bin /opt/local/bin], [ KDE_FIND_PATH(pkg-config, PKGCONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/bin /usr/local/bin /opt/local/bin], [AC_MSG_WARN([Could not find neither pkg-config nor fontconfig-config, check http://www.fontconfig.org/ ])
+KDE_FIND_PATH(fontconfig-config, FONTCONFIG_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/bin /usr/local/bin /opt/local/bin], [ KDE_FIND_PATH(pkg-config, PKGCONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/bin /usr/local/bin /opt/local/bin], [AC_MSG_WARN([Could not tqfind neither pkg-config nor fontconfig-config, check http://www.fontconfig.org/ ])
])
])
diff --git a/kinit/kdostartupconfig.cpp b/kinit/kdostartupconfig.cpp
index b9885453b..48daebbc3 100644
--- a/kinit/kdostartupconfig.cpp
+++ b/kinit/kdostartupconfig.cpp
@@ -105,10 +105,10 @@ int main()
{
TQString key = it.key();
TQString value = *it;
- startupconfig << file.replace( ' ', '_' ).lower()
- << "_" << group.replace( ' ', '_' ).lower()
- << "_" << key.replace( ' ', '_' ).lower()
- << "=\"" << value.replace( "\"", "\\\"" ) << "\"\n";
+ startupconfig << file.tqreplace( ' ', '_' ).lower()
+ << "_" << group.tqreplace( ' ', '_' ).lower()
+ << "_" << key.tqreplace( ' ', '_' ).lower()
+ << "=\"" << value.tqreplace( "\"", "\\\"" ) << "\"\n";
}
}
else
@@ -119,10 +119,10 @@ int main()
cfg.setGroup( group );
TQString value = cfg.readEntry( key, def );
startupconfig << "# " << line << "\n";
- startupconfig << file.replace( ' ', '_' ).lower()
- << "_" << group.replace( ' ', '_' ).lower()
- << "_" << key.replace( ' ', '_' ).lower()
- << "=\"" << value.replace( "\"", "\\\"" ) << "\"\n";
+ startupconfig << file.tqreplace( ' ', '_' ).lower()
+ << "_" << group.tqreplace( ' ', '_' ).lower()
+ << "_" << key.tqreplace( ' ', '_' ).lower()
+ << "=\"" << value.tqreplace( "\"", "\\\"" ) << "\"\n";
}
startupconfigfiles << line << endl;
// use even currently non-existing paths in $KDEDIRS
diff --git a/kinit/kinit.cpp b/kinit/kinit.cpp
index f34a6a219..94ca0fede 100644
--- a/kinit/kinit.cpp
+++ b/kinit/kinit.cpp
@@ -370,7 +370,7 @@ TQCString execpath_avoid_loops( const TQCString& exec, int envc, const char* env
s_instance->dirs()->findExe( exec, paths.join( TQString( ":" ))));
if( avoid_loops && !execpath.isEmpty())
{
- int pos = execpath.findRev( '/' );
+ int pos = execpath.tqfindRev( '/' );
TQString bin_path = execpath.left( pos );
for( TQStringList::Iterator it = paths.begin();
it != paths.end();
@@ -456,7 +456,7 @@ static pid_t launch(int argc, const char *_name, const char *args,
{
lib = _name;
name = _name;
- name = name.mid( name.findRev('/') + 1);
+ name = name.mid( name.tqfindRev('/') + 1);
exec = _name;
if (lib.right(3) == ".la")
libpath = lib;
@@ -535,7 +535,7 @@ static pid_t launch(int argc, const char *_name, const char *args,
++it )
{
TQCString tmp( it.current());
- int pos = tmp.find( '=' );
+ int pos = tmp.tqfind( '=' );
if( pos >= 0 )
unsetenv( tmp.left( pos ));
}
@@ -586,7 +586,7 @@ static pid_t launch(int argc, const char *_name, const char *args,
d.handle = 0;
if (libpath.isEmpty() && execpath.isEmpty())
{
- TQString errorMsg = i18n("Could not find '%1' executable.").arg(TQFile::decodeName(_name));
+ TQString errorMsg = i18n("Could not tqfind '%1' executable.").arg(TQFile::decodeName(_name));
exitWithErrorMsg(errorMsg);
}
@@ -644,8 +644,8 @@ static pid_t launch(int argc, const char *_name, const char *args,
if (!d.sym )
{
const char * ltdlError = lt_dlerror();
- fprintf(stderr, "Could not find kdemain: %s\n", ltdlError != 0 ? ltdlError : "(null)" );
- TQString errorMsg = i18n("Could not find 'kdemain' in '%1'.\n%2").arg(libpath)
+ fprintf(stderr, "Could not tqfind kdemain: %s\n", ltdlError != 0 ? ltdlError : "(null)" );
+ TQString errorMsg = i18n("Could not tqfind 'kdemain' in '%1'.\n%2").arg(libpath)
.arg(ltdlError ? TQFile::decodeName(ltdlError) : i18n("Unknown error"));
exitWithErrorMsg(errorMsg);
}
@@ -1477,16 +1477,16 @@ static void kdeinit_library_path()
it++)
{
TQString d = *it;
- if (ltdl_library_path.contains(d))
+ if (ltdl_library_path.tqcontains(d))
continue;
- if (ld_library_path.contains(d))
+ if (ld_library_path.tqcontains(d))
continue;
if (d[d.length()-1] == '/')
{
d.truncate(d.length()-1);
- if (ltdl_library_path.contains(d))
+ if (ltdl_library_path.tqcontains(d))
continue;
- if (ld_library_path.contains(d))
+ if (ld_library_path.tqcontains(d))
continue;
}
if ((d == "/lib") || (d == "/usr/lib"))
@@ -1517,7 +1517,7 @@ static void kdeinit_library_path()
exit(255);
}
int i;
- if((i = display.findRev('.')) > display.findRev(':') && i >= 0)
+ if((i = display.tqfindRev('.')) > display.tqfindRev(':') && i >= 0)
display.truncate(i);
TQCString socketName = TQFile::encodeName(locateLocal("socket", TQString("kdeinit-%1").arg(display), s_instance));
@@ -1529,7 +1529,7 @@ static void kdeinit_library_path()
}
strcpy(sock_file_old, socketName.data());
- display.replace(":","_");
+ display.tqreplace(":","_");
socketName = TQFile::encodeName(locateLocal("socket", TQString("kdeinit_%1").arg(display), s_instance));
if (socketName.length() >= MAX_SOCK_FILE)
{
diff --git a/kinit/kioslave.cpp b/kinit/kioslave.cpp
index 215f53c67..e4843338a 100644
--- a/kinit/kioslave.cpp
+++ b/kinit/kioslave.cpp
@@ -82,7 +82,7 @@ int main(int argc, char **argv)
if (!sym )
{
const char * ltdlError = lt_dlerror();
- fprintf(stderr, "Could not find main: %s\n", ltdlError != 0 ? ltdlError : "(null)" );
+ fprintf(stderr, "Could not tqfind main: %s\n", ltdlError != 0 ? ltdlError : "(null)" );
exit(1);
}
}
diff --git a/kinit/klauncher.cpp b/kinit/klauncher.cpp
index 2b49a0ac8..a4d5eb041 100644
--- a/kinit/klauncher.cpp
+++ b/kinit/klauncher.cpp
@@ -102,7 +102,7 @@ IdleSlave::gotInput()
pid_t pid;
TQCString protocol;
TQString host;
- Q_INT8 b;
+ TQ_INT8 b;
stream >> pid >> protocol >> host >> b;
// Overload with (bool) onHold, (KURL) url.
if (!stream.atEnd())
@@ -181,7 +181,7 @@ KLauncher::KLauncher(int _kdeinitSocket, bool new_startup)
objId(), "terminateKDE()", false );
TQString prefix = locateLocal("socket", "klauncher");
- KTempFile domainname(prefix, TQString::fromLatin1(".slave-socket"));
+ KTempFile domainname(prefix, TQString::tqfromLatin1(".slave-socket"));
if (domainname.status() != 0)
{
// Sever error!
@@ -722,7 +722,7 @@ KLauncher::slotAutoStart()
s = new KService(service);
}
while (!start_service(s, TQStringList(), TQValueList<TQCString>(), "0", false, true));
- // Loop till we find a service that we can start.
+ // Loop till we tqfind a service that we can start.
}
void
@@ -892,7 +892,7 @@ KLauncher::exec_blind( const TQCString &name, const TQValueList<TQCString> &arg_
request->transaction = 0; // No confirmation is send
request->envs = envs;
// Find service, if any - strip path if needed
- KService::Ptr service = KService::serviceByDesktopName( name.mid( name.findRev( '/' ) + 1 ));
+ KService::Ptr service = KService::serviceByDesktopName( name.mid( name.tqfindRev( '/' ) + 1 ));
if (service != NULL)
send_service_startup_info( request, service,
startup_id, TQValueList< TQCString >());
@@ -915,7 +915,7 @@ KLauncher::start_service_by_name(const TQString &serviceName, const TQStringList
if (!service)
{
DCOPresult.result = ENOENT;
- DCOPresult.error = i18n("Could not find service '%1'.").arg(serviceName);
+ DCOPresult.error = i18n("Could not tqfind service '%1'.").arg(serviceName);
cancel_service_startup_info( NULL, startup_id, envs ); // cancel it if any
return false;
}
@@ -940,7 +940,7 @@ KLauncher::start_service_by_desktop_path(const TQString &serviceName, const TQSt
if (!service)
{
DCOPresult.result = ENOENT;
- DCOPresult.error = i18n("Could not find service '%1'.").arg(serviceName);
+ DCOPresult.error = i18n("Could not tqfind service '%1'.").arg(serviceName);
cancel_service_startup_info( NULL, startup_id, envs ); // cancel it if any
return false;
}
@@ -957,7 +957,7 @@ KLauncher::start_service_by_desktop_name(const TQString &serviceName, const TQSt
if (!service)
{
DCOPresult.result = ENOENT;
- DCOPresult.error = i18n("Could not find service '%1'.").arg(serviceName);
+ DCOPresult.error = i18n("Could not tqfind service '%1'.").arg(serviceName);
cancel_service_startup_info( NULL, startup_id, envs ); // cancel it if any
return false;
}
@@ -1164,7 +1164,7 @@ KLauncher::kdeinit_exec(const TQString &app, const TQStringList &args,
if( app != "kbuildsycoca" ) // avoid stupid loop
{
// Find service, if any - strip path if needed
- KService::Ptr service = KService::serviceByDesktopName( app.mid( app.findRev( '/' ) + 1 ));
+ KService::Ptr service = KService::serviceByDesktopName( app.mid( app.tqfindRev( '/' ) + 1 ));
if (service != NULL)
send_service_startup_info( request, service,
startup_id, TQValueList< TQCString >());
@@ -1359,7 +1359,7 @@ KLauncher::acceptSlave(KSocket *slaveSocket)
mSlaveList.append(slave);
connect(slave, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotSlaveGone()));
connect(slave, TQT_SIGNAL(statusUpdate(IdleSlave *)),
- this, TQT_SLOT(slotSlaveStatus(IdleSlave *)));
+ this, TQT_SLOT(slotSlavetqStatus(IdleSlave *)));
if (!mTimer.isActive())
{
mTimer.start(1000*10);
@@ -1367,7 +1367,7 @@ KLauncher::acceptSlave(KSocket *slaveSocket)
}
void
-KLauncher::slotSlaveStatus(IdleSlave *slave)
+KLauncher::slotSlavetqStatus(IdleSlave *slave)
{
SlaveWaitRequest *waitRequest = mSlaveWaitRequest.first();
while(waitRequest)
diff --git a/kinit/klauncher.h b/kinit/klauncher.h
index e681939e1..c34a48150 100644
--- a/kinit/klauncher.h
+++ b/kinit/klauncher.h
@@ -39,7 +39,7 @@
#include "autostart.h"
-class IdleSlave : public QObject
+class IdleSlave : public TQObject
{
Q_OBJECT
public:
@@ -168,7 +168,7 @@ public slots:
void slotDequeue();
void slotKDEInitData(int);
void slotAppRegistered(const TQCString &appId);
- void slotSlaveStatus(IdleSlave *);
+ void slotSlavetqStatus(IdleSlave *);
void acceptSlave( KSocket *);
void slotSlaveGone();
void idleTimeout();
diff --git a/kinit/kstartupconfig.cpp b/kinit/kstartupconfig.cpp
index 0700f22fc..0e4366cbb 100644
--- a/kinit/kstartupconfig.cpp
+++ b/kinit/kstartupconfig.cpp
@@ -32,7 +32,7 @@ The configuration options are written to $KDEHOME/share/config/startupconfigkeys
one option per line, as <file> <group> <key> <default>. It is possible to
use ' for quoting multiword entries. Values of these options will be written
to $KDEHOME/share/config/startupconfig as a shell script that will set
-the values to shell variables, named <file>_<group>_<key> (all spaces replaced
+the values to shell variables, named <file>_<group>_<key> (all spaces tqreplaced
by underscores, everything lowercase). So e.g. line
"ksplashrc KSplash Theme Default" may result in "ksplashrc_ksplash_theme=Default".
diff --git a/kinit/lnusertemp.c b/kinit/lnusertemp.c
index fdbf8ae0b..19851f884 100644
--- a/kinit/lnusertemp.c
+++ b/kinit/lnusertemp.c
@@ -109,7 +109,7 @@ int build_link(const char *tmp_prefix, const char *kde_prefix, int kdehostname)
pw_ent = getpwuid(uid);
if (!pw_ent)
{
- fprintf(stderr, "Error: Can not find password entry for uid %d.\n", getuid());
+ fprintf(stderr, "Error: Can not tqfind password entry for uid %d.\n", getuid());
return 1;
}
diff --git a/kinit/tests/klaunchertest.cpp b/kinit/tests/klaunchertest.cpp
index c42fdf686..ff1ae0fd1 100644
--- a/kinit/tests/klaunchertest.cpp
+++ b/kinit/tests/klaunchertest.cpp
@@ -39,13 +39,13 @@ int main(int argc, char *argv[])
TQCString dcopService;
int pid;
int result = KApplication::startServiceByDesktopName(
- TQString::fromLatin1("konsole"), TQString::null, &error, &dcopService, &pid );
+ TQString::tqfromLatin1("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(
- TQString::fromLatin1("konqueror"), TQString::null, &error, &dcopService, &pid );
+ TQString::tqfromLatin1("konqueror"), TQString::null, &error, &dcopService, &pid );
printf("Result = %d, error = \"%s\", dcopService = \"%s\", pid = %d\n",
result, error.ascii(), dcopService.data(), pid);