diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:48:06 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:48:06 +0000 |
commit | 47c8a359c5276062c4bc17f0e82410f29081b502 (patch) | |
tree | 2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /krdc/hostpreferences.cpp | |
parent | 6f82532777a35e0e60bbd2b290b2e93e646f349b (diff) | |
download | tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'krdc/hostpreferences.cpp')
-rw-r--r-- | krdc/hostpreferences.cpp | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/krdc/hostpreferences.cpp b/krdc/hostpreferences.cpp index 4b02191b..dae9a09a 100644 --- a/krdc/hostpreferences.cpp +++ b/krdc/hostpreferences.cpp @@ -24,8 +24,8 @@ #include <kconfig.h> #include <kstaticdeleter.h> -#include <qregexp.h> -#include <qmap.h> +#include <tqregexp.h> +#include <tqmap.h> HostPreferences *HostPreferences::m_instance = 0; static KStaticDeleter<HostPreferences> sd; @@ -38,7 +38,7 @@ HostPreferences *HostPreferences::instance() return m_instance; } -HostPref::HostPref(KConfig *conf, const QString &host, const QString &type) : +HostPref::HostPref(KConfig *conf, const TQString &host, const TQString &type) : m_host(host), m_type(type), m_config(conf) { @@ -48,20 +48,20 @@ HostPref::~HostPref() { m_config->sync(); } -QString HostPref::host() const { +TQString HostPref::host() const { return m_host; } -QString HostPref::type() const { +TQString HostPref::type() const { return m_type; } -QString HostPref::prefix() const { +TQString HostPref::prefix() const { return prefix(m_host, m_type); } -QString HostPref::prefix(const QString &host, const QString &type) { - return QString("PerHost-%1-%2-").arg(type).arg(host); +TQString HostPref::prefix(const TQString &host, const TQString &type) { + return TQString("PerHost-%1-%2-").arg(type).arg(host); } @@ -74,7 +74,7 @@ HostPreferences::~HostPreferences() { sd.setObject( m_instance, 0, false ); } -HostPrefPtr HostPreferences::getHostPref(const QString &host, const QString &type) { +HostPrefPtr HostPreferences::getHostPref(const TQString &host, const TQString &type) { m_config->setGroup("PerHostSettings"); if (!m_config->readBoolEntry(HostPref::prefix(host, type)+"exists")) return 0; @@ -93,7 +93,7 @@ HostPrefPtr HostPreferences::getHostPref(const QString &host, const QString &typ return 0; } -HostPrefPtr HostPreferences::createHostPref(const QString &host, const QString &type) { +HostPrefPtr HostPreferences::createHostPref(const TQString &host, const TQString &type) { HostPrefPtr hp = getHostPref(host, type); if (hp) return hp; @@ -128,13 +128,13 @@ HostPrefPtr HostPreferences::rdpDefaults() HostPrefPtrList HostPreferences::getAllHostPrefs() { HostPrefPtrList r; - QMap<QString, QString> map = m_config->entryMap("PerHostSettings"); - QStringList keys = map.keys(); - QStringList::iterator it = keys.begin(); + TQMap<TQString, TQString> map = m_config->entryMap("PerHostSettings"); + TQStringList keys = map.keys(); + TQStringList::iterator it = keys.begin(); while (it != keys.end()) { - QString key = *it; + TQString key = *it; if (key.endsWith("-exists")) { - QRegExp re("PerHost-([^-]+)-(.*)-exists"); + TQRegExp re("PerHost-([^-]+)-(.*)-exists"); if (re.exactMatch(key)) { HostPrefPtr hp = getHostPref(re.cap(2), re.cap(1)); if (hp) @@ -153,37 +153,37 @@ void HostPreferences::removeHostPref(HostPref *hostPref) { void HostPreferences::setShowBrowsingPanel( bool b ) { - m_config->setGroup( QString::null ); + m_config->setGroup( TQString::null ); m_config->writeEntry( "browsingPanel", b ); } -void HostPreferences::setServerCompletions( const QStringList &list ) +void HostPreferences::setServerCompletions( const TQStringList &list ) { - m_config->setGroup( QString::null ); + m_config->setGroup( TQString::null ); m_config->writeEntry( "serverCompletions", list ); } -void HostPreferences::setServerHistory( const QStringList &list ) +void HostPreferences::setServerHistory( const TQStringList &list ) { - m_config->setGroup( QString::null ); + m_config->setGroup( TQString::null ); m_config->writeEntry( "serverHistory", list ); } bool HostPreferences::showBrowsingPanel() { - m_config->setGroup( QString::null ); + m_config->setGroup( TQString::null ); return m_config->readBoolEntry( "browsingPanel" ); } -QStringList HostPreferences::serverCompletions() +TQStringList HostPreferences::serverCompletions() { - m_config->setGroup( QString::null ); + m_config->setGroup( TQString::null ); return m_config->readListEntry( "serverCompletions" ); } -QStringList HostPreferences::serverHistory() +TQStringList HostPreferences::serverHistory() { - m_config->setGroup( QString::null ); + m_config->setGroup( TQString::null ); return m_config->readListEntry( "serverHistory" ); } |