summaryrefslogtreecommitdiffstats
path: root/kppp/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kppp/main.cpp')
-rw-r--r--kppp/main.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/kppp/main.cpp b/kppp/main.cpp
index 65548d17..753291ba 100644
--- a/kppp/main.cpp
+++ b/kppp/main.cpp
@@ -88,9 +88,9 @@ uid_t euid;
// helper process' pid
pid_t helperPid = -1;
-QString local_ip_address;
-QString remote_ip_address;
-QString pidfile;
+TQString local_ip_address;
+TQString remote_ip_address;
+TQString pidfile;
#if 0
extern "C" {
@@ -232,16 +232,16 @@ int main( int argc, char **argv ) {
// make sure that nobody can read the password from the
// config file
- QString configFile = KGlobal::dirs()->saveLocation("config")
- + QString(kapp->name()) + "rc";
- if(access(QFile::encodeName(configFile), F_OK) == 0)
- chmod(QFile::encodeName(configFile), S_IRUSR | S_IWUSR);
+ TQString configFile = KGlobal::dirs()->saveLocation("config")
+ + TQString(kapp->name()) + "rc";
+ if(access(TQFile::encodeName(configFile), F_OK) == 0)
+ chmod(TQFile::encodeName(configFile), S_IRUSR | S_IWUSR);
// do we really need to generate an empty directory structure here ?
KGlobal::dirs()->saveLocation("appdata", "Rules");
int pid = create_pidfile();
- QString err_msg = i18n("kppp can't create or read from\n%1.").arg(pidfile);
+ TQString err_msg = i18n("kppp can't create or read from\n%1.").arg(pidfile);
if(pid < 0) {
KMessageBox::error(0L, err_msg);
@@ -263,7 +263,7 @@ int main( int argc, char **argv ) {
gpppdata.open();
gpppdata.setAccountByIndex(0);
- QString s = argv[2];
+ TQString s = argv[2];
urlEncode(s);
kdDebug(5002) << s << endl;
@@ -272,7 +272,7 @@ int main( int argc, char **argv ) {
}
if (pid > 0) {
- QString msg = i18n("kppp has detected a %1 file.\n"
+ TQString msg = i18n("kppp has detected a %1 file.\n"
"Another instance of kppp seems to be "
"running under process-ID %2.\n"
"Please click Exit, make sure that you are "
@@ -322,8 +322,8 @@ int main( int argc, char **argv ) {
}
-pid_t execute_command (const QString & cmd) {
- QCString command = QFile::encodeName(cmd);
+pid_t execute_command (const TQString & cmd) {
+ TQCString command = TQFile::encodeName(cmd);
if (command.isEmpty() || command.length() > COMMAND_SIZE)
return (pid_t) -1;
@@ -331,7 +331,7 @@ pid_t execute_command (const QString & cmd) {
kdDebug(5002) << "Executing command: " << command << endl;
- QApplication::flushX();
+ TQApplication::flushX();
if((id = fork()) == 0) {
// don't bother dieppp()
signal(SIGCHLD, SIG_IGN);
@@ -361,10 +361,10 @@ pid_t create_pidfile() {
pidfile = KGlobal::dirs()->saveLocation("appdata") + "kppp.pid";
- if(access(QFile::encodeName(pidfile), F_OK) == 0) {
+ if(access(TQFile::encodeName(pidfile), F_OK) == 0) {
- if((access(QFile::encodeName(pidfile), R_OK) < 0) ||
- (fd = open(QFile::encodeName(pidfile), O_RDONLY)) < 0)
+ if((access(TQFile::encodeName(pidfile), R_OK) < 0) ||
+ (fd = open(TQFile::encodeName(pidfile), O_RDONLY)) < 0)
return -1;
int sz = read(fd, &pidstr, 32);
@@ -393,7 +393,7 @@ pid_t create_pidfile() {
remove_pidfile();
}
- if((fd = open(QFile::encodeName(pidfile), O_WRONLY | O_CREAT | O_EXCL,
+ if((fd = open(TQFile::encodeName(pidfile), O_WRONLY | O_CREAT | O_EXCL,
S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) == -1)
return -1;
@@ -411,9 +411,9 @@ bool remove_pidfile() {
struct stat st;
// only remove regular files with user write permissions
- if(stat(QFile::encodeName(pidfile), &st) == 0 )
- if(S_ISREG(st.st_mode) && (access(QFile::encodeName(pidfile), W_OK) == 0)) {
- unlink(QFile::encodeName(pidfile));
+ if(stat(TQFile::encodeName(pidfile), &st) == 0 )
+ if(S_ISREG(st.st_mode) && (access(TQFile::encodeName(pidfile), W_OK) == 0)) {
+ unlink(TQFile::encodeName(pidfile));
return true;
}
@@ -436,7 +436,7 @@ void myShutDown() {
}
void sighandler(int sig) {
- QEvent *e = 0L;
+ TQEvent *e = 0L;
if(sig == SIGCHLD) {
pid_t id = wait(0L);
if(id >= 0 && id == helperPid) // helper process died
@@ -446,7 +446,7 @@ void sighandler(int sig) {
// let eventFilter() deal with this when we're back in the loop
if (e)
- QApplication::postEvent(p_kppp, e);
+ TQApplication::postEvent(p_kppp, e);
signal(sig, sighandler); // reinstall signal handler
}