From 47c8a359c5276062c4bc17f0e82410f29081b502 Mon Sep 17 00:00:00 2001
From: tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>
Date: Sat, 31 Jul 2010 19:48:06 +0000
Subject: Trinity Qt initial conversion

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
---
 filesharing/advanced/kcm_sambaconf/sambashare.cpp | 82 +++++++++++------------
 1 file changed, 41 insertions(+), 41 deletions(-)

(limited to 'filesharing/advanced/kcm_sambaconf/sambashare.cpp')

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");
-- 
cgit v1.2.3