summaryrefslogtreecommitdiffstats
path: root/kuser
diff options
context:
space:
mode:
Diffstat (limited to 'kuser')
-rw-r--r--kuser/addUser.cpp28
-rw-r--r--kuser/addUser.h8
-rw-r--r--kuser/delUser.cpp18
-rw-r--r--kuser/delUser.h8
-rw-r--r--kuser/editDefaults.cpp26
-rw-r--r--kuser/editDefaults.h14
-rw-r--r--kuser/editGroup.cpp102
-rw-r--r--kuser/editGroup.h12
-rw-r--r--kuser/kglobal.cpp2
-rw-r--r--kuser/kglobal_.h2
-rw-r--r--kuser/kgroup.cpp44
-rw-r--r--kuser/kgroup.h64
-rw-r--r--kuser/kgroupfiles.cpp76
-rw-r--r--kuser/kgroupfiles.h6
-rw-r--r--kuser/kgroupldap.cpp50
-rw-r--r--kuser/kgroupldap.h16
-rw-r--r--kuser/kgroupsystem.cpp8
-rw-r--r--kuser/kgroupsystem.h6
-rw-r--r--kuser/kgroupvw.cpp20
-rw-r--r--kuser/kgroupvw.h8
-rw-r--r--kuser/kuser.cpp264
-rw-r--r--kuser/kuser.h134
-rw-r--r--kuser/kuserfiles.cpp120
-rw-r--r--kuser/kuserfiles.h6
-rw-r--r--kuser/kuserldap.cpp104
-rw-r--r--kuser/kuserldap.h22
-rw-r--r--kuser/kusersystem.cpp20
-rw-r--r--kuser/kusersystem.h6
-rw-r--r--kuser/kuservw.cpp26
-rw-r--r--kuser/kuservw.h10
-rw-r--r--kuser/main.cpp2
-rw-r--r--kuser/mainView.cpp50
-rw-r--r--kuser/mainView.h14
-rw-r--r--kuser/mainWidget.cpp80
-rw-r--r--kuser/misc.cpp42
-rw-r--r--kuser/misc.h20
-rw-r--r--kuser/propdlg.cpp264
-rw-r--r--kuser/propdlg.h70
-rw-r--r--kuser/pwddlg.cpp12
-rw-r--r--kuser/pwddlg.h6
-rw-r--r--kuser/selectconn.cpp34
-rw-r--r--kuser/selectconn.h6
-rw-r--r--kuser/sha1.h2
-rw-r--r--kuser/sid.cpp18
-rw-r--r--kuser/sid.h16
45 files changed, 933 insertions, 933 deletions
diff --git a/kuser/addUser.cpp b/kuser/addUser.cpp
index 4bd957e..347c46f 100644
--- a/kuser/addUser.cpp
+++ b/kuser/addUser.cpp
@@ -26,8 +26,8 @@
#include <sys/file.h>
#include <sys/stat.h>
-#include <qdir.h>
-#include <qgroupbox.h>
+#include <tqdir.h>
+#include <tqgroupbox.h>
#include <kdebug.h>
@@ -38,18 +38,18 @@
#include <kmessagebox.h>
addUser::addUser( KU::KUser *AUser, bool useprivategroup,
- QWidget *parent, const char *name ) :
+ TQWidget *parent, const char *name ) :
propdlg( AUser, useprivategroup, parent, name )
{
- QGroupBox *group = new QGroupBox(frontpage);
+ TQGroupBox *group = new TQGroupBox(frontpage);
group->setTitle(i18n("New Account Options"));
- QVBoxLayout *groupLayout = new QVBoxLayout(group, marginHint(), spacingHint());
+ TQVBoxLayout *groupLayout = new TQVBoxLayout(group, marginHint(), spacingHint());
groupLayout->addSpacing(group->fontMetrics().lineSpacing());
groupLayout->setAutoAdd(true);
- createhome = new QCheckBox(i18n("Create home folder"), group);
+ createhome = new TQCheckBox(i18n("Create home folder"), group);
createhome->setChecked(true);
- copyskel = new QCheckBox(i18n("Copy skeleton"), group);
- connect(createhome, SIGNAL(toggled(bool)), copyskel, SLOT(setEnabled(bool)));
+ copyskel = new TQCheckBox(i18n("Copy skeleton"), group);
+ connect(createhome, TQT_SIGNAL(toggled(bool)), copyskel, TQT_SLOT(setEnabled(bool)));
frontlayout->addMultiCellWidget(group, frontrow, frontrow, 0, 2);
if ( useprivategroup ) pbprigr->setEnabled( false );
@@ -104,8 +104,8 @@ bool addUser::checkHome()
struct stat s;
int r;
- QString h_dir = user->getHomeDir();
- r = stat( QFile::encodeName(h_dir), &s );
+ TQString h_dir = user->getHomeDir();
+ r = stat( TQFile::encodeName(h_dir), &s );
if ( (r == -1) && (errno == ENOENT) )
return true;
@@ -115,7 +115,7 @@ bool addUser::checkHome()
if ( KMessageBox::
warningContinueCancel ( 0,
i18n("Folder %1 already exists!\n%2 may become owner and permissions may change.\nDo you really want to use %3?").
- arg(h_dir).arg(user->getName()).arg(h_dir), QString::null, KStdGuiItem::cont() ) == KMessageBox::Cancel )
+ arg(h_dir).arg(user->getName()).arg(h_dir), TQString::null, KStdGuiItem::cont() ) == KMessageBox::Cancel )
return false;
else
@@ -130,14 +130,14 @@ bool addUser::checkHome()
bool addUser::checkMailBox()
{
- QString mailboxpath;
+ TQString mailboxpath;
KU::KUser *user = mUsers.first();
struct stat s;
int r;
- mailboxpath = QFile::decodeName(MAIL_SPOOL_DIR) + "/" + user->getName();
- r = stat(QFile::encodeName(mailboxpath), &s);
+ mailboxpath = TQFile::decodeName(MAIL_SPOOL_DIR) + "/" + user->getName();
+ r = stat(TQFile::encodeName(mailboxpath), &s);
if ((r == -1) && (errno == ENOENT))
return true;
diff --git a/kuser/addUser.h b/kuser/addUser.h
index 786bdea..0f16c95 100644
--- a/kuser/addUser.h
+++ b/kuser/addUser.h
@@ -21,14 +21,14 @@
#ifndef _KU_ADDUSER_H_
#define _KU_ADDUSER_H_
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include "propdlg.h"
class addUser: public propdlg {
Q_OBJECT
public:
addUser(KU::KUser *AUser, bool useprivategroup,
- QWidget *parent = 0, const char *name = 0 );
+ TQWidget *parent = 0, const char *name = 0 );
void setCreateHomeDir(bool b)
{ createhome->setChecked(b); }
@@ -42,8 +42,8 @@ protected:
bool checkHome();
bool checkMailBox();
- QCheckBox *createhome;
- QCheckBox *copyskel;
+ TQCheckBox *createhome;
+ TQCheckBox *copyskel;
};
#endif // _KU_ADDUSER_H
diff --git a/kuser/delUser.cpp b/kuser/delUser.cpp
index 1d545bc..b1ee7e0 100644
--- a/kuser/delUser.cpp
+++ b/kuser/delUser.cpp
@@ -18,23 +18,23 @@
#include "delUser.h"
-#include <qlabel.h>
-#include <qvbox.h>
-#include <qfile.h>
+#include <tqlabel.h>
+#include <tqvbox.h>
+#include <tqfile.h>
#include <klocale.h>
-delUser::delUser(KU::KUser *AUser, QWidget *parent, const char *name)
+delUser::delUser(KU::KUser *AUser, TQWidget *parent, const char *name)
: KDialogBase( parent, name, true, i18n("Delete User"),
KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true )
{
- QVBox *page = makeVBoxMainWidget();
- new QLabel( i18n("<p>Deleting user <b>%1</b>"
+ TQVBox *page = makeVBoxMainWidget();
+ new TQLabel( i18n("<p>Deleting user <b>%1</b>"
"<p>Also perform the following actions:").arg(AUser->getName()),
page);
- m_deleteHomeDir = new QCheckBox(i18n("Delete &home folder: %1").arg(AUser->getHomeDir()), page);
- QString mailboxpath = QFile::decodeName(MAIL_SPOOL_DIR) + "/" + AUser->getName();
- m_deleteMailBox = new QCheckBox(i18n("Delete &mailbox: %1").arg(mailboxpath), page);
+ m_deleteHomeDir = new TQCheckBox(i18n("Delete &home folder: %1").arg(AUser->getHomeDir()), page);
+ TQString mailboxpath = TQFile::decodeName(MAIL_SPOOL_DIR) + "/" + AUser->getName();
+ m_deleteMailBox = new TQCheckBox(i18n("Delete &mailbox: %1").arg(mailboxpath), page);
setButtonGuiItem(KDialogBase::Ok, KStdGuiItem::del());
}
diff --git a/kuser/delUser.h b/kuser/delUser.h
index 0317a9b..1e4bc21 100644
--- a/kuser/delUser.h
+++ b/kuser/delUser.h
@@ -21,14 +21,14 @@
#define _KU_DELUSER_H_
#include <kdialogbase.h>
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include "kuser.h"
class delUser: public KDialogBase {
Q_OBJECT
public:
- delUser(KU::KUser *AUser, QWidget *parent = 0, const char *name = 0);
+ delUser(KU::KUser *AUser, TQWidget *parent = 0, const char *name = 0);
bool getDeleteHomeDir()
{ return m_deleteHomeDir->isChecked(); }
@@ -36,8 +36,8 @@ public:
{ return m_deleteMailBox->isChecked(); }
private:
- QCheckBox *m_deleteHomeDir;
- QCheckBox *m_deleteMailBox;
+ TQCheckBox *m_deleteHomeDir;
+ TQCheckBox *m_deleteMailBox;
};
#endif // _KU_DELUSER_H
diff --git a/kuser/editDefaults.cpp b/kuser/editDefaults.cpp
index 82aba32..75ca1e7 100644
--- a/kuser/editDefaults.cpp
+++ b/kuser/editDefaults.cpp
@@ -37,7 +37,7 @@
#include "passwordpolicy.h"
#include "misc.h"
-editDefaults::editDefaults( KConfigSkeleton *config, QWidget *parent, const char *name ) :
+editDefaults::editDefaults( KConfigSkeleton *config, TQWidget *parent, const char *name ) :
KConfigDialog( parent, name, config, IconList,
Default|Ok|Apply|Cancel|Help, Ok, true )
{
@@ -76,7 +76,7 @@ editDefaults::editDefaults( KConfigSkeleton *config, QWidget *parent, const char
page3->addTab( page3b, i18n("Settings") );
page3c = new LdapSamba( this );
- connect( page3c->domQuery, SIGNAL(clicked()), SLOT(slotQueryClicked()) );
+ connect( page3c->domQuery, TQT_SIGNAL(clicked()), TQT_SLOT(slotQueryClicked()) );
page3->addTab( page3c, i18n("Samba") );
addPage( page3, i18n("LDAP"), "", i18n("LDAP Source Settings") );
}
@@ -91,9 +91,9 @@ void editDefaults::slotQueryClicked()
mDomain.sid = "";
mDomain.ridbase = 1000;
- QStringList attrs;
- QString filter = "(objectClass=sambaDomain)";
- QString dom = page3c->kcfg_samdomain->text();
+ TQStringList attrs;
+ TQString filter = "(objectClass=sambaDomain)";
+ TQString dom = page3c->kcfg_samdomain->text();
if ( !dom.isEmpty() ) filter = "(&(sambaDomainName=" + dom + ")"+filter+")";
attrs.append("sambaDomainName");
attrs.append("sambaSID");
@@ -107,10 +107,10 @@ void editDefaults::slotQueryClicked()
mLdif.startParsing();
KIO::Job *job = KIO::get( _url, true, false );
// job->addMetaData("no-auth-prompt","true");
- connect( job, SIGNAL( data( KIO::Job*, const QByteArray& ) ),
- this, SLOT( loadData( KIO::Job*, const QByteArray& ) ) );
- connect( job, SIGNAL( result( KIO::Job* ) ),
- this, SLOT( loadResult( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ),
+ this, TQT_SLOT( loadData( KIO::Job*, const TQByteArray& ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ),
+ this, TQT_SLOT( loadResult( KIO::Job* ) ) );
mProg = new KProgressDialog( this, 0, i18n("LDAP Query"), _url.prettyURL(), true );
mProg->progressBar()->setValue( 0 );
@@ -135,7 +135,7 @@ void editDefaults::slotQueryClicked()
kdDebug() << "domQueryx" << endl;
}
-void editDefaults::loadData( KIO::Job*, const QByteArray& d )
+void editDefaults::loadData( KIO::Job*, const TQByteArray& d )
{
KABC::LDIF::ParseVal ret;
@@ -149,11 +149,11 @@ void editDefaults::loadData( KIO::Job*, const QByteArray& d )
switch ( ret ) {
case KABC::LDIF::Item:
if ( mLdif.attr() == "sambaDomainName" )
- mDomain.name = QString::fromUtf8( mLdif.val(), mLdif.val().size() );
+ mDomain.name = TQString::fromUtf8( mLdif.val(), mLdif.val().size() );
else if ( mLdif.attr() == "sambaSID" )
- mDomain.sid = QString::fromUtf8( mLdif.val(), mLdif.val().size() );
+ mDomain.sid = TQString::fromUtf8( mLdif.val(), mLdif.val().size() );
else if ( mLdif.attr() == "sambaAlgorithmicRidBase" )
- mDomain.ridbase = QString::fromUtf8( mLdif.val(), mLdif.val().size() ).toUInt();
+ mDomain.ridbase = TQString::fromUtf8( mLdif.val(), mLdif.val().size() ).toUInt();
break;
case KABC::LDIF::EndEntry:
mProg->progressBar()->advance( 1 );
diff --git a/kuser/editDefaults.h b/kuser/editDefaults.h
index dbe9dd6..c6d40c8 100644
--- a/kuser/editDefaults.h
+++ b/kuser/editDefaults.h
@@ -21,7 +21,7 @@
#ifndef _KU_EDITDEFAULTS_H_
#define _KU_EDITDEFAULTS_H_
-#include <qmemarray.h>
+#include <tqmemarray.h>
#include <kconfigdialog.h>
#include <kprogress.h>
#include <kabc/ldif.h>
@@ -32,27 +32,27 @@ namespace KABC { class LdapConfigWidget; }
namespace KIO { class Job; }
typedef struct SambaDomain {
- QString name;
- QString sid;
+ TQString name;
+ TQString sid;
uint ridbase;
};
class editDefaults : public KConfigDialog {
Q_OBJECT
public:
- editDefaults( KConfigSkeleton *config, QWidget* parent, const char * name = 0 );
+ editDefaults( KConfigSkeleton *config, TQWidget* parent, const char * name = 0 );
private:
KProgressDialog *mProg;
LdapSamba *page3c;
KABC::LdapConfigWidget *ldconf;
KABC::LDIF mLdif;
bool mCancelled;
- QString mErrorMsg;
- QValueList<SambaDomain> mResult;
+ TQString mErrorMsg;
+ TQValueList<SambaDomain> mResult;
SambaDomain mDomain;
private slots:
void slotQueryClicked();
- void loadData( KIO::Job*, const QByteArray& d );
+ void loadData( KIO::Job*, const TQByteArray& d );
void loadResult( KIO::Job* job);
};
diff --git a/kuser/editGroup.cpp b/kuser/editGroup.cpp
index 1ef74d8..2f6a4cf 100644
--- a/kuser/editGroup.cpp
+++ b/kuser/editGroup.cpp
@@ -19,11 +19,11 @@
**/
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qvbox.h>
-#include <qvalidator.h>
-#include <qwhatsthis.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqvbox.h>
+#include <tqvalidator.h>
+#include <tqwhatsthis.h>
#include <kapplication.h>
#include <klocale.h>
@@ -35,7 +35,7 @@
#include "editGroup.h"
editGroup::editGroup(KU::KGroup *akg, bool samba, bool add,
- QWidget* parent, const char* name)
+ TQWidget* parent, const char* name)
: KDialogBase(parent, name, true, i18n("Group Properties"), Ok | Cancel, Ok, true)
{
kg = akg;
@@ -50,17 +50,17 @@ editGroup::editGroup(KU::KGroup *akg, bool samba, bool add,
rid.rid = 513; rid.name = i18n("Domain Users"); rid.desc = i18n("Users"); mRids.append( rid );
rid.rid = 514; rid.name = i18n("Domain Guests"); rid.desc = i18n("Guests"); mRids.append( rid );
- QFrame *page = makeMainWidget();
- QGridLayout *layout = new QGridLayout( page, 10, 3, marginHint(), spacingHint() );
- QLabel *lb;
+ TQFrame *page = makeMainWidget();
+ TQGridLayout *layout = new TQGridLayout( page, 10, 3, marginHint(), spacingHint() );
+ TQLabel *lb;
- lb = new QLabel( page );
+ lb = new TQLabel( page );
lb->setText(i18n("Group number:"));
legid = new KLineEdit(page);
// ensure it fits at least 20 characters
legid->setText( "XXXXXXXXXXXXXXXXXXX" );
- legid->setText( QString::number(kg->getGID()) );
- legid->setValidator( new QIntValidator(this) );
+ legid->setText( TQString::number(kg->getGID()) );
+ legid->setValidator( new TQIntValidator(this) );
legid->setEnabled( mAdd );
legid->setReadOnly( ro );
lb->setBuddy( legid );
@@ -68,25 +68,25 @@ editGroup::editGroup(KU::KGroup *akg, bool samba, bool add,
layout->addMultiCellWidget( legid, 0, 0, 1, 2 );
if ( mSamba ) {
- lb = new QLabel( page );
+ lb = new TQLabel( page );
lb->setText(i18n("Group rid:"));
lerid = new KComboBox( page );
lerid->setEditable( !ro );
- QValueList<RID>::Iterator it;
+ TQValueList<RID>::Iterator it;
for ( it = mRids.begin(); it != mRids.end(); ++it ) {
- lerid->insertItem( QString::number( (*it).rid ) + " - " + (*it).name );
+ lerid->insertItem( TQString::number( (*it).rid ) + " - " + (*it).name );
}
- lerid->setCurrentText( QString::number( sid.getRID() ) );
- lerid->setValidator (new QIntValidator(this) );
+ lerid->setCurrentText( TQString::number( sid.getRID() ) );
+ lerid->setValidator (new TQIntValidator(this) );
lerid->setEnabled( mAdd );
- connect( lerid, SIGNAL(activated(int)), SLOT(ridSelected(int)) );
+ connect( lerid, TQT_SIGNAL(activated(int)), TQT_SLOT(ridSelected(int)) );
lb->setBuddy( lerid );
layout->addWidget( lb, 1, 0 );
layout->addMultiCellWidget( lerid, 1, 1, 1, 2 );
}
- lb = new QLabel( page );
+ lb = new TQLabel( page );
lb->setText(i18n("Group name:"));
legrpname = new KLineEdit( page );
@@ -100,7 +100,7 @@ editGroup::editGroup(KU::KGroup *akg, bool samba, bool add,
layout->addMultiCellWidget( legrpname, 2, 2, 1, 2 );
if ( mSamba ) {
- lb = new QLabel( page );
+ lb = new TQLabel( page );
lb->setText(i18n("Description:"));
ledesc = new KLineEdit(page);
ledesc->setText( kg->getDesc() );
@@ -109,7 +109,7 @@ editGroup::editGroup(KU::KGroup *akg, bool samba, bool add,
layout->addWidget( lb, 3, 0 );
layout->addMultiCellWidget( ledesc, 3, 3, 1, 2 );
- lb = new QLabel( page );
+ lb = new TQLabel( page );
lb->setText(i18n("Display name:"));
ledispname = new KLineEdit(page);
ledispname->setText( kg->getDisplayName() );
@@ -118,7 +118,7 @@ editGroup::editGroup(KU::KGroup *akg, bool samba, bool add,
layout->addWidget( lb, 4, 0 );
layout->addMultiCellWidget( ledispname, 4, 4, 1, 2 );
- lb = new QLabel( page );
+ lb = new TQLabel( page );
lb->setText(i18n("Type:"));
letype = new KComboBox( page );
letype->insertItem( i18n("Domain") );
@@ -139,7 +139,7 @@ editGroup::editGroup(KU::KGroup *akg, bool samba, bool add,
layout->addWidget( lb, 5, 0 );
layout->addMultiCellWidget( letype, 5, 5, 1, 2 );
- lb = new QLabel( page );
+ lb = new TQLabel( page );
lb->setText(i18n("Domain SID:"));
ledomsid = new KLineEdit(page);
ledomsid->setText( sid.getDOM() );
@@ -148,42 +148,42 @@ editGroup::editGroup(KU::KGroup *akg, bool samba, bool add,
layout->addWidget( lb, 6, 0 );
layout->addMultiCellWidget( ledomsid, 6, 6, 1, 2 );
- cbsamba = new QCheckBox( i18n("Disable Samba group information"), page );
+ cbsamba = new TQCheckBox( i18n("Disable Samba group information"), page );
layout->addMultiCellWidget( cbsamba, 7, 7, 0, 2 );
- connect( cbsamba, SIGNAL(toggled(bool)), ledesc, SLOT(setDisabled(bool)) );
- connect( cbsamba, SIGNAL(toggled(bool)), ledispname, SLOT(setDisabled(bool)) );
- connect( cbsamba, SIGNAL(toggled(bool)), letype, SLOT(setDisabled(bool)) );
- connect( cbsamba, SIGNAL(toggled(bool)), ledomsid, SLOT(setDisabled(bool)) );
- if ( mAdd ) connect( cbsamba, SIGNAL(toggled(bool)), lerid, SLOT(setDisabled(bool)) );
+ connect( cbsamba, TQT_SIGNAL(toggled(bool)), ledesc, TQT_SLOT(setDisabled(bool)) );
+ connect( cbsamba, TQT_SIGNAL(toggled(bool)), ledispname, TQT_SLOT(setDisabled(bool)) );
+ connect( cbsamba, TQT_SIGNAL(toggled(bool)), letype, TQT_SLOT(setDisabled(bool)) );
+ connect( cbsamba, TQT_SIGNAL(toggled(bool)), ledomsid, TQT_SLOT(setDisabled(bool)) );
+ if ( mAdd ) connect( cbsamba, TQT_SIGNAL(toggled(bool)), lerid, TQT_SLOT(setDisabled(bool)) );
if ( !mAdd ) cbsamba->setChecked( !( kg->getCaps() & KU::KGroup::Cap_Samba ) );
}
m_list_in = new KListView(page);
m_list_in->setFullWidth(true); // Single column, full widget width.
m_list_in->addColumn(i18n("Users in Group"));
- m_list_in->setSelectionMode( QListView::Extended );
+ m_list_in->setSelectionMode( TQListView::Extended );
layout->addWidget( m_list_in, 8, 0 );
- QVBox *vbox = new QVBox(page);
- QPushButton *btadd = new QPushButton(i18n("Add <-"), vbox);
- QPushButton *btdel = new QPushButton(i18n("Remove ->"), vbox);
+ TQVBox *vbox = new TQVBox(page);
+ TQPushButton *btadd = new TQPushButton(i18n("Add <-"), vbox);
+ TQPushButton *btdel = new TQPushButton(i18n("Remove ->"), vbox);
layout->addWidget( vbox, 8, 1 );
m_list_notin = new KListView(page);
m_list_notin->setFullWidth(true); // Single column, full widget width.
m_list_notin->addColumn(i18n("Users NOT in Group"));
- m_list_notin->setSelectionMode(QListView::Extended);
+ m_list_notin->setSelectionMode(TQListView::Extended);
layout->addWidget( m_list_notin, 8, 2 );
-// QString whatstr = i18n("Select the users that should be in this kg->");
-// QWhatsThis::add(m_list, whatstr);
-// connect(this,SIGNAL(okClicked(void)),
- //this,SLOT(okClicked()));
+// TQString whatstr = i18n("Select the users that should be in this kg->");
+// TQWhatsThis::add(m_list, whatstr);
+// connect(this,TQT_SIGNAL(okClicked(void)),
+ //this,TQT_SLOT(okClicked()));
for (unsigned int i = 0; i<kug->getUsers().count(); i++) {
KU::KUser *user;
user = kug->getUsers()[i];
- QString userName = user->getName();
+ TQString userName = user->getName();
if ( kg->lookup_user(userName) || user->getGID() == kg->getGID() ) {
KListViewItem *item = new KListViewItem(m_list_in, userName);
if ( user->getGID() == kg->getGID() ) item->setSelectable( false );
@@ -192,8 +192,8 @@ editGroup::editGroup(KU::KGroup *akg, bool samba, bool add,
}
}
- connect(btadd, SIGNAL(clicked()), SLOT(addClicked()));
- connect(btdel, SIGNAL(clicked()), SLOT(delClicked()));
+ connect(btadd, TQT_SIGNAL(clicked()), TQT_SLOT(addClicked()));
+ connect(btdel, TQT_SIGNAL(clicked()), TQT_SLOT(delClicked()));
if ( ro ) {
btadd->setEnabled( false );
@@ -207,7 +207,7 @@ editGroup::~editGroup()
void editGroup::ridSelected( int index )
{
- lerid->setCurrentText( QString::number( mRids[ index ].rid ) );
+ lerid->setCurrentText( TQString::number( mRids[ index ].rid ) );
legrpname->setText( mRids[ index ].name );
ledesc->setText( mRids[ index ].desc );
ledispname->setText( mRids[ index ].name );
@@ -215,8 +215,8 @@ void editGroup::ridSelected( int index )
void editGroup::addClicked()
{
- QListViewItem *item, *next;
- QString name;
+ TQListViewItem *item, *next;
+ TQString name;
item = m_list_notin->firstChild();
while ( item ) {
@@ -232,8 +232,8 @@ void editGroup::addClicked()
void editGroup::delClicked()
{
- QListViewItem *item, *next;
- QString name;
+ TQListViewItem *item, *next;
+ TQString name;
item = m_list_in->firstChild();
while ( item ) {
@@ -256,7 +256,7 @@ void editGroup::slotOk()
SID sid;
kg->clear();
- QString s;
+ TQString s;
s = legid->text();
if ( mSamba && !cbsamba->isChecked() ) {
@@ -311,13 +311,13 @@ void editGroup::slotOk()
kg->setDisplayName( ledispname->text() );
} else {
kg->setCaps( 0 );
- kg->setSID( QString::null );
- kg->setDesc( QString::null );
- kg->setDisplayName( QString::null );
+ kg->setSID( TQString::null );
+ kg->setDesc( TQString::null );
+ kg->setDisplayName( TQString::null );
kg->setType( 0 );
}
- QListViewItem *item;
+ TQListViewItem *item;
item = m_list_in->firstChild();
while ( item ) {
kg->addUser( item->text( 0 ) );
diff --git a/kuser/editGroup.h b/kuser/editGroup.h
index 3d6334b..c3e8c76 100644
--- a/kuser/editGroup.h
+++ b/kuser/editGroup.h
@@ -22,7 +22,7 @@
#ifndef _KU_EDITGROUP_H_
#define _KU_EDITGROUP_H_
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include <kdialogbase.h>
#include <klistview.h>
#include <kcombobox.h>
@@ -36,7 +36,7 @@ class editGroup : public KDialogBase
public:
editGroup(KU::KGroup *akg, bool samba, bool add,
- QWidget* parent = NULL, const char* name = NULL);
+ TQWidget* parent = NULL, const char* name = NULL);
virtual ~editGroup();
@@ -59,12 +59,12 @@ private:
KLineEdit *ledesc;
KLineEdit *ledomsid;
KComboBox *letype;
- QCheckBox *cbsamba;
- QString mOldName;
+ TQCheckBox *cbsamba;
+ TQString mOldName;
typedef struct _RID {
uint rid;
- QString name,desc;
+ TQString name,desc;
} RID;
- QValueList<RID> mRids;
+ TQValueList<RID> mRids;
};
#endif // _KU_EDITGROUP_H_
diff --git a/kuser/kglobal.cpp b/kuser/kglobal.cpp
index 93a7cce..201bdf7 100644
--- a/kuser/kglobal.cpp
+++ b/kuser/kglobal.cpp
@@ -36,7 +36,7 @@ KUserGlobals::KUserGlobals()
groups = 0;
}
-void KUserGlobals::initCfg( const QString &connection )
+void KUserGlobals::initCfg( const TQString &connection )
{
if ( cfg ) {
cfg->writeConfig();
diff --git a/kuser/kglobal_.h b/kuser/kglobal_.h
index 2cf8dbe..e210fd2 100644
--- a/kuser/kglobal_.h
+++ b/kuser/kglobal_.h
@@ -29,7 +29,7 @@ public:
KUserGlobals();
~KUserGlobals();
void init();
- void initCfg( const QString &connection );
+ void initCfg( const TQString &connection );
KUserPrefsBase *kcfg() { return cfg; }
KU::KUsers &getUsers();
diff --git a/kuser/kgroup.cpp b/kuser/kgroup.cpp
index 44fc31c..77fcc91 100644
--- a/kuser/kgroup.cpp
+++ b/kuser/kgroup.cpp
@@ -18,7 +18,7 @@
* Boston, MA 02110-1301, USA.
**/
-#include <qstring.h>
+#include <tqstring.h>
#include <kdebug.h>
@@ -28,7 +28,7 @@
KU::KGroup::KGroup()
{
- pwd = QString::fromLatin1("*");
+ pwd = TQString::fromLatin1("*");
gid = 0;
type = 2;
caps = 0;
@@ -68,12 +68,12 @@ int KU::KGroup::getCaps()
return caps;
}
-const QString &KU::KGroup::getName() const
+const TQString &KU::KGroup::getName() const
{
return name;
}
-const QString &KU::KGroup::getPwd() const
+const TQString &KU::KGroup::getPwd() const
{
return pwd;
}
@@ -93,22 +93,22 @@ int KU::KGroup::getType() const
return type;
}
-const QString &KU::KGroup::getDisplayName() const
+const TQString &KU::KGroup::getDisplayName() const
{
return displayname;
}
-const QString &KU::KGroup::getDesc() const
+const TQString &KU::KGroup::getDesc() const
{
return desc;
}
-void KU::KGroup::setName(const QString &data)
+void KU::KGroup::setName(const TQString &data)
{
name = data;
}
-void KU::KGroup::setPwd(const QString &data)
+void KU::KGroup::setPwd(const TQString &data)
{
pwd = data;
}
@@ -128,22 +128,22 @@ void KU::KGroup::setType(int data)
type = data;
}
-void KU::KGroup::setDisplayName(const QString &data)
+void KU::KGroup::setDisplayName(const TQString &data)
{
displayname = data;
}
-void KU::KGroup::setDesc(const QString &data)
+void KU::KGroup::setDesc(const TQString &data)
{
desc = data;
}
-bool KU::KGroup::lookup_user(const QString &name)
+bool KU::KGroup::lookup_user(const TQString &name)
{
return (u.find(name) != u.end());
}
-bool KU::KGroup::addUser(const QString &name)
+bool KU::KGroup::addUser(const TQString &name)
{
if (!lookup_user(name)) {
u.append(name);
@@ -152,7 +152,7 @@ bool KU::KGroup::addUser(const QString &name)
return false;
}
-bool KU::KGroup::removeUser(const QString &name)
+bool KU::KGroup::removeUser(const TQString &name)
{
return ( u.remove(name) > 0 );
}
@@ -162,7 +162,7 @@ uint KU::KGroup::count() const
return u.count();
}
-QString KU::KGroup::user(uint i)
+TQString KU::KGroup::user(uint i)
{
return u[i];
}
@@ -178,10 +178,10 @@ KU::KGroups::KGroups(KUserPrefsBase *cfg)
mCfg = cfg;
}
-KU::KGroup *KU::KGroups::lookup(const QString &name)
+KU::KGroup *KU::KGroups::lookup(const TQString &name)
{
KU::KGroup *group;
- QPtrListIterator<KU::KGroup> it( mGroups );
+ TQPtrListIterator<KU::KGroup> it( mGroups );
while ( (group = it.current()) != 0 && group->getName() != name ) ++it;
return group;
@@ -190,7 +190,7 @@ KU::KGroup *KU::KGroups::lookup(const QString &name)
KU::KGroup *KU::KGroups::lookup(gid_t gid)
{
KU::KGroup *group;
- QPtrListIterator<KU::KGroup> it( mGroups );
+ TQPtrListIterator<KU::KGroup> it( mGroups );
while ( (group = it.current()) != 0 && group->getGID() != gid ) ++it;
return group;
@@ -199,16 +199,16 @@ KU::KGroup *KU::KGroups::lookup(gid_t gid)
KU::KGroup *KU::KGroups::lookup_sam( const SID &sid )
{
KU::KGroup *group;
- QPtrListIterator<KU::KGroup> it( mGroups );
+ TQPtrListIterator<KU::KGroup> it( mGroups );
while ( (group = it.current()) != 0 && group->getSID() != sid ) ++it;
return group;
}
-KU::KGroup *KU::KGroups::lookup_sam( const QString &sid )
+KU::KGroup *KU::KGroups::lookup_sam( const TQString &sid )
{
KU::KGroup *group;
- QPtrListIterator<KU::KGroup> it( mGroups );
+ TQPtrListIterator<KU::KGroup> it( mGroups );
while ( (group = it.current()) != 0 && group->getSID().getSID() != sid ) ++it;
return group;
@@ -217,7 +217,7 @@ KU::KGroup *KU::KGroups::lookup_sam( const QString &sid )
KU::KGroup *KU::KGroups::lookup_sam( uint rid )
{
KU::KGroup *group;
- QPtrListIterator<KU::KGroup> it( mGroups );
+ TQPtrListIterator<KU::KGroup> it( mGroups );
while ( (group = it.current()) != 0 && group->getSID().getRID() != rid ) ++it;
return group;
@@ -270,7 +270,7 @@ uint KU::KGroups::count() const
return mGroups.count();
}
-const QString &KU::KGroups::getDOMSID() const
+const TQString &KU::KGroups::getDOMSID() const
{
return domsid;
}
diff --git a/kuser/kgroup.h b/kuser/kgroup.h
index c91f496..e3deae0 100644
--- a/kuser/kgroup.h
+++ b/kuser/kgroup.h
@@ -23,9 +23,9 @@
#include <sys/types.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqptrlist.h>
#include "kuserprefs.h"
#include "sid.h"
@@ -46,27 +46,27 @@ public:
void setCaps( int data );
int getCaps();
- const QString &getName() const;
- const QString &getPwd() const;
+ const TQString &getName() const;
+ const TQString &getPwd() const;
gid_t getGID() const;
const SID &getSID() const;
int getType() const;
- const QString &getDisplayName() const;
- const QString &getDesc() const;
+ const TQString &getDisplayName() const;
+ const TQString &getDesc() const;
- void setName(const QString &data);
- void setPwd(const QString &data);
+ void setName(const TQString &data);
+ void setPwd(const TQString &data);
void setGID(gid_t data);
void setSID(const SID &data);
void setType(int data);
- void setDisplayName(const QString &data);
- void setDesc(const QString &data);
+ void setDisplayName(const TQString &data);
+ void setDesc(const TQString &data);
- bool addUser(const QString &name);
- bool removeUser(const QString &name);
- bool lookup_user(const QString &name);
+ bool addUser(const TQString &name);
+ bool removeUser(const TQString &name);
+ bool lookup_user(const TQString &name);
uint count() const;
- QString user(uint i);
+ TQString user(uint i);
void clear();
protected:
@@ -79,10 +79,10 @@ protected:
SID sid;
int type;
int caps;
- QString displayname;
- QString desc;
+ TQString displayname;
+ TQString desc;
- QStringList u;
+ TQStringList u;
};
class KGroups {
@@ -94,24 +94,24 @@ public:
Cap_Samba = 8
};
- typedef QPtrListIterator<KGroup> DelIt;
- typedef QPtrListIterator<KGroup> AddIt;
- typedef QMapIterator<KGroup*, KGroup> ModIt;
+ typedef TQPtrListIterator<KGroup> DelIt;
+ typedef TQPtrListIterator<KGroup> AddIt;
+ typedef TQMapIterator<KGroup*, KGroup> ModIt;
- QPtrList<KGroup> mDelSucc;
- QPtrList<KGroup> mAddSucc;
- QMap<KGroup*, KGroup> mModSucc;
+ TQPtrList<KGroup> mDelSucc;
+ TQPtrList<KGroup> mAddSucc;
+ TQMap<KGroup*, KGroup> mModSucc;
KGroups( KUserPrefsBase *cfg );
virtual ~KGroups();
int getCaps() const { return caps; }
- const QString &getDOMSID() const;
+ const TQString &getDOMSID() const;
- KGroup *lookup( const QString &name );
+ KGroup *lookup( const TQString &name );
KGroup *lookup( gid_t gid );
KGroup *lookup_sam( const SID &sid );
- KGroup *lookup_sam( const QString &sid );
+ KGroup *lookup_sam( const TQString &sid );
KGroup *lookup_sam( uint rid );
KGroup *first();
@@ -136,13 +136,13 @@ public:
protected:
KUserPrefsBase *mCfg;
- QPtrList<KGroup> mGroups;
+ TQPtrList<KGroup> mGroups;
- QPtrList<KGroup> mDel;
- QPtrList<KGroup> mAdd;
- QMap<KGroup*, KGroup> mMod;
+ TQPtrList<KGroup> mDel;
+ TQPtrList<KGroup> mAdd;
+ TQMap<KGroup*, KGroup> mMod;
int caps;
- QString domsid;
+ TQString domsid;
};
}
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 ) {
diff --git a/kuser/kgroupfiles.h b/kuser/kgroupfiles.h
index b2725bc..6918d61 100644
--- a/kuser/kgroupfiles.h
+++ b/kuser/kgroupfiles.h
@@ -23,9 +23,9 @@
#include <sys/types.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqptrlist.h>
#include "kgroup.h"
diff --git a/kuser/kgroupldap.cpp b/kuser/kgroupldap.cpp
index 1a84148..2f66b27 100644
--- a/kuser/kgroupldap.cpp
+++ b/kuser/kgroupldap.cpp
@@ -16,8 +16,8 @@
* Boston, MA 02110-1301, USA.
**/
-#include <qstring.h>
-#include <qdir.h>
+#include <tqstring.h>
+#include <tqdir.h>
#include <kdebug.h>
#include <kmessagebox.h>
@@ -70,13 +70,13 @@ KGroupLDAP::~KGroupLDAP()
mGroups.clear();
}
-QString KGroupLDAP::getRDN( KU::KGroup *group )
+TQString KGroupLDAP::getRDN( KU::KGroup *group )
{
switch ( mCfg->ldapgrouprdn() ) {
case KUserPrefsBase::EnumLdapgrouprdn::cn:
return "cn=" + group->getName();
case KUserPrefsBase::EnumLdapgrouprdn::gidNumber:
- return "gidNumber=" + QString::number( group->getGID() );
+ return "gidNumber=" + TQString::number( group->getGID() );
default:
return "";
}
@@ -87,12 +87,12 @@ void KGroupLDAP::result( KIO::Job *job )
delete mProg;
mCancel = false;
if ( job->error() ) {
- QString errstr = job->errorString();
+ TQString errstr = job->errorString();
if ( !errstr.isEmpty() ) {
if ( ldif.isEmpty() )
KMessageBox::error( 0, errstr );
else
- KMessageBox::detailedError( 0, errstr, QString::fromUtf8( ldif, ldif.size()-1 ) );
+ KMessageBox::detailedError( 0, errstr, TQString::fromUtf8( ldif, ldif.size()-1 ) );
}
mOk = false;
} else {
@@ -100,7 +100,7 @@ void KGroupLDAP::result( KIO::Job *job )
}
}
-void KGroupLDAP::data( KIO::Job*, const QByteArray& data )
+void KGroupLDAP::data( KIO::Job*, const TQByteArray& data )
{
if ( data.size() ) {
mParser.setLDIF( data );
@@ -109,15 +109,15 @@ void KGroupLDAP::data( KIO::Job*, const QByteArray& data )
}
KABC::LDIF::ParseVal ret;
- QString name, val;
- QByteArray value;
+ TQString name, val;
+ TQByteArray value;
do {
ret = mParser.nextItem();
switch ( ret ) {
case KABC::LDIF::Item:
name = mParser.attr().lower();
value = mParser.val();
- val = QString::fromUtf8( value, value.size() );
+ val = TQString::fromUtf8( value, value.size() );
if ( name == "objectclass" ) {
if ( val.lower() == "sambagroupmapping" )
mGroup->setCaps( KU::KGroup::Cap_Samba );
@@ -170,10 +170,10 @@ bool KGroupLDAP::reload()
ldif = "";
KIO::Job *job = KIO::get( mUrl, true, false );
- connect( job, SIGNAL( data( KIO::Job*, const QByteArray& ) ),
- this, SLOT( data( KIO::Job*, const QByteArray& ) ) );
- connect( job, SIGNAL( result( KIO::Job* ) ),
- this, SLOT( result( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ),
+ this, TQT_SLOT( data( KIO::Job*, const TQByteArray& ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ),
+ this, TQT_SLOT( result( KIO::Job* ) ) );
mProg->exec();
if ( mCancel ) job->kill();
@@ -193,15 +193,15 @@ bool KGroupLDAP::dbcommit()
mProg = new KProgressDialog( 0, "", i18n("LDAP Operation"), "", true );
KIO::Job *job = KIO::put( mUrl, -1, false, false, false );
- connect( job, SIGNAL( dataReq( KIO::Job*, QByteArray& ) ),
- this, SLOT( putData( KIO::Job*, QByteArray& ) ) );
- connect( job, SIGNAL( result( KIO::Job* ) ),
- this, SLOT( result( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( dataReq( KIO::Job*, TQByteArray& ) ),
+ this, TQT_SLOT( putData( KIO::Job*, TQByteArray& ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ),
+ this, TQT_SLOT( result( KIO::Job* ) ) );
mProg->exec();
return( mOk );
}
-void KGroupLDAP::putData( KIO::Job*, QByteArray& data )
+void KGroupLDAP::putData( KIO::Job*, TQByteArray& data )
{
ModIt mit = mMod.begin();
@@ -243,7 +243,7 @@ void KGroupLDAP::addData( KU::KGroup *group )
ldif +=
KABC::LDIF::assembleLine( "cn", group->getName() ) + "\n" +
- KABC::LDIF::assembleLine( "gidnumber", QString::number(group->getGID()) ) + "\n" +
+ KABC::LDIF::assembleLine( "gidnumber", TQString::number(group->getGID()) ) + "\n" +
KABC::LDIF::assembleLine( "userpassword", group->getPwd() ) + "\n";
for ( uint i=0; i < group->count(); i++ ) {
ldif += KABC::LDIF::assembleLine( "memberuid", group->user(i) ) + "\n";
@@ -253,7 +253,7 @@ void KGroupLDAP::addData( KU::KGroup *group )
KABC::LDIF::assembleLine( "sambasid", group->getSID().getSID() ) + "\n" +
KABC::LDIF::assembleLine( "displayname", group->getDisplayName() ) + "\n" +
KABC::LDIF::assembleLine( "description", group->getDesc() ) + "\n" +
- KABC::LDIF::assembleLine( "sambagrouptype", QString::number( group->getType() ) ) + "\n";
+ KABC::LDIF::assembleLine( "sambagrouptype", TQString::number( group->getType() ) ) + "\n";
}
ldif += "\n\n";
kdDebug() << "ldif: " << ldif << endl;
@@ -268,8 +268,8 @@ void KGroupLDAP::delData( KU::KGroup *group )
void KGroupLDAP::modData( KU::KGroup *group )
{
- QString oldrdn = getRDN( mGroup );
- QString newrdn = getRDN( group );
+ TQString oldrdn = getRDN( mGroup );
+ TQString newrdn = getRDN( group );
ldif = "";
if ( oldrdn != newrdn ) {
@@ -290,7 +290,7 @@ void KGroupLDAP::modData( KU::KGroup *group )
"-\nreplace: cn\n" +
KABC::LDIF::assembleLine( "cn", group->getName() ) +
"\n-\nreplace: gidnumber\n" +
- KABC::LDIF::assembleLine( "gidnumber", QString::number(group->getGID()) ) +
+ KABC::LDIF::assembleLine( "gidnumber", TQString::number(group->getGID()) ) +
"\n-\nreplace: userpassword\n" +
KABC::LDIF::assembleLine( "userpassword", group->getPwd() ) +
"\n-\nreplace: memberuid\n";
@@ -307,7 +307,7 @@ void KGroupLDAP::modData( KU::KGroup *group )
"\n-\nreplace: description\n" +
KABC::LDIF::assembleLine( "description", group->getDesc() ) +
"\n-\nreplace: sambagrouptype\n" +
- KABC::LDIF::assembleLine( "sambagrouptype", QString::number( group->getType() ) ) + "\n";
+ KABC::LDIF::assembleLine( "sambagrouptype", TQString::number( group->getType() ) ) + "\n";
} else {
ldif += "-\nreplace: sambasid\n";
ldif += "-\nreplace: displayname\n";
diff --git a/kuser/kgroupldap.h b/kuser/kgroupldap.h
index ece0185..40c1ef4 100644
--- a/kuser/kgroupldap.h
+++ b/kuser/kgroupldap.h
@@ -21,9 +21,9 @@
#include <sys/types.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqptrlist.h>
#include <kprogress.h>
#include <kabc/ldapurl.h>
@@ -32,7 +32,7 @@
#include "kgroup.h"
-class KGroupLDAP : public QObject, public KU::KGroups {
+class KGroupLDAP : public TQObject, public KU::KGroups {
Q_OBJECT
public:
KGroupLDAP( KUserPrefsBase *cfg );
@@ -42,8 +42,8 @@ public:
virtual bool dbcommit();
private slots:
- void data( KIO::Job*, const QByteArray& );
- void putData( KIO::Job *job, QByteArray& data );
+ void data( KIO::Job*, const TQByteArray& );
+ void putData( KIO::Job *job, TQByteArray& data );
void result( KIO::Job* );
private:
KABC::LDIF mParser;
@@ -54,9 +54,9 @@ private:
bool first, mOk, mCancel;
int mAdv;
- QCString ldif;
+ TQCString ldif;
- QString getRDN( KU::KGroup *group );
+ TQString getRDN( KU::KGroup *group );
void addData( KU::KGroup *group );
void delData( KU::KGroup *group );
void modData( KU::KGroup *group );
diff --git a/kuser/kgroupsystem.cpp b/kuser/kgroupsystem.cpp
index 1cb2f13..f30176f 100644
--- a/kuser/kgroupsystem.cpp
+++ b/kuser/kgroupsystem.cpp
@@ -22,7 +22,7 @@
#include <errno.h>
#include <grp.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <kdebug.h>
#include <kmessagebox.h>
@@ -52,13 +52,13 @@ bool KGroupSystem::reload()
while ((p = getgrent()) != NULL) {
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++;
}
diff --git a/kuser/kgroupsystem.h b/kuser/kgroupsystem.h
index b26dea8..80b30e1 100644
--- a/kuser/kgroupsystem.h
+++ b/kuser/kgroupsystem.h
@@ -23,9 +23,9 @@
#include <sys/types.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqptrlist.h>
#include "kgroup.h"
diff --git a/kuser/kgroupvw.cpp b/kuser/kgroupvw.cpp
index 2641554..76af939 100644
--- a/kuser/kgroupvw.cpp
+++ b/kuser/kgroupvw.cpp
@@ -29,7 +29,7 @@ KGroupViewItem::KGroupViewItem(KListView *parent, KU::KGroup *aku)
{
}
-int KGroupViewItem::compare( QListViewItem *i, int col, bool ascending ) const
+int KGroupViewItem::compare( TQListViewItem *i, int col, bool ascending ) const
{
switch ( col ) {
case 0: {
@@ -49,20 +49,20 @@ int KGroupViewItem::compare( QListViewItem *i, int col, bool ascending ) const
return ( rid1 < rid2) ? -1: 1;
}
default:
- return QListViewItem::compare( i, col, ascending );
+ return TQListViewItem::compare( i, col, ascending );
}
}
-QString KGroupViewItem::text(int num) const
+TQString KGroupViewItem::text(int num) const
{
switch(num)
{
- case 0: return QString::number(mGroup->getGID());
+ case 0: return TQString::number(mGroup->getGID());
case 1: return mGroup->getName();
case 2: return ( mGroup->getCaps() & KU::KGroup::Cap_Samba ) ?
- mGroup->getSID().getDOM() : QString::null;
+ mGroup->getSID().getDOM() : TQString::null;
case 3: return ( mGroup->getCaps() & KU::KGroup::Cap_Samba ) ?
- QString::number( mGroup->getSID().getRID() ) : QString::null;
+ TQString::number( mGroup->getSID().getRID() ) : TQString::null;
case 4: {
if ( mGroup->getCaps() & KU::KGroup::Cap_Samba ) {
switch ( mGroup->getType() ) {
@@ -72,20 +72,20 @@ QString KGroupViewItem::text(int num) const
default: return i18n("Unknown");
}
} else {
- return QString::null;
+ return TQString::null;
}
}
case 5: return mGroup->getDisplayName();
case 6: return mGroup->getDesc();
}
- return QString::null;
+ return TQString::null;
}
-KGroupView::KGroupView(QWidget *parent, const char *name)
+KGroupView::KGroupView(TQWidget *parent, const char *name)
: KListView( parent, name )
{
- setSelectionMode( QListView::Extended );
+ setSelectionMode( TQListView::Extended );
}
KGroupView::~KGroupView()
diff --git a/kuser/kgroupvw.h b/kuser/kgroupvw.h
index 4667f8c..5dd1fb8 100644
--- a/kuser/kgroupvw.h
+++ b/kuser/kgroupvw.h
@@ -21,7 +21,7 @@
#ifndef _KU_GROUPVW_H_
#define _KU_GROUPVW_H_
-#include <qwidget.h>
+#include <tqwidget.h>
#include <klistview.h>
@@ -33,8 +33,8 @@ public:
KGroupViewItem(KListView *parent, KU::KGroup *aku);
KU::KGroup *group() { return mGroup; }
private:
- virtual QString text ( int ) const;
- virtual int compare( QListViewItem *i, int col, bool ascending ) const;
+ virtual TQString text ( int ) const;
+ virtual int compare( TQListViewItem *i, int col, bool ascending ) const;
KU::KGroup *mGroup;
};
@@ -44,7 +44,7 @@ class KGroupView : public KListView
Q_OBJECT
public:
- KGroupView( QWidget* parent = 0, const char* name = 0 );
+ KGroupView( TQWidget* parent = 0, const char* name = 0 );
virtual ~KGroupView();
diff --git a/kuser/kuser.cpp b/kuser/kuser.cpp
index 2fd9ff1..2ef2e80 100644
--- a/kuser/kuser.cpp
+++ b/kuser/kuser.cpp
@@ -31,8 +31,8 @@
#include <sys/stat.h>
#endif
#include <fcntl.h>
-#include <qstring.h>
-#include <qdir.h>
+#include <tqstring.h>
+#include <tqdir.h>
#include "kglobal_.h"
#include "kuser.h"
@@ -163,37 +163,37 @@ bool KU::KUser::getCopySkel()
return isCopySkel;
}
-const QString &KU::KUser::getName() const
+const TQString &KU::KUser::getName() const
{
return p_name;
}
-const QString &KU::KUser::getSurname() const
+const TQString &KU::KUser::getSurname() const
{
return p_surname;
}
-const QString &KU::KUser::getEmail() const
+const TQString &KU::KUser::getEmail() const
{
return p_email;
}
-const QString &KU::KUser::getPwd() const
+const TQString &KU::KUser::getPwd() const
{
return p_pwd;
}
-const QString &KU::KUser::getHomeDir() const
+const TQString &KU::KUser::getHomeDir() const
{
return p_dir;
}
-const QString &KU::KUser::getShell() const
+const TQString &KU::KUser::getShell() const
{
return p_shell;
}
-const QString &KU::KUser::getFullName() const
+const TQString &KU::KUser::getFullName() const
{
return p_fname;
}
@@ -205,38 +205,38 @@ bool KU::KUser::getDisabled() const
// FreeBSD apparently uses the GECOS fields differently than other Unices.
// Create some better named functions to make the FreeBSD code clear
-const QString &KU::KUser::getOffice() const
+const TQString &KU::KUser::getOffice() const
{
return p_office;
}
-const QString &KU::KUser::getWorkPhone() const
+const TQString &KU::KUser::getWorkPhone() const
{
return p_ophone;
}
-const QString &KU::KUser::getHomePhone() const
+const TQString &KU::KUser::getHomePhone() const
{
return p_hphone;
}
// New fields needed for the FreeBSD /etc/master.passwd file
-const QString &KU::KUser::getClass() const
+const TQString &KU::KUser::getClass() const
{
return p_class;
}
-const QString &KU::KUser::getOffice1() const
+const TQString &KU::KUser::getOffice1() const
{
return p_office1;
}
-const QString &KU::KUser::getOffice2() const
+const TQString &KU::KUser::getOffice2() const
{
return p_office2;
}
-const QString &KU::KUser::getAddress() const
+const TQString &KU::KUser::getAddress() const
{
return p_address;
}
@@ -251,7 +251,7 @@ gid_t KU::KUser::getGID() const
return p_gid;
}
-const QString &KU::KUser::getSPwd() const
+const TQString &KU::KUser::getSPwd() const
{
return s_pwd;
}
@@ -291,42 +291,42 @@ time_t KU::KUser::getExpire() const
return p_expire;
}
-const QString &KU::KUser::getLMPwd() const // sam_lmpwd,
+const TQString &KU::KUser::getLMPwd() const // sam_lmpwd,
{
return sam_lmpwd;
}
-const QString &KU::KUser::getNTPwd() const //sam_ntpwd,
+const TQString &KU::KUser::getNTPwd() const //sam_ntpwd,
{
return sam_ntpwd;
}
-const QString &KU::KUser::getLoginScript() const //sam_loginscript,
+const TQString &KU::KUser::getLoginScript() const //sam_loginscript,
{
return sam_loginscript;
}
-const QString &KU::KUser::getProfilePath() const // sam_profile,
+const TQString &KU::KUser::getProfilePath() const // sam_profile,
{
return sam_profile;
}
-const QString &KU::KUser::getHomeDrive() const //sam_homedrive,
+const TQString &KU::KUser::getHomeDrive() const //sam_homedrive,
{
return sam_homedrive;
}
-const QString &KU::KUser::getHomePath() const //sam_homepath;
+const TQString &KU::KUser::getHomePath() const //sam_homepath;
{
return sam_homepath;
}
-const QString &KU::KUser::getWorkstations() const //sam_workstation;
+const TQString &KU::KUser::getWorkstations() const //sam_workstation;
{
return sam_workstations;
}
-const QString &KU::KUser::getDomain() const //sam_domain;
+const TQString &KU::KUser::getDomain() const //sam_domain;
{
return sam_domain;
}
@@ -341,37 +341,37 @@ const SID &KU::KUser::getPGSID() const //pgroup_sid;
return pgroup_sid;
}
-void KU::KUser::setName(const QString &data)
+void KU::KUser::setName(const TQString &data)
{
p_name = data;
}
-void KU::KUser::setSurname(const QString &data)
+void KU::KUser::setSurname(const TQString &data)
{
p_surname = data;
}
-void KU::KUser::setEmail(const QString &data)
+void KU::KUser::setEmail(const TQString &data)
{
p_email = data;
}
-void KU::KUser::setPwd(const QString &data)
+void KU::KUser::setPwd(const TQString &data)
{
p_pwd = data;
}
-void KU::KUser::setHomeDir(const QString &data)
+void KU::KUser::setHomeDir(const TQString &data)
{
p_dir = data;
}
-void KU::KUser::setShell(const QString &data)
+void KU::KUser::setShell(const TQString &data)
{
p_shell = data;
}
-void KU::KUser::setFullName(const QString &data)
+void KU::KUser::setFullName(const TQString &data)
{
p_fname = data;
}
@@ -383,23 +383,23 @@ void KU::KUser::setDisabled(bool data)
// FreeBSD apparently uses the GECOS fields differently than other Unices.
// Create some better named functions to make the FreeBSD code clear
-void KU::KUser::setOffice(const QString &data)
+void KU::KUser::setOffice(const TQString &data)
{
p_office = data;
}
-void KU::KUser::setWorkPhone(const QString &data)
+void KU::KUser::setWorkPhone(const TQString &data)
{
p_ophone = data;
}
-void KU::KUser::setHomePhone(const QString &data)
+void KU::KUser::setHomePhone(const TQString &data)
{
p_hphone = data;
}
// New fields needed for the FreeBSD /etc/master.passwd file
-void KU::KUser::setClass(const QString &data)
+void KU::KUser::setClass(const TQString &data)
{
p_class = data;
}
@@ -414,17 +414,17 @@ void KU::KUser::setExpire(time_t data)
p_expire = data;
}
-void KU::KUser::setOffice1(const QString &data)
+void KU::KUser::setOffice1(const TQString &data)
{
p_office1 = data;
}
-void KU::KUser::setOffice2(const QString &data)
+void KU::KUser::setOffice2(const TQString &data)
{
p_office2 = data;
}
-void KU::KUser::setAddress(const QString &data)
+void KU::KUser::setAddress(const TQString &data)
{
p_address = data;
}
@@ -439,7 +439,7 @@ void KU::KUser::setGID(gid_t data)
p_gid = data;
}
-void KU::KUser::setSPwd(const QString &data)
+void KU::KUser::setSPwd(const TQString &data)
{
s_pwd = data;
}
@@ -464,42 +464,42 @@ void KU::KUser::setInactive(int data)
s_inact = data;
}
-void KU::KUser::setLMPwd( const QString &data ) // sam_lmpwd,
+void KU::KUser::setLMPwd( const TQString &data ) // sam_lmpwd,
{
sam_lmpwd = data;
}
-void KU::KUser::setNTPwd( const QString &data ) //sam_ntpwd,
+void KU::KUser::setNTPwd( const TQString &data ) //sam_ntpwd,
{
sam_ntpwd = data;
}
-void KU::KUser::setLoginScript( const QString &data ) //sam_loginscript,
+void KU::KUser::setLoginScript( const TQString &data ) //sam_loginscript,
{
sam_loginscript = data;
}
-void KU::KUser::setProfilePath( const QString &data) // sam_profile,
+void KU::KUser::setProfilePath( const TQString &data) // sam_profile,
{
sam_profile = data;
}
-void KU::KUser::setHomeDrive( const QString &data ) //sam_homedrive,
+void KU::KUser::setHomeDrive( const TQString &data ) //sam_homedrive,
{
sam_homedrive = data;
}
-void KU::KUser::setHomePath( const QString &data ) //sam_homepath;
+void KU::KUser::setHomePath( const TQString &data ) //sam_homepath;
{
sam_homepath = data;
}
-void KU::KUser::setWorkstations( const QString &data ) //sam_workstation;
+void KU::KUser::setWorkstations( const TQString &data ) //sam_workstation;
{
sam_workstations = data;
}
-void KU::KUser::setDomain( const QString &data ) //sam_domain
+void KU::KUser::setDomain( const TQString &data ) //sam_domain
{
sam_domain = data;
}
@@ -551,40 +551,40 @@ int KU::KUser::createHome()
KMessageBox::sorry( 0, i18n("Cannot create home folder for %1: it is null or empty.").arg(p_name) );
return(0);
}
- if (mkdir(QFile::encodeName(p_dir), 0700) != 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(QString::fromLocal8Bit(strerror(errno))) );
+ KMessageBox::error( 0, i18n("Cannot create home folder %1.\nError: %2").arg(p_dir).arg(TQString::fromLocal8Bit(strerror(errno))) );
return(0);
}
}
- if (chown(QFile::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(QString::fromLocal8Bit(strerror(errno))) );
+ 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))) );
return(1);
}
- if (chmod(QFile::encodeName(p_dir), KU_HOMEDIR_PERM) != 0) {
- KMessageBox::error( 0, i18n("Cannot change permissions on home folder %1.\nError: %2").arg(p_dir).arg(QString::fromLocal8Bit(strerror(errno))) );
+ 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))) );
return(1);
}
return(1);
}
-int KU::KUser::tryCreate(const QString &dir)
+int KU::KUser::tryCreate(const TQString &dir)
{
struct stat sb;
int rc = 0;
- rc = stat(QFile::encodeName(dir), &sb);
+ rc = stat(TQFile::encodeName(dir), &sb);
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),
- QString::null, KStdGuiItem::cont() ) == KMessageBox::Continue) {
+ TQString::null, KStdGuiItem::cont() ) == KMessageBox::Continue) {
- if (chown(QFile::encodeName(dir), p_uid, p_gid) != 0) {
- KMessageBox::error( 0, i18n("Cannot change owner of %1 folder.\nError: %2") .arg(dir).arg(QString::fromLocal8Bit(strerror(errno))) );
+ 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))) );
}
return(0);
} else {
@@ -597,16 +597,16 @@ int KU::KUser::tryCreate(const QString &dir)
}
} else {
if (errno == ENOENT) {
- if (mkdir(QFile::encodeName(dir), 0700) != 0) {
- KMessageBox::error( 0, i18n("Cannot create %1 folder.\nError: %2").arg(dir).arg(QString::fromLocal8Bit(strerror(errno))));
+ if (mkdir(TQFile::encodeName(dir), 0700) != 0) {
+ KMessageBox::error( 0, i18n("Cannot create %1 folder.\nError: %2").arg(dir).arg(TQString::fromLocal8Bit(strerror(errno))));
return(-1);
}
- if (chown(QFile::encodeName(dir), p_uid, p_gid) != 0) {
- KMessageBox::error( 0, i18n("Cannot change owner of %1 folder.\nError: %2").arg(dir).arg(QString::fromLocal8Bit(strerror(errno))) );
+ 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))) );
}
return(0);
} else {
- KMessageBox::error( 0, i18n("stat call on %1 failed.\nError: %2").arg(dir).arg(QString::fromLocal8Bit(strerror(errno))) );
+ KMessageBox::error( 0, i18n("stat call on %1 failed.\nError: %2").arg(dir).arg(TQString::fromLocal8Bit(strerror(errno))) );
return(-1);
}
}
@@ -614,91 +614,91 @@ int KU::KUser::tryCreate(const QString &dir)
int KU::KUser::createMailBox()
{
- QString mailboxpath;
+ TQString mailboxpath;
int fd;
- mailboxpath = QFile::decodeName(MAIL_SPOOL_DIR) + "/" + p_name;
- if((fd = open(QFile::encodeName(mailboxpath), O_CREAT|O_EXCL|O_WRONLY,
+ mailboxpath = TQFile::decodeName(MAIL_SPOOL_DIR) + "/" + p_name;
+ if((fd = open(TQFile::encodeName(mailboxpath), O_CREAT|O_EXCL|O_WRONLY,
S_IRUSR|S_IWUSR)) < 0) {
if (errno != EEXIST)
{
KMessageBox::error( 0, i18n("Cannot create %1: %2")
.arg(mailboxpath)
- .arg(QString::fromLocal8Bit(strerror(errno))) );
+ .arg(TQString::fromLocal8Bit(strerror(errno))) );
return -1;
}
}
close(fd);
- if (chown(QFile::encodeName(mailboxpath), p_uid, KU_MAILBOX_GID) != 0) {
+ 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(QString::fromLocal8Bit(strerror(errno))) );
+ .arg(mailboxpath).arg(TQString::fromLocal8Bit(strerror(errno))) );
return -1;
}
- if (chmod(QFile::encodeName(mailboxpath), KU_MAILBOX_PERM) != 0) {
+ if (chmod(TQFile::encodeName(mailboxpath), KU_MAILBOX_PERM) != 0) {
KMessageBox::error( 0, i18n("Cannot change permissions on mailbox: %1\nError: %2")
- .arg(mailboxpath).arg(QString::fromLocal8Bit(strerror(errno))) );
+ .arg(mailboxpath).arg(TQString::fromLocal8Bit(strerror(errno))) );
return -1;
}
return 0;
}
-void KU::KUser::copyDir(const QString &srcPath, const QString &dstPath)
+void KU::KUser::copyDir(const TQString &srcPath, const TQString &dstPath)
{
mode_t mode;
- QDir s(srcPath);
- QDir d(dstPath);
+ TQDir s(srcPath);
+ TQDir d(dstPath);
- QString dot = QString::fromLatin1(".");
- QString dotdot = QString::fromLatin1("..");
+ TQString dot = TQString::fromLatin1(".");
+ TQString dotdot = TQString::fromLatin1("..");
- s.setFilter( QDir::All | QDir::Hidden | QDir::System );
+ s.setFilter( TQDir::All | TQDir::Hidden | TQDir::System );
for (uint i=0; i<s.count(); i++) {
- QString name(s[i]);
+ TQString name(s[i]);
if (name == dot)
continue;
if (name == dotdot)
continue;
- QString filename(s.filePath(name));
+ TQString filename(s.filePath(name));
- QFileInfo info(filename);
+ TQFileInfo info(filename);
mode = 0;
- if ( info.permission(QFileInfo::ReadOwner) ) mode |= S_IRUSR;
- if ( info.permission(QFileInfo::WriteOwner) ) mode |= S_IWUSR;
- if ( info.permission(QFileInfo::ExeOwner) ) mode |= S_IXUSR;
- if ( info.permission(QFileInfo::ReadGroup) ) mode |= S_IRGRP;
- if ( info.permission(QFileInfo::WriteGroup) ) mode |= S_IWGRP;
- if ( info.permission(QFileInfo::ExeGroup) ) mode |= S_IXGRP;
- if ( info.permission(QFileInfo::ReadOther) ) mode |= S_IROTH;
- if ( info.permission(QFileInfo::WriteOther) ) mode |= S_IWOTH;
- if ( info.permission(QFileInfo::ExeOther) ) mode |= S_IXOTH;
+ if ( info.permission(TQFileInfo::ReadOwner) ) mode |= S_IRUSR;
+ if ( info.permission(TQFileInfo::WriteOwner) ) mode |= S_IWUSR;
+ if ( info.permission(TQFileInfo::ExeOwner) ) mode |= S_IXUSR;
+ if ( info.permission(TQFileInfo::ReadGroup) ) mode |= S_IRGRP;
+ if ( info.permission(TQFileInfo::WriteGroup) ) mode |= S_IWGRP;
+ if ( info.permission(TQFileInfo::ExeGroup) ) mode |= S_IXGRP;
+ if ( info.permission(TQFileInfo::ReadOther) ) mode |= S_IROTH;
+ if ( info.permission(TQFileInfo::WriteOther) ) mode |= S_IWOTH;
+ if ( info.permission(TQFileInfo::ExeOther) ) mode |= S_IXOTH;
if ( info.isSymLink() ) {
- QString link = info.readLink();
+ TQString link = info.readLink();
- if (symlink(QFile::encodeName(link),QFile::encodeName(d.filePath(name))) != 0) {
+ 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(QString::fromLocal8Bit(strerror(errno))) );
+ .arg(d.filePath(s[i])).arg(TQString::fromLocal8Bit(strerror(errno))) );
}
} else if ( info.isDir() ) {
- QDir dir(filename);
+ TQDir dir(filename);
d.mkdir(name, FALSE);
copyDir(s.filePath(name), d.filePath(name));
- if (chown(QFile::encodeName(d.filePath(name)), p_uid, p_gid) != 0) {
+ 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(QString::fromLocal8Bit(strerror(errno))) );
+ .arg(d.filePath(s[i])).arg(TQString::fromLocal8Bit(strerror(errno))) );
}
- if (chmod(QFile::encodeName(d.filePath(name)), mode) != 0) {
+ 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(QString::fromLocal8Bit(strerror(errno))) );
+ .arg(d.filePath(s[i])).arg(TQString::fromLocal8Bit(strerror(errno))) );
}
} else {
@@ -706,14 +706,14 @@ void KU::KUser::copyDir(const QString &srcPath, const QString &dstPath)
continue;
}
- if (chown(QFile::encodeName(d.filePath(name)), p_uid, p_gid) != 0) {
+ 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(QString::fromLocal8Bit(strerror(errno))) );
+ .arg(d.filePath(s[i])).arg(TQString::fromLocal8Bit(strerror(errno))) );
}
- if (chmod(QFile::encodeName(d.filePath(name)), mode) != 0) {
+ 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(QString::fromLocal8Bit(strerror(errno))) );
+ .arg(d.filePath(s[i])).arg(TQString::fromLocal8Bit(strerror(errno))) );
}
}
}
@@ -721,8 +721,8 @@ void KU::KUser::copyDir(const QString &srcPath, const QString &dstPath)
int KU::KUser::copySkel()
{
- QDir s(QFile::decodeName(SKELDIR));
- QDir d(p_dir);
+ TQDir s(TQFile::decodeName(SKELDIR));
+ TQDir d(p_dir);
mode_t mode;
if (!s.exists()) {
@@ -746,7 +746,7 @@ int KU::KUser::removeHome()
{
struct stat sb;
- if (!stat(QFile::encodeName(p_dir), &sb))
+ if (!stat(TQFile::encodeName(p_dir), &sb))
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")
@@ -757,7 +757,7 @@ int KU::KUser::removeHome()
}
else {
KMessageBox::error( 0, i18n("stat call on file %1 failed.\nError: %2")
- .arg(p_dir).arg(QString::fromLocal8Bit(strerror(errno))) );
+ .arg(p_dir).arg(TQString::fromLocal8Bit(strerror(errno))) );
}
return 0;
@@ -767,15 +767,15 @@ int KU::KUser::removeHome()
int KU::KUser::removeCrontabs()
{
- QString file;
- QString command;
+ TQString file;
+ TQString command;
- file = QFile::decodeName(CRONTAB_DIR) + "/" + p_name;
- if ( access(QFile::encodeName(file), F_OK) == 0 ) {
- command = QString::fromLatin1("crontab -u %1 -r").arg(KProcess::quote(p_name));
- if ( system(QFile::encodeName(command)) != 0 ) {
+ 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));
+ if ( system(TQFile::encodeName(command)) != 0 ) {
KMessageBox::error( 0, i18n("Cannot remove crontab %1.\nError: %2")
- .arg(command).arg(QString::fromLocal8Bit(strerror(errno))) );
+ .arg(command).arg(TQString::fromLocal8Bit(strerror(errno))) );
}
}
@@ -784,12 +784,12 @@ int KU::KUser::removeCrontabs()
int KU::KUser::removeMailBox()
{
- QString file;
+ TQString file;
- file = QFile::decodeName(MAIL_SPOOL_DIR) + "/" + p_name;
- if (remove(QFile::encodeName(file)) != 0) {
+ 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(QString::fromLocal8Bit(strerror(errno))) );
+ .arg(file).arg(TQString::fromLocal8Bit(strerror(errno))) );
}
return 0;
@@ -826,13 +826,13 @@ KU::KUsers::~KUsers()
mUsers.clear();
}
-const QString &KU::KUsers::getDOMSID() const
+const TQString &KU::KUsers::getDOMSID() const
{
return domsid;
}
-void KU::KUsers::parseGecos( const char *gecos, QString &name,
- QString &field1, QString &field2, QString &field3 )
+void KU::KUsers::parseGecos( const char *gecos, TQString &name,
+ TQString &field1, TQString &field2, TQString &field3 )
{
int no = 0;
const char *s = gecos;
@@ -840,11 +840,11 @@ void KU::KUsers::parseGecos( const char *gecos, QString &name,
// At least one part of the string exists
for(;;) {
pos = strchr(s, ',');
- QString val;
+ TQString val;
if(pos == NULL)
- val = QString::fromLocal8Bit(s);
+ val = TQString::fromLocal8Bit(s);
else
- val = QString::fromLocal8Bit(s, (int)(pos-s));
+ val = TQString::fromLocal8Bit(s, (int)(pos-s));
switch(no) {
case 0: name = val; break;
@@ -860,7 +860,7 @@ void KU::KUsers::parseGecos( const char *gecos, QString &name,
void KU::KUsers::fillGecos(KU::KUser *user, const char *gecos)
{
- QString name,field1,field2,field3;
+ TQString name,field1,field2,field3;
parseGecos( gecos, name, field1, field2, field3 );
user->setFullName( name );
caps & Cap_BSD ? user->setOffice( field1 ) : user->setOffice1( field1 );
@@ -870,7 +870,7 @@ void KU::KUsers::fillGecos(KU::KUser *user, const char *gecos)
bool KU::KUsers::doCreate(KU::KUser *user)
{
- QString h_dir;
+ TQString h_dir;
if(user->getCreateMailBox()) {
user->createMailBox();
@@ -909,10 +909,10 @@ bool KU::KUsers::doDelete( KU::KUser *user )
return TRUE;
}
-KU::KUser *KU::KUsers::lookup(const QString & name)
+KU::KUser *KU::KUsers::lookup(const TQString & name)
{
KU::KUser *user;
- QPtrListIterator<KU::KUser> it( mUsers );
+ TQPtrListIterator<KU::KUser> it( mUsers );
while ( (user = it.current()) != 0 && user->getName() != name ) ++it;
return user;
@@ -921,7 +921,7 @@ KU::KUser *KU::KUsers::lookup(const QString & name)
KU::KUser *KU::KUsers::lookup(uid_t uid)
{
KU::KUser *user;
- QPtrListIterator<KU::KUser> it( mUsers );
+ TQPtrListIterator<KU::KUser> it( mUsers );
while ( (user = it.current()) != 0 && user->getUID() != uid ) ++it;
return user;
@@ -930,16 +930,16 @@ KU::KUser *KU::KUsers::lookup(uid_t uid)
KU::KUser *KU::KUsers::lookup_sam( const SID &sid )
{
KU::KUser *user;
- QPtrListIterator<KU::KUser> it( mUsers );
+ TQPtrListIterator<KU::KUser> it( mUsers );
while ( (user = it.current()) != 0 && user->getSID() != sid ) ++it;
return user;
}
-KU::KUser *KU::KUsers::lookup_sam( const QString &sid )
+KU::KUser *KU::KUsers::lookup_sam( const TQString &sid )
{
KU::KUser *user;
- QPtrListIterator<KU::KUser> it( mUsers );
+ TQPtrListIterator<KU::KUser> it( mUsers );
while ( (user = it.current()) != 0 && user->getSID().getSID() != sid ) ++it;
return user;
@@ -948,7 +948,7 @@ KU::KUser *KU::KUsers::lookup_sam( const QString &sid )
KU::KUser *KU::KUsers::lookup_sam( uint rid )
{
KU::KUser *user;
- QPtrListIterator<KU::KUser> it( mUsers );
+ TQPtrListIterator<KU::KUser> it( mUsers );
while ( (user = it.current()) != 0 && user->getSID().getRID() != rid ) ++it;
return user;
diff --git a/kuser/kuser.h b/kuser/kuser.h
index 4e3c24e..ee6dbab 100644
--- a/kuser/kuser.h
+++ b/kuser/kuser.h
@@ -23,8 +23,8 @@
#include <sys/types.h>
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
#include "globals.h"
#include "sid.h"
@@ -48,25 +48,25 @@ public:
int getCaps();
//General
- const QString &getName() const;
- const QString &getSurname() const;
- const QString &getEmail() const;
- const QString &getPwd() const;
- const QString &getHomeDir() const;
- const QString &getShell() const;
- const QString &getFullName() const;
+ const TQString &getName() const;
+ const TQString &getSurname() const;
+ const TQString &getEmail() const;
+ const TQString &getPwd() const;
+ const TQString &getHomeDir() const;
+ const TQString &getShell() const;
+ const TQString &getFullName() const;
uid_t getUID() const;
uid_t getGID() const;
bool getDisabled() const;
- void setName(const QString &data);
- void setSurname(const QString &data);
- void setEmail(const QString &data);
- void setPwd(const QString &data);
- void setHomeDir(const QString &data);
- void setShell(const QString &data);
- void setFullName(const QString &data);
+ void setName(const TQString &data);
+ void setSurname(const TQString &data);
+ void setEmail(const TQString &data);
+ void setPwd(const TQString &data);
+ void setHomeDir(const TQString &data);
+ void setShell(const TQString &data);
+ void setFullName(const TQString &data);
void setUID(uid_t data);
void setGID(uid_t data);
@@ -74,27 +74,27 @@ public:
//gecos
//--BSD gecos
- const QString &getOffice() const;
- const QString &getWorkPhone() const;
- const QString &getHomePhone() const;
- const QString &getClass() const;
+ const TQString &getOffice() const;
+ const TQString &getWorkPhone() const;
+ const TQString &getHomePhone() const;
+ const TQString &getClass() const;
//--BSD end
- const QString &getOffice1() const;
- const QString &getOffice2() const;
- const QString &getAddress() const;
+ const TQString &getOffice1() const;
+ const TQString &getOffice2() const;
+ const TQString &getAddress() const;
//--BSD
- void setOffice(const QString &data);
- void setWorkPhone(const QString &data);
- void setHomePhone(const QString &data);
- void setClass(const QString &data);
+ void setOffice(const TQString &data);
+ void setWorkPhone(const TQString &data);
+ void setHomePhone(const TQString &data);
+ void setClass(const TQString &data);
//--BSD end
- void setOffice1(const QString &data);
- void setOffice2(const QString &data);
- void setAddress(const QString &data);
+ void setOffice1(const TQString &data);
+ void setOffice2(const TQString &data);
+ void setAddress(const TQString &data);
//shadow
- const QString &getSPwd() const;
+ const TQString &getSPwd() const;
time_t getExpire() const;
time_t getLastChange() const;
int getMin() const;
@@ -103,7 +103,7 @@ public:
int getInactive() const;
int getFlag() const;
- void setSPwd(const QString &data);
+ void setSPwd(const TQString &data);
void setLastChange(time_t data);
void setMin(int data);
void setMax(int data);
@@ -113,25 +113,25 @@ public:
void setFlag(int data);
//samba
- const QString &getLMPwd() const; // sam_lmpwd,
- const QString &getNTPwd() const; //sam_ntpwd,
- const QString &getLoginScript() const; //sam_loginscript,
- const QString &getProfilePath() const; // sam_profile,
- const QString &getHomeDrive() const; //sam_homedrive,
- const QString &getHomePath() const; //sam_homepath;
- const QString &getWorkstations() const; //sam_workstations
- const QString &getDomain() const; //sam_domain
+ const TQString &getLMPwd() const; // sam_lmpwd,
+ const TQString &getNTPwd() const; //sam_ntpwd,
+ const TQString &getLoginScript() const; //sam_loginscript,
+ const TQString &getProfilePath() const; // sam_profile,
+ const TQString &getHomeDrive() const; //sam_homedrive,
+ const TQString &getHomePath() const; //sam_homepath;
+ const TQString &getWorkstations() const; //sam_workstations
+ const TQString &getDomain() const; //sam_domain
const SID &getSID() const; //sid,
const SID &getPGSID() const; //pgroup_sid;
- void setLMPwd( const QString &data ); // sam_lmpwd,
- void setNTPwd( const QString &data ); //sam_ntpwd,
- void setLoginScript( const QString &data ); //sam_loginscript,
- void setProfilePath( const QString &data); // sam_profile,
- void setHomeDrive( const QString &data ); //sam_homedrive,
- void setHomePath( const QString &data ); //sam_homepath;
- void setWorkstations( const QString &data ); //sam_workstations
- void setDomain( const QString &data ); //sam_domain
+ void setLMPwd( const TQString &data ); // sam_lmpwd,
+ void setNTPwd( const TQString &data ); //sam_ntpwd,
+ void setLoginScript( const TQString &data ); //sam_loginscript,
+ void setProfilePath( const TQString &data); // sam_profile,
+ void setHomeDrive( const TQString &data ); //sam_homedrive,
+ void setHomePath( const TQString &data ); //sam_homepath;
+ void setWorkstations( const TQString &data ); //sam_workstations
+ void setDomain( const TQString &data ); //sam_domain
void setSID( const SID &data ); //sid,
void setPGSID( const SID &data ); //pgroup_sid;
@@ -152,7 +152,7 @@ protected:
friend class KUsers;
int createHome();
- int tryCreate(const QString &dir);
+ int tryCreate(const TQString &dir);
int createMailBox();
int copySkel();
@@ -161,7 +161,7 @@ protected:
int removeMailBox();
int removeProcesses();
- void copyDir(const QString &srcPath, const QString &dstPath);
+ void copyDir(const TQString &srcPath, const TQString &dstPath);
int caps;
QString
@@ -226,24 +226,24 @@ public:
Cap_Disable_POSIX = 32,
Cap_BSD = 64
};
- typedef QPtrListIterator<KUser> DelIt;
- typedef QPtrListIterator<KUser> AddIt;
- typedef QMapIterator<KUser*, KUser> ModIt;
+ typedef TQPtrListIterator<KUser> DelIt;
+ typedef TQPtrListIterator<KUser> AddIt;
+ typedef TQMapIterator<KUser*, KUser> ModIt;
- QPtrList<KUser> mDelSucc;
- QPtrList<KUser> mAddSucc;
- QMap<KUser*, KUser> mModSucc;
+ TQPtrList<KUser> mDelSucc;
+ TQPtrList<KUser> mAddSucc;
+ TQMap<KUser*, KUser> mModSucc;
KUsers(KUserPrefsBase *cfg);
virtual ~KUsers();
- KUser *lookup(const QString & name);
+ KUser *lookup(const TQString & name);
KUser *lookup(uid_t uid);
KUser *lookup_sam( const SID &sid );
- KUser *lookup_sam( const QString &sid );
+ KUser *lookup_sam( const TQString &sid );
KUser *lookup_sam( uint rid );
int getCaps() { return caps; }
- const QString &getDOMSID() const;
+ const TQString &getDOMSID() const;
KUser *first();
KUser *next();
@@ -274,7 +274,7 @@ public:
* Must be reimplemented in various backends. It should encode @param password
* into the appropriate fields in @param user.
*/
- virtual void createPassword( KUser *user, const QString &password ) = 0;
+ virtual void createPassword( KUser *user, const TQString &password ) = 0;
/**
* Must load the users from the storage backend.
*/
@@ -286,20 +286,20 @@ public:
virtual bool dbcommit() = 0;
protected:
- QPtrList<KUser> mUsers;
+ TQPtrList<KUser> mUsers;
int caps;
KUserPrefsBase *mCfg;
- QPtrList<KUser> mDel;
- QPtrList<KUser> mAdd;
- QMap<KUser*, KUser> mMod;
+ TQPtrList<KUser> mDel;
+ TQPtrList<KUser> mAdd;
+ TQMap<KUser*, KUser> mMod;
- QString domsid;
+ TQString domsid;
bool doCreate( KUser *user );
bool doDelete( KUser *user );
- void parseGecos( const char *gecos, QString &name,
- QString &field1, QString &field2, QString &field3 );
+ void parseGecos( const char *gecos, TQString &name,
+ TQString &field1, TQString &field2, TQString &field3 );
void fillGecos( KUser *user, const char *gecos );
};
diff --git a/kuser/kuserfiles.cpp b/kuser/kuserfiles.cpp
index 5c987bc..5ccfe58 100644
--- a/kuser/kuserfiles.cpp
+++ b/kuser/kuserfiles.cpp
@@ -34,8 +34,8 @@
#include <shadow.h>
#endif
-#include <qstring.h>
-#include <qdir.h>
+#include <tqstring.h>
+#include <tqdir.h>
#include "kglobal_.h"
#include "kuserfiles.h"
@@ -93,9 +93,9 @@ bool KUserFiles::loadpwd()
passwd *p;
KU::KUser *tmpKU = 0;
struct stat st;
- QString filename;
- QString passwd_filename;
- QString nispasswd_filename;
+ TQString filename;
+ TQString passwd_filename;
+ TQString nispasswd_filename;
int rc = 0;
int passwd_errno = 0;
int nispasswd_errno = 0;
@@ -126,9 +126,9 @@ bool KUserFiles::loadpwd()
// Start reading passwd file(s)
for(int i = 0; i < MAXFILES; i++) {
- 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::fromLocal8Bit(strerror(errno))) );
+ KMessageBox::error( 0, i18n("Stat call on file %1 failed: %2\nCheck KUser settings.").arg(filename).arg(TQString::fromLocal8Bit(strerror(errno))) );
if( (processing_file & P_PASSWD) != 0 ) {
passwd_errno = errno;
if(!nispasswd_filename.isEmpty()) {
@@ -150,10 +150,10 @@ bool KUserFiles::loadpwd()
pwd_gid = st.st_gid;
// We are reading our configuration specified passwd file
- QString tmp;
+ TQString tmp;
#ifdef HAVE_FGETPWENT
- FILE *fpwd = fopen(QFile::encodeName(filename), "r");
+ FILE *fpwd = fopen(TQFile::encodeName(filename), "r");
if(fpwd == NULL) {
KMessageBox::error( 0, i18n("Error opening %1 for reading.").arg(filename) );
return FALSE;
@@ -168,18 +168,18 @@ bool KUserFiles::loadpwd()
tmpKU->setCaps( KU::KUser::Cap_POSIX );
tmpKU->setUID(p->pw_uid);
tmpKU->setGID(p->pw_gid);
- tmpKU->setName(QString::fromLocal8Bit(p->pw_name));
- tmp = QString::fromLocal8Bit( p->pw_passwd );
+ tmpKU->setName(TQString::fromLocal8Bit(p->pw_name));
+ tmp = TQString::fromLocal8Bit( p->pw_passwd );
if ( tmp != "x" && tmp != "*" && !tmp.startsWith("!") )
tmpKU->setDisabled( false );
else
tmpKU->setDisabled( true );
if ( tmp.startsWith("!") ) tmp.remove(0, 1);
tmpKU->setPwd( tmp );
- tmpKU->setHomeDir(QString::fromLocal8Bit(p->pw_dir));
- tmpKU->setShell(QString::fromLocal8Bit(p->pw_shell));
+ tmpKU->setHomeDir(TQString::fromLocal8Bit(p->pw_dir));
+ tmpKU->setShell(TQString::fromLocal8Bit(p->pw_shell));
#if defined(__FreeBSD__) || defined(__bsdi__)
- tmpKU->setClass(QString::fromLatin1(p->pw_class));
+ tmpKU->setClass(TQString::fromLatin1(p->pw_class));
tmpKU->setLastChange(p->pw_change);
tmpKU->setExpire(p->pw_expire);
#endif
@@ -220,7 +220,7 @@ bool KUserFiles::loadpwd()
bool KUserFiles::loadsdw()
{
#ifdef HAVE_SHADOW
- QString shadow_file,tmp;
+ TQString shadow_file,tmp;
struct spwd *spw;
KU::KUser *up = NULL;
struct stat st;
@@ -229,7 +229,7 @@ bool KUserFiles::loadsdw()
if ( shadow_file.isEmpty() )
return TRUE;
- stat( QFile::encodeName(shadow_file), &st);
+ stat( TQFile::encodeName(shadow_file), &st);
sdw_mode = st.st_mode & 0666;
sdw_uid = st.st_uid;
sdw_gid = st.st_gid;
@@ -237,7 +237,7 @@ bool KUserFiles::loadsdw()
#ifdef HAVE_FGETSPENT
FILE *f;
kdDebug() << "open shadow file: " << shadow_file << endl;
- if ((f = fopen( QFile::encodeName(shadow_file), "r")) == NULL) {
+ if ((f = fopen( TQFile::encodeName(shadow_file), "r")) == NULL) {
KMessageBox::error( 0, i18n("Error opening %1 for reading.").arg(shadow_file) );
caps &= ~Cap_Shadow;
return TRUE;
@@ -249,12 +249,12 @@ bool KUserFiles::loadsdw()
#endif
kdDebug() << "shadow entry: " << spw->sp_namp << endl;
- if ((up = lookup(QString::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(QString::fromLocal8Bit(spw->sp_namp)) );
+ 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)) );
continue;
}
- tmp = QString::fromLocal8Bit( spw->sp_pwdp );
+ tmp = TQString::fromLocal8Bit( spw->sp_pwdp );
if ( tmp.startsWith("!!") || tmp == "*" ) {
up->setDisabled( true );
tmp.remove( 0, 2 );
@@ -298,11 +298,11 @@ bool KUserFiles::savepwd()
uid_t minuid = 0;
int nis_users_written = 0;
uid_t tmp_uid = 0;
- QString s;
- QString s1;
- QString tmp, tmp2;
- QString passwd_filename;
- QString nispasswd_filename;
+ TQString s;
+ TQString s1;
+ TQString tmp, tmp2;
+ TQString passwd_filename;
+ TQString nispasswd_filename;
char errors_found = '\0';
@@ -313,10 +313,10 @@ bool KUserFiles::savepwd()
passwd_filename = mCfg->passwdsrc();
nispasswd_filename = mCfg->nispasswdsrc();
- QString new_passwd_filename =
- passwd_filename + QString::fromLatin1(KU_CREATE_EXT);
- QString new_nispasswd_filename =
- nispasswd_filename+QString::fromLatin1(KU_CREATE_EXT);
+ TQString new_passwd_filename =
+ passwd_filename + TQString::fromLatin1(KU_CREATE_EXT);
+ TQString new_nispasswd_filename =
+ nispasswd_filename+TQString::fromLatin1(KU_CREATE_EXT);
if( nispasswd_filename != passwd_filename ) {
minuid = mCfg->nisminuid();
@@ -342,24 +342,24 @@ bool KUserFiles::savepwd()
if(!passwd_filename.isEmpty()) {
if ((passwd_fd =
- fopen(QFile::encodeName(new_passwd_filename),"w")) == NULL)
+ fopen(TQFile::encodeName(new_passwd_filename),"w")) == NULL)
KMessageBox::error( 0, i18n("Error opening %1 for writing.").arg(passwd_filename) );
}
if(!nispasswd_filename.isEmpty() && (nispasswd_filename != passwd_filename)){
if ((nispasswd_fd =
- fopen(QFile::encodeName(new_nispasswd_filename),"w")) == NULL)
+ fopen(TQFile::encodeName(new_nispasswd_filename),"w")) == NULL)
KMessageBox::error( 0, i18n("Error opening %1 for writing.").arg(nispasswd_filename) );
}
- QPtrListIterator<KU::KUser> it( mUsers );
+ TQPtrListIterator<KU::KUser> it( mUsers );
KU::KUser *user;
bool addok = false;
user = (*it);
while (true) {
if ( user == 0 ) {
if ( addok ) break;
- it = QPtrListIterator<KU::KUser> ( mAdd );
+ it = TQPtrListIterator<KU::KUser> ( mAdd );
user = (*it);
addok = true;
if ( user == 0 ) break;
@@ -393,11 +393,11 @@ bool KUserFiles::savepwd()
s =
user->getName() + ":" +
tmp + ":" +
- QString::number( user->getUID() ) + ":" +
- QString::number( user->getGID() ) + ":" +
+ TQString::number( user->getUID() ) + ":" +
+ TQString::number( user->getGID() ) + ":" +
user->getClass() + ":" +
- QString::number( user->getLastChange() ) + ":" +
- QString::number( user->getExpire() ) + ":";
+ TQString::number( user->getLastChange() ) + ":" +
+ TQString::number( user->getExpire() ) + ":";
s1 =
user->getFullName() + "," +
@@ -411,8 +411,8 @@ bool KUserFiles::savepwd()
s =
user->getName() + ":" +
tmp + ":" +
- QString::number( user->getUID() ) + ":" +
- QString::number( user->getGID() ) + ":";
+ TQString::number( user->getUID() ) + ":" +
+ TQString::number( user->getGID() ) + ":";
s1 =
user->getFullName() + "," +
@@ -457,18 +457,18 @@ bool KUserFiles::savepwd()
if(passwd_fd) {
fclose(passwd_fd);
- chmod(QFile::encodeName(new_passwd_filename), pwd_mode);
- chown(QFile::encodeName(new_passwd_filename), pwd_uid, pwd_gid);
- rename(QFile::encodeName(new_passwd_filename),
- QFile::encodeName(passwd_filename));
+ chmod(TQFile::encodeName(new_passwd_filename), pwd_mode);
+ chown(TQFile::encodeName(new_passwd_filename), pwd_uid, pwd_gid);
+ rename(TQFile::encodeName(new_passwd_filename),
+ TQFile::encodeName(passwd_filename));
}
if(nispasswd_fd) {
fclose(nispasswd_fd);
- chmod(QFile::encodeName(new_nispasswd_filename), pwd_mode);
- chown(QFile::encodeName(new_nispasswd_filename), pwd_uid, pwd_gid);
- rename(QFile::encodeName(new_nispasswd_filename),
- QFile::encodeName(nispasswd_filename));
+ chmod(TQFile::encodeName(new_nispasswd_filename), pwd_mode);
+ chown(TQFile::encodeName(new_nispasswd_filename), pwd_uid, pwd_gid);
+ rename(TQFile::encodeName(new_nispasswd_filename),
+ TQFile::encodeName(nispasswd_filename));
}
if( (errors_found & NOMINUID) != 0 ) {
@@ -506,13 +506,13 @@ bool KUserFiles::savesdw()
{
#ifdef HAVE_SHADOW
bool addok = false;
- QString tmp;
+ TQString tmp;
FILE *f;
struct spwd *spwp;
struct spwd s;
KU::KUser *up;
- QString shadow_file = mCfg->shadowsrc();
- QString new_shadow_file = shadow_file+QString::fromLatin1(KU_CREATE_EXT);
+ TQString shadow_file = mCfg->shadowsrc();
+ TQString new_shadow_file = shadow_file+TQString::fromLatin1(KU_CREATE_EXT);
if ( shadow_file.isEmpty() )
return TRUE;
@@ -522,7 +522,7 @@ bool KUserFiles::savesdw()
s_backuped = TRUE;
}
- if ((f = fopen(QFile::encodeName(new_shadow_file), "w")) == NULL) {
+ if ((f = fopen(TQFile::encodeName(new_shadow_file), "w")) == NULL) {
KMessageBox::error( 0, i18n("Error opening %1 for writing.").arg(new_shadow_file) );
return FALSE;
}
@@ -530,13 +530,13 @@ bool KUserFiles::savesdw()
s.sp_namp = (char *)malloc(200);
s.sp_pwdp = (char *)malloc(200);
- QPtrListIterator<KU::KUser> it( mUsers );
+ TQPtrListIterator<KU::KUser> it( mUsers );
up = (*it);
while (true) {
if ( up == 0 ) {
if ( addok ) break;
- it = QPtrListIterator<KU::KUser> ( mAdd );
+ it = TQPtrListIterator<KU::KUser> ( mAdd );
up = (*it);
addok = true;
if ( up == 0 ) break;
@@ -551,7 +551,7 @@ bool KUserFiles::savesdw()
strncpy( s.sp_namp, up->getName().local8Bit(), 200 );
if ( up->getDisabled() )
- strncpy( s.sp_pwdp, QString("!!" + up->getSPwd()).local8Bit(), 200 );
+ strncpy( s.sp_pwdp, TQString("!!" + up->getSPwd()).local8Bit(), 200 );
else
strncpy( s.sp_pwdp, up->getSPwd().local8Bit(), 200 );
@@ -572,10 +572,10 @@ bool KUserFiles::savesdw()
}
fclose(f);
- chmod(QFile::encodeName(new_shadow_file), sdw_mode);
- chown(QFile::encodeName(new_shadow_file), sdw_uid, sdw_gid);
- rename(QFile::encodeName(new_shadow_file),
- QFile::encodeName(shadow_file));
+ chmod(TQFile::encodeName(new_shadow_file), sdw_mode);
+ chown(TQFile::encodeName(new_shadow_file), sdw_uid, sdw_gid);
+ rename(TQFile::encodeName(new_shadow_file),
+ TQFile::encodeName(shadow_file));
free(s.sp_namp);
free(s.sp_pwdp);
@@ -584,11 +584,11 @@ bool KUserFiles::savesdw()
}
-void KUserFiles::createPassword( KU::KUser *user, const QString &password )
+void KUserFiles::createPassword( KU::KUser *user, const TQString &password )
{
if ( caps & Cap_Shadow ) {
user->setSPwd( encryptPass( password, mCfg->md5shadow() ) );
- user->setPwd( QString::fromLatin1("x") );
+ user->setPwd( TQString::fromLatin1("x") );
} else
user->setPwd( encryptPass( password, false ) );
}
diff --git a/kuser/kuserfiles.h b/kuser/kuserfiles.h
index bb19c45..f641ca7 100644
--- a/kuser/kuserfiles.h
+++ b/kuser/kuserfiles.h
@@ -23,8 +23,8 @@
#include <sys/types.h>
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
#include "kuser.h"
@@ -35,7 +35,7 @@ public:
virtual bool dbcommit();
virtual bool reload();
- virtual void createPassword( KU::KUser *user, const QString &password );
+ virtual void createPassword( KU::KUser *user, const TQString &password );
private:
bool pw_backuped;
diff --git a/kuser/kuserldap.cpp b/kuser/kuserldap.cpp
index 9eb6afe..9555cb5 100644
--- a/kuser/kuserldap.cpp
+++ b/kuser/kuserldap.cpp
@@ -16,7 +16,7 @@
* Boston, MA 02110-1301, USA.
**/
-#include <qstring.h>
+#include <tqstring.h>
#include <kdebug.h>
#include <kmdcodec.h>
@@ -81,12 +81,12 @@ void KUserLDAP::result( KIO::Job *job )
delete mProg;
mCancel = false;
if ( job->error() ) {
- QString errstr = job->errorString();
+ TQString errstr = job->errorString();
if ( !errstr.isEmpty() ) {
if ( ldif.isEmpty() )
KMessageBox::error( 0, errstr );
else
- KMessageBox::detailedError( 0, errstr, QString::fromUtf8( ldif, ldif.size()-1 ) );
+ KMessageBox::detailedError( 0, errstr, TQString::fromUtf8( ldif, ldif.size()-1 ) );
}
mOk = false;
} else {
@@ -94,7 +94,7 @@ void KUserLDAP::result( KIO::Job *job )
}
}
-void KUserLDAP::data( KIO::Job *, const QByteArray& data )
+void KUserLDAP::data( KIO::Job *, const TQByteArray& data )
{
if ( data.size() ) {
mParser.setLDIF( data );
@@ -103,15 +103,15 @@ void KUserLDAP::data( KIO::Job *, const QByteArray& data )
}
KABC::LDIF::ParseVal ret;
- QString name, val;
- QByteArray value;
+ TQString name, val;
+ TQByteArray value;
do {
ret = mParser.nextItem();
switch ( ret ) {
case KABC::LDIF::Item:
name = mParser.attr().lower();
value = mParser.val();
- val = QString::fromUtf8( value, value.size() );
+ val = TQString::fromUtf8( value, value.size() );
if ( name == "objectclass" ) {
if ( val.lower() == "posixaccount" )
mUser->setCaps( mUser->getCaps() | KU::KUser::Cap_POSIX );
@@ -144,8 +144,8 @@ void KUserLDAP::data( KIO::Job *, const QByteArray& data )
else
mUser->setOffice2( val );
} else if ( name == "gecos" ) {
- QString name, f1, f2, f3;
- parseGecos( QCString( value.data(), value.size()+1 ), name, f1, f2, f3 );
+ TQString name, f1, f2, f3;
+ parseGecos( TQCString( value.data(), value.size()+1 ), name, f1, f2, f3 );
if ( mUser->getFullName().isEmpty() ) mUser->setFullName( val );
if ( mUser->getOffice1().isEmpty() ) mUser->setOffice1( f1 );
if ( mUser->getOffice2().isEmpty() ) mUser->setOffice2( f1 );
@@ -248,10 +248,10 @@ bool KUserLDAP::reload()
ldif = "";
KIO::Job *job = KIO::get( mUrl, true, false );
- connect( job, SIGNAL( data( KIO::Job*, const QByteArray& ) ),
- this, SLOT( data( KIO::Job*, const QByteArray& ) ) );
- connect( job, SIGNAL( result( KIO::Job* ) ),
- this, SLOT( result( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ),
+ this, TQT_SLOT( data( KIO::Job*, const TQByteArray& ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ),
+ this, TQT_SLOT( result( KIO::Job* ) ) );
// job->addMetaData( "SERVER_CTRL0", "1.2.840.113556.1.4.473 true: uidNumber");
mProg->exec();
if ( mCancel ) job->kill();
@@ -259,15 +259,15 @@ bool KUserLDAP::reload()
return( mOk );
}
-QString KUserLDAP::getRDN(KU::KUser *user)
+TQString KUserLDAP::getRDN(KU::KUser *user)
{
switch ( mCfg->ldapuserrdn() ) {
case KUserPrefsBase::EnumLdapuserrdn::uid:
return "uid=" + user->getName();
case KUserPrefsBase::EnumLdapuserrdn::uidNumber:
- return "uidNumber=" + QString::number( user->getUID() );
+ return "uidNumber=" + TQString::number( user->getUID() );
case KUserPrefsBase::EnumLdapuserrdn::cn: {
- QString cn = mCfg->ldapcnfullname() ? user->getFullName() : user->getName();
+ TQString cn = mCfg->ldapcnfullname() ? user->getFullName() : user->getName();
if ( cn.isEmpty() ) cn = user->getName();
return "cn=" + cn;
}
@@ -275,7 +275,7 @@ QString KUserLDAP::getRDN(KU::KUser *user)
return "";
}
-void KUserLDAP::createPassword( KU::KUser *user, const QString &password )
+void KUserLDAP::createPassword( KU::KUser *user, const TQString &password )
{
switch ( mCfg->ldappasswordhash() ) {
case KUserPrefsBase::EnumLdappasswordhash::Clear:
@@ -290,10 +290,10 @@ void KUserLDAP::createPassword( KU::KUser *user, const QString &password )
break;
}
case KUserPrefsBase::EnumLdappasswordhash::SMD5: {
- QCString salt = genSalt( 4 );
- QCString pwd = password.utf8() + salt;
+ TQCString salt = genSalt( 4 );
+ TQCString pwd = password.utf8() + salt;
KMD5::Digest digest;
- QByteArray hash(20);
+ TQByteArray hash(20);
KMD5 md5( pwd );
md5.rawDigest( digest );
@@ -304,7 +304,7 @@ void KUserLDAP::createPassword( KU::KUser *user, const QString &password )
}
case KUserPrefsBase::EnumLdappasswordhash::SHA: {
struct sha1_ctx ctx;
- QByteArray hash(20);
+ TQByteArray hash(20);
sha1_init( &ctx );
sha1_update( &ctx, (const Q_UINT8*) password.utf8().data(),
@@ -315,9 +315,9 @@ void KUserLDAP::createPassword( KU::KUser *user, const QString &password )
}
case KUserPrefsBase::EnumLdappasswordhash::SSHA: {
struct sha1_ctx ctx;
- QByteArray hash(24);
- QCString salt = genSalt( 4 );
- QCString pwd = password.utf8() + salt;
+ TQByteArray hash(24);
+ TQCString salt = genSalt( 4 );
+ TQCString pwd = password.utf8() + salt;
sha1_init( &ctx );
sha1_update( &ctx, (const Q_UINT8*) pwd.data(), pwd.length() );
@@ -331,7 +331,7 @@ void KUserLDAP::createPassword( KU::KUser *user, const QString &password )
if ( caps & Cap_Samba ) {
Q_UINT8 hex[33];
- QByteArray ntlmhash;
+ TQByteArray ntlmhash;
ntlmhash = KNTLM::ntlmHash( password );
unsigned char *hash = (unsigned char*) ntlmhash.data();
@@ -341,11 +341,11 @@ void KUserLDAP::createPassword( KU::KUser *user, const QString &password )
hash[6], hash[7], hash[8], hash[9], hash[10], hash[11],
hash[12], hash[13], hash[14], hash[15]);
- user->setNTPwd( QString::fromLatin1( (const char*) &hex, 32 ) );
+ user->setNTPwd( TQString::fromLatin1( (const char*) &hex, 32 ) );
if ( mCfg->lanmanhash() ) {
- QByteArray lmhash;
+ TQByteArray lmhash;
lmhash = KNTLM::lmHash( password );
unsigned char *hash = (unsigned char*) lmhash.data();
snprintf( (char*) &hex, 33,
@@ -354,7 +354,7 @@ void KUserLDAP::createPassword( KU::KUser *user, const QString &password )
hash[6], hash[7], hash[8], hash[9], hash[10], hash[11],
hash[12], hash[13], hash[14], hash[15]);
- user->setLMPwd( QString::fromLatin1( (const char*) &hex, 32 ) );
+ user->setLMPwd( TQString::fromLatin1( (const char*) &hex, 32 ) );
} else {
user->setLMPwd( "" );
}
@@ -363,7 +363,7 @@ void KUserLDAP::createPassword( KU::KUser *user, const QString &password )
void KUserLDAP::getLDIF( KU::KUser *user, bool mod )
{
- QString gecos, cn, pwd, samflags;
+ TQString gecos, cn, pwd, samflags;
ldif.resize( 0 );
pwd = user->getPwd();
@@ -372,7 +372,7 @@ void KUserLDAP::getLDIF( KU::KUser *user, bool mod )
cn = mCfg->ldapcnfullname() ? user->getFullName() : user->getName();
if ( cn.isEmpty() ) cn = user->getName();
- gecos = QString::fromLatin1("%1,%2,%3,%4")
+ gecos = TQString::fromLatin1("%1,%2,%3,%4")
.arg(user->getFullName())
.arg(user->getOffice1())
.arg(user->getOffice2())
@@ -385,8 +385,8 @@ void KUserLDAP::getLDIF( KU::KUser *user, bool mod )
ldif = "";
if ( mod ) {
- QString oldrdn = getRDN( mUser );
- QString newrdn = getRDN( user );
+ TQString oldrdn = getRDN( mUser );
+ TQString newrdn = getRDN( user );
if ( oldrdn != newrdn ) {
ldif = "dn: " + oldrdn.utf8() + "," + mUrl.dn().utf8() + "\n" +
@@ -417,9 +417,9 @@ void KUserLDAP::getLDIF( KU::KUser *user, bool mod )
ldif += "objectClass: sambaSamAccount\n";
}
if ( mod && mObjectClasses.contains( mUser ) ) {
- QStringList ocs = mObjectClasses[ mUser ];
+ TQStringList ocs = mObjectClasses[ mUser ];
kdDebug() << user->getName() << " has additional objectclasses: " << ocs.join(",") << endl;
- QValueListIterator<QString> it;
+ TQValueListIterator<TQString> it;
for ( it = ocs.begin(); it != ocs.end(); ++it ) {
ldif += "objectClass: ";
ldif += (*it).utf8();
@@ -447,13 +447,13 @@ void KUserLDAP::getLDIF( KU::KUser *user, bool mod )
if ( user->getCaps() & KU::KUser::Cap_POSIX ) {
if ( mod ) ldif += "replace: uidnumber\n";
ldif += KABC::LDIF::assembleLine( "uidnumber",
- QString::number( user->getUID() ) )+"\n";
+ TQString::number( user->getUID() ) )+"\n";
if ( mod ) ldif += "-\nreplace: gidnumber\n";
ldif += KABC::LDIF::assembleLine( "gidnumber",
- QString::number( user->getGID() ) )+"\n";
+ TQString::number( user->getGID() ) )+"\n";
if ( mod ) ldif += "-\nreplace: gecos\n";
- ldif += KABC::LDIF::assembleLine( "gecos", !mCfg->ldapgecos() ? QCString() :
- QCString( gecos.latin1() ) )+"\n";
+ ldif += KABC::LDIF::assembleLine( "gecos", !mCfg->ldapgecos() ? TQCString() :
+ TQCString( gecos.latin1() ) )+"\n";
if ( mod ) ldif += "-\nreplace: homedirectory\n";
ldif += KABC::LDIF::assembleLine( "homedirectory",
user->getHomeDir() )+"\n";
@@ -514,11 +514,11 @@ void KUserLDAP::getLDIF( KU::KUser *user, bool mod )
user->getPGSID().getSID() ) + "\n";
if ( mod ) ldif += "-\nreplace: sambapwdlastset\n";
ldif += KABC::LDIF::assembleLine( "sambapwdlastset",
- QString::number( user->getLastChange() ) ) + "\n";
+ TQString::number( user->getLastChange() ) ) + "\n";
if ( mod ) ldif += "-\nreplace: sambakickofftime\n";
if ( user->getExpire() != -1 ) ldif +=
KABC::LDIF::assembleLine( "sambakickofftime",
- QString::number( user->getExpire() ) ) + "\n";
+ TQString::number( user->getExpire() ) ) + "\n";
if ( mod ) ldif += "-\n";
} else {
if ( mod ) {
@@ -556,25 +556,25 @@ void KUserLDAP::getLDIF( KU::KUser *user, bool mod )
if ( user->getCaps() & KU::KUser::Cap_POSIX ) {
if ( mod ) ldif += "replace: shadowlastchange\n"; //sambapwdlastset
ldif += KABC::LDIF::assembleLine( "shadowlastchange",
- QString::number( timeToDays( user->getLastChange() ) ) ) + "\n";
+ TQString::number( timeToDays( user->getLastChange() ) ) ) + "\n";
if ( mod ) ldif += "-\nreplace: shadowmin\n"; //sambaPwdCanChange
ldif += KABC::LDIF::assembleLine( "shadowmin",
- QString::number( user->getMin() ) ) + "\n";
+ TQString::number( user->getMin() ) ) + "\n";
if ( mod ) ldif += "-\nreplace: shadowmax\n"; //sambaPwdMustChange
ldif += KABC::LDIF::assembleLine( "shadowmax",
- QString::number( user->getMax() ) ) + "\n";
+ TQString::number( user->getMax() ) ) + "\n";
if ( mod ) ldif += "-\nreplace: shadowwarning\n";
ldif += KABC::LDIF::assembleLine( "shadowwarning",
- QString::number( user->getWarn() ) ) + "\n";
+ TQString::number( user->getWarn() ) ) + "\n";
if ( mod ) ldif += "-\nreplace: shadowinactive\n";
ldif += KABC::LDIF::assembleLine( "shadowinactive",
- QString::number( user->getInactive() ) ) + "\n";
+ TQString::number( user->getInactive() ) ) + "\n";
if ( mod ) ldif += "-\nreplace: shadowexpire\n"; //sambaKickoffTime
ldif += KABC::LDIF::assembleLine( "shadowexpire",
- QString::number( timeToDays( user->getExpire() ) ) ) + "\n";
+ TQString::number( timeToDays( user->getExpire() ) ) ) + "\n";
if ( mod ) ldif += "-\nreplace: shadowflag\n";
ldif += KABC::LDIF::assembleLine( "shadowflag",
- QString::number( user->getFlag() ) ) + "\n";
+ TQString::number( user->getFlag() ) ) + "\n";
if ( mod ) ldif += "-\n";
} else {
if ( mod ) {
@@ -610,15 +610,15 @@ bool KUserLDAP::dbcommit()
mProg = new KProgressDialog( 0, "", i18n("LDAP Operation"), "", true );
KIO::Job *job = KIO::put( mUrl, -1, false, false, false );
- connect( job, SIGNAL( dataReq( KIO::Job*, QByteArray& ) ),
- this, SLOT( putData( KIO::Job*, QByteArray& ) ) );
- connect( job, SIGNAL( result( KIO::Job* ) ),
- this, SLOT( result( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( dataReq( KIO::Job*, TQByteArray& ) ),
+ this, TQT_SLOT( putData( KIO::Job*, TQByteArray& ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ),
+ this, TQT_SLOT( result( KIO::Job* ) ) );
mProg->exec();
return( mOk );
}
-void KUserLDAP::putData( KIO::Job *, QByteArray& data )
+void KUserLDAP::putData( KIO::Job *, TQByteArray& data )
{
ModIt mit = mMod.begin();
diff --git a/kuser/kuserldap.h b/kuser/kuserldap.h
index 8d921c1..6af91cc 100644
--- a/kuser/kuserldap.h
+++ b/kuser/kuserldap.h
@@ -21,9 +21,9 @@
#include <sys/types.h>
-#include <qobject.h>
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
#include <kprogress.h>
#include <kabc/ldapurl.h>
@@ -32,7 +32,7 @@
#include "kuser.h"
-class KUserLDAP : public QObject, public KU::KUsers {
+class KUserLDAP : public TQObject, public KU::KUsers {
Q_OBJECT
public:
KUserLDAP(KUserPrefsBase *cfg);
@@ -42,8 +42,8 @@ public:
virtual bool dbcommit();
private slots:
- void data( KIO::Job*, const QByteArray& );
- void putData( KIO::Job *job, QByteArray& data );
+ void data( KIO::Job*, const TQByteArray& );
+ void putData( KIO::Job *job, TQByteArray& data );
void result( KIO::Job* );
private:
KABC::LDIF mParser;
@@ -52,16 +52,16 @@ private:
bool mOk, mCancel;
KU::KUser *mUser, *mDelUser, *mAddUser;
int mAdv;
- QCString ldif;
+ TQCString ldif;
int schemaversion;
- QStringList mOc;
- QMap<KU::KUser*, QStringList> mObjectClasses;
+ TQStringList mOc;
+ TQMap<KU::KUser*, TQStringList> mObjectClasses;
- QString getRDN( KU::KUser *user );
+ TQString getRDN( KU::KUser *user );
void getLDIF( KU::KUser *user, bool mod );
void delData( KU::KUser *user );
- virtual void createPassword( KU::KUser *user, const QString &password );
+ virtual void createPassword( KU::KUser *user, const TQString &password );
};
#endif // _KUSERLDAP_H_
diff --git a/kuser/kusersystem.cpp b/kuser/kusersystem.cpp
index ef0247f..8c67fcb 100644
--- a/kuser/kusersystem.cpp
+++ b/kuser/kusersystem.cpp
@@ -25,7 +25,7 @@
#include <shadow.h>
#endif
-#include <qstring.h>
+#include <tqstring.h>
#include <kmessagebox.h>
#include <kdebug.h>
@@ -70,25 +70,25 @@ bool KUserSystem::loadpwd()
{
passwd *p;
KU::KUser *tmpKU = 0;
- QString tmp;
+ TQString tmp;
setpwent(); //This should be enough for BSDs
while ((p = getpwent()) != NULL) {
tmpKU = new KU::KUser();
tmpKU->setUID(p->pw_uid);
tmpKU->setGID(p->pw_gid);
- tmpKU->setName(QString::fromLocal8Bit(p->pw_name));
- tmp = QString::fromLocal8Bit( p->pw_passwd );
+ tmpKU->setName(TQString::fromLocal8Bit(p->pw_name));
+ tmp = TQString::fromLocal8Bit( p->pw_passwd );
if ( tmp != "x" && tmp != "*" && !tmp.startsWith("!") )
tmpKU->setDisabled( false );
else
tmpKU->setDisabled( true );
if ( tmp.startsWith("!") ) tmp.remove(0, 1);
tmpKU->setPwd( tmp );
- tmpKU->setHomeDir(QString::fromLocal8Bit(p->pw_dir));
- tmpKU->setShell(QString::fromLocal8Bit(p->pw_shell));
+ tmpKU->setHomeDir(TQString::fromLocal8Bit(p->pw_dir));
+ tmpKU->setShell(TQString::fromLocal8Bit(p->pw_shell));
#if defined(__FreeBSD__) || defined(__bsdi__)
- tmpKU->setClass(QString::fromLatin1(p->pw_class));
+ tmpKU->setClass(TQString::fromLatin1(p->pw_class));
tmpKU->setLastChange(p->pw_change);
tmpKU->setExpire(p->pw_expire);
#endif
@@ -109,16 +109,16 @@ bool KUserSystem::loadsdw()
#ifdef HAVE_SHADOW
struct spwd *spw;
KU::KUser *up = NULL;
- QString tmp;
+ TQString tmp;
setspent();
while ((spw = getspent())) { // read a shadow password structure
- if ((up = lookup(QString::fromLocal8Bit(spw->sp_namp))) == NULL) {
+ if ((up = lookup(TQString::fromLocal8Bit(spw->sp_namp))) == NULL) {
continue;
}
- tmp = QString::fromLocal8Bit( spw->sp_pwdp );
+ tmp = TQString::fromLocal8Bit( spw->sp_pwdp );
if ( tmp.startsWith("!!") || tmp == "*" ) {
up->setDisabled( true );
tmp.remove( 0, 2 );
diff --git a/kuser/kusersystem.h b/kuser/kusersystem.h
index b982447..8316731 100644
--- a/kuser/kusersystem.h
+++ b/kuser/kusersystem.h
@@ -23,8 +23,8 @@
#include <sys/types.h>
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
#include "kuser.h"
@@ -35,7 +35,7 @@ public:
virtual bool dbcommit() { return true; }
virtual bool reload();
- virtual void createPassword( KU::KUser * /*user*/, const QString & /*password*/ ) {}
+ virtual void createPassword( KU::KUser * /*user*/, const TQString & /*password*/ ) {}
private:
diff --git a/kuser/kuservw.cpp b/kuser/kuservw.cpp
index 766700c..f34581c 100644
--- a/kuser/kuservw.cpp
+++ b/kuser/kuservw.cpp
@@ -29,7 +29,7 @@ KUserViewItem::KUserViewItem(KListView *parent, KU::KUser *aku)
{
}
-int KUserViewItem::compare( QListViewItem *i, int col, bool ascending ) const
+int KUserViewItem::compare( TQListViewItem *i, int col, bool ascending ) const
{
if ( col == 0 ) {
uid_t uid1, uid2;
@@ -40,50 +40,50 @@ int KUserViewItem::compare( QListViewItem *i, int col, bool ascending ) const
if ( uid1 == uid2 ) return 0;
return ( uid1 < uid2) ? -1: 1;
} else {
- return QListViewItem::compare( i, col, ascending );
+ return TQListViewItem::compare( i, col, ascending );
}
}
-void KUserViewItem::paintCell( QPainter *p, const QColorGroup &cg,
+void KUserViewItem::paintCell( TQPainter *p, const TQColorGroup &cg,
int column, int width, int alignment )
{
- QColorGroup _cg( cg );
- QColor c = _cg.text();
+ TQColorGroup _cg( cg );
+ TQColor c = _cg.text();
if ( mUser->getDisabled() )
- _cg.setColor( QColorGroup::Text, KGlobalSettings::visitedLinkColor() );
+ _cg.setColor( TQColorGroup::Text, KGlobalSettings::visitedLinkColor() );
KListViewItem::paintCell( p, _cg, column, width, alignment );
- _cg.setColor( QColorGroup::Text, c );
+ _cg.setColor( TQColorGroup::Text, c );
}
-QString KUserViewItem::text(int num) const
+TQString KUserViewItem::text(int num) const
{
switch(num)
{
case 0: return mUser->getCaps() & KU::KUser::Cap_POSIX ?
- QString::number( mUser->getUID() ) : QString::null;
+ TQString::number( mUser->getUID() ) : TQString::null;
case 1: return mUser->getName();
case 2: return mUser->getFullName();
case 3: return mUser->getHomeDir();
case 4: return mUser->getShell();
case 5: return mUser->getSID().getDOM();
case 6: return mUser->getCaps() & KU::KUser::Cap_Samba ?
- QString::number( mUser->getSID().getRID() ) : QString::null;
+ TQString::number( mUser->getSID().getRID() ) : TQString::null;
case 7: return mUser->getLoginScript();
case 8: return mUser->getProfilePath();
case 9: return mUser->getHomeDrive();
case 10: return mUser->getHomePath();
}
- return QString::null;
+ return TQString::null;
}
-KUserView::KUserView(QWidget *parent, const char *name)
+KUserView::KUserView(TQWidget *parent, const char *name)
: KListView( parent, name )
{
- setSelectionMode( QListView::Extended );
+ setSelectionMode( TQListView::Extended );
}
KUserView::~KUserView()
diff --git a/kuser/kuservw.h b/kuser/kuservw.h
index 3f28948..b9fa4de 100644
--- a/kuser/kuservw.h
+++ b/kuser/kuservw.h
@@ -21,7 +21,7 @@
#ifndef _KU_USERVW_H_
#define _KU_USERVW_H_
-#include <qwidget.h>
+#include <tqwidget.h>
#include <klistview.h>
@@ -33,10 +33,10 @@ public:
KUserViewItem(KListView *parent, KU::KUser *aku);
KU::KUser *user() { return mUser; }
private:
- virtual QString text ( int ) const;
- virtual void paintCell( QPainter *p, const QColorGroup &cg,
+ virtual TQString text ( int ) const;
+ virtual void paintCell( TQPainter *p, const TQColorGroup &cg,
int column, int width, int alignment );
- virtual int compare( QListViewItem *i, int col, bool ascending ) const;
+ virtual int compare( TQListViewItem *i, int col, bool ascending ) const;
KU::KUser *mUser;
};
@@ -45,7 +45,7 @@ class KUserView : public KListView
Q_OBJECT
public:
- KUserView( QWidget* parent = 0, const char* name = 0 );
+ KUserView( TQWidget* parent = 0, const char* name = 0 );
virtual ~KUserView();
diff --git a/kuser/main.cpp b/kuser/main.cpp
index d6b4bfb..638011d 100644
--- a/kuser/main.cpp
+++ b/kuser/main.cpp
@@ -18,7 +18,7 @@
* Boston, MA 02110-1301, USA.
**/
-#include <qfont.h>
+#include <tqfont.h>
#include <kiconloader.h>
#include <kapplication.h>
diff --git a/kuser/mainView.cpp b/kuser/mainView.cpp
index 4f4e388..9c9b5d8 100644
--- a/kuser/mainView.cpp
+++ b/kuser/mainView.cpp
@@ -22,8 +22,8 @@
#include <stdio.h>
-#include <qtooltip.h>
-#include <qfile.h>
+#include <tqtooltip.h>
+#include <tqfile.h>
#include <kinputdialog.h>
#include <ktoolbar.h>
@@ -39,7 +39,7 @@
#include "pwddlg.h"
#include "editGroup.h"
-mainView::mainView(QWidget *parent) : QTabWidget(parent)
+mainView::mainView(TQWidget *parent) : TQTabWidget(parent)
{
init();
}
@@ -52,13 +52,13 @@ void mainView::init() {
lbgroups = new KGroupView( this, "lbgroups" );
addTab( lbgroups, i18n("Groups"));
- connect(lbusers, SIGNAL(doubleClicked(QListViewItem *)), this, SLOT(userSelected()));
- connect(lbusers, SIGNAL(returnPressed(QListViewItem *)), this, SLOT(userSelected()));
+ connect(lbusers, TQT_SIGNAL(doubleClicked(TQListViewItem *)), this, TQT_SLOT(userSelected()));
+ connect(lbusers, TQT_SIGNAL(returnPressed(TQListViewItem *)), this, TQT_SLOT(userSelected()));
- connect(lbgroups, SIGNAL(doubleClicked(QListViewItem *)), this, SLOT(groupSelected()));
- connect(lbgroups, SIGNAL(returnPressed(QListViewItem *)), this, SLOT(groupSelected()));
+ connect(lbgroups, TQT_SIGNAL(doubleClicked(TQListViewItem *)), this, TQT_SLOT(groupSelected()));
+ connect(lbgroups, TQT_SIGNAL(returnPressed(TQListViewItem *)), this, TQT_SLOT(groupSelected()));
- connect(this, SIGNAL(currentChanged(QWidget *)), this, SLOT(slotTabChanged()));
+ connect(this, TQT_SIGNAL(currentChanged(TQWidget *)), this, TQT_SLOT(slotTabChanged()));
}
mainView::~mainView()
@@ -132,11 +132,11 @@ void mainView::userdel()
if (!user)
return;
- QString username = user->getName();
+ TQString username = user->getName();
gid_t gid = user->getGID();
delUser dlg(user, this);
- if ( dlg.exec() == QDialog::Rejected )
+ if ( dlg.exec() == TQDialog::Rejected )
return;
user->setDeleteHome( dlg.getDeleteHomeDir() );
@@ -165,7 +165,7 @@ void mainView::userdel()
if ( group &&
KMessageBox::questionYesNo( 0, i18n("You are using private groups.\n"
"Do you want to delete the user's private group '%1'?")
- .arg(group->getName()), QString::null,
+ .arg(group->getName()), TQString::null,
KStdGuiItem::del(), i18n("Do Not Delete")) == KMessageBox::Yes) {
kdDebug() << "del private group" << endl;
kug->getGroups().del( group );
@@ -196,9 +196,9 @@ void mainView::useradd()
*/
if ( samba ) rid = SID::uid2rid( uid );
bool ok;
- QString name = KInputDialog::getText( QString::null,
+ TQString name = KInputDialog::getText( TQString::null,
i18n("Please type the name of the new user:"),
- QString::null, &ok );
+ TQString::null, &ok );
if ( !ok ) return;
@@ -246,7 +246,7 @@ void mainView::useradd()
au.setCreateHomeDir( kug->kcfg()->createHomeDir() );
au.setCopySkel( kug->kcfg()->copySkel() );
- if ( au.exec() == QDialog::Rejected ) {
+ if ( au.exec() == TQDialog::Rejected ) {
delete tk;
return;
}
@@ -305,13 +305,13 @@ void mainView::setpwd()
if ( count > 1 ) {
if ( KMessageBox::questionYesNo( 0,
i18n("You have selected %1 users. Do you really want to change the password for all the selected users?")
- .arg( count ), QString::null, i18n("Change"), i18n("Do Not Change") ) == KMessageBox::No ) return;
+ .arg( count ), TQString::null, i18n("Change"), i18n("Do Not Change") ) == KMessageBox::No ) return;
}
pwddlg d( this );
- if ( d.exec() != QDialog::Accepted ) return;
+ if ( d.exec() != TQDialog::Accepted ) return;
KU::KUser newuser, *user;
- QListViewItem *item;
+ TQListViewItem *item;
item = lbusers->firstChild();
while ( item ) {
@@ -347,7 +347,7 @@ void mainView::groupSelected()
}
editGroup egdlg( &newGroup, samba, false );
- if ( egdlg.exec() == QDialog::Accepted ) {
+ if ( egdlg.exec() == TQDialog::Accepted ) {
kug->getGroups().mod( tmpKG, newGroup );
updateGroups();
}
@@ -355,8 +355,8 @@ void mainView::groupSelected()
void mainView::userSelected()
{
- QListViewItem *item;
- QPtrList<KU::KUser> ulist;
+ TQListViewItem *item;
+ TQPtrList<KU::KUser> ulist;
item = lbusers->firstChild();
while ( item ) {
@@ -368,7 +368,7 @@ void mainView::userSelected()
if ( ulist.isEmpty() ) return;
propdlg editUser( ulist, this );
- if ( editUser.exec() == QDialog::Rejected ) return;
+ if ( editUser.exec() == TQDialog::Rejected ) return;
KU::KUser *user, newuser;
user = ulist.first();
@@ -415,7 +415,7 @@ void mainView::grpadd()
}
editGroup egdlg( tk, samba, true );
- if ( egdlg.exec() == QDialog::Rejected ) {
+ if ( egdlg.exec() == TQDialog::Rejected ) {
delete tk;
return;
}
@@ -430,7 +430,7 @@ void mainView::grpedit()
void mainView::grpdel()
{
- QListViewItem *item;
+ TQListViewItem *item;
KU::KGroup *group = NULL;
int selected = 0;
@@ -458,12 +458,12 @@ void mainView::grpdel()
case 1:
if (KMessageBox::warningContinueCancel( 0,
i18n("Do you really want to delete the group '%1'?").arg(group->getName()),
- QString::null, KStdGuiItem::del()) != KMessageBox::Continue) return;
+ TQString::null, KStdGuiItem::del()) != KMessageBox::Continue) return;
break;
default:
if (KMessageBox::warningContinueCancel( 0,
i18n("Do you really want to delete the %1 selected groups?").arg(selected),
- QString::null, KStdGuiItem::del()) != KMessageBox::Continue) return;
+ TQString::null, KStdGuiItem::del()) != KMessageBox::Continue) return;
}
item = lbgroups->firstChild();
diff --git a/kuser/mainView.h b/kuser/mainView.h
index 5304ea3..736cdb3 100644
--- a/kuser/mainView.h
+++ b/kuser/mainView.h
@@ -23,19 +23,19 @@
#include <stdlib.h>
-#include <qevent.h>
-#include <qptrlist.h>
-#include <qpushbutton.h>
-#include <qpixmap.h>
-#include <qtabwidget.h>
+#include <tqevent.h>
+#include <tqptrlist.h>
+#include <tqpushbutton.h>
+#include <tqpixmap.h>
+#include <tqtabwidget.h>
#include "kuservw.h"
#include "kgroupvw.h"
-class mainView : public QTabWidget {
+class mainView : public TQTabWidget {
Q_OBJECT
public:
- mainView(QWidget *parent = 0);
+ mainView(TQWidget *parent = 0);
~mainView();
void init();
diff --git a/kuser/mainWidget.cpp b/kuser/mainWidget.cpp
index 91b5862..afdb557 100644
--- a/kuser/mainWidget.cpp
+++ b/kuser/mainWidget.cpp
@@ -18,8 +18,8 @@
* Boston, MA 02110-1301, USA.
**/
-#include <qtooltip.h>
-#include <qtimer.h>
+#include <tqtooltip.h>
+#include <tqtimer.h>
#include <ktoolbar.h>
#include <kiconloader.h>
@@ -68,46 +68,46 @@ bool mainWidget::queryClose()
void mainWidget::setupActions()
{
- KStdAction::quit(this, SLOT(close()), actionCollection());
- KStdAction::keyBindings(guiFactory(), SLOT(configureShortcuts()), actionCollection());
+ KStdAction::quit(this, TQT_SLOT(close()), actionCollection());
+ KStdAction::keyBindings(guiFactory(), TQT_SLOT(configureShortcuts()), actionCollection());
- KStdAction::preferences(this, SLOT(properties()), actionCollection());
+ KStdAction::preferences(this, TQT_SLOT(properties()), actionCollection());
-#define BarIconC(x) BarIcon(QString::fromLatin1(x))
+#define BarIconC(x) BarIcon(TQString::fromLatin1(x))
- (void) new KAction(i18n("&Add..."), QIconSet(BarIconC("add_user")), 0, md,
- SLOT(useradd()), actionCollection(), "add_user");
+ (void) new KAction(i18n("&Add..."), TQIconSet(BarIconC("add_user")), 0, md,
+ TQT_SLOT(useradd()), actionCollection(), "add_user");
- (void) new KAction(i18n("&Edit..."), QIconSet(BarIconC("edit_user")), 0, md,
- SLOT(useredit()), actionCollection(), "edit_user");
+ (void) new KAction(i18n("&Edit..."), TQIconSet(BarIconC("edit_user")), 0, md,
+ TQT_SLOT(useredit()), actionCollection(), "edit_user");
- (void) new KAction(i18n("&Delete..."), QIconSet(BarIconC("delete_user")), 0, md,
- SLOT(userdel()), actionCollection(), "delete_user");
+ (void) new KAction(i18n("&Delete..."), TQIconSet(BarIconC("delete_user")), 0, md,
+ TQT_SLOT(userdel()), actionCollection(), "delete_user");
(void) new KAction(i18n("&Set Password..."),
- 0, md, SLOT(setpwd()), actionCollection(), "set_password_user");
+ 0, md, TQT_SLOT(setpwd()), actionCollection(), "set_password_user");
- (void) new KAction(i18n("&Add..."), QIconSet(BarIconC("add_group")), 0, md,
- SLOT(grpadd()), actionCollection(), "add_group");
+ (void) new KAction(i18n("&Add..."), TQIconSet(BarIconC("add_group")), 0, md,
+ TQT_SLOT(grpadd()), actionCollection(), "add_group");
- (void) new KAction(i18n("&Edit..."), QIconSet(BarIconC("edit_group")), 0, md,
- SLOT(grpedit()), actionCollection(), "edit_group");
+ (void) new KAction(i18n("&Edit..."), TQIconSet(BarIconC("edit_group")), 0, md,
+ TQT_SLOT(grpedit()), actionCollection(), "edit_group");
- (void) new KAction(i18n("&Delete"), QIconSet(BarIconC("delete_group")), 0, md,
- SLOT(grpdel()), actionCollection(), "delete_group");
+ (void) new KAction(i18n("&Delete"), TQIconSet(BarIconC("delete_group")), 0, md,
+ TQT_SLOT(grpdel()), actionCollection(), "delete_group");
- (void) new KAction(i18n("&Reload"), QIconSet(BarIconC("reload")), 0, this,
- SLOT(reload()), actionCollection(), "reload");
+ (void) new KAction(i18n("&Reload"), TQIconSet(BarIconC("reload")), 0, this,
+ TQT_SLOT(reload()), actionCollection(), "reload");
#undef BarIconC
(void) new KAction(i18n("&Select Connection..."),
0, this,
- SLOT(selectconn()), actionCollection(), "select_conn");
+ TQT_SLOT(selectconn()), actionCollection(), "select_conn");
mShowSys = new KToggleAction(i18n("Show System Users/Groups"),
0, 0, this,
- SLOT(showSys()), actionCollection(), "show_sys");
+ TQT_SLOT(showSys()), actionCollection(), "show_sys");
mShowSys->setCheckedState(i18n("Hide System Users/Groups"));
mShowSys->setChecked( kug->kcfg()->showsys() );
}
@@ -123,7 +123,7 @@ void mainWidget::showSys()
void mainWidget::properties()
{
editDefaults *eddlg = new editDefaults( kug->kcfg(), this );
- connect(eddlg, SIGNAL(settingsChanged()), this, SLOT(slotApplySettings()));
+ connect(eddlg, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT(slotApplySettings()));
eddlg->show();
}
@@ -147,14 +147,14 @@ void mainWidget::init()
actionCollection()->action("delete_user")->setEnabled( rw );
actionCollection()->action("set_password_user")->setEnabled( rw );
if ( rw ) {
- connect( md, SIGNAL(userSelected(bool)),
- actionCollection()->action("edit_user"), SLOT(setEnabled(bool)) );
- connect( md, SIGNAL(userSelected(bool)),
- actionCollection()->action("delete_user"), SLOT(setEnabled(bool)) );
- connect( md, SIGNAL(userSelected(bool)),
- actionCollection()->action("set_password_user"), SLOT(setEnabled(bool)) );
+ connect( md, TQT_SIGNAL(userSelected(bool)),
+ actionCollection()->action("edit_user"), TQT_SLOT(setEnabled(bool)) );
+ connect( md, TQT_SIGNAL(userSelected(bool)),
+ actionCollection()->action("delete_user"), TQT_SLOT(setEnabled(bool)) );
+ connect( md, TQT_SIGNAL(userSelected(bool)),
+ actionCollection()->action("set_password_user"), TQT_SLOT(setEnabled(bool)) );
} else {
- disconnect( md, SIGNAL(userSelected(bool)), 0, 0 );
+ disconnect( md, TQT_SIGNAL(userSelected(bool)), 0, 0 );
}
rw = ! ( kug->getGroups().getCaps() & KU::KGroups::Cap_ReadOnly );
@@ -163,16 +163,16 @@ void mainWidget::init()
actionCollection()->action("edit_group")->setEnabled( rw );
actionCollection()->action("delete_group")->setEnabled( rw );
if ( rw ) {
- connect( md, SIGNAL(groupSelected(bool)),
- actionCollection()->action("edit_group"), SLOT(setEnabled(bool)) );
- connect( md, SIGNAL(groupSelected(bool)),
- actionCollection()->action("delete_group"), SLOT(setEnabled(bool)) );
+ connect( md, TQT_SIGNAL(groupSelected(bool)),
+ actionCollection()->action("edit_group"), TQT_SLOT(setEnabled(bool)) );
+ connect( md, TQT_SIGNAL(groupSelected(bool)),
+ actionCollection()->action("delete_group"), TQT_SLOT(setEnabled(bool)) );
} else {
- disconnect( md, SIGNAL(groupSelected(bool)), 0, 0 );
+ disconnect( md, TQT_SIGNAL(groupSelected(bool)), 0, 0 );
}
md->reloadUsers();
md->reloadGroups();
- QTimer::singleShot( 0, md, SLOT(slotTabChanged()) );
+ TQTimer::singleShot( 0, md, TQT_SLOT(slotTabChanged()) );
}
void mainWidget::slotApplySettings()
@@ -184,7 +184,7 @@ void mainWidget::slotApplySettings()
void mainWidget::slotApplyConnection()
{
kdDebug() << "slotApplyConnection()" << endl;
- QString conn = sc->connSelected();
+ TQString conn = sc->connSelected();
kug->kcfg()->setConnection( conn );
kug->initCfg( conn );
slotApplySettings();
@@ -193,8 +193,8 @@ void mainWidget::slotApplyConnection()
void mainWidget::selectconn()
{
sc = new SelectConn( kug->kcfg()->connection(), this, "selectconn" );
- connect( sc, SIGNAL(applyClicked()), SLOT(slotApplyConnection()) );
- connect( sc, SIGNAL(okClicked()), SLOT(slotApplyConnection()) );
+ connect( sc, TQT_SIGNAL(applyClicked()), TQT_SLOT(slotApplyConnection()) );
+ connect( sc, TQT_SIGNAL(okClicked()), TQT_SLOT(slotApplyConnection()) );
sc->show();
}
diff --git a/kuser/misc.cpp b/kuser/misc.cpp
index 4215c40..c16f563 100644
--- a/kuser/misc.cpp
+++ b/kuser/misc.cpp
@@ -28,21 +28,21 @@
#ifdef HAVE_CRYPT_H
#include <crypt.h>
#endif
-#include <qfile.h>
+#include <tqfile.h>
#include <kmessagebox.h>
#include "misc.h"
#include "kglobal_.h"
-bool backup(const QString & name)
+bool backup(const TQString & name)
{
- QString tmp = name + QString::fromLatin1(KU_BACKUP_EXT);
- QFile::remove( tmp );
+ TQString tmp = name + TQString::fromLatin1(KU_BACKUP_EXT);
+ TQFile::remove( tmp );
- if (copyFile(QFile::encodeName(name), QFile::encodeName(tmp)) == -1)
+ if (copyFile(TQFile::encodeName(name), TQFile::encodeName(tmp)) == -1)
{
- QString str;
+ TQString str;
KMessageBox::error( 0, i18n("Can't create backup file for %1").arg(name) );
return false;
}
@@ -58,10 +58,10 @@ time_t now() {
#define BLOCK_SIZE 65536
-int copyFile(const QString & from, const QString & to)
+int copyFile(const TQString & from, const TQString & to)
{
- QFile fi;
- QFile fo;
+ TQFile fi;
+ TQFile fo;
char buf[BLOCK_SIZE];
fi.setName(from);
@@ -95,9 +95,9 @@ int copyFile(const QString & from, const QString & to)
return (0);
}
-QStringList readShells()
+TQStringList readShells()
{
- QStringList shells;
+ TQStringList shells;
FILE *f = fopen(SHELL_FILE,"r");
if (f) {
@@ -110,31 +110,31 @@ QStringList readShells()
s[strlen(s)-1]=0;
if ((s[0])&&(s[0]!='#'))
- shells.append(QFile::decodeName(s));
+ shells.append(TQFile::decodeName(s));
}
fclose(f);
}
return shells;
}
-void addShell(const QString &shell)
+void addShell(const TQString &shell)
{
- QStringList shells = readShells();
+ TQStringList shells = readShells();
if (shells.contains(shell))
return;
FILE *f = fopen(SHELL_FILE,"a");
if (f)
{
- fputs(QFile::encodeName(shell).data(), f);
+ fputs(TQFile::encodeName(shell).data(), f);
fputc('\n', f);
}
fclose(f);
}
-QCString genSalt( int len )
+TQCString genSalt( int len )
{
- QCString salt( len + 1 );
+ TQCString salt( len + 1 );
const char * set = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789./";
salt[0] = set[getpid() % strlen(set)];
@@ -144,9 +144,9 @@ QCString genSalt( int len )
return salt;
}
-QString encryptPass( const QString &pass, bool md5 )
+TQString encryptPass( const TQString &pass, bool md5 )
{
- QCString salt;
+ TQCString salt;
char tmp[128];
if ( md5 ) {
@@ -157,8 +157,8 @@ QString encryptPass( const QString &pass, bool md5 )
} else {
salt = genSalt( 2 );
}
- strcpy( tmp, crypt( QFile::encodeName( pass ), salt ) );
- return QString::fromLocal8Bit( tmp );
+ strcpy( tmp, crypt( TQFile::encodeName( pass ), salt ) );
+ return TQString::fromLocal8Bit( tmp );
}
int timeToDays(time_t time)
diff --git a/kuser/misc.h b/kuser/misc.h
index 87485e6..b1f3f95 100644
--- a/kuser/misc.h
+++ b/kuser/misc.h
@@ -25,20 +25,20 @@
#include <klocale.h>
#include <kapplication.h>
-#include <qstring.h>
-#include <qwidget.h>
-#include <qlabel.h>
-#include <qlineedit.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
class KUser;
-bool backup(const QString & name);
-QCString genSalt( int len );
-QString encryptPass( const QString &pass, bool md5 );
+bool backup(const TQString & name);
+TQCString genSalt( int len );
+TQString encryptPass( const TQString &pass, bool md5 );
time_t now();
-int copyFile(const QString & from, const QString & to);
-QStringList readShells();
-void addShell(const QString &shell);
+int copyFile(const TQString & from, const TQString & to);
+TQStringList readShells();
+void addShell(const TQString &shell);
int timeToDays(time_t time);
time_t daysToTime(int days);
diff --git a/kuser/propdlg.cpp b/kuser/propdlg.cpp
index 726cec1..17c96d4 100644
--- a/kuser/propdlg.cpp
+++ b/kuser/propdlg.cpp
@@ -21,35 +21,35 @@
#include <stdio.h>
#include <stdlib.h>
-#include <qdatetime.h>
-#include <qwhatsthis.h>
-#include <qlayout.h>
-#include <qgroupbox.h>
-#include <qfile.h>
+#include <tqdatetime.h>
+#include <tqwhatsthis.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
+#include <tqfile.h>
#include <kseparator.h>
#include <kmessagebox.h>
#include <kdebug.h>
-#include <qvalidator.h>
+#include <tqvalidator.h>
#include "propdlg.h"
#include "pwddlg.h"
#include "kglobal_.h"
#include "misc.h"
-void propdlg::addRow(QWidget *parent, QGridLayout *layout, int row,
- QWidget *widget, const QString &label, const QString &what,
+void propdlg::addRow(TQWidget *parent, TQGridLayout *layout, int row,
+ TQWidget *widget, const TQString &label, const TQString &what,
bool two_column, bool nochange)
{
- QLabel *lab = new QLabel(widget, label, parent);
+ TQLabel *lab = new TQLabel(widget, label, parent);
lab->setMinimumSize(lab->sizeHint());
widget->setMinimumSize(widget->sizeHint());
layout->addWidget(lab, row, 0);
if (!what.isEmpty())
{
- QWhatsThis::add(lab, what);
- QWhatsThis::add(widget, what);
+ TQWhatsThis::add(lab, what);
+ TQWhatsThis::add(widget, what);
}
if (two_column)
layout->addMultiCellWidget(widget, row, row, 1, 2);
@@ -57,18 +57,18 @@ void propdlg::addRow(QWidget *parent, QGridLayout *layout, int row,
layout->addWidget(widget, row, 1);
if ( !nochange || ro ) return;
- QCheckBox *nc = new QCheckBox( i18n("Do not change"), parent );
+ TQCheckBox *nc = new TQCheckBox( i18n("Do not change"), parent );
layout->addWidget( nc, row, 3 );
nc->hide();
mNoChanges[ widget ] = nc;
}
-KIntSpinBox *propdlg::addDaysGroup(QWidget *parent, QGridLayout *layout, int row,
- const QString &title, bool never)
+KIntSpinBox *propdlg::addDaysGroup(TQWidget *parent, TQGridLayout *layout, int row,
+ const TQString &title, bool never)
{
KIntSpinBox *days;
- QLabel *label = new QLabel( title, parent );
+ TQLabel *label = new TQLabel( title, parent );
layout->addMultiCellWidget( label, row, row, 0, 1, AlignRight );
days = new KIntSpinBox( parent );
@@ -86,9 +86,9 @@ KIntSpinBox *propdlg::addDaysGroup(QWidget *parent, QGridLayout *layout, int row
}
layout->addWidget( days, row, 2 );
- connect(days, SIGNAL(valueChanged(int)), this, SLOT(changed()));
+ connect(days, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(changed()));
- QCheckBox *nc = new QCheckBox( i18n("Do not change"), parent );
+ TQCheckBox *nc = new TQCheckBox( i18n("Do not change"), parent );
layout->addWidget( nc, row, 3 );
nc->hide();
mNoChanges[ days ] = nc;
@@ -100,66 +100,66 @@ void propdlg::initDlg()
{
ro = kug->getUsers().getCaps() & KU::KUsers::Cap_ReadOnly;
- QString whatstr;
+ TQString whatstr;
// Tab 1: User Info
{
- QFrame *frame = addPage(i18n("User Info"));
- QGridLayout *layout = new QGridLayout(frame, 20, 4, marginHint(), spacingHint());
+ TQFrame *frame = addPage(i18n("User Info"));
+ TQGridLayout *layout = new TQGridLayout(frame, 20, 4, marginHint(), spacingHint());
int row = 0;
frontpage = frame;
frontlayout = layout;
- lbuser = new QLabel(frame);
+ lbuser = new TQLabel(frame);
// whatstr = i18n("WHAT IS THIS: User login");
addRow(frame, layout, row++, lbuser, i18n("User login:"), whatstr, false, false);
leid = new KLineEdit(frame);
// whatstr = i18n("WHAT IS THIS: User Id");
- leid->setValidator(new QIntValidator(frame));
+ leid->setValidator(new TQIntValidator(frame));
addRow(frame, layout, row++, leid, i18n("&User ID:"), whatstr);
- connect(leid, SIGNAL(textChanged(const QString &)), this, SLOT(changed()));
+ connect(leid, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed()));
if ( !ro ) {
- pbsetpwd = new QPushButton(i18n("Set &Password..."), frame);
+ pbsetpwd = new TQPushButton(i18n("Set &Password..."), frame);
layout->addWidget(pbsetpwd, 0, 2);
- connect(pbsetpwd, SIGNAL(clicked()), this, SLOT(setpwd()));
+ connect(pbsetpwd, TQT_SIGNAL(clicked()), this, TQT_SLOT(setpwd()));
}
lefname = new KLineEdit(frame);
// whatstr = i18n("WHAT IS THIS: Full Name");
addRow(frame, layout, row++, lefname, i18n("Full &name:"), whatstr);
- connect(lefname, SIGNAL(textChanged(const QString &)), this, SLOT(changed()));
+ connect(lefname, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed()));
lefname->setFocus();
if ( kug->getUsers().getCaps() & KU::KUsers::Cap_InetOrg ) {
lesurname = new KLineEdit(frame);
// whatstr = i18n("WHAT IS THIS: Surname");
addRow(frame, layout, row++, lesurname, i18n("Surname:"), whatstr);
- connect(lesurname, SIGNAL(textChanged(const QString &)), this, SLOT(changed()));
+ connect(lesurname, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed()));
lemail = new KLineEdit(frame);
// whatstr = i18n("WHAT IS THIS: Email");
addRow(frame, layout, row++, lemail, i18n("Email address:"), whatstr);
- connect(lemail, SIGNAL(textChanged(const QString &)), this, SLOT(changed()));
+ connect(lemail, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed()));
}
leshell = new KComboBox(true, frame);
leshell->clear();
leshell->insertItem(i18n("<Empty>"));
- QStringList shells = readShells();
+ TQStringList shells = readShells();
shells.sort();
leshell->insertStringList(shells);
- connect(leshell, SIGNAL(activated(const QString &)), this, SLOT(changed()));
- connect(leshell, SIGNAL(textChanged(const QString &)), this, SLOT(changed()));
+ connect(leshell, TQT_SIGNAL(activated(const TQString &)), this, TQT_SLOT(changed()));
+ connect(leshell, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed()));
// whatstr = i18n("WHAT IS THIS: Login Shell");
addRow(frame, layout, row++, leshell, i18n("&Login shell:"), whatstr);
lehome = new KLineEdit(frame);
- connect(lehome, SIGNAL(textChanged(const QString &)), this, SLOT(changed()));
+ connect(lehome, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed()));
// whatstr = i18n("WHAT IS THIS: Home Directory");
addRow(frame, layout, row++, lehome, i18n("&Home folder:"), whatstr);
@@ -167,48 +167,48 @@ void propdlg::initDlg()
// differently than Linux.
if ( kug->getUsers().getCaps() & KU::KUsers::Cap_BSD ) {
leoffice = new KLineEdit(frame);
- connect(leoffice, SIGNAL(textChanged(const QString &)), this, SLOT(changed()));
+ connect(leoffice, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed()));
// whatstr = i18n("WHAT IS THIS: Office");
addRow(frame, layout, row++, leoffice, i18n("&Office:"), whatstr);
leophone = new KLineEdit(frame);
- connect(leophone, SIGNAL(textChanged(const QString &)), this, SLOT(changed()));
+ connect(leophone, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed()));
// whatstr = i18n("WHAT IS THIS: Office Phone");
addRow(frame, layout, row++, leophone, i18n("Offi&ce Phone:"), whatstr);
lehphone = new KLineEdit(frame);
- connect(lehphone, SIGNAL(textChanged(const QString &)), this, SLOT(changed()));
+ connect(lehphone, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed()));
// whatstr = i18n("WHAT IS THIS: Home Phone");
addRow(frame, layout, row++, lehphone, i18n("Ho&me Phone:"), whatstr);
leclass = new KLineEdit(frame);
- connect(leclass, SIGNAL(textChanged(const QString &)), this, SLOT(changed()));
+ connect(leclass, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed()));
// whatstr = i18n("WHAT IS THIS: Login class");
addRow(frame, layout, row++, leclass, i18n("Login class:"), whatstr, true);
} else {
leoffice1 = new KLineEdit(frame);
- connect(leoffice1, SIGNAL(textChanged(const QString &)), this, SLOT(changed()));
+ connect(leoffice1, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed()));
// whatstr = i18n("WHAT IS THIS: Office1");
addRow(frame, layout, row++, leoffice1, i18n("&Office #1:"), whatstr);
leoffice2 = new KLineEdit(frame);
- connect(leoffice2, SIGNAL(textChanged(const QString &)), this, SLOT(changed()));
+ connect(leoffice2, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed()));
// whatstr = i18n("WHAT IS THIS: Office2");
addRow(frame, layout, row++, leoffice2, i18n("O&ffice #2:"), whatstr);
leaddress = new KLineEdit(frame);
- connect(leaddress, SIGNAL(textChanged(const QString &)), this, SLOT(changed()));
+ connect(leaddress, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed()));
// whatstr = i18n("WHAT IS THIS: Address");
addRow(frame, layout, row++, leaddress, i18n("&Address:"), whatstr);
}
- cbdisabled = new QCheckBox(frame);
- connect(cbdisabled, SIGNAL(stateChanged(int)), this, SLOT(changed()));
+ cbdisabled = new TQCheckBox(frame);
+ connect(cbdisabled, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed()));
addRow(frame, layout, row++, cbdisabled, i18n("Account &disabled"), whatstr);
if ( kug->getUsers().getCaps() & KU::KUsers::Cap_Disable_POSIX ) {
- cbposix = new QCheckBox(frame);
- connect(cbposix, SIGNAL(stateChanged(int)), this, SLOT(changed()));
- connect(cbposix, SIGNAL(stateChanged(int)), this, SLOT(cbposixChanged()));
+ cbposix = new TQCheckBox(frame);
+ connect(cbposix, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed()));
+ connect(cbposix, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(cbposixChanged()));
addRow(frame, layout, row++, cbposix, i18n("Disable &POSIX account information"), whatstr);
} else {
cbposix = 0;
@@ -221,19 +221,19 @@ void propdlg::initDlg()
kug->getUsers().getCaps() & KU::KUsers::Cap_BSD ) {
// Tab 2 : Password Management
- QFrame *frame = addPage(i18n("Password Management"));
- QGridLayout *layout = new QGridLayout(frame, 20, 4, marginHint(), spacingHint());
+ TQFrame *frame = addPage(i18n("Password Management"));
+ TQGridLayout *layout = new TQGridLayout(frame, 20, 4, marginHint(), spacingHint());
int row = 0;
- QDateTime time;
- leslstchg = new QLabel(frame);
- addRow(frame, layout, row++, leslstchg, i18n("Last password change:"), QString::null, true);
+ TQDateTime time;
+ leslstchg = new TQLabel(frame);
+ addRow(frame, layout, row++, leslstchg, i18n("Last password change:"), TQString::null, true);
layout->addMultiCellWidget(new KSeparator(KSeparator::HLine, frame), row, row, 0, 3);
row++;
if ( kug->getUsers().getCaps() & KU::KUsers::Cap_Shadow ) {
- layout->addWidget( new QLabel( i18n("POSIX parameters:"), frame ), row++, 0 );
+ layout->addWidget( new TQLabel( i18n("POSIX parameters:"), frame ), row++, 0 );
lesmin = addDaysGroup(frame, layout, row++, i18n("Time before password may &not be changed after last password change:"), false);
lesmax = addDaysGroup(frame, layout, row++, i18n("Time when password &expires after last password change:") );
leswarn = addDaysGroup(frame, layout, row++, i18n("Time before password expires to &issue an expire warning:"));
@@ -243,104 +243,104 @@ void propdlg::initDlg()
}
/*
if ( kug->getUsers().getCaps() & KU::KUsers::Cap_Samba ) {
- layout->addWidget( new QLabel( "SAMBA parameters:", frame ), row++, 0 );
+ layout->addWidget( new TQLabel( "SAMBA parameters:", frame ), row++, 0 );
layout->addMultiCellWidget(new KSeparator(KSeparator::HLine, frame), row, row, 0, 3);
row++;
}
*/
- QLabel *label = new QLabel( i18n("&Account will expire on:"), frame );
+ TQLabel *label = new TQLabel( i18n("&Account will expire on:"), frame );
layout->addWidget( label, row, 0 );
lesexpire = new KDateTimeWidget( frame );
label->setBuddy( lesexpire );
layout->addMultiCellWidget( lesexpire, row, row, 1, 2);
- cbexpire = new QCheckBox( i18n("Never"), frame );
+ cbexpire = new TQCheckBox( i18n("Never"), frame );
layout->addWidget( cbexpire, row++, 3 );
- connect( lesexpire, SIGNAL(valueChanged(const QDateTime&)), this, SLOT(changed()) );
- connect( cbexpire, SIGNAL(stateChanged(int)), this, SLOT(changed()) );
- connect( cbexpire, SIGNAL(toggled(bool)), lesexpire, SLOT(setDisabled(bool)) );
+ connect( lesexpire, TQT_SIGNAL(valueChanged(const TQDateTime&)), this, TQT_SLOT(changed()) );
+ connect( cbexpire, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed()) );
+ connect( cbexpire, TQT_SIGNAL(toggled(bool)), lesexpire, TQT_SLOT(setDisabled(bool)) );
}
// Tab 3: Samba
if ( kug->getUsers().getCaps() & KU::KUsers::Cap_Samba ) {
- QFrame *frame = addPage(i18n("Samba"));
- QGridLayout *layout = new QGridLayout(frame, 10, 4, marginHint(), spacingHint());
+ TQFrame *frame = addPage(i18n("Samba"));
+ TQGridLayout *layout = new TQGridLayout(frame, 10, 4, marginHint(), spacingHint());
int row = 0;
lerid = new KLineEdit(frame);
// whatstr = i18n("WHAT IS THIS: Rid");
- lerid->setValidator(new QIntValidator(frame));
+ lerid->setValidator(new TQIntValidator(frame));
addRow(frame, layout, row++, lerid, i18n("RID:"), whatstr);
- connect(lerid, SIGNAL(textChanged(const QString &)), this, SLOT(changed()));
+ connect(lerid, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed()));
leliscript = new KLineEdit(frame);
// whatstr = i18n("WHAT IS THIS: Login script");
addRow(frame, layout, row++, leliscript, i18n("Login script:"), whatstr);
- connect(leliscript, SIGNAL(textChanged(const QString &)), this, SLOT(changed()));
+ connect(leliscript, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed()));
leprofile = new KLineEdit(frame);
// whatstr = i18n("WHAT IS THIS: Login script");
addRow(frame, layout, row++, leprofile, i18n("Profile path:"), whatstr);
- connect(leprofile, SIGNAL(textChanged(const QString &)), this, SLOT(changed()));
+ connect(leprofile, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed()));
lehomedrive = new KLineEdit(frame);
// whatstr = i18n("WHAT IS THIS: Login script");
addRow(frame, layout, row++, lehomedrive, i18n("Home drive:"), whatstr);
- connect(lehomedrive, SIGNAL(textChanged(const QString &)), this, SLOT(changed()));
+ connect(lehomedrive, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed()));
lehomepath = new KLineEdit(frame);
// whatstr = i18n("WHAT IS THIS: Login script");
addRow(frame, layout, row++, lehomepath, i18n("Home path:"), whatstr);
- connect(lehomepath, SIGNAL(textChanged(const QString &)), this, SLOT(changed()));
+ connect(lehomepath, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed()));
leworkstations = new KLineEdit(frame);
// whatstr = i18n("WHAT IS THIS: Login script");
addRow(frame, layout, row++, leworkstations, i18n("User workstations:"), whatstr);
- connect(leworkstations, SIGNAL(textChanged(const QString &)), this, SLOT(changed()));
+ connect(leworkstations, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed()));
ledomain = new KLineEdit(frame);
// whatstr = i18n("WHAT IS THIS: Login script");
addRow(frame, layout, row++, ledomain, i18n("Domain name:"), whatstr);
- connect(ledomain, SIGNAL(textChanged(const QString &)), this, SLOT(changed()));
+ connect(ledomain, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed()));
ledomsid = new KLineEdit(frame);
// whatstr = i18n("WHAT IS THIS: Login script");
addRow(frame, layout, row++, ledomsid, i18n("Domain SID:"), whatstr);
- connect(ledomsid, SIGNAL(textChanged(const QString &)), this, SLOT(changed()));
+ connect(ledomsid, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed()));
- cbsamba = new QCheckBox(frame);
- connect(cbsamba, SIGNAL(stateChanged(int)), this, SLOT(changed()));
- connect(cbsamba, SIGNAL(stateChanged(int)), this, SLOT(cbsambaChanged()));
+ cbsamba = new TQCheckBox(frame);
+ connect(cbsamba, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed()));
+ connect(cbsamba, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(cbsambaChanged()));
addRow(frame, layout, row++, cbsamba, i18n("Disable &Samba account information"), whatstr);
}
// Tab 4: Groups
{
- QFrame *frame = addPage(i18n("Groups"));
- QGridLayout *layout = new QGridLayout(frame, 2, 2, marginHint(), spacingHint());
+ TQFrame *frame = addPage(i18n("Groups"));
+ TQGridLayout *layout = new TQGridLayout(frame, 2, 2, marginHint(), spacingHint());
lstgrp = new KListView(frame);
lstgrp->setFullWidth(true); // Single column, full widget width.
lstgrp->addColumn( i18n("Groups") );
- if ( ro ) lstgrp->setSelectionMode( QListView::NoSelection );
-// QString whatstr = i18n("Select the groups that this user belongs to.");
- QWhatsThis::add(lstgrp, whatstr);
+ if ( ro ) lstgrp->setSelectionMode( TQListView::NoSelection );
+// TQString whatstr = i18n("Select the groups that this user belongs to.");
+ TQWhatsThis::add(lstgrp, whatstr);
layout->addMultiCellWidget(lstgrp, 0, 0, 0, 1);
- leprigr = new QLabel( i18n("Primary group: "), frame );
+ leprigr = new TQLabel( i18n("Primary group: "), frame );
layout->addWidget( leprigr, 1, 0 );
if ( !ro ) {
- pbprigr = new QPushButton( i18n("Set as Primary"), frame );
+ pbprigr = new TQPushButton( i18n("Set as Primary"), frame );
layout->addWidget( pbprigr, 1, 1 );
- connect( pbprigr, SIGNAL(clicked()), this, SLOT(setpgroup()) );
+ connect( pbprigr, TQT_SIGNAL(clicked()), this, TQT_SLOT(setpgroup()) );
}
- connect( lstgrp, SIGNAL(clicked(QListViewItem *)), this, SLOT(gchanged()) );
+ connect( lstgrp, TQT_SIGNAL(clicked(TQListViewItem *)), this, TQT_SLOT(gchanged()) );
}
}
-propdlg::propdlg( const QPtrList<KU::KUser> &users,
- QWidget *parent, const char *name ) :
+propdlg::propdlg( const TQPtrList<KU::KUser> &users,
+ TQWidget *parent, const char *name ) :
KDialogBase(Tabbed, i18n("User Properties"), Ok | Cancel, Ok, parent, name, true)
{
@@ -355,7 +355,7 @@ propdlg::propdlg( const QPtrList<KU::KUser> &users,
}
propdlg::propdlg( KU::KUser *AUser, bool fixedprivgroup,
- QWidget *parent, const char *name ) :
+ TQWidget *parent, const char *name ) :
KDialogBase(Tabbed, i18n("User Properties"), Ok | Cancel, Ok, parent, name, true)
{
@@ -373,7 +373,7 @@ propdlg::~propdlg()
void propdlg::cbposixChanged()
{
- bool posix = !( cbposix->state() == QButton::On );
+ bool posix = !( cbposix->state() == TQButton::On );
leid->setEnabled( posix & ( mUsers.getFirst() == mUsers.getLast() ) );
leshell->setEnabled( posix );
lehome->setEnabled( posix );
@@ -387,7 +387,7 @@ void propdlg::cbposixChanged()
void propdlg::cbsambaChanged()
{
- bool samba = !( cbsamba->state() == QButton::On );
+ bool samba = !( cbsamba->state() == TQButton::On );
lerid->setEnabled( samba & ( mUsers.getFirst() == mUsers.getLast() ) );
leliscript->setEnabled( samba );
leprofile->setEnabled( samba );
@@ -398,7 +398,7 @@ void propdlg::cbsambaChanged()
ledomsid->setEnabled( samba );
}
-void propdlg::setLE( KLineEdit *le, const QString &val, bool first )
+void propdlg::setLE( KLineEdit *le, const TQString &val, bool first )
{
if ( first ) {
le->setText( val );
@@ -415,7 +415,7 @@ void propdlg::setLE( KLineEdit *le, const QString &val, bool first )
}
}
-void propdlg::setCB( QCheckBox *cb, bool val, bool first )
+void propdlg::setCB( TQCheckBox *cb, bool val, bool first )
{
if ( first ) {
cb->setChecked( val );
@@ -455,7 +455,7 @@ void propdlg::selectuser()
oldrid = user->getSID().getRID();
oldshell = user->getShell();
lstchg = user->getLastChange();
- QDateTime datetime;
+ TQDateTime datetime;
datetime.setTime_t( lstchg );
if ( kug->getUsers().getCaps() & KU::KUsers::Cap_Shadow ||
kug->getUsers().getCaps() & KU::KUsers::Cap_Samba ||
@@ -466,10 +466,10 @@ void propdlg::selectuser()
if ( one ) {
lbuser->setText( user->getName() );
- leid->setText( QString::number( user->getUID() ) );
+ leid->setText( TQString::number( user->getUID() ) );
if ( ro ) leid->setReadOnly( true );
if ( kug->getUsers().getCaps() & KU::KUsers::Cap_Samba ) {
- lerid->setText( QString::number( user->getSID().getRID() ) );
+ lerid->setText( TQString::number( user->getSID().getRID() ) );
if ( ro ) lerid->setReadOnly( true );
}
} else {
@@ -483,12 +483,12 @@ void propdlg::selectuser()
while ( user ) {
setLE( lefname, user->getFullName(), first );
- QString home;
+ TQString home;
home = user->getHomeDir();
if ( !one ) home.replace( user->getName(), "%U" );
setLE( lehome, home, first );
- QString shell = user->getShell();
+ TQString shell = user->getShell();
if ( first ) {
if ( !shell.isEmpty() ) {
bool tested = false;
@@ -521,7 +521,7 @@ void propdlg::selectuser()
if ( kug->getUsers().getCaps() & KU::KUsers::Cap_Samba ) {
setLE( leliscript, user->getLoginScript(), first );
- QString profile;
+ TQString profile;
profile = user->getProfilePath();
if ( !one ) profile.replace( user->getName(), "%U" );
setLE( leprofile, profile, first );
@@ -544,7 +544,7 @@ void propdlg::selectuser()
lstchg = 0;
}
- QDateTime expire;
+ TQDateTime expire;
expire.setTime_t( user->getExpire() );
kdDebug() << "expiration: " << user->getExpire() << endl;
setCB( cbexpire, (int) expire.toTime_t() == -1, first );
@@ -594,8 +594,8 @@ void propdlg::loadgroups( bool fixedprivgroup )
KU::KGroup *group = kug->getGroups().first();
while ( group ) {
- QString groupName = group->getName();
- QCheckListItem *item = new QCheckListItem(lstgrp, groupName, QCheckListItem::CheckBox);
+ TQString groupName = group->getName();
+ TQCheckListItem *item = new TQCheckListItem(lstgrp, groupName, TQCheckListItem::CheckBox);
KU::KUser *user = mUsers.first();
while ( user ) {
bool prigr =
@@ -618,7 +618,7 @@ void propdlg::loadgroups( bool fixedprivgroup )
else
if ( item->isOn() != on ) {
item->setTristate( true );
- item->setState( QCheckListItem::NoChange );
+ item->setState( TQCheckListItem::NoChange );
}
user = mUsers.next();
}
@@ -629,7 +629,7 @@ void propdlg::loadgroups( bool fixedprivgroup )
KU::KUser *user = mUsers.first();
kdDebug() << "privgroup: " << user->getName() << endl;
if ( !wasprivgr ) {
- QCheckListItem *item = new QCheckListItem(lstgrp, user->getName(), QCheckListItem::CheckBox);
+ TQCheckListItem *item = new TQCheckListItem(lstgrp, user->getName(), TQCheckListItem::CheckBox);
item->setOn(true);
item->setEnabled(false);
primaryGroup = user->getName();
@@ -641,19 +641,19 @@ void propdlg::loadgroups( bool fixedprivgroup )
void propdlg::setpgroup()
{
isgchanged = true;
- QCheckListItem *item;
- item = (QCheckListItem *) lstgrp->selectedItem();
+ TQCheckListItem *item;
+ item = (TQCheckListItem *) lstgrp->selectedItem();
if ( item == 0 || item->text() == primaryGroup )
return;
bool prevPrimaryGroupWasOn = primaryGroupWasOn;
- primaryGroup = ((QCheckListItem *) lstgrp->selectedItem())->text();
+ primaryGroup = ((TQCheckListItem *) lstgrp->selectedItem())->text();
- item = (QCheckListItem *) lstgrp->firstChild();
+ item = (TQCheckListItem *) lstgrp->firstChild();
while(item)
{
- QString groupName = item->text();
+ TQString groupName = item->text();
if ( !item->isEnabled() )
{
item->setEnabled(true);
@@ -668,14 +668,14 @@ void propdlg::setpgroup()
item->repaint();
}
- item = (QCheckListItem *) item->nextSibling();
+ item = (TQCheckListItem *) item->nextSibling();
}
leprigr->setText( i18n("Primary group: ") + primaryGroup );
}
void propdlg::changed()
{
- QWidget *widget = (QWidget*) sender();
+ TQWidget *widget = (TQWidget*) sender();
if ( mNoChanges.contains( widget ) ) mNoChanges[ widget ]->setChecked( false );
ischanged = true;
kdDebug() << "changed" << endl;
@@ -686,30 +686,30 @@ void propdlg::gchanged()
isgchanged = true;
}
-QString propdlg::mergeLE( KLineEdit *le, const QString &val, bool one )
+TQString propdlg::mergeLE( KLineEdit *le, const TQString &val, bool one )
{
- QCheckBox *cb = 0;
+ TQCheckBox *cb = 0;
if ( mNoChanges.contains( le ) ) cb = mNoChanges[ le ];
return ( one || ( cb && !cb->isChecked() ) ) ? le->text() : val;
}
int propdlg::mergeSB( KIntSpinBox *sb, int val, bool one )
{
- QCheckBox *cb = 0;
+ TQCheckBox *cb = 0;
if ( mNoChanges.contains( sb ) ) cb = mNoChanges[ sb ];
return ( one || ( cb && !cb->isChecked() ) ) ? sb->value() : val;
}
void propdlg::mergeUser( KU::KUser *user, KU::KUser *newuser )
{
- QDateTime epoch ;
+ TQDateTime epoch ;
epoch.setTime_t(0);
bool one = ( mUsers.getFirst() == mUsers.getLast() );
bool posix, samba = false;
newuser->copy( user );
- if ( kug->getUsers().getCaps() & KU::KUsers::Cap_Disable_POSIX && cbposix->state() != QButton::NoChange ) {
+ if ( kug->getUsers().getCaps() & KU::KUsers::Cap_Disable_POSIX && cbposix->state() != TQButton::NoChange ) {
if ( cbposix->isChecked() )
newuser->setCaps( newuser->getCaps() & ~KU::KUser::Cap_POSIX );
else
@@ -727,7 +727,7 @@ void propdlg::mergeUser( KU::KUser *user, KU::KUser *newuser )
}
newuser->setFullName( mergeLE( lefname, user->getFullName(), one ) );
if ( kug->getUsers().getCaps() & KU::KUsers::Cap_Samba ) {
- if ( cbsamba->state() != QButton::NoChange ) {
+ if ( cbsamba->state() != TQButton::NoChange ) {
if ( cbsamba->isChecked() )
newuser->setCaps( newuser->getCaps() & ~KU::KUser::Cap_Samba );
else
@@ -743,17 +743,17 @@ void propdlg::mergeUser( KU::KUser *user, KU::KUser *newuser )
}
newuser->setSID( sid );
newuser->setLoginScript( samba ?
- mergeLE( leliscript, user->getLoginScript(), one ) : QString::null );
+ mergeLE( leliscript, user->getLoginScript(), one ) : TQString::null );
newuser->setProfilePath( samba ?
- mergeLE( leprofile, user->getProfilePath(), one ).replace( "%U", newuser->getName() ) : QString::null );
+ mergeLE( leprofile, user->getProfilePath(), one ).replace( "%U", newuser->getName() ) : TQString::null );
newuser->setHomeDrive( samba ?
- mergeLE( lehomedrive, user->getHomeDrive(), one ) : QString::null );
+ mergeLE( lehomedrive, user->getHomeDrive(), one ) : TQString::null );
newuser->setHomePath( samba ?
- mergeLE( lehomepath, user->getHomePath(), one ).replace( "%U", newuser->getName() ) : QString::null );
+ mergeLE( lehomepath, user->getHomePath(), one ).replace( "%U", newuser->getName() ) : TQString::null );
newuser->setWorkstations( samba ?
- mergeLE( leworkstations, user->getWorkstations(), one ) : QString::null );
+ mergeLE( leworkstations, user->getWorkstations(), one ) : TQString::null );
newuser->setDomain( samba ?
- mergeLE( ledomain, user->getDomain(), one ) : QString::null );
+ mergeLE( ledomain, user->getDomain(), one ) : TQString::null );
}
if ( kug->getUsers().getCaps() & KU::KUsers::Cap_BSD ) {
@@ -769,7 +769,7 @@ void propdlg::mergeUser( KU::KUser *user, KU::KUser *newuser )
newuser->setHomeDir( posix ?
mergeLE( lehome, user->getHomeDir(), one ).replace( "%U", newuser->getName() ) :
- QString::null );
+ TQString::null );
if ( posix ) {
if ( leshell->currentItem() == 0 && ismoreshells ) {
newuser->setShell( user->getShell() );
@@ -777,15 +777,15 @@ void propdlg::mergeUser( KU::KUser *user, KU::KUser *newuser )
( leshell->currentItem() == 0 && !ismoreshells ) ||
( leshell->currentItem() == 1 && ismoreshells ) ) {
- newuser->setShell( QString::null );
+ newuser->setShell( TQString::null );
} else {
// TODO: Check shell.
newuser->setShell( leshell->currentText() );
}
} else
- newuser->setShell( QString::null );
+ newuser->setShell( TQString::null );
- newuser->setDisabled( (cbdisabled->state() == QButton::NoChange) ? user->getDisabled() : cbdisabled->isChecked() );
+ newuser->setDisabled( (cbdisabled->state() == TQButton::NoChange) ? user->getDisabled() : cbdisabled->isChecked() );
if ( kug->getUsers().getCaps() & KU::KUsers::Cap_InetOrg ) {
newuser->setSurname( mergeLE( lesurname, user->getSurname(), one ) );
@@ -804,13 +804,13 @@ void propdlg::mergeUser( KU::KUser *user, KU::KUser *newuser )
( (kug->getUsers().getCaps() & KU::KUsers::Cap_BSD) && posix ) ) {
switch ( cbexpire->state() ) {
- case QButton::NoChange:
+ case TQButton::NoChange:
newuser->setExpire( user->getExpire() );
break;
- case QButton::On:
+ case TQButton::On:
newuser->setExpire( -1 );
break;
- case QButton::Off:
+ case TQButton::Off:
newuser->setExpire( !one && lesexpire->dateTime().toTime_t() == 0 ?
user->getExpire() : lesexpire->dateTime().toTime_t() );
break;
@@ -834,14 +834,14 @@ bool propdlg::saveg()
{
if ( !isgchanged ) return true;
- QCheckListItem *item = (QCheckListItem *) lstgrp->firstChild();
+ TQCheckListItem *item = (TQCheckListItem *) lstgrp->firstChild();
KU::KGroup *group;
while(item)
{
kdDebug() << "saveg: group name: " << item->text() << endl;
group = kug->getGroups().lookup(item->text());
- if ( group && item->state() != QCheckListItem::NoChange ) {
+ if ( group && item->state() != TQCheckListItem::NoChange ) {
KU::KGroup newgroup( group );
bool mod = false;
@@ -860,16 +860,16 @@ bool propdlg::saveg()
if ( mod ) kug->getGroups().mod( group, newgroup );
}
- item = (QCheckListItem *) item->nextSibling();
+ item = (TQCheckListItem *) item->nextSibling();
}
return true;
}
-bool propdlg::checkShell(const QString &shell)
+bool propdlg::checkShell(const TQString &shell)
{
if (shell.isEmpty())
return true;
- QStringList shells = readShells();
+ TQStringList shells = readShells();
return shells.contains(shell);
}
@@ -909,11 +909,11 @@ void propdlg::setpwd()
{
pwddlg pd( this );
- if ( pd.exec() == QDialog::Accepted ) {
+ if ( pd.exec() == TQDialog::Accepted ) {
ischanged = true;
newpass = pd.getPassword();
lstchg = now();
- QDateTime datetime;
+ TQDateTime datetime;
datetime.setTime_t( lstchg );
if ( kug->getUsers().getCaps() & KU::KUsers::Cap_Shadow ||
kug->getUsers().getCaps() & KU::KUsers::Cap_Samba ||
@@ -957,7 +957,7 @@ void propdlg::slotOk()
}
}
- QString newshell;
+ TQString newshell;
if (leshell->currentItem() != 0)
newshell = leshell->currentText();
@@ -968,7 +968,7 @@ void propdlg::slotOk()
i18n("<p>The shell %1 is not yet listed in the file %2. "
"In order to use this shell you must add it to "
"this file first."
- "<p>Do you want to add it now?").arg(newshell).arg(QFile::decodeName(SHELL_FILE)),
+ "<p>Do you want to add it now?").arg(newshell).arg(TQFile::decodeName(SHELL_FILE)),
i18n("Unlisted Shell"),
i18n("&Add Shell"),
i18n("Do &Not Add"));
diff --git a/kuser/propdlg.h b/kuser/propdlg.h
index 2832574..a1dc85d 100644
--- a/kuser/propdlg.h
+++ b/kuser/propdlg.h
@@ -21,14 +21,14 @@
#ifndef _KU_PROPDLG_H_
#define _KU_PROPDLG_H_
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qwidget.h>
-#include <qlistbox.h>
-#include <qtooltip.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qmap.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqwidget.h>
+#include <tqlistbox.h>
+#include <tqtooltip.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqmap.h>
#include <klineedit.h>
#include <kdatetimewidget.h>
@@ -44,10 +44,10 @@ class propdlg : public KDialogBase
Q_OBJECT
public:
- propdlg( const QPtrList<KU::KUser> &users,
- QWidget *parent = 0, const char *name = 0 );
+ propdlg( const TQPtrList<KU::KUser> &users,
+ TQWidget *parent = 0, const char *name = 0 );
propdlg( KU::KUser *AUser, bool fixedprivgroup,
- QWidget *parent = 0, const char *name = 0 );
+ TQWidget *parent = 0, const char *name = 0 );
~propdlg();
void mergeUser( KU::KUser *user, KU::KUser *newuser );
@@ -68,43 +68,43 @@ protected:
bool saveg();
bool check();
void loadgroups( bool fixedprivgroup );
- bool checkShell(const QString &shell);
- void addRow( QWidget *parent, QGridLayout *layout, int row,
- QWidget *widget, const QString &label, const QString &what,
+ bool checkShell(const TQString &shell);
+ void addRow( TQWidget *parent, TQGridLayout *layout, int row,
+ TQWidget *widget, const TQString &label, const TQString &what,
bool two_column=true, bool nochange=true );
- void setLE( KLineEdit *le, const QString &val, bool first );
- void setCB( QCheckBox *cb, bool val, bool first );
+ void setLE( KLineEdit *le, const TQString &val, bool first );
+ void setCB( TQCheckBox *cb, bool val, bool first );
void setSB( KIntSpinBox *sb, int val, bool first );
- QString mergeLE( KLineEdit *le, const QString &val, bool one );
+ TQString mergeLE( KLineEdit *le, const TQString &val, bool one );
int mergeSB( KIntSpinBox *sb, int val, bool one );
- KIntSpinBox *addDaysGroup( QWidget *parent, QGridLayout *layout, int row,
- const QString &title, bool never=true );
+ KIntSpinBox *addDaysGroup( TQWidget *parent, TQGridLayout *layout, int row,
+ const TQString &title, bool never=true );
- QFrame *frontpage;
- QGridLayout *frontlayout;
+ TQFrame *frontpage;
+ TQGridLayout *frontlayout;
int frontrow;
- QPtrList<KU::KUser> mUsers;
- QMap<QWidget*, QCheckBox*> mNoChanges;
+ TQPtrList<KU::KUser> mUsers;
+ TQMap<TQWidget*, TQCheckBox*> mNoChanges;
bool ismoreshells;
bool ischanged;
bool isgchanged;
uid_t olduid;
uint oldrid;
- QString oldshell;
- QString primaryGroup;
+ TQString oldshell;
+ TQString primaryGroup;
bool primaryGroupWasOn;
bool ro;
- QString newpass;
+ TQString newpass;
time_t lstchg;
KListView *lstgrp;
- QPushButton *pbsetpwd;
+ TQPushButton *pbsetpwd;
- QLabel *lbuser;
+ TQLabel *lbuser;
KLineEdit *leid;
KLineEdit *lefname;
KLineEdit *lesurname;
@@ -122,19 +122,19 @@ protected:
KLineEdit *leoffice2;
KLineEdit *leaddress;
- QCheckBox *cbdisabled;
- QCheckBox *cbposix;
- QCheckBox *cbsamba;
- QLabel *leprigr;
- QPushButton *pbprigr;
+ TQCheckBox *cbdisabled;
+ TQCheckBox *cbposix;
+ TQCheckBox *cbsamba;
+ TQLabel *leprigr;
+ TQPushButton *pbprigr;
- QLabel *leslstchg;
+ TQLabel *leslstchg;
KIntSpinBox *lesmin;
KIntSpinBox *lesmax;
KIntSpinBox *leswarn;
KIntSpinBox *lesinact;
KDateTimeWidget *lesexpire;
- QCheckBox *cbexpire;
+ TQCheckBox *cbexpire;
//samba specific:
KLineEdit *lerid;
diff --git a/kuser/pwddlg.cpp b/kuser/pwddlg.cpp
index 3c8f9cd..a6f531e 100644
--- a/kuser/pwddlg.cpp
+++ b/kuser/pwddlg.cpp
@@ -18,19 +18,19 @@
* Boston, MA 02110-1301, USA.
**/
-#include <qgrid.h>
+#include <tqgrid.h>
#include <kmessagebox.h>
#include "pwddlg.h"
#include "misc.h"
-pwddlg::pwddlg( QWidget* parent, const char* name )
+pwddlg::pwddlg( TQWidget* parent, const char* name )
: KDialogBase(parent, name, true, i18n("Enter Password"), Ok | Cancel, Ok, true)
{
- QGrid *page = makeGridMainWidget(2, QGrid::Horizontal);
+ TQGrid *page = makeGridMainWidget(2, TQGrid::Horizontal);
- QLabel* lb1 = new QLabel(page, "lb1");
+ TQLabel* lb1 = new TQLabel(page, "lb1");
lb1->setText(i18n("Password:"));
lb1->setMinimumSize(lb1->sizeHint());
lb1->setAlignment(AlignRight|AlignVCenter);
@@ -46,7 +46,7 @@ pwddlg::pwddlg( QWidget* parent, const char* name )
lepw1->setFocus();
lepw1->setEchoMode(KLineEdit::Password);
- QLabel* lb2 = new QLabel(page, "lb2");
+ TQLabel* lb2 = new TQLabel(page, "lb2");
lb2->setText(i18n("Verify:"));
lb2->setMinimumSize(lb2->sizeHint());
lb2->setAlignment(AlignRight|AlignVCenter);
@@ -80,7 +80,7 @@ void pwddlg::slotOk()
}
}
-QString pwddlg::getPassword() const
+TQString pwddlg::getPassword() const
{
return lepw1->text();
}
diff --git a/kuser/pwddlg.h b/kuser/pwddlg.h
index 485a806..4f90392 100644
--- a/kuser/pwddlg.h
+++ b/kuser/pwddlg.h
@@ -21,7 +21,7 @@
#ifndef _KU_PWDDLG_H_
#define _KU_PWDDLG_H_
-#include <qstring.h>
+#include <tqstring.h>
#include <klineedit.h>
#include <kdialogbase.h>
@@ -29,10 +29,10 @@ class pwddlg : public KDialogBase {
Q_OBJECT
public:
- pwddlg( QWidget* parent = NULL, const char* name = NULL );
+ pwddlg( TQWidget* parent = NULL, const char* name = NULL );
~pwddlg();
- QString getPassword() const;
+ TQString getPassword() const;
protected slots:
void slotOk();
diff --git a/kuser/selectconn.cpp b/kuser/selectconn.cpp
index f5a6385..138c9ce 100644
--- a/kuser/selectconn.cpp
+++ b/kuser/selectconn.cpp
@@ -16,12 +16,12 @@
* Boston, MA 02110-1301, USA.
**/
-#include <qpixmap.h>
-#include <qlayout.h>
+#include <tqpixmap.h>
+#include <tqlayout.h>
-#include <qlabel.h>
-#include <qgrid.h>
-#include <qregexp.h>
+#include <tqlabel.h>
+#include <tqgrid.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <kapplication.h>
@@ -33,29 +33,29 @@
#include "selectconn.h"
#include "editDefaults.h"
-SelectConn::SelectConn(const QString &selected, QWidget* parent, const char * name) :
+SelectConn::SelectConn(const TQString &selected, TQWidget* parent, const char * name) :
KDialogBase( Plain, WStyle_DialogBorder, parent, name, true,
i18n("Connection Selection"), Ok | Apply | Cancel | User1 | User2 | User3 )
{
- QStringList conns;
+ TQStringList conns;
setButtonText( User3, i18n("&New...") );
setButtonText( User2, i18n("&Edit") );
setButtonText( User1, i18n("&Delete") );
- QFrame *page = plainPage();
- QVBoxLayout *topLayout = new QVBoxLayout( page, 0, KDialog::spacingHint() );
- QLabel *label = new QLabel( i18n("Defined connections:"), page );
+ TQFrame *page = plainPage();
+ TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, KDialog::spacingHint() );
+ TQLabel *label = new TQLabel( i18n("Defined connections:"), page );
mCombo = new KComboBox( page );
mSelected = selected;
kdDebug() << "selected item: " << mSelected << endl;
conns = kapp->sharedConfig()->groupList();
- QStringList::iterator it = conns.begin();
+ TQStringList::iterator it = conns.begin();
int i = 0, sel = 0;
while ( it != conns.end() ) {
if ( (*it).startsWith( "connection-" ) ) {
- (*it).remove( QRegExp("^connection-") );
+ (*it).remove( TQRegExp("^connection-") );
if ( (*it) == mSelected ) sel = i;
i++;
it++;
@@ -70,14 +70,14 @@ SelectConn::SelectConn(const QString &selected, QWidget* parent, const char * na
topLayout->addWidget( mCombo );
}
-QString SelectConn::connSelected()
+TQString SelectConn::connSelected()
{
return mCombo->currentText();
}
void SelectConn::slotUser3()
{
- newconn = KInputDialog::getText( QString::null,
+ newconn = KInputDialog::getText( TQString::null,
i18n("Please type the name of the new connection:") );
if ( newconn.isEmpty() ) return;
if ( kapp->sharedConfig()->groupList().contains( "connection-" + newconn ) ) {
@@ -88,7 +88,7 @@ void SelectConn::slotUser3()
KUserPrefsBase kcfg( kapp->sharedConfig(), newconn );
editDefaults eddlg( &kcfg, this );
- connect(&eddlg, SIGNAL(settingsChanged()), this, SLOT(slotNewApplySettings()));
+ connect(&eddlg, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT(slotNewApplySettings()));
eddlg.exec();
if ( newconn.isEmpty() )
@@ -111,14 +111,14 @@ void SelectConn::slotUser2()
kcfg.readConfig();
editDefaults eddlg( &kcfg, this );
- connect( &eddlg, SIGNAL(settingsChanged()), this, SLOT(slotApplySettings()) );
+ connect( &eddlg, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT(slotApplySettings()) );
eddlg.exec();
}
void SelectConn::slotUser1()
{
- QString conn = connSelected();
+ TQString conn = connSelected();
if ( KMessageBox::warningContinueCancel( 0, i18n("Do you really want to delete the connection '%1'?").
arg( conn ),i18n("Delete Connection"),KStdGuiItem::del() ) == KMessageBox::Cancel ) return;
diff --git a/kuser/selectconn.h b/kuser/selectconn.h
index 674e148..d201a39 100644
--- a/kuser/selectconn.h
+++ b/kuser/selectconn.h
@@ -25,8 +25,8 @@
class SelectConn : public KDialogBase {
Q_OBJECT
public:
- SelectConn( const QString &selected, QWidget* parent, const char * name);
- QString connSelected();
+ SelectConn( const TQString &selected, TQWidget* parent, const char * name);
+ TQString connSelected();
protected slots:
void slotUser1();
void slotUser2();
@@ -37,7 +37,7 @@ protected slots:
protected:
KComboBox *mCombo;
- QString conn, newconn, mSelected;
+ TQString conn, newconn, mSelected;
};
#endif // _KU_SELECTCONN_H_
diff --git a/kuser/sha1.h b/kuser/sha1.h
index d6b62ad..8fa2d66 100644
--- a/kuser/sha1.h
+++ b/kuser/sha1.h
@@ -21,7 +21,7 @@
#ifndef _SHA1_H_
#define _SHA1_H_
-#include <qglobal.h>
+#include <tqglobal.h>
struct sha1_ctx {
Q_UINT64 count;
diff --git a/kuser/sid.cpp b/kuser/sid.cpp
index e1080c6..01cdf0e 100644
--- a/kuser/sid.cpp
+++ b/kuser/sid.cpp
@@ -30,7 +30,7 @@ uint SID::mAlgRidBase = 1000;
SID::SID()
{
- mRid = 0; mSid = QString::null; mDom = QString::null;
+ mRid = 0; mSid = TQString::null; mDom = TQString::null;
}
SID::SID( const SID &sid )
@@ -38,7 +38,7 @@ SID::SID( const SID &sid )
setSID( sid.getSID() );
}
-SID::SID( const QString &sid )
+SID::SID( const TQString &sid )
{
setSID( sid );
}
@@ -74,13 +74,13 @@ bool SID::isEmpty() const
void SID::updateSID()
{
- mSid = mDom + QString::fromLatin1("-") + QString::number( mRid );
+ mSid = mDom + TQString::fromLatin1("-") + TQString::number( mRid );
}
-void SID::setSID( const QString &sid )
+void SID::setSID( const TQString &sid )
{
int pos;
- QString rid;
+ TQString rid;
mSid = sid;
pos = sid.findRev( '-' );
@@ -89,7 +89,7 @@ void SID::setSID( const QString &sid )
mRid = rid.toUInt();
}
-void SID::setRID( const QString &rid )
+void SID::setRID( const TQString &rid )
{
mRid = rid.toUInt();
updateSID();
@@ -101,13 +101,13 @@ void SID::setRID( uint rid )
updateSID();
}
-void SID::setDOM( const QString &dom )
+void SID::setDOM( const TQString &dom )
{
mDom = dom;
updateSID();
}
-const QString& SID::getSID() const
+const TQString& SID::getSID() const
{
return mSid;
}
@@ -117,7 +117,7 @@ uint SID::getRID() const
return mRid;
}
-const QString& SID::getDOM() const
+const TQString& SID::getDOM() const
{
return mDom;
}
diff --git a/kuser/sid.h b/kuser/sid.h
index e856b77..f8f8e0c 100644
--- a/kuser/sid.h
+++ b/kuser/sid.h
@@ -19,26 +19,26 @@
#ifndef _SID_H_
#define _SID_H_
-#include <qstring.h>
+#include <tqstring.h>
class SID {
public:
SID();
- SID( const QString &sid );
+ SID( const TQString &sid );
SID( const SID &sid );
~SID();
bool operator== ( const SID &sid ) const;
bool operator!= ( const SID &sid ) const;
bool isEmpty() const;
- void setSID( const QString &sid );
- void setRID( const QString &rid );
+ void setSID( const TQString &sid );
+ void setRID( const TQString &rid );
void setRID( uint rid );
- void setDOM( const QString &dom );
- const QString &getSID() const;
+ void setDOM( const TQString &dom );
+ const TQString &getSID() const;
uint getRID() const ;
- const QString &getDOM() const;
+ const TQString &getDOM() const;
static uint uid2rid( uint uid );
static uint gid2rid( uint gid );
@@ -46,7 +46,7 @@ public:
static uint getAlgRidBase() { return mAlgRidBase; };
private:
void updateSID();
- QString mSid, mDom;
+ TQString mSid, mDom;
uint mRid;
static uint mAlgRidBase;
};