summaryrefslogtreecommitdiffstats
path: root/kuser/kgroupfiles.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kuser/kgroupfiles.cpp')
-rw-r--r--kuser/kgroupfiles.cpp76
1 files changed, 38 insertions, 38 deletions
diff --git a/kuser/kgroupfiles.cpp b/kuser/kgroupfiles.cpp
index bab8841..cd4d2e0 100644
--- a/kuser/kgroupfiles.cpp
+++ b/kuser/kgroupfiles.cpp
@@ -31,8 +31,8 @@
#include <string.h>
#include <stdlib.h>
-#include <qstring.h>
-#include <qdir.h>
+#include <tqstring.h>
+#include <tqdir.h>
#include <kdebug.h>
#include <kstandarddirs.h>
@@ -69,9 +69,9 @@ bool KGroupFiles::reload()
struct group *p;
KU::KGroup *tmpKG = 0;
struct stat st;
- QString filename;
- QString group_filename;
- QString nisgroup_filename;
+ TQString filename;
+ TQString group_filename;
+ TQString nisgroup_filename;
int rc = 0;
int group_errno = 0;
int nisgroup_errno = 0;
@@ -92,10 +92,10 @@ bool KGroupFiles::reload()
// Start reading group file(s)
for(int k = 0; k < MAXFILES; k++) {
- rc = stat(QFile::encodeName(filename), &st);
+ 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(QString::fromLatin1(strerror(errno))) );
+ arg(filename).arg(TQString::fromLatin1(strerror(errno))) );
if( (processing_file & GROUP) != 0 ) {
group_errno = errno;
if(!nisgroup_filename.isEmpty()) {
@@ -118,8 +118,8 @@ bool KGroupFiles::reload()
// We are reading our configuration specified group file
#ifdef HAVE_FGETGRENT
- FILE *fgrp = fopen(QFile::encodeName(filename), "r");
- QString tmp;
+ FILE *fgrp = fopen(TQFile::encodeName(filename), "r");
+ TQString tmp;
if (fgrp == NULL) {
KMessageBox::error( 0, i18n("Error opening %1 for reading.").arg(filename) );
return FALSE;
@@ -132,13 +132,13 @@ bool KGroupFiles::reload()
#endif
tmpKG = new KU::KGroup();
tmpKG->setGID(p->gr_gid);
- tmpKG->setName(QString::fromLocal8Bit(p->gr_name));
- tmpKG->setPwd(QString::fromLocal8Bit(p->gr_passwd));
+ tmpKG->setName(TQString::fromLocal8Bit(p->gr_name));
+ tmpKG->setPwd(TQString::fromLocal8Bit(p->gr_passwd));
char *u_name;
int i = 0;
while ((u_name = p->gr_mem[i])!=0) {
- tmpKG->addUser(QString::fromLocal8Bit(u_name));
+ tmpKG->addUser(TQString::fromLocal8Bit(u_name));
i++;
}
@@ -182,10 +182,10 @@ bool KGroupFiles::save()
gid_t mingid = 0;
int nis_groups_written = 0;
gid_t tmp_gid = 0;
- QString tmpGe, tmpSe, tmp2;
- QString group_filename, new_group_filename;
- QString gshadow_filename, new_gshadow_filename;
- QString nisgroup_filename, new_nisgroup_filename;
+ TQString tmpGe, tmpSe, tmp2;
+ TQString group_filename, new_group_filename;
+ TQString gshadow_filename, new_gshadow_filename;
+ TQString nisgroup_filename, new_nisgroup_filename;
char errors_found = '\0';
#define NOMINGID 0x01
@@ -194,16 +194,16 @@ bool KGroupFiles::save()
// read KUser configuration info
group_filename = mCfg->groupsrc();
- new_group_filename = group_filename + QString::fromLatin1(KU_CREATE_EXT);
+ new_group_filename = group_filename + TQString::fromLatin1(KU_CREATE_EXT);
#ifdef HAVE_SHADOW
gshadow_filename = mCfg->gshadowsrc();
if ( !KStandardDirs::exists( gshadow_filename ) )
- gshadow_filename = QString::null;
+ gshadow_filename = TQString::null;
else
- new_gshadow_filename = gshadow_filename + QString::fromLatin1(KU_CREATE_EXT);
+ new_gshadow_filename = gshadow_filename + TQString::fromLatin1(KU_CREATE_EXT);
#endif
nisgroup_filename = mCfg->nisgroupsrc();
- new_nisgroup_filename = nisgroup_filename + QString::fromLatin1(KU_CREATE_EXT);
+ new_nisgroup_filename = nisgroup_filename + TQString::fromLatin1(KU_CREATE_EXT);
if( nisgroup_filename != group_filename ) {
mingid = mCfg->nismingid();
}
@@ -232,14 +232,14 @@ bool KGroupFiles::save()
// Open file(s)
if(!group_filename.isEmpty()) {
- if((group_fd = fopen(QFile::encodeName(new_group_filename), "w")) == NULL) {
+ if((group_fd = fopen(TQFile::encodeName(new_group_filename), "w")) == NULL) {
KMessageBox::error( 0, i18n("Error opening %1 for writing.").arg(new_group_filename) );
return false;
}
}
if(!gshadow_filename.isEmpty()) {
- if((gshadow_fd = fopen(QFile::encodeName(new_gshadow_filename), "w")) == NULL) {
+ if((gshadow_fd = fopen(TQFile::encodeName(new_gshadow_filename), "w")) == NULL) {
KMessageBox::error( 0, i18n("Error opening %1 for writing.").arg(new_gshadow_filename) );
if ( group_fd ) fclose ( group_fd );
return false;
@@ -247,7 +247,7 @@ bool KGroupFiles::save()
}
if(!nisgroup_filename.isEmpty() && (nisgroup_filename != group_filename)) {
- if((nisgroup_fd = fopen(QFile::encodeName(new_nisgroup_filename), "w")) == NULL) {
+ if((nisgroup_fd = fopen(TQFile::encodeName(new_nisgroup_filename), "w")) == NULL) {
KMessageBox::error( 0, i18n("Error opening %1 for writing.").arg(new_nisgroup_filename) );
if ( group_fd ) fclose ( group_fd );
if ( gshadow_fd ) fclose ( gshadow_fd );
@@ -255,7 +255,7 @@ bool KGroupFiles::save()
}
}
- QPtrListIterator<KU::KGroup> it( mGroups );
+ TQPtrListIterator<KU::KGroup> it( mGroups );
KU::KGroup *gr;
bool addok = false;
@@ -265,7 +265,7 @@ bool KGroupFiles::save()
if ( gr == 0 ) {
if ( addok ) break;
- it = QPtrListIterator<KU::KGroup> ( mAdd );
+ it = TQPtrListIterator<KU::KGroup> ( mAdd );
gr = (*it);
addok = true;
if ( gr == 0 ) break;
@@ -291,7 +291,7 @@ bool KGroupFiles::save()
tmp_gid = gr->getGID();
tmpGe += ":" +
gr->getPwd() + ":" +
- QString::number( gr->getGID() ) + ":";
+ TQString::number( gr->getGID() ) + ":";
tmpSe = gr->getName() + ":!::";
for (uint j=0; j<gr->count(); j++) {
if (j != 0) {
@@ -331,26 +331,26 @@ bool KGroupFiles::save()
if(group_fd) {
fclose(group_fd);
- chmod(QFile::encodeName(new_group_filename), mode);
- chown(QFile::encodeName(new_group_filename), uid, gid);
- rename(QFile::encodeName(new_group_filename),
- QFile::encodeName(group_filename));
+ chmod(TQFile::encodeName(new_group_filename), mode);
+ chown(TQFile::encodeName(new_group_filename), uid, gid);
+ rename(TQFile::encodeName(new_group_filename),
+ TQFile::encodeName(group_filename));
}
if(gshadow_fd) {
fclose(gshadow_fd);
- chmod(QFile::encodeName(new_gshadow_filename), mode);
- chown(QFile::encodeName(new_gshadow_filename), uid, gid);
- rename(QFile::encodeName(new_gshadow_filename),
- QFile::encodeName(gshadow_filename));
+ chmod(TQFile::encodeName(new_gshadow_filename), mode);
+ chown(TQFile::encodeName(new_gshadow_filename), uid, gid);
+ rename(TQFile::encodeName(new_gshadow_filename),
+ TQFile::encodeName(gshadow_filename));
}
if(nisgroup_fd) {
fclose(nisgroup_fd);
- chmod(QFile::encodeName(nisgroup_filename), mode);
- chown(QFile::encodeName(nisgroup_filename), uid, gid);
- rename(QFile::encodeName(new_nisgroup_filename),
- QFile::encodeName(nisgroup_filename));
+ chmod(TQFile::encodeName(nisgroup_filename), mode);
+ chown(TQFile::encodeName(nisgroup_filename), uid, gid);
+ rename(TQFile::encodeName(new_nisgroup_filename),
+ TQFile::encodeName(nisgroup_filename));
}
if( (errors_found & NOMINGID) != 0 ) {