summaryrefslogtreecommitdiffstats
path: root/kcron/ctcron.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kcron/ctcron.cpp')
-rw-r--r--kcron/ctcron.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/kcron/ctcron.cpp b/kcron/ctcron.cpp
index 853f6de..bcc51e4 100644
--- a/kcron/ctcron.cpp
+++ b/kcron/ctcron.cpp
@@ -22,7 +22,7 @@
#include <stdio.h>
#include <assert.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <kprocess.h>
#include <klocale.h>
@@ -42,7 +42,7 @@ CTCron::CTCron(bool _syscron, string _login) :
tmp.close();
tmpFileName = tmp.name();
- QString readCommand;
+ TQString readCommand;
if (uid == 0)
// root, so provide requested crontab
@@ -56,8 +56,8 @@ CTCron::CTCron(bool _syscron, string _login) :
}
else
{
- readCommand = QString("crontab -u ") + _login.c_str() + " -l > " + KProcess::quote(tmpFileName);
- writeCommand = QString("crontab -u ") + _login.c_str() + " " + KProcess::quote(tmpFileName);
+ readCommand = TQString("crontab -u ") + _login.c_str() + " -l > " + KProcess::quote(tmpFileName);
+ writeCommand = TQString("crontab -u ") + _login.c_str() + " " + KProcess::quote(tmpFileName);
if (!initFromPasswd(getpwnam(_login.c_str())))
{
error = i18n("No password entry found for user '%1'").arg(_login.c_str());
@@ -86,9 +86,9 @@ CTCron::CTCron(bool _syscron, string _login) :
// Don't set error if it can't be read, it means the user
// doesn't have a crontab.
- if (system(QFile::encodeName(readCommand)) == 0)
+ if (system(TQFile::encodeName(readCommand)) == 0)
{
- ifstream cronfile(QFile::encodeName(tmpFileName));
+ ifstream cronfile(TQFile::encodeName(tmpFileName));
cronfile >> *this;
}
@@ -106,8 +106,8 @@ CTCron::CTCron(const struct passwd *pwd) :
tmp.close();
tmpFileName = tmp.name();
- QString readCommand = QString("crontab -u ") + QString(pwd->pw_name) + " -l > " + KProcess::quote(tmpFileName);
- writeCommand = QString("crontab -u ") + QString(pwd->pw_name) + " " + KProcess::quote(tmpFileName);
+ TQString readCommand = TQString("crontab -u ") + TQString(pwd->pw_name) + " -l > " + KProcess::quote(tmpFileName);
+ writeCommand = TQString("crontab -u ") + TQString(pwd->pw_name) + " " + KProcess::quote(tmpFileName);
initFromPasswd(pwd);
@@ -119,9 +119,9 @@ CTCron::CTCron(const struct passwd *pwd) :
// Don't set error if it can't be read, it means the user
// doesn't have a crontab.
- if (system(QFile::encodeName(readCommand)) == 0)
+ if (system(TQFile::encodeName(readCommand)) == 0)
{
- ifstream cronfile(QFile::encodeName(tmpFileName));
+ ifstream cronfile(TQFile::encodeName(tmpFileName));
cronfile >> *this;
}
@@ -265,17 +265,17 @@ CTCron::~CTCron()
void CTCron::apply()
{
// write to temp file
- ofstream cronfile(QFile::encodeName(tmpFileName));
+ ofstream cronfile(TQFile::encodeName(tmpFileName));
cronfile << *this << flush;
// install temp file into crontab
- if (system(QFile::encodeName(writeCommand)) != 0)
+ if (system(TQFile::encodeName(writeCommand)) != 0)
{
error = i18n("An error occurred while updating crontab.");
}
// remove the temp file
- (void) unlink(QFile::encodeName(tmpFileName));
+ (void) unlink(TQFile::encodeName(tmpFileName));
if (isError())
return;