summaryrefslogtreecommitdiffstats
path: root/kuser/kuserfiles.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-18 20:34:22 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-18 20:34:22 +0000
commitb09bffed6b43262948018dfb0f11890850ddf7c1 (patch)
tree138696bfcc7ac01070d0e8ecaa1cdf94611a2bd8 /kuser/kuserfiles.cpp
parent6d43944a7130b9d1b4ae3fba37b774aced8612cf (diff)
downloadtdeadmin-b09bffed6b43262948018dfb0f11890850ddf7c1.tar.gz
tdeadmin-b09bffed6b43262948018dfb0f11890850ddf7c1.zip
TQt4 port kdeadmin
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeadmin@1237416 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kuser/kuserfiles.cpp')
-rw-r--r--kuser/kuserfiles.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/kuser/kuserfiles.cpp b/kuser/kuserfiles.cpp
index 5ccfe58..f76c2ac 100644
--- a/kuser/kuserfiles.cpp
+++ b/kuser/kuserfiles.cpp
@@ -115,7 +115,7 @@ bool KUserFiles::loadpwd()
mCfg->setPasswdsrc( PASSWORD_FILE );
mCfg->setGroupsrc( GROUP_FILE );
passwd_filename = mCfg->passwdsrc();
- KMessageBox::error( 0, i18n("KUser sources were not configured.\nLocal passwd source set to %1\nLocal group source set to %2.").arg(mCfg->passwdsrc().arg(mCfg->groupsrc())) );
+ KMessageBox::error( 0, i18n("KUser sources were not configured.\nLocal passwd source set to %1\nLocal group source set to %2.").tqarg(mCfg->passwdsrc().tqarg(mCfg->groupsrc())) );
}
if(!passwd_filename.isEmpty()) {
@@ -128,7 +128,7 @@ bool KUserFiles::loadpwd()
for(int i = 0; i < MAXFILES; i++) {
rc = stat(TQFile::encodeName(filename), &st);
if(rc != 0) {
- KMessageBox::error( 0, i18n("Stat call on file %1 failed: %2\nCheck KUser settings.").arg(filename).arg(TQString::fromLocal8Bit(strerror(errno))) );
+ KMessageBox::error( 0, i18n("Stat call on file %1 failed: %2\nCheck KUser settings.").tqarg(filename).tqarg(TQString::fromLocal8Bit(strerror(errno))) );
if( (processing_file & P_PASSWD) != 0 ) {
passwd_errno = errno;
if(!nispasswd_filename.isEmpty()) {
@@ -155,7 +155,7 @@ bool KUserFiles::loadpwd()
#ifdef HAVE_FGETPWENT
FILE *fpwd = fopen(TQFile::encodeName(filename), "r");
if(fpwd == NULL) {
- KMessageBox::error( 0, i18n("Error opening %1 for reading.").arg(filename) );
+ KMessageBox::error( 0, i18n("Error opening %1 for reading.").tqarg(filename) );
return FALSE;
}
@@ -179,7 +179,7 @@ bool KUserFiles::loadpwd()
tmpKU->setHomeDir(TQString::fromLocal8Bit(p->pw_dir));
tmpKU->setShell(TQString::fromLocal8Bit(p->pw_shell));
#if defined(__FreeBSD__) || defined(__bsdi__)
- tmpKU->setClass(TQString::fromLatin1(p->pw_class));
+ tmpKU->setClass(TQString::tqfromLatin1(p->pw_class));
tmpKU->setLastChange(p->pw_change);
tmpKU->setExpire(p->pw_expire);
#endif
@@ -238,7 +238,7 @@ bool KUserFiles::loadsdw()
FILE *f;
kdDebug() << "open shadow file: " << shadow_file << endl;
if ((f = fopen( TQFile::encodeName(shadow_file), "r")) == NULL) {
- KMessageBox::error( 0, i18n("Error opening %1 for reading.").arg(shadow_file) );
+ KMessageBox::error( 0, i18n("Error opening %1 for reading.").tqarg(shadow_file) );
caps &= ~Cap_Shadow;
return TRUE;
}
@@ -250,7 +250,7 @@ bool KUserFiles::loadsdw()
kdDebug() << "shadow entry: " << spw->sp_namp << endl;
if ((up = lookup(TQString::fromLocal8Bit(spw->sp_namp))) == NULL) {
- KMessageBox::error( 0, i18n("No /etc/passwd entry for %1.\nEntry will be removed at the next `Save'-operation.").arg(TQString::fromLocal8Bit(spw->sp_namp)) );
+ KMessageBox::error( 0, i18n("No /etc/passwd entry for %1.\nEntry will be removed at the next `Save'-operation.").tqarg(TQString::fromLocal8Bit(spw->sp_namp)) );
continue;
}
@@ -286,8 +286,8 @@ bool KUserFiles::loadsdw()
// Save password file
#define escstr(a,b) tmp2 = user->a(); \
- tmp2.replace(':',"_"); \
- tmp2.replace(',',"_"); \
+ tmp2.tqreplace(':',"_"); \
+ tmp2.tqreplace(',',"_"); \
user->b( tmp2 );
@@ -314,9 +314,9 @@ bool KUserFiles::savepwd()
passwd_filename = mCfg->passwdsrc();
nispasswd_filename = mCfg->nispasswdsrc();
TQString new_passwd_filename =
- passwd_filename + TQString::fromLatin1(KU_CREATE_EXT);
+ passwd_filename + TQString::tqfromLatin1(KU_CREATE_EXT);
TQString new_nispasswd_filename =
- nispasswd_filename+TQString::fromLatin1(KU_CREATE_EXT);
+ nispasswd_filename+TQString::tqfromLatin1(KU_CREATE_EXT);
if( nispasswd_filename != passwd_filename ) {
minuid = mCfg->nisminuid();
@@ -343,13 +343,13 @@ bool KUserFiles::savepwd()
if(!passwd_filename.isEmpty()) {
if ((passwd_fd =
fopen(TQFile::encodeName(new_passwd_filename),"w")) == NULL)
- KMessageBox::error( 0, i18n("Error opening %1 for writing.").arg(passwd_filename) );
+ KMessageBox::error( 0, i18n("Error opening %1 for writing.").tqarg(passwd_filename) );
}
if(!nispasswd_filename.isEmpty() && (nispasswd_filename != passwd_filename)){
if ((nispasswd_fd =
fopen(TQFile::encodeName(new_nispasswd_filename),"w")) == NULL)
- KMessageBox::error( 0, i18n("Error opening %1 for writing.").arg(nispasswd_filename) );
+ KMessageBox::error( 0, i18n("Error opening %1 for writing.").tqarg(nispasswd_filename) );
}
TQPtrListIterator<KU::KUser> it( mUsers );
@@ -364,12 +364,12 @@ bool KUserFiles::savepwd()
addok = true;
if ( user == 0 ) break;
};
- if ( mDel.containsRef( user ) ) {
+ if ( mDel.tqcontainsRef( user ) ) {
++it;
user = (*it);
continue;
}
- if ( mMod.contains( user ) ) user = &( mMod[ user ] );
+ if ( mMod.tqcontains( user ) ) user = &( mMod[ user ] );
tmp_uid = user->getUID();
if ( caps & Cap_Shadow )
@@ -512,7 +512,7 @@ bool KUserFiles::savesdw()
struct spwd s;
KU::KUser *up;
TQString shadow_file = mCfg->shadowsrc();
- TQString new_shadow_file = shadow_file+TQString::fromLatin1(KU_CREATE_EXT);
+ TQString new_shadow_file = shadow_file+TQString::tqfromLatin1(KU_CREATE_EXT);
if ( shadow_file.isEmpty() )
return TRUE;
@@ -523,7 +523,7 @@ bool KUserFiles::savesdw()
}
if ((f = fopen(TQFile::encodeName(new_shadow_file), "w")) == NULL) {
- KMessageBox::error( 0, i18n("Error opening %1 for writing.").arg(new_shadow_file) );
+ KMessageBox::error( 0, i18n("Error opening %1 for writing.").tqarg(new_shadow_file) );
return FALSE;
}
@@ -542,12 +542,12 @@ bool KUserFiles::savesdw()
if ( up == 0 ) break;
};
- if ( mDel.containsRef( up ) ) {
+ if ( mDel.tqcontainsRef( up ) ) {
++it;
up = (*it);
continue;
}
- if ( mMod.contains( up ) ) up = &( mMod[ up ] );
+ if ( mMod.tqcontains( up ) ) up = &( mMod[ up ] );
strncpy( s.sp_namp, up->getName().local8Bit(), 200 );
if ( up->getDisabled() )
@@ -588,7 +588,7 @@ void KUserFiles::createPassword( KU::KUser *user, const TQString &password )
{
if ( caps & Cap_Shadow ) {
user->setSPwd( encryptPass( password, mCfg->md5shadow() ) );
- user->setPwd( TQString::fromLatin1("x") );
+ user->setPwd( TQString::tqfromLatin1("x") );
} else
user->setPwd( encryptPass( password, false ) );
}