diff options
Diffstat (limited to 'filesharing/advanced/kcm_sambaconf/kcmsambaconf.cpp')
-rw-r--r-- | filesharing/advanced/kcm_sambaconf/kcmsambaconf.cpp | 234 |
1 files changed, 117 insertions, 117 deletions
diff --git a/filesharing/advanced/kcm_sambaconf/kcmsambaconf.cpp b/filesharing/advanced/kcm_sambaconf/kcmsambaconf.cpp index eb073c0c..78f3c7fb 100644 --- a/filesharing/advanced/kcm_sambaconf/kcmsambaconf.cpp +++ b/filesharing/advanced/kcm_sambaconf/kcmsambaconf.cpp @@ -32,17 +32,17 @@ #include <assert.h> #include <unistd.h> -#include <qlayout.h> -#include <qgroupbox.h> -#include <qpainter.h> -#include <qcheckbox.h> -#include <qlistbox.h> -#include <qradiobutton.h> -#include <qbuttongroup.h> -#include <qtabwidget.h> -#include <qtabbar.h> -#include <qvbox.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqgroupbox.h> +#include <tqpainter.h> +#include <tqcheckbox.h> +#include <tqlistbox.h> +#include <tqradiobutton.h> +#include <tqbuttongroup.h> +#include <tqtabwidget.h> +#include <tqtabbar.h> +#include <tqvbox.h> +#include <tqlabel.h> #include <klocale.h> #include <kglobal.h> @@ -75,8 +75,8 @@ #define COL_NOPASSWORD 3 -ShareListViewItem::ShareListViewItem(QListView * parent, SambaShare* share) - : QListViewItem(parent) +ShareListViewItem::ShareListViewItem(TQListView * parent, SambaShare* share) + : TQListViewItem(parent) { setShare(share); } @@ -120,7 +120,7 @@ void ShareListViewItem::updateShare() setPixmap(3,createPropertyPixmap()); } -QPixmap ShareListViewItem::createPropertyPixmap() +TQPixmap ShareListViewItem::createPropertyPixmap() { // Create a big pixmap wich holds the // icons which are needed @@ -133,11 +133,11 @@ QPixmap ShareListViewItem::createPropertyPixmap() int totalWidth = (w+margin)*numberOfPix; - QPixmap pix(totalWidth,h); + TQPixmap pix(totalWidth,h); pix.fill(); // Fill with white - QPainter p(&pix); + TQPainter p(&pix); int x = 0; @@ -171,10 +171,10 @@ QPixmap ShareListViewItem::createPropertyPixmap() p.end(); - return QPixmap(pix); + return TQPixmap(pix); } -KcmSambaConf::KcmSambaConf(QWidget *parent, const char *name) +KcmSambaConf::KcmSambaConf(TQWidget *parent, const char *name) : KCModule(parent,name) { _dictMngr = 0L; @@ -182,10 +182,10 @@ KcmSambaConf::KcmSambaConf(QWidget *parent, const char *name) m_smbConfConfigWidget = 0L; - QBoxLayout * l = new QHBoxLayout( this ); + TQBoxLayout * l = new TQHBoxLayout( this ); l->setAutoAdd( TRUE ); - QString smbFile = SambaFile::findSambaConf(); + TQString smbFile = SambaFile::findSambaConf(); if (smbFile.isNull()) { createSmbConfigWidget(); return; @@ -202,11 +202,11 @@ KcmSambaConf::~KcmSambaConf() { void KcmSambaConf::createSmbConfigWidget() { m_smbConfConfigWidget = new SmbConfConfigWidget(this); - connect( m_smbConfConfigWidget, SIGNAL(smbConfChoosed(const QString &)), - this, SLOT(slotSpecifySmbConf(const QString &))); + connect( m_smbConfConfigWidget, TQT_SIGNAL(smbConfChoosed(const TQString &)), + this, TQT_SLOT(slotSpecifySmbConf(const TQString &))); } -void KcmSambaConf::slotSpecifySmbConf(const QString & smbConf) { +void KcmSambaConf::slotSpecifySmbConf(const TQString & smbConf) { if (m_smbConfConfigWidget) { m_smbConfConfigWidget->hide(); } @@ -218,7 +218,7 @@ void KcmSambaConf::slotSpecifySmbConf(const QString & smbConf) { if (getuid() != 0) { for (int i=0;i<_interface->mainTab->count();i++) { - QWidget* w = _interface->mainTab->page(i); + TQWidget* w = _interface->mainTab->page(i); w->setEnabled(false); } } @@ -231,61 +231,61 @@ void KcmSambaConf::init() { _interface = new KcmInterface(this); - connect ( _interface->sambaUserPasswordBtn, SIGNAL(clicked()), this, SLOT(sambaUserPasswordBtnClicked())); + connect ( _interface->sambaUserPasswordBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(sambaUserPasswordBtnClicked())); - connect ( _interface->editShareBtn, SIGNAL(clicked()), this, SLOT(editShare())); - connect ( _interface->addShareBtn, SIGNAL(clicked()), this, SLOT(addShare())); - connect ( _interface->removeShareBtn, SIGNAL(clicked()), this, SLOT(removeShare())); + connect ( _interface->editShareBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(editShare())); + connect ( _interface->addShareBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(addShare())); + connect ( _interface->removeShareBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(removeShare())); - connect ( _interface->editPrinterBtn, SIGNAL(clicked()), this, SLOT(editPrinter())); - connect ( _interface->addPrinterBtn, SIGNAL(clicked()), this, SLOT(addPrinter())); - connect ( _interface->removePrinterBtn, SIGNAL(clicked()), this, SLOT(removePrinter())); + connect ( _interface->editPrinterBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(editPrinter())); + connect ( _interface->addPrinterBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(addPrinter())); + connect ( _interface->removePrinterBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(removePrinter())); - connect ( _interface->editDefaultPrinterBtn, SIGNAL(clicked()), this, SLOT(editPrinterDefaults())); - connect ( _interface->editDefaultShareBtn, SIGNAL(clicked()), this, SLOT(editShareDefaults())); + connect ( _interface->editDefaultPrinterBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(editPrinterDefaults())); + connect ( _interface->editDefaultShareBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(editShareDefaults())); - connect( _interface->domainRadio, SIGNAL(toggled(bool)), - _interface->joinADomainBtn, SLOT( setEnabled(bool) )); + connect( _interface->domainRadio, TQT_SIGNAL(toggled(bool)), + _interface->joinADomainBtn, TQT_SLOT( setEnabled(bool) )); - connect(_interface->nullPasswordsChk,SIGNAL(toggled(bool)), - this, SLOT(nullPasswordsEnabled(bool))); + connect(_interface->nullPasswordsChk,TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(nullPasswordsEnabled(bool))); - connect( _interface->addSambaUserBtn, SIGNAL(clicked()), - this, SLOT( addSambaUserBtnClicked() )); + connect( _interface->addSambaUserBtn, TQT_SIGNAL(clicked()), + this, TQT_SLOT( addSambaUserBtnClicked() )); - connect( _interface->removeSambaUserBtn, SIGNAL(clicked()), - this, SLOT( removeSambaUserBtnClicked() )); + connect( _interface->removeSambaUserBtn, TQT_SIGNAL(clicked()), + this, TQT_SLOT( removeSambaUserBtnClicked() )); _interface->removeSambaUserBtn->setIconSet(SmallIconSet("1rightarrow")); _interface->addSambaUserBtn->setIconSet(SmallIconSet("1leftarrow")); - connect( _interface->sambaUsersListView, SIGNAL(mouseButtonPressed(int,QListViewItem*,const QPoint &,int)), - this, SLOT(slotMouseButtonPressed(int,QListViewItem*,const QPoint &,int))); + connect( _interface->sambaUsersListView, TQT_SIGNAL(mouseButtonPressed(int,TQListViewItem*,const TQPoint &,int)), + this, TQT_SLOT(slotMouseButtonPressed(int,TQListViewItem*,const TQPoint &,int))); - connect( _interface->joinADomainBtn, SIGNAL(clicked()), - this, SLOT( joinADomainBtnClicked() )); + connect( _interface->joinADomainBtn, TQT_SIGNAL(clicked()), + this, TQT_SLOT( joinADomainBtnClicked() )); - connect( _interface->loadBtn, SIGNAL(clicked()), - this, SLOT( loadBtnClicked() )); + connect( _interface->loadBtn, TQT_SIGNAL(clicked()), + this, TQT_SLOT( loadBtnClicked() )); - connect( _interface, SIGNAL(changed()), this, SLOT(configChanged())); + connect( _interface, TQT_SIGNAL(changed()), this, TQT_SLOT(configChanged())); } void KcmSambaConf::initAdvancedTab() { - QVBoxLayout *l = new QVBoxLayout(_interface->advancedFrame); + TQVBoxLayout *l = new TQVBoxLayout(_interface->advancedFrame); l->setAutoAdd(true); l->setMargin(0); _janus = new KJanusWidget(_interface->advancedFrame,0,KJanusWidget::TreeList); _janus->setRootIsDecorated(false); _janus->setShowIconsInTreeList(true); - QWidget *w; - QFrame *f; - QString label; - QPixmap icon; + TQWidget *w; + TQFrame *f; + TQString label; + TQPixmap icon; for (int i=0;i<_interface->advancedTab->count();) { @@ -334,19 +334,19 @@ void KcmSambaConf::initAdvancedTab() if (label == i18n("Commands")) icon = SmallIcon("konsole"); else { - icon = QPixmap(16,16); + icon = TQPixmap(16,16); icon.fill(); } //SmallIcon("empty2"); f = _janus->addPage( label,label,icon ); - l = new QVBoxLayout(f); + l = new TQVBoxLayout(f); l->setAutoAdd(true); l->setMargin(0); _interface->advancedTab->removePage(w); - w->reparent(f,QPoint(1,1),TRUE); + w->reparent(f,TQPoint(1,1),TRUE); } @@ -366,11 +366,11 @@ void KcmSambaConf::editShare() return; ShareDlgImpl* dlg = new ShareDlgImpl(_interface,item->getShare()); - connect(dlg, SIGNAL(changed()), this, SLOT(configChanged())); + connect(dlg, TQT_SIGNAL(changed()), this, TQT_SLOT(configChanged())); dlg->exec(); item->updateShare(); - disconnect(dlg, SIGNAL(changed()), this, SLOT(configChanged())); + disconnect(dlg, TQT_SIGNAL(changed()), this, TQT_SLOT(configChanged())); delete dlg; @@ -385,7 +385,7 @@ void KcmSambaConf::addShare() ShareDlgImpl* dlg = new ShareDlgImpl(_interface,share); dlg->exec(); - if (dlg->result() == QDialog::Rejected ) + if (dlg->result() == TQDialog::Rejected ) removeShare(); else { item->updateShare(); @@ -435,7 +435,7 @@ void KcmSambaConf::addPrinter() PrinterDlgImpl* dlg = new PrinterDlgImpl(_interface,share); dlg->exec(); - if (dlg->result() == QDialog::Rejected ) + if (dlg->result() == TQDialog::Rejected ) removePrinter(); else { @@ -493,7 +493,7 @@ void KcmSambaConf::loadBtnClicked() { load( _interface->configUrlRq->url()); } -void KcmSambaConf::load(const QString & smbFile) +void KcmSambaConf::load(const TQString & smbFile) { kdDebug(5009) << "loading " << smbFile << endl; _smbconf = smbFile; @@ -504,14 +504,14 @@ void KcmSambaConf::load(const QString & smbFile) _sambaFile = new SambaFile(_smbconf,false); - connect( _sambaFile, SIGNAL(completed()), this, SLOT(fillFields())); - connect( _sambaFile, SIGNAL(canceled(const QString &)), this, SLOT(loadCanceled(const QString &))); + connect( _sambaFile, TQT_SIGNAL(completed()), this, TQT_SLOT(fillFields())); + connect( _sambaFile, TQT_SIGNAL(canceled(const TQString &)), this, TQT_SLOT(loadCanceled(const TQString &))); _sambaFile->load(); } -void KcmSambaConf::loadCanceled(const QString & msg) { +void KcmSambaConf::loadCanceled(const TQString & msg) { KMessageBox::sorry(0L,msg,i18n("Error while opening file")); } @@ -579,7 +579,7 @@ void KcmSambaConf::fillFields() loadUserTab(); - connect(_dictMngr, SIGNAL(changed()), this, SLOT(configChanged())); + connect(_dictMngr, TQT_SIGNAL(changed()), this, TQT_SLOT(configChanged())); } @@ -597,7 +597,7 @@ void KcmSambaConf::loadBaseSettings(SambaShare* share) _interface->guestAccountCombo->insertStringList( getUnixUsers() ); setComboIndexToValue(_interface->guestAccountCombo,"guest account",share); - QString value = share->getValue("map to guest",false,true); + TQString value = share->getValue("map to guest",false,true); _interface->allowGuestLoginsChk->setChecked( value.lower()!="never" ); @@ -605,7 +605,7 @@ void KcmSambaConf::loadBaseSettings(SambaShare* share) _dictMngr->add("bind interfaces only",_interface->bindInterfacesOnlyChk); - QString s = share->getValue("security",false,true).lower(); + TQString s = share->getValue("security",false,true).lower(); int i = 0; if ( s == "share" ) i = 0; else @@ -624,7 +624,7 @@ void KcmSambaConf::loadSecurity(SambaShare*) { _dictMngr->add("map to guest",_interface->mapToGuestCombo, - new QStringList(QStringList() << "Never" << "Bad User" << "Bad Password" )); + new TQStringList(TQStringList() << "Never" << "Bad User" << "Bad Password" )); _dictMngr->add("password server", _interface->passwordServerEdit); @@ -667,18 +667,18 @@ void KcmSambaConf::loadSecurity(SambaShare*) _dictMngr->add("ntlm auth",_interface->ntlmAuthChk); _dictMngr->add("use spnego",_interface->useSpnegoChk); _dictMngr->add("server schannel",_interface->serverSchannelCombo, - new QStringList(QStringList() << "Yes" << "No" << "Auto" )); + new TQStringList(TQStringList() << "Yes" << "No" << "Auto" )); _dictMngr->add("server signing",_interface->serverSigningCombo, - new QStringList(QStringList() << "Auto" << "Mandatory" << "Disabled" )); + new TQStringList(TQStringList() << "Auto" << "Mandatory" << "Disabled" )); _dictMngr->add("client lanman auth",_interface->clientLanmanAuthChk); _dictMngr->add("client plaintext auth",_interface->clientPlaintextAuthChk); _dictMngr->add("client ntlmv2 auth",_interface->clientNTLMv2AuthChk); _dictMngr->add("client use spnego",_interface->clientUseSpnegoChk); _dictMngr->add("client schannel",_interface->clientSchannelCombo, - new QStringList(QStringList() << "Yes" << "No" << "Auto" )); + new TQStringList(TQStringList() << "Yes" << "No" << "Auto" )); _dictMngr->add("client signing",_interface->clientSigningCombo, - new QStringList(QStringList() << "Auto" << "Mandatory" << "Disabled" )); + new TQStringList(TQStringList() << "Auto" << "Mandatory" << "Disabled" )); @@ -813,16 +813,16 @@ void KcmSambaConf::loadProtocol(SambaShare*) _dictMngr->add("smb ports", _interface->smbPortsEdit); _dictMngr->add("announce as", _interface->announceAsCombo, - new QStringList(QStringList() << "NT" << "NT workstation" << "win95" << "WfW")); + new TQStringList(TQStringList() << "NT" << "NT workstation" << "win95" << "WfW")); _dictMngr->add("protocol", _interface->protocolCombo, - new QStringList(QStringList() << "NT" << "lanman2" << "lanman1" << "core" << "coreplus" )); + new TQStringList(TQStringList() << "NT" << "lanman2" << "lanman1" << "core" << "coreplus" )); _dictMngr->add("max protocol", _interface->maxProtocolCombo, - new QStringList(QStringList() << "NT" << "lanman2" << "lanman1" << "core" << "coreplus")); + new TQStringList(TQStringList() << "NT" << "lanman2" << "lanman1" << "core" << "coreplus")); _dictMngr->add("min protocol", _interface->minProtocolCombo, - new QStringList(QStringList() << "NT" << "lanman2" << "lanman1" << "core" << "coreplus")); + new TQStringList(TQStringList() << "NT" << "lanman2" << "lanman1" << "core" << "coreplus")); } @@ -832,7 +832,7 @@ void KcmSambaConf::loadSocket(SambaShare* share) _dictMngr->add("socket address", _interface->socketAddressEdit); - QString s = share->getValue("socket options"); + TQString s = share->getValue("socket options"); s = s.simplifyWhiteSpace(); // The string s has now the form : @@ -862,7 +862,7 @@ void KcmSambaConf::loadSSL(SambaShare*) // SSL _dictMngr->add("ssl version",_interface->sslVersionCombo, - new QStringList(QStringList() << "ssl2" << "ssl3" << "ssl2or3" << "tls1" )); + new TQStringList(TQStringList() << "ssl2" << "ssl3" << "ssl2or3" << "tls1" )); _dictMngr->add("ssl",_interface->sslChk); _dictMngr->add("ssl require server cert",_interface->sslRequireServercertChk); @@ -933,7 +933,7 @@ void KcmSambaConf::loadWinbind(SambaShare* ) _dictMngr->add("winbind cache time", _interface->winbindCacheTimeSpin); _dictMngr->add("acl compatibility",_interface->aclCompatibilityCombo, - new QStringList(QStringList() << "winnt" << "win2k" << "")); + new TQStringList(TQStringList() << "winnt" << "win2k" << "")); _dictMngr->add("winbind enum users",_interface->winbindEnumUsersChk); _dictMngr->add("winbind enum groups",_interface->winbindEnumGroupsChk); @@ -975,10 +975,10 @@ void KcmSambaConf::loadLDAP(SambaShare*) _dictMngr->add("ldap delete dn",_interface->ldapDeleteDnChk); _dictMngr->add("ldap ssl", _interface->ldapSslCombo, - new QStringList(QStringList() << "No" << "Start_tls" << "Yes")); + new TQStringList(TQStringList() << "No" << "Start_tls" << "Yes")); _dictMngr->add("ldap sync", _interface->ldapSyncCombo, - new QStringList(QStringList() << "Yes" << "No" << "Only")); + new TQStringList(TQStringList() << "Yes" << "No" << "Only")); } @@ -992,7 +992,7 @@ void KcmSambaConf::loadBrowsing(SambaShare*) _dictMngr->add("preload", _interface->preloadEdit); _dictMngr->add("lm announce", _interface->lmAnnounceCombo, - new QStringList(QStringList() << "Yes" << "No" << "Auto")); + new TQStringList(TQStringList() << "Yes" << "No" << "Auto")); } void KcmSambaConf::loadCommands(SambaShare*) @@ -1008,7 +1008,7 @@ void KcmSambaConf::loadCommands(SambaShare*) } -void KcmSambaConf::setComboIndexToValue(QComboBox* box, const QString & value, SambaShare* share) +void KcmSambaConf::setComboIndexToValue(TQComboBox* box, const TQString & value, SambaShare* share) { int i = box->listBox()->index(box->listBox()->findItem(share->getValue(value,false,true),Qt::ExactMatch)); box->setCurrentItem(i); @@ -1048,7 +1048,7 @@ void KcmSambaConf::loadUserTab() SambaShare* share = _sambaFile->getShare("global"); - QStringList added; + TQStringList added; SmbPasswdFile passwd( KURL(share->getValue("smb passwd file",true,true)) ); SambaUserList sambaList = passwd.getSambaUserList(); @@ -1058,7 +1058,7 @@ void KcmSambaConf::loadUserTab() { QMultiCheckListItem* item = new QMultiCheckListItem(_interface->sambaUsersListView); item->setText(0,user->name); - item->setText(1,QString::number(user->uid)); + item->setText(1,TQString::number(user->uid)); item->setOn(COL_DISABLED,user->isDisabled); item->setOn(COL_NOPASSWORD,user->hasNoPassword); @@ -1076,15 +1076,15 @@ void KcmSambaConf::loadUserTab() UnixUser *unixUser; for ( unixUser = unixList.first(); unixUser; unixUser = unixList.next() ) { - QStringList::Iterator it; + TQStringList::Iterator it; it=added.find(unixUser->name); if (it == added.end()) - new KListViewItem(_interface->unixUsersListView, unixUser->name, QString::number(unixUser->uid)); + new KListViewItem(_interface->unixUsersListView, unixUser->name, TQString::number(unixUser->uid)); } - _interface->unixUsersListView->setSelectionMode(QListView::Extended); - _interface->sambaUsersListView->setSelectionMode(QListView::Extended); + _interface->unixUsersListView->setSelectionMode(TQListView::Extended); + _interface->sambaUsersListView->setSelectionMode(TQListView::Extended); } @@ -1095,7 +1095,7 @@ void KcmSambaConf::joinADomainBtnClicked() { int result = dlg->exec(); - if (result == QDialog::Accepted) { + if (result == TQDialog::Accepted) { SmbPasswdFile passwd; if (!passwd.joinADomain(dlg->domainEdit->text(), dlg->domainControllerEdit->text(), @@ -1109,7 +1109,7 @@ void KcmSambaConf::joinADomainBtnClicked() { } -void KcmSambaConf::slotMouseButtonPressed(int,QListViewItem* item,const QPoint &,int col) { +void KcmSambaConf::slotMouseButtonPressed(int,TQListViewItem* item,const TQPoint &,int col) { if (col < 2) return; @@ -1146,7 +1146,7 @@ void KcmSambaConf::slotMouseButtonPressed(int,QListViewItem* item,const QPoint & void KcmSambaConf::nullPasswordsEnabled(bool b) { - QListViewItemIterator it( _interface->sambaUsersListView ); + TQListViewItemIterator it( _interface->sambaUsersListView ); for ( ; it.current(); ++it ) { QMultiCheckListItem* sambaItem = static_cast<QMultiCheckListItem*>(it.current()); sambaItem->setDisabled(COL_NOPASSWORD,!b); @@ -1160,17 +1160,17 @@ void KcmSambaConf::saveUserTab() void KcmSambaConf::addSambaUserBtnClicked() { - QPtrList<QListViewItem> list = _interface->unixUsersListView->selectedItems(); + TQPtrList<TQListViewItem> list = _interface->unixUsersListView->selectedItems(); SambaShare* share = _sambaFile->getShare("global"); SmbPasswdFile passwd( KURL(share->getValue("smb passwd file",true,true)) ); - QListViewItem* item; + TQListViewItem* item; for ( item = list.first(); item; item = list.first() ) { SambaUser user( item->text(0), item->text(1).toInt() ); - QCString password; + TQCString password; int passResult = KPasswordDialog::getNewPassword(password, i18n("<qt>Please enter a password for the user <b>%1</b></qt>").arg(user.name)); if (passResult != KPasswordDialog::Accepted) { @@ -1186,7 +1186,7 @@ void KcmSambaConf::addSambaUserBtnClicked() QMultiCheckListItem* sambaItem = new QMultiCheckListItem(_interface->sambaUsersListView); sambaItem->setText(0,user.name); - sambaItem->setText(1,QString::number(user.uid)); + sambaItem->setText(1,TQString::number(user.uid)); sambaItem->setOn(COL_DISABLED,false); sambaItem->setOn(COL_NOPASSWORD,false); if ( ! _interface->nullPasswordsChk->isOn()) @@ -1200,12 +1200,12 @@ void KcmSambaConf::addSambaUserBtnClicked() void KcmSambaConf::removeSambaUserBtnClicked() { - QPtrList<QListViewItem> list = _interface->sambaUsersListView->selectedItems(); + TQPtrList<TQListViewItem> list = _interface->sambaUsersListView->selectedItems(); SambaShare* share = _sambaFile->getShare("global"); SmbPasswdFile passwd( KURL(share->getValue("smb passwd file",true,true)) ); - QListViewItem* item; + TQListViewItem* item; for ( item = list.first(); item; item = list.first() ) { SambaUser user( item->text(0), item->text(1).toInt() ); @@ -1223,17 +1223,17 @@ void KcmSambaConf::removeSambaUserBtnClicked() void KcmSambaConf::sambaUserPasswordBtnClicked() { - QPtrList<QListViewItem> list = _interface->sambaUsersListView->selectedItems(); + TQPtrList<TQListViewItem> list = _interface->sambaUsersListView->selectedItems(); SambaShare* share = _sambaFile->getShare("global"); SmbPasswdFile passwd( KURL(share->getValue("smb passwd file",true,true)) ); - QListViewItem* item; + TQListViewItem* item; for ( item = list.first(); item; item = list.next() ) { SambaUser user( item->text(0), item->text(1).toInt() ); - QCString password; + TQCString password; int passResult = KPasswordDialog::getNewPassword(password, i18n("Please enter a password for the user %1").arg(user.name)); if (passResult != KPasswordDialog::Accepted) @@ -1267,13 +1267,13 @@ void KcmSambaConf::save() { // Base settings _smbconf = _interface->configUrlRq->url(); - KSimpleConfig config(QString::fromLatin1(FILESHARECONF),false); + KSimpleConfig config(TQString::fromLatin1(FILESHARECONF),false); config.writeEntry("SMBCONF",_smbconf); config.sync(); // Security - QString s; + TQString s; switch (_interface->securityLevelBtnGrp->id(_interface->securityLevelBtnGrp->selected())) { case 0 : s = "share";break; @@ -1294,7 +1294,7 @@ void KcmSambaConf::save() { if (_interface->otherWinsRadio->isChecked()) share->setValue("wins server",_interface->winsServerEdit->text(), false,true); else - share->setValue("wins server",QString(""), false,true); + share->setValue("wins server",TQString(""), false,true); // socket options @@ -1308,14 +1308,14 @@ void KcmSambaConf::save() { } -bool KcmSambaConf::getSocketBoolValue( const QString & str, const QString & name ) +bool KcmSambaConf::getSocketBoolValue( const TQString & str, const TQString & name ) { - QString s = str; + TQString s = str; int i = s.find(name ,0,false); if (i > -1) { - s = s.remove(0,i+1+QString(name).length()); + s = s.remove(0,i+1+TQString(name).length()); if ( s.startsWith("=") ) { @@ -1332,9 +1332,9 @@ bool KcmSambaConf::getSocketBoolValue( const QString & str, const QString & name return false; } -int KcmSambaConf::getSocketIntValue( const QString & str, const QString & name ) +int KcmSambaConf::getSocketIntValue( const TQString & str, const TQString & name ) { - QString s = str; + TQString s = str; int i = s.find(name ,0,false); if (i > -1) @@ -1361,9 +1361,9 @@ int KcmSambaConf::getSocketIntValue( const QString & str, const QString & name ) return 0; } -QString KcmSambaConf::socketOptions() +TQString KcmSambaConf::socketOptions() { - QString s = ""; + TQString s = ""; if ( _interface->SO_KEEPALIVEChk->isChecked() ) s+="SO_KEEPALIVE "; @@ -1385,25 +1385,25 @@ QString KcmSambaConf::socketOptions() if ( _interface->SO_SNDBUFChk->isChecked() ) { s+= "SO_SNDBUF="; - s+= QString::number( _interface->SO_SNDBUFSpin->value() ); + s+= TQString::number( _interface->SO_SNDBUFSpin->value() ); s+= " "; } if ( _interface->SO_RCVBUFChk->isChecked() ) { s+= "SO_RCVBUF="; - s+= QString::number( _interface->SO_RCVBUFSpin->value() ); + s+= TQString::number( _interface->SO_RCVBUFSpin->value() ); s+= " "; } if ( _interface->SO_SNDLOWATChk->isChecked() ) { s+= "SO_SNDLOWAT="; - s+= QString::number( _interface->SO_SNDLOWATSpin->value() ); + s+= TQString::number( _interface->SO_SNDLOWATSpin->value() ); s+= " "; } if ( _interface->SO_RCVLOWATChk->isChecked() ) { s+= "SO_RCVLOWAT="; - s+= QString::number( _interface->SO_RCVLOWATSpin->value() ); + s+= TQString::number( _interface->SO_RCVLOWATSpin->value() ); s+= " "; } @@ -1423,7 +1423,7 @@ void KcmSambaConf::configChanged() { emit changed(true); } -QString KcmSambaConf::quickHelp() const +TQString KcmSambaConf::quickHelp() const { return i18n("<h1>Samba Configuration</h1> here you can configure your SAMBA server."); } @@ -1432,7 +1432,7 @@ QString KcmSambaConf::quickHelp() const extern "C" { - KDE_EXPORT KCModule *create_KcmSambaConf(QWidget *parent, const char *name) + KDE_EXPORT KCModule *create_KcmSambaConf(TQWidget *parent, const char *name) { KGlobal::locale()->insertCatalogue("kfileshare"); return new KcmSambaConf(parent, name); |