summaryrefslogtreecommitdiffstats
path: root/kinit
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-16 02:40:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-16 02:40:35 +0000
commitbab40890696ec68c337dc290880423a0602b83c7 (patch)
tree6ba03f720b1fa88235ba339e7aedb4455430357e /kinit
parentf7e71d47719ab6094cf4a9fafffa5ea351973522 (diff)
downloadtdelibs-bab40890696ec68c337dc290880423a0602b83c7.tar.gz
tdelibs-bab40890696ec68c337dc290880423a0602b83c7.zip
Finished remaining porting to new TQt API
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1214736 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kinit')
-rw-r--r--kinit/autostart.cpp18
-rw-r--r--kinit/kdostartupconfig.cpp12
-rw-r--r--kinit/kinit.cpp20
-rw-r--r--kinit/klauncher.cpp10
4 files changed, 30 insertions, 30 deletions
diff --git a/kinit/autostart.cpp b/kinit/autostart.cpp
index 8c54a255c..cd968c0a8 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;
}
@@ -212,7 +212,7 @@ AutoStart::loadAutoStartList()
}
}
-QString
+TQString
AutoStart::startService()
{
if (m_startList->isEmpty())
diff --git a/kinit/kdostartupconfig.cpp b/kinit/kdostartupconfig.cpp
index b9885453b..1479cbd7d 100644
--- a/kinit/kdostartupconfig.cpp
+++ b/kinit/kdostartupconfig.cpp
@@ -105,9 +105,9 @@ int main()
{
TQString key = it.key();
TQString value = *it;
- startupconfig << file.replace( ' ', '_' ).lower()
- << "_" << group.replace( ' ', '_' ).lower()
- << "_" << key.replace( ' ', '_' ).lower()
+ startupconfig << TQString(file.replace( ' ', '_' )).lower()
+ << "_" << TQString(group.replace( ' ', '_' )).lower()
+ << "_" << TQString(key.replace( ' ', '_' )).lower()
<< "=\"" << value.replace( "\"", "\\\"" ) << "\"\n";
}
}
@@ -119,9 +119,9 @@ int main()
cfg.setGroup( group );
TQString value = cfg.readEntry( key, def );
startupconfig << "# " << line << "\n";
- startupconfig << file.replace( ' ', '_' ).lower()
- << "_" << group.replace( ' ', '_' ).lower()
- << "_" << key.replace( ' ', '_' ).lower()
+ startupconfig << TQString(file.replace( ' ', '_' )).lower()
+ << "_" << TQString(group.replace( ' ', '_' )).lower()
+ << "_" <<TQString( key.replace( ' ', '_' )).lower()
<< "=\"" << value.replace( "\"", "\\\"" ) << "\"\n";
}
startupconfigfiles << line << endl;
diff --git a/kinit/kinit.cpp b/kinit/kinit.cpp
index b7588d280..2e4810dea 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;
@@ -645,7 +645,7 @@ 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)" );
- TQString errorMsg = i18n("Could not find 'kdemain' in '%1'.\n%2").arg(libpath)
+ TQString errorMsg = i18n("Could not find 'kdemain' in '%1'.\n%2").arg(TQString(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,10 +1517,10 @@ 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));
+ TQCString socketName = TQFile::encodeName(locateLocal("socket", TQString("kdeinit-%1").arg(TQString(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 = TQFile::encodeName(locateLocal("socket", TQString("kdeinit_%1").arg(display), s_instance));
+ socketName = TQFile::encodeName(locateLocal("socket", TQString("kdeinit_%1").arg(TQString(display)), s_instance));
if (socketName.length() >= MAX_SOCK_FILE)
{
fprintf(stderr, "kdeinit: Aborting. Socket name will be too long:\n");
diff --git a/kinit/klauncher.cpp b/kinit/klauncher.cpp
index 7d09590f9..0a27d5125 100644
--- a/kinit/klauncher.cpp
+++ b/kinit/klauncher.cpp
@@ -193,7 +193,7 @@ KLauncher::KLauncher(int _kdeinitSocket, bool new_startup)
domainname.close();
domainname.unlink();
#endif
- mPoolSocket = new KServerSocket(TQFile::encodeName(mPoolSocketName));
+ mPoolSocket = new KServerSocket(static_cast<const char*>(TQFile::encodeName(mPoolSocketName)));
connect(mPoolSocket, TQT_SIGNAL(accepted( KSocket *)),
TQT_SLOT(acceptSlave(KSocket *)));
@@ -740,7 +740,7 @@ KLauncher::requestDone(KLaunchRequest *request)
{
DCOPresult.result = 1;
DCOPresult.dcopName = "";
- DCOPresult.error = i18n("KDEInit could not launch '%1'.").arg(request->name);
+ DCOPresult.error = i18n("KDEInit could not launch '%1'.").arg(TQString(request->name));
if (!request->errorMsg.isEmpty())
DCOPresult.error += ":\n" + request->errorMsg;
DCOPresult.pid = 0;
@@ -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 >());
@@ -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 >());
@@ -1331,7 +1331,7 @@ KLauncher::requestSlave(const TQString &protocol,
requestDone(request);
if (!pid)
{
- error = i18n("Error loading '%1'.\n").arg(name);
+ error = i18n("Error loading '%1'.\n").arg(TQString(name));
}
return pid;
}