summaryrefslogtreecommitdiffstats
path: root/kuser/kuser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kuser/kuser.cpp')
-rw-r--r--kuser/kuser.cpp62
1 files changed, 31 insertions, 31 deletions
diff --git a/kuser/kuser.cpp b/kuser/kuser.cpp
index 4ac7c43..cfd3e49 100644
--- a/kuser/kuser.cpp
+++ b/kuser/kuser.cpp
@@ -548,24 +548,24 @@ int KU::KUser::createHome()
{
if(p_dir.isNull() || p_dir.isEmpty()) {
- KMessageBox::sorry( 0, i18n("Cannot create home folder for %1: it is null or empty.").arg(p_name) );
+ KMessageBox::sorry( 0, i18n("Cannot create home folder for %1: it is null or empty.").tqarg(p_name) );
return(0);
}
if (mkdir(TQFile::encodeName(p_dir), 0700) != 0) {
if (errno != EEXIST)
{
- KMessageBox::error( 0, i18n("Cannot create home folder %1.\nError: %2").arg(p_dir).arg(TQString::fromLocal8Bit(strerror(errno))) );
+ KMessageBox::error( 0, i18n("Cannot create home folder %1.\nError: %2").tqarg(p_dir).tqarg(TQString::fromLocal8Bit(strerror(errno))) );
return(0);
}
}
if (chown(TQFile::encodeName(p_dir), p_uid, p_gid) != 0) {
- KMessageBox::error( 0, i18n("Cannot change owner of home folder %1.\nError: %2").arg(p_dir).arg(TQString::fromLocal8Bit(strerror(errno))) );
+ KMessageBox::error( 0, i18n("Cannot change owner of home folder %1.\nError: %2").tqarg(p_dir).tqarg(TQString::fromLocal8Bit(strerror(errno))) );
return(1);
}
if (chmod(TQFile::encodeName(p_dir), KU_HOMEDIR_PERM) != 0) {
- KMessageBox::error( 0, i18n("Cannot change permissions on home folder %1.\nError: %2").arg(p_dir).arg(TQString::fromLocal8Bit(strerror(errno))) );
+ KMessageBox::error( 0, i18n("Cannot change permissions on home folder %1.\nError: %2").tqarg(p_dir).tqarg(TQString::fromLocal8Bit(strerror(errno))) );
return(1);
}
return(1);
@@ -580,33 +580,33 @@ int KU::KUser::tryCreate(const TQString &dir)
if (rc == 0) {
if (S_ISDIR(sb.st_mode)) {
if (KMessageBox::warningContinueCancel( 0,
- i18n("Folder %1 already exists!\nWill make %2 owner and change permissions.\nDo you want to continue?").arg(dir).arg(p_name),
+ i18n("Folder %1 already exists!\nWill make %2 owner and change permissions.\nDo you want to continue?").tqarg(dir).tqarg(p_name),
TQString(), KStdGuiItem::cont() ) == KMessageBox::Continue) {
if (chown(TQFile::encodeName(dir), p_uid, p_gid) != 0) {
- KMessageBox::error( 0, i18n("Cannot change owner of %1 folder.\nError: %2") .arg(dir).arg(TQString::fromLocal8Bit(strerror(errno))) );
+ KMessageBox::error( 0, i18n("Cannot change owner of %1 folder.\nError: %2") .tqarg(dir).tqarg(TQString::fromLocal8Bit(strerror(errno))) );
}
return(0);
} else {
- KMessageBox::information( 0, i18n("Folder %1 left 'as is'.\nVerify ownership and permissions for user %2 who may not be able to log in!").arg(dir).arg(p_name) );
+ KMessageBox::information( 0, i18n("Folder %1 left 'as is'.\nVerify ownership and permissions for user %2 who may not be able to log in!").tqarg(dir).tqarg(p_name) );
return(-1);
}
} else {
- KMessageBox::information( 0, i18n("%1 exists and is not a folder. User %2 will not be able to log in!").arg(dir).arg(p_name) );
+ KMessageBox::information( 0, i18n("%1 exists and is not a folder. User %2 will not be able to log in!").tqarg(dir).tqarg(p_name) );
return(-1);
}
} else {
if (errno == ENOENT) {
if (mkdir(TQFile::encodeName(dir), 0700) != 0) {
- KMessageBox::error( 0, i18n("Cannot create %1 folder.\nError: %2").arg(dir).arg(TQString::fromLocal8Bit(strerror(errno))));
+ KMessageBox::error( 0, i18n("Cannot create %1 folder.\nError: %2").tqarg(dir).tqarg(TQString::fromLocal8Bit(strerror(errno))));
return(-1);
}
if (chown(TQFile::encodeName(dir), p_uid, p_gid) != 0) {
- KMessageBox::error( 0, i18n("Cannot change owner of %1 folder.\nError: %2").arg(dir).arg(TQString::fromLocal8Bit(strerror(errno))) );
+ KMessageBox::error( 0, i18n("Cannot change owner of %1 folder.\nError: %2").tqarg(dir).tqarg(TQString::fromLocal8Bit(strerror(errno))) );
}
return(0);
} else {
- KMessageBox::error( 0, i18n("stat call on %1 failed.\nError: %2").arg(dir).arg(TQString::fromLocal8Bit(strerror(errno))) );
+ KMessageBox::error( 0, i18n("stat call on %1 failed.\nError: %2").tqarg(dir).tqarg(TQString::fromLocal8Bit(strerror(errno))) );
return(-1);
}
}
@@ -622,8 +622,8 @@ int KU::KUser::createMailBox()
if (errno != EEXIST)
{
KMessageBox::error( 0, i18n("Cannot create %1: %2")
- .arg(mailboxpath)
- .arg(TQString::fromLocal8Bit(strerror(errno))) );
+ .tqarg(mailboxpath)
+ .tqarg(TQString::fromLocal8Bit(strerror(errno))) );
return -1;
}
}
@@ -632,13 +632,13 @@ int KU::KUser::createMailBox()
if (chown(TQFile::encodeName(mailboxpath), p_uid, KU_MAILBOX_GID) != 0) {
KMessageBox::error( 0, i18n("Cannot change owner on mailbox: %1\nError: %2")
- .arg(mailboxpath).arg(TQString::fromLocal8Bit(strerror(errno))) );
+ .tqarg(mailboxpath).tqarg(TQString::fromLocal8Bit(strerror(errno))) );
return -1;
}
if (chmod(TQFile::encodeName(mailboxpath), KU_MAILBOX_PERM) != 0) {
KMessageBox::error( 0, i18n("Cannot change permissions on mailbox: %1\nError: %2")
- .arg(mailboxpath).arg(TQString::fromLocal8Bit(strerror(errno))) );
+ .tqarg(mailboxpath).tqarg(TQString::fromLocal8Bit(strerror(errno))) );
return -1;
}
@@ -651,8 +651,8 @@ void KU::KUser::copyDir(const TQString &srcPath, const TQString &dstPath)
TQDir s(srcPath);
TQDir d(dstPath);
- TQString dot = TQString::fromLatin1(".");
- TQString dotdot = TQString::fromLatin1("..");
+ TQString dot = TQString::tqfromLatin1(".");
+ TQString dotdot = TQString::tqfromLatin1("..");
s.setFilter( TQDir::All | TQDir::Hidden | TQDir::System );
@@ -683,7 +683,7 @@ void KU::KUser::copyDir(const TQString &srcPath, const TQString &dstPath)
if (symlink(TQFile::encodeName(link),TQFile::encodeName(d.filePath(name))) != 0) {
KMessageBox::error( 0, i18n("Error creating symlink %1.\nError: %2")
- .arg(d.filePath(s[i])).arg(TQString::fromLocal8Bit(strerror(errno))) );
+ .tqarg(d.filePath(s[i])).tqarg(TQString::fromLocal8Bit(strerror(errno))) );
}
} else if ( info.isDir() ) {
TQDir dir(filename);
@@ -693,12 +693,12 @@ void KU::KUser::copyDir(const TQString &srcPath, const TQString &dstPath)
if (chown(TQFile::encodeName(d.filePath(name)), p_uid, p_gid) != 0) {
KMessageBox::error( 0, i18n("Cannot change owner of folder %1.\nError: %2")
- .arg(d.filePath(s[i])).arg(TQString::fromLocal8Bit(strerror(errno))) );
+ .tqarg(d.filePath(s[i])).tqarg(TQString::fromLocal8Bit(strerror(errno))) );
}
if (chmod(TQFile::encodeName(d.filePath(name)), mode) != 0) {
KMessageBox::error( 0, i18n("Cannot change permissions on folder %1.\nError: %2")
- .arg(d.filePath(s[i])).arg(TQString::fromLocal8Bit(strerror(errno))) );
+ .tqarg(d.filePath(s[i])).tqarg(TQString::fromLocal8Bit(strerror(errno))) );
}
} else {
@@ -708,12 +708,12 @@ void KU::KUser::copyDir(const TQString &srcPath, const TQString &dstPath)
if (chown(TQFile::encodeName(d.filePath(name)), p_uid, p_gid) != 0) {
KMessageBox::error( 0, i18n("Cannot change owner of file %1.\nError: %2")
- .arg(d.filePath(s[i])).arg(TQString::fromLocal8Bit(strerror(errno))) );
+ .tqarg(d.filePath(s[i])).tqarg(TQString::fromLocal8Bit(strerror(errno))) );
}
if (chmod(TQFile::encodeName(d.filePath(name)), mode) != 0) {
KMessageBox::error( 0, i18n("Cannot change permissions on file %1.\nError: %2")
- .arg(d.filePath(s[i])).arg(TQString::fromLocal8Bit(strerror(errno))) );
+ .tqarg(d.filePath(s[i])).tqarg(TQString::fromLocal8Bit(strerror(errno))) );
}
}
}
@@ -726,12 +726,12 @@ int KU::KUser::copySkel()
mode_t mode;
if (!s.exists()) {
- KMessageBox::error( 0, i18n("Folder %1 does not exist, cannot copy skeleton for %2.").arg(s.absPath()).arg(p_name) );
+ KMessageBox::error( 0, i18n("Folder %1 does not exist, cannot copy skeleton for %2.").tqarg(s.absPath()).tqarg(p_name) );
return (-1);
}
if (!d.exists()) {
- KMessageBox::error( 0, i18n("Folder %1 does not exist, cannot copy skeleton.").arg(d.absPath()) );
+ KMessageBox::error( 0, i18n("Folder %1 does not exist, cannot copy skeleton.").tqarg(d.absPath()) );
return (-1);
}
@@ -750,14 +750,14 @@ int KU::KUser::removeHome()
if (S_ISDIR(sb.st_mode) && sb.st_uid == p_uid) {
if (!KIO::NetAccess::del(KURL::fromPathOrURL(p_dir))) {
KMessageBox::error( 0, i18n("Cannot remove home folder %1.\nError: %2")
- .arg(p_dir).arg(KIO::NetAccess::lastErrorString()) );
+ .tqarg(p_dir).tqarg(KIO::NetAccess::lastErrorString()) );
}
} else {
- KMessageBox::error( 0, i18n("Removal of home folder %1 failed (uid = %2, gid = %3).").arg(p_dir).arg(sb.st_uid).arg(sb.st_gid) );
+ KMessageBox::error( 0, i18n("Removal of home folder %1 failed (uid = %2, gid = %3).").tqarg(p_dir).tqarg(sb.st_uid).tqarg(sb.st_gid) );
}
else {
KMessageBox::error( 0, i18n("stat call on file %1 failed.\nError: %2")
- .arg(p_dir).arg(TQString::fromLocal8Bit(strerror(errno))) );
+ .tqarg(p_dir).tqarg(TQString::fromLocal8Bit(strerror(errno))) );
}
return 0;
@@ -772,10 +772,10 @@ int KU::KUser::removeCrontabs()
file = TQFile::decodeName(CRONTAB_DIR) + "/" + p_name;
if ( access(TQFile::encodeName(file), F_OK) == 0 ) {
- command = TQString::fromLatin1("crontab -u %1 -r").arg(KProcess::quote(p_name));
+ command = TQString::tqfromLatin1("crontab -u %1 -r").tqarg(KProcess::quote(p_name));
if ( system(TQFile::encodeName(command)) != 0 ) {
KMessageBox::error( 0, i18n("Cannot remove crontab %1.\nError: %2")
- .arg(command).arg(TQString::fromLocal8Bit(strerror(errno))) );
+ .tqarg(command).tqarg(TQString::fromLocal8Bit(strerror(errno))) );
}
}
@@ -789,7 +789,7 @@ int KU::KUser::removeMailBox()
file = TQFile::decodeName(MAIL_SPOOL_DIR) + "/" + p_name;
if (remove(TQFile::encodeName(file)) != 0) {
KMessageBox::error( 0, i18n("Cannot remove mailbox %1.\nError: %2")
- .arg(file).arg(TQString::fromLocal8Bit(strerror(errno))) );
+ .tqarg(file).tqarg(TQString::fromLocal8Bit(strerror(errno))) );
}
return 0;
@@ -808,7 +808,7 @@ int KU::KUser::removeProcesses()
break;
case -1:
KMessageBox::error( 0,
- i18n("Cannot fork while trying to kill processes for uid %1.").arg(p_uid) );
+ i18n("Cannot fork while trying to kill processes for uid %1.").tqarg(p_uid) );
break;
}