diff options
Diffstat (limited to 'kuser')
43 files changed, 533 insertions, 520 deletions
diff --git a/kuser/addUser.cpp b/kuser/addUser.cpp index 347c46f..ffb7b21 100644 --- a/kuser/addUser.cpp +++ b/kuser/addUser.cpp @@ -38,8 +38,8 @@ #include <kmessagebox.h> addUser::addUser( KU::KUser *AUser, bool useprivategroup, - TQWidget *parent, const char *name ) : - propdlg( AUser, useprivategroup, parent, name ) + TQWidget *tqparent, const char *name ) : + propdlg( AUser, useprivategroup, tqparent, name ) { TQGroupBox *group = new TQGroupBox(frontpage); group->setTitle(i18n("New Account Options")); @@ -50,7 +50,7 @@ addUser::addUser( KU::KUser *AUser, bool useprivategroup, createhome->setChecked(true); 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); + fronttqlayout->addMultiCellWidget(group, frontrow, frontrow, 0, 2); if ( useprivategroup ) pbprigr->setEnabled( false ); } @@ -65,14 +65,14 @@ void addUser::slotOk() if ( ( user->getCaps() & KU::KUser::Cap_POSIX ) && kug->getUsers().lookup( user->getUID() ) ) { - KMessageBox::sorry( 0, i18n("User with UID %1 already exists.").arg( user->getUID() ) ); + KMessageBox::sorry( 0, i18n("User with UID %1 already exists.").tqarg( user->getUID() ) ); return; } if ( ( kug->getUsers().getCaps() & KU::KUsers::Cap_Samba ) && ( user->getCaps() & KU::KUser::Cap_Samba ) ) { if ( kug->getUsers().lookup_sam( user->getSID().getRID() ) ) { - KMessageBox::sorry( 0, i18n("User with RID %1 already exists.").arg( user->getSID().getRID() ) ); + KMessageBox::sorry( 0, i18n("User with RID %1 already exists.").tqarg( user->getSID().getRID() ) ); return; } } @@ -115,15 +115,15 @@ 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), TQString::null, KStdGuiItem::cont() ) == KMessageBox::Cancel ) + tqarg(h_dir).tqarg(user->getName()).tqarg(h_dir), TQString(), KStdGuiItem::cont() ) == KMessageBox::Cancel ) return false; else return true; } else - KMessageBox::error( 0, i18n("%1 is not a folder.").arg(h_dir) ); + KMessageBox::error( 0, i18n("%1 is not a folder.").tqarg(h_dir) ); } else - KMessageBox::error( 0, i18n("stat() failed on %1.").arg(h_dir) ); + KMessageBox::error( 0, i18n("stat() failed on %1.").tqarg(h_dir) ); return false; } @@ -145,13 +145,13 @@ bool addUser::checkMailBox() if (r == 0) if (S_ISREG(s.st_mode)) KMessageBox::error( 0, i18n("Mailbox %1 already exists (uid=%2).") - .arg(mailboxpath) - .arg(s.st_uid) ); + .tqarg(mailboxpath) + .tqarg(s.st_uid) ); else KMessageBox::error( 0, i18n("%1 exists but is not a regular file.") - .arg(mailboxpath) ); + .tqarg(mailboxpath) ); else - KMessageBox::error( 0, i18n("stat() failed on %1.").arg(mailboxpath) ); + KMessageBox::error( 0, i18n("stat() failed on %1.").tqarg(mailboxpath) ); return false; } diff --git a/kuser/addUser.h b/kuser/addUser.h index 0f16c95..a791f90 100644 --- a/kuser/addUser.h +++ b/kuser/addUser.h @@ -26,9 +26,10 @@ class addUser: public propdlg { Q_OBJECT + TQ_OBJECT public: addUser(KU::KUser *AUser, bool useprivategroup, - TQWidget *parent = 0, const char *name = 0 ); + TQWidget *tqparent = 0, const char *name = 0 ); void setCreateHomeDir(bool b) { createhome->setChecked(b); } diff --git a/kuser/delUser.cpp b/kuser/delUser.cpp index b1ee7e0..e78f1dd 100644 --- a/kuser/delUser.cpp +++ b/kuser/delUser.cpp @@ -24,17 +24,17 @@ #include <klocale.h> -delUser::delUser(KU::KUser *AUser, TQWidget *parent, const char *name) - : KDialogBase( parent, name, true, i18n("Delete User"), +delUser::delUser(KU::KUser *AUser, TQWidget *tqparent, const char *name) + : KDialogBase( tqparent, name, true, i18n("Delete User"), KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true ) { TQVBox *page = makeVBoxMainWidget(); new TQLabel( i18n("<p>Deleting user <b>%1</b>" - "<p>Also perform the following actions:").arg(AUser->getName()), + "<p>Also perform the following actions:").tqarg(AUser->getName()), page); - m_deleteHomeDir = new TQCheckBox(i18n("Delete &home folder: %1").arg(AUser->getHomeDir()), page); + m_deleteHomeDir = new TQCheckBox(i18n("Delete &home folder: %1").tqarg(AUser->getHomeDir()), page); TQString mailboxpath = TQFile::decodeName(MAIL_SPOOL_DIR) + "/" + AUser->getName(); - m_deleteMailBox = new TQCheckBox(i18n("Delete &mailbox: %1").arg(mailboxpath), page); + m_deleteMailBox = new TQCheckBox(i18n("Delete &mailbox: %1").tqarg(mailboxpath), page); setButtonGuiItem(KDialogBase::Ok, KStdGuiItem::del()); } diff --git a/kuser/delUser.h b/kuser/delUser.h index 1e4bc21..0f844f6 100644 --- a/kuser/delUser.h +++ b/kuser/delUser.h @@ -27,8 +27,9 @@ class delUser: public KDialogBase { Q_OBJECT + TQ_OBJECT public: - delUser(KU::KUser *AUser, TQWidget *parent = 0, const char *name = 0); + delUser(KU::KUser *AUser, TQWidget *tqparent = 0, const char *name = 0); bool getDeleteHomeDir() { return m_deleteHomeDir->isChecked(); } diff --git a/kuser/editDefaults.cpp b/kuser/editDefaults.cpp index 75ca1e7..e5cab29 100644 --- a/kuser/editDefaults.cpp +++ b/kuser/editDefaults.cpp @@ -37,8 +37,8 @@ #include "passwordpolicy.h" #include "misc.h" -editDefaults::editDefaults( KConfigSkeleton *config, TQWidget *parent, const char *name ) : - KConfigDialog( parent, name, config, IconList, +editDefaults::editDefaults( KConfigSkeleton *config, TQWidget *tqparent, const char *name ) : + KConfigDialog( tqparent, name, config, IconList, Default|Ok|Apply|Cancel|Help, Ok, true ) { KTabWidget *page1 = new KTabWidget( this ); diff --git a/kuser/editDefaults.h b/kuser/editDefaults.h index c6d40c8..d1b6fce 100644 --- a/kuser/editDefaults.h +++ b/kuser/editDefaults.h @@ -39,8 +39,9 @@ typedef struct SambaDomain { class editDefaults : public KConfigDialog { Q_OBJECT + TQ_OBJECT public: - editDefaults( KConfigSkeleton *config, TQWidget* parent, const char * name = 0 ); + editDefaults( KConfigSkeleton *config, TQWidget* tqparent, const char * name = 0 ); private: KProgressDialog *mProg; LdapSamba *page3c; diff --git a/kuser/editGroup.cpp b/kuser/editGroup.cpp index 2f6a4cf..0298f4b 100644 --- a/kuser/editGroup.cpp +++ b/kuser/editGroup.cpp @@ -35,8 +35,8 @@ #include "editGroup.h" editGroup::editGroup(KU::KGroup *akg, bool samba, bool add, - TQWidget* parent, const char* name) - : KDialogBase(parent, name, true, i18n("Group Properties"), Ok | Cancel, Ok, true) + TQWidget* tqparent, const char* name) + : KDialogBase(tqparent, name, true, i18n("Group Properties"), Ok | Cancel, Ok, true) { kg = akg; mAdd = add; @@ -51,7 +51,7 @@ editGroup::editGroup(KU::KGroup *akg, bool samba, bool add, rid.rid = 514; rid.name = i18n("Domain Guests"); rid.desc = i18n("Guests"); mRids.append( rid ); TQFrame *page = makeMainWidget(); - TQGridLayout *layout = new TQGridLayout( page, 10, 3, marginHint(), spacingHint() ); + TQGridLayout *tqlayout = new TQGridLayout( page, 10, 3, marginHint(), spacingHint() ); TQLabel *lb; lb = new TQLabel( page ); @@ -60,12 +60,12 @@ editGroup::editGroup(KU::KGroup *akg, bool samba, bool add, // ensure it fits at least 20 characters legid->setText( "XXXXXXXXXXXXXXXXXXX" ); legid->setText( TQString::number(kg->getGID()) ); - legid->setValidator( new TQIntValidator(this) ); + legid->setValidator( new TQIntValidator(TQT_TQOBJECT(this)) ); legid->setEnabled( mAdd ); legid->setReadOnly( ro ); lb->setBuddy( legid ); - layout->addWidget( lb, 0, 0 ); - layout->addMultiCellWidget( legid, 0, 0, 1, 2 ); + tqlayout->addWidget( lb, 0, 0 ); + tqlayout->addMultiCellWidget( legid, 0, 0, 1, 2 ); if ( mSamba ) { lb = new TQLabel( page ); @@ -78,12 +78,12 @@ editGroup::editGroup(KU::KGroup *akg, bool samba, bool add, } lerid->setCurrentText( TQString::number( sid.getRID() ) ); - lerid->setValidator (new TQIntValidator(this) ); + lerid->setValidator (new TQIntValidator(TQT_TQOBJECT(this)) ); lerid->setEnabled( mAdd ); 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 ); + tqlayout->addWidget( lb, 1, 0 ); + tqlayout->addMultiCellWidget( lerid, 1, 1, 1, 2 ); } lb = new TQLabel( page ); @@ -96,8 +96,8 @@ editGroup::editGroup(KU::KGroup *akg, bool samba, bool add, legrpname->setReadOnly( ro ); legrpname->setFocus(); lb->setBuddy( legrpname ); - layout->addWidget( lb, 2, 0 ); - layout->addMultiCellWidget( legrpname, 2, 2, 1, 2 ); + tqlayout->addWidget( lb, 2, 0 ); + tqlayout->addMultiCellWidget( legrpname, 2, 2, 1, 2 ); if ( mSamba ) { lb = new TQLabel( page ); @@ -106,8 +106,8 @@ editGroup::editGroup(KU::KGroup *akg, bool samba, bool add, ledesc->setText( kg->getDesc() ); ledesc->setReadOnly( ro ); lb->setBuddy( ledesc ); - layout->addWidget( lb, 3, 0 ); - layout->addMultiCellWidget( ledesc, 3, 3, 1, 2 ); + tqlayout->addWidget( lb, 3, 0 ); + tqlayout->addMultiCellWidget( ledesc, 3, 3, 1, 2 ); lb = new TQLabel( page ); lb->setText(i18n("Display name:")); @@ -115,8 +115,8 @@ editGroup::editGroup(KU::KGroup *akg, bool samba, bool add, ledispname->setText( kg->getDisplayName() ); ledispname->setReadOnly( ro ); lb->setBuddy( ledispname ); - layout->addWidget( lb, 4, 0 ); - layout->addMultiCellWidget( ledispname, 4, 4, 1, 2 ); + tqlayout->addWidget( lb, 4, 0 ); + tqlayout->addMultiCellWidget( ledispname, 4, 4, 1, 2 ); lb = new TQLabel( page ); lb->setText(i18n("Type:")); @@ -136,8 +136,8 @@ editGroup::editGroup(KU::KGroup *akg, bool samba, bool add, break; } lb->setBuddy( letype ); - layout->addWidget( lb, 5, 0 ); - layout->addMultiCellWidget( letype, 5, 5, 1, 2 ); + tqlayout->addWidget( lb, 5, 0 ); + tqlayout->addMultiCellWidget( letype, 5, 5, 1, 2 ); lb = new TQLabel( page ); lb->setText(i18n("Domain SID:")); @@ -145,11 +145,11 @@ editGroup::editGroup(KU::KGroup *akg, bool samba, bool add, ledomsid->setText( sid.getDOM() ); ledomsid->setReadOnly( ro ); lb->setBuddy( ledomsid ); - layout->addWidget( lb, 6, 0 ); - layout->addMultiCellWidget( ledomsid, 6, 6, 1, 2 ); + tqlayout->addWidget( lb, 6, 0 ); + tqlayout->addMultiCellWidget( ledomsid, 6, 6, 1, 2 ); cbsamba = new TQCheckBox( i18n("Disable Samba group information"), page ); - layout->addMultiCellWidget( cbsamba, 7, 7, 0, 2 ); + tqlayout->addMultiCellWidget( cbsamba, 7, 7, 0, 2 ); 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)) ); @@ -162,18 +162,18 @@ editGroup::editGroup(KU::KGroup *akg, bool samba, bool add, m_list_in->setFullWidth(true); // Single column, full widget width. m_list_in->addColumn(i18n("Users in Group")); m_list_in->setSelectionMode( TQListView::Extended ); - layout->addWidget( m_list_in, 8, 0 ); + tqlayout->addWidget( m_list_in, 8, 0 ); TQVBox *vbox = new TQVBox(page); TQPushButton *btadd = new TQPushButton(i18n("Add <-"), vbox); TQPushButton *btdel = new TQPushButton(i18n("Remove ->"), vbox); - layout->addWidget( vbox, 8, 1 ); + tqlayout->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(TQListView::Extended); - layout->addWidget( m_list_notin, 8, 2 ); + tqlayout->addWidget( m_list_notin, 8, 2 ); // TQString whatstr = i18n("Select the users that should be in this kg->"); // TQWhatsThis::add(m_list, whatstr); // connect(this,TQT_SIGNAL(okClicked(void)), @@ -274,19 +274,19 @@ void editGroup::slotOk() kug->getGroups().lookup( legrpname->text() ) ) { KMessageBox::sorry( 0, - i18n("Group with name %1 already exists.").arg(legrpname->text()) ); + i18n("Group with name %1 already exists.").tqarg(legrpname->text()) ); return; } if ( mAdd ) { if ( mSamba && !cbsamba->isChecked() && kug->getGroups().lookup_sam( sid ) ) { KMessageBox::sorry( 0, - i18n("Group with SID %1 already exists.").arg( sid.getSID() ) ); + i18n("Group with SID %1 already exists.").tqarg( sid.getSID() ) ); return; } if (kug->getGroups().lookup(s.toInt())) { KMessageBox::sorry( 0, - i18n("Group with gid %1 already exists.").arg(s.toInt()) ); + i18n("Group with gid %1 already exists.").tqarg(s.toInt()) ); return; } } @@ -311,9 +311,9 @@ void editGroup::slotOk() kg->setDisplayName( ledispname->text() ); } else { kg->setCaps( 0 ); - kg->setSID( TQString::null ); - kg->setDesc( TQString::null ); - kg->setDisplayName( TQString::null ); + kg->setSID( TQString() ); + kg->setDesc( TQString() ); + kg->setDisplayName( TQString() ); kg->setType( 0 ); } diff --git a/kuser/editGroup.h b/kuser/editGroup.h index c3e8c76..353a653 100644 --- a/kuser/editGroup.h +++ b/kuser/editGroup.h @@ -33,10 +33,11 @@ class editGroup : public KDialogBase { Q_OBJECT + TQ_OBJECT public: editGroup(KU::KGroup *akg, bool samba, bool add, - TQWidget* parent = NULL, const char* name = NULL); + TQWidget* tqparent = NULL, const char* name = NULL); virtual ~editGroup(); diff --git a/kuser/filessettings.ui b/kuser/filessettings.ui index 078578d..3e88d29 100644 --- a/kuser/filessettings.ui +++ b/kuser/filessettings.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>FilesSettings</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>FilesSettings</cstring> </property> @@ -24,7 +24,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -43,7 +43,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -54,7 +54,7 @@ <cstring>kcfg_groupsrc</cstring> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -75,7 +75,7 @@ <cstring>kcfg_groupsrc</cstring> </property> </widget> - <widget class="QLabel" row="2" column="0" rowspan="1" colspan="2"> + <widget class="TQLabel" row="2" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>textLabel5</cstring> </property> @@ -96,7 +96,7 @@ <cstring>kcfg_gshadowsrc</cstring> </property> </widget> - <widget class="QLabel" row="3" column="0" rowspan="1" colspan="2"> + <widget class="TQLabel" row="3" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>textLabel6</cstring> </property> @@ -107,7 +107,7 @@ <cstring>kcfg_gshadowsrc</cstring> </property> </widget> - <widget class="QCheckBox" row="4" column="0" rowspan="1" colspan="3"> + <widget class="TQCheckBox" row="4" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>kcfg_md5shadow</cstring> </property> @@ -117,7 +117,7 @@ </widget> </grid> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox2</cstring> </property> @@ -136,7 +136,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel3_2</cstring> </property> @@ -147,7 +147,7 @@ <cstring>kcfg_nispasswdsrc</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel4_2</cstring> </property> @@ -158,7 +158,7 @@ <cstring>kcfg_nisgroupsrc</cstring> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel5_2</cstring> </property> @@ -169,7 +169,7 @@ <cstring>kcfg_nisminuid</cstring> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>textLabel6_2</cstring> </property> @@ -212,7 +212,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>40</height> @@ -221,5 +221,5 @@ </spacer> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kuser/generalsettings.ui b/kuser/generalsettings.ui index d486db7..873a347 100644 --- a/kuser/generalsettings.ui +++ b/kuser/generalsettings.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>GeneralSettings</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>GeneralSettings</cstring> </property> @@ -16,15 +16,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout1</cstring> + <cstring>tqlayout1</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -57,9 +57,9 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <grid> <property name="name"> @@ -70,7 +70,7 @@ <cstring>kcfg_homepath</cstring> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -81,7 +81,7 @@ <cstring>kcfg_firstGID</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -92,7 +92,7 @@ <cstring>kcfg_homepath</cstring> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1_3</cstring> </property> @@ -111,7 +111,7 @@ <bool>true</bool> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel1_3_2</cstring> </property> @@ -134,7 +134,7 @@ </widget> </grid> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_createHomeDir</cstring> </property> @@ -142,7 +142,7 @@ <string>Create home folder</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_copySkel</cstring> </property> @@ -153,15 +153,15 @@ <string>Copy skeleton to home folder</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_userPrivateGroup</cstring> </property> @@ -169,7 +169,7 @@ <string>User private groups</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_4</cstring> </property> @@ -180,7 +180,7 @@ <cstring>kcfg_defaultgroup</cstring> </property> </widget> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>kcfg_defaultgroup</cstring> </property> @@ -200,7 +200,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> @@ -233,8 +233,8 @@ <tabstop>kcfg_copySkel</tabstop> <tabstop>kcfg_userPrivateGroup</tabstop> </tabstops> -<slots> +<Q_SLOTS> <slot>kcfg_createHomeDir_toggled( bool )</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kuser/kgroup.cpp b/kuser/kgroup.cpp index 77fcc91..1ea6462 100644 --- a/kuser/kgroup.cpp +++ b/kuser/kgroup.cpp @@ -28,7 +28,7 @@ KU::KGroup::KGroup() { - pwd = TQString::fromLatin1("*"); + pwd = TQString::tqfromLatin1("*"); gid = 0; type = 2; caps = 0; @@ -140,7 +140,7 @@ void KU::KGroup::setDesc(const TQString &data) bool KU::KGroup::lookup_user(const TQString &name) { - return (u.find(name) != u.end()); + return (u.tqfind(name) != u.end()); } bool KU::KGroup::addUser(const TQString &name) diff --git a/kuser/kgroup.h b/kuser/kgroup.h index e3deae0..7f1c528 100644 --- a/kuser/kgroup.h +++ b/kuser/kgroup.h @@ -70,7 +70,7 @@ public: void clear(); protected: - QString + TQString name, pwd; gid_t gid; diff --git a/kuser/kgroupfiles.cpp b/kuser/kgroupfiles.cpp index cd4d2e0..1dacda2 100644 --- a/kuser/kgroupfiles.cpp +++ b/kuser/kgroupfiles.cpp @@ -95,7 +95,7 @@ bool KGroupFiles::reload() rc = stat(TQFile::encodeName(filename), &st); if(rc != 0) { KMessageBox::error( 0, i18n("stat call on file %1 failed: %2\nCheck KUser settings."). - arg(filename).arg(TQString::fromLatin1(strerror(errno))) ); + tqarg(filename).tqarg(TQString::tqfromLatin1(strerror(errno))) ); if( (processing_file & GROUP) != 0 ) { group_errno = errno; if(!nisgroup_filename.isEmpty()) { @@ -121,7 +121,7 @@ bool KGroupFiles::reload() FILE *fgrp = fopen(TQFile::encodeName(filename), "r"); TQString tmp; if (fgrp == NULL) { - KMessageBox::error( 0, i18n("Error opening %1 for reading.").arg(filename) ); + KMessageBox::error( 0, i18n("Error opening %1 for reading.").tqarg(filename) ); return FALSE; } @@ -194,16 +194,16 @@ bool KGroupFiles::save() // read KUser configuration info group_filename = mCfg->groupsrc(); - new_group_filename = group_filename + TQString::fromLatin1(KU_CREATE_EXT); + new_group_filename = group_filename + TQString::tqfromLatin1(KU_CREATE_EXT); #ifdef HAVE_SHADOW gshadow_filename = mCfg->gshadowsrc(); if ( !KStandardDirs::exists( gshadow_filename ) ) - gshadow_filename = TQString::null; + gshadow_filename = TQString(); else - new_gshadow_filename = gshadow_filename + TQString::fromLatin1(KU_CREATE_EXT); + new_gshadow_filename = gshadow_filename + TQString::tqfromLatin1(KU_CREATE_EXT); #endif nisgroup_filename = mCfg->nisgroupsrc(); - new_nisgroup_filename = nisgroup_filename + TQString::fromLatin1(KU_CREATE_EXT); + new_nisgroup_filename = nisgroup_filename + TQString::tqfromLatin1(KU_CREATE_EXT); if( nisgroup_filename != group_filename ) { mingid = mCfg->nismingid(); } @@ -233,14 +233,14 @@ bool KGroupFiles::save() if(!group_filename.isEmpty()) { if((group_fd = fopen(TQFile::encodeName(new_group_filename), "w")) == NULL) { - KMessageBox::error( 0, i18n("Error opening %1 for writing.").arg(new_group_filename) ); + KMessageBox::error( 0, i18n("Error opening %1 for writing.").tqarg(new_group_filename) ); return false; } } if(!gshadow_filename.isEmpty()) { if((gshadow_fd = fopen(TQFile::encodeName(new_gshadow_filename), "w")) == NULL) { - KMessageBox::error( 0, i18n("Error opening %1 for writing.").arg(new_gshadow_filename) ); + KMessageBox::error( 0, i18n("Error opening %1 for writing.").tqarg(new_gshadow_filename) ); if ( group_fd ) fclose ( group_fd ); return false; } @@ -248,7 +248,7 @@ bool KGroupFiles::save() if(!nisgroup_filename.isEmpty() && (nisgroup_filename != group_filename)) { if((nisgroup_fd = fopen(TQFile::encodeName(new_nisgroup_filename), "w")) == NULL) { - KMessageBox::error( 0, i18n("Error opening %1 for writing.").arg(new_nisgroup_filename) ); + KMessageBox::error( 0, i18n("Error opening %1 for writing.").tqarg(new_nisgroup_filename) ); if ( group_fd ) fclose ( group_fd ); if ( gshadow_fd ) fclose ( gshadow_fd ); return false; @@ -271,12 +271,12 @@ bool KGroupFiles::save() if ( gr == 0 ) break; }; - if ( mDel.containsRef( gr ) ) { + if ( mDel.tqcontainsRef( gr ) ) { ++it; gr = (*it); continue; } - if ( mMod.contains( gr ) ) gr = &( mMod[ gr ] ); + if ( mMod.tqcontains( gr ) ) gr = &( mMod[ gr ] ); #ifdef HAVE_SHADOW if ( addok && !mCfg->gshadowsrc().isEmpty() ) @@ -284,8 +284,8 @@ bool KGroupFiles::save() #endif tmpGe = gr->getName(); - tmpGe.replace( ',', "_" ); - tmpGe.replace( ':', "_" ); + tmpGe.tqreplace( ',', "_" ); + tmpGe.tqreplace( ':', "_" ); gr->setName( tmpGe ); tmp_gid = gr->getGID(); @@ -298,8 +298,8 @@ bool KGroupFiles::save() tmpGe += ','; tmpSe += ','; } - gr->user( j ).replace( ',', "_" ); - gr->user( j ).replace( ':', "_" ); + gr->user( j ).tqreplace( ',', "_" ); + gr->user( j ).tqreplace( ':', "_" ); tmpGe += gr->user( j) ; tmpSe += gr->user( j ); } diff --git a/kuser/kgroupldap.cpp b/kuser/kgroupldap.cpp index 2f66b27..d99475d 100644 --- a/kuser/kgroupldap.cpp +++ b/kuser/kgroupldap.cpp @@ -281,39 +281,39 @@ void KGroupLDAP::modData( KU::KGroup *group ) ldif += "dn: " + newrdn.utf8() + "," + mUrl.dn().utf8() + "\n" + "changetype: modify\n" + - "replace: objectclass\n" + + "tqreplace: objectclass\n" + "objectclass: posixgroup\n"; if ( ( getCaps() & Cap_Samba ) && ( group->getCaps() & KU::KGroup::Cap_Samba ) ) { ldif += "objectclass: sambagroupmapping\n"; } ldif += - "-\nreplace: cn\n" + + "-\ntqreplace: cn\n" + KABC::LDIF::assembleLine( "cn", group->getName() ) + - "\n-\nreplace: gidnumber\n" + + "\n-\ntqreplace: gidnumber\n" + KABC::LDIF::assembleLine( "gidnumber", TQString::number(group->getGID()) ) + - "\n-\nreplace: userpassword\n" + + "\n-\ntqreplace: userpassword\n" + KABC::LDIF::assembleLine( "userpassword", group->getPwd() ) + - "\n-\nreplace: memberuid\n"; + "\n-\ntqreplace: memberuid\n"; for ( uint i=0; i < group->count(); i++ ) { ldif += KABC::LDIF::assembleLine( "memberuid", group->user(i)) + "\n"; } if ( getCaps() & Cap_Samba ) { if ( group->getCaps() & KU::KGroup::Cap_Samba ) { ldif += - "-\nreplace: sambasid\n" + + "-\ntqreplace: sambasid\n" + KABC::LDIF::assembleLine( "sambasid", group->getSID().getSID() ) + - "\n-\nreplace: displayname\n" + + "\n-\ntqreplace: displayname\n" + KABC::LDIF::assembleLine( "displayname", group->getDisplayName() ) + - "\n-\nreplace: description\n" + + "\n-\ntqreplace: description\n" + KABC::LDIF::assembleLine( "description", group->getDesc() ) + - "\n-\nreplace: sambagrouptype\n" + + "\n-\ntqreplace: sambagrouptype\n" + KABC::LDIF::assembleLine( "sambagrouptype", TQString::number( group->getType() ) ) + "\n"; } else { - ldif += "-\nreplace: sambasid\n"; - ldif += "-\nreplace: displayname\n"; - ldif += "-\nreplace: description\n"; - ldif += "-\nreplace: sambagrouptype\n"; - ldif += "-\nreplace: sambasidlist\n"; + ldif += "-\ntqreplace: sambasid\n"; + ldif += "-\ntqreplace: displayname\n"; + ldif += "-\ntqreplace: description\n"; + ldif += "-\ntqreplace: sambagrouptype\n"; + ldif += "-\ntqreplace: sambasidlist\n"; } } diff --git a/kuser/kgroupldap.h b/kuser/kgroupldap.h index 40c1ef4..ab8fda7 100644 --- a/kuser/kgroupldap.h +++ b/kuser/kgroupldap.h @@ -34,6 +34,7 @@ class KGroupLDAP : public TQObject, public KU::KGroups { Q_OBJECT + TQ_OBJECT public: KGroupLDAP( KUserPrefsBase *cfg ); virtual ~KGroupLDAP(); diff --git a/kuser/kgroupvw.cpp b/kuser/kgroupvw.cpp index 76af939..8a1daca 100644 --- a/kuser/kgroupvw.cpp +++ b/kuser/kgroupvw.cpp @@ -24,8 +24,8 @@ #include "kgroupvw.h" -KGroupViewItem::KGroupViewItem(KListView *parent, KU::KGroup *aku) - : KListViewItem(parent), mGroup(aku) +KGroupViewItem::KGroupViewItem(KListView *tqparent, KU::KGroup *aku) + : KListViewItem(tqparent), mGroup(aku) { } @@ -60,9 +60,9 @@ TQString KGroupViewItem::text(int num) const case 0: return TQString::number(mGroup->getGID()); case 1: return mGroup->getName(); case 2: return ( mGroup->getCaps() & KU::KGroup::Cap_Samba ) ? - mGroup->getSID().getDOM() : TQString::null; + mGroup->getSID().getDOM() : TQString(); case 3: return ( mGroup->getCaps() & KU::KGroup::Cap_Samba ) ? - TQString::number( mGroup->getSID().getRID() ) : TQString::null; + TQString::number( mGroup->getSID().getRID() ) : TQString(); case 4: { if ( mGroup->getCaps() & KU::KGroup::Cap_Samba ) { switch ( mGroup->getType() ) { @@ -72,18 +72,18 @@ TQString KGroupViewItem::text(int num) const default: return i18n("Unknown"); } } else { - return TQString::null; + return TQString(); } } case 5: return mGroup->getDisplayName(); case 6: return mGroup->getDesc(); } - return TQString::null; + return TQString(); } -KGroupView::KGroupView(TQWidget *parent, const char *name) - : KListView( parent, name ) +KGroupView::KGroupView(TQWidget *tqparent, const char *name) + : KListView( tqparent, name ) { setSelectionMode( TQListView::Extended ); } diff --git a/kuser/kgroupvw.h b/kuser/kgroupvw.h index 5dd1fb8..0b1f3c6 100644 --- a/kuser/kgroupvw.h +++ b/kuser/kgroupvw.h @@ -30,7 +30,7 @@ class KGroupViewItem : public KListViewItem { public: - KGroupViewItem(KListView *parent, KU::KGroup *aku); + KGroupViewItem(KListView *tqparent, KU::KGroup *aku); KU::KGroup *group() { return mGroup; } private: virtual TQString text ( int ) const; @@ -42,9 +42,10 @@ private: class KGroupView : public KListView { Q_OBJECT + TQ_OBJECT public: - KGroupView( TQWidget* parent = 0, const char* name = 0 ); + KGroupView( TQWidget* tqparent = 0, const char* name = 0 ); virtual ~KGroupView(); diff --git a/kuser/kuser.cpp b/kuser/kuser.cpp index 2ef2e80..f945b57 100644 --- a/kuser/kuser.cpp +++ b/kuser/kuser.cpp @@ -203,7 +203,7 @@ bool KU::KUser::getDisabled() const return isDisabled; } -// FreeBSD apparently uses the GECOS fields differently than other Unices. +// FreeBSD aptqparently uses the GECOS fields differently than other Unices. // Create some better named functions to make the FreeBSD code clear const TQString &KU::KUser::getOffice() const { @@ -381,7 +381,7 @@ void KU::KUser::setDisabled(bool data) isDisabled = data; } -// FreeBSD apparently uses the GECOS fields differently than other Unices. +// FreeBSD aptqparently uses the GECOS fields differently than other Unices. // Create some better named functions to make the FreeBSD code clear void KU::KUser::setOffice(const TQString &data) { @@ -548,24 +548,24 @@ int KU::KUser::createHome() { if(p_dir.isNull() || p_dir.isEmpty()) { - KMessageBox::sorry( 0, i18n("Cannot create home folder for %1: it is null or empty.").arg(p_name) ); + KMessageBox::sorry( 0, i18n("Cannot create home folder for %1: it is null or empty.").tqarg(p_name) ); return(0); } if (mkdir(TQFile::encodeName(p_dir), 0700) != 0) { if (errno != EEXIST) { - KMessageBox::error( 0, i18n("Cannot create home folder %1.\nError: %2").arg(p_dir).arg(TQString::fromLocal8Bit(strerror(errno))) ); + KMessageBox::error( 0, i18n("Cannot create home folder %1.\nError: %2").tqarg(p_dir).tqarg(TQString::fromLocal8Bit(strerror(errno))) ); return(0); } } if (chown(TQFile::encodeName(p_dir), p_uid, p_gid) != 0) { - KMessageBox::error( 0, i18n("Cannot change owner of home folder %1.\nError: %2").arg(p_dir).arg(TQString::fromLocal8Bit(strerror(errno))) ); + KMessageBox::error( 0, i18n("Cannot change owner of home folder %1.\nError: %2").tqarg(p_dir).tqarg(TQString::fromLocal8Bit(strerror(errno))) ); return(1); } if (chmod(TQFile::encodeName(p_dir), KU_HOMEDIR_PERM) != 0) { - KMessageBox::error( 0, i18n("Cannot change permissions on home folder %1.\nError: %2").arg(p_dir).arg(TQString::fromLocal8Bit(strerror(errno))) ); + KMessageBox::error( 0, i18n("Cannot change permissions on home folder %1.\nError: %2").tqarg(p_dir).tqarg(TQString::fromLocal8Bit(strerror(errno))) ); return(1); } return(1); @@ -580,33 +580,33 @@ int KU::KUser::tryCreate(const TQString &dir) if (rc == 0) { if (S_ISDIR(sb.st_mode)) { if (KMessageBox::warningContinueCancel( 0, - i18n("Folder %1 already exists!\nWill make %2 owner and change permissions.\nDo you want to continue?").arg(dir).arg(p_name), - TQString::null, KStdGuiItem::cont() ) == KMessageBox::Continue) { + i18n("Folder %1 already exists!\nWill make %2 owner and change permissions.\nDo you want to continue?").tqarg(dir).tqarg(p_name), + TQString(), KStdGuiItem::cont() ) == KMessageBox::Continue) { if (chown(TQFile::encodeName(dir), p_uid, p_gid) != 0) { - KMessageBox::error( 0, i18n("Cannot change owner of %1 folder.\nError: %2") .arg(dir).arg(TQString::fromLocal8Bit(strerror(errno))) ); + KMessageBox::error( 0, i18n("Cannot change owner of %1 folder.\nError: %2") .tqarg(dir).tqarg(TQString::fromLocal8Bit(strerror(errno))) ); } return(0); } else { - KMessageBox::information( 0, i18n("Folder %1 left 'as is'.\nVerify ownership and permissions for user %2 who may not be able to log in!").arg(dir).arg(p_name) ); + KMessageBox::information( 0, i18n("Folder %1 left 'as is'.\nVerify ownership and permissions for user %2 who may not be able to log in!").tqarg(dir).tqarg(p_name) ); return(-1); } } else { - KMessageBox::information( 0, i18n("%1 exists and is not a folder. User %2 will not be able to log in!").arg(dir).arg(p_name) ); + KMessageBox::information( 0, i18n("%1 exists and is not a folder. User %2 will not be able to log in!").tqarg(dir).tqarg(p_name) ); return(-1); } } else { if (errno == ENOENT) { if (mkdir(TQFile::encodeName(dir), 0700) != 0) { - KMessageBox::error( 0, i18n("Cannot create %1 folder.\nError: %2").arg(dir).arg(TQString::fromLocal8Bit(strerror(errno)))); + KMessageBox::error( 0, i18n("Cannot create %1 folder.\nError: %2").tqarg(dir).tqarg(TQString::fromLocal8Bit(strerror(errno)))); return(-1); } if (chown(TQFile::encodeName(dir), p_uid, p_gid) != 0) { - KMessageBox::error( 0, i18n("Cannot change owner of %1 folder.\nError: %2").arg(dir).arg(TQString::fromLocal8Bit(strerror(errno))) ); + KMessageBox::error( 0, i18n("Cannot change owner of %1 folder.\nError: %2").tqarg(dir).tqarg(TQString::fromLocal8Bit(strerror(errno))) ); } return(0); } else { - KMessageBox::error( 0, i18n("stat call on %1 failed.\nError: %2").arg(dir).arg(TQString::fromLocal8Bit(strerror(errno))) ); + KMessageBox::error( 0, i18n("stat call on %1 failed.\nError: %2").tqarg(dir).tqarg(TQString::fromLocal8Bit(strerror(errno))) ); return(-1); } } @@ -622,8 +622,8 @@ int KU::KUser::createMailBox() if (errno != EEXIST) { KMessageBox::error( 0, i18n("Cannot create %1: %2") - .arg(mailboxpath) - .arg(TQString::fromLocal8Bit(strerror(errno))) ); + .tqarg(mailboxpath) + .tqarg(TQString::fromLocal8Bit(strerror(errno))) ); return -1; } } @@ -632,13 +632,13 @@ int KU::KUser::createMailBox() if (chown(TQFile::encodeName(mailboxpath), p_uid, KU_MAILBOX_GID) != 0) { KMessageBox::error( 0, i18n("Cannot change owner on mailbox: %1\nError: %2") - .arg(mailboxpath).arg(TQString::fromLocal8Bit(strerror(errno))) ); + .tqarg(mailboxpath).tqarg(TQString::fromLocal8Bit(strerror(errno))) ); return -1; } if (chmod(TQFile::encodeName(mailboxpath), KU_MAILBOX_PERM) != 0) { KMessageBox::error( 0, i18n("Cannot change permissions on mailbox: %1\nError: %2") - .arg(mailboxpath).arg(TQString::fromLocal8Bit(strerror(errno))) ); + .tqarg(mailboxpath).tqarg(TQString::fromLocal8Bit(strerror(errno))) ); return -1; } @@ -651,8 +651,8 @@ void KU::KUser::copyDir(const TQString &srcPath, const TQString &dstPath) TQDir s(srcPath); TQDir d(dstPath); - TQString dot = TQString::fromLatin1("."); - TQString dotdot = TQString::fromLatin1(".."); + TQString dot = TQString::tqfromLatin1("."); + TQString dotdot = TQString::tqfromLatin1(".."); s.setFilter( TQDir::All | TQDir::Hidden | TQDir::System ); @@ -683,7 +683,7 @@ void KU::KUser::copyDir(const TQString &srcPath, const TQString &dstPath) if (symlink(TQFile::encodeName(link),TQFile::encodeName(d.filePath(name))) != 0) { KMessageBox::error( 0, i18n("Error creating symlink %1.\nError: %2") - .arg(d.filePath(s[i])).arg(TQString::fromLocal8Bit(strerror(errno))) ); + .tqarg(d.filePath(s[i])).tqarg(TQString::fromLocal8Bit(strerror(errno))) ); } } else if ( info.isDir() ) { TQDir dir(filename); @@ -693,12 +693,12 @@ void KU::KUser::copyDir(const TQString &srcPath, const TQString &dstPath) if (chown(TQFile::encodeName(d.filePath(name)), p_uid, p_gid) != 0) { KMessageBox::error( 0, i18n("Cannot change owner of folder %1.\nError: %2") - .arg(d.filePath(s[i])).arg(TQString::fromLocal8Bit(strerror(errno))) ); + .tqarg(d.filePath(s[i])).tqarg(TQString::fromLocal8Bit(strerror(errno))) ); } if (chmod(TQFile::encodeName(d.filePath(name)), mode) != 0) { KMessageBox::error( 0, i18n("Cannot change permissions on folder %1.\nError: %2") - .arg(d.filePath(s[i])).arg(TQString::fromLocal8Bit(strerror(errno))) ); + .tqarg(d.filePath(s[i])).tqarg(TQString::fromLocal8Bit(strerror(errno))) ); } } else { @@ -708,12 +708,12 @@ void KU::KUser::copyDir(const TQString &srcPath, const TQString &dstPath) if (chown(TQFile::encodeName(d.filePath(name)), p_uid, p_gid) != 0) { KMessageBox::error( 0, i18n("Cannot change owner of file %1.\nError: %2") - .arg(d.filePath(s[i])).arg(TQString::fromLocal8Bit(strerror(errno))) ); + .tqarg(d.filePath(s[i])).tqarg(TQString::fromLocal8Bit(strerror(errno))) ); } if (chmod(TQFile::encodeName(d.filePath(name)), mode) != 0) { KMessageBox::error( 0, i18n("Cannot change permissions on file %1.\nError: %2") - .arg(d.filePath(s[i])).arg(TQString::fromLocal8Bit(strerror(errno))) ); + .tqarg(d.filePath(s[i])).tqarg(TQString::fromLocal8Bit(strerror(errno))) ); } } } @@ -726,12 +726,12 @@ int KU::KUser::copySkel() mode_t mode; if (!s.exists()) { - KMessageBox::error( 0, i18n("Folder %1 does not exist, cannot copy skeleton for %2.").arg(s.absPath()).arg(p_name) ); + KMessageBox::error( 0, i18n("Folder %1 does not exist, cannot copy skeleton for %2.").tqarg(s.absPath()).tqarg(p_name) ); return (-1); } if (!d.exists()) { - KMessageBox::error( 0, i18n("Folder %1 does not exist, cannot copy skeleton.").arg(d.absPath()) ); + KMessageBox::error( 0, i18n("Folder %1 does not exist, cannot copy skeleton.").tqarg(d.absPath()) ); return (-1); } @@ -750,14 +750,14 @@ int KU::KUser::removeHome() if (S_ISDIR(sb.st_mode) && sb.st_uid == p_uid) { if (!KIO::NetAccess::del(KURL::fromPathOrURL(p_dir))) { KMessageBox::error( 0, i18n("Cannot remove home folder %1.\nError: %2") - .arg(p_dir).arg(KIO::NetAccess::lastErrorString()) ); + .tqarg(p_dir).tqarg(KIO::NetAccess::lastErrorString()) ); } } else { - KMessageBox::error( 0, i18n("Removal of home folder %1 failed (uid = %2, gid = %3).").arg(p_dir).arg(sb.st_uid).arg(sb.st_gid) ); + KMessageBox::error( 0, i18n("Removal of home folder %1 failed (uid = %2, gid = %3).").tqarg(p_dir).tqarg(sb.st_uid).tqarg(sb.st_gid) ); } else { KMessageBox::error( 0, i18n("stat call on file %1 failed.\nError: %2") - .arg(p_dir).arg(TQString::fromLocal8Bit(strerror(errno))) ); + .tqarg(p_dir).tqarg(TQString::fromLocal8Bit(strerror(errno))) ); } return 0; @@ -772,10 +772,10 @@ int KU::KUser::removeCrontabs() file = TQFile::decodeName(CRONTAB_DIR) + "/" + p_name; if ( access(TQFile::encodeName(file), F_OK) == 0 ) { - command = TQString::fromLatin1("crontab -u %1 -r").arg(KProcess::quote(p_name)); + command = TQString::tqfromLatin1("crontab -u %1 -r").tqarg(KProcess::quote(p_name)); if ( system(TQFile::encodeName(command)) != 0 ) { KMessageBox::error( 0, i18n("Cannot remove crontab %1.\nError: %2") - .arg(command).arg(TQString::fromLocal8Bit(strerror(errno))) ); + .tqarg(command).tqarg(TQString::fromLocal8Bit(strerror(errno))) ); } } @@ -789,7 +789,7 @@ int KU::KUser::removeMailBox() file = TQFile::decodeName(MAIL_SPOOL_DIR) + "/" + p_name; if (remove(TQFile::encodeName(file)) != 0) { KMessageBox::error( 0, i18n("Cannot remove mailbox %1.\nError: %2") - .arg(file).arg(TQString::fromLocal8Bit(strerror(errno))) ); + .tqarg(file).tqarg(TQString::fromLocal8Bit(strerror(errno))) ); } return 0; @@ -808,7 +808,7 @@ int KU::KUser::removeProcesses() break; case -1: KMessageBox::error( 0, - i18n("Cannot fork while trying to kill processes for uid %1.").arg(p_uid) ); + i18n("Cannot fork while trying to kill processes for uid %1.").tqarg(p_uid) ); break; } diff --git a/kuser/kuser.h b/kuser/kuser.h index ee6dbab..fa80f75 100644 --- a/kuser/kuser.h +++ b/kuser/kuser.h @@ -164,7 +164,7 @@ protected: void copyDir(const TQString &srcPath, const TQString &dstPath); int caps; - QString + TQString p_name, // parsed pw information p_surname, p_email, @@ -187,7 +187,7 @@ protected: uid_t p_uid; gid_t p_gid; - QString + TQString s_pwd, // parsed shadow password sam_lmpwd, sam_ntpwd, diff --git a/kuser/kuser.kcfg b/kuser/kuser.kcfg index a1ec974..a264ef3 100644 --- a/kuser/kuser.kcfg +++ b/kuser/kuser.kcfg @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0 http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" > - <include>qfile.h</include> + <include>tqfile.h</include> <include>kapplication.h</include> <include>config.h</include> diff --git a/kuser/kuserfiles.cpp b/kuser/kuserfiles.cpp index 5ccfe58..f76c2ac 100644 --- a/kuser/kuserfiles.cpp +++ b/kuser/kuserfiles.cpp @@ -115,7 +115,7 @@ bool KUserFiles::loadpwd() mCfg->setPasswdsrc( PASSWORD_FILE ); mCfg->setGroupsrc( GROUP_FILE ); passwd_filename = mCfg->passwdsrc(); - KMessageBox::error( 0, i18n("KUser sources were not configured.\nLocal passwd source set to %1\nLocal group source set to %2.").arg(mCfg->passwdsrc().arg(mCfg->groupsrc())) ); + KMessageBox::error( 0, i18n("KUser sources were not configured.\nLocal passwd source set to %1\nLocal group source set to %2.").tqarg(mCfg->passwdsrc().tqarg(mCfg->groupsrc())) ); } if(!passwd_filename.isEmpty()) { @@ -128,7 +128,7 @@ bool KUserFiles::loadpwd() for(int i = 0; i < MAXFILES; i++) { rc = stat(TQFile::encodeName(filename), &st); if(rc != 0) { - KMessageBox::error( 0, i18n("Stat call on file %1 failed: %2\nCheck KUser settings.").arg(filename).arg(TQString::fromLocal8Bit(strerror(errno))) ); + KMessageBox::error( 0, i18n("Stat call on file %1 failed: %2\nCheck KUser settings.").tqarg(filename).tqarg(TQString::fromLocal8Bit(strerror(errno))) ); if( (processing_file & P_PASSWD) != 0 ) { passwd_errno = errno; if(!nispasswd_filename.isEmpty()) { @@ -155,7 +155,7 @@ bool KUserFiles::loadpwd() #ifdef HAVE_FGETPWENT FILE *fpwd = fopen(TQFile::encodeName(filename), "r"); if(fpwd == NULL) { - KMessageBox::error( 0, i18n("Error opening %1 for reading.").arg(filename) ); + KMessageBox::error( 0, i18n("Error opening %1 for reading.").tqarg(filename) ); return FALSE; } @@ -179,7 +179,7 @@ bool KUserFiles::loadpwd() tmpKU->setHomeDir(TQString::fromLocal8Bit(p->pw_dir)); tmpKU->setShell(TQString::fromLocal8Bit(p->pw_shell)); #if defined(__FreeBSD__) || defined(__bsdi__) - tmpKU->setClass(TQString::fromLatin1(p->pw_class)); + tmpKU->setClass(TQString::tqfromLatin1(p->pw_class)); tmpKU->setLastChange(p->pw_change); tmpKU->setExpire(p->pw_expire); #endif @@ -238,7 +238,7 @@ bool KUserFiles::loadsdw() FILE *f; kdDebug() << "open shadow file: " << shadow_file << endl; if ((f = fopen( TQFile::encodeName(shadow_file), "r")) == NULL) { - KMessageBox::error( 0, i18n("Error opening %1 for reading.").arg(shadow_file) ); + KMessageBox::error( 0, i18n("Error opening %1 for reading.").tqarg(shadow_file) ); caps &= ~Cap_Shadow; return TRUE; } @@ -250,7 +250,7 @@ bool KUserFiles::loadsdw() kdDebug() << "shadow entry: " << spw->sp_namp << endl; if ((up = lookup(TQString::fromLocal8Bit(spw->sp_namp))) == NULL) { - KMessageBox::error( 0, i18n("No /etc/passwd entry for %1.\nEntry will be removed at the next `Save'-operation.").arg(TQString::fromLocal8Bit(spw->sp_namp)) ); + KMessageBox::error( 0, i18n("No /etc/passwd entry for %1.\nEntry will be removed at the next `Save'-operation.").tqarg(TQString::fromLocal8Bit(spw->sp_namp)) ); continue; } @@ -286,8 +286,8 @@ bool KUserFiles::loadsdw() // Save password file #define escstr(a,b) tmp2 = user->a(); \ - tmp2.replace(':',"_"); \ - tmp2.replace(',',"_"); \ + tmp2.tqreplace(':',"_"); \ + tmp2.tqreplace(',',"_"); \ user->b( tmp2 ); @@ -314,9 +314,9 @@ bool KUserFiles::savepwd() passwd_filename = mCfg->passwdsrc(); nispasswd_filename = mCfg->nispasswdsrc(); TQString new_passwd_filename = - passwd_filename + TQString::fromLatin1(KU_CREATE_EXT); + passwd_filename + TQString::tqfromLatin1(KU_CREATE_EXT); TQString new_nispasswd_filename = - nispasswd_filename+TQString::fromLatin1(KU_CREATE_EXT); + nispasswd_filename+TQString::tqfromLatin1(KU_CREATE_EXT); if( nispasswd_filename != passwd_filename ) { minuid = mCfg->nisminuid(); @@ -343,13 +343,13 @@ bool KUserFiles::savepwd() if(!passwd_filename.isEmpty()) { if ((passwd_fd = fopen(TQFile::encodeName(new_passwd_filename),"w")) == NULL) - KMessageBox::error( 0, i18n("Error opening %1 for writing.").arg(passwd_filename) ); + KMessageBox::error( 0, i18n("Error opening %1 for writing.").tqarg(passwd_filename) ); } if(!nispasswd_filename.isEmpty() && (nispasswd_filename != passwd_filename)){ if ((nispasswd_fd = fopen(TQFile::encodeName(new_nispasswd_filename),"w")) == NULL) - KMessageBox::error( 0, i18n("Error opening %1 for writing.").arg(nispasswd_filename) ); + KMessageBox::error( 0, i18n("Error opening %1 for writing.").tqarg(nispasswd_filename) ); } TQPtrListIterator<KU::KUser> it( mUsers ); @@ -364,12 +364,12 @@ bool KUserFiles::savepwd() addok = true; if ( user == 0 ) break; }; - if ( mDel.containsRef( user ) ) { + if ( mDel.tqcontainsRef( user ) ) { ++it; user = (*it); continue; } - if ( mMod.contains( user ) ) user = &( mMod[ user ] ); + if ( mMod.tqcontains( user ) ) user = &( mMod[ user ] ); tmp_uid = user->getUID(); if ( caps & Cap_Shadow ) @@ -512,7 +512,7 @@ bool KUserFiles::savesdw() struct spwd s; KU::KUser *up; TQString shadow_file = mCfg->shadowsrc(); - TQString new_shadow_file = shadow_file+TQString::fromLatin1(KU_CREATE_EXT); + TQString new_shadow_file = shadow_file+TQString::tqfromLatin1(KU_CREATE_EXT); if ( shadow_file.isEmpty() ) return TRUE; @@ -523,7 +523,7 @@ bool KUserFiles::savesdw() } if ((f = fopen(TQFile::encodeName(new_shadow_file), "w")) == NULL) { - KMessageBox::error( 0, i18n("Error opening %1 for writing.").arg(new_shadow_file) ); + KMessageBox::error( 0, i18n("Error opening %1 for writing.").tqarg(new_shadow_file) ); return FALSE; } @@ -542,12 +542,12 @@ bool KUserFiles::savesdw() if ( up == 0 ) break; }; - if ( mDel.containsRef( up ) ) { + if ( mDel.tqcontainsRef( up ) ) { ++it; up = (*it); continue; } - if ( mMod.contains( up ) ) up = &( mMod[ up ] ); + if ( mMod.tqcontains( up ) ) up = &( mMod[ up ] ); strncpy( s.sp_namp, up->getName().local8Bit(), 200 ); if ( up->getDisabled() ) @@ -588,7 +588,7 @@ void KUserFiles::createPassword( KU::KUser *user, const TQString &password ) { if ( caps & Cap_Shadow ) { user->setSPwd( encryptPass( password, mCfg->md5shadow() ) ); - user->setPwd( TQString::fromLatin1("x") ); + user->setPwd( TQString::tqfromLatin1("x") ); } else user->setPwd( encryptPass( password, false ) ); } diff --git a/kuser/kuserldap.cpp b/kuser/kuserldap.cpp index 9555cb5..d1d99b0 100644 --- a/kuser/kuserldap.cpp +++ b/kuser/kuserldap.cpp @@ -176,7 +176,7 @@ void KUserLDAP::data( KIO::Job *, const TQByteArray& data ) else if ( name == "shadowflag" ) mUser->setFlag( val.toLong() ); else if ( name == "sambaacctflags" ) { - if ( !val.contains( 'D' ) ) mUser->setDisabled( false ); + if ( !val.tqcontains( 'D' ) ) mUser->setDisabled( false ); } else if ( name == "sambasid" ) mUser->setSID( val ); else if ( name == "sambaprimarygroupsid" ) @@ -307,9 +307,9 @@ void KUserLDAP::createPassword( KU::KUser *user, const TQString &password ) TQByteArray hash(20); sha1_init( &ctx ); - sha1_update( &ctx, (const Q_UINT8*) password.utf8().data(), + sha1_update( &ctx, (const TQ_UINT8*) password.utf8().data(), password.utf8().length() ); - sha1_final( &ctx, (Q_UINT8*) hash.data() ); + sha1_final( &ctx, (TQ_UINT8*) hash.data() ); user->setPwd( "{SHA}" + KCodecs::base64Encode( ( hash ) ) ); break; } @@ -320,8 +320,8 @@ void KUserLDAP::createPassword( KU::KUser *user, const TQString &password ) TQCString pwd = password.utf8() + salt; sha1_init( &ctx ); - sha1_update( &ctx, (const Q_UINT8*) pwd.data(), pwd.length() ); - sha1_final( &ctx, (Q_UINT8*) hash.data() ); + sha1_update( &ctx, (const TQ_UINT8*) pwd.data(), pwd.length() ); + sha1_final( &ctx, (TQ_UINT8*) hash.data() ); memcpy( &(hash.data()[ 20 ]), salt.data(), 4 ); user->setPwd( "{SSHA}" + KCodecs::base64Encode( ( hash ) ) ); break; @@ -329,7 +329,7 @@ void KUserLDAP::createPassword( KU::KUser *user, const TQString &password ) } if ( caps & Cap_Samba ) { - Q_UINT8 hex[33]; + TQ_UINT8 hex[33]; TQByteArray ntlmhash; ntlmhash = KNTLM::ntlmHash( password ); @@ -341,7 +341,7 @@ void KUserLDAP::createPassword( KU::KUser *user, const TQString &password ) hash[6], hash[7], hash[8], hash[9], hash[10], hash[11], hash[12], hash[13], hash[14], hash[15]); - user->setNTPwd( TQString::fromLatin1( (const char*) &hex, 32 ) ); + user->setNTPwd( TQString::tqfromLatin1( (const char*) &hex, 32 ) ); if ( mCfg->lanmanhash() ) { @@ -354,7 +354,7 @@ void KUserLDAP::createPassword( KU::KUser *user, const TQString &password ) hash[6], hash[7], hash[8], hash[9], hash[10], hash[11], hash[12], hash[13], hash[14], hash[15]); - user->setLMPwd( TQString::fromLatin1( (const char*) &hex, 32 ) ); + user->setLMPwd( TQString::tqfromLatin1( (const char*) &hex, 32 ) ); } else { user->setLMPwd( "" ); } @@ -372,11 +372,11 @@ void KUserLDAP::getLDIF( KU::KUser *user, bool mod ) cn = mCfg->ldapcnfullname() ? user->getFullName() : user->getName(); if ( cn.isEmpty() ) cn = user->getName(); - gecos = TQString::fromLatin1("%1,%2,%3,%4") - .arg(user->getFullName()) - .arg(user->getOffice1()) - .arg(user->getOffice2()) - .arg(user->getAddress()); + gecos = TQString::tqfromLatin1("%1,%2,%3,%4") + .tqarg(user->getFullName()) + .tqarg(user->getOffice1()) + .tqarg(user->getOffice2()) + .tqarg(user->getAddress()); samflags = "[U"; samflags += user->getDisabled() ? 'D' : ' '; @@ -399,7 +399,7 @@ void KUserLDAP::getLDIF( KU::KUser *user, bool mod ) ldif += "dn: " + getRDN( user ).utf8() + "," + mUrl.dn().utf8() + "\n"; if ( mod ) { ldif += "changetype: modify\n"; - ldif += "replace: objectClass\n"; + ldif += "tqreplace: objectClass\n"; } if ( caps & Cap_InetOrg ) @@ -416,7 +416,7 @@ void KUserLDAP::getLDIF( KU::KUser *user, bool mod ) if ( ( caps & Cap_Samba ) && ( user->getCaps() & KU::KUser::Cap_Samba ) ) { ldif += "objectClass: sambaSamAccount\n"; } - if ( mod && mObjectClasses.contains( mUser ) ) { + if ( mod && mObjectClasses.tqcontains( mUser ) ) { TQStringList ocs = mObjectClasses[ mUser ]; kdDebug() << user->getName() << " has additional objectclasses: " << ocs.join(",") << endl; TQValueListIterator<TQString> it; @@ -427,61 +427,61 @@ void KUserLDAP::getLDIF( KU::KUser *user, bool mod ) } } - if ( mod ) ldif += "-\nreplace: cn\n"; + if ( mod ) ldif += "-\ntqreplace: cn\n"; ldif += KABC::LDIF::assembleLine( "cn", cn )+"\n"; if ( caps & Cap_InetOrg ) { - if ( mod ) ldif += "-\nreplace: uid\n"; + if ( mod ) ldif += "-\ntqreplace: uid\n"; ldif += KABC::LDIF::assembleLine( "uid", user->getName() ) + "\n"; } else { - if ( mod ) ldif += "-\nreplace: userid\n"; + if ( mod ) ldif += "-\ntqreplace: userid\n"; ldif += KABC::LDIF::assembleLine( "userid", user->getName() ) + "\n"; } if ( mod ) ldif += "-\n"; if ( ( user->getCaps() & KU::KUser::Cap_POSIX ) || ( caps & Cap_InetOrg ) ) { - if ( mod ) ldif += "replace: userpassword\n"; + if ( mod ) ldif += "tqreplace: userpassword\n"; ldif += KABC::LDIF::assembleLine( "userpassword", pwd )+"\n"; if ( mod ) ldif += "-\n"; } if ( user->getCaps() & KU::KUser::Cap_POSIX ) { - if ( mod ) ldif += "replace: uidnumber\n"; + if ( mod ) ldif += "tqreplace: uidnumber\n"; ldif += KABC::LDIF::assembleLine( "uidnumber", TQString::number( user->getUID() ) )+"\n"; - if ( mod ) ldif += "-\nreplace: gidnumber\n"; + if ( mod ) ldif += "-\ntqreplace: gidnumber\n"; ldif += KABC::LDIF::assembleLine( "gidnumber", TQString::number( user->getGID() ) )+"\n"; - if ( mod ) ldif += "-\nreplace: gecos\n"; + if ( mod ) ldif += "-\ntqreplace: gecos\n"; ldif += KABC::LDIF::assembleLine( "gecos", !mCfg->ldapgecos() ? TQCString() : TQCString( gecos.latin1() ) )+"\n"; - if ( mod ) ldif += "-\nreplace: homedirectory\n"; + if ( mod ) ldif += "-\ntqreplace: homedirectory\n"; ldif += KABC::LDIF::assembleLine( "homedirectory", user->getHomeDir() )+"\n"; - if ( mod ) ldif += "-\nreplace: loginshell\n"; + if ( mod ) ldif += "-\ntqreplace: loginshell\n"; ldif += KABC::LDIF::assembleLine( "loginshell", user->getShell() )+"\n"; if ( mod ) ldif += "-\n"; } else { if ( mod ) { - ldif += "replace: uidnumber\n"; - ldif += "-\nreplace: gidnumber\n"; - ldif += "-\nreplace: homedirectory\n"; - ldif += "-\nreplace: loginshell\n"; - ldif += "-\nreplace: gecos\n"; + ldif += "tqreplace: uidnumber\n"; + ldif += "-\ntqreplace: gidnumber\n"; + ldif += "-\ntqreplace: homedirectory\n"; + ldif += "-\ntqreplace: loginshell\n"; + ldif += "-\ntqreplace: gecos\n"; ldif += "-\n"; } } if ( caps & Cap_InetOrg ) { - if ( mod ) ldif += "replace: sn\n"; + if ( mod ) ldif += "tqreplace: sn\n"; ldif += KABC::LDIF::assembleLine( "sn", user->getSurname() ) + "\n"; - if ( mod ) ldif += "-\nreplace: mail\n"; + if ( mod ) ldif += "-\ntqreplace: mail\n"; ldif += KABC::LDIF::assembleLine( "mail", user->getEmail() ) + "\n"; - if ( mod ) ldif += "-\nreplace: displayName\n"; + if ( mod ) ldif += "-\ntqreplace: displayName\n"; ldif += KABC::LDIF::assembleLine( "displayname", user->getFullName() ) + "\n"; - if ( mod ) ldif += "-\nreplace: postaladdress\n"; + if ( mod ) ldif += "-\ntqreplace: postaladdress\n"; ldif += KABC::LDIF::assembleLine( "postaladdress", user->getAddress() ) + "\n"; - if ( mod ) ldif += "-\nreplace: telephoneNumber\n"; + if ( mod ) ldif += "-\ntqreplace: telephoneNumber\n"; ldif += KABC::LDIF::assembleLine( "telephoneNumber", user->getOffice1() ) + "\n"; ldif += KABC::LDIF::assembleLine( "telephoneNumber", user->getOffice2() ) + "\n"; if ( mod ) ldif += "-\n"; @@ -489,63 +489,63 @@ void KUserLDAP::getLDIF( KU::KUser *user, bool mod ) if ( caps & Cap_Samba ) { if ( user->getCaps() & KU::KUser::Cap_Samba ) { - if ( mod ) ldif += "replace: sambadomainname\n"; + if ( mod ) ldif += "tqreplace: sambadomainname\n"; ldif += KABC::LDIF::assembleLine( "sambadomainname", user->getDomain() ) + "\n"; - if ( mod ) ldif += "-\nreplace: sambauserworkstations\n"; + if ( mod ) ldif += "-\ntqreplace: sambauserworkstations\n"; ldif += KABC::LDIF::assembleLine( "sambauserworkstations", user->getWorkstations() ) + "\n"; - if ( mod ) ldif += "-\nreplace: sambahomepath\n"; + if ( mod ) ldif += "-\ntqreplace: sambahomepath\n"; ldif += KABC::LDIF::assembleLine( "sambahomepath", user->getHomePath() ) + "\n"; - if ( mod ) ldif += "-\nreplace: sambahomedrive\n"; + if ( mod ) ldif += "-\ntqreplace: sambahomedrive\n"; ldif += KABC::LDIF::assembleLine( "sambahomedrive", user->getHomeDrive() ) + "\n"; - if ( mod ) ldif += "-\nreplace: sambalogonscript\n"; + if ( mod ) ldif += "-\ntqreplace: sambalogonscript\n"; ldif += KABC::LDIF::assembleLine( "sambalogonscript", user->getLoginScript() ) + "\n"; - if ( mod ) ldif += "-\nreplace: sambaprofilepath\n"; + if ( mod ) ldif += "-\ntqreplace: sambaprofilepath\n"; ldif += KABC::LDIF::assembleLine( "sambaprofilepath", user->getProfilePath() ) + "\n"; - if ( mod ) ldif += "-\nreplace: sambalmpassword\n"; + if ( mod ) ldif += "-\ntqreplace: sambalmpassword\n"; ldif += KABC::LDIF::assembleLine( "sambalmpassword", user->getLMPwd() ) + "\n"; - if ( mod ) ldif += "-\nreplace: sambantpassword\n"; + if ( mod ) ldif += "-\ntqreplace: sambantpassword\n"; ldif += KABC::LDIF::assembleLine( "sambantpassword", user->getNTPwd() ) + "\n"; - if ( mod ) ldif += "-\nreplace: sambasid\n"; + if ( mod ) ldif += "-\ntqreplace: sambasid\n"; ldif += KABC::LDIF::assembleLine( "sambasid", user->getSID().getSID() ) + "\n"; - if ( mod ) ldif += "-\nreplace: sambaacctflags\n"; + if ( mod ) ldif += "-\ntqreplace: sambaacctflags\n"; ldif += KABC::LDIF::assembleLine( "sambaacctflags", samflags ) + "\n"; - if ( mod ) ldif += "-\nreplace: sambaprimarygroupsid\n"; + if ( mod ) ldif += "-\ntqreplace: sambaprimarygroupsid\n"; ldif += KABC::LDIF::assembleLine( "sambaprimarygroupsid", user->getPGSID().getSID() ) + "\n"; - if ( mod ) ldif += "-\nreplace: sambapwdlastset\n"; + if ( mod ) ldif += "-\ntqreplace: sambapwdlastset\n"; ldif += KABC::LDIF::assembleLine( "sambapwdlastset", TQString::number( user->getLastChange() ) ) + "\n"; - if ( mod ) ldif += "-\nreplace: sambakickofftime\n"; + if ( mod ) ldif += "-\ntqreplace: sambakickofftime\n"; if ( user->getExpire() != -1 ) ldif += KABC::LDIF::assembleLine( "sambakickofftime", TQString::number( user->getExpire() ) ) + "\n"; if ( mod ) ldif += "-\n"; } else { if ( mod ) { - ldif += "replace: sambahomepath\n"; - ldif += "-\nreplace: sambahomedrive\n"; - ldif += "-\nreplace: sambalogonscript\n"; - ldif += "-\nreplace: sambaprofilepath\n"; - ldif += "-\nreplace: sambalmpassword\n"; - ldif += "-\nreplace: sambantpassword\n"; - ldif += "-\nreplace: sambasid\n"; - ldif += "-\nreplace: sambaacctflags\n"; - ldif += "-\nreplace: sambaprimarygroupsid\n"; - ldif += "-\nreplace: sambapwdlastset\n"; - ldif += "-\nreplace: sambakickofftime\n"; - ldif += "-\nreplace: sambalogontime\n"; - ldif += "-\nreplace: sambalogofftime\n"; - ldif += "-\nreplace: sambapwdcanchange\n"; - ldif += "-\nreplace: sambapwdmustchange\n"; - ldif += "-\nreplace: sambauserworkstations\n"; - ldif += "-\nreplace: sambadomainname\n"; - ldif += "-\nreplace: sambamungeddial\n"; - ldif += "-\nreplace: sambabadpasswordcount\n"; - ldif += "-\nreplace: sambabadpasswordtime\n"; - ldif += "-\nreplace: sambadomainname\n"; + ldif += "tqreplace: sambahomepath\n"; + ldif += "-\ntqreplace: sambahomedrive\n"; + ldif += "-\ntqreplace: sambalogonscript\n"; + ldif += "-\ntqreplace: sambaprofilepath\n"; + ldif += "-\ntqreplace: sambalmpassword\n"; + ldif += "-\ntqreplace: sambantpassword\n"; + ldif += "-\ntqreplace: sambasid\n"; + ldif += "-\ntqreplace: sambaacctflags\n"; + ldif += "-\ntqreplace: sambaprimarygroupsid\n"; + ldif += "-\ntqreplace: sambapwdlastset\n"; + ldif += "-\ntqreplace: sambakickofftime\n"; + ldif += "-\ntqreplace: sambalogontime\n"; + ldif += "-\ntqreplace: sambalogofftime\n"; + ldif += "-\ntqreplace: sambapwdcanchange\n"; + ldif += "-\ntqreplace: sambapwdmustchange\n"; + ldif += "-\ntqreplace: sambauserworkstations\n"; + ldif += "-\ntqreplace: sambadomainname\n"; + ldif += "-\ntqreplace: sambamungeddial\n"; + ldif += "-\ntqreplace: sambabadpasswordcount\n"; + ldif += "-\ntqreplace: sambabadpasswordtime\n"; + ldif += "-\ntqreplace: sambadomainname\n"; if ( schemaversion > 0 ) { - ldif += "-\nreplace: sambapasswordhistory\n"; - ldif += "-\nreplace: sambalogonhours\n"; + ldif += "-\ntqreplace: sambapasswordhistory\n"; + ldif += "-\ntqreplace: sambalogonhours\n"; } ldif += "-\n"; } @@ -554,37 +554,37 @@ void KUserLDAP::getLDIF( KU::KUser *user, bool mod ) if ( caps & Cap_Shadow ) { if ( user->getCaps() & KU::KUser::Cap_POSIX ) { - if ( mod ) ldif += "replace: shadowlastchange\n"; //sambapwdlastset + if ( mod ) ldif += "tqreplace: shadowlastchange\n"; //sambapwdlastset ldif += KABC::LDIF::assembleLine( "shadowlastchange", TQString::number( timeToDays( user->getLastChange() ) ) ) + "\n"; - if ( mod ) ldif += "-\nreplace: shadowmin\n"; //sambaPwdCanChange + if ( mod ) ldif += "-\ntqreplace: shadowmin\n"; //sambaPwdCanChange ldif += KABC::LDIF::assembleLine( "shadowmin", TQString::number( user->getMin() ) ) + "\n"; - if ( mod ) ldif += "-\nreplace: shadowmax\n"; //sambaPwdMustChange + if ( mod ) ldif += "-\ntqreplace: shadowmax\n"; //sambaPwdMustChange ldif += KABC::LDIF::assembleLine( "shadowmax", TQString::number( user->getMax() ) ) + "\n"; - if ( mod ) ldif += "-\nreplace: shadowwarning\n"; + if ( mod ) ldif += "-\ntqreplace: shadowwarning\n"; ldif += KABC::LDIF::assembleLine( "shadowwarning", TQString::number( user->getWarn() ) ) + "\n"; - if ( mod ) ldif += "-\nreplace: shadowinactive\n"; + if ( mod ) ldif += "-\ntqreplace: shadowinactive\n"; ldif += KABC::LDIF::assembleLine( "shadowinactive", TQString::number( user->getInactive() ) ) + "\n"; - if ( mod ) ldif += "-\nreplace: shadowexpire\n"; //sambaKickoffTime + if ( mod ) ldif += "-\ntqreplace: shadowexpire\n"; //sambaKickoffTime ldif += KABC::LDIF::assembleLine( "shadowexpire", TQString::number( timeToDays( user->getExpire() ) ) ) + "\n"; - if ( mod ) ldif += "-\nreplace: shadowflag\n"; + if ( mod ) ldif += "-\ntqreplace: shadowflag\n"; ldif += KABC::LDIF::assembleLine( "shadowflag", TQString::number( user->getFlag() ) ) + "\n"; if ( mod ) ldif += "-\n"; } else { if ( mod ) { - ldif += "replace: shadowlastchange\n"; - ldif += "-\nreplace: shadowmin\n"; - ldif += "-\nreplace: shadowmax\n"; - ldif += "-\nreplace: shadowwarning\n"; - ldif += "-\nreplace: shadowinactive\n"; - ldif += "-\nreplace: shadowexpire\n"; - ldif += "-\nreplace: shadowflag\n"; + ldif += "tqreplace: shadowlastchange\n"; + ldif += "-\ntqreplace: shadowmin\n"; + ldif += "-\ntqreplace: shadowmax\n"; + ldif += "-\ntqreplace: shadowwarning\n"; + ldif += "-\ntqreplace: shadowinactive\n"; + ldif += "-\ntqreplace: shadowexpire\n"; + ldif += "-\ntqreplace: shadowflag\n"; ldif += "-\n"; } } @@ -630,7 +630,7 @@ void KUserLDAP::putData( KIO::Job *, TQByteArray& data ) if ( mDelUser ) { kdDebug() << "delete ok for: " << mDelUser->getName() << endl; mDelSucc.append( mDelUser ); - if ( mObjectClasses.contains( mDelUser ) ) { + if ( mObjectClasses.tqcontains( mDelUser ) ) { kdDebug() << "deleting additonal objectclasses!" << endl; mObjectClasses.remove( mDelUser ); } diff --git a/kuser/kuserldap.h b/kuser/kuserldap.h index 6af91cc..84ee2e2 100644 --- a/kuser/kuserldap.h +++ b/kuser/kuserldap.h @@ -34,6 +34,7 @@ class KUserLDAP : public TQObject, public KU::KUsers { Q_OBJECT + TQ_OBJECT public: KUserLDAP(KUserPrefsBase *cfg); virtual ~KUserLDAP(); diff --git a/kuser/kusersystem.cpp b/kuser/kusersystem.cpp index 8c67fcb..584bd74 100644 --- a/kuser/kusersystem.cpp +++ b/kuser/kusersystem.cpp @@ -88,7 +88,7 @@ bool KUserSystem::loadpwd() tmpKU->setHomeDir(TQString::fromLocal8Bit(p->pw_dir)); tmpKU->setShell(TQString::fromLocal8Bit(p->pw_shell)); #if defined(__FreeBSD__) || defined(__bsdi__) - tmpKU->setClass(TQString::fromLatin1(p->pw_class)); + tmpKU->setClass(TQString::tqfromLatin1(p->pw_class)); tmpKU->setLastChange(p->pw_change); tmpKU->setExpire(p->pw_expire); #endif diff --git a/kuser/kuservw.cpp b/kuser/kuservw.cpp index f34581c..8f769e5 100644 --- a/kuser/kuservw.cpp +++ b/kuser/kuservw.cpp @@ -24,8 +24,8 @@ #include "kuservw.h" -KUserViewItem::KUserViewItem(KListView *parent, KU::KUser *aku) - : KListViewItem(parent), mUser(aku) +KUserViewItem::KUserViewItem(KListView *tqparent, KU::KUser *aku) + : KListViewItem(tqparent), mUser(aku) { } @@ -45,7 +45,7 @@ int KUserViewItem::compare( TQListViewItem *i, int col, bool ascending ) const } void KUserViewItem::paintCell( TQPainter *p, const TQColorGroup &cg, - int column, int width, int alignment ) + int column, int width, int tqalignment ) { TQColorGroup _cg( cg ); TQColor c = _cg.text(); @@ -53,7 +53,7 @@ void KUserViewItem::paintCell( TQPainter *p, const TQColorGroup &cg, if ( mUser->getDisabled() ) _cg.setColor( TQColorGroup::Text, KGlobalSettings::visitedLinkColor() ); - KListViewItem::paintCell( p, _cg, column, width, alignment ); + KListViewItem::paintCell( p, _cg, column, width, tqalignment ); _cg.setColor( TQColorGroup::Text, c ); } @@ -63,25 +63,25 @@ TQString KUserViewItem::text(int num) const switch(num) { case 0: return mUser->getCaps() & KU::KUser::Cap_POSIX ? - TQString::number( mUser->getUID() ) : TQString::null; + TQString::number( mUser->getUID() ) : TQString(); 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 ? - TQString::number( mUser->getSID().getRID() ) : TQString::null; + TQString::number( mUser->getSID().getRID() ) : TQString(); case 7: return mUser->getLoginScript(); case 8: return mUser->getProfilePath(); case 9: return mUser->getHomeDrive(); case 10: return mUser->getHomePath(); } - return TQString::null; + return TQString(); } -KUserView::KUserView(TQWidget *parent, const char *name) - : KListView( parent, name ) +KUserView::KUserView(TQWidget *tqparent, const char *name) + : KListView( tqparent, name ) { setSelectionMode( TQListView::Extended ); } diff --git a/kuser/kuservw.h b/kuser/kuservw.h index b9fa4de..fe17ecc 100644 --- a/kuser/kuservw.h +++ b/kuser/kuservw.h @@ -30,12 +30,12 @@ class KUserViewItem : public KListViewItem { public: - KUserViewItem(KListView *parent, KU::KUser *aku); + KUserViewItem(KListView *tqparent, KU::KUser *aku); KU::KUser *user() { return mUser; } private: virtual TQString text ( int ) const; virtual void paintCell( TQPainter *p, const TQColorGroup &cg, - int column, int width, int alignment ); + int column, int width, int tqalignment ); virtual int compare( TQListViewItem *i, int col, bool ascending ) const; KU::KUser *mUser; }; @@ -43,9 +43,10 @@ private: class KUserView : public KListView { Q_OBJECT + TQ_OBJECT public: - KUserView( TQWidget* parent = 0, const char* name = 0 ); + KUserView( TQWidget* tqparent = 0, const char* name = 0 ); virtual ~KUserView(); diff --git a/kuser/ldapsamba.ui b/kuser/ldapsamba.ui index b705cf7..a80e4da 100644 --- a/kuser/ldapsamba.ui +++ b/kuser/ldapsamba.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>LdapSamba</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>LdapSamba</cstring> </property> @@ -27,7 +27,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_ldapsam</cstring> </property> @@ -38,9 +38,9 @@ <string>Manage Samba user accounts/groups</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <grid> <property name="name"> @@ -54,7 +54,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel2_2_2</cstring> </property> @@ -68,7 +68,7 @@ <cstring>kcfg_samloginscript</cstring> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel4_2_2</cstring> </property> @@ -82,7 +82,7 @@ <cstring>kcfg_samhomedrive</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel3_2_2</cstring> </property> @@ -96,7 +96,7 @@ <cstring>kcfg_samprofilepath</cstring> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>textLabel5_2_2</cstring> </property> @@ -139,7 +139,7 @@ </widget> </grid> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_lanmanhash</cstring> </property> @@ -150,15 +150,15 @@ <string>Store LanManager hashed password</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout7</cstring> + <cstring>tqlayout7</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -193,7 +193,7 @@ </widget> </hbox> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -218,15 +218,15 @@ <number>41</number> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_3</cstring> </property> @@ -264,7 +264,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>40</width> <height>20</height> @@ -283,7 +283,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> @@ -355,10 +355,10 @@ <tabstop>kcfg_samdomsid</tabstop> <tabstop>domQuery</tabstop> </tabstops> -<slots> +<Q_SLOTS> <slot>kcfg_ldapsam_toggled( bool )</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kpushbutton.h</includehint> <includehint>knuminput.h</includehint> diff --git a/kuser/ldapsettings.ui b/kuser/ldapsettings.ui index 6bdd35b..9770719 100644 --- a/kuser/ldapsettings.ui +++ b/kuser/ldapsettings.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>LdapSettings</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>LdapSettings</cstring> </property> @@ -16,15 +16,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout9</cstring> + <cstring>tqlayout9</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLineEdit" row="1" column="1" rowspan="1" colspan="3"> + <widget class="TQLineEdit" row="1" column="1" rowspan="1" colspan="3"> <property name="name"> <cstring>kcfg_ldapuserfilter</cstring> </property> @@ -84,7 +84,7 @@ <cstring>kcfg_ldappasswordhash</cstring> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -95,7 +95,7 @@ <cstring>kcfg_ldapuserbase</cstring> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>textLabel1_4_2</cstring> </property> @@ -106,7 +106,7 @@ <cstring>kcfg_ldapgroupfilter</cstring> </property> </widget> - <widget class="QLabel" row="4" column="2"> + <widget class="TQLabel" row="4" column="2"> <property name="name"> <cstring>textLabel5</cstring> </property> @@ -117,7 +117,7 @@ <cstring>kcfg_ldapstructural</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel1_4</cstring> </property> @@ -133,7 +133,7 @@ <cstring>kcfg_ldapuserbase</cstring> </property> </widget> - <widget class="QLineEdit" row="3" column="1" rowspan="1" colspan="3"> + <widget class="TQLineEdit" row="3" column="1" rowspan="1" colspan="3"> <property name="name"> <cstring>kcfg_ldapgroupfilter</cstring> </property> @@ -153,7 +153,7 @@ <cstring>kcfg_ldapstructural</cstring> </property> </widget> - <widget class="QLabel" row="2" column="2"> + <widget class="TQLabel" row="2" column="2"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -184,7 +184,7 @@ <cstring>kcfg_ldapuserrdn</cstring> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -195,7 +195,7 @@ <cstring>kcfg_ldapgroupbase</cstring> </property> </widget> - <widget class="QLabel" row="0" column="2"> + <widget class="TQLabel" row="0" column="2"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -206,7 +206,7 @@ <cstring>kcfg_ldapuserrdn</cstring> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -219,7 +219,7 @@ </widget> </grid> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_ldapshadow</cstring> </property> @@ -227,7 +227,7 @@ <string>Manage shadowAccount objectclass</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_ldapcnfullname</cstring> </property> @@ -235,7 +235,7 @@ <string>Store the user's full name in the cn attribute</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_ldapgecos</cstring> </property> @@ -253,7 +253,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>40</height> @@ -274,5 +274,5 @@ <tabstop>kcfg_ldapshadow</tabstop> <tabstop>kcfg_ldapcnfullname</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kuser/mainView.cpp b/kuser/mainView.cpp index 9c9b5d8..82b5cb3 100644 --- a/kuser/mainView.cpp +++ b/kuser/mainView.cpp @@ -39,7 +39,7 @@ #include "pwddlg.h" #include "editGroup.h" -mainView::mainView(TQWidget *parent) : TQTabWidget(parent) +mainView::mainView(TQWidget *tqparent) : TQTabWidget(tqparent) { init(); } @@ -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()), TQString::null, + .tqarg(group->getName()), TQString(), KStdGuiItem::del(), i18n("Do Not Delete")) == KMessageBox::Yes) { kdDebug() << "del private group" << endl; kug->getGroups().del( group ); @@ -196,14 +196,14 @@ void mainView::useradd() */ if ( samba ) rid = SID::uid2rid( uid ); bool ok; - TQString name = KInputDialog::getText( TQString::null, + TQString name = KInputDialog::getText( TQString(), i18n("Please type the name of the new user:"), - TQString::null, &ok ); + TQString(), &ok ); if ( !ok ) return; if ( kug->getUsers().lookup( name ) ) { - KMessageBox::sorry( 0, i18n("User with name %1 already exists.").arg( name ) ); + KMessageBox::sorry( 0, i18n("User with name %1 already exists.").tqarg( name ) ); return; } @@ -217,15 +217,15 @@ void mainView::useradd() sid.setDOM( kug->getUsers().getDOMSID() ); sid.setRID( rid ); tk->setSID( sid ); - tk->setProfilePath( kug->kcfg()->samprofilepath().replace( "%U",name ) ); - tk->setHomePath( kug->kcfg()->samhomepath().replace( "%U", name ) ); + tk->setProfilePath( kug->kcfg()->samprofilepath().tqreplace( "%U",name ) ); + tk->setHomePath( kug->kcfg()->samhomepath().tqreplace( "%U", name ) ); tk->setHomeDrive( kug->kcfg()->samhomedrive() ); tk->setLoginScript( kug->kcfg()->samloginscript() ); tk->setDomain( kug->kcfg()->samdomain() ); } tk->setShell( kug->kcfg()->shell() ); - tk->setHomeDir( kug->kcfg()->homepath().replace( "%U", name ) ); + tk->setHomeDir( kug->kcfg()->homepath().tqreplace( "%U", name ) ); if ( kug->getUsers().getCaps() & KU::KUsers::Cap_Shadow || samba ) { tk->setLastChange( now() ); } @@ -305,7 +305,7 @@ 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 ), TQString::null, i18n("Change"), i18n("Do Not Change") ) == KMessageBox::No ) return; + .tqarg( count ), TQString(), i18n("Change"), i18n("Do Not Change") ) == KMessageBox::No ) return; } pwddlg d( this ); if ( d.exec() != TQDialog::Accepted ) return; @@ -444,7 +444,7 @@ void mainView::grpdel() KU::KUser *user = kug->getUsers().first(); while ( user ) { if ( user->getGID() == group->getGID() ) { - KMessageBox::error( 0, i18n( "The group '%1' is the primary group of one or more users (such as '%2'); it cannot be deleted." ).arg( group->getName() ).arg( user->getName() ) ); + KMessageBox::error( 0, i18n( "The group '%1' is the primary group of one or more users (such as '%2'); it cannot be deleted." ).tqarg( group->getName() ).tqarg( user->getName() ) ); return; } user = kug->getUsers().next(); @@ -457,13 +457,13 @@ void mainView::grpdel() case 0: return; case 1: if (KMessageBox::warningContinueCancel( 0, - i18n("Do you really want to delete the group '%1'?").arg(group->getName()), - TQString::null, KStdGuiItem::del()) != KMessageBox::Continue) return; + i18n("Do you really want to delete the group '%1'?").tqarg(group->getName()), + TQString(), KStdGuiItem::del()) != KMessageBox::Continue) return; break; default: if (KMessageBox::warningContinueCancel( 0, - i18n("Do you really want to delete the %1 selected groups?").arg(selected), - TQString::null, KStdGuiItem::del()) != KMessageBox::Continue) return; + i18n("Do you really want to delete the %1 selected groups?").tqarg(selected), + TQString(), KStdGuiItem::del()) != KMessageBox::Continue) return; } item = lbgroups->firstChild(); diff --git a/kuser/mainView.h b/kuser/mainView.h index 736cdb3..4826782 100644 --- a/kuser/mainView.h +++ b/kuser/mainView.h @@ -34,8 +34,9 @@ class mainView : public TQTabWidget { Q_OBJECT + TQ_OBJECT public: - mainView(TQWidget *parent = 0); + mainView(TQWidget *tqparent = 0); ~mainView(); void init(); diff --git a/kuser/mainWidget.cpp b/kuser/mainWidget.cpp index afdb557..95524f3 100644 --- a/kuser/mainWidget.cpp +++ b/kuser/mainWidget.cpp @@ -68,45 +68,45 @@ bool mainWidget::queryClose() void mainWidget::setupActions() { - KStdAction::quit(this, TQT_SLOT(close()), actionCollection()); + KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection()); KStdAction::keyBindings(guiFactory(), TQT_SLOT(configureShortcuts()), actionCollection()); - KStdAction::preferences(this, TQT_SLOT(properties()), actionCollection()); + KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(properties()), actionCollection()); -#define BarIconC(x) BarIcon(TQString::fromLatin1(x)) +#define BarIconC(x) BarIcon(TQString::tqfromLatin1(x)) - (void) new KAction(i18n("&Add..."), TQIconSet(BarIconC("add_user")), 0, md, + (void) new KAction(i18n("&Add..."), TQIconSet(BarIconC("add_user")), 0, TQT_TQOBJECT(md), TQT_SLOT(useradd()), actionCollection(), "add_user"); - (void) new KAction(i18n("&Edit..."), TQIconSet(BarIconC("edit_user")), 0, md, + (void) new KAction(i18n("&Edit..."), TQIconSet(BarIconC("edit_user")), 0, TQT_TQOBJECT(md), TQT_SLOT(useredit()), actionCollection(), "edit_user"); - (void) new KAction(i18n("&Delete..."), TQIconSet(BarIconC("delete_user")), 0, md, + (void) new KAction(i18n("&Delete..."), TQIconSet(BarIconC("delete_user")), 0, TQT_TQOBJECT(md), TQT_SLOT(userdel()), actionCollection(), "delete_user"); (void) new KAction(i18n("&Set Password..."), - 0, md, TQT_SLOT(setpwd()), actionCollection(), "set_password_user"); + 0, TQT_TQOBJECT(md), TQT_SLOT(setpwd()), actionCollection(), "set_password_user"); - (void) new KAction(i18n("&Add..."), TQIconSet(BarIconC("add_group")), 0, md, + (void) new KAction(i18n("&Add..."), TQIconSet(BarIconC("add_group")), 0, TQT_TQOBJECT(md), TQT_SLOT(grpadd()), actionCollection(), "add_group"); - (void) new KAction(i18n("&Edit..."), TQIconSet(BarIconC("edit_group")), 0, md, + (void) new KAction(i18n("&Edit..."), TQIconSet(BarIconC("edit_group")), 0, TQT_TQOBJECT(md), TQT_SLOT(grpedit()), actionCollection(), "edit_group"); - (void) new KAction(i18n("&Delete"), TQIconSet(BarIconC("delete_group")), 0, md, + (void) new KAction(i18n("&Delete"), TQIconSet(BarIconC("delete_group")), 0, TQT_TQOBJECT(md), TQT_SLOT(grpdel()), actionCollection(), "delete_group"); - (void) new KAction(i18n("&Reload"), TQIconSet(BarIconC("reload")), 0, this, + (void) new KAction(i18n("&Reload"), TQIconSet(BarIconC("reload")), 0, TQT_TQOBJECT(this), TQT_SLOT(reload()), actionCollection(), "reload"); #undef BarIconC (void) new KAction(i18n("&Select Connection..."), - 0, this, + 0, TQT_TQOBJECT(this), TQT_SLOT(selectconn()), actionCollection(), "select_conn"); mShowSys = new KToggleAction(i18n("Show System Users/Groups"), - 0, 0, this, + 0, 0, TQT_TQOBJECT(this), TQT_SLOT(showSys()), actionCollection(), "show_sys"); mShowSys->setCheckedState(i18n("Hide System Users/Groups")); mShowSys->setChecked( kug->kcfg()->showsys() ); @@ -172,7 +172,7 @@ void mainWidget::init() } md->reloadUsers(); md->reloadGroups(); - TQTimer::singleShot( 0, md, TQT_SLOT(slotTabChanged()) ); + TQTimer::singleShot( 0, TQT_TQOBJECT(md), TQT_SLOT(slotTabChanged()) ); } void mainWidget::slotApplySettings() diff --git a/kuser/mainWidget.h b/kuser/mainWidget.h index 840ca01..0d3de55 100644 --- a/kuser/mainWidget.h +++ b/kuser/mainWidget.h @@ -29,6 +29,7 @@ class KToggleAction; class mainWidget : public KMainWindow { Q_OBJECT + TQ_OBJECT public: mainWidget(const char *name = 0); ~mainWidget(); diff --git a/kuser/misc.cpp b/kuser/misc.cpp index c16f563..5f550be 100644 --- a/kuser/misc.cpp +++ b/kuser/misc.cpp @@ -37,13 +37,13 @@ bool backup(const TQString & name) { - TQString tmp = name + TQString::fromLatin1(KU_BACKUP_EXT); + TQString tmp = name + TQString::tqfromLatin1(KU_BACKUP_EXT); TQFile::remove( tmp ); if (copyFile(TQFile::encodeName(name), TQFile::encodeName(tmp)) == -1) { TQString str; - KMessageBox::error( 0, i18n("Can't create backup file for %1").arg(name) ); + KMessageBox::error( 0, i18n("Can't create backup file for %1").tqarg(name) ); return false; } return true; @@ -68,17 +68,17 @@ int copyFile(const TQString & from, const TQString & to) fo.setName(to); if (!fi.exists()) { - KMessageBox::error( 0, i18n("File %1 does not exist.").arg(from) ); + KMessageBox::error( 0, i18n("File %1 does not exist.").tqarg(from) ); return (-1); } if (!fi.open(IO_ReadOnly)) { - KMessageBox::error( 0, i18n("Cannot open file %1 for reading.").arg(from) ); + KMessageBox::error( 0, i18n("Cannot open file %1 for reading.").tqarg(from) ); return (-1); } if (!fo.open(IO_Raw | IO_WriteOnly | IO_Truncate)) { - KMessageBox::error( 0, i18n("Cannot open file %1 for writing.").arg(to) ); + KMessageBox::error( 0, i18n("Cannot open file %1 for writing.").tqarg(to) ); return (-1); } @@ -120,7 +120,7 @@ TQStringList readShells() void addShell(const TQString &shell) { TQStringList shells = readShells(); - if (shells.contains(shell)) + if (shells.tqcontains(shell)) return; FILE *f = fopen(SHELL_FILE,"a"); @@ -135,7 +135,7 @@ void addShell(const TQString &shell) TQCString genSalt( int len ) { TQCString salt( len + 1 ); - const char * set = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789./"; + const char * set = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPTQRSTUVWXYZ0123456789./"; salt[0] = set[getpid() % strlen(set)]; for( int i = 1; i < len; i++ ) { diff --git a/kuser/passwordpolicy.ui b/kuser/passwordpolicy.ui index 03318d4..638099b 100644 --- a/kuser/passwordpolicy.ui +++ b/kuser/passwordpolicy.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>PasswordPolicy</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>PasswordPolicy</cstring> </property> @@ -24,57 +24,57 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel1_3</cstring> </property> <property name="text"> <string>Time before password expires to issue an expire warning:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="buddy" stdset="0"> <cstring>kcfg_swarn</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel1_2</cstring> </property> <property name="text"> <string>Time when password expires after last password change:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="buddy" stdset="0"> <cstring>kcfg_smax</cstring> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>textLabel1_4</cstring> </property> <property name="text"> <string>Time when account will be disabled after expiration of password:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="buddy" stdset="0"> <cstring>kcfg_sinact</cstring> </property> </widget> - <widget class="QSpinBox" row="1" column="1"> + <widget class="TQSpinBox" row="1" column="1"> <property name="name"> <cstring>kcfg_smax</cstring> </property> @@ -91,7 +91,7 @@ <number>-1</number> </property> </widget> - <widget class="QSpinBox" row="3" column="1"> + <widget class="TQSpinBox" row="3" column="1"> <property name="name"> <cstring>kcfg_sinact</cstring> </property> @@ -108,21 +108,21 @@ <number>-1</number> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> <property name="text"> <string>Time before password may not be changed after last password change:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="buddy" stdset="0"> <cstring>kcfg_smin</cstring> </property> </widget> - <widget class="QSpinBox" row="2" column="1"> + <widget class="TQSpinBox" row="2" column="1"> <property name="name"> <cstring>kcfg_swarn</cstring> </property> @@ -139,7 +139,7 @@ <number>-1</number> </property> </widget> - <widget class="QSpinBox" row="0" column="1"> + <widget class="TQSpinBox" row="0" column="1"> <property name="name"> <cstring>kcfg_smin</cstring> </property> @@ -155,15 +155,15 @@ </widget> </grid> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -186,7 +186,7 @@ </datetime> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_sneverexpire</cstring> </property> @@ -206,7 +206,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>40</height> @@ -232,10 +232,10 @@ <tabstop>kcfg_sinact</tabstop> <tabstop>kcfg_sneverexpire</tabstop> </tabstops> -<slots> +<Q_SLOTS> <slot>kcfg_sneverexpire_toggled( bool )</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kdatetimewidget.h</includehint> <includehint>kdatewidget.h</includehint> diff --git a/kuser/propdlg.cpp b/kuser/propdlg.cpp index 17c96d4..775b837 100644 --- a/kuser/propdlg.cpp +++ b/kuser/propdlg.cpp @@ -38,40 +38,40 @@ #include "kglobal_.h" #include "misc.h" -void propdlg::addRow(TQWidget *parent, TQGridLayout *layout, int row, +void propdlg::addRow(TQWidget *tqparent, TQGridLayout *tqlayout, int row, TQWidget *widget, const TQString &label, const TQString &what, bool two_column, bool nochange) { - TQLabel *lab = new TQLabel(widget, label, parent); - lab->setMinimumSize(lab->sizeHint()); - widget->setMinimumSize(widget->sizeHint()); - layout->addWidget(lab, row, 0); + TQLabel *lab = new TQLabel(widget, label, tqparent); + lab->setMinimumSize(lab->tqsizeHint()); + widget->setMinimumSize(widget->tqsizeHint()); + tqlayout->addWidget(lab, row, 0); if (!what.isEmpty()) { TQWhatsThis::add(lab, what); TQWhatsThis::add(widget, what); } if (two_column) - layout->addMultiCellWidget(widget, row, row, 1, 2); + tqlayout->addMultiCellWidget(widget, row, row, 1, 2); else - layout->addWidget(widget, row, 1); + tqlayout->addWidget(widget, row, 1); if ( !nochange || ro ) return; - TQCheckBox *nc = new TQCheckBox( i18n("Do not change"), parent ); - layout->addWidget( nc, row, 3 ); + TQCheckBox *nc = new TQCheckBox( i18n("Do not change"), tqparent ); + tqlayout->addWidget( nc, row, 3 ); nc->hide(); mNoChanges[ widget ] = nc; } -KIntSpinBox *propdlg::addDaysGroup(TQWidget *parent, TQGridLayout *layout, int row, +KIntSpinBox *propdlg::addDaysGroup(TQWidget *tqparent, TQGridLayout *tqlayout, int row, const TQString &title, bool never) { KIntSpinBox *days; - TQLabel *label = new TQLabel( title, parent ); - layout->addMultiCellWidget( label, row, row, 0, 1, AlignRight ); + TQLabel *label = new TQLabel( title, tqparent ); + tqlayout->addMultiCellWidget( label, row, row, 0, 1, AlignRight ); - days = new KIntSpinBox( parent ); + days = new KIntSpinBox( tqparent ); label->setBuddy( days ); days->setSuffix( i18n(" days") ); days->setMaxValue( 99999 ); @@ -84,12 +84,12 @@ KIntSpinBox *propdlg::addDaysGroup(TQWidget *parent, TQGridLayout *layout, int r { days->setMinValue( 0 ); } - layout->addWidget( days, row, 2 ); + tqlayout->addWidget( days, row, 2 ); connect(days, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(changed())); - TQCheckBox *nc = new TQCheckBox( i18n("Do not change"), parent ); - layout->addWidget( nc, row, 3 ); + TQCheckBox *nc = new TQCheckBox( i18n("Do not change"), tqparent ); + tqlayout->addWidget( nc, row, 3 ); nc->hide(); mNoChanges[ days ] = nc; @@ -105,44 +105,44 @@ void propdlg::initDlg() // Tab 1: User Info { TQFrame *frame = addPage(i18n("User Info")); - TQGridLayout *layout = new TQGridLayout(frame, 20, 4, marginHint(), spacingHint()); + TQGridLayout *tqlayout = new TQGridLayout(frame, 20, 4, marginHint(), spacingHint()); int row = 0; frontpage = frame; - frontlayout = layout; + fronttqlayout = tqlayout; lbuser = new TQLabel(frame); // whatstr = i18n("WHAT IS THIS: User login"); - addRow(frame, layout, row++, lbuser, i18n("User login:"), whatstr, false, false); + addRow(frame, tqlayout, row++, lbuser, i18n("User login:"), whatstr, false, false); leid = new KLineEdit(frame); // whatstr = i18n("WHAT IS THIS: User Id"); - leid->setValidator(new TQIntValidator(frame)); - addRow(frame, layout, row++, leid, i18n("&User ID:"), whatstr); + leid->setValidator(new TQIntValidator(TQT_TQOBJECT(frame))); + addRow(frame, tqlayout, row++, leid, i18n("&User ID:"), whatstr); connect(leid, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); if ( !ro ) { pbsetpwd = new TQPushButton(i18n("Set &Password..."), frame); - layout->addWidget(pbsetpwd, 0, 2); + tqlayout->addWidget(pbsetpwd, 0, 2); 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); + addRow(frame, tqlayout, row++, lefname, i18n("Full &name:"), whatstr); 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); + addRow(frame, tqlayout, row++, lesurname, i18n("Surname:"), whatstr); 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); + addRow(frame, tqlayout, row++, lemail, i18n("Email address:"), whatstr); connect(lemail, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); } @@ -156,12 +156,12 @@ void propdlg::initDlg() 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); + addRow(frame, tqlayout, row++, leshell, i18n("&Login shell:"), whatstr); lehome = new KLineEdit(frame); 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); + addRow(frame, tqlayout, row++, lehome, i18n("&Home folder:"), whatstr); // FreeBSD appears to use the comma separated fields in the GECOS entry // differently than Linux. @@ -169,47 +169,47 @@ void propdlg::initDlg() leoffice = new KLineEdit(frame); 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); + addRow(frame, tqlayout, row++, leoffice, i18n("&Office:"), whatstr); leophone = new KLineEdit(frame); 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); + addRow(frame, tqlayout, row++, leophone, i18n("Offi&ce Phone:"), whatstr); lehphone = new KLineEdit(frame); 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); + addRow(frame, tqlayout, row++, lehphone, i18n("Ho&me Phone:"), whatstr); leclass = new KLineEdit(frame); 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); + addRow(frame, tqlayout, row++, leclass, i18n("Login class:"), whatstr, true); } else { leoffice1 = new KLineEdit(frame); 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); + addRow(frame, tqlayout, row++, leoffice1, i18n("&Office #1:"), whatstr); leoffice2 = new KLineEdit(frame); 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); + addRow(frame, tqlayout, row++, leoffice2, i18n("O&ffice #2:"), whatstr); leaddress = new KLineEdit(frame); 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); + addRow(frame, tqlayout, row++, leaddress, i18n("&Address:"), whatstr); } cbdisabled = new TQCheckBox(frame); connect(cbdisabled, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed())); - addRow(frame, layout, row++, cbdisabled, i18n("Account &disabled"), whatstr); + addRow(frame, tqlayout, row++, cbdisabled, i18n("Account &disabled"), whatstr); if ( kug->getUsers().getCaps() & KU::KUsers::Cap_Disable_POSIX ) { 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); + addRow(frame, tqlayout, row++, cbposix, i18n("Disable &POSIX account information"), whatstr); } else { cbposix = 0; } @@ -222,40 +222,40 @@ void propdlg::initDlg() // Tab 2 : Password Management TQFrame *frame = addPage(i18n("Password Management")); - TQGridLayout *layout = new TQGridLayout(frame, 20, 4, marginHint(), spacingHint()); + TQGridLayout *tqlayout = new TQGridLayout(frame, 20, 4, marginHint(), spacingHint()); int row = 0; TQDateTime time; leslstchg = new TQLabel(frame); - addRow(frame, layout, row++, leslstchg, i18n("Last password change:"), TQString::null, true); + addRow(frame, tqlayout, row++, leslstchg, i18n("Last password change:"), TQString(), true); - layout->addMultiCellWidget(new KSeparator(KSeparator::HLine, frame), row, row, 0, 3); + tqlayout->addMultiCellWidget(new KSeparator(KSeparator::HLine, frame), row, row, 0, 3); row++; if ( kug->getUsers().getCaps() & KU::KUsers::Cap_Shadow ) { - layout->addWidget( new TQLabel( i18n("POSIX parameters:"), frame ), row++, 0 ); - lesmin = addDaysGroup(frame, layout, row++, i18n("Time before password may ¬ 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:")); - lesinact = addDaysGroup(frame, layout, row++, i18n("Time when account will be &disabled after expiration of password:")); - layout->addMultiCellWidget(new KSeparator(KSeparator::HLine, frame), row, row, 0, 3); + tqlayout->addWidget( new TQLabel( i18n("POSIX parameters:"), frame ), row++, 0 ); + lesmin = addDaysGroup(frame, tqlayout, row++, i18n("Time before password may ¬ be changed after last password change:"), false); + lesmax = addDaysGroup(frame, tqlayout, row++, i18n("Time when password &expires after last password change:") ); + leswarn = addDaysGroup(frame, tqlayout, row++, i18n("Time before password expires to &issue an expire warning:")); + lesinact = addDaysGroup(frame, tqlayout, row++, i18n("Time when account will be &disabled after expiration of password:")); + tqlayout->addMultiCellWidget(new KSeparator(KSeparator::HLine, frame), row, row, 0, 3); row++; } /* if ( kug->getUsers().getCaps() & KU::KUsers::Cap_Samba ) { - layout->addWidget( new TQLabel( "SAMBA parameters:", frame ), row++, 0 ); - layout->addMultiCellWidget(new KSeparator(KSeparator::HLine, frame), row, row, 0, 3); + tqlayout->addWidget( new TQLabel( "SAMBA parameters:", frame ), row++, 0 ); + tqlayout->addMultiCellWidget(new KSeparator(KSeparator::HLine, frame), row, row, 0, 3); row++; } */ TQLabel *label = new TQLabel( i18n("&Account will expire on:"), frame ); - layout->addWidget( label, row, 0 ); + tqlayout->addWidget( label, row, 0 ); lesexpire = new KDateTimeWidget( frame ); label->setBuddy( lesexpire ); - layout->addMultiCellWidget( lesexpire, row, row, 1, 2); + tqlayout->addMultiCellWidget( lesexpire, row, row, 1, 2); cbexpire = new TQCheckBox( i18n("Never"), frame ); - layout->addWidget( cbexpire, row++, 3 ); + tqlayout->addWidget( cbexpire, row++, 3 ); connect( lesexpire, TQT_SIGNAL(valueChanged(const TQDateTime&)), this, TQT_SLOT(changed()) ); connect( cbexpire, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed()) ); @@ -265,60 +265,60 @@ void propdlg::initDlg() // Tab 3: Samba if ( kug->getUsers().getCaps() & KU::KUsers::Cap_Samba ) { TQFrame *frame = addPage(i18n("Samba")); - TQGridLayout *layout = new TQGridLayout(frame, 10, 4, marginHint(), spacingHint()); + TQGridLayout *tqlayout = new TQGridLayout(frame, 10, 4, marginHint(), spacingHint()); int row = 0; lerid = new KLineEdit(frame); // whatstr = i18n("WHAT IS THIS: Rid"); - lerid->setValidator(new TQIntValidator(frame)); - addRow(frame, layout, row++, lerid, i18n("RID:"), whatstr); + lerid->setValidator(new TQIntValidator(TQT_TQOBJECT(frame))); + addRow(frame, tqlayout, row++, lerid, i18n("RID:"), whatstr); 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); + addRow(frame, tqlayout, row++, leliscript, i18n("Login script:"), whatstr); 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); + addRow(frame, tqlayout, row++, leprofile, i18n("Profile path:"), whatstr); 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); + addRow(frame, tqlayout, row++, lehomedrive, i18n("Home drive:"), whatstr); 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); + addRow(frame, tqlayout, row++, lehomepath, i18n("Home path:"), whatstr); 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); + addRow(frame, tqlayout, row++, leworkstations, i18n("User workstations:"), whatstr); 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); + addRow(frame, tqlayout, row++, ledomain, i18n("Domain name:"), whatstr); 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); + addRow(frame, tqlayout, row++, ledomsid, i18n("Domain SID:"), whatstr); connect(ledomsid, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); 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); + addRow(frame, tqlayout, row++, cbsamba, i18n("Disable &Samba account information"), whatstr); } // Tab 4: Groups { TQFrame *frame = addPage(i18n("Groups")); - TQGridLayout *layout = new TQGridLayout(frame, 2, 2, marginHint(), spacingHint()); + TQGridLayout *tqlayout = new TQGridLayout(frame, 2, 2, marginHint(), spacingHint()); lstgrp = new KListView(frame); lstgrp->setFullWidth(true); // Single column, full widget width. @@ -326,12 +326,12 @@ void propdlg::initDlg() 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); + tqlayout->addMultiCellWidget(lstgrp, 0, 0, 0, 1); leprigr = new TQLabel( i18n("Primary group: "), frame ); - layout->addWidget( leprigr, 1, 0 ); + tqlayout->addWidget( leprigr, 1, 0 ); if ( !ro ) { pbprigr = new TQPushButton( i18n("Set as Primary"), frame ); - layout->addWidget( pbprigr, 1, 1 ); + tqlayout->addWidget( pbprigr, 1, 1 ); connect( pbprigr, TQT_SIGNAL(clicked()), this, TQT_SLOT(setpgroup()) ); } connect( lstgrp, TQT_SIGNAL(clicked(TQListViewItem *)), this, TQT_SLOT(gchanged()) ); @@ -340,13 +340,13 @@ void propdlg::initDlg() } propdlg::propdlg( const TQPtrList<KU::KUser> &users, - TQWidget *parent, const char *name ) : - KDialogBase(Tabbed, i18n("User Properties"), Ok | Cancel, Ok, parent, name, true) + TQWidget *tqparent, const char *name ) : + KDialogBase(Tabbed, i18n("User Properties"), Ok | Cancel, Ok, tqparent, name, true) { mUsers = users; if ( mUsers.getFirst() != mUsers.getLast() ) - setCaption( i18n("User Properties - %1 Selected Users").arg( mUsers.count() ) ); + setCaption( i18n("User Properties - %1 Selected Users").tqarg( mUsers.count() ) ); initDlg(); loadgroups( false ); selectuser(); @@ -355,8 +355,8 @@ propdlg::propdlg( const TQPtrList<KU::KUser> &users, } propdlg::propdlg( KU::KUser *AUser, bool fixedprivgroup, - TQWidget *parent, const char *name ) : - KDialogBase(Tabbed, i18n("User Properties"), Ok | Cancel, Ok, parent, name, true) + TQWidget *tqparent, const char *name ) : + KDialogBase(Tabbed, i18n("User Properties"), Ok | Cancel, Ok, tqparent, name, true) { mUsers.append( AUser ); @@ -408,7 +408,7 @@ void propdlg::setLE( KLineEdit *le, const TQString &val, bool first ) if ( val.isEmpty() && le->text().isEmpty() ) return; if ( le->text() != val ) { le->setText( "" ); - if ( !ro && mNoChanges.contains( le ) ) { + if ( !ro && mNoChanges.tqcontains( le ) ) { mNoChanges[ le ]->show(); mNoChanges[ le ]->setChecked( true ); } @@ -437,7 +437,7 @@ void propdlg::setSB( KIntSpinBox *sb, int val, bool first ) } if ( sb->value() != val ) { sb->setValue( 0 ); - if ( !ro && mNoChanges.contains( sb ) ) { + if ( !ro && mNoChanges.tqcontains( sb ) ) { mNoChanges[ sb ]->show(); mNoChanges[ sb ]->setChecked( true ); } @@ -485,7 +485,7 @@ void propdlg::selectuser() setLE( lefname, user->getFullName(), first ); TQString home; home = user->getHomeDir(); - if ( !one ) home.replace( user->getName(), "%U" ); + if ( !one ) home.tqreplace( user->getName(), "%U" ); setLE( lehome, home, first ); TQString shell = user->getShell(); @@ -523,11 +523,11 @@ void propdlg::selectuser() setLE( leliscript, user->getLoginScript(), first ); TQString profile; profile = user->getProfilePath(); - if ( !one ) profile.replace( user->getName(), "%U" ); + if ( !one ) profile.tqreplace( user->getName(), "%U" ); setLE( leprofile, profile, first ); setLE( lehomedrive, user->getHomeDrive(), first ); home = user->getHomePath(); - if ( !one ) home.replace( user->getName(), "%U" ); + if ( !one ) home.tqreplace( user->getName(), "%U" ); setLE( lehomepath, home, first ); setLE( leworkstations, user->getWorkstations(), first ); setLE( ledomain, user->getDomain(), first ); @@ -658,14 +658,14 @@ void propdlg::setpgroup() { item->setEnabled(true); item->setOn(prevPrimaryGroupWasOn); - item->repaint(); + item->tqrepaint(); } if ( groupName == primaryGroup ) { primaryGroupWasOn = item->isOn(); item->setEnabled(false); item->setOn(true); - item->repaint(); + item->tqrepaint(); } item = (TQCheckListItem *) item->nextSibling(); @@ -676,7 +676,7 @@ void propdlg::setpgroup() void propdlg::changed() { TQWidget *widget = (TQWidget*) sender(); - if ( mNoChanges.contains( widget ) ) mNoChanges[ widget ]->setChecked( false ); + if ( mNoChanges.tqcontains( widget ) ) mNoChanges[ widget ]->setChecked( false ); ischanged = true; kdDebug() << "changed" << endl; } @@ -689,14 +689,14 @@ void propdlg::gchanged() TQString propdlg::mergeLE( KLineEdit *le, const TQString &val, bool one ) { TQCheckBox *cb = 0; - if ( mNoChanges.contains( le ) ) cb = mNoChanges[ le ]; + if ( mNoChanges.tqcontains( le ) ) cb = mNoChanges[ le ]; return ( one || ( cb && !cb->isChecked() ) ) ? le->text() : val; } int propdlg::mergeSB( KIntSpinBox *sb, int val, bool one ) { TQCheckBox *cb = 0; - if ( mNoChanges.contains( sb ) ) cb = mNoChanges[ sb ]; + if ( mNoChanges.tqcontains( sb ) ) cb = mNoChanges[ sb ]; return ( one || ( cb && !cb->isChecked() ) ) ? sb->value() : val; } @@ -743,17 +743,17 @@ void propdlg::mergeUser( KU::KUser *user, KU::KUser *newuser ) } newuser->setSID( sid ); newuser->setLoginScript( samba ? - mergeLE( leliscript, user->getLoginScript(), one ) : TQString::null ); + mergeLE( leliscript, user->getLoginScript(), one ) : TQString() ); newuser->setProfilePath( samba ? - mergeLE( leprofile, user->getProfilePath(), one ).replace( "%U", newuser->getName() ) : TQString::null ); + mergeLE( leprofile, user->getProfilePath(), one ).tqreplace( "%U", newuser->getName() ) : TQString() ); newuser->setHomeDrive( samba ? - mergeLE( lehomedrive, user->getHomeDrive(), one ) : TQString::null ); + mergeLE( lehomedrive, user->getHomeDrive(), one ) : TQString() ); newuser->setHomePath( samba ? - mergeLE( lehomepath, user->getHomePath(), one ).replace( "%U", newuser->getName() ) : TQString::null ); + mergeLE( lehomepath, user->getHomePath(), one ).tqreplace( "%U", newuser->getName() ) : TQString() ); newuser->setWorkstations( samba ? - mergeLE( leworkstations, user->getWorkstations(), one ) : TQString::null ); + mergeLE( leworkstations, user->getWorkstations(), one ) : TQString() ); newuser->setDomain( samba ? - mergeLE( ledomain, user->getDomain(), one ) : TQString::null ); + mergeLE( ledomain, user->getDomain(), one ) : TQString() ); } if ( kug->getUsers().getCaps() & KU::KUsers::Cap_BSD ) { @@ -768,8 +768,8 @@ void propdlg::mergeUser( KU::KUser *user, KU::KUser *newuser ) } newuser->setHomeDir( posix ? - mergeLE( lehome, user->getHomeDir(), one ).replace( "%U", newuser->getName() ) : - TQString::null ); + mergeLE( lehome, user->getHomeDir(), one ).tqreplace( "%U", newuser->getName() ) : + TQString() ); if ( posix ) { if ( leshell->currentItem() == 0 && ismoreshells ) { newuser->setShell( user->getShell() ); @@ -777,13 +777,13 @@ void propdlg::mergeUser( KU::KUser *user, KU::KUser *newuser ) ( leshell->currentItem() == 0 && !ismoreshells ) || ( leshell->currentItem() == 1 && ismoreshells ) ) { - newuser->setShell( TQString::null ); + newuser->setShell( TQString() ); } else { // TODO: Check shell. newuser->setShell( leshell->currentText() ); } } else - newuser->setShell( TQString::null ); + newuser->setShell( TQString() ); newuser->setDisabled( (cbdisabled->state() == TQButton::NoChange) ? user->getDisabled() : cbdisabled->isChecked() ); @@ -870,7 +870,7 @@ bool propdlg::checkShell(const TQString &shell) if (shell.isEmpty()) return true; TQStringList shells = readShells(); - return shells.contains(shell); + return shells.tqcontains(shell); } bool propdlg::check() @@ -941,7 +941,7 @@ void propdlg::slotOk() { if (kug->getUsers().lookup(newuid)) { KMessageBox::sorry( 0, - i18n("User with UID %1 already exists").arg(newuid) ); + i18n("User with UID %1 already exists").tqarg(newuid) ); return; } } @@ -951,7 +951,7 @@ void propdlg::slotOk() if ( oldrid != newrid ) { if (kug->getUsers().lookup_sam(newrid)) { KMessageBox::sorry( 0, - i18n("User with RID %1 already exists").arg(newrid) ); + i18n("User with RID %1 already exists").tqarg(newrid) ); return; } } @@ -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(TQFile::decodeName(SHELL_FILE)), + "<p>Do you want to add it now?").tqarg(newshell).tqarg(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 a1dc85d..d8151b2 100644 --- a/kuser/propdlg.h +++ b/kuser/propdlg.h @@ -42,12 +42,13 @@ class propdlg : public KDialogBase { Q_OBJECT + TQ_OBJECT public: propdlg( const TQPtrList<KU::KUser> &users, - TQWidget *parent = 0, const char *name = 0 ); + TQWidget *tqparent = 0, const char *name = 0 ); propdlg( KU::KUser *AUser, bool fixedprivgroup, - TQWidget *parent = 0, const char *name = 0 ); + TQWidget *tqparent = 0, const char *name = 0 ); ~propdlg(); void mergeUser( KU::KUser *user, KU::KUser *newuser ); @@ -69,7 +70,7 @@ protected: bool check(); void loadgroups( bool fixedprivgroup ); bool checkShell(const TQString &shell); - void addRow( TQWidget *parent, TQGridLayout *layout, int row, + void addRow( TQWidget *tqparent, TQGridLayout *tqlayout, int row, TQWidget *widget, const TQString &label, const TQString &what, bool two_column=true, bool nochange=true ); void setLE( KLineEdit *le, const TQString &val, bool first ); @@ -78,11 +79,11 @@ protected: TQString mergeLE( KLineEdit *le, const TQString &val, bool one ); int mergeSB( KIntSpinBox *sb, int val, bool one ); - KIntSpinBox *addDaysGroup( TQWidget *parent, TQGridLayout *layout, int row, + KIntSpinBox *addDaysGroup( TQWidget *tqparent, TQGridLayout *tqlayout, int row, const TQString &title, bool never=true ); TQFrame *frontpage; - TQGridLayout *frontlayout; + TQGridLayout *fronttqlayout; int frontrow; TQPtrList<KU::KUser> mUsers; diff --git a/kuser/pwddlg.cpp b/kuser/pwddlg.cpp index a6f531e..d25267c 100644 --- a/kuser/pwddlg.cpp +++ b/kuser/pwddlg.cpp @@ -25,21 +25,21 @@ #include "pwddlg.h" #include "misc.h" -pwddlg::pwddlg( TQWidget* parent, const char* name ) - : KDialogBase(parent, name, true, i18n("Enter Password"), Ok | Cancel, Ok, true) +pwddlg::pwddlg( TQWidget* tqparent, const char* name ) + : KDialogBase(tqparent, name, true, i18n("Enter Password"), Ok | Cancel, Ok, true) { - TQGrid *page = makeGridMainWidget(2, TQGrid::Horizontal); + TQGrid *page = makeGridMainWidget(2, Qt::Horizontal); TQLabel* lb1 = new TQLabel(page, "lb1"); lb1->setText(i18n("Password:")); - lb1->setMinimumSize(lb1->sizeHint()); - lb1->setAlignment(AlignRight|AlignVCenter); + lb1->setMinimumSize(lb1->tqsizeHint()); + lb1->tqsetAlignment(AlignRight|AlignVCenter); lepw1 = new KLineEdit(page, "LineEdit_1"); // ensure it fits at least 12 characters lepw1->setText( "XXXXXXXXXXXX" ); - lepw1->setMinimumSize(lepw1->sizeHint()); + lepw1->setMinimumSize(lepw1->tqsizeHint()); // clear text lepw1->clear(); @@ -48,14 +48,14 @@ pwddlg::pwddlg( TQWidget* parent, const char* name ) TQLabel* lb2 = new TQLabel(page, "lb2"); lb2->setText(i18n("Verify:")); - lb2->setMinimumSize(lb2->sizeHint()); - lb2->setAlignment(AlignRight|AlignVCenter); + lb2->setMinimumSize(lb2->tqsizeHint()); + lb2->tqsetAlignment(AlignRight|AlignVCenter); lepw2 = new KLineEdit(page, "LineEdit_2"); // ensure it fits at least 12 characters lepw2->setText( "XXXXXXXXXXXX" ); - lepw2->setMinimumSize(lepw2->sizeHint()); + lepw2->setMinimumSize(lepw2->tqsizeHint()); // clear text lepw2->clear(); diff --git a/kuser/pwddlg.h b/kuser/pwddlg.h index 4f90392..2f1b924 100644 --- a/kuser/pwddlg.h +++ b/kuser/pwddlg.h @@ -27,9 +27,10 @@ class pwddlg : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - pwddlg( TQWidget* parent = NULL, const char* name = NULL ); + pwddlg( TQWidget* tqparent = NULL, const char* name = NULL ); ~pwddlg(); TQString getPassword() const; diff --git a/kuser/selectconn.cpp b/kuser/selectconn.cpp index 138c9ce..d661fb1 100644 --- a/kuser/selectconn.cpp +++ b/kuser/selectconn.cpp @@ -33,8 +33,8 @@ #include "selectconn.h" #include "editDefaults.h" -SelectConn::SelectConn(const TQString &selected, TQWidget* parent, const char * name) : - KDialogBase( Plain, WStyle_DialogBorder, parent, name, true, +SelectConn::SelectConn(const TQString &selected, TQWidget* tqparent, const char * name) : + KDialogBase( Plain, WStyle_DialogBorder, tqparent, name, true, i18n("Connection Selection"), Ok | Apply | Cancel | User1 | User2 | User3 ) { TQStringList conns; @@ -77,10 +77,10 @@ TQString SelectConn::connSelected() void SelectConn::slotUser3() { - newconn = KInputDialog::getText( TQString::null, + newconn = KInputDialog::getText( TQString(), i18n("Please type the name of the new connection:") ); if ( newconn.isEmpty() ) return; - if ( kapp->sharedConfig()->groupList().contains( "connection-" + newconn ) ) { + if ( kapp->sharedConfig()->groupList().tqcontains( "connection-" + newconn ) ) { KMessageBox::sorry( 0, i18n("A connection with this name already exists.") ); return; } diff --git a/kuser/selectconn.h b/kuser/selectconn.h index d201a39..53f03d4 100644 --- a/kuser/selectconn.h +++ b/kuser/selectconn.h @@ -24,8 +24,9 @@ class SelectConn : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - SelectConn( const TQString &selected, TQWidget* parent, const char * name); + SelectConn( const TQString &selected, TQWidget* tqparent, const char * name); TQString connSelected(); protected slots: void slotUser1(); diff --git a/kuser/sha1.cpp b/kuser/sha1.cpp index 6d8a1f0..ba89f06 100644 --- a/kuser/sha1.cpp +++ b/kuser/sha1.cpp @@ -27,7 +27,7 @@ #define SHA1_DIGEST_SIZE 20 #define SHA1_HMAC_BLOCK_SIZE 64 -static inline Q_UINT32 rol(Q_UINT32 value, Q_UINT32 bits) +static inline TQ_UINT32 rol(TQ_UINT32 value, TQ_UINT32 bits) { return (((value) << (bits)) | ((value) >> (32 - (bits)))); } @@ -50,20 +50,20 @@ static inline Q_UINT32 rol(Q_UINT32 value, Q_UINT32 bits) #define R4(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0xCA62C1D6+rol(v,5);w=rol(w,30); /* Hash a single 512-bit block. This is the core of the algorithm. */ -static void sha1_transform(Q_UINT32 *state, const Q_UINT8 *in) +static void sha1_transform(TQ_UINT32 *state, const TQ_UINT8 *in) { - Q_UINT32 a, b, c, d, e; - Q_UINT32 block32[16]; + TQ_UINT32 a, b, c, d, e; + TQ_UINT32 block32[16]; /* convert/copy data to workspace */ - for (a = 0; a < sizeof(block32)/sizeof(Q_UINT32); a++) + for (a = 0; a < sizeof(block32)/sizeof(TQ_UINT32); a++) #ifdef WORDS_BIGENDIAN - block32[a] = ((const Q_UINT32 *)in)[a]; + block32[a] = ((const TQ_UINT32 *)in)[a]; #else - block32[a] = ((const Q_UINT32 *)in)[a] >> 24 | - (((const Q_UINT32 *)in)[a] >> 8 & 0x0000ff00) | - (((const Q_UINT32 *)in)[a] << 8 & 0x00ff0000) | - (((const Q_UINT32 *)in)[a] << 24); + block32[a] = ((const TQ_UINT32 *)in)[a] >> 24 | + (((const TQ_UINT32 *)in)[a] >> 8 & 0x0000ff00) | + (((const TQ_UINT32 *)in)[a] << 8 & 0x00ff0000) | + (((const TQ_UINT32 *)in)[a] << 24); #endif /* Copy context->state[] to working vars */ a = state[0]; @@ -116,7 +116,7 @@ void sha1_init(void *ctx) *sctx = initstate; } -void sha1_update(void *ctx, const Q_UINT8 *data, unsigned int len) +void sha1_update(void *ctx, const TQ_UINT8 *data, unsigned int len) { struct sha1_ctx *sctx = (sha1_ctx*) ctx; unsigned int i, j; @@ -138,13 +138,13 @@ void sha1_update(void *ctx, const Q_UINT8 *data, unsigned int len) /* Add padding and return the message digest. */ -void sha1_final(void* ctx, Q_UINT8 *out) +void sha1_final(void* ctx, TQ_UINT8 *out) { struct sha1_ctx *sctx = (sha1_ctx*) ctx; - Q_UINT32 i, j, index, padlen; - Q_UINT64 t; - Q_UINT8 bits[8] = { 0, }; - static const Q_UINT8 padding[64] = { 0x80, }; + TQ_UINT32 i, j, index, padlen; + TQ_UINT64 t; + TQ_UINT8 bits[8] = { 0, }; + static const TQ_UINT8 padding[64] = { 0x80, }; t = sctx->count; bits[7] = 0xff & t; t>>=8; @@ -166,7 +166,7 @@ void sha1_final(void* ctx, Q_UINT8 *out) /* Store state in digest */ for (i = j = 0; i < 5; i++, j += 4) { - Q_UINT32 t2 = sctx->state[i]; + TQ_UINT32 t2 = sctx->state[i]; out[j+3] = t2 & 0xff; t2>>=8; out[j+2] = t2 & 0xff; t2>>=8; out[j+1] = t2 & 0xff; t2>>=8; diff --git a/kuser/sha1.h b/kuser/sha1.h index 8fa2d66..a853db4 100644 --- a/kuser/sha1.h +++ b/kuser/sha1.h @@ -24,13 +24,13 @@ #include <tqglobal.h> struct sha1_ctx { - Q_UINT64 count; - Q_UINT32 state[5]; - Q_UINT8 buffer[64]; + TQ_UINT64 count; + TQ_UINT32 state[5]; + TQ_UINT8 buffer[64]; }; void sha1_init(void *ctx); -void sha1_update(void *ctx, const Q_UINT8 *data, unsigned int len); -void sha1_final(void* ctx, Q_UINT8 *out); +void sha1_update(void *ctx, const TQ_UINT8 *data, unsigned int len); +void sha1_final(void* ctx, TQ_UINT8 *out); #endif diff --git a/kuser/sid.cpp b/kuser/sid.cpp index 01cdf0e..5608129 100644 --- a/kuser/sid.cpp +++ b/kuser/sid.cpp @@ -30,7 +30,7 @@ uint SID::mAlgRidBase = 1000; SID::SID() { - mRid = 0; mSid = TQString::null; mDom = TQString::null; + mRid = 0; mSid = TQString(); mDom = TQString(); } SID::SID( const SID &sid ) @@ -74,7 +74,7 @@ bool SID::isEmpty() const void SID::updateSID() { - mSid = mDom + TQString::fromLatin1("-") + TQString::number( mRid ); + mSid = mDom + TQString::tqfromLatin1("-") + TQString::number( mRid ); } void SID::setSID( const TQString &sid ) @@ -83,7 +83,7 @@ void SID::setSID( const TQString &sid ) TQString rid; mSid = sid; - pos = sid.findRev( '-' ); + pos = sid.tqfindRev( '-' ); mDom = sid.left( pos ); rid = sid.right( sid.length() - pos - 1 ); mRid = rid.toUInt(); |