summaryrefslogtreecommitdiffstats
path: root/kcron/ctcron.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:25:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:25:18 +0000
commitaa3a1ca934bc541bddd3fa136a85f106f7da266e (patch)
tree9ad0b795aed8fa4ac30c2fe0fd1aacb8175714c0 /kcron/ctcron.cpp
parentb10cf7066791a2f362495890cd50c984e8025412 (diff)
downloadtdeadmin-aa3a1ca934bc541bddd3fa136a85f106f7da266e.tar.gz
tdeadmin-aa3a1ca934bc541bddd3fa136a85f106f7da266e.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeadmin@1157635 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
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;