summaryrefslogtreecommitdiffstats
path: root/filesharing
diff options
context:
space:
mode:
Diffstat (limited to 'filesharing')
-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
-rw-r--r--filesharing/advanced/nfs/nfsdialog.cpp50
-rw-r--r--filesharing/advanced/nfs/nfsdialog.h6
-rw-r--r--filesharing/advanced/nfs/nfsentry.cpp46
-rw-r--r--filesharing/advanced/nfs/nfsentry.h46
-rw-r--r--filesharing/advanced/nfs/nfsfile.cpp46
-rw-r--r--filesharing/advanced/nfs/nfsfile.h12
-rw-r--r--filesharing/advanced/nfs/nfshostdlg.cpp38
-rw-r--r--filesharing/advanced/nfs/nfshostdlg.h10
-rw-r--r--filesharing/advanced/propsdlgplugin/propertiespage.cpp70
-rw-r--r--filesharing/advanced/propsdlgplugin/propertiespage.h14
-rw-r--r--filesharing/advanced/propsdlgplugin/propsdlgshareplugin.cpp28
-rw-r--r--filesharing/advanced/propsdlgplugin/propsdlgshareplugin.h2
-rw-r--r--filesharing/simple/fileshare.cpp116
-rw-r--r--filesharing/simple/fileshare.h14
-rw-r--r--filesharing/simple/groupconfigdlg.cpp132
-rw-r--r--filesharing/simple/groupconfigdlg.h16
-rw-r--r--filesharing/simple/groupconfiggui.ui.h2
-rw-r--r--filesharing/simple/krichtextlabel.cpp42
-rw-r--r--filesharing/simple/krichtextlabel.h18
55 files changed, 1151 insertions, 1151 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();
diff --git a/filesharing/advanced/nfs/nfsdialog.cpp b/filesharing/advanced/nfs/nfsdialog.cpp
index ecf7a90b..926e3229 100644
--- a/filesharing/advanced/nfs/nfsdialog.cpp
+++ b/filesharing/advanced/nfs/nfsdialog.cpp
@@ -18,12 +18,12 @@
*/
-#include <qradiobutton.h>
-#include <qpushbutton.h>
-#include <qgroupbox.h>
-#include <qlineedit.h>
-#include <qbuttongroup.h>
-#include <qlayout.h>
+#include <tqradiobutton.h>
+#include <tqpushbutton.h>
+#include <tqgroupbox.h>
+#include <tqlineedit.h>
+#include <tqbuttongroup.h>
+#include <tqlayout.h>
#include <kdebug.h>
#include <kmessagebox.h>
@@ -38,7 +38,7 @@
#include "nfsfile.h"
#include "nfsdialoggui.h"
-NFSDialog::NFSDialog(QWidget * parent, NFSEntry* entry)
+NFSDialog::NFSDialog(TQWidget * parent, NFSEntry* entry)
: KDialogBase(Plain, i18n("NFS Options"), Ok|Cancel, Ok, parent),
m_nfsEntry(entry),
m_modified(false)
@@ -59,23 +59,23 @@ NFSDialog::~NFSDialog()
}
void NFSDialog::initGUI() {
- QWidget* page = plainPage();
+ TQWidget* page = plainPage();
m_gui = new NFSDialogGUI(page);
- QVBoxLayout *layout = new QVBoxLayout( page );
+ TQVBoxLayout *layout = new TQVBoxLayout( page );
layout->addWidget( m_gui );
KAccel* accel = new KAccel( m_gui->listView );
- accel->insert( "Delete", Qt::Key_Delete, this, SLOT(slotRemoveHost()));
+ accel->insert( "Delete", Qt::Key_Delete, this, TQT_SLOT(slotRemoveHost()));
}
void NFSDialog::initSlots()
{
- connect( m_gui->removeHostBtn, SIGNAL(clicked()), this, SLOT( slotRemoveHost()));
- connect( m_gui->addHostBtn, SIGNAL(clicked()), this, SLOT( slotAddHost()));
- connect( m_gui->modifyHostBtn, SIGNAL(clicked()), this, SLOT( slotModifyHost()));
- connect( m_gui->listView, SIGNAL(doubleClicked(QListViewItem*)),
- this, SLOT( slotModifyHost()));
+ connect( m_gui->removeHostBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT( slotRemoveHost()));
+ connect( m_gui->addHostBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT( slotAddHost()));
+ connect( m_gui->modifyHostBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT( slotModifyHost()));
+ connect( m_gui->listView, TQT_SIGNAL(doubleClicked(TQListViewItem*)),
+ this, TQT_SLOT( slotModifyHost()));
}
@@ -92,17 +92,17 @@ void NFSDialog::initListView()
}
}
-QListViewItem* NFSDialog::createItemFromHost(NFSHost* host)
+TQListViewItem* NFSDialog::createItemFromHost(NFSHost* host)
{
if (!host)
return 0;
- QListViewItem* item = new QListViewItem(m_gui->listView);
+ TQListViewItem* item = new TQListViewItem(m_gui->listView);
updateItem(item, host);
return item;
}
-void NFSDialog::updateItem(QListViewItem* item, NFSHost* host)
+void NFSDialog::updateItem(TQListViewItem* item, NFSHost* host)
{
item->setText(0,host->name);
item->setText(1,host->paramString());
@@ -123,7 +123,7 @@ void NFSDialog::slotAddHost()
dlg->exec();
- if (dlg->result()==QDialog::Accepted) {
+ if (dlg->result()==TQDialog::Accepted) {
m_workEntry->addHost(host);
createItemFromHost(host);
setModified();
@@ -143,13 +143,13 @@ void NFSDialog::slotOk() {
void NFSDialog::slotRemoveHost()
{
- QPtrList<QListViewItem> items = m_gui->listView->selectedItems();
+ TQPtrList<TQListViewItem> items = m_gui->listView->selectedItems();
if (items.count()==0)
return;
- QListViewItem *item;
+ TQListViewItem *item;
for ( item = items.first(); item; item = items.next() ) {
- QString name = item->text(0);
+ TQString name = item->text(0);
m_gui->listView->takeItem(item);
NFSHost* host = m_workEntry->getHostByName(name);
@@ -169,13 +169,13 @@ void NFSDialog::slotRemoveHost()
void NFSDialog::slotModifyHost()
{
- QPtrList<QListViewItem> items = m_gui->listView->selectedItems();
+ TQPtrList<TQListViewItem> items = m_gui->listView->selectedItems();
if (items.count()==0)
return;
HostList hostList;
- QListViewItem *item;
+ TQListViewItem *item;
for ( item = items.first(); item; item = items.next() ) {
NFSHost* host = m_workEntry->getHostByName(item->text(0));
@@ -187,7 +187,7 @@ void NFSDialog::slotModifyHost()
}
NFSHostDlg *dlg = new NFSHostDlg(this, &hostList, m_workEntry);
- if (dlg->exec() == QDialog::Accepted &&
+ if (dlg->exec() == TQDialog::Accepted &&
dlg->isModified())
{
setModified();
diff --git a/filesharing/advanced/nfs/nfsdialog.h b/filesharing/advanced/nfs/nfsdialog.h
index 1d6c2b02..571b262b 100644
--- a/filesharing/advanced/nfs/nfsdialog.h
+++ b/filesharing/advanced/nfs/nfsdialog.h
@@ -32,7 +32,7 @@ class NFSDialog : public KDialogBase
{
Q_OBJECT
public:
- NFSDialog(QWidget * parent, NFSEntry* entry);
+ NFSDialog(TQWidget * parent, NFSEntry* entry);
~NFSDialog();
bool modified();
protected:
@@ -41,8 +41,8 @@ protected:
NFSDialogGUI* m_gui;
bool m_modified;
- QListViewItem* createItemFromHost(NFSHost* host);
- void updateItem(QListViewItem* item, NFSHost* host);
+ TQListViewItem* createItemFromHost(NFSHost* host);
+ void updateItem(TQListViewItem* item, NFSHost* host);
void initGUI();
void initListView();
void initSlots();
diff --git a/filesharing/advanced/nfs/nfsentry.cpp b/filesharing/advanced/nfs/nfsentry.cpp
index be741d0c..207e0eae 100644
--- a/filesharing/advanced/nfs/nfsentry.cpp
+++ b/filesharing/advanced/nfs/nfsentry.cpp
@@ -21,11 +21,11 @@
#include "nfsentry.h"
-NFSHost::NFSHost(const QString & hostString)
+NFSHost::NFSHost(const TQString & hostString)
{
readonly = true;
- QString s = hostString;
+ TQString s = hostString;
int l = s.find('(');
int r = s.find(')');
@@ -42,7 +42,7 @@ NFSHost::NFSHost(const QString & hostString)
if (l>=0 && r>=0)
{
- QString params = s.mid(l+1,r-l-1);
+ TQString params = s.mid(l+1,r-l-1);
parseParamsString(params);
}
@@ -77,7 +77,7 @@ void NFSHost::initParams()
}
-void NFSHost::parseParamsString(const QString & s)
+void NFSHost::parseParamsString(const TQString & s)
{
if (s.isEmpty())
@@ -85,8 +85,8 @@ void NFSHost::parseParamsString(const QString & s)
int i;
- QString rest = s;
- QString p;
+ TQString rest = s;
+ TQString p;
do
{
@@ -106,9 +106,9 @@ void NFSHost::parseParamsString(const QString & s)
}
-QString NFSHost::paramString() const
+TQString NFSHost::paramString() const
{
- QString s;
+ TQString s;
if (!readonly) s+="rw,";
if (!rootSquash) s+="no_root_squash,";
@@ -125,10 +125,10 @@ QString NFSHost::paramString() const
if (!hide) s+="nohide,";
if (anongid!=65534)
- s+=QString("anongid=%1,").arg(anongid);
+ s+=TQString("anongid=%1,").arg(anongid);
if (anonuid!=65534)
- s+=QString("anonuid=%1,").arg(anonuid);
+ s+=TQString("anonuid=%1,").arg(anonuid);
// get rid of the last ','
s.truncate(s.length()-1);
@@ -136,9 +136,9 @@ QString NFSHost::paramString() const
return s;
}
-QString NFSHost::toString() const
+TQString NFSHost::toString() const
{
- QString s = name;
+ TQString s = name;
s+='(';
s+=paramString();
@@ -173,9 +173,9 @@ bool NFSHost::isPublic() const {
return name == "*";
}
-void NFSHost::setParam(const QString & s)
+void NFSHost::setParam(const TQString & s)
{
- QString p = s.lower();
+ TQString p = s.lower();
if (p=="ro") {
readonly = true;
@@ -256,10 +256,10 @@ void NFSHost::setParam(const QString & s)
// get anongid or anonuid
if (i>-1)
{
- QString name = p.left(i).lower();
+ TQString name = p.left(i).lower();
kdDebug(5009) << name << endl;
- QString value = p.mid(i+1);
+ TQString value = p.mid(i+1);
kdDebug(5009) << value << endl;
if (name=="anongid")
@@ -271,7 +271,7 @@ void NFSHost::setParam(const QString & s)
}
-NFSEntry::NFSEntry(const QString & path)
+NFSEntry::NFSEntry(const TQString & path)
{
_hosts.setAutoDelete(true);
setPath(path);
@@ -302,9 +302,9 @@ void NFSEntry::copyFrom(NFSEntry* entry) {
}
}
-QString NFSEntry::toString() const
+TQString NFSEntry::toString() const
{
- QString s = _path.stripWhiteSpace();
+ TQString s = _path.stripWhiteSpace();
if (_path.find(' ') > -1) {
s = '"'+s+'"';
@@ -338,7 +338,7 @@ void NFSEntry::removeHost(NFSHost * host)
_hosts.remove(host);
}
-NFSHost* NFSEntry::getHostByName(const QString & name) const
+NFSHost* NFSEntry::getHostByName(const TQString & name) const
{
HostIterator it = getHosts();
NFSHost* host;
@@ -360,7 +360,7 @@ NFSHost* NFSEntry::getPublicHost() const
if (result)
return result;
- return getHostByName(QString::null);
+ return getHostByName(TQString::null);
}
@@ -369,12 +369,12 @@ HostIterator NFSEntry::getHosts() const
return HostIterator(_hosts);
}
-QString NFSEntry::path() const
+TQString NFSEntry::path() const
{
return _path;
}
-void NFSEntry::setPath(const QString & path)
+void NFSEntry::setPath(const TQString & path)
{
_path = path;
}
diff --git a/filesharing/advanced/nfs/nfsentry.h b/filesharing/advanced/nfs/nfsentry.h
index 42f3c5c5..43071504 100644
--- a/filesharing/advanced/nfs/nfsentry.h
+++ b/filesharing/advanced/nfs/nfsentry.h
@@ -21,14 +21,14 @@
#define NFSENTRY_H
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
class NFSHost
{
public:
- NFSHost(const QString & hostString);
+ NFSHost(const TQString & hostString);
~NFSHost();
NFSHost();
@@ -45,55 +45,55 @@ public:
int anonuid;
int anongid;
- QString name;
+ TQString name;
- QString paramString() const;
- QString toString() const;
+ TQString paramString() const;
+ TQString toString() const;
bool isPublic() const;
/** returns a copy of this host */
NFSHost* copy() const;
protected:
- void parseParamsString(const QString &);
- void setParam(const QString &);
+ void parseParamsString(const TQString &);
+ void setParam(const TQString &);
void initParams();
};
-typedef QPtrList<NFSHost> HostList;
-typedef QPtrListIterator<NFSHost> HostIterator;
+typedef TQPtrList<NFSHost> HostList;
+typedef TQPtrListIterator<NFSHost> HostIterator;
class NFSLine {
public:
- virtual QString toString() const = 0;
+ virtual TQString toString() const = 0;
};
-typedef QPtrList<NFSLine> NFSLineList;
-typedef QPtrListIterator<NFSLine> NFSLineIterator;
+typedef TQPtrList<NFSLine> NFSLineList;
+typedef TQPtrListIterator<NFSLine> NFSLineIterator;
class NFSEmptyLine : public NFSLine {
public:
- virtual QString toString() const { return QString::fromLatin1("\n"); }
+ virtual TQString toString() const { return TQString::fromLatin1("\n"); }
virtual ~NFSEmptyLine() {};
};
class NFSComment : public NFSLine {
public:
- NFSComment(const QString & s) { comment = s; }
+ NFSComment(const TQString & s) { comment = s; }
virtual ~NFSComment() {};
- QString comment;
- virtual QString toString() const { return comment; }
+ TQString comment;
+ virtual TQString toString() const { return comment; }
};
class NFSEntry : public NFSLine {
public:
- NFSEntry(const QString & path);
+ NFSEntry(const TQString & path);
virtual ~NFSEntry();
void addHost(NFSHost * host);
void removeHost(NFSHost * host);
- NFSHost* getHostByName(const QString & name) const;
+ NFSHost* getHostByName(const TQString & name) const;
NFSHost* getPublicHost() const;
HostIterator getHosts() const;
@@ -107,14 +107,14 @@ public:
/** removes all hosts */
void clear();
- QString path() const;
- void setPath(const QString &);
+ TQString path() const;
+ void setPath(const TQString &);
- virtual QString toString() const;
+ virtual TQString toString() const;
protected:
HostList _hosts;
- QString _path;
+ TQString _path;
};
#endif
diff --git a/filesharing/advanced/nfs/nfsfile.cpp b/filesharing/advanced/nfs/nfsfile.cpp
index 79fc732e..c61a393c 100644
--- a/filesharing/advanced/nfs/nfsfile.cpp
+++ b/filesharing/advanced/nfs/nfsfile.cpp
@@ -21,10 +21,10 @@
#include <time.h>
#include <unistd.h>
-#include <qfileinfo.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qstringlist.h>
+#include <tqfileinfo.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqstringlist.h>
#include <kdebug.h>
#include <kmessagebox.h>
@@ -65,9 +65,9 @@ bool NFSFile::hasEntry(NFSEntry *entry)
}
-NFSEntry* NFSFile::getEntryByPath(const QString & path)
+NFSEntry* NFSFile::getEntryByPath(const TQString & path)
{
- QString testPath = path.stripWhiteSpace();
+ TQString testPath = path.stripWhiteSpace();
if ( testPath[testPath.length()-1] != '/' )
testPath += '/';
@@ -80,7 +80,7 @@ NFSEntry* NFSFile::getEntryByPath(const QString & path)
return 0L;
}
-bool NFSFile::removeEntryByPath(const QString & path) {
+bool NFSFile::removeEntryByPath(const TQString & path) {
NFSEntry* entry = getEntryByPath(path);
if (!entry)
return false;
@@ -99,7 +99,7 @@ EntryIterator NFSFile::getEntries()
bool NFSFile::load()
{
- QFile f(_url.path());
+ TQFile f(_url.path());
if ( !f.open(IO_ReadOnly) ) {
kdError() << "NFSFile::load: Could not open " << _url.path() << endl;
@@ -109,14 +109,14 @@ bool NFSFile::load()
_entries.clear();
_lines.clear();
- QTextStream s( &f );
+ TQTextStream s( &f );
bool continuedLine = false; // is true if the line before ended with a backslash
- QString completeLine;
+ TQString completeLine;
while ( !s.eof() )
{
- QString currentLine = s.readLine().stripWhiteSpace();
+ TQString currentLine = s.readLine().stripWhiteSpace();
if (continuedLine) {
completeLine += currentLine;
@@ -146,8 +146,8 @@ bool NFSFile::load()
continue;
}
- QString path;
- QString hosts;
+ TQString path;
+ TQString hosts;
// Handle quotation marks
if ( completeLine[0] == '"' ) {
@@ -179,13 +179,13 @@ bool NFSFile::load()
kdDebug(5009) << "KNFSShare: Found path: '" << path << "'" << endl;
NFSEntry *entry = new NFSEntry(path);
- QStringList hostList = QStringList::split(' ', hosts);
+ TQStringList hostList = TQStringList::split(' ', hosts);
if (hostList.isEmpty()) {
NFSHost* host = new NFSHost("*");
entry->addHost(host);
} else {
- QStringList::iterator it;
+ TQStringList::iterator it;
for ( it = hostList.begin(); it != hostList.end(); ++it ) {
NFSHost* host = new NFSHost((*it).stripWhiteSpace());
entry->addHost(host);
@@ -205,8 +205,8 @@ bool NFSFile::load()
}
-void NFSFile::saveTo(QTextStream * stream) {
- QPtrListIterator<NFSLine> it(_lines);
+void NFSFile::saveTo(TQTextStream * stream) {
+ TQPtrListIterator<NFSLine> it(_lines);
NFSLine *line;
while ( (line = it.current()) != 0 ) {
@@ -215,12 +215,12 @@ void NFSFile::saveTo(QTextStream * stream) {
}
}
-bool NFSFile::saveTo(const QString& fileName) {
- QFile file(fileName);
+bool NFSFile::saveTo(const TQString& fileName) {
+ TQFile file(fileName);
if (!file.open(IO_WriteOnly))
return false;
- QTextStream stream(&file);
+ TQTextStream stream(&file);
saveTo(&stream);
file.close();
return true;
@@ -228,7 +228,7 @@ bool NFSFile::saveTo(const QString& fileName) {
bool NFSFile::save()
{
- if (QFileInfo(_url.path()).isWritable() ) {
+ if (TQFileInfo(_url.path()).isWritable() ) {
saveTo(_url.path());
} else
{
@@ -240,14 +240,14 @@ bool NFSFile::save()
KProcIO proc;
- QString command = QString("cp %1 %2")
+ TQString command = TQString("cp %1 %2")
.arg(KProcess::quote( tempFile.name() ))
.arg(KProcess::quote( _url.path() ));
if (restartNFSServer)
command +=";exportfs -ra";
- if (!QFileInfo(_url.path()).isWritable() )
+ if (!TQFileInfo(_url.path()).isWritable() )
proc<<"kdesu" << "-d" << "-c"<<command;
if (!proc.start(KProcess::Block, true)) {
diff --git a/filesharing/advanced/nfs/nfsfile.h b/filesharing/advanced/nfs/nfsfile.h
index f48a0942..c46ce595 100644
--- a/filesharing/advanced/nfs/nfsfile.h
+++ b/filesharing/advanced/nfs/nfsfile.h
@@ -24,8 +24,8 @@
#include <kurl.h>
#include "nfsentry.h"
-typedef QPtrList<NFSEntry> EntryList;
-typedef QPtrListIterator<NFSEntry> EntryIterator;
+typedef TQPtrList<NFSEntry> EntryList;
+typedef TQPtrListIterator<NFSEntry> EntryIterator;
class QTextStream;
@@ -37,13 +37,13 @@ public:
void addEntry(NFSEntry *);
void removeEntry(NFSEntry *);
bool hasEntry(NFSEntry *);
- NFSEntry* getEntryByPath(const QString &);
- bool removeEntryByPath(const QString &);
+ NFSEntry* getEntryByPath(const TQString &);
+ bool removeEntryByPath(const TQString &);
EntryIterator getEntries();
bool save();
- bool saveTo(const QString& fileName);
- void saveTo(QTextStream * stream);
+ bool saveTo(const TQString& fileName);
+ void saveTo(TQTextStream * stream);
bool load();
bool restartNFSServer;
diff --git a/filesharing/advanced/nfs/nfshostdlg.cpp b/filesharing/advanced/nfs/nfshostdlg.cpp
index 073170d6..b2205f25 100644
--- a/filesharing/advanced/nfs/nfshostdlg.cpp
+++ b/filesharing/advanced/nfs/nfshostdlg.cpp
@@ -15,11 +15,11 @@
* *
***************************************************************************/
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qwhatsthis.h>
-#include <qgroupbox.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqwhatsthis.h>
+#include <tqgroupbox.h>
#include <klocale.h>
#include <kdebug.h>
@@ -32,19 +32,19 @@
#include "nfsentry.h"
-NFSHostDlg::NFSHostDlg(QWidget* parent, HostList* hosts, NFSEntry* entry)
+NFSHostDlg::NFSHostDlg(TQWidget* parent, HostList* hosts, NFSEntry* entry)
: KDialogBase(Plain, i18n("Host Properties"), Ok|Cancel, Ok, parent),
m_hosts(hosts), m_nfsEntry(entry), m_modified(false)
{
- QWidget* page = plainPage();
+ TQWidget* page = plainPage();
m_gui = new HostProps(page);
- QVBoxLayout *layout = new QVBoxLayout( page, 0, 6 );
+ TQVBoxLayout *layout = new TQVBoxLayout( page, 0, 6 );
layout->addWidget( m_gui );
- connect( m_gui, SIGNAL(modified()), this, SLOT(setModified()));
+ connect( m_gui, TQT_SIGNAL(modified()), this, TQT_SLOT(setModified()));
init();
@@ -96,11 +96,11 @@ void NFSHostDlg::setHostValues(NFSHost* host) {
setCheckBoxValue(m_gui->syncChk, host->sync);
setCheckBoxValue(m_gui->wdelayChk, ! host->wdelay);
- setEditValue(m_gui->anonuidEdit,QString::number(host->anonuid));
- setEditValue(m_gui->anongidEdit,QString::number(host->anongid));
+ setEditValue(m_gui->anonuidEdit,TQString::number(host->anonuid));
+ setEditValue(m_gui->anongidEdit,TQString::number(host->anongid));
}
-void NFSHostDlg::setEditValue(QLineEdit* edit, const QString & value) {
+void NFSHostDlg::setEditValue(TQLineEdit* edit, const TQString & value) {
if (edit->text().isEmpty())
return;
@@ -108,11 +108,11 @@ void NFSHostDlg::setEditValue(QLineEdit* edit, const QString & value) {
edit->setText(value);
else
if (edit->text() != value)
- edit->setText(QString::null);
+ edit->setText(TQString::null);
}
-void NFSHostDlg::setCheckBoxValue(QCheckBox* chk, bool value) {
- if (chk->state() == QButton::NoChange)
+void NFSHostDlg::setCheckBoxValue(TQCheckBox* chk, bool value) {
+ if (chk->state() == TQButton::NoChange)
return;
if (chk->isChecked()) {
@@ -153,7 +153,7 @@ bool NFSHostDlg::saveName(NFSHost* host) {
}
host->name="*";
} else {
- QString name = m_gui->nameEdit->text().stripWhiteSpace();
+ TQString name = m_gui->nameEdit->text().stripWhiteSpace();
if (name.isEmpty()) {
KMessageBox::sorry(this,
i18n("Please enter a hostname or an IP address.").arg(name),
@@ -192,15 +192,15 @@ void NFSHostDlg::saveValues(NFSHost* host) {
saveEditValue(host->anongid,m_gui->anongidEdit);
}
-void NFSHostDlg::saveEditValue(int & value, QLineEdit* edit) {
+void NFSHostDlg::saveEditValue(int & value, TQLineEdit* edit) {
if ( edit->text().isEmpty())
return;
value = edit->text().toInt();
}
-void NFSHostDlg::saveCheckBoxValue(bool & value, QCheckBox* chk, bool neg) {
- if (chk->state() == QButton::NoChange)
+void NFSHostDlg::saveCheckBoxValue(bool & value, TQCheckBox* chk, bool neg) {
+ if (chk->state() == TQButton::NoChange)
return;
if (neg)
diff --git a/filesharing/advanced/nfs/nfshostdlg.h b/filesharing/advanced/nfs/nfshostdlg.h
index 6580b2bd..9d1989e9 100644
--- a/filesharing/advanced/nfs/nfshostdlg.h
+++ b/filesharing/advanced/nfs/nfshostdlg.h
@@ -32,7 +32,7 @@ class NFSHostDlg : public KDialogBase
{
Q_OBJECT
public:
- NFSHostDlg(QWidget* parent, HostList* hosts, NFSEntry* entry);
+ NFSHostDlg(TQWidget* parent, HostList* hosts, NFSEntry* entry);
virtual ~NFSHostDlg();
bool isModified();
protected:
@@ -48,12 +48,12 @@ protected slots:
private:
void setHostValues(NFSHost* host);
- void setEditValue(QLineEdit* edit, const QString & value);
- void setCheckBoxValue(QCheckBox* chk, bool value);
+ void setEditValue(TQLineEdit* edit, const TQString & value);
+ void setCheckBoxValue(TQCheckBox* chk, bool value);
bool saveName(NFSHost* host);
void saveValues(NFSHost* host);
- void saveEditValue(int & value, QLineEdit* edit);
- void saveCheckBoxValue(bool & value, QCheckBox* chk, bool neg);
+ void saveEditValue(int & value, TQLineEdit* edit);
+ void saveCheckBoxValue(bool & value, TQCheckBox* chk, bool neg);
};
#endif
diff --git a/filesharing/advanced/propsdlgplugin/propertiespage.cpp b/filesharing/advanced/propsdlgplugin/propertiespage.cpp
index 52d772d7..d0f23a07 100644
--- a/filesharing/advanced/propsdlgplugin/propertiespage.cpp
+++ b/filesharing/advanced/propsdlgplugin/propertiespage.cpp
@@ -17,13 +17,13 @@
*/
-#include <qcheckbox.h>
-#include <qtooltip.h>
-#include <qbuttongroup.h>
-#include <qfileinfo.h>
-#include <qlabel.h>
+#include <tqcheckbox.h>
+#include <tqtooltip.h>
+#include <tqbuttongroup.h>
+#include <tqfileinfo.h>
+#include <tqlabel.h>
#include <kpushbutton.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kfileshare.h>
#include <knfsshare.h>
@@ -52,7 +52,7 @@
#define FILESHARE_DEBUG 5009
-PropertiesPage::PropertiesPage(QWidget* parent, KFileItemList items,bool enterUrl)
+PropertiesPage::PropertiesPage(TQWidget* parent, KFileItemList items,bool enterUrl)
: PropertiesPageGUI(parent),
m_enterUrl(enterUrl),
m_items(items),
@@ -78,8 +78,8 @@ PropertiesPage::PropertiesPage(QWidget* parent, KFileItemList items,bool enterUr
KFile::ExistingOnly |
KFile::LocalOnly );
urlRq->setURL(m_path);
- connect( urlRq, SIGNAL(textChanged(const QString&)),
- this, SLOT(urlRqTextChanged(const QString&)));
+ connect( urlRq, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(urlRqTextChanged(const TQString&)));
} else {
urlRq->hide();
folderLbl->hide();
@@ -90,7 +90,7 @@ PropertiesPage::PropertiesPage(QWidget* parent, KFileItemList items,bool enterUr
enableNFS(false,i18n("Reading NFS configuration file ..."));
- //QTimer::singleShot(1, this, SLOT(load));
+ //TQTimer::singleShot(1, this, TQT_SLOT(load));
load();
}
@@ -100,13 +100,13 @@ PropertiesPage::~PropertiesPage()
delete m_sambaFile;
}
-void PropertiesPage::urlRqTextChanged(const QString&) {
+void PropertiesPage::urlRqTextChanged(const TQString&) {
if (!m_enterUrl)
return;
KURL url(urlRq->url());
if (url.isLocalFile()) {
- QFileInfo info(url.path(1));
+ TQFileInfo info(url.path(1));
if (info.exists() &&
info.isDir())
{
@@ -134,18 +134,18 @@ void PropertiesPage::load() {
m_loaded = true;
}
-void PropertiesPage::enableNFS(bool b, const QString & message) {
+void PropertiesPage::enableNFS(bool b, const TQString & message) {
nfsChk->setEnabled(b);
nfsGrp->setEnabled(b);
- QToolTip::add(nfsChk,message);
- QToolTip::add(nfsGrp,message);
+ TQToolTip::add(nfsChk,message);
+ TQToolTip::add(nfsGrp,message);
}
-void PropertiesPage::enableSamba(bool b, const QString & message) {
+void PropertiesPage::enableSamba(bool b, const TQString & message) {
sambaChk->setEnabled(b);
sambaGrp->setEnabled(b);
- QToolTip::add(sambaChk,message);
- QToolTip::add(sambaGrp,message);
+ TQToolTip::add(sambaChk,message);
+ TQToolTip::add(sambaGrp,message);
}
@@ -171,11 +171,11 @@ bool PropertiesPage::save() {
bool PropertiesPage::save(NFSFile* nfsFile, SambaFile* sambaFile, bool nfs, bool samba)
{
- QString nfsFileName = KNFSShare::instance()->exportsPath();
+ TQString nfsFileName = KNFSShare::instance()->exportsPath();
bool nfsNeedsKDEsu = false;
if (nfs) {
- if (QFileInfo(nfsFileName).isWritable()) {
+ if (TQFileInfo(nfsFileName).isWritable()) {
nfsFile->saveTo(nfsFileName);
} else {
nfsNeedsKDEsu = true;
@@ -185,10 +185,10 @@ bool PropertiesPage::save(NFSFile* nfsFile, SambaFile* sambaFile, bool nfs, bool
kdDebug(FILESHARE_DEBUG) << "PropertiesPage::save: nfs has not changed." << endl;
- QString sambaFileName = KSambaShare::instance()->smbConfPath();
+ TQString sambaFileName = KSambaShare::instance()->smbConfPath();
bool sambaNeedsKDEsu = false;
if (samba) {
- if (QFileInfo(sambaFileName).isWritable()) {
+ if (TQFileInfo(sambaFileName).isWritable()) {
sambaFile->saveTo(sambaFileName);
} else {
sambaNeedsKDEsu = true;
@@ -206,18 +206,18 @@ bool PropertiesPage::save(NFSFile* nfsFile, SambaFile* sambaFile, bool nfs, bool
KProcIO proc;
- QString command;
+ TQString command;
if (nfsNeedsKDEsu) {
nfsFile->saveTo(nfsTempFile.name());
- command += QString("cp %1 %2;exportfs -ra;")
+ command += TQString("cp %1 %2;exportfs -ra;")
.arg(KProcess::quote( nfsTempFile.name() ))
.arg(KProcess::quote( nfsFileName ));
}
if (sambaNeedsKDEsu) {
sambaFile->saveTo(sambaTempFile.name());
- command += QString("cp %1 %2;")
+ command += TQString("cp %1 %2;")
.arg(KProcess::quote( sambaTempFile.name() ))
.arg(KProcess::quote( sambaFileName ));
}
@@ -272,7 +272,7 @@ bool PropertiesPage::checkURL() {
kdDebug(FILESHARE_DEBUG) << "PropertiesPage::checkURL: enterUrl=true" << endl;
KURL url(urlRq->url());
- QString path = url.path(1);
+ TQString path = url.path(1);
kdDebug(FILESHARE_DEBUG) << "PropertiesPage::checkURL: m_path='"
<< m_path << "'" << endl;
@@ -306,7 +306,7 @@ bool PropertiesPage::checkURL() {
kdDebug(FILESHARE_DEBUG) << "PropertiesPage::checkURL: url is local file" << endl;
- QFileInfo info(path);
+ TQFileInfo info(path);
if (!info.exists())
{
@@ -425,7 +425,7 @@ void PropertiesPage::updateNFSEntry() {
void PropertiesPage::moreNFSBtn_clicked() {
updateNFSEntry();
NFSDialog* dlg = new NFSDialog(this,m_nfsEntry);
- if (dlg->exec()==QDialog::Accepted &&
+ if (dlg->exec()==TQDialog::Accepted &&
dlg->modified())
{
kdDebug(FILESHARE_DEBUG) << "NFSDialog::ok" << endl;
@@ -450,7 +450,7 @@ bool PropertiesPage::loadSamba() {
}
enableSamba(true,"");
- QString shareName = m_sambaFile->findShareByPath(m_path);
+ TQString shareName = m_sambaFile->findShareByPath(m_path);
if (shareName.isNull()) {
sambaChk->setChecked(false);
kdDebug(FILESHARE_DEBUG) << "PropertiesPage::loadSamba: shareName is null!"
@@ -552,8 +552,8 @@ bool PropertiesPage::updateSambaShare() {
return true;
}
-void PropertiesPage::setSambaShareBoolValue(const QString & value,
- QCheckBox* chk)
+void PropertiesPage::setSambaShareBoolValue(const TQString & value,
+ TQCheckBox* chk)
{
bool v = m_sambaShare->getBoolValue(value);
if (v == chk->isChecked())
@@ -563,13 +563,13 @@ void PropertiesPage::setSambaShareBoolValue(const QString & value,
m_sambaChanged = true;
}
-QString PropertiesPage::getNewSambaName() {
- QString path = m_path;
+TQString PropertiesPage::getNewSambaName() {
+ TQString path = m_path;
if (path.isNull() && m_enterUrl) {
path = urlRq->url();
}
- QString shareName = KURL(path).fileName();
+ TQString shareName = KURL(path).fileName();
if (!sambaNameEdit->text().isEmpty())
shareName = sambaNameEdit->text();
@@ -599,7 +599,7 @@ void PropertiesPage::moreSambaBtnClicked() {
ShareDlgImpl* dlg = new ShareDlgImpl(this,m_sambaShare);
dlg->directoryGrp->hide();
dlg->pixmapFrame->hide();
- if (dlg->exec() == QDialog::Accepted &&
+ if (dlg->exec() == TQDialog::Accepted &&
dlg->hasChanged()) {
m_sambaChanged = true;
changedSlot();
diff --git a/filesharing/advanced/propsdlgplugin/propertiespage.h b/filesharing/advanced/propsdlgplugin/propertiespage.h
index 832518c7..f03de5c1 100644
--- a/filesharing/advanced/propsdlgplugin/propertiespage.h
+++ b/filesharing/advanced/propsdlgplugin/propertiespage.h
@@ -33,7 +33,7 @@ class PropertiesPage : public PropertiesPageGUI
{
Q_OBJECT
public:
- PropertiesPage(QWidget* parent, KFileItemList items, bool enterUrl=false);
+ PropertiesPage(TQWidget* parent, KFileItemList items, bool enterUrl=false);
virtual ~PropertiesPage();
bool save();
@@ -45,7 +45,7 @@ public slots:
protected:
bool m_enterUrl;
- QString m_path;
+ TQString m_path;
KFileItemList m_items;
NFSFile *m_nfsFile;
NFSEntry *m_nfsEntry;
@@ -61,7 +61,7 @@ protected slots:
virtual void moreNFSBtn_clicked();
virtual void moreSambaBtnClicked();
virtual void sambaChkToggled( bool b );
- virtual void urlRqTextChanged(const QString&);
+ virtual void urlRqTextChanged(const TQString&);
private:
bool loadNFS();
@@ -75,12 +75,12 @@ private:
bool saveSamba();
bool checkURL();
- void setSambaShareBoolValue(const QString & value, QCheckBox* chk);
+ void setSambaShareBoolValue(const TQString & value, TQCheckBox* chk);
void createNewSambaShare();
- QString getNewSambaName();
+ TQString getNewSambaName();
- void enableNFS(bool b,const QString & message);
- void enableSamba(bool b,const QString & message);
+ void enableNFS(bool b,const TQString & message);
+ void enableSamba(bool b,const TQString & message);
};
diff --git a/filesharing/advanced/propsdlgplugin/propsdlgshareplugin.cpp b/filesharing/advanced/propsdlgplugin/propsdlgshareplugin.cpp
index b5a2ef26..fafb4ece 100644
--- a/filesharing/advanced/propsdlgplugin/propsdlgshareplugin.cpp
+++ b/filesharing/advanced/propsdlgplugin/propsdlgshareplugin.cpp
@@ -16,10 +16,10 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qstring.h>
-#include <qvbox.h>
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqstring.h>
+#include <tqvbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <kgenericfactory.h>
#include <kdebug.h>
@@ -46,7 +46,7 @@ class PropsDlgSharePlugin::Private
};
PropsDlgSharePlugin::PropsDlgSharePlugin( KPropertiesDialog *dlg,
- const char *, const QStringList & )
+ const char *, const TQStringList & )
: KPropsDlgPlugin(dlg), d(0)
{
KGlobal::locale()->insertCatalogue("kfileshare");
@@ -57,30 +57,30 @@ PropsDlgSharePlugin::PropsDlgSharePlugin( KPropertiesDialog *dlg,
}
- QVBox* vbox = properties->addVBoxPage(i18n("&Share"));
+ TQVBox* vbox = properties->addVBoxPage(i18n("&Share"));
properties->setFileSharingPage(vbox);
if (KFileShare::authorization() == KFileShare::UserNotAllowed) {
- QWidget* widget = new QWidget( vbox );
- QVBoxLayout * vLayout = new QVBoxLayout( widget );
+ TQWidget* widget = new TQWidget( vbox );
+ TQVBoxLayout * vLayout = new TQVBoxLayout( widget );
vLayout->setSpacing( KDialog::spacingHint() );
vLayout->setMargin( 0 );
if (KFileShare::sharingEnabled()) {
vLayout->addWidget(
- new QLabel( i18n("You need to be authorized to share directories."),
+ new TQLabel( i18n("You need to be authorized to share directories."),
widget ));
} else {
vLayout->addWidget(
- new QLabel( i18n("File sharing is disabled."), widget));
+ new TQLabel( i18n("File sharing is disabled."), widget));
}
KPushButton* btn = new KPushButton( i18n("Configure File Sharing..."), widget );
- connect( btn, SIGNAL( clicked() ), SLOT( slotConfigureFileSharing() ) );
+ connect( btn, TQT_SIGNAL( clicked() ), TQT_SLOT( slotConfigureFileSharing() ) );
btn->setDefault(false);
- QHBoxLayout* hBox = new QHBoxLayout( (QWidget *)0L );
+ TQHBoxLayout* hBox = new TQHBoxLayout( (TQWidget *)0L );
hBox->addWidget( btn, 0, Qt::AlignLeft );
vLayout->addLayout(hBox);
vLayout->addStretch( 10 ); // align items on top
@@ -91,8 +91,8 @@ PropsDlgSharePlugin::PropsDlgSharePlugin( KPropertiesDialog *dlg,
d = new Private();
d->page = new PropertiesPage(vbox, properties->items(),false);
- connect(d->page, SIGNAL(changed()),
- this, SIGNAL(changed()));
+ connect(d->page, TQT_SIGNAL(changed()),
+ this, TQT_SIGNAL(changed()));
kdDebug(5009) << "Fileshare properties dialog plugin loaded" << endl;
diff --git a/filesharing/advanced/propsdlgplugin/propsdlgshareplugin.h b/filesharing/advanced/propsdlgplugin/propsdlgshareplugin.h
index 4604467e..56556dae 100644
--- a/filesharing/advanced/propsdlgplugin/propsdlgshareplugin.h
+++ b/filesharing/advanced/propsdlgplugin/propsdlgshareplugin.h
@@ -26,7 +26,7 @@ class PropsDlgSharePlugin : public KPropsDlgPlugin
{
Q_OBJECT
public:
- PropsDlgSharePlugin( KPropertiesDialog *dlg, const char *, const QStringList & );
+ PropsDlgSharePlugin( KPropertiesDialog *dlg, const char *, const TQStringList & );
virtual ~PropsDlgSharePlugin();
virtual void applyChanges();
diff --git a/filesharing/simple/fileshare.cpp b/filesharing/simple/fileshare.cpp
index 6572ef1a..5b796823 100644
--- a/filesharing/simple/fileshare.cpp
+++ b/filesharing/simple/fileshare.cpp
@@ -16,15 +16,15 @@
*/
#include <unistd.h>
-#include <qlayout.h>
-#include <qvbuttongroup.h>
-#include <qvgroupbox.h>
-#include <qlabel.h>
-#include <qdir.h>
-#include <qradiobutton.h>
-#include <qcheckbox.h>
-#include <qtooltip.h>
-#include <qvbox.h>
+#include <tqlayout.h>
+#include <tqvbuttongroup.h>
+#include <tqvgroupbox.h>
+#include <tqlabel.h>
+#include <tqdir.h>
+#include <tqradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqtooltip.h>
+#include <tqvbox.h>
#include <kpushbutton.h>
#include <kdebug.h>
@@ -53,41 +53,41 @@
#include "fileshare.h"
#include "groupconfigdlg.h"
-typedef KGenericFactory<KFileShareConfig, QWidget > ShareFactory;
+typedef KGenericFactory<KFileShareConfig, TQWidget > ShareFactory;
K_EXPORT_COMPONENT_FACTORY (kcm_fileshare, ShareFactory("kcmfileshare") )
#define FILESHARECONF "/etc/security/fileshare.conf"
#define FILESHARE_DEBUG 5009
-KFileShareConfig::KFileShareConfig(QWidget *parent, const char *name, const QStringList &):
+KFileShareConfig::KFileShareConfig(TQWidget *parent, const char *name, const TQStringList &):
KCModule(ShareFactory::instance(), parent, name)
{
KGlobal::locale()->insertCatalogue("kfileshare");
- QBoxLayout* layout = new QVBoxLayout(this,0,
+ TQBoxLayout* layout = new TQVBoxLayout(this,0,
KDialog::spacingHint());
/*
- QVButtonGroup *box = new QVButtonGroup( i18n("File Sharing"), this );
+ TQVButtonGroup *box = new TQVButtonGroup( i18n("File Sharing"), this );
box->layout()->setSpacing( KDialog::spacingHint() );
layout->addWidget(box);
- noSharing=new QRadioButton( i18n("Do &not allow users to share files"), box );
- sharing=new QRadioButton( i18n("&Allow users to share files from their HOME folder"), box);
+ noSharing=new TQRadioButton( i18n("Do &not allow users to share files"), box );
+ sharing=new TQRadioButton( i18n("&Allow users to share files from their HOME folder"), box);
*/
m_ccgui = new ControlCenterGUI(this);
- connect( m_ccgui, SIGNAL( changed()), this, SLOT(configChanged()));
- connect( m_ccgui->allowedUsersBtn, SIGNAL( clicked()),
- this, SLOT(allowedUsersBtnClicked()));
+ connect( m_ccgui, TQT_SIGNAL( changed()), this, TQT_SLOT(configChanged()));
+ connect( m_ccgui->allowedUsersBtn, TQT_SIGNAL( clicked()),
+ this, TQT_SLOT(allowedUsersBtnClicked()));
- QString path = QString::fromLocal8Bit( getenv( "PATH" ) );
- path += QString::fromLatin1(":/usr/sbin");
- QString sambaExec = KStandardDirs::findExe( QString::fromLatin1("smbd"), path );
- QString nfsExec = KStandardDirs::findExe( QString::fromLatin1("rpc.nfsd"), path );
+ TQString path = TQString::fromLocal8Bit( getenv( "PATH" ) );
+ path += TQString::fromLatin1(":/usr/sbin");
+ TQString sambaExec = KStandardDirs::findExe( TQString::fromLatin1("smbd"), path );
+ TQString nfsExec = KStandardDirs::findExe( TQString::fromLatin1("rpc.nfsd"), path );
if ( nfsExec.isEmpty() && sambaExec.isEmpty())
{
- QMessageBox::critical( 0, "File Sharing", QString("SMB and NFS servers are not installed on this machine, to enable this module the servers must be installed."));
+ TQMessageBox::critical( 0, "File Sharing", TQString("SMB and NFS servers are not installed on this machine, to enable this module the servers must be installed."));
m_ccgui->shareGrp->setDisabled(true);
m_ccgui->sharedFoldersGroupBox->setDisabled(true);
}
@@ -96,22 +96,22 @@ KFileShareConfig::KFileShareConfig(QWidget *parent, const char *name, const QStr
if (nfsExec.isEmpty()) {
m_ccgui->nfsChk->setDisabled(true);
m_ccgui->nfsChk->setChecked(false);
- QToolTip::add(m_ccgui->nfsChk,i18n("No NFS server installed on this system"));
+ TQToolTip::add(m_ccgui->nfsChk,i18n("No NFS server installed on this system"));
}
if (sambaExec.isEmpty()) {
m_ccgui->sambaChk->setDisabled(true);
m_ccgui->sambaChk->setChecked(false);
- QToolTip::add(m_ccgui->sambaChk,i18n("No Samba server installed on this system"));
+ TQToolTip::add(m_ccgui->sambaChk,i18n("No Samba server installed on this system"));
}
m_ccgui->infoLbl->hide();
layout->addWidget(m_ccgui);
updateShareListView();
- connect( KNFSShare::instance(), SIGNAL( changed()),
- this, SLOT(updateShareListView()));
- connect( KSambaShare::instance(), SIGNAL( changed()),
- this, SLOT(updateShareListView()));
+ connect( KNFSShare::instance(), TQT_SIGNAL( changed()),
+ this, TQT_SLOT(updateShareListView()));
+ connect( KSambaShare::instance(), TQT_SIGNAL( changed()),
+ this, TQT_SLOT(updateShareListView()));
}
@@ -120,13 +120,13 @@ KFileShareConfig::KFileShareConfig(QWidget *parent, const char *name, const QStr
((KFileShare::shareMode() == KFileShare::Advanced) &&
(KFileShare::authorization() == KFileShare::Authorized)))
{
- connect( m_ccgui->addShareBtn, SIGNAL(clicked()),
- this, SLOT(addShareBtnClicked()));
- connect( m_ccgui->changeShareBtn, SIGNAL(clicked()),
- this, SLOT(changeShareBtnClicked()));
- connect( m_ccgui->removeShareBtn, SIGNAL(clicked()),
- this, SLOT(removeShareBtnClicked()));
- m_ccgui->listView->setSelectionMode(QListView::Extended);
+ connect( m_ccgui->addShareBtn, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(addShareBtnClicked()));
+ connect( m_ccgui->changeShareBtn, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(changeShareBtnClicked()));
+ connect( m_ccgui->removeShareBtn, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(removeShareBtnClicked()));
+ m_ccgui->listView->setSelectionMode(TQListView::Extended);
m_ccgui->shareBtnPnl->setEnabled(true);
}
@@ -147,10 +147,10 @@ void KFileShareConfig::updateShareListView()
KNFSShare* nfs = KNFSShare::instance();
KSambaShare* samba = KSambaShare::instance();
- QStringList dirs = nfs->sharedDirectories();
- QStringList sambaDirs = samba->sharedDirectories();
+ TQStringList dirs = nfs->sharedDirectories();
+ TQStringList sambaDirs = samba->sharedDirectories();
- for ( QStringList::ConstIterator it = sambaDirs.begin(); it != sambaDirs.end(); ++it ) {
+ for ( TQStringList::ConstIterator it = sambaDirs.begin(); it != sambaDirs.end(); ++it ) {
// Do not insert duplicates
if (nfs->isDirectoryShared(*it))
continue;
@@ -158,11 +158,11 @@ void KFileShareConfig::updateShareListView()
dirs += *it;
}
- QPixmap folderPix = SmallIcon("folder",0,KIcon::ShareOverlay);
- QPixmap okPix = SmallIcon("button_ok");
- QPixmap cancelPix = SmallIcon("button_cancel");
+ TQPixmap folderPix = SmallIcon("folder",0,KIcon::ShareOverlay);
+ TQPixmap okPix = SmallIcon("button_ok");
+ TQPixmap cancelPix = SmallIcon("button_cancel");
- for ( QStringList::Iterator it = dirs.begin(); it != dirs.end(); ++it ) {
+ for ( TQStringList::Iterator it = dirs.begin(); it != dirs.end(); ++it ) {
KListViewItem* item = new KListViewItem(m_ccgui->listView);
item->setText(0,*it);
item->setPixmap(0, folderPix);
@@ -184,7 +184,7 @@ void KFileShareConfig::updateShareListView()
void KFileShareConfig::allowedUsersBtnClicked() {
GroupConfigDlg dlg(this,m_fileShareGroup,m_restricted,m_rootPassNeeded,
m_ccgui->simpleRadio->isChecked());
- if (dlg.exec() == QDialog::Accepted) {
+ if (dlg.exec() == TQDialog::Accepted) {
m_fileShareGroup = dlg.fileShareGroup().name();
m_restricted = dlg.restricted();
m_rootPassNeeded = dlg.rootPassNeeded();
@@ -196,7 +196,7 @@ void KFileShareConfig::allowedUsersBtnClicked() {
void KFileShareConfig::load()
{
- KSimpleConfig config(QString::fromLatin1(FILESHARECONF),true);
+ KSimpleConfig config(TQString::fromLatin1(FILESHARECONF),true);
m_ccgui->shareGrp->setChecked( config.readEntry("FILESHARING", "yes") == "yes" );
@@ -220,7 +220,7 @@ void KFileShareConfig::load()
m_smbConf = KSambaShare::instance()->smbConfPath();
}
-bool KFileShareConfig::addGroupAccessesToFile(const QString & file) {
+bool KFileShareConfig::addGroupAccessesToFile(const TQString & file) {
KProcess chgrp;
chgrp << "chgrp" << m_fileShareGroup << file;
KProcess chmod;
@@ -241,7 +241,7 @@ bool KFileShareConfig::addGroupAccessesToFile(const QString & file) {
}
-bool KFileShareConfig::removeGroupAccessesFromFile(const QString & file) {
+bool KFileShareConfig::removeGroupAccessesFromFile(const TQString & file) {
KProcess chgrp;
chgrp << "chgrp" << "root" << file;
KProcess chmod;
@@ -291,11 +291,11 @@ void KFileShareConfig::save()
{
setGroupAccesses();
- QDir dir("/etc/security");
+ TQDir dir("/etc/security");
if ( !dir.exists())
dir.mkdir("/etc/security");
- QFile file(FILESHARECONF);
+ TQFile file(FILESHARECONF);
if ( ! file.open(IO_WriteOnly)) {
KMessageBox::detailedError(this,
i18n("Could not save settings."),
@@ -306,7 +306,7 @@ void KFileShareConfig::save()
}
- QTextStream stream(&file);
+ TQTextStream stream(&file);
stream << "FILESHARING=";
stream << (m_ccgui->shareGrp->isChecked() ? "yes" : "no");
@@ -340,7 +340,7 @@ void KFileShareConfig::defaults()
m_ccgui->shareGrp->setChecked( false );
}
-QString KFileShareConfig::quickHelp() const
+TQString KFileShareConfig::quickHelp() const
{
return i18n("<h1>File Sharing</h1><p>This module can be used "
"to enable file sharing over the network using "
@@ -354,11 +354,11 @@ void KFileShareConfig::addShareBtnClicked() {
}
-PropertiesPageDlg::PropertiesPageDlg(QWidget*parent, KFileItemList files)
+PropertiesPageDlg::PropertiesPageDlg(TQWidget*parent, KFileItemList files)
: KDialogBase(parent, "sharedlg", true,
i18n("Share Folder"), Ok|Cancel, Ok, true)
{
- QVBox* vbox = makeVBoxMainWidget();
+ TQVBox* vbox = makeVBoxMainWidget();
m_page = new PropertiesPage(vbox,files,true);
}
@@ -380,7 +380,7 @@ void PropertiesPageDlg::slotOk() {
void KFileShareConfig::showShareDialog(const KFileItemList & files) {
PropertiesPageDlg* dlg = new PropertiesPageDlg(this,files);
- if (dlg->exec() == QDialog::Accepted) {
+ if (dlg->exec() == TQDialog::Accepted) {
if ( dlg->hasChanged() ) {
updateShareListView();
}
@@ -390,9 +390,9 @@ void KFileShareConfig::showShareDialog(const KFileItemList & files) {
void KFileShareConfig::changeShareBtnClicked() {
KFileItemList files;
- QPtrList<QListViewItem> items = m_ccgui->listView->selectedItems();
+ TQPtrList<TQListViewItem> items = m_ccgui->listView->selectedItems();
- QListViewItem* item;
+ TQListViewItem* item;
for ( item = items.first(); item; item = items.next() ) {
files.append(new KFileItem(KURL::fromPathOrURL(item->text(0)),"",0));
}
@@ -402,8 +402,8 @@ void KFileShareConfig::changeShareBtnClicked() {
void KFileShareConfig::removeShareBtnClicked() {
- QPtrList<QListViewItem> items = m_ccgui->listView->selectedItems();
- QListViewItem *item;
+ TQPtrList<TQListViewItem> items = m_ccgui->listView->selectedItems();
+ TQListViewItem *item;
bool nfs = false;
bool samba = false;
diff --git a/filesharing/simple/fileshare.h b/filesharing/simple/fileshare.h
index 1f5da9e7..d6e8719a 100644
--- a/filesharing/simple/fileshare.h
+++ b/filesharing/simple/fileshare.h
@@ -33,22 +33,22 @@ class KFileShareConfig : public KCModule
Q_OBJECT
public:
- KFileShareConfig(QWidget *parent, const char *name, const QStringList &);
+ KFileShareConfig(TQWidget *parent, const char *name, const TQStringList &);
virtual void load();
virtual void save();
virtual void defaults();
- virtual QString quickHelp() const;
+ virtual TQString quickHelp() const;
protected:
ControlCenterGUI* m_ccgui;
- QString m_fileShareGroup;
+ TQString m_fileShareGroup;
bool m_restricted;
bool m_rootPassNeeded;
- QString m_smbConf;
+ TQString m_smbConf;
void showShareDialog(const KFileItemList & files);
- bool addGroupAccessesToFile(const QString & file);
- bool removeGroupAccessesFromFile(const QString & file);
+ bool addGroupAccessesToFile(const TQString & file);
+ bool removeGroupAccessesFromFile(const TQString & file);
bool setGroupAccesses();
protected slots:
@@ -66,7 +66,7 @@ class PropertiesPageDlg : public KDialogBase
{
Q_OBJECT
public:
- PropertiesPageDlg(QWidget * parent, KFileItemList files);
+ PropertiesPageDlg(TQWidget * parent, KFileItemList files);
~PropertiesPageDlg() {};
bool hasChanged();
protected:
diff --git a/filesharing/simple/groupconfigdlg.cpp b/filesharing/simple/groupconfigdlg.cpp
index f313719d..470f024f 100644
--- a/filesharing/simple/groupconfigdlg.cpp
+++ b/filesharing/simple/groupconfigdlg.cpp
@@ -18,13 +18,13 @@
*/
-#include <qradiobutton.h>
-#include <qpushbutton.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qvbox.h>
-#include <qhbox.h>
+#include <tqradiobutton.h>
+#include <tqpushbutton.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
#include <klocale.h>
#include <kuser.h>
@@ -40,16 +40,16 @@
#include "groupconfigdlg.h"
-static QString groupListToString(const QValueList<KUserGroup> & list);
-static QString prettyString(const KUser &user);
-static QString fromPrettyString(const QString & s);
-static void removeList(QValueList<KUser> & from, const QValueList<KUser> & that);
-static bool userMod(const QString & user, const QValueList<KUserGroup> & groups);
+static TQString groupListToString(const TQValueList<KUserGroup> & list);
+static TQString prettyString(const KUser &user);
+static TQString fromPrettyString(const TQString & s);
+static void removeList(TQValueList<KUser> & from, const TQValueList<KUser> & that);
+static bool userMod(const TQString & user, const TQValueList<KUserGroup> & groups);
-GroupConfigDlg::GroupConfigDlg(QWidget * parent,
- const QString & fileShareGroup, bool restricted,
+GroupConfigDlg::GroupConfigDlg(TQWidget * parent,
+ const TQString & fileShareGroup, bool restricted,
bool rootPassNeeded, bool simpleSharing)
: KDialogBase(parent,"groupconfigdlg", true,
i18n("Allowed Users"), Ok|Cancel, Ok, true) ,
@@ -81,12 +81,12 @@ void GroupConfigDlg::initGUI() {
m_gui->groupUsersRadio->setChecked(m_restricted);
m_gui->writeAccessChk->setChecked(!m_rootPassNeeded);
- connect( m_gui->addBtn, SIGNAL(clicked()),
- this, SLOT(slotAddUser()));
- connect( m_gui->removeBtn, SIGNAL(clicked()),
- this, SLOT(slotRemoveUser()));
- connect( m_gui->otherGroupBtn, SIGNAL(clicked()),
- this, SLOT(slotChangeGroup()));
+ connect( m_gui->addBtn, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotAddUser()));
+ connect( m_gui->removeBtn, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotRemoveUser()));
+ connect( m_gui->otherGroupBtn, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotChangeGroup()));
if (m_simpleSharing) {
// if simple sharing users never need the root password
@@ -96,23 +96,23 @@ void GroupConfigDlg::initGUI() {
void GroupConfigDlg::updateListBox() {
m_gui->listBox->clear();
- QValueList<KUser>::iterator it;
+ TQValueList<KUser>::iterator it;
for ( it = m_users.begin(); it != m_users.end(); ++it ) {
m_gui->listBox->insertItem(prettyString(*it));
kdDebug(5009) << "GroupConfigDlg::updateListBox: " << (*it).loginName() << endl;
}
}
-QString prettyString(const KUser &user) {
+TQString prettyString(const KUser &user) {
return user.fullName()+" ("+user.loginName()+")";
}
-QString fromPrettyString(const QString & s) {
+TQString fromPrettyString(const TQString & s) {
// Jan Schaefer (jan)
// i j
int i = s.find('(');
int j = s.find(')');
- QString loginName = s.mid(i+1,j-i-1);
+ TQString loginName = s.mid(i+1,j-i-1);
return loginName;
}
@@ -121,7 +121,7 @@ bool GroupConfigDlg::restricted() {
}
void GroupConfigDlg::slotAddUser() {
- QValueList<KUser> allUsers = KUser::allUsers();
+ TQValueList<KUser> allUsers = KUser::allUsers();
removeList(allUsers,m_users);
@@ -132,18 +132,18 @@ void GroupConfigDlg::slotAddUser() {
return;
}
- QStringList stringList;
+ TQStringList stringList;
- QValueList<KUser>::iterator it;
+ TQValueList<KUser>::iterator it;
for ( it = allUsers.begin(); it != allUsers.end(); ++it ) {
- QString s = (*it).fullName()+" ("+(*it).loginName()+")";
+ TQString s = (*it).fullName()+" ("+(*it).loginName()+")";
stringList.append(s);
}
stringList.sort();
bool ok;
- QString userName = KInputDialog::getItem(
+ TQString userName = KInputDialog::getItem(
i18n("Select User"),
i18n("Select a user:"),
stringList,
@@ -154,14 +154,14 @@ void GroupConfigDlg::slotAddUser() {
if (!ok)
return;
- QString loginName = fromPrettyString(userName);
+ TQString loginName = fromPrettyString(userName);
KUser user(loginName);
m_users.append(KUser(loginName));
updateListBox();
}
-void removeList(QValueList<KUser> & from, const QValueList<KUser> & that) {
- QValueList<KUser>::ConstIterator it;
+void removeList(TQValueList<KUser> & from, const TQValueList<KUser> & that) {
+ TQValueList<KUser>::ConstIterator it;
for ( it = that.begin(); it != that.end(); ++it ) {
from.remove(*it);
}
@@ -169,7 +169,7 @@ void removeList(QValueList<KUser> & from, const QValueList<KUser> & that) {
}
bool GroupConfigDlg::addUser(const KUser & user, const KUserGroup & group) {
- QValueList<KUserGroup> groups = user.groups();
+ TQValueList<KUserGroup> groups = user.groups();
groups.append(group);
if (!userMod(user.loginName(),groups)) {
KMessageBox::sorry(this,i18n("Could not add user '%1' to group '%2'")
@@ -181,7 +181,7 @@ bool GroupConfigDlg::addUser(const KUser & user, const KUserGroup & group) {
bool GroupConfigDlg::removeUser(const KUser & user, const KUserGroup & group) {
- QValueList<KUserGroup> groups = user.groups();
+ TQValueList<KUserGroup> groups = user.groups();
groups.remove(group);
if (!userMod(user.loginName(),groups)) {
KMessageBox::sorry(this,i18n("Could not remove user '%1' from group '%2'")
@@ -203,12 +203,12 @@ void GroupConfigDlg::slotOk() {
return;
}
- QValueList<KUser> addedUsers = m_users;
+ TQValueList<KUser> addedUsers = m_users;
removeList(addedUsers,m_origUsers);
- QValueList<KUser> removedUsers = m_origUsers;
+ TQValueList<KUser> removedUsers = m_origUsers;
removeList(removedUsers,m_users);
- QValueList<KUser>::ConstIterator it;
+ TQValueList<KUser>::ConstIterator it;
for ( it = addedUsers.begin(); it != addedUsers.end(); ++it ) {
addUser(*it, m_fileShareGroup);
}
@@ -221,27 +221,27 @@ void GroupConfigDlg::slotOk() {
KDialogBase::slotOk();
}
-bool userMod(const QString & user, const QValueList<KUserGroup> & groups) {
+bool userMod(const TQString & user, const TQValueList<KUserGroup> & groups) {
KProcess proc;
proc << "usermod" << "-G" << groupListToString(groups) << user;
return proc.start(KProcess::Block) && proc.normalExit();
}
void GroupConfigDlg::slotRemoveUser() {
- QListBoxItem* item = m_gui->listBox->selectedItem();
+ TQListBoxItem* item = m_gui->listBox->selectedItem();
if (!item)
return;
- QString loginName = fromPrettyString(item->text());
+ TQString loginName = fromPrettyString(item->text());
KUser user(loginName);
m_users.remove(KUser(loginName));
updateListBox();
m_gui->removeBtn->setEnabled(false);
}
-QString groupListToString(const QValueList<KUserGroup> & list) {
- QValueList<KUserGroup>::ConstIterator it;
- QString result;
+TQString groupListToString(const TQValueList<KUserGroup> & list) {
+ TQValueList<KUserGroup>::ConstIterator it;
+ TQString result;
for ( it = list.begin(); it != list.end(); ++it ) {
result+=(*it).name()+",";
@@ -253,13 +253,13 @@ QString groupListToString(const QValueList<KUserGroup> & list) {
}
void GroupConfigDlg::slotChangeGroup() {
- QValueList<KUserGroup> allGroups = KUserGroup::allGroups();
+ TQValueList<KUserGroup> allGroups = KUserGroup::allGroups();
- QStringList stringList;
+ TQStringList stringList;
- QValueList<KUserGroup>::iterator it;
+ TQValueList<KUserGroup>::iterator it;
for ( it = allGroups.begin(); it != allGroups.end(); ++it ) {
- QString s = (*it).name();
+ TQString s = (*it).name();
stringList.append(s);
}
@@ -268,31 +268,31 @@ void GroupConfigDlg::slotChangeGroup() {
KDialogBase* dlg = new KDialogBase(this,"groupconfigdlg", true,
i18n("Allowed Users"), Ok|Cancel, Ok, true);
- QVBox* vbox = dlg->makeVBoxMainWidget();
+ TQVBox* vbox = dlg->makeVBoxMainWidget();
- QHBox* hbox = new QHBox(vbox);
- QLabel* lbl = new QLabel(i18n("New file share group:"),hbox);
+ TQHBox* hbox = new TQHBox(vbox);
+ TQLabel* lbl = new TQLabel(i18n("New file share group:"),hbox);
KComboBox* combo = new KComboBox(hbox);
combo->insertStringList(stringList);
combo->setEditable(true);
combo->setCurrentText(m_fileShareGroup.name());
- QCheckBox* addChk = new QCheckBox(
+ TQCheckBox* addChk = new TQCheckBox(
i18n("Add users from the old file share group to the new one"),
vbox);
- QCheckBox* removeUsersChk = new QCheckBox(
+ TQCheckBox* removeUsersChk = new TQCheckBox(
i18n("Remove users from old file share group"),
vbox);
- QCheckBox* removeGroupChk = new QCheckBox(
+ TQCheckBox* removeGroupChk = new TQCheckBox(
i18n("Delete the old file share group"),
vbox);
- if (dlg->exec() == QDialog::Accepted) {
- QString groupName = combo->currentText();
+ if (dlg->exec() == TQDialog::Accepted) {
+ TQString groupName = combo->currentText();
if (groupName != m_fileShareGroup.name()) {
- QString oldGroup = m_fileShareGroup.name();
+ TQString oldGroup = m_fileShareGroup.name();
if (allGroups.contains(KUserGroup(groupName)))
setFileShareGroup(KUserGroup(groupName));
else {
@@ -348,8 +348,8 @@ void GroupConfigDlg::setFileShareGroup(const KUserGroup & group) {
}
-bool GroupConfigDlg::addUsersToGroup(QValueList<KUser> users,const KUserGroup & group) {
- QValueList<KUser>::ConstIterator it;
+bool GroupConfigDlg::addUsersToGroup(TQValueList<KUser> users,const KUserGroup & group) {
+ TQValueList<KUser>::ConstIterator it;
bool result = true;
for ( it = users.begin(); it != users.end(); ++it ) {
if (!addUser(*it, group))
@@ -358,16 +358,16 @@ bool GroupConfigDlg::addUsersToGroup(QValueList<KUser> users,const KUserGroup &
return result;
}
-bool GroupConfigDlg::emptyGroup(const QString & s) {
+bool GroupConfigDlg::emptyGroup(const TQString & s) {
if (KMessageBox::No == KMessageBox::questionYesNo(this,
- i18n("Do you really want to remove all users from group '%1'?").arg(s), QString::null, KStdGuiItem::del(), KStdGuiItem::cancel())) {
+ i18n("Do you really want to remove all users from group '%1'?").arg(s), TQString::null, KStdGuiItem::del(), KStdGuiItem::cancel())) {
return false;
}
- QValueList<KUser> allUsers = KUser::allUsers();
+ TQValueList<KUser> allUsers = KUser::allUsers();
bool result = true;
KUserGroup group(s);
- QValueList<KUser>::ConstIterator it;
+ TQValueList<KUser>::ConstIterator it;
for ( it = allUsers.begin(); it != allUsers.end(); ++it ) {
if (!removeUser(*it, group))
result = false;
@@ -375,9 +375,9 @@ bool GroupConfigDlg::emptyGroup(const QString & s) {
return result;
}
-bool GroupConfigDlg::deleteGroup(const QString & s) {
+bool GroupConfigDlg::deleteGroup(const TQString & s) {
if (KMessageBox::No == KMessageBox::questionYesNo(this,
- i18n("Do you really want to delete group '%1'?").arg(s), QString::null, KStdGuiItem::del(), KStdGuiItem::cancel())) {
+ i18n("Do you really want to delete group '%1'?").arg(s), TQString::null, KStdGuiItem::del(), KStdGuiItem::cancel())) {
return false;
}
@@ -391,14 +391,14 @@ bool GroupConfigDlg::deleteGroup(const QString & s) {
return result;
}
-bool GroupConfigDlg::createFileShareGroup(const QString & s) {
+bool GroupConfigDlg::createFileShareGroup(const TQString & s) {
if (s.isEmpty()) {
KMessageBox::sorry(this,i18n("Please choose a valid group."));
return false;
}
if (KMessageBox::No == KMessageBox::questionYesNo(this,
- i18n("This group '%1' does not exist. Should it be created?").arg(s), QString::null, i18n("Create"), i18n("Do Not Create")))
+ i18n("This group '%1' does not exist. Should it be created?").arg(s), TQString::null, i18n("Create"), i18n("Do Not Create")))
return false;
//debug("CreateFileShareGroup: "+s);
diff --git a/filesharing/simple/groupconfigdlg.h b/filesharing/simple/groupconfigdlg.h
index eab24152..1258422c 100644
--- a/filesharing/simple/groupconfigdlg.h
+++ b/filesharing/simple/groupconfigdlg.h
@@ -21,7 +21,7 @@
#define GROUPCONFIGDLG_H
#include <kdialogbase.h>
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include <kuser.h>
class GroupConfigGUI;
@@ -30,7 +30,7 @@ class GroupConfigDlg : public KDialogBase
{
Q_OBJECT
public:
- GroupConfigDlg(QWidget * parent, const QString & fileShareGroup, bool restricted,
+ GroupConfigDlg(TQWidget * parent, const TQString & fileShareGroup, bool restricted,
bool rootPassNeeded, bool simpleSharing);
~GroupConfigDlg();
KUserGroup fileShareGroup() { return m_fileShareGroup; }
@@ -49,16 +49,16 @@ protected slots:
virtual void slotOk();
private:
- bool createFileShareGroup(const QString & s);
- bool deleteGroup(const QString & s);
- bool emptyGroup(const QString & s);
+ bool createFileShareGroup(const TQString & s);
+ bool deleteGroup(const TQString & s);
+ bool emptyGroup(const TQString & s);
bool addUser(const KUser & user, const KUserGroup & group);
bool removeUser(const KUser & user, const KUserGroup & group);
- bool addUsersToGroup(QValueList<KUser> users,const KUserGroup & group);
+ bool addUsersToGroup(TQValueList<KUser> users,const KUserGroup & group);
void setFileShareGroup(const KUserGroup & group);
- QValueList<KUser> m_origUsers;
- QValueList<KUser> m_users;
+ TQValueList<KUser> m_origUsers;
+ TQValueList<KUser> m_users;
KUserGroup m_fileShareGroup;
bool m_restricted;
bool m_rootPassNeeded;
diff --git a/filesharing/simple/groupconfiggui.ui.h b/filesharing/simple/groupconfiggui.ui.h
index 35e82f7f..055fd6c3 100644
--- a/filesharing/simple/groupconfiggui.ui.h
+++ b/filesharing/simple/groupconfiggui.ui.h
@@ -8,7 +8,7 @@
*****************************************************************************/
-void GroupConfigGUI::listBox_selectionChanged( QListBoxItem * i)
+void GroupConfigGUI::listBox_selectionChanged( TQListBoxItem * i)
{
removeBtn->setEnabled(i);
}
diff --git a/filesharing/simple/krichtextlabel.cpp b/filesharing/simple/krichtextlabel.cpp
index 458ade62..089635d7 100644
--- a/filesharing/simple/krichtextlabel.cpp
+++ b/filesharing/simple/krichtextlabel.cpp
@@ -18,35 +18,35 @@
#include "krichtextlabel.h"
-#include <qtooltip.h>
-#include <qstylesheet.h>
-#include <qsimplerichtext.h>
+#include <tqtooltip.h>
+#include <tqstylesheet.h>
+#include <tqsimplerichtext.h>
#include <kglobalsettings.h>
-static QString qrichtextify( const QString& text )
+static TQString qrichtextify( const TQString& text )
{
if ( text.isEmpty() || text[0] == '<' )
return text;
- QStringList lines = QStringList::split('\n', text);
- for(QStringList::Iterator it = lines.begin(); it != lines.end(); ++it)
+ TQStringList lines = TQStringList::split('\n', text);
+ for(TQStringList::Iterator it = lines.begin(); it != lines.end(); ++it)
{
- *it = QStyleSheet::convertFromPlainText( *it, QStyleSheetItem::WhiteSpaceNormal );
+ *it = TQStyleSheet::convertFromPlainText( *it, TQStyleSheetItem::WhiteSpaceNormal );
}
- return lines.join(QString::null);
+ return lines.join(TQString::null);
}
-KRichTextLabel::KRichTextLabel( const QString &text , QWidget *parent, const char *name )
- : QLabel ( parent, name ) {
+KRichTextLabel::KRichTextLabel( const TQString &text , TQWidget *parent, const char *name )
+ : TQLabel ( parent, name ) {
m_defaultWidth = QMIN(400, KGlobalSettings::desktopGeometry(this).width()*2/5);
setAlignment( Qt::WordBreak );
setText(text);
}
-KRichTextLabel::KRichTextLabel( QWidget *parent, const char *name )
- : QLabel ( parent, name ) {
+KRichTextLabel::KRichTextLabel( TQWidget *parent, const char *name )
+ : TQLabel ( parent, name ) {
m_defaultWidth = QMIN(400, KGlobalSettings::desktopGeometry(this).width()*2/5);
setAlignment( Qt::WordBreak );
}
@@ -57,17 +57,17 @@ void KRichTextLabel::setDefaultWidth(int defaultWidth)
updateGeometry();
}
-QSizePolicy KRichTextLabel::sizePolicy() const
+TQSizePolicy KRichTextLabel::sizePolicy() const
{
- return QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Minimum, false);
+ return TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Minimum, false);
}
-QSize KRichTextLabel::minimumSizeHint() const
+TQSize KRichTextLabel::minimumSizeHint() const
{
- QString qt_text = qrichtextify( text() );
+ TQString qt_text = qrichtextify( text() );
int pref_width = 0;
int pref_height = 0;
- QSimpleRichText rt(qt_text, font());
+ TQSimpleRichText rt(qt_text, font());
pref_width = m_defaultWidth;
rt.setWidth(pref_width);
int used_width = rt.widthUsed();
@@ -94,16 +94,16 @@ QSize KRichTextLabel::minimumSizeHint() const
pref_width = used_width;
}
- return QSize(pref_width, rt.height());
+ return TQSize(pref_width, rt.height());
}
-QSize KRichTextLabel::sizeHint() const
+TQSize KRichTextLabel::sizeHint() const
{
return minimumSizeHint();
}
-void KRichTextLabel::setText( const QString &text ) {
- QLabel::setText(text);
+void KRichTextLabel::setText( const TQString &text ) {
+ TQLabel::setText(text);
}
void KRichTextLabel::virtual_hook( int, void* )
diff --git a/filesharing/simple/krichtextlabel.h b/filesharing/simple/krichtextlabel.h
index e03fe250..40ead037 100644
--- a/filesharing/simple/krichtextlabel.h
+++ b/filesharing/simple/krichtextlabel.h
@@ -19,12 +19,12 @@
#ifndef KRICHTEXTLABEL_H
#define KRICHTEXTLABEL_H
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kdelibs_export.h>
/**
- * @short A replacement for QLabel that supports richtext and proper layout management
+ * @short A replacement for TQLabel that supports richtext and proper layout management
*
* @author Waldo Bastian <bastian@kde.org>
*/
@@ -32,25 +32,25 @@
/*
* QLabel
*/
-class KDEUI_EXPORT KRichTextLabel : public QLabel {
+class KDEUI_EXPORT KRichTextLabel : public TQLabel {
Q_OBJECT
public:
/**
* Default constructor.
*/
- KRichTextLabel( QWidget *parent, const char *name = 0 );
- KRichTextLabel( const QString &text, QWidget *parent, const char *name = 0 );
+ KRichTextLabel( TQWidget *parent, const char *name = 0 );
+ KRichTextLabel( const TQString &text, TQWidget *parent, const char *name = 0 );
int defaultWidth() const { return m_defaultWidth; }
void setDefaultWidth(int defaultWidth);
- virtual QSize minimumSizeHint() const;
- virtual QSize sizeHint() const;
- QSizePolicy sizePolicy() const;
+ virtual TQSize minimumSizeHint() const;
+ virtual TQSize sizeHint() const;
+ TQSizePolicy sizePolicy() const;
public slots:
- void setText( const QString & );
+ void setText( const TQString & );
protected:
int m_defaultWidth;