summaryrefslogtreecommitdiffstats
path: root/filesharing/advanced/kcm_sambaconf
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
commit47c8a359c5276062c4bc17f0e82410f29081b502 (patch)
tree2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /filesharing/advanced/kcm_sambaconf
parent6f82532777a35e0e60bbd2b290b2e93e646f349b (diff)
downloadtdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz
tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'filesharing/advanced/kcm_sambaconf')
-rw-r--r--filesharing/advanced/kcm_sambaconf/common.cpp14
-rw-r--r--filesharing/advanced/kcm_sambaconf/common.h6
-rw-r--r--filesharing/advanced/kcm_sambaconf/dictmanager.cpp66
-rw-r--r--filesharing/advanced/kcm_sambaconf/dictmanager.h24
-rw-r--r--filesharing/advanced/kcm_sambaconf/filemodedlgimpl.cpp18
-rw-r--r--filesharing/advanced/kcm_sambaconf/filemodedlgimpl.h8
-rw-r--r--filesharing/advanced/kcm_sambaconf/groupselectdlg.ui.h16
-rw-r--r--filesharing/advanced/kcm_sambaconf/hiddenfileview.cpp146
-rw-r--r--filesharing/advanced/kcm_sambaconf/hiddenfileview.h38
-rw-r--r--filesharing/advanced/kcm_sambaconf/joindomaindlg.ui.h2
-rw-r--r--filesharing/advanced/kcm_sambaconf/kcmprinterdlg.ui.h4
-rw-r--r--filesharing/advanced/kcm_sambaconf/kcmsambaconf.cpp234
-rw-r--r--filesharing/advanced/kcm_sambaconf/kcmsambaconf.h32
-rw-r--r--filesharing/advanced/kcm_sambaconf/linuxpermissionchecker.cpp36
-rw-r--r--filesharing/advanced/kcm_sambaconf/linuxpermissionchecker.h14
-rw-r--r--filesharing/advanced/kcm_sambaconf/passwd.cpp24
-rw-r--r--filesharing/advanced/kcm_sambaconf/passwd.h22
-rw-r--r--filesharing/advanced/kcm_sambaconf/printerdlgimpl.cpp42
-rw-r--r--filesharing/advanced/kcm_sambaconf/printerdlgimpl.h2
-rw-r--r--filesharing/advanced/kcm_sambaconf/qmultichecklistitem.cpp36
-rw-r--r--filesharing/advanced/kcm_sambaconf/qmultichecklistitem.h16
-rw-r--r--filesharing/advanced/kcm_sambaconf/sambafile.cpp154
-rw-r--r--filesharing/advanced/kcm_sambaconf/sambafile.h60
-rw-r--r--filesharing/advanced/kcm_sambaconf/sambashare.cpp82
-rw-r--r--filesharing/advanced/kcm_sambaconf/sambashare.h64
-rw-r--r--filesharing/advanced/kcm_sambaconf/share.ui.h8
-rw-r--r--filesharing/advanced/kcm_sambaconf/sharedlgimpl.cpp84
-rw-r--r--filesharing/advanced/kcm_sambaconf/sharedlgimpl.h8
-rw-r--r--filesharing/advanced/kcm_sambaconf/smbconfconfigwidget.cpp26
-rw-r--r--filesharing/advanced/kcm_sambaconf/smbconfconfigwidget.h8
-rw-r--r--filesharing/advanced/kcm_sambaconf/smbpasswdfile.cpp52
-rw-r--r--filesharing/advanced/kcm_sambaconf/smbpasswdfile.h22
-rw-r--r--filesharing/advanced/kcm_sambaconf/socketoptionsdlg.ui.h14
-rw-r--r--filesharing/advanced/kcm_sambaconf/userselectdlg.ui.h10
-rw-r--r--filesharing/advanced/kcm_sambaconf/usertabimpl.cpp154
-rw-r--r--filesharing/advanced/kcm_sambaconf/usertabimpl.h48
36 files changed, 797 insertions, 797 deletions
diff --git a/filesharing/advanced/kcm_sambaconf/common.cpp b/filesharing/advanced/kcm_sambaconf/common.cpp
index 74a6ddd3..cac856f0 100644
--- a/filesharing/advanced/kcm_sambaconf/common.cpp
+++ b/filesharing/advanced/kcm_sambaconf/common.cpp
@@ -26,21 +26,21 @@
* *
******************************************************************************/
-#include <qstring.h>
-#include <qcombobox.h>
-#include <qlistbox.h>
+#include <tqstring.h>
+#include <tqcombobox.h>
+#include <tqlistbox.h>
#include "common.h"
-void setComboToString(QComboBox* combo,const QString & s)
+void setComboToString(TQComboBox* combo,const TQString & s)
{
int i = combo->listBox()->index(combo->listBox()->findItem(s,Qt::ExactMatch));
combo->setCurrentItem(i);
}
-bool boolFromText(const QString & value, bool testTrue)
+bool boolFromText(const TQString & value, bool testTrue)
{
- QString lower = value.lower();
+ TQString lower = value.lower();
if (testTrue) {
if (lower=="yes" ||
@@ -61,7 +61,7 @@ bool boolFromText(const QString & value, bool testTrue)
}
}
-QString textFromBool(bool value)
+TQString textFromBool(bool value)
{
if (value)
return "yes";
diff --git a/filesharing/advanced/kcm_sambaconf/common.h b/filesharing/advanced/kcm_sambaconf/common.h
index 4da6dccc..52d0a4a4 100644
--- a/filesharing/advanced/kcm_sambaconf/common.h
+++ b/filesharing/advanced/kcm_sambaconf/common.h
@@ -33,8 +33,8 @@ class QString;
class QComboBox;
-void setComboToString(QComboBox*,const QString &);
-bool boolFromText(const QString & value,bool testTrue=true);
-QString textFromBool(bool value);
+void setComboToString(TQComboBox*,const TQString &);
+bool boolFromText(const TQString & value,bool testTrue=true);
+TQString textFromBool(bool value);
#endif
diff --git a/filesharing/advanced/kcm_sambaconf/dictmanager.cpp b/filesharing/advanced/kcm_sambaconf/dictmanager.cpp
index 1b252ed5..c2437f04 100644
--- a/filesharing/advanced/kcm_sambaconf/dictmanager.cpp
+++ b/filesharing/advanced/kcm_sambaconf/dictmanager.cpp
@@ -27,12 +27,12 @@
******************************************************************************/
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qspinbox.h>
-#include <qcombobox.h>
-#include <qtooltip.h>
-#include <qstringlist.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqspinbox.h>
+#include <tqcombobox.h>
+#include <tqtooltip.h>
+#include <tqstringlist.h>
#include <kurlrequester.h>
#include <klocale.h>
@@ -56,73 +56,73 @@ DictManager::DictManager(SambaShare* share):
DictManager::~DictManager() {
}
-void DictManager::handleUnsupportedWidget(const QString & s, QWidget* w) {
+void DictManager::handleUnsupportedWidget(const TQString & s, TQWidget* w) {
w->setEnabled(false);
- QToolTip::add(w,i18n("The option <em>%1</em> is not supported by your Samba version").arg(s));
+ TQToolTip::add(w,i18n("The option <em>%1</em> is not supported by your Samba version").arg(s));
}
-void DictManager::add(const QString & key, QLineEdit* lineEdit) {
+void DictManager::add(const TQString & key, TQLineEdit* lineEdit) {
if (_share->optionSupported(key)) {
lineEditDict.insert(key,lineEdit);
- connect(lineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(changedSlot()));
+ connect(lineEdit, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changedSlot()));
} else
handleUnsupportedWidget(key,lineEdit);
}
-void DictManager::add(const QString & key, QCheckBox* checkBox){
+void DictManager::add(const TQString & key, TQCheckBox* checkBox){
if (_share->optionSupported(key)) {
checkBoxDict.insert(key,checkBox);
- connect(checkBox, SIGNAL(clicked()), this, SLOT(changedSlot()));
+ connect(checkBox, TQT_SIGNAL(clicked()), this, TQT_SLOT(changedSlot()));
} else
handleUnsupportedWidget(key,checkBox);
}
-void DictManager::add(const QString & key, KURLRequester* urlRq){
+void DictManager::add(const TQString & key, KURLRequester* urlRq){
if (_share->optionSupported(key)) {
urlRequesterDict.insert(key,urlRq);
- connect(urlRq, SIGNAL(textChanged(const QString &)), this, SLOT(changedSlot()));
+ connect(urlRq, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changedSlot()));
} else
handleUnsupportedWidget(key,urlRq);
}
-void DictManager::add(const QString & key, QSpinBox* spinBox){
+void DictManager::add(const TQString & key, TQSpinBox* spinBox){
if (_share->optionSupported(key)) {
spinBoxDict.insert(key,spinBox);
- connect(spinBox, SIGNAL(valueChanged(int)), this, SLOT(changedSlot()));
+ connect(spinBox, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(changedSlot()));
} else
handleUnsupportedWidget(key,spinBox);
}
-void DictManager::add(const QString & key, QComboBox* comboBox, QStringList* values){
+void DictManager::add(const TQString & key, TQComboBox* comboBox, TQStringList* values){
if (_share->optionSupported(key)) {
comboBoxDict.insert(key,comboBox);
comboBoxValuesDict.insert(key,values);
- connect(comboBox, SIGNAL(activated(int)), this, SLOT(changedSlot()));
+ connect(comboBox, TQT_SIGNAL(activated(int)), this, TQT_SLOT(changedSlot()));
} else
handleUnsupportedWidget(key,comboBox);
}
void DictManager::load(SambaShare* share, bool globalValue, bool defaultValue){
- QDictIterator<QCheckBox> checkBoxIt( checkBoxDict );
+ TQDictIterator<TQCheckBox> checkBoxIt( checkBoxDict );
for( ; checkBoxIt.current(); ++checkBoxIt ) {
checkBoxIt.current()->setChecked(share->getBoolValue(checkBoxIt.currentKey(),globalValue,defaultValue));
}
- QDictIterator<QLineEdit> lineEditIt( lineEditDict );
+ TQDictIterator<TQLineEdit> lineEditIt( lineEditDict );
for( ; lineEditIt.current(); ++lineEditIt ) {
lineEditIt.current()->setText(share->getValue(lineEditIt.currentKey(),globalValue,defaultValue));
}
- QDictIterator<KURLRequester> urlRequesterIt( urlRequesterDict );
+ TQDictIterator<KURLRequester> urlRequesterIt( urlRequesterDict );
for( ; urlRequesterIt.current(); ++urlRequesterIt ) {
urlRequesterIt.current()->setURL(share->getValue(urlRequesterIt.currentKey(),globalValue,defaultValue));
}
- QDictIterator<QSpinBox> spinBoxIt( spinBoxDict );
+ TQDictIterator<TQSpinBox> spinBoxIt( spinBoxDict );
for( ; spinBoxIt.current(); ++spinBoxIt ) {
spinBoxIt.current()->setValue(share->getValue(spinBoxIt.currentKey(),globalValue,defaultValue).toInt());
@@ -133,11 +133,11 @@ void DictManager::load(SambaShare* share, bool globalValue, bool defaultValue){
}
void DictManager::loadComboBoxes(SambaShare* share, bool globalValue, bool defaultValue) {
- QDictIterator<QComboBox> comboBoxIt( comboBoxDict );
+ TQDictIterator<TQComboBox> comboBoxIt( comboBoxDict );
for( ; comboBoxIt.current(); ++comboBoxIt ) {
- QStringList *v = comboBoxValuesDict[comboBoxIt.currentKey()];
- QString value = share->getValue(comboBoxIt.currentKey(),globalValue,defaultValue);
+ TQStringList *v = comboBoxValuesDict[comboBoxIt.currentKey()];
+ TQString value = share->getValue(comboBoxIt.currentKey(),globalValue,defaultValue);
if (value.isNull())
continue;
@@ -147,9 +147,9 @@ void DictManager::loadComboBoxes(SambaShare* share, bool globalValue, bool defau
int comboIndex = 0;
- QStringList::iterator it;
+ TQStringList::iterator it;
for ( it = v->begin(); it != v->end(); ++it ) {
- QString lower = (*it).lower();
+ TQString lower = (*it).lower();
if ( lower == "yes" &&
boolFromText(value))
break;
@@ -170,34 +170,34 @@ void DictManager::loadComboBoxes(SambaShare* share, bool globalValue, bool defau
void DictManager::save(SambaShare* share, bool globalValue, bool defaultValue){
- QDictIterator<QCheckBox> checkBoxIt( checkBoxDict );
+ TQDictIterator<TQCheckBox> checkBoxIt( checkBoxDict );
for( ; checkBoxIt.current(); ++checkBoxIt ) {
share->setValue(checkBoxIt.currentKey(),checkBoxIt.current()->isChecked(), globalValue, defaultValue );
}
- QDictIterator<QLineEdit> lineEditIt( lineEditDict );
+ TQDictIterator<TQLineEdit> lineEditIt( lineEditDict );
for( ; lineEditIt.current(); ++lineEditIt ) {
share->setValue(lineEditIt.currentKey(),lineEditIt.current()->text(), globalValue, defaultValue );
}
- QDictIterator<KURLRequester> urlRequesterIt( urlRequesterDict );
+ TQDictIterator<KURLRequester> urlRequesterIt( urlRequesterDict );
for( ; urlRequesterIt.current(); ++urlRequesterIt ) {
share->setValue(urlRequesterIt.currentKey(),urlRequesterIt.current()->url(), globalValue, defaultValue );
}
- QDictIterator<QSpinBox> spinBoxIt( spinBoxDict );
+ TQDictIterator<TQSpinBox> spinBoxIt( spinBoxDict );
for( ; spinBoxIt.current(); ++spinBoxIt ) {
share->setValue(spinBoxIt.currentKey(),spinBoxIt.current()->value(), globalValue, defaultValue );
}
- QDictIterator<QComboBox> comboBoxIt( comboBoxDict );
+ TQDictIterator<TQComboBox> comboBoxIt( comboBoxDict );
for( ; comboBoxIt.current(); ++comboBoxIt ) {
- QStringList* values = comboBoxValuesDict[comboBoxIt.currentKey()];
+ TQStringList* values = comboBoxValuesDict[comboBoxIt.currentKey()];
int i = comboBoxIt.current()->currentItem();
share->setValue(comboBoxIt.currentKey(),(*values)[i], globalValue, defaultValue );
diff --git a/filesharing/advanced/kcm_sambaconf/dictmanager.h b/filesharing/advanced/kcm_sambaconf/dictmanager.h
index 3f053330..90c9be22 100644
--- a/filesharing/advanced/kcm_sambaconf/dictmanager.h
+++ b/filesharing/advanced/kcm_sambaconf/dictmanager.h
@@ -48,26 +48,26 @@ Q_OBJECT
DictManager(SambaShare *share);
virtual ~DictManager();
- void add(const QString &, QLineEdit*);
- void add(const QString &, QCheckBox*);
- void add(const QString &, KURLRequester*);
- void add(const QString &, QSpinBox*);
- void add(const QString &, QComboBox*, QStringList*);
+ void add(const TQString &, TQLineEdit*);
+ void add(const TQString &, TQCheckBox*);
+ void add(const TQString &, KURLRequester*);
+ void add(const TQString &, TQSpinBox*);
+ void add(const TQString &, TQComboBox*, TQStringList*);
void load(SambaShare* share, bool globalValue=true, bool defaultValue=true);
void save(SambaShare* share, bool globalValue=true, bool defaultValue=true);
protected :
- QDict<QLineEdit> lineEditDict;
- QDict<QCheckBox> checkBoxDict;
- QDict<KURLRequester> urlRequesterDict;
- QDict<QSpinBox> spinBoxDict;
- QDict<QComboBox> comboBoxDict;
- QDict<QStringList> comboBoxValuesDict;
+ TQDict<TQLineEdit> lineEditDict;
+ TQDict<TQCheckBox> checkBoxDict;
+ TQDict<KURLRequester> urlRequesterDict;
+ TQDict<TQSpinBox> spinBoxDict;
+ TQDict<TQComboBox> comboBoxDict;
+ TQDict<TQStringList> comboBoxValuesDict;
SambaShare* _share;
- void handleUnsupportedWidget(const QString &, QWidget*);
+ void handleUnsupportedWidget(const TQString &, TQWidget*);
void loadComboBoxes(SambaShare*, bool, bool);
protected slots:
diff --git a/filesharing/advanced/kcm_sambaconf/filemodedlgimpl.cpp b/filesharing/advanced/kcm_sambaconf/filemodedlgimpl.cpp
index faa94479..53b7c812 100644
--- a/filesharing/advanced/kcm_sambaconf/filemodedlgimpl.cpp
+++ b/filesharing/advanced/kcm_sambaconf/filemodedlgimpl.cpp
@@ -30,12 +30,12 @@
#include <stdio.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
#include "filemodedlgimpl.h"
-FileModeDlgImpl::FileModeDlgImpl(QWidget* parent, QLineEdit* edit)
+FileModeDlgImpl::FileModeDlgImpl(TQWidget* parent, TQLineEdit* edit)
: FileModeDlg(parent)
{
assert(edit);
@@ -76,27 +76,27 @@ void FileModeDlgImpl::init()
void FileModeDlgImpl::accept()
{
- QString s = "";
+ TQString s = "";
- s += QString::number(
+ s += TQString::number(
(stickyBitChk->isChecked() ? 1 : 0) +
(setGIDChk->isChecked() ? 2 : 0) +
(setUIDChk->isChecked() ? 4 : 0)
);
- s += QString::number(
+ s += TQString::number(
(ownerExecChk->isChecked() ? 1 : 0) +
(ownerWriteChk->isChecked() ? 2 : 0) +
(ownerReadChk->isChecked() ? 4 : 0)
);
- s += QString::number(
+ s += TQString::number(
(groupExecChk->isChecked() ? 1 : 0) +
(groupWriteChk->isChecked() ? 2 : 0) +
(groupReadChk->isChecked() ? 4 : 0)
);
- s += QString::number(
+ s += TQString::number(
(othersExecChk->isChecked() ? 1 : 0) +
(othersWriteChk->isChecked() ? 2 : 0) +
(othersReadChk->isChecked() ? 4 : 0)
@@ -104,7 +104,7 @@ void FileModeDlgImpl::accept()
// it's an octal number so start with a 0
// but remove all the other trailing 0's
- s = QString::number( s.toInt());
+ s = TQString::number( s.toInt());
s = "0"+s;
_edit->setText(s);
diff --git a/filesharing/advanced/kcm_sambaconf/filemodedlgimpl.h b/filesharing/advanced/kcm_sambaconf/filemodedlgimpl.h
index 3ad39ea6..60652330 100644
--- a/filesharing/advanced/kcm_sambaconf/filemodedlgimpl.h
+++ b/filesharing/advanced/kcm_sambaconf/filemodedlgimpl.h
@@ -39,8 +39,8 @@ class QLineEdit;
/**
* Small dialog to change the UNIX access rights
- * It is called with a QLineEdit as parameter.
- * The class then takes the text from the QLineEdit and
+ * It is called with a TQLineEdit as parameter.
+ * The class then takes the text from the TQLineEdit and
* interprets it as an oktal UNIX access right string
* e.g. 0744
* After the user has changed the access rights with the dialog
@@ -52,10 +52,10 @@ class FileModeDlgImpl : public FileModeDlg
{
Q_OBJECT
public:
- FileModeDlgImpl(QWidget* parent, QLineEdit* edit);
+ FileModeDlgImpl(TQWidget* parent, TQLineEdit* edit);
~FileModeDlgImpl();
protected:
- QLineEdit* _edit;
+ TQLineEdit* _edit;
void init();
protected slots:
virtual void accept();
diff --git a/filesharing/advanced/kcm_sambaconf/groupselectdlg.ui.h b/filesharing/advanced/kcm_sambaconf/groupselectdlg.ui.h
index 090e270f..550c6d33 100644
--- a/filesharing/advanced/kcm_sambaconf/groupselectdlg.ui.h
+++ b/filesharing/advanced/kcm_sambaconf/groupselectdlg.ui.h
@@ -8,20 +8,20 @@
*****************************************************************************/
-void GroupSelectDlg::init(const QStringList & specifiedGroups)
+void GroupSelectDlg::init(const TQStringList & specifiedGroups)
{
- QStringList unixGroups = getUnixGroups();
+ TQStringList unixGroups = getUnixGroups();
- for (QStringList::Iterator it = unixGroups.begin(); it != unixGroups.end(); ++it)
+ for (TQStringList::Iterator it = unixGroups.begin(); it != unixGroups.end(); ++it)
{
if ( ! specifiedGroups.contains(*it))
- new QListViewItem(groupListView, *it, QString::number(getGroupGID(*it)));
+ new TQListViewItem(groupListView, *it, TQString::number(getGroupGID(*it)));
}
}
void GroupSelectDlg::accept()
{
- QListViewItemIterator it( groupListView);
+ TQListViewItemIterator it( groupListView);
for ( ; it.current(); ++it ) {
if ( it.current()->isSelected() )
@@ -39,13 +39,13 @@ void GroupSelectDlg::accept()
if (bothRadio->isChecked())
groupKind = "@";
- QDialog::accept();
+ TQDialog::accept();
}
-QStringList GroupSelectDlg::getSelectedGroups()
+TQStringList GroupSelectDlg::getSelectedGroups()
{
return selectedGroups;
}
@@ -57,7 +57,7 @@ int GroupSelectDlg::getAccess()
}
-QString GroupSelectDlg::getGroupKind()
+TQString GroupSelectDlg::getGroupKind()
{
return groupKind;
}
diff --git a/filesharing/advanced/kcm_sambaconf/hiddenfileview.cpp b/filesharing/advanced/kcm_sambaconf/hiddenfileview.cpp
index 2b35b4af..b4ced9f9 100644
--- a/filesharing/advanced/kcm_sambaconf/hiddenfileview.cpp
+++ b/filesharing/advanced/kcm_sambaconf/hiddenfileview.cpp
@@ -28,12 +28,12 @@
#include <assert.h>
-#include <qcheckbox.h>
-#include <qlineedit.h>
-#include <qregexp.h>
-#include <qstringlist.h>
-#include <qgroupbox.h>
-#include <qcursor.h>
+#include <tqcheckbox.h>
+#include <tqlineedit.h>
+#include <tqregexp.h>
+#include <tqstringlist.h>
+#include <tqgroupbox.h>
+#include <tqcursor.h>
#include <kpopupmenu.h>
@@ -62,7 +62,7 @@
#define HIDDENTABINDEX 5
-HiddenListViewItem::HiddenListViewItem( QListView *parent, KFileItem *fi, bool hidden=false, bool veto=false, bool vetoOplock=false )
+HiddenListViewItem::HiddenListViewItem( TQListView *parent, KFileItem *fi, bool hidden=false, bool veto=false, bool vetoOplock=false )
: QMultiCheckListItem( parent )
{
setPixmap( COL_NAME, fi->pixmap(KIcon::SizeSmall));
@@ -91,15 +91,15 @@ KFileItem* HiddenListViewItem::getFileItem()
}
-void HiddenListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment)
+void HiddenListViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment)
{
- QColorGroup _cg = cg;
+ TQColorGroup _cg = cg;
if (isOn(COL_VETO))
- _cg.setColor(QColorGroup::Base,lightGray);
+ _cg.setColor(TQColorGroup::Base,lightGray);
if (isOn(COL_HIDDEN))
- _cg.setColor(QColorGroup::Text,gray);
+ _cg.setColor(TQColorGroup::Text,gray);
QMultiCheckListItem::paintCell(p, _cg, column, width, alignment);
}
@@ -121,45 +121,45 @@ HiddenFileView::HiddenFileView(ShareDlgImpl* shareDlg, SambaShare* share)
_dlg->hiddenChk->setTristate(true);
_dlg->vetoChk->setTristate(true);
- connect( _dlg->hiddenChk, SIGNAL(toggled(bool)), this, SLOT( hiddenChkClicked(bool) ));
- connect( _dlg->vetoChk, SIGNAL(toggled(bool)), this, SLOT( vetoChkClicked(bool) ));
- connect( _dlg->vetoOplockChk, SIGNAL(toggled(bool)), this, SLOT( vetoOplockChkClicked(bool) ));
+ connect( _dlg->hiddenChk, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT( hiddenChkClicked(bool) ));
+ connect( _dlg->vetoChk, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT( vetoChkClicked(bool) ));
+ connect( _dlg->vetoOplockChk, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT( vetoOplockChkClicked(bool) ));
_dlg->hiddenEdit->setText( _share->getValue("hide files") );
- connect( _dlg->hiddenEdit, SIGNAL(textChanged(const QString &)), this, SLOT(updateView()));
+ connect( _dlg->hiddenEdit, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(updateView()));
_dlg->vetoEdit->setText( _share->getValue("veto files") );
- connect( _dlg->vetoEdit, SIGNAL(textChanged(const QString &)), this, SLOT(updateView()));
+ connect( _dlg->vetoEdit, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(updateView()));
_dlg->vetoOplockEdit->setText( _share->getValue("veto oplock files") );
- connect( _dlg->vetoOplockEdit, SIGNAL(textChanged(const QString &)), this, SLOT(updateView()));
+ connect( _dlg->vetoOplockEdit, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(updateView()));
-// new QLabel(i18n("Hint")+" : ",grid);
-// new QLabel(i18n("You have to separate the entries with a '/'. You can use the wildcards '*' and '?'"),grid);
-// new QLabel(i18n("Example")+" : ",grid);
-// new QLabel(i18n("*.tmp/*SECRET*/.*/file?.*/"),grid);
+// new TQLabel(i18n("Hint")+" : ",grid);
+// new TQLabel(i18n("You have to separate the entries with a '/'. You can use the wildcards '*' and '?'"),grid);
+// new TQLabel(i18n("Example")+" : ",grid);
+// new TQLabel(i18n("*.tmp/*SECRET*/.*/file?.*/"),grid);
_dir = new KDirLister(true);
_dir->setShowingDotFiles(true);
- connect( _dir, SIGNAL(newItems(const KFileItemList &)),
- this, SLOT(insertNewFiles(const KFileItemList &)));
+ connect( _dir, TQT_SIGNAL(newItems(const KFileItemList &)),
+ this, TQT_SLOT(insertNewFiles(const KFileItemList &)));
- connect( _dir, SIGNAL(deleteItem(KFileItem*)),
- this, SLOT(deleteItem(KFileItem*)));
+ connect( _dir, TQT_SIGNAL(deleteItem(KFileItem*)),
+ this, TQT_SLOT(deleteItem(KFileItem*)));
- connect( _dir, SIGNAL(refreshItems(const KFileItemList &)),
- this, SLOT(refreshItems(const KFileItemList &)));
+ connect( _dir, TQT_SIGNAL(refreshItems(const KFileItemList &)),
+ this, TQT_SLOT(refreshItems(const KFileItemList &)));
- connect( _hiddenActn, SIGNAL(toggled(bool)), this, SLOT(hiddenChkClicked(bool)));
- connect( _vetoActn, SIGNAL(toggled(bool)), this, SLOT(vetoChkClicked(bool)));
- connect( _vetoOplockActn, SIGNAL(toggled(bool)), this, SLOT(vetoOplockChkClicked(bool)));
+ connect( _hiddenActn, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(hiddenChkClicked(bool)));
+ connect( _vetoActn, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(vetoChkClicked(bool)));
+ connect( _vetoOplockActn, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(vetoOplockChkClicked(bool)));
}
void HiddenFileView::initListView()
{
_dlg->hiddenListView->setMultiSelection(true);
- _dlg->hiddenListView->setSelectionMode(QListView::Extended);
+ _dlg->hiddenListView->setSelectionMode(TQListView::Extended);
_dlg->hiddenListView->setAllColumnsShowFocus(true);
_hiddenList = createRegExpList(_share->getValue("hide files"));
@@ -172,15 +172,15 @@ void HiddenFileView::initListView()
_vetoActn->plug(_popup);
_vetoOplockActn->plug(_popup);
- connect( _dlg->hiddenListView, SIGNAL(selectionChanged()), this, SLOT(selectionChanged()));
- connect( _dlg->hiddenListView, SIGNAL(contextMenu(KListView*,QListViewItem*,const QPoint&)),
- this, SLOT(showContextMenu()));
+ connect( _dlg->hiddenListView, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(selectionChanged()));
+ connect( _dlg->hiddenListView, TQT_SIGNAL(contextMenu(KListView*,TQListViewItem*,const TQPoint&)),
+ this, TQT_SLOT(showContextMenu()));
- connect( _dlg->hideDotFilesChk, SIGNAL(toggled(bool)), this, SLOT(hideDotFilesChkClicked(bool)));
- connect( _dlg->hideUnreadableChk, SIGNAL(toggled(bool)), this, SLOT(hideUnreadableChkClicked(bool)));
+ connect( _dlg->hideDotFilesChk, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(hideDotFilesChkClicked(bool)));
+ connect( _dlg->hideUnreadableChk, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(hideUnreadableChkClicked(bool)));
- connect( _dlg->hiddenListView, SIGNAL(mouseButtonPressed(int,QListViewItem*,const QPoint &,int)),
- this, SLOT(slotMouseButtonPressed(int,QListViewItem*,const QPoint &,int)));
+ connect( _dlg->hiddenListView, TQT_SIGNAL(mouseButtonPressed(int,TQListViewItem*,const TQPoint &,int)),
+ this, TQT_SLOT(slotMouseButtonPressed(int,TQListViewItem*,const TQPoint &,int)));
}
HiddenFileView::~HiddenFileView()
@@ -198,7 +198,7 @@ void HiddenFileView::load()
void HiddenFileView::save()
{
- QString s = _dlg->hiddenEdit->text().stripWhiteSpace();
+ TQString s = _dlg->hiddenEdit->text().stripWhiteSpace();
// its important that the string ends with an '/'
// otherwise Samba won't recognize the last entry
if ( (!s.isEmpty()) && (s.right(1)!="/"))
@@ -279,7 +279,7 @@ void HiddenFileView::refreshItems( const KFileItemList& /*items*/ )
void HiddenFileView::showContextMenu()
{
- _popup->exec(QCursor::pos());
+ _popup->exec(TQCursor::pos());
}
@@ -360,7 +360,7 @@ void HiddenFileView::selectionChanged()
}
}
-void HiddenFileView::checkBoxClicked(QCheckBox* chkBox,KToggleAction* action,QLineEdit* edit, int column,QPtrList<QRegExp> & reqExpList,bool b) {
+void HiddenFileView::checkBoxClicked(TQCheckBox* chkBox,KToggleAction* action,TQLineEdit* edit, int column,TQPtrList<TQRegExp> & reqExpList,bool b) {
// We don't save the old state so
// disable the tristate mode
chkBox->setTristate(false);
@@ -378,7 +378,7 @@ void HiddenFileView::checkBoxClicked(QCheckBox* chkBox,KToggleAction* action,QLi
continue;
if (!b) {
- QRegExp* rx = getRegExpListMatch(item->text(0),reqExpList);
+ TQRegExp* rx = getRegExpListMatch(item->text(0),reqExpList);
// Perhaps the file was hidden because it started with a dot
if (!rx && item->text(0)[0]=='.' && _dlg->hideDotFilesChk->isChecked()) {
@@ -387,7 +387,7 @@ void HiddenFileView::checkBoxClicked(QCheckBox* chkBox,KToggleAction* action,QLi
"do you want to uncheck all files starting with a dot?</qt>"),i18n("Files Starting With Dot"),i18n("Uncheck Hidden"), i18n("Keep Hidden"));
if (result == KMessageBox::No) {
- QPtrList<HiddenListViewItem> lst = getMatchingItems(QRegExp(".*",false,true));
+ TQPtrList<HiddenListViewItem> lst = getMatchingItems(TQRegExp(".*",false,true));
deselect(lst);
} else {
_dlg->hideDotFilesChk->setChecked(false);
@@ -396,7 +396,7 @@ void HiddenFileView::checkBoxClicked(QCheckBox* chkBox,KToggleAction* action,QLi
} else {
if (rx) {
// perhaps it is matched by a wildcard string
- QString p = rx->pattern();
+ TQString p = rx->pattern();
if ( p.find("*") > -1 ||
p.find("?") > -1 )
{
@@ -407,7 +407,7 @@ void HiddenFileView::checkBoxClicked(QCheckBox* chkBox,KToggleAction* action,QLi
"do you want to uncheck all files matching <b>'%1'</b>?").arg(rx->pattern()).arg(rx->pattern()).arg(rx->pattern()),
i18n("Wildcarded String"),i18n("Uncheck Matches"),i18n("Keep Selected"));
- QPtrList<HiddenListViewItem> lst = getMatchingItems( *rx );
+ TQPtrList<HiddenListViewItem> lst = getMatchingItems( *rx );
if (result == KMessageBox::No) {
deselect(lst);
@@ -425,7 +425,7 @@ void HiddenFileView::checkBoxClicked(QCheckBox* chkBox,KToggleAction* action,QLi
}
}
else {
- reqExpList.append( new QRegExp(item->text(0)) );
+ reqExpList.append( new TQRegExp(item->text(0)) );
updateEdit(edit, reqExpList);
}
@@ -451,24 +451,24 @@ void HiddenFileView::vetoChkClicked(bool b)
}
/**
- * Sets the text of the QLineEdit edit to the entries of the passed QRegExp-List
+ * Sets the text of the TQLineEdit edit to the entries of the passed QRegExp-List
**/
-void HiddenFileView::updateEdit(QLineEdit* edit, QPtrList<QRegExp> & lst)
+void HiddenFileView::updateEdit(TQLineEdit* edit, TQPtrList<TQRegExp> & lst)
{
- QString s="";
+ TQString s="";
- QRegExp* rx;
- for(rx = static_cast<QRegExp*>(lst.first()); rx;
- rx = static_cast<QRegExp*>(lst.next()) )
+ TQRegExp* rx;
+ for(rx = static_cast<TQRegExp*>(lst.first()); rx;
+ rx = static_cast<TQRegExp*>(lst.next()) )
{
- s+= rx->pattern()+QString("/");
+ s+= rx->pattern()+TQString("/");
}
edit->setText(s);
}
-void HiddenFileView::setState(QPtrList<HiddenListViewItem> & lst, int column, bool b) {
+void HiddenFileView::setState(TQPtrList<HiddenListViewItem> & lst, int column, bool b) {
HiddenListViewItem* item;
for(item = static_cast<HiddenListViewItem*>(lst.first()); item;
item = static_cast<HiddenListViewItem*>(lst.next()) )
@@ -478,7 +478,7 @@ void HiddenFileView::setState(QPtrList<HiddenListViewItem> & lst, int column, bo
}
-void HiddenFileView::deselect(QPtrList<HiddenListViewItem> & lst)
+void HiddenFileView::deselect(TQPtrList<HiddenListViewItem> & lst)
{
HiddenListViewItem* item;
for(item = static_cast<HiddenListViewItem*>(lst.first()); item;
@@ -489,9 +489,9 @@ void HiddenFileView::deselect(QPtrList<HiddenListViewItem> & lst)
}
-QPtrList<HiddenListViewItem> HiddenFileView::getMatchingItems(const QRegExp & rx)
+TQPtrList<HiddenListViewItem> HiddenFileView::getMatchingItems(const TQRegExp & rx)
{
- QPtrList<HiddenListViewItem> lst;
+ TQPtrList<HiddenListViewItem> lst;
HiddenListViewItem* item;
for (item = static_cast<HiddenListViewItem*>(_dlg->hiddenListView->firstChild());item;
@@ -523,44 +523,44 @@ void HiddenFileView::updateView()
}
-QPtrList<QRegExp> HiddenFileView::createRegExpList(const QString & s)
+TQPtrList<TQRegExp> HiddenFileView::createRegExpList(const TQString & s)
{
- QPtrList<QRegExp> lst;
+ TQPtrList<TQRegExp> lst;
bool cs = _share->getBoolValue("case sensitive");
if (!s.isEmpty())
{
- QStringList l = QStringList::split("/",s);
+ TQStringList l = TQStringList::split("/",s);
- for ( QStringList::Iterator it = l.begin(); it != l.end(); ++it ) {
- lst.append( new QRegExp(*it,cs,true) );
+ for ( TQStringList::Iterator it = l.begin(); it != l.end(); ++it ) {
+ lst.append( new TQRegExp(*it,cs,true) );
}
}
return lst;
}
-bool HiddenFileView::matchHidden(const QString & s)
+bool HiddenFileView::matchHidden(const TQString & s)
{
- QPtrList<QRegExp> hiddenList(_hiddenList);
+ TQPtrList<TQRegExp> hiddenList(_hiddenList);
if (_dlg->hideDotFilesChk->isChecked())
- hiddenList.append( new QRegExp(".*",false,true) );
+ hiddenList.append( new TQRegExp(".*",false,true) );
return matchRegExpList(s,hiddenList);
}
-bool HiddenFileView::matchVeto(const QString & s)
+bool HiddenFileView::matchVeto(const TQString & s)
{
return matchRegExpList(s,_vetoList);
}
-bool HiddenFileView::matchVetoOplock(const QString & s)
+bool HiddenFileView::matchVetoOplock(const TQString & s)
{
return matchRegExpList(s,_vetoOplockList);
}
-bool HiddenFileView::matchRegExpList(const QString & s, QPtrList<QRegExp> & lst)
+bool HiddenFileView::matchRegExpList(const TQString & s, TQPtrList<TQRegExp> & lst)
{
if (getRegExpListMatch(s,lst))
return true;
@@ -569,19 +569,19 @@ bool HiddenFileView::matchRegExpList(const QString & s, QPtrList<QRegExp> & lst)
}
-QRegExp* HiddenFileView::getHiddenMatch(const QString & s)
+TQRegExp* HiddenFileView::getHiddenMatch(const TQString & s)
{
return getRegExpListMatch(s,_hiddenList);
}
-QRegExp* HiddenFileView::getVetoMatch(const QString & s)
+TQRegExp* HiddenFileView::getVetoMatch(const TQString & s)
{
return getRegExpListMatch(s,_vetoList);
}
-QRegExp* HiddenFileView::getRegExpListMatch(const QString & s, QPtrList<QRegExp> & lst)
+TQRegExp* HiddenFileView::getRegExpListMatch(const TQString & s, TQPtrList<TQRegExp> & lst)
{
- QRegExp* rx;
+ TQRegExp* rx;
for ( rx = lst.first(); rx; rx = lst.next() )
{
@@ -602,7 +602,7 @@ void HiddenFileView::hideUnreadableChkClicked(bool)
updateView();
}
-void HiddenFileView::slotMouseButtonPressed( int, QListViewItem*, const QPoint&, int c ) {
+void HiddenFileView::slotMouseButtonPressed( int, TQListViewItem*, const TQPoint&, int c ) {
columnClicked(c);
}
diff --git a/filesharing/advanced/kcm_sambaconf/hiddenfileview.h b/filesharing/advanced/kcm_sambaconf/hiddenfileview.h
index ca3cb1c3..a2ec3468 100644
--- a/filesharing/advanced/kcm_sambaconf/hiddenfileview.h
+++ b/filesharing/advanced/kcm_sambaconf/hiddenfileview.h
@@ -43,10 +43,10 @@ class HiddenListViewItem : public QMultiCheckListItem
{
Q_OBJECT
public:
- HiddenListViewItem( QListView *parent, KFileItem *fi, bool hidden, bool veto, bool vetoOplock );
+ HiddenListViewItem( TQListView *parent, KFileItem *fi, bool hidden, bool veto, bool vetoOplock );
~HiddenListViewItem();
- virtual void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment);
+ virtual void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment);
KFileItem* getFileItem();
protected:
@@ -89,9 +89,9 @@ protected:
ShareDlgImpl* _dlg;
KDirLister* _dir;
- QPtrList<QRegExp> _hiddenList;
- QPtrList<QRegExp> _vetoList;
- QPtrList<QRegExp> _vetoOplockList;
+ TQPtrList<TQRegExp> _hiddenList;
+ TQPtrList<TQRegExp> _vetoList;
+ TQPtrList<TQRegExp> _vetoOplockList;
KToggleAction* _hiddenActn;
KToggleAction* _vetoActn;
@@ -101,22 +101,22 @@ protected:
void initListView();
- QPtrList<QRegExp> createRegExpList(const QString & s);
- bool matchHidden(const QString & s);
- bool matchVeto(const QString & s);
- bool matchVetoOplock(const QString & s);
- bool matchRegExpList(const QString & s, QPtrList<QRegExp> & lst);
+ TQPtrList<TQRegExp> createRegExpList(const TQString & s);
+ bool matchHidden(const TQString & s);
+ bool matchVeto(const TQString & s);
+ bool matchVetoOplock(const TQString & s);
+ bool matchRegExpList(const TQString & s, TQPtrList<TQRegExp> & lst);
- QRegExp* getHiddenMatch(const QString & s);
- QRegExp* getVetoMatch(const QString & s);
- QRegExp* getRegExpListMatch(const QString & s, QPtrList<QRegExp> & lst);
+ TQRegExp* getHiddenMatch(const TQString & s);
+ TQRegExp* getVetoMatch(const TQString & s);
+ TQRegExp* getRegExpListMatch(const TQString & s, TQPtrList<TQRegExp> & lst);
- QPtrList<HiddenListViewItem> getMatchingItems(const QRegExp & rx);
+ TQPtrList<HiddenListViewItem> getMatchingItems(const TQRegExp & rx);
- void setState(QPtrList<HiddenListViewItem> & lst,int column, bool b);
- void deselect(QPtrList<HiddenListViewItem> & lst);
+ void setState(TQPtrList<HiddenListViewItem> & lst,int column, bool b);
+ void deselect(TQPtrList<HiddenListViewItem> & lst);
- void updateEdit(QLineEdit* edit, QPtrList<QRegExp> & lst);
+ void updateEdit(TQLineEdit* edit, TQPtrList<TQRegExp> & lst);
protected slots:
// slots for KDirListener :
@@ -128,13 +128,13 @@ protected slots:
void hiddenChkClicked(bool b);
void vetoChkClicked(bool b);
void vetoOplockChkClicked(bool b);
- void checkBoxClicked(QCheckBox* chkBox,KToggleAction* action,QLineEdit* edit,int column,QPtrList<QRegExp> &reqExpList,bool b);
+ void checkBoxClicked(TQCheckBox* chkBox,KToggleAction* action,TQLineEdit* edit,int column,TQPtrList<TQRegExp> &reqExpList,bool b);
void columnClicked(int column);
void showContextMenu();
void updateView();
void hideDotFilesChkClicked(bool);
void hideUnreadableChkClicked(bool);
- void slotMouseButtonPressed( int button, QListViewItem * item, const QPoint & pos, int c );
+ void slotMouseButtonPressed( int button, TQListViewItem * item, const TQPoint & pos, int c );
};
#endif
diff --git a/filesharing/advanced/kcm_sambaconf/joindomaindlg.ui.h b/filesharing/advanced/kcm_sambaconf/joindomaindlg.ui.h
index bcc5fe53..8af0c9ab 100644
--- a/filesharing/advanced/kcm_sambaconf/joindomaindlg.ui.h
+++ b/filesharing/advanced/kcm_sambaconf/joindomaindlg.ui.h
@@ -13,5 +13,5 @@ void JoinDomainDlg::accept() {
return;
}
- QDialog::accept();
+ TQDialog::accept();
}
diff --git a/filesharing/advanced/kcm_sambaconf/kcmprinterdlg.ui.h b/filesharing/advanced/kcm_sambaconf/kcmprinterdlg.ui.h
index 56debcde..51c9c5d4 100644
--- a/filesharing/advanced/kcm_sambaconf/kcmprinterdlg.ui.h
+++ b/filesharing/advanced/kcm_sambaconf/kcmprinterdlg.ui.h
@@ -33,12 +33,12 @@ void KcmPrinterDlg::init()
void KcmPrinterDlg::accept()
{
- QDialog::accept();
+ TQDialog::accept();
}
void KcmPrinterDlg::reject()
{
- QDialog::reject();
+ TQDialog::reject();
}
void KcmPrinterDlg::printersChkToggled( bool )
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);
diff --git a/filesharing/advanced/kcm_sambaconf/kcmsambaconf.h b/filesharing/advanced/kcm_sambaconf/kcmsambaconf.h
index c17ec3b0..8d281555 100644
--- a/filesharing/advanced/kcm_sambaconf/kcmsambaconf.h
+++ b/filesharing/advanced/kcm_sambaconf/kcmsambaconf.h
@@ -34,20 +34,20 @@
#include <kcmodule.h>
#include <kcminterface.h>
#include <share.h>
-#include <qptrlist.h>
-#include <qlistview.h>
+#include <tqptrlist.h>
+#include <tqlistview.h>
class SambaShare;
class SambaFile;
class QPixmap;
/**
-* A QListViewItem which holds a SambaShare object
+* A TQListViewItem which holds a SambaShare object
**/
class ShareListViewItem : public QListViewItem
{
public:
- ShareListViewItem(QListView * parent, SambaShare* share);
+ ShareListViewItem(TQListView * parent, SambaShare* share);
SambaShare* getShare() const;
void setShare(SambaShare* share);
@@ -55,7 +55,7 @@ public:
protected:
SambaShare* _share;
- QPixmap createPropertyPixmap();
+ TQPixmap createPropertyPixmap();
};
@@ -70,14 +70,14 @@ class KcmSambaConf: public KCModule
{
Q_OBJECT
public:
- KcmSambaConf(QWidget *parent = 0L, const char *name = 0L);
+ KcmSambaConf(TQWidget *parent = 0L, const char *name = 0L);
virtual ~KcmSambaConf();
- void load(const QString &);
+ void load(const TQString &);
void save();
void defaults();
int buttons();
- QString quickHelp() const;
+ TQString quickHelp() const;
public slots:
void configChanged();
@@ -98,7 +98,7 @@ class KcmSambaConf: public KCModule
/**
* The path of the smb.conf file
**/
- QString _smbconf;
+ TQString _smbconf;
SambaFile* _sambaFile;
DictManager* _dictMngr;
@@ -106,10 +106,10 @@ class KcmSambaConf: public KCModule
void init();
void loadUserTab();
void saveUserTab();
- bool getSocketBoolValue( const QString & str, const QString & name );
- int getSocketIntValue( const QString & str, const QString & name );
- QString socketOptions();
- void setComboIndexToValue(QComboBox* box, const QString & value, SambaShare* share);
+ bool getSocketBoolValue( const TQString & str, const TQString & name );
+ int getSocketIntValue( const TQString & str, const TQString & name );
+ TQString socketOptions();
+ void setComboIndexToValue(TQComboBox* box, const TQString & value, SambaShare* share);
void loadBaseSettings(SambaShare*s=0L);
void loadSecurity(SambaShare* );
@@ -142,13 +142,13 @@ class KcmSambaConf: public KCModule
void addSambaUserBtnClicked();
void removeSambaUserBtnClicked();
void sambaUserPasswordBtnClicked();
- void slotMouseButtonPressed(int,QListViewItem*,const QPoint &,int);
+ void slotMouseButtonPressed(int,TQListViewItem*,const TQPoint &,int);
void joinADomainBtnClicked();
void nullPasswordsEnabled(bool);
void loadBtnClicked();
- void loadCanceled(const QString & msg);
+ void loadCanceled(const TQString & msg);
void fillFields();
- void slotSpecifySmbConf(const QString &);
+ void slotSpecifySmbConf(const TQString &);
private:
KcmInterface* _interface;
diff --git a/filesharing/advanced/kcm_sambaconf/linuxpermissionchecker.cpp b/filesharing/advanced/kcm_sambaconf/linuxpermissionchecker.cpp
index af763729..83ea5180 100644
--- a/filesharing/advanced/kcm_sambaconf/linuxpermissionchecker.cpp
+++ b/filesharing/advanced/kcm_sambaconf/linuxpermissionchecker.cpp
@@ -23,8 +23,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
* *
******************************************************************************/
-#include <qregexp.h>
-#include <qstringlist.h>
+#include <tqregexp.h>
+#include <tqstringlist.h>
#include <kmessagebox.h>
#include <klocale.h>
@@ -34,7 +34,7 @@
#include "sambashare.h"
#include "linuxpermissionchecker.h"
-LinuxPermissionChecker::LinuxPermissionChecker(SambaShare* share,QWidget* parent = 0L)
+LinuxPermissionChecker::LinuxPermissionChecker(SambaShare* share,TQWidget* parent = 0L)
{
m_sambaShare = share;
m_parent = parent;
@@ -44,7 +44,7 @@ LinuxPermissionChecker::LinuxPermissionChecker(SambaShare* share,QWidget* parent
return;
}
- m_fi = QFileInfo(share->getValue("path"));
+ m_fi = TQFileInfo(share->getValue("path"));
if ( ! m_fi.exists()) {
kdDebug(5009) << "LinuxPermissionChecker: path does not exists !" << endl;
@@ -80,17 +80,17 @@ bool LinuxPermissionChecker::checkAllUserPermissions() {
if ( ! m_fi.exists())
return true;
- QStringList readList = QStringList::split(QRegExp("[,\\s]+"),m_sambaShare->getValue("read list"));
+ TQStringList readList = TQStringList::split(TQRegExp("[,\\s]+"),m_sambaShare->getValue("read list"));
- for ( QStringList::Iterator it = readList.begin(); it != readList.end(); ++it )
+ for ( TQStringList::Iterator it = readList.begin(); it != readList.end(); ++it )
{
if (!checkUserReadPermissions(*it))
return false;
}
- QStringList writeList = QStringList::split(QRegExp("[,\\s]+"),m_sambaShare->getValue("write list"));
+ TQStringList writeList = TQStringList::split(TQRegExp("[,\\s]+"),m_sambaShare->getValue("write list"));
- for ( QStringList::Iterator it = writeList.begin(); it != writeList.end(); ++it )
+ for ( TQStringList::Iterator it = writeList.begin(); it != writeList.end(); ++it )
{
if (!checkUserWritePermissions(*it))
return false;
@@ -107,7 +107,7 @@ bool LinuxPermissionChecker::checkPublicPermissions() {
if (!isPublic)
return true;
- QString guestAccount = m_sambaShare->getValue("guest account");
+ TQString guestAccount = m_sambaShare->getValue("guest account");
if ( ! checkUserReadPermissions(guestAccount,false))
{
@@ -139,7 +139,7 @@ bool LinuxPermissionChecker::checkPublicPermissions() {
return true;
}
-bool LinuxPermissionChecker::checkUserPermissions(const QString & user) {
+bool LinuxPermissionChecker::checkUserPermissions(const TQString & user) {
if ( ! checkUserReadPermissions(user))
return false;
@@ -149,14 +149,14 @@ bool LinuxPermissionChecker::checkUserPermissions(const QString & user) {
return true;
}
-bool LinuxPermissionChecker::checkUserWritePermissions(const QString & user, bool showMessageBox) {
+bool LinuxPermissionChecker::checkUserWritePermissions(const TQString & user, bool showMessageBox) {
// If no write permissions are given, we don't need to check them.
if (m_sambaShare->getBoolValue("read only"))
return true;
- if (! ((m_fi.permission(QFileInfo::WriteOther)) ||
- (m_fi.permission(QFileInfo::WriteUser) && user == m_fi.owner()) ||
- (m_fi.permission(QFileInfo::WriteGroup) && isUserInGroup(user, m_fi.group())))
+ if (! ((m_fi.permission(TQFileInfo::WriteOther)) ||
+ (m_fi.permission(TQFileInfo::WriteUser) && user == m_fi.owner()) ||
+ (m_fi.permission(TQFileInfo::WriteGroup) && isUserInGroup(user, m_fi.group())))
)
{
if (!showMessageBox)
@@ -176,10 +176,10 @@ bool LinuxPermissionChecker::checkUserWritePermissions(const QString & user, boo
return true;
}
-bool LinuxPermissionChecker::checkUserReadPermissions(const QString & user, bool showMessageBox) {
- if (! ((m_fi.permission(QFileInfo::ReadOther)) ||
- (m_fi.permission(QFileInfo::ReadUser) && user == m_fi.owner()) ||
- (m_fi.permission(QFileInfo::ReadGroup) && isUserInGroup(user, m_fi.group())))
+bool LinuxPermissionChecker::checkUserReadPermissions(const TQString & user, bool showMessageBox) {
+ if (! ((m_fi.permission(TQFileInfo::ReadOther)) ||
+ (m_fi.permission(TQFileInfo::ReadUser) && user == m_fi.owner()) ||
+ (m_fi.permission(TQFileInfo::ReadGroup) && isUserInGroup(user, m_fi.group())))
)
{
if (!showMessageBox)
diff --git a/filesharing/advanced/kcm_sambaconf/linuxpermissionchecker.h b/filesharing/advanced/kcm_sambaconf/linuxpermissionchecker.h
index c4c1a6fc..2d2397d8 100644
--- a/filesharing/advanced/kcm_sambaconf/linuxpermissionchecker.h
+++ b/filesharing/advanced/kcm_sambaconf/linuxpermissionchecker.h
@@ -26,7 +26,7 @@
#ifndef LINUXPERMISSIONCHECKER_H
#define LINUXPERMISSIONCHECKER_H
-#include <qfileinfo.h>
+#include <tqfileinfo.h>
class SambaShare;
class QWidget;
@@ -43,7 +43,7 @@ class QWidget;
*/
class LinuxPermissionChecker{
public:
- LinuxPermissionChecker(SambaShare*,QWidget* parent );
+ LinuxPermissionChecker(SambaShare*,TQWidget* parent );
~LinuxPermissionChecker();
/**
@@ -79,25 +79,25 @@ protected:
* Checks all permissions of the given un?x user
* @return @see #check
*/
- bool checkUserPermissions(const QString & user);
+ bool checkUserPermissions(const TQString & user);
/**
* Checks the write permissions of the given un?x user
* Does not show a dialog if showMessageBox is false
* @return @see #check
*/
- bool checkUserWritePermissions(const QString & user,bool showMessageBox = true);
+ bool checkUserWritePermissions(const TQString & user,bool showMessageBox = true);
/**
* Checks the read permissions of the given un?x user
* Does not show a dialog if showMessageBox is false
* @return @see #check
*/
- bool checkUserReadPermissions(const QString & user,bool showMessageBox = true);
+ bool checkUserReadPermissions(const TQString & user,bool showMessageBox = true);
- QWidget* m_parent;
+ TQWidget* m_parent;
SambaShare* m_sambaShare;
- QFileInfo m_fi;
+ TQFileInfo m_fi;
};
#endif
diff --git a/filesharing/advanced/kcm_sambaconf/passwd.cpp b/filesharing/advanced/kcm_sambaconf/passwd.cpp
index 78e9c8ad..eb3fe5b1 100644
--- a/filesharing/advanced/kcm_sambaconf/passwd.cpp
+++ b/filesharing/advanced/kcm_sambaconf/passwd.cpp
@@ -57,16 +57,16 @@ UnixUserList getUnixUserList()
return list;
}
-QStringList getUnixUsers()
+TQStringList getUnixUsers()
{
- QStringList list;
+ TQStringList list;
struct passwd* p;
while ((p = getpwent()))
{
if (p)
- list.append(QString(p->pw_name));
+ list.append(TQString(p->pw_name));
}
endpwent();
@@ -76,16 +76,16 @@ QStringList getUnixUsers()
return list;
}
-QStringList getUnixGroups()
+TQStringList getUnixGroups()
{
- QStringList list;
+ TQStringList list;
struct group* g;
while ((g = getgrent()))
{
if (g)
- list.append(QString(g->gr_name));
+ list.append(TQString(g->gr_name));
}
endgrent();
@@ -95,7 +95,7 @@ QStringList getUnixGroups()
return list;
}
-int getUserUID(const QString & name)
+int getUserUID(const TQString & name)
{
if (name.isNull()) return -1;
@@ -109,7 +109,7 @@ int getUserUID(const QString & name)
return -1;
}
-int getUserGID(const QString & name)
+int getUserGID(const TQString & name)
{
if (name.isNull()) return -1;
@@ -123,7 +123,7 @@ int getUserGID(const QString & name)
return -1;
}
-int getGroupGID(const QString & name)
+int getGroupGID(const TQString & name)
{
if (name.isNull()) return -1;
@@ -137,19 +137,19 @@ int getGroupGID(const QString & name)
return -1;
}
-bool isUserInGroup(const QString & user, const QString & group) {
+bool isUserInGroup(const TQString & user, const TQString & group) {
struct group* g;
while ((g = getgrent()))
{
- if (g && QString(g->gr_name) == group) {
+ if (g && TQString(g->gr_name) == group) {
char** names = g->gr_mem;
int i = 0;
char* name = names[0];
while (name != 0L) {
i++;
- if (QString(name) == user) {
+ if (TQString(name) == user) {
endgrent();
return true;
}
diff --git a/filesharing/advanced/kcm_sambaconf/passwd.h b/filesharing/advanced/kcm_sambaconf/passwd.h
index 8c9dba19..f5b5228e 100644
--- a/filesharing/advanced/kcm_sambaconf/passwd.h
+++ b/filesharing/advanced/kcm_sambaconf/passwd.h
@@ -29,28 +29,28 @@
#ifndef PASSWD_H
#define PASSWD_H
-#include <qstringlist.h>
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
class UnixUser
{
public:
- QString name;
+ TQString name;
int uid;
};
-typedef QPtrList<UnixUser> UnixUserList;
+typedef TQPtrList<UnixUser> UnixUserList;
UnixUserList getUnixUserList();
-QStringList getUnixUsers();
-QStringList getUnixGroups();
-int getUserUID(const QString &);
-int getUserGID(const QString &);
-int getGroupGID(const QString &);
-bool isUserInGroup(const QString &, const QString &);
+TQStringList getUnixUsers();
+TQStringList getUnixGroups();
+int getUserUID(const TQString &);
+int getUserGID(const TQString &);
+int getGroupGID(const TQString &);
+bool isUserInGroup(const TQString &, const TQString &);
#endif
diff --git a/filesharing/advanced/kcm_sambaconf/printerdlgimpl.cpp b/filesharing/advanced/kcm_sambaconf/printerdlgimpl.cpp
index 531e4673..3858101d 100644
--- a/filesharing/advanced/kcm_sambaconf/printerdlgimpl.cpp
+++ b/filesharing/advanced/kcm_sambaconf/printerdlgimpl.cpp
@@ -30,17 +30,17 @@
/**
* @author Jan Sch�fer
**/
-#include <qcheckbox.h>
-#include <qlineedit.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlistbox.h>
-#include <qpainter.h>
-#include <qgroupbox.h>
-#include <qpixmap.h>
-#include <qbitmap.h>
-#include <qlayout.h>
-#include <qtabwidget.h>
+#include <tqcheckbox.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlistbox.h>
+#include <tqpainter.h>
+#include <tqgroupbox.h>
+#include <tqpixmap.h>
+#include <tqbitmap.h>
+#include <tqlayout.h>
+#include <tqtabwidget.h>
#include <klineedit.h>
#include <kurlrequester.h>
@@ -61,7 +61,7 @@
#include "dictmanager.h"
-PrinterDlgImpl::PrinterDlgImpl(QWidget* parent, SambaShare* share)
+PrinterDlgImpl::PrinterDlgImpl(TQWidget* parent, SambaShare* share)
: KcmPrinterDlg(parent,"sharedlgimpl")
{
if (!share) {
@@ -81,9 +81,9 @@ void PrinterDlgImpl::initDialog()
if (!_share)
return;
- QPtrList<KMPrinter> *printerList = KMManager::self()->printerListComplete();
+ TQPtrList<KMPrinter> *printerList = KMManager::self()->printerListComplete();
- for (QPtrListIterator<KMPrinter> it(*printerList); it.current(); ++it)
+ for (TQPtrListIterator<KMPrinter> it(*printerList); it.current(); ++it)
{
if (!it.current()->isSpecial()){
queueCombo->insertItem(it.current()->printerName());
@@ -108,7 +108,7 @@ void PrinterDlgImpl::initDialog()
_userTab = new UserTabImpl(this,_share);
_tabs->insertTab(_userTab,i18n("&Users"),1);
_userTab->load();
- connect(_userTab, SIGNAL(changed()), this, SLOT(changedSlot()));
+ connect(_userTab, TQT_SIGNAL(changed()), this, TQT_SLOT(changedSlot()));
// Printing
@@ -120,7 +120,7 @@ void PrinterDlgImpl::initDialog()
_dictMngr->add("max print jobs",maxPrintJobsSpin);
_dictMngr->add("max reported print jobs",maxReportedPrintJobsSpin);
_dictMngr->add("printing",printingCombo,
- new QStringList(QStringList()
+ new TQStringList(TQStringList()
<< "sysv" << "aix" << "hpux" << "bsd" << "qnx"
<< "plp" << "lprng" << "softq" << "cups" << "nt" << "os2"));
@@ -156,7 +156,7 @@ void PrinterDlgImpl::initDialog()
_dictMngr->add("root postexec",rootPostExecEdit);
_dictMngr->load( _share );
- connect(_dictMngr, SIGNAL(changed()), this, SLOT(changedSlot()));
+ connect(_dictMngr, TQT_SIGNAL(changed()), this, TQT_SLOT(changedSlot()));
}
@@ -200,19 +200,19 @@ void PrinterDlgImpl::printersChkToggled(bool b)
int w = 64 + dist;
int h = 64 + 2*dist;
- QPixmap pix(w,h);
+ TQPixmap pix(w,h);
pix.fill(); // fill with white
- QPixmap pix2 = DesktopIcon("printer1");
+ TQPixmap pix2 = DesktopIcon("printer1");
// Draw the printericon three times
- QPainter p(&pix);
+ TQPainter p(&pix);
p.drawPixmap(dist+dist/2,0,pix2);
p.drawPixmap(dist/2,dist,pix2);
p.drawPixmap(dist+dist/2,2*dist,pix2);
p.end();
- QBitmap mask(w,h);
+ TQBitmap mask(w,h);
mask.fill(Qt::black); // everything is transparent
diff --git a/filesharing/advanced/kcm_sambaconf/printerdlgimpl.h b/filesharing/advanced/kcm_sambaconf/printerdlgimpl.h
index 6e473821..265429f8 100644
--- a/filesharing/advanced/kcm_sambaconf/printerdlgimpl.h
+++ b/filesharing/advanced/kcm_sambaconf/printerdlgimpl.h
@@ -50,7 +50,7 @@ Q_OBJECT
public :
- PrinterDlgImpl(QWidget* parent, SambaShare* share);
+ PrinterDlgImpl(TQWidget* parent, SambaShare* share);
~PrinterDlgImpl();
protected :
diff --git a/filesharing/advanced/kcm_sambaconf/qmultichecklistitem.cpp b/filesharing/advanced/kcm_sambaconf/qmultichecklistitem.cpp
index e7e0e260..19729e8d 100644
--- a/filesharing/advanced/kcm_sambaconf/qmultichecklistitem.cpp
+++ b/filesharing/advanced/kcm_sambaconf/qmultichecklistitem.cpp
@@ -26,10 +26,10 @@
* *
******************************************************************************/
-#include <qpen.h>
-#include <qpainter.h>
-#include <qvbox.h>
-#include <qheader.h>
+#include <tqpen.h>
+#include <tqpainter.h>
+#include <tqvbox.h>
+#include <tqheader.h>
#include <kdebug.h>
#include <kmessagebox.h>
@@ -40,8 +40,8 @@
static const int BoxSize = 16;
-QMultiCheckListItem::QMultiCheckListItem( QListView *parent=0) :
- QListViewItem(parent) {
+QMultiCheckListItem::QMultiCheckListItem( TQListView *parent=0) :
+ TQListViewItem(parent) {
}
void QMultiCheckListItem::setOn(int column, bool b) {
@@ -83,56 +83,56 @@ void QMultiCheckListItem::setDisabled(int column, bool b) {
}
disableStates.setBit(column,b);
-// KMessageBox::information(0L,QString("setDisabled"),QString("disable %1 ").arg(column));
+// KMessageBox::information(0L,TQString("setDisabled"),TQString("disable %1 ").arg(column));
repaint();
}
-void QMultiCheckListItem::paintCell(QPainter *p,const QColorGroup & cg, int col, int width, int align)
+void QMultiCheckListItem::paintCell(TQPainter *p,const TQColorGroup & cg, int col, int width, int align)
{
if ( !p )
return;
- QListView *lv = listView();
+ TQListView *lv = listView();
if ( !lv )
return;
- QListViewItem::paintCell(p,cg,col,width,align );
+ TQListViewItem::paintCell(p,cg,col,width,align );
int marg = lv->itemMargin();
// int width = BoxSize + marg*2;
// use a provate color group and set the text/highlighted text colors
- QColorGroup mcg = cg;
+ TQColorGroup mcg = cg;
if (checkBoxColumns.testBit(col)) {
// Bold/Italic/use default checkboxes
// code allmost identical to QCheckListItem
Q_ASSERT( lv ); //###
// I use the text color of defaultStyles[0], normalcol in parent listview
-// mcg.setColor( QColorGroup::Text, ((StyleListView*)lv)->normalcol );
+// mcg.setColor( TQColorGroup::Text, ((StyleListView*)lv)->normalcol );
int x = 0;
if ( align == AlignCenter ) {
- QFontMetrics fm( lv->font() );
+ TQFontMetrics fm( lv->font() );
x = (width - BoxSize - fm.width(text(0)))/2;
}
int y = (height() - BoxSize) / 2;
if ( !isEnabled() || disableStates.testBit(col))
- p->setPen( QPen( lv->palette().color( QPalette::Disabled, QColorGroup::Text ), 2 ) );
+ p->setPen( TQPen( lv->palette().color( TQPalette::Disabled, TQColorGroup::Text ), 2 ) );
else
- p->setPen( QPen( mcg.text(), 2 ) );
+ p->setPen( TQPen( mcg.text(), 2 ) );
if ( isSelected() && lv->header()->mapToSection( 0 ) != 0 ) {
p->fillRect( 0, 0, x + marg + BoxSize + 4, height(),
- mcg.brush( QColorGroup::Highlight ) );
+ mcg.brush( TQColorGroup::Highlight ) );
if ( isEnabled() )
- p->setPen( QPen( mcg.highlightedText(), 2 ) ); // FIXME! - use defaultstyles[0].selecol. luckily not used :)
+ p->setPen( TQPen( mcg.highlightedText(), 2 ) ); // FIXME! - use defaultstyles[0].selecol. luckily not used :)
}
p->drawRect( x+marg, y+2, BoxSize-4, BoxSize-4 );
x++;
y++;
if ( checkStates.testBit(col) ) {
- QPointArray a( 7*2 );
+ TQPointArray a( 7*2 );
int i, xx, yy;
xx = x+1+marg;
yy = y+5;
diff --git a/filesharing/advanced/kcm_sambaconf/qmultichecklistitem.h b/filesharing/advanced/kcm_sambaconf/qmultichecklistitem.h
index 48fa1727..ab4aa8b4 100644
--- a/filesharing/advanced/kcm_sambaconf/qmultichecklistitem.h
+++ b/filesharing/advanced/kcm_sambaconf/qmultichecklistitem.h
@@ -29,15 +29,15 @@
#ifndef _QMULTICHECKLISTITEM_H_
#define _QMULTICHECKLISTITEM_H_
-#include <qlistview.h>
+#include <tqlistview.h>
-#include <qbitarray.h>
+#include <tqbitarray.h>
-class QMultiCheckListItem : public QObject, public QListViewItem {
+class QMultiCheckListItem : public TQObject, public TQListViewItem {
Q_OBJECT
public:
- QMultiCheckListItem( QListView *parent);
+ QMultiCheckListItem( TQListView *parent);
~QMultiCheckListItem() {};
virtual bool isOn(int column);
@@ -46,7 +46,7 @@ Q_OBJECT
protected:
/* reimp */
- virtual void paintCell(QPainter *, const QColorGroup &, int, int, int);
+ virtual void paintCell(TQPainter *, const TQColorGroup &, int, int, int);
public slots:
virtual void setOn(int, bool);
@@ -56,9 +56,9 @@ Q_OBJECT
signals:
void stateChanged(int, bool);
private:
- QBitArray checkStates;
- QBitArray checkBoxColumns;
- QBitArray disableStates;
+ TQBitArray checkStates;
+ TQBitArray checkBoxColumns;
+ TQBitArray disableStates;
};
#endif
diff --git a/filesharing/advanced/kcm_sambaconf/sambafile.cpp b/filesharing/advanced/kcm_sambaconf/sambafile.cpp
index e8dbc5f8..25392514 100644
--- a/filesharing/advanced/kcm_sambaconf/sambafile.cpp
+++ b/filesharing/advanced/kcm_sambaconf/sambafile.cpp
@@ -17,13 +17,13 @@
*/
-#include <qfile.h>
-#include <qprocess.h>
-#include <qfileinfo.h>
+#include <tqfile.h>
+#include <tqprocess.h>
+#include <tqfileinfo.h>
#include <ksimpleconfig.h>
#include <kdebug.h>
-#include <qfileinfo.h>
+#include <tqfileinfo.h>
#include <kio/job.h>
#include <kprocess.h>
#include <kmessagebox.h>
@@ -41,20 +41,20 @@
SambaConfigFile::SambaConfigFile(SambaFile* sambaFile)
{
- QDict<QString>(10,false);
+ TQDict<TQString>(10,false);
setAutoDelete(true);
_sambaFile = sambaFile;
}
-QString SambaConfigFile::getDefaultValue(const QString & name)
+TQString SambaConfigFile::getDefaultValue(const TQString & name)
{
SambaShare* defaults = _sambaFile->getTestParmValues();
- QString s = defaults->getValue(name,false,false);
+ TQString s = defaults->getValue(name,false,false);
return s;
}
-SambaShare* SambaConfigFile::addShare(const QString & name)
+SambaShare* SambaConfigFile::addShare(const TQString & name)
{
SambaShare* newShare = new SambaShare(name,this);
addShare(name,newShare);
@@ -62,25 +62,25 @@ SambaShare* SambaConfigFile::addShare(const QString & name)
}
-void SambaConfigFile::addShare(const QString & name, SambaShare* share)
+void SambaConfigFile::addShare(const TQString & name, SambaShare* share)
{
insert(name,share),
_shareList.append(name);
}
-void SambaConfigFile::removeShare(const QString & name)
+void SambaConfigFile::removeShare(const TQString & name)
{
remove(name);
_shareList.remove(name);
}
-QStringList SambaConfigFile::getShareList()
+TQStringList SambaConfigFile::getShareList()
{
return _shareList;
}
-SambaFile::SambaFile(const QString & _path, bool _readonly)
+SambaFile::SambaFile(const TQString & _path, bool _readonly)
: readonly(_readonly),
changed(false),
path(_path),
@@ -105,9 +105,9 @@ bool SambaFile::isRemoteFile() {
}
/** No descriptions */
-QString SambaFile::findShareByPath(const QString & path) const
+TQString SambaFile::findShareByPath(const TQString & path) const
{
- QDictIterator<SambaShare> it(*_sambaConfig);
+ TQDictIterator<SambaShare> it(*_sambaConfig);
KURL url(path);
url.adjustPath(-1);
@@ -115,7 +115,7 @@ QString SambaFile::findShareByPath(const QString & path) const
{
SambaShare* share = it.current();
- QString *s = share->find("path");
+ TQString *s = share->find("path");
if (s) {
KURL curUrl(*s);
curUrl.adjustPath(-1);
@@ -127,7 +127,7 @@ QString SambaFile::findShareByPath(const QString & path) const
}
}
- return QString::null;
+ return TQString::null;
}
bool SambaFile::save() {
@@ -147,7 +147,7 @@ bool SambaFile::slotApply()
// if not we have to save the results in
// a temporary file and copy it afterwards
// over the smb.conf file with kdesu.
- if (QFileInfo(path).isWritable())
+ if (TQFileInfo(path).isWritable())
{
saveTo(path);
changed = false;
@@ -166,14 +166,14 @@ bool SambaFile::slotApply()
return false;
}
- QFileInfo fi(path);
+ TQFileInfo fi(path);
KURL url(path);
if (KURL(path).isLocalFile()) {
KProcess proc;
kdDebug(5009) << "SambaFile::slotApply: is local file!" << endl;
- QString suCommand=QString("cp %1 %2; rm %3")
+ TQString suCommand=TQString("cp %1 %2; rm %3")
.arg(_tempFile->name())
.arg(path)
.arg(_tempFile->name());
@@ -200,8 +200,8 @@ bool SambaFile::slotApply()
srcURL.setPath( _tempFile->name() );
KIO::FileCopyJob * job = KIO::file_copy( srcURL, url, -1, true );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- this, SLOT( slotSaveJobFinished ( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ this, TQT_SLOT( slotSaveJobFinished ( KIO::Job * ) ) );
return (job->error()==0);
}
@@ -211,20 +211,20 @@ bool SambaFile::slotApply()
/**
* Returns a name which isn't already used for a share
**/
-QString SambaFile::getUnusedName(const QString alreadyUsedName) const
+TQString SambaFile::getUnusedName(const TQString alreadyUsedName) const
{
- QString init = i18n("Unnamed");
- if (alreadyUsedName != QString::null)
+ TQString init = i18n("Unnamed");
+ if (alreadyUsedName != TQString::null)
init = alreadyUsedName;
- QString s = init;
+ TQString s = init;
int i = 2;
while (_sambaConfig->find(s))
{
- s = init+QString::number(i);
+ s = init+TQString::number(i);
i++;
}
@@ -233,7 +233,7 @@ QString SambaFile::getUnusedName(const QString alreadyUsedName) const
-SambaShare* SambaFile::newShare(const QString & name)
+SambaShare* SambaFile::newShare(const TQString & name)
{
if (_sambaConfig->find(name))
return 0L;
@@ -247,7 +247,7 @@ SambaShare* SambaFile::newShare(const QString & name)
}
-SambaShare* SambaFile::newShare(const QString & name, const QString & path)
+SambaShare* SambaFile::newShare(const TQString & name, const TQString & path)
{
SambaShare* share = newShare(name);
if (share)
@@ -258,7 +258,7 @@ SambaShare* SambaFile::newShare(const QString & name, const QString & path)
return share;
}
-SambaShare* SambaFile::newPrinter(const QString & name, const QString & printer)
+SambaShare* SambaFile::newPrinter(const TQString & name, const TQString & printer)
{
SambaShare* share = newShare(name);
@@ -273,7 +273,7 @@ SambaShare* SambaFile::newPrinter(const QString & name, const QString & printer)
/** No descriptions */
-void SambaFile::removeShare(const QString & share)
+void SambaFile::removeShare(const TQString & share)
{
changed = true;
@@ -285,13 +285,13 @@ void SambaFile::removeShare(SambaShare* share)
removeShare(share->getName());
}
-void SambaFile::removeShareByPath(const QString & path) {
- QString share = findShareByPath(path);
+void SambaFile::removeShareByPath(const TQString & path) {
+ TQString share = findShareByPath(path);
removeShare(share);
}
/** No descriptions */
-SambaShare* SambaFile::getShare(const QString & share) const
+SambaShare* SambaFile::getShare(const TQString & share) const
{
SambaShare *s = _sambaConfig->find(share);
@@ -305,7 +305,7 @@ SambaShareList* SambaFile::getSharedDirs() const
{
SambaShareList* list = new SambaShareList();
- QDictIterator<SambaShare> it(*_sambaConfig);
+ TQDictIterator<SambaShare> it(*_sambaConfig);
for( ; it.current(); ++it )
{
@@ -326,7 +326,7 @@ SambaShareList* SambaFile::getSharedPrinters() const
{
SambaShareList* list = new SambaShareList();
- QDictIterator<SambaShare> it(*_sambaConfig);
+ TQDictIterator<SambaShare> it(*_sambaConfig);
for( ; it.current(); ++it )
{
@@ -344,11 +344,11 @@ int SambaFile::getSambaVersion() {
KProcess testParam;
testParam << "testparm";
testParam << "-V";
- _parmOutput = QString("");
+ _parmOutput = TQString("");
_sambaVersion = 2;
- connect( &testParam, SIGNAL(receivedStdout(KProcess*,char*,int)),
- this, SLOT(testParmStdOutReceived(KProcess*,char*,int)));
+ connect( &testParam, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)),
+ this, TQT_SLOT(testParmStdOutReceived(KProcess*,char*,int)));
@@ -378,10 +378,10 @@ SambaShare* SambaFile::getTestParmValues(bool reload)
testParam << "/dev/null";
- _parmOutput = QString("");
+ _parmOutput = TQString("");
- connect( &testParam, SIGNAL(receivedStdout(KProcess*,char*,int)),
- this, SLOT(testParmStdOutReceived(KProcess*,char*,int)));
+ connect( &testParam, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)),
+ this, TQT_SLOT(testParmStdOutReceived(KProcess*,char*,int)));
if (testParam.start(KProcess::Block,KProcess::Stdout))
{
@@ -394,23 +394,23 @@ SambaShare* SambaFile::getTestParmValues(bool reload)
void SambaFile::testParmStdOutReceived(KProcess *, char *buffer, int buflen)
{
- _parmOutput+=QString::fromLatin1(buffer,buflen);
+ _parmOutput+=TQString::fromLatin1(buffer,buflen);
}
void SambaFile::parseParmStdOutput()
{
- QTextIStream s(&_parmOutput);
+ TQTextIStream s(&_parmOutput);
if (_testParmValues)
delete _testParmValues;
_testParmValues = new SambaShare(_sambaConfig);
- QString section="";
+ TQString section="";
while (!s.atEnd())
{
- QString line = s.readLine().stripWhiteSpace();
+ TQString line = s.readLine().stripWhiteSpace();
// empty lines
if (line.isEmpty())
@@ -437,8 +437,8 @@ void SambaFile::parseParmStdOutput()
int i = line.find('=');
if (i>-1) {
- QString name = line.left(i).stripWhiteSpace();
- QString value = line.mid(i+1).stripWhiteSpace();
+ TQString name = line.left(i).stripWhiteSpace();
+ TQString value = line.mid(i+1).stripWhiteSpace();
_testParmValues->setValue(name,value,false,false);
}
@@ -452,9 +452,9 @@ void SambaFile::parseParmStdOutput()
* Try to find the samba config file position
* First tries the config file, then checks
* several common positions
-* If nothing is found returns QString::null
+* If nothing is found returns TQString::null
**/
-QString SambaFile::findSambaConf()
+TQString SambaFile::findSambaConf()
{
return KSambaShare::instance()->smbConfPath();
}
@@ -490,7 +490,7 @@ bool SambaFile::load()
destURL.setPath( localPath );
KIO::FileCopyJob * job = KIO::file_copy( url, destURL, 0600, true, false, true );
// emit started( d->m_job );
- connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotJobFinished ( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotJobFinished ( KIO::Job * ) ) );
return true;
} else {
localPath = path;
@@ -503,14 +503,14 @@ bool SambaFile::load()
bool SambaFile::openFile() {
- QFile f(localPath);
+ TQFile f(localPath);
if (!f.open(IO_ReadOnly)) {
- //throw SambaFileLoadException(QString("<qt>Could not open file <em>%1</em> for reading.</qt>").arg(path));
+ //throw SambaFileLoadException(TQString("<qt>Could not open file <em>%1</em> for reading.</qt>").arg(path));
return false;
}
- QTextStream s(&f);
+ TQTextStream s(&f);
delete _sambaConfig;
@@ -518,12 +518,12 @@ bool SambaFile::openFile() {
SambaShare *currentShare = 0L;
bool continuedLine = false; // is true if the line before ended with a backslash
- QString completeLine;
- QStringList comments;
+ TQString completeLine;
+ TQStringList comments;
while (!s.eof())
{
- QString currentLine = s.readLine().stripWhiteSpace();
+ TQString currentLine = s.readLine().stripWhiteSpace();
if (continuedLine)
{
@@ -555,7 +555,7 @@ bool SambaFile::openFile() {
if ('[' == completeLine[0])
{
// get the name of the section
- QString section = completeLine.mid(1,completeLine.length()-2);
+ TQString section = completeLine.mid(1,completeLine.length()-2);
currentShare = _sambaConfig->addShare(section);
currentShare->setComments(comments);
comments.clear();
@@ -568,8 +568,8 @@ bool SambaFile::openFile() {
if (i>-1)
{
- QString name = completeLine.left(i).stripWhiteSpace();
- QString value = completeLine.mid(i+1).stripWhiteSpace();
+ TQString name = completeLine.left(i).stripWhiteSpace();
+ TQString value = completeLine.mid(i+1).stripWhiteSpace();
if (currentShare)
{
@@ -591,24 +591,24 @@ bool SambaFile::openFile() {
return true;
}
-bool SambaFile::saveTo(const QString & path)
+bool SambaFile::saveTo(const TQString & path)
{
- QFile f(path);
+ TQFile f(path);
if (!f.open(IO_WriteOnly))
return false;
- QTextStream s(&f);
+ TQTextStream s(&f);
- QStringList shareList = _sambaConfig->getShareList();
+ TQStringList shareList = _sambaConfig->getShareList();
- for ( QStringList::Iterator it = shareList.begin(); it != shareList.end(); ++it )
+ for ( TQStringList::Iterator it = shareList.begin(); it != shareList.end(); ++it )
{
SambaShare* share = _sambaConfig->find(*it);
// First add all comments of the share to the file
- QStringList comments = share->getComments();
- for ( QStringList::Iterator cmtIt = comments.begin(); cmtIt != comments.end(); ++cmtIt )
+ TQStringList comments = share->getComments();
+ for ( TQStringList::Iterator cmtIt = comments.begin(); cmtIt != comments.end(); ++cmtIt )
{
s << *cmtIt << endl;
@@ -624,14 +624,14 @@ bool SambaFile::saveTo(const QString & path)
s << "[" << share->getName() << "]" << endl;
// Add all options of the share
- QStringList optionList = share->getOptionList();
+ TQStringList optionList = share->getOptionList();
- for ( QStringList::Iterator optionIt = optionList.begin(); optionIt != optionList.end(); ++optionIt )
+ for ( TQStringList::Iterator optionIt = optionList.begin(); optionIt != optionList.end(); ++optionIt )
{
// Add the comments of the option
comments = share->getComments(*optionIt);
- for ( QStringList::Iterator cmtIt = comments.begin(); cmtIt != comments.end(); ++cmtIt )
+ for ( TQStringList::Iterator cmtIt = comments.begin(); cmtIt != comments.end(); ++cmtIt )
{
s << *cmtIt << endl;
}
@@ -651,21 +651,21 @@ bool SambaFile::saveTo(const QString & path)
SambaConfigFile* SambaFile::getSambaConfigFile(KSimpleConfig* config)
{
- QStringList groups = config->groupList();
+ TQStringList groups = config->groupList();
SambaConfigFile* samba = new SambaConfigFile(this);
- for ( QStringList::Iterator it = groups.begin(); it != groups.end(); ++it )
+ for ( TQStringList::Iterator it = groups.begin(); it != groups.end(); ++it )
{
- QMap<QString,QString> entries = config->entryMap(*it);
+ TQMap<TQString,TQString> entries = config->entryMap(*it);
SambaShare *share = new SambaShare(*it,samba);
samba->insert(*it,share);
- for (QMap<QString,QString>::Iterator it2 = entries.begin(); it2 != entries.end(); ++it2 )
+ for (TQMap<TQString,TQString>::Iterator it2 = entries.begin(); it2 != entries.end(); ++it2 )
{
if (!it2.data().isEmpty())
- share->setValue(it2.key(),QString(it2.data()),false,false);
+ share->setValue(it2.key(),TQString(it2.data()),false,false);
}
}
@@ -674,11 +674,11 @@ SambaConfigFile* SambaFile::getSambaConfigFile(KSimpleConfig* config)
}
-KSimpleConfig* SambaFile::getSimpleConfig(SambaConfigFile* sambaConfig, const QString & path)
+KSimpleConfig* SambaFile::getSimpleConfig(SambaConfigFile* sambaConfig, const TQString & path)
{
KSimpleConfig *config = new KSimpleConfig(path,false);
- QDictIterator<SambaShare> it(*sambaConfig);
+ TQDictIterator<SambaShare> it(*sambaConfig);
for ( ; it.current(); ++it )
{
@@ -686,7 +686,7 @@ KSimpleConfig* SambaFile::getSimpleConfig(SambaConfigFile* sambaConfig, const QS
config->setGroup(it.currentKey());
- QDictIterator<QString> it2(*share);
+ TQDictIterator<TQString> it2(*share);
for (; it2.current(); ++it2 )
{
diff --git a/filesharing/advanced/kcm_sambaconf/sambafile.h b/filesharing/advanced/kcm_sambaconf/sambafile.h
index ab5d58c4..543082ba 100644
--- a/filesharing/advanced/kcm_sambaconf/sambafile.h
+++ b/filesharing/advanced/kcm_sambaconf/sambafile.h
@@ -21,9 +21,9 @@
#define SAMBAFILE_H
-#include <qdict.h>
-#include <qstring.h>
-#include <qobject.h>
+#include <tqdict.h>
+#include <tqstring.h>
+#include <tqobject.h>
#include <kio/job.h>
#include "sambashare.h"
@@ -39,49 +39,49 @@ class SambaFile;
class SambaFileLoadException
{
public:
- SambaFileLoadException(const QString & msg) { message = msg; };
+ SambaFileLoadException(const TQString & msg) { message = msg; };
- QString getMessage() { return message; };
+ TQString getMessage() { return message; };
protected:
- QString message;
+ TQString message;
};
-class SambaConfigFile : public QDict<SambaShare>
+class SambaConfigFile : public TQDict<SambaShare>
{
public:
SambaConfigFile(SambaFile*);
- QString getDefaultValue(const QString & name);
- QStringList getShareList();
- void addShare(const QString & name, SambaShare* share);
- SambaShare* addShare(const QString & name);
- void removeShare(const QString & name);
+ TQString getDefaultValue(const TQString & name);
+ TQStringList getShareList();
+ void addShare(const TQString & name, SambaShare* share);
+ SambaShare* addShare(const TQString & name);
+ void removeShare(const TQString & name);
protected:
SambaFile* _sambaFile;
- QStringList _shareList;
+ TQStringList _shareList;
};
class SambaFile : public QObject
{
Q_OBJECT
public:
- SambaFile(const QString & _path, bool _readonly=true);
+ SambaFile(const TQString & _path, bool _readonly=true);
~SambaFile();
/** No descriptions */
- QString findShareByPath(const QString & path) const;
- void removeShareByPath(const QString & path);
+ TQString findShareByPath(const TQString & path) const;
+ void removeShareByPath(const TQString & path);
- SambaShare* newShare(const QString & name);
- SambaShare* newShare(const QString & name, const QString & path);
- SambaShare* newPrinter(const QString & name, const QString & printer);
+ SambaShare* newShare(const TQString & name);
+ SambaShare* newShare(const TQString & name, const TQString & path);
+ SambaShare* newPrinter(const TQString & name, const TQString & printer);
- void removeShare(const QString & share);
+ void removeShare(const TQString & share);
void removeShare(SambaShare* share);
- void renameShare(const QString & oldName, const QString & newName);
+ void renameShare(const TQString & oldName, const TQString & newName);
- SambaShare* getShare(const QString & share) const;
+ SambaShare* getShare(const TQString & share) const;
/**
* Returns a list of all shared directories
@@ -100,7 +100,7 @@ public:
* E.g.: if public is already used, the method could return
* public2
**/
- QString getUnusedName(const QString alreadyUsedName=QString::null) const;
+ TQString getUnusedName(const TQString alreadyUsedName=TQString::null) const;
/**
* Returns all values of the global section
@@ -111,7 +111,7 @@ public:
**/
SambaShare* getTestParmValues(bool reload=false);
- static QString findSambaConf();
+ static TQString findSambaConf();
int getSambaVersion();
@@ -135,21 +135,21 @@ public:
* Save all data to the specified file
* if successful returns true otherwise false
**/
- bool saveTo(const QString & path);
+ bool saveTo(const TQString & path);
protected:
bool readonly;
bool changed;
- QString path;
- QString localPath;
+ TQString path;
+ TQString localPath;
SambaConfigFile *_sambaConfig;
SambaShare* _testParmValues;
- QString _parmOutput;
+ TQString _parmOutput;
int _sambaVersion;
void parseParmStdOutput();
SambaConfigFile* getSambaConfigFile(KSimpleConfig* config);
- KSimpleConfig* getSimpleConfig(SambaConfigFile* sambaConfig, const QString & filename);
+ KSimpleConfig* getSimpleConfig(SambaConfigFile* sambaConfig, const TQString & filename);
@@ -170,7 +170,7 @@ protected slots:
void slotSaveJobFinished( KIO::Job *);
signals:
- void canceled(const QString &);
+ void canceled(const TQString &);
void completed();
};
diff --git a/filesharing/advanced/kcm_sambaconf/sambashare.cpp b/filesharing/advanced/kcm_sambaconf/sambashare.cpp
index 68afef2a..a2c58565 100644
--- a/filesharing/advanced/kcm_sambaconf/sambashare.cpp
+++ b/filesharing/advanced/kcm_sambaconf/sambashare.cpp
@@ -27,34 +27,34 @@
******************************************************************************/
#include <kdebug.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include "sambafile.h"
#include "sambashare.h"
#include "common.h"
SambaShare::SambaShare(SambaConfigFile* sambaFile)
- : QDict<QString>(10,false)
+ : TQDict<TQString>(10,false)
{
_sambaFile = sambaFile;
setName("defaults");
setAutoDelete(true);
}
-SambaShare::SambaShare(const QString & name, SambaConfigFile* sambaFile)
- : QDict<QString>(10,false)
+SambaShare::SambaShare(const TQString & name, SambaConfigFile* sambaFile)
+ : TQDict<TQString>(10,false)
{
_sambaFile = sambaFile;
setName(name);
setAutoDelete(true);
}
-const QString& SambaShare::getName() const
+const TQString& SambaShare::getName() const
{
return _name;
}
-bool SambaShare::setName(const QString & name, bool testWetherExists)
+bool SambaShare::setName(const TQString & name, bool testWetherExists)
{
if ( testWetherExists &&
@@ -66,9 +66,9 @@ bool SambaShare::setName(const QString & name, bool testWetherExists)
return true;
}
-bool SambaShare::optionSupported(const QString & name)
+bool SambaShare::optionSupported(const TQString & name)
{
- QString defaultValue = _sambaFile->getDefaultValue(name);
+ TQString defaultValue = _sambaFile->getDefaultValue(name);
// kdDebug(5009) << name << " = " << defaultValue << " null : " << defaultValue.isNull() << endl;
return ! defaultValue.isNull();
}
@@ -78,12 +78,12 @@ bool SambaShare::optionSupported(const QString & name)
* if no value is set yet the default value
* will be returned.
**/
-QString SambaShare::getValue(const QString & name, bool globalValue, bool defaultValue)
+TQString SambaShare::getValue(const TQString & name, bool globalValue, bool defaultValue)
{
- QString synonym = getSynonym(name);
+ TQString synonym = getSynonym(name);
- QString* str = find(synonym);
- QString ret;
+ TQString* str = find(synonym);
+ TQString ret;
if (str) {
ret = *str;
@@ -102,20 +102,20 @@ QString SambaShare::getValue(const QString & name, bool globalValue, bool defaul
return ret;
}
-bool SambaShare::getBoolValue(const QString & name, bool globalValue, bool defaultValue)
+bool SambaShare::getBoolValue(const TQString & name, bool globalValue, bool defaultValue)
{
return boolFromText(getValue(name,globalValue,defaultValue));
}
-QString SambaShare::getGlobalValue(const QString & name, bool defaultValue)
+TQString SambaShare::getGlobalValue(const TQString & name, bool defaultValue)
{
if (!_sambaFile)
return getValue(name,false,defaultValue);
SambaShare* globals = _sambaFile->find("global");
- QString s = globals->getValue(name,false,defaultValue);
+ TQString s = globals->getValue(name,false,defaultValue);
return s;
}
@@ -126,14 +126,14 @@ QString SambaShare::getGlobalValue(const QString & name, bool defaultValue)
* if no synonym exists the original parameter in lower
* case is returned
**/
-QString SambaShare::getSynonym(const QString & name) const
+TQString SambaShare::getSynonym(const TQString & name) const
{
// idmap config is an exception and shouldn't be set to lower
- QString sname = name.left(12).stripWhiteSpace();
+ TQString sname = name.left(12).stripWhiteSpace();
if ( sname == "idmap config" ) return name;
- QString lname = name.lower().stripWhiteSpace();
+ TQString lname = name.lower().stripWhiteSpace();
if (lname == "browsable") return "browseable";
if (lname == "allow hosts") return "hosts allow";
@@ -172,11 +172,11 @@ QString SambaShare::getSynonym(const QString & name) const
return lname;
}
-void SambaShare::setValue(const QString & name, const QString & value, bool globalValue, bool defaultValue)
+void SambaShare::setValue(const TQString & name, const TQString & value, bool globalValue, bool defaultValue)
{
- QString synonym = getSynonym(name);
+ TQString synonym = getSynonym(name);
- QString newValue = value;
+ TQString newValue = value;
if (newValue.isNull())
newValue = "";
@@ -190,7 +190,7 @@ void SambaShare::setValue(const QString & name, const QString & value, bool glob
newValue = textFromBool(!boolFromText(value));
}
- QString global = "";
+ TQString global = "";
if (globalValue && !hasComments(synonym))
{
@@ -224,32 +224,32 @@ void SambaShare::setValue(const QString & name, const QString & value, bool glob
_optionList.append(synonym);
}
- replace(synonym,new QString(newValue));
+ replace(synonym,new TQString(newValue));
}
-void SambaShare::setValue(const QString & name, bool value, bool globalValue, bool defaultValue)
+void SambaShare::setValue(const TQString & name, bool value, bool globalValue, bool defaultValue)
{
setValue(name,textFromBool(value),globalValue, defaultValue);
}
-void SambaShare::setValue(const QString & name, int value, bool globalValue, bool defaultValue)
+void SambaShare::setValue(const TQString & name, int value, bool globalValue, bool defaultValue)
{
- setValue(name,QString::number(value),globalValue, defaultValue);
+ setValue(name,TQString::number(value),globalValue, defaultValue);
}
/**
* Returns the default value of the parameter
**/
-QString SambaShare::getDefaultValue(const QString & name)
+TQString SambaShare::getDefaultValue(const TQString & name)
{
- QString defaultValue = _sambaFile->getDefaultValue(name);
+ TQString defaultValue = _sambaFile->getDefaultValue(name);
if (defaultValue.isNull())
defaultValue = "";
return defaultValue;
}
-bool SambaShare::getDefaultBoolValue(const QString & name)
+bool SambaShare::getDefaultBoolValue(const TQString & name)
{
return boolFromText(getDefaultValue(name));
@@ -258,32 +258,32 @@ bool SambaShare::getDefaultBoolValue(const QString & name)
/**
* Sets the comments for the passed option
**/
-void SambaShare::setComments(const QString & name, const QStringList & commentList)
+void SambaShare::setComments(const TQString & name, const TQStringList & commentList)
{
// Only add inempty lists
if (commentList.empty())
return;
- QString synonym = getSynonym(name);
+ TQString synonym = getSynonym(name);
- _commentList.replace(name,new QStringList(commentList));
+ _commentList.replace(name,new TQStringList(commentList));
}
/**
* Returns the comments of the passed option
**/
-QStringList SambaShare::getComments(const QString & name)
+TQStringList SambaShare::getComments(const TQString & name)
{
- QStringList* list = _commentList.find(getSynonym(name));
+ TQStringList* list = _commentList.find(getSynonym(name));
if (list)
- return QStringList(*list);
+ return TQStringList(*list);
else
- return QStringList();
+ return TQStringList();
}
-bool SambaShare::hasComments(const QString & name)
+bool SambaShare::hasComments(const TQString & name)
{
return 0L != _commentList.find(getSynonym(name));
}
@@ -292,7 +292,7 @@ bool SambaShare::hasComments(const QString & name)
* Returns the comments of the share
* e.g. the text above the [...] section
**/
-QStringList SambaShare::getComments()
+TQStringList SambaShare::getComments()
{
return _comments;
}
@@ -301,12 +301,12 @@ QStringList SambaShare::getComments()
* Sets the comments for the share
* e.g. the text above the [...] section
**/
-void SambaShare::setComments(const QStringList & commentList)
+void SambaShare::setComments(const TQStringList & commentList)
{
_comments = commentList;
}
-QStringList SambaShare::getOptionList()
+TQStringList SambaShare::getOptionList()
{
return _optionList;
}
@@ -316,7 +316,7 @@ QStringList SambaShare::getOptionList()
**/
bool SambaShare::isPrinter()
{
- QString* str = find("printable");
+ TQString* str = find("printable");
if (!str)
str = find("print ok");
diff --git a/filesharing/advanced/kcm_sambaconf/sambashare.h b/filesharing/advanced/kcm_sambaconf/sambashare.h
index 78379dde..39107505 100644
--- a/filesharing/advanced/kcm_sambaconf/sambashare.h
+++ b/filesharing/advanced/kcm_sambaconf/sambashare.h
@@ -29,10 +29,10 @@
#ifndef SAMBASHARE_H
#define SAMBASHARE_H
-#include <qdict.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qptrlist.h>
+#include <tqdict.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqptrlist.h>
class SambaConfigFile;
class QStringList;
@@ -41,7 +41,7 @@ class QStringList;
* A class which represents a Samba share
* @author Jan Sch&auml;fer
**/
-class SambaShare :public QDict<QString>
+class SambaShare :public TQDict<TQString>
{
public:
@@ -54,12 +54,12 @@ public:
* Creates a new SambaShare with the given name
* @param name the name of the share
**/
- SambaShare(const QString & name, SambaConfigFile* sambaFile);
+ SambaShare(const TQString & name, SambaConfigFile* sambaFile);
/**
* Returns the name of the share
**/
- const QString& getName() const;
+ const TQString& getName() const;
/**
@@ -67,13 +67,13 @@ public:
* returns false if the name already exists and the testWetherExists
* parameter is set to true
**/
- bool setName(const QString & name, bool testWetherExists=true);
+ bool setName(const TQString & name, bool testWetherExists=true);
/**
* Tests wether or not the given option is supported by Samba.
* It does this by testing the output of testparm for this option
**/
- bool optionSupported(const QString & name);
+ bool optionSupported(const TQString & name);
/**
* Returns the value of the given parameter
@@ -83,7 +83,7 @@ public:
* @param gobalValue if the gobal value should be returend
* @param defaultValue if the default value should be returned or a null string
**/
- QString getValue(const QString & name, bool globalValue=true, bool defaultValue=true);
+ TQString getValue(const TQString & name, bool globalValue=true, bool defaultValue=true);
/**
* Same as above but for boolean parameters
@@ -91,12 +91,12 @@ public:
* because you can't distinguish an unset parameter
* from a false parameter
**/
- bool getBoolValue(const QString & name, bool globalValue=true, bool defaultValue=true);
+ bool getBoolValue(const TQString & name, bool globalValue=true, bool defaultValue=true);
/**
* Returns the value from the [globals] section
**/
- QString getGlobalValue(const QString & name, bool defaultValue=true);
+ TQString getGlobalValue(const TQString & name, bool defaultValue=true);
/**
* Sets the parameter name to the given value
@@ -108,70 +108,70 @@ public:
* exists and it it is different to it. If no global value exists then it is only
* set if different to the default value.
**/
- void setValue(const QString & name,const QString & value, bool globalValue=true, bool defaultValue=true);
+ void setValue(const TQString & name,const TQString & value, bool globalValue=true, bool defaultValue=true);
/**
* Same as above but for boolean parameters
**/
- void setValue(const QString & name, bool value, bool globalValue=true, bool defaultValue=true);
+ void setValue(const TQString & name, bool value, bool globalValue=true, bool defaultValue=true);
/**
* Same as above but for integer parameters
**/
- void setValue(const QString & name, int value, bool globalValue=true, bool defaultValue=true);
+ void setValue(const TQString & name, int value, bool globalValue=true, bool defaultValue=true);
/**
* Returns the default value of the parameter
* @param name the name of the parameter
**/
- QString getDefaultValue(const QString & name);
+ TQString getDefaultValue(const TQString & name);
/**
* Same as above but for booleans
**/
- bool getDefaultBoolValue(const QString & name);
+ bool getDefaultBoolValue(const TQString & name);
/**
* Returns the default synonym for the given parameter
* if no synonym exists the original parameter in lower
* case is returned
**/
- QString getSynonym(const QString & name) const;
+ TQString getSynonym(const TQString & name) const;
/**
* Returns the comments of the share
* e.g. the text above the [...] section
**/
- QStringList getComments();
+ TQStringList getComments();
/**
* Sets the comments for the share
* e.g. the text above the [...] section
**/
- void setComments(const QStringList & commentList);
+ void setComments(const TQStringList & commentList);
/**
* Sets the comments for the passed option
**/
- void setComments(const QString & name, const QStringList & commentList);
+ void setComments(const TQString & name, const TQStringList & commentList);
/**
* Returns the comments of the passed option
**/
- QStringList getComments(const QString & name);
+ TQStringList getComments(const TQString & name);
/**
* Returns true if the passed option has comments
* otherwise returns false
**/
- bool hasComments(const QString & name);
+ bool hasComments(const TQString & name);
/**
* Returns the list of all options
* the order of the options is exactly the
* order of the insertion of the options
**/
- QStringList getOptionList();
+ TQStringList getOptionList();
/**
* Returns true if this share is a printer
@@ -190,7 +190,7 @@ protected:
* The name of the share
* could be also printers, global and homes
**/
- QString _name;
+ TQString _name;
SambaConfigFile* _sambaFile;
/**
@@ -198,34 +198,34 @@ protected:
* the comments which stood above the option name
* are stored in this QStringList
**/
- QDict<QStringList> _commentList;
+ TQDict<TQStringList> _commentList;
/**
* The comments for this share
**/
- QStringList _comments;
+ TQStringList _comments;
/**
* An extra list which holds
* all stored options
* You might say, hey for what is this ?
- * We have them already stored in the QDict.
+ * We have them already stored in the TQDict.
* That's right, but there is a problem :
- * QDict doesn't preserve the order of
+ * TQDict doesn't preserve the order of
* the inserted items, but when saving
* the options back to the smb.conf
* we want to have exactly the same order
- * so this QStringList is only for saving
+ * so this TQStringList is only for saving
* the order of the options.
* On the other side we need a very fast lookup
* of the options, because we lookup very frequently
* so this is the best way to do both.
**/
- QStringList _optionList;
+ TQStringList _optionList;
};
-typedef QPtrList<SambaShare> SambaShareList;
+typedef TQPtrList<SambaShare> SambaShareList;
#endif
diff --git a/filesharing/advanced/kcm_sambaconf/share.ui.h b/filesharing/advanced/kcm_sambaconf/share.ui.h
index 60f8194e..7de229bc 100644
--- a/filesharing/advanced/kcm_sambaconf/share.ui.h
+++ b/filesharing/advanced/kcm_sambaconf/share.ui.h
@@ -63,8 +63,8 @@ void KcmShareDlg::init()
directoryPixLbl->setPixmap(DesktopIcon("folder"));
PixmapLabel1->setPixmap(SmallIcon("messagebox_warning"));
/*
- QListBoxItem* item = 0;
- QPtrList<QListBoxItem>* selectedList = new QPtrList<QListBoxItem>;
+ TQListBoxItem* item = 0;
+ TQPtrList<TQListBoxItem>* selectedList = new TQPtrList<TQListBoxItem>;
selectedList->setAutoDelete(false);
for (int i=0; i < possible->count(); i++){
item = possible->item(i);
@@ -73,7 +73,7 @@ void KcmShareDlg::init()
}
}
selected->clearSelection();
- for (QPtrListIterator<QListBoxItem> it(*selectedList); it.current(); ++it){
+ for (TQPtrListIterator<TQListBoxItem> it(*selectedList); it.current(); ++it){
possible->takeItem(it.current());
selected->insertItem(it.current());
}
@@ -179,7 +179,7 @@ void KcmShareDlg::publicBaseChk_toggled( bool b)
}
-void KcmShareDlg::pathUrlRq_textChanged( const QString & )
+void KcmShareDlg::pathUrlRq_textChanged( const TQString & )
{
}
diff --git a/filesharing/advanced/kcm_sambaconf/sharedlgimpl.cpp b/filesharing/advanced/kcm_sambaconf/sharedlgimpl.cpp
index 73ba4741..8640f41b 100644
--- a/filesharing/advanced/kcm_sambaconf/sharedlgimpl.cpp
+++ b/filesharing/advanced/kcm_sambaconf/sharedlgimpl.cpp
@@ -31,24 +31,24 @@
* @author Jan Sch�fer
**/
-#include <qcheckbox.h>
-#include <qlineedit.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qgroupbox.h>
-#include <qlayout.h>
-#include <qtabwidget.h>
-#include <qregexp.h>
-#include <qstringlist.h>
-#include <qgrid.h>
-#include <qcursor.h>
-#include <qtable.h>
-#include <qlistbox.h>
-#include <qtoolbutton.h>
-#include <qpixmap.h>
-#include <qframe.h>
-#include <qwidget.h>
-#include <qtabwidget.h>
+#include <tqcheckbox.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqgroupbox.h>
+#include <tqlayout.h>
+#include <tqtabwidget.h>
+#include <tqregexp.h>
+#include <tqstringlist.h>
+#include <tqgrid.h>
+#include <tqcursor.h>
+#include <tqtable.h>
+#include <tqlistbox.h>
+#include <tqtoolbutton.h>
+#include <tqpixmap.h>
+#include <tqframe.h>
+#include <tqwidget.h>
+#include <tqtabwidget.h>
#include <klineedit.h>
@@ -80,7 +80,7 @@
-ShareDlgImpl::ShareDlgImpl(QWidget* parent, SambaShare* share)
+ShareDlgImpl::ShareDlgImpl(TQWidget* parent, SambaShare* share)
: KcmShareDlg(parent,"sharedlgimpl")
{
if (!share) {
@@ -122,12 +122,12 @@ void ShareDlgImpl::initDialog()
_userTab = new UserTabImpl(this,_share);
_tabs->insertTab(_userTab,i18n("&Users"),1);
_userTab->load();
- connect(_userTab, SIGNAL(changed()), this, SLOT(changedSlot()));
+ connect(_userTab, TQT_SIGNAL(changed()), this, TQT_SLOT(changedSlot()));
// Filename settings
_dictMngr->add("case sensitive",caseSensitiveCombo,
- new QStringList(QStringList() << "auto" << "yes" << "no"));
+ new TQStringList(TQStringList() << "auto" << "yes" << "no"));
_dictMngr->add("preserve case",preserveCaseChk);
_dictMngr->add("short preserve case",shortPreserveCaseChk);
_dictMngr->add("mangled names",mangledNamesChk);
@@ -137,10 +137,10 @@ void ShareDlgImpl::initDialog()
_dictMngr->add("mangling method",manglingMethodCombo,
- new QStringList(QStringList() << "hash" << "hash2"));
+ new TQStringList(TQStringList() << "hash" << "hash2"));
_dictMngr->add("default case",defaultCaseCombo,
- new QStringList(QStringList() << "Lower" << "Upper"));
+ new TQStringList(TQStringList() << "Lower" << "Upper"));
_dictMngr->add("hide dot files",hideDotFilesChk);
_dictMngr->add("strip dot",hideTrailingDotChk);
@@ -202,7 +202,7 @@ void ShareDlgImpl::initDialog()
_dictMngr->add("level2 oplocks",level2OplocksChk);
_dictMngr->add("posix locking",posixLockingChk);
_dictMngr->add("strict locking",strictLockingCombo,
- new QStringList(QStringList() << "Auto" << "yes" << "no"));
+ new TQStringList(TQStringList() << "Auto" << "yes" << "no"));
_dictMngr->add("share modes",shareModesChk);
_dictMngr->add("oplocks",oplocksChk);
@@ -223,7 +223,7 @@ void ShareDlgImpl::initDialog()
_dictMngr->add("use sendfile",useSendfileChk);
_dictMngr->add("csc policy",cscPolicyCombo,
- new QStringList(QStringList() << "manual" << "documents" << "programs" << "disable"));
+ new TQStringList(TQStringList() << "manual" << "documents" << "programs" << "disable"));
@@ -256,8 +256,8 @@ void ShareDlgImpl::initDialog()
_dictMngr->load( _share );
- connect( _tabs, SIGNAL(currentChanged(QWidget*)), this, SLOT(tabChangedSlot(QWidget*)));
- connect(_dictMngr, SIGNAL(changed()), this, SLOT(changedSlot()));
+ connect( _tabs, TQT_SIGNAL(currentChanged(TQWidget*)), this, TQT_SLOT(tabChangedSlot(TQWidget*)));
+ connect(_dictMngr, TQT_SIGNAL(changed()), this, TQT_SLOT(changedSlot()));
}
ShareDlgImpl::~ShareDlgImpl()
@@ -268,17 +268,17 @@ ShareDlgImpl::~ShareDlgImpl()
void ShareDlgImpl::initAdvancedTab()
{
- QVBoxLayout *l = new QVBoxLayout(advancedFrame);
+ TQVBoxLayout *l = new TQVBoxLayout(advancedFrame);
l->setAutoAdd(true);
l->setMargin(0);
_janus = new KJanusWidget(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<advancedDumpTab->count();)
{
@@ -321,19 +321,19 @@ void ShareDlgImpl::initAdvancedTab()
if (label.lower() == "misc")
icon = SmallIcon("misc");
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);
advancedDumpTab->removePage(w);
- w->reparent(f,QPoint(1,1),TRUE);
+ w->reparent(f,TQPoint(1,1),TRUE);
}
@@ -345,10 +345,10 @@ void ShareDlgImpl::initAdvancedTab()
}
-void ShareDlgImpl::tabChangedSlot(QWidget* w)
+void ShareDlgImpl::tabChangedSlot(TQWidget* w)
{
// We are only interrested in the Hidden files tab
- if ( QString(w->name()) == "hiddenFilesTab" )
+ if ( TQString(w->name()) == "hiddenFilesTab" )
loadHiddenFilesView();
}
@@ -418,15 +418,15 @@ void ShareDlgImpl::homeChkToggled(bool b)
void ShareDlgImpl::accessModifierBtnClicked()
{
- if (!QObject::sender()) {
- kdWarning() << "ShareDlgImpl::accessModifierBtnClicked() : QObject::sender() is null!" << endl;
+ if (!TQObject::sender()) {
+ kdWarning() << "ShareDlgImpl::accessModifierBtnClicked() : TQObject::sender() is null!" << endl;
return;
}
- QString name = QObject::sender()->name();
+ TQString name = TQObject::sender()->name();
- QLineEdit *edit = 0L;
+ TQLineEdit *edit = 0L;
if (name == "forceCreateModeBtn")
edit = forceCreateModeEdit;
@@ -468,7 +468,7 @@ void ShareDlgImpl::changedSlot() {
emit changed();
}
-void ShareDlgImpl::pathUrlRq_textChanged( const QString & s)
+void ShareDlgImpl::pathUrlRq_textChanged( const TQString & s)
{
if (_fileView && ! _share->isSpecialSection())
_fileView->load();
diff --git a/filesharing/advanced/kcm_sambaconf/sharedlgimpl.h b/filesharing/advanced/kcm_sambaconf/sharedlgimpl.h
index 16c3f6d0..a3ef81c4 100644
--- a/filesharing/advanced/kcm_sambaconf/sharedlgimpl.h
+++ b/filesharing/advanced/kcm_sambaconf/sharedlgimpl.h
@@ -34,7 +34,7 @@
* @author Jan Sch�fer
**/
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include "share.h"
@@ -57,7 +57,7 @@ Q_OBJECT
public :
- ShareDlgImpl(QWidget* parent, SambaShare* share);
+ ShareDlgImpl(TQWidget* parent, SambaShare* share);
~ShareDlgImpl();
bool hasChanged() { return m_changed; };
@@ -89,9 +89,9 @@ protected slots:
virtual void homeChkToggled(bool);
virtual void accessModifierBtnClicked();
virtual void changedSlot();
- virtual void pathUrlRq_textChanged( const QString & );
+ virtual void pathUrlRq_textChanged( const TQString & );
- void tabChangedSlot(QWidget* w);
+ void tabChangedSlot(TQWidget* w);
signals:
void changed();
};
diff --git a/filesharing/advanced/kcm_sambaconf/smbconfconfigwidget.cpp b/filesharing/advanced/kcm_sambaconf/smbconfconfigwidget.cpp
index 03a1e550..00181eaa 100644
--- a/filesharing/advanced/kcm_sambaconf/smbconfconfigwidget.cpp
+++ b/filesharing/advanced/kcm_sambaconf/smbconfconfigwidget.cpp
@@ -26,10 +26,10 @@
* *
******************************************************************************/
-#include <qfileinfo.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
+#include <tqfileinfo.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
#include <kapplication.h>
#include <kfiledialog.h>
@@ -39,19 +39,19 @@
#include "smbconfconfigwidget.h"
-SmbConfConfigWidget::SmbConfConfigWidget(QWidget* parent)
- : QWidget(parent,"configWidget")
+SmbConfConfigWidget::SmbConfConfigWidget(TQWidget* parent)
+ : TQWidget(parent,"configWidget")
{
- QVBoxLayout *layout = new QVBoxLayout(this,5);
+ TQVBoxLayout *layout = new TQVBoxLayout(this,5);
- QLabel *lbl = new QLabel(i18n("<p>The SAMBA configuration file <strong>'smb.conf'</strong>" \
+ TQLabel *lbl = new TQLabel(i18n("<p>The SAMBA configuration file <strong>'smb.conf'</strong>" \
" could not be found;</p>" \
"make sure you have SAMBA installed.\n\n"), this);
- QHBoxLayout *hbox = new QHBoxLayout(this);
- QPushButton *btn = new QPushButton(i18n("Specify Location"), this);
- connect(btn, SIGNAL(pressed()), this, SLOT( btnPressed()));
+ TQHBoxLayout *hbox = new TQHBoxLayout(this);
+ TQPushButton *btn = new TQPushButton(i18n("Specify Location"), this);
+ connect(btn, TQT_SIGNAL(pressed()), this, TQT_SLOT( btnPressed()));
btn->setDefault(false);
btn->setAutoDefault(false);
@@ -65,13 +65,13 @@ SmbConfConfigWidget::SmbConfConfigWidget(QWidget* parent)
}
void SmbConfConfigWidget::btnPressed() {
- QString smbConf = KFileDialog::getOpenFileName("/",
+ TQString smbConf = KFileDialog::getOpenFileName("/",
"smb.conf|Samba conf. File\n"
"*|All Files",0,i18n("Get smb.conf Location"));
if (smbConf.isEmpty())
return;
- if ( ! QFileInfo(smbConf).isReadable() ) {
+ if ( ! TQFileInfo(smbConf).isReadable() ) {
KMessageBox::sorry(this,i18n("<qt>The file <i>%1</i> could not be read.</qt>").arg(smbConf),i18n("Could Not Read File"));
return;
}
diff --git a/filesharing/advanced/kcm_sambaconf/smbconfconfigwidget.h b/filesharing/advanced/kcm_sambaconf/smbconfconfigwidget.h
index 063dd9e8..6af88aa2 100644
--- a/filesharing/advanced/kcm_sambaconf/smbconfconfigwidget.h
+++ b/filesharing/advanced/kcm_sambaconf/smbconfconfigwidget.h
@@ -29,17 +29,17 @@
#ifndef SMBCONFCONFIGWIDGET_H
#define SMBCONFCONFIGWIDGET_H
-#include <qwidget.h>
+#include <tqwidget.h>
-class SmbConfConfigWidget : public QWidget {
+class SmbConfConfigWidget : public TQWidget {
Q_OBJECT
public:
- SmbConfConfigWidget(QWidget*);
+ SmbConfConfigWidget(TQWidget*);
protected slots:
void btnPressed();
signals:
- void smbConfChoosed(const QString &);
+ void smbConfChoosed(const TQString &);
};
diff --git a/filesharing/advanced/kcm_sambaconf/smbpasswdfile.cpp b/filesharing/advanced/kcm_sambaconf/smbpasswdfile.cpp
index f7a2cdd9..8286cdf3 100644
--- a/filesharing/advanced/kcm_sambaconf/smbpasswdfile.cpp
+++ b/filesharing/advanced/kcm_sambaconf/smbpasswdfile.cpp
@@ -26,10 +26,10 @@
* *
******************************************************************************/
-#include <qstring.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqstringlist.h>
#include <kurl.h>
#include <kdebug.h>
@@ -42,9 +42,9 @@
#include "passwd.h"
-QStringList SambaUserList::getUserNames()
+TQStringList SambaUserList::getUserNames()
{
- QStringList list;
+ TQStringList list;
SambaUser *user;
for ( user = first(); user; user = next() )
@@ -79,14 +79,14 @@ void SmbPasswdFile::setUrl(const KURL & url) {
**/
SambaUserList SmbPasswdFile::getSambaUserList()
{
- QFile f(_url.path());
+ TQFile f(_url.path());
SambaUserList list;
if ( f.open(IO_ReadOnly) )
{
- QTextStream t( &f );
- QString s;
+ TQTextStream t( &f );
+ TQString s;
while ( !t.eof() )
{
s = t.readLine().stripWhiteSpace();
@@ -95,7 +95,7 @@ SambaUserList SmbPasswdFile::getSambaUserList()
if (s.left(1)=="#")
continue;
- QStringList l = QStringList::split(":",s);
+ TQStringList l = TQStringList::split(":",s);
SambaUser* user = new SambaUser(l[0],l[1].toInt());
user->gid = getUserGID(l[0]);
@@ -111,12 +111,12 @@ SambaUserList SmbPasswdFile::getSambaUserList()
return list;
}
-bool SmbPasswdFile::executeSmbpasswd(const QStringList & args) {
+bool SmbPasswdFile::executeSmbpasswd(const TQStringList & args) {
KProcess p;
p << "smbpasswd" << args;
- connect( &p, SIGNAL(receivedStdout(KProcess*,char*,int)),
- this, SLOT(smbpasswdStdOutReceived(KProcess*,char*,int)));
+ connect( &p, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)),
+ this, TQT_SLOT(smbpasswdStdOutReceived(KProcess*,char*,int)));
_smbpasswdOutput = "";
@@ -134,15 +134,15 @@ bool SmbPasswdFile::executeSmbpasswd(const QStringList & args) {
* Tries to add the passed user to the smbpasswd file
* returns true if successful otherwise false
**/
-bool SmbPasswdFile::addUser(const SambaUser & user,const QString & password)
+bool SmbPasswdFile::addUser(const SambaUser & user,const TQString & password)
{
KProcess p;
p << "smbpasswd" << "-a" << user.name;
p << password;
- connect( &p, SIGNAL(receivedStdout(KProcess*,char*,int)),
- this, SLOT(smbpasswdStdOutReceived(KProcess*,char*,int)));
+ connect( &p, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)),
+ this, TQT_SLOT(smbpasswdStdOutReceived(KProcess*,char*,int)));
_smbpasswdOutput = "";
@@ -162,12 +162,12 @@ bool SmbPasswdFile::addUser(const SambaUser & user,const QString & password)
**/
bool SmbPasswdFile::removeUser(const SambaUser & user)
{
- QStringList l;
+ TQStringList l;
l << "-x" << user.name;
return executeSmbpasswd(l);
}
-bool SmbPasswdFile::changePassword(const SambaUser & user, const QString & newPassword)
+bool SmbPasswdFile::changePassword(const SambaUser & user, const TQString & newPassword)
{
return addUser(user,newPassword);
}
@@ -175,7 +175,7 @@ bool SmbPasswdFile::changePassword(const SambaUser & user, const QString & newPa
void SmbPasswdFile::smbpasswdStdOutReceived(KProcess *, char *buffer, int buflen)
{
- _smbpasswdOutput+=QString::fromLatin1(buffer,buflen);
+ _smbpasswdOutput+=TQString::fromLatin1(buffer,buflen);
}
@@ -193,32 +193,32 @@ KURL SmbPasswdFile::getUrlFromSambaFile(const SambaFile * /*file*/)
}
bool SmbPasswdFile::enableUser(const SambaUser & user) {
- QStringList l;
+ TQStringList l;
l << "-e" << user.name;
return executeSmbpasswd(l);
}
bool SmbPasswdFile::disableUser(const SambaUser & user) {
- QStringList l;
+ TQStringList l;
l << "-d" << user.name;
return executeSmbpasswd(l);
}
bool SmbPasswdFile::setNoPassword(const SambaUser & user) {
- QStringList l;
+ TQStringList l;
l << "-n" << user.name;
return executeSmbpasswd(l);
}
bool SmbPasswdFile::setMachineTrustAccount(const SambaUser & user) {
- QStringList l;
+ TQStringList l;
l << "-m" << user.name;
return executeSmbpasswd(l);
}
-bool SmbPasswdFile::joinADomain(const QString & domain, const QString & server,
- const QString & user, const QString & password) {
- QStringList l;
+bool SmbPasswdFile::joinADomain(const TQString & domain, const TQString & server,
+ const TQString & user, const TQString & password) {
+ TQStringList l;
l << "-j" << domain;
l << "-r" << server;
l << "-U" << user << "%" << password;
diff --git a/filesharing/advanced/kcm_sambaconf/smbpasswdfile.h b/filesharing/advanced/kcm_sambaconf/smbpasswdfile.h
index 2542d3f6..88eb8594 100644
--- a/filesharing/advanced/kcm_sambaconf/smbpasswdfile.h
+++ b/filesharing/advanced/kcm_sambaconf/smbpasswdfile.h
@@ -34,7 +34,7 @@
*@author Jan Sch�fer
*/
-#include <qstring.h>
+#include <tqstring.h>
#include <kurl.h>
class SambaFile;
@@ -46,9 +46,9 @@ class KProcess;
class SambaUser
{
public:
- SambaUser(const QString & aName = QString::null, int anUid = -1) {name = aName; uid = anUid;};
+ SambaUser(const TQString & aName = TQString::null, int anUid = -1) {name = aName; uid = anUid;};
- QString name;
+ TQString name;
int uid;
int gid;
bool isUserAccount;
@@ -58,12 +58,12 @@ public:
};
/**
- * A QPtrList of SambaUser
+ * A TQPtrList of SambaUser
**/
-class SambaUserList : public QPtrList<SambaUser>
+class SambaUserList : public TQPtrList<SambaUser>
{
public:
- QStringList getUserNames();
+ TQStringList getUserNames();
};
/**
@@ -92,13 +92,13 @@ public:
/**
* Calls smbpasswd with the given arguments
**/
- bool executeSmbpasswd(const QStringList & args);
+ bool executeSmbpasswd(const TQStringList & args);
/**
* Tries to add the passed user to the smbpasswd file
* returns true if successful otherwise false
**/
- bool addUser(const SambaUser &, const QString & password);
+ bool addUser(const SambaUser &, const TQString & password);
/**
* Tries to remove the passed user from the smbpasswd file
@@ -110,7 +110,7 @@ public:
* Tries to change the password of the passed user
* if it fails returns false otherwise true
**/
- bool changePassword(const SambaUser &, const QString & password);
+ bool changePassword(const SambaUser &, const TQString & password);
bool enableUser(const SambaUser &);
@@ -120,7 +120,7 @@ public:
bool setMachineTrustAccount(const SambaUser &);
- bool joinADomain(const QString &, const QString &, const QString &, const QString &);
+ bool joinADomain(const TQString &, const TQString &, const TQString &, const TQString &);
/**
* Returns the Url of the smbpasswd file
@@ -132,7 +132,7 @@ public:
static KURL getUrlFromSambaFile(const SambaFile *file);
protected:
KURL _url;
- QString _smbpasswdOutput;
+ TQString _smbpasswdOutput;
protected slots:
void smbpasswdStdOutReceived(KProcess*,char*,int);
diff --git a/filesharing/advanced/kcm_sambaconf/socketoptionsdlg.ui.h b/filesharing/advanced/kcm_sambaconf/socketoptionsdlg.ui.h
index 8a8fca3a..d403fec0 100644
--- a/filesharing/advanced/kcm_sambaconf/socketoptionsdlg.ui.h
+++ b/filesharing/advanced/kcm_sambaconf/socketoptionsdlg.ui.h
@@ -32,7 +32,7 @@ void SocketOptionsDlg::setShare( SambaShare * share )
_share = share;
- QString s = _share->getValue("socket options");
+ TQString s = _share->getValue("socket options");
s = s.simplifyWhiteSpace();
@@ -59,14 +59,14 @@ SO_RCVLOWATSpin->setValue( getIntValue( s, "SO_RCVLOWAT") );
-bool SocketOptionsDlg::getBoolValue( const QString & str, const QString & name )
+bool SocketOptionsDlg::getBoolValue( 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("=") )
{
s = s.remove(0,1);
@@ -82,14 +82,14 @@ bool SocketOptionsDlg::getBoolValue( const QString & str, const QString & name )
return false;
}
-int SocketOptionsDlg::getIntValue( const QString & str, const QString & name )
+int SocketOptionsDlg::getIntValue( 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("=") )
{
s = s.remove(0,1);
diff --git a/filesharing/advanced/kcm_sambaconf/userselectdlg.ui.h b/filesharing/advanced/kcm_sambaconf/userselectdlg.ui.h
index af323fe6..48b07abe 100644
--- a/filesharing/advanced/kcm_sambaconf/userselectdlg.ui.h
+++ b/filesharing/advanced/kcm_sambaconf/userselectdlg.ui.h
@@ -8,7 +8,7 @@
*****************************************************************************/
-void UserSelectDlg::init(const QStringList & specifiedUsers, SambaShare* share)
+void UserSelectDlg::init(const TQStringList & specifiedUsers, SambaShare* share)
{
SmbPasswdFile passwd( KURL(share->getValue("smb passwd file",true,true)) );
SambaUserList sambaList = passwd.getSambaUserList();
@@ -16,7 +16,7 @@ void UserSelectDlg::init(const QStringList & specifiedUsers, SambaShare* share)
for (SambaUser * user = sambaList.first(); user; user = sambaList.next() )
{
if (! specifiedUsers.contains(user->name))
- new QListViewItem(userListView, user->name, QString::number(user->uid), QString::number(user->gid));
+ new TQListViewItem(userListView, user->name, TQString::number(user->uid), TQString::number(user->gid));
}
}
@@ -24,7 +24,7 @@ void UserSelectDlg::init(const QStringList & specifiedUsers, SambaShare* share)
void UserSelectDlg::accept()
{
- QListViewItemIterator it( userListView);
+ TQListViewItemIterator it( userListView);
for ( ; it.current(); ++it ) {
if ( it.current()->isSelected() )
@@ -33,12 +33,12 @@ void UserSelectDlg::accept()
access = accessBtnGrp->id(accessBtnGrp->selected());
- QDialog::accept();
+ TQDialog::accept();
}
-QStringList UserSelectDlg::getSelectedUsers()
+TQStringList UserSelectDlg::getSelectedUsers()
{
return selectedUsers;
}
diff --git a/filesharing/advanced/kcm_sambaconf/usertabimpl.cpp b/filesharing/advanced/kcm_sambaconf/usertabimpl.cpp
index ac23b47c..724518cf 100644
--- a/filesharing/advanced/kcm_sambaconf/usertabimpl.cpp
+++ b/filesharing/advanced/kcm_sambaconf/usertabimpl.cpp
@@ -28,14 +28,14 @@
#include <unistd.h> // for getuid
-#include <qcombobox.h>
-#include <qstringlist.h>
+#include <tqcombobox.h>
+#include <tqstringlist.h>
#include <passwd.h>
-#include <qregexp.h>
-#include <qtable.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
-#include <qlineedit.h>
+#include <tqregexp.h>
+#include <tqtable.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
+#include <tqlineedit.h>
#include <klistview.h>
#include <klocale.h>
@@ -57,7 +57,7 @@
* @pre share is not null
* @post _share = share
*/
-UserTabImpl::UserTabImpl(QWidget* parent, SambaShare* share)
+UserTabImpl::UserTabImpl(TQWidget* parent, SambaShare* share)
: UserTab(parent)
{
if (share == 0L) {
@@ -88,18 +88,18 @@ void UserTabImpl::load()
_share->getValue("invalid users"));
}
-void UserTabImpl::loadUsers(const QString & validUsersStr,
- const QString & readListStr,
- const QString & writeListStr,
- const QString & adminUsersStr,
- const QString & invalidUsersStr)
+void UserTabImpl::loadUsers(const TQString & validUsersStr,
+ const TQString & readListStr,
+ const TQString & writeListStr,
+ const TQString & adminUsersStr,
+ const TQString & invalidUsersStr)
{
userTable->setNumRows(0);
- QStringList validUsers = QStringList::split(QRegExp("[,\\s]+"),validUsersStr);
- QStringList readList = QStringList::split(QRegExp("[,\\s]+"),readListStr);
- QStringList writeList = QStringList::split(QRegExp("[,\\s]+"),writeListStr);
- QStringList adminUsers = QStringList::split(QRegExp("[,\\s]+"),adminUsersStr);
- QStringList invalidUsers = QStringList::split(QRegExp("[,\\s]+"),invalidUsersStr);
+ TQStringList validUsers = TQStringList::split(TQRegExp("[,\\s]+"),validUsersStr);
+ TQStringList readList = TQStringList::split(TQRegExp("[,\\s]+"),readListStr);
+ TQStringList writeList = TQStringList::split(TQRegExp("[,\\s]+"),writeListStr);
+ TQStringList adminUsers = TQStringList::split(TQRegExp("[,\\s]+"),adminUsersStr);
+ TQStringList invalidUsers = TQStringList::split(TQRegExp("[,\\s]+"),invalidUsersStr);
// if the valid users list contains no entries
// then all users are allowed, except those that are
@@ -124,7 +124,7 @@ void UserTabImpl::loadForceCombos() {
forceUserCombo->insertItem("");
forceGroupCombo->insertItem("");
- QStringList unixGroups = getUnixGroups();
+ TQStringList unixGroups = getUnixGroups();
forceUserCombo->insertStringList( getUnixUsers() );
forceGroupCombo->insertStringList( unixGroups );
@@ -137,9 +137,9 @@ void UserTabImpl::loadForceCombos() {
* Remove all duplicates of the different list, so that
* all lists are disjunct.
*/
-void UserTabImpl::removeDuplicates( QStringList & validUsers, QStringList & readList,
- QStringList & writeList, QStringList & adminUsers,
- QStringList & invalidUsers)
+void UserTabImpl::removeDuplicates( TQStringList & validUsers, TQStringList & readList,
+ TQStringList & writeList, TQStringList & adminUsers,
+ TQStringList & invalidUsers)
{
removeAll(adminUsers, writeList);
@@ -159,31 +159,31 @@ void UserTabImpl::removeDuplicates( QStringList & validUsers, QStringList & read
/**
* Remove all entries of entryList from the fromList
*/
-void UserTabImpl::removeAll(QStringList & entryList, QStringList & fromList) {
- for (QStringList::Iterator it = entryList.begin(); it != entryList.end(); ++it) {
+void UserTabImpl::removeAll(TQStringList & entryList, TQStringList & fromList) {
+ for (TQStringList::Iterator it = entryList.begin(); it != entryList.end(); ++it) {
fromList.remove((*it));
}
}
-void UserTabImpl::addListToUserTable(const QStringList & list, int accessRight) {
+void UserTabImpl::addListToUserTable(const TQStringList & list, int accessRight) {
- for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
+ for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
addUserToUserTable(*it,accessRight);
}
}
-void UserTabImpl::addUserToUserTable(const QString & user, int accessRight) {
+void UserTabImpl::addUserToUserTable(const TQString & user, int accessRight) {
int row = userTable->numRows();
userTable->setNumRows(row+1);
setAllowedUser(row, user);
- QComboTableItem* comboItem = static_cast<QComboTableItem*>(userTable->item(row,3));
+ TQComboTableItem* comboItem = static_cast<TQComboTableItem*>(userTable->item(row,3));
comboItem->setCurrentItem(accessRight);
}
-QString UserTabImpl::removeQuotationMarks(const QString & name) {
- QString result = name;
+TQString UserTabImpl::removeQuotationMarks(const TQString & name) {
+ TQString result = name;
if (name.left(1) == "\"") {
result = result.left(result.length()-1);
result = result.right(result.length()-1);
@@ -191,8 +191,8 @@ QString UserTabImpl::removeQuotationMarks(const QString & name) {
return result;
}
-QString UserTabImpl::removeGroupTag(const QString & name) {
- QString result = name;
+TQString UserTabImpl::removeGroupTag(const TQString & name) {
+ TQString result = name;
if (nameIsGroup(result)) {
@@ -205,8 +205,8 @@ QString UserTabImpl::removeGroupTag(const QString & name) {
}
-bool UserTabImpl::nameIsGroup(const QString & name) {
- QString quoteless = removeQuotationMarks(name);
+bool UserTabImpl::nameIsGroup(const TQString & name) {
+ TQString quoteless = removeQuotationMarks(name);
if (quoteless.left(1) == "@" ||
quoteless.left(1) == "+" ||
quoteless.left(1) == "&")
@@ -216,27 +216,27 @@ bool UserTabImpl::nameIsGroup(const QString & name) {
}
-void UserTabImpl::setAllowedUser(int i, const QString & name)
+void UserTabImpl::setAllowedUser(int i, const TQString & name)
{
- QStringList accessRights;
+ TQStringList accessRights;
accessRights << i18n("Default") << i18n("Read only") << i18n("Writeable") << i18n("Admin") << i18n("Reject");
- QString uid;
- QString gid;
+ TQString uid;
+ TQString gid;
- QString name2 = name;
+ TQString name2 = name;
if (nameIsGroup(name2))
{
- QString name3 = removeGroupTag(name2);
+ TQString name3 = removeGroupTag(name2);
uid = "";
- gid = QString::number(getGroupGID(name3));
+ gid = TQString::number(getGroupGID(name3));
_specifiedGroups << name3;
}
else
{
- uid = QString::number(getUserUID(name2));
- gid = QString::number(getUserGID(name2));
+ uid = TQString::number(getUserUID(name2));
+ gid = TQString::number(getUserGID(name2));
_specifiedUsers << name2;
}
@@ -244,16 +244,16 @@ void UserTabImpl::setAllowedUser(int i, const QString & name)
name2 = "\""+name2+"\"";
- QTableItem* item = new QTableItem( userTable,QTableItem::Never, name2 );
+ TQTableItem* item = new TQTableItem( userTable,TQTableItem::Never, name2 );
userTable->setItem(i,0,item);
- item = new QTableItem( userTable,QTableItem::Never, uid );
+ item = new TQTableItem( userTable,TQTableItem::Never, uid );
userTable->setItem(i,1,item);
- item = new QTableItem( userTable,QTableItem::Never, gid );
+ item = new TQTableItem( userTable,TQTableItem::Never, gid );
userTable->setItem(i,2,item);
- QComboTableItem* comboItem = new QComboTableItem( userTable,accessRights);
+ TQComboTableItem* comboItem = new TQComboTableItem( userTable,accessRights);
userTable->setItem(i,3,comboItem);
}
@@ -264,10 +264,10 @@ void UserTabImpl::addUserBtnClicked()
UserSelectDlg *dlg = new UserSelectDlg();
dlg->init(_specifiedUsers,_share);
- QStringList selectedUsers = dlg->getSelectedUsers();
+ TQStringList selectedUsers = dlg->getSelectedUsers();
if (dlg->exec()) {
- for (QStringList::Iterator it = selectedUsers.begin(); it != selectedUsers.end(); ++it)
+ for (TQStringList::Iterator it = selectedUsers.begin(); it != selectedUsers.end(); ++it)
{
addUserToUserTable(*it,dlg->getAccess());
}
@@ -276,8 +276,8 @@ void UserTabImpl::addUserBtnClicked()
delete dlg;
} else {
bool ok;
- QString name = KInputDialog::getText(i18n("Add User"),i18n("Name:"),
- QString::null,&ok );
+ TQString name = KInputDialog::getText(i18n("Add User"),i18n("Name:"),
+ TQString::null,&ok );
if (ok)
addUserToUserTable(name,0);
@@ -286,7 +286,7 @@ void UserTabImpl::addUserBtnClicked()
void UserTabImpl::removeSelectedBtnClicked()
{
- QMemArray<int>rows;
+ TQMemArray<int>rows;
int j=0;
@@ -313,12 +313,12 @@ void UserTabImpl::addGroupBtnClicked()
{
GroupSelectDlg *dlg = new GroupSelectDlg();
dlg->init(_specifiedGroups);
- QStringList selectedGroups = dlg->getSelectedGroups();
+ TQStringList selectedGroups = dlg->getSelectedGroups();
if (dlg->exec()) {
- for (QStringList::Iterator it = selectedGroups.begin(); it != selectedGroups.end(); ++it)
+ for (TQStringList::Iterator it = selectedGroups.begin(); it != selectedGroups.end(); ++it)
{
kdDebug(5009) << "GroupKind: " << dlg->getGroupKind() << endl;
- QString name = dlg->getGroupKind() + (*it);
+ TQString name = dlg->getGroupKind() + (*it);
addUserToUserTable(name,dlg->getAccess());
}
}
@@ -328,11 +328,11 @@ void UserTabImpl::addGroupBtnClicked()
void UserTabImpl::expertBtnClicked() {
ExpertUserDlg *dlg = new ExpertUserDlg();
- QString validUsersStr;
- QString readListStr;
- QString writeListStr;
- QString adminUsersStr;
- QString invalidUsersStr;
+ TQString validUsersStr;
+ TQString readListStr;
+ TQString writeListStr;
+ TQString adminUsersStr;
+ TQString invalidUsersStr;
saveUsers(validUsersStr,readListStr,writeListStr,adminUsersStr,invalidUsersStr);
@@ -356,11 +356,11 @@ void UserTabImpl::expertBtnClicked() {
void UserTabImpl::save()
{
- QString validUsersStr;
- QString readListStr;
- QString writeListStr;
- QString adminUsersStr;
- QString invalidUsersStr;
+ TQString validUsersStr;
+ TQString readListStr;
+ TQString writeListStr;
+ TQString adminUsersStr;
+ TQString invalidUsersStr;
saveUsers(validUsersStr,readListStr,writeListStr,adminUsersStr,invalidUsersStr);
@@ -374,24 +374,24 @@ void UserTabImpl::save()
_share->setValue("force group",forceGroupCombo->currentText( ) );
}
-void UserTabImpl::saveUsers(QString & validUsersStr,
- QString & readListStr,
- QString & writeListStr,
- QString & adminUsersStr,
- QString & invalidUsersStr)
+void UserTabImpl::saveUsers(TQString & validUsersStr,
+ TQString & readListStr,
+ TQString & writeListStr,
+ TQString & adminUsersStr,
+ TQString & invalidUsersStr)
{
- QStringList validUsers;
- QStringList writeList;
- QStringList readList;
- QStringList adminUsers;
- QStringList invalidUsers;
+ TQStringList validUsers;
+ TQStringList writeList;
+ TQStringList readList;
+ TQStringList adminUsers;
+ TQStringList invalidUsers;
bool allowAllUsers = allUnspecifiedUsersCombo->currentItem() == 0;
for (int i=0; i<userTable->numRows(); i++)
{
- QTableItem* item = userTable->item(i,0);
- QComboTableItem* comboItem = static_cast<QComboTableItem*>(userTable->item(i,3));
+ TQTableItem* item = userTable->item(i,0);
+ TQComboTableItem* comboItem = static_cast<TQComboTableItem*>(userTable->item(i,3));
if (! allowAllUsers && comboItem->currentItem() < 4)
validUsers.append(item->text());
diff --git a/filesharing/advanced/kcm_sambaconf/usertabimpl.h b/filesharing/advanced/kcm_sambaconf/usertabimpl.h
index df8e4a34..408ef853 100644
--- a/filesharing/advanced/kcm_sambaconf/usertabimpl.h
+++ b/filesharing/advanced/kcm_sambaconf/usertabimpl.h
@@ -31,7 +31,7 @@
#include "usertab.h"
#include "common.h"
-#include "qstringlist.h"
+#include "tqstringlist.h"
/**
*@author Jan Sch�fer
@@ -49,41 +49,41 @@ class UserTabImpl : public UserTab
{
Q_OBJECT
public:
- UserTabImpl(QWidget* parent, SambaShare* share);
+ UserTabImpl(TQWidget* parent, SambaShare* share);
~UserTabImpl();
void load();
void save();
private:
SambaShare* _share;
- QStringList _specifiedUsers;
- QStringList _specifiedGroups;
+ TQStringList _specifiedUsers;
+ TQStringList _specifiedGroups;
- void setAllowedUser(int, const QString &);
- void removeDuplicates( QStringList & validUsers, QStringList & readList,
- QStringList & writeList, QStringList & adminUsers,
- QStringList & invalidUsers);
+ void setAllowedUser(int, const TQString &);
+ void removeDuplicates( TQStringList & validUsers, TQStringList & readList,
+ TQStringList & writeList, TQStringList & adminUsers,
+ TQStringList & invalidUsers);
- void removeAll(QStringList & entryList, QStringList & fromList);
- void addListToUserTable(const QStringList & list, int accessRight);
+ void removeAll(TQStringList & entryList, TQStringList & fromList);
+ void addListToUserTable(const TQStringList & list, int accessRight);
void loadForceCombos();
- void loadUsers(const QString & validUsersStr,
- const QString & readListStr,
- const QString & writeListStr,
- const QString & adminUsersStr,
- const QString & invalidUsersStr);
+ void loadUsers(const TQString & validUsersStr,
+ const TQString & readListStr,
+ const TQString & writeListStr,
+ const TQString & adminUsersStr,
+ const TQString & invalidUsersStr);
- void saveUsers(QString & validUsersStr,
- QString & readListStr,
- QString & writeListStr,
- QString & adminUsersStr,
- QString & invalidUsersStr);
+ void saveUsers(TQString & validUsersStr,
+ TQString & readListStr,
+ TQString & writeListStr,
+ TQString & adminUsersStr,
+ TQString & invalidUsersStr);
- bool nameIsGroup(const QString & name);
- QString removeGroupTag(const QString & name);
- QString removeQuotationMarks(const QString & name);
- void addUserToUserTable(const QString & user, int accessRight);
+ bool nameIsGroup(const TQString & name);
+ TQString removeGroupTag(const TQString & name);
+ TQString removeQuotationMarks(const TQString & name);
+ void addUserToUserTable(const TQString & user, int accessRight);
protected slots:
virtual void addUserBtnClicked();