diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:33:34 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:33:34 +0000 |
commit | c663b6440964f6ac48027143ac9e63298991f9d0 (patch) | |
tree | 6d8b0c5a5f9db1ee16acf98b1397cea9126b281d /kcontrol/kio | |
parent | a061f7191beebb0e4a3b0c0a7c534ec5f22f2dc7 (diff) | |
download | tdebase-c663b6440964f6ac48027143ac9e63298991f9d0.tar.gz tdebase-c663b6440964f6ac48027143ac9e63298991f9d0.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1157639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kcontrol/kio')
34 files changed, 642 insertions, 642 deletions
diff --git a/kcontrol/kio/cache.cpp b/kcontrol/kio/cache.cpp index 8b730ae77..d98cba302 100644 --- a/kcontrol/kio/cache.cpp +++ b/kcontrol/kio/cache.cpp @@ -19,13 +19,13 @@ Boston, MA 02110-1301, USA. */ -#include <qlabel.h> -#include <qlayout.h> -#include <qcheckbox.h> -#include <qwhatsthis.h> -#include <qpushbutton.h> -#include <qbuttongroup.h> -#include <qradiobutton.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqcheckbox.h> +#include <tqwhatsthis.h> +#include <tqpushbutton.h> +#include <tqbuttongroup.h> +#include <tqradiobutton.h> #include <kdebug.h> #include <klocale.h> @@ -38,10 +38,10 @@ #include "cache.h" #include "cache_ui.h" -KCacheConfigDialog::KCacheConfigDialog( QWidget* parent ) +KCacheConfigDialog::KCacheConfigDialog( TQWidget* parent ) :KCModule( parent, "kcmkio" ) { - QVBoxLayout* mainLayout = new QVBoxLayout(this, 0, 0); + TQVBoxLayout* mainLayout = new TQVBoxLayout(this, 0, 0); m_dlg = new CacheDlgUI(this); mainLayout->addWidget(m_dlg); mainLayout->addStretch(); @@ -66,10 +66,10 @@ void KCacheConfigDialog::load() m_dlg->rbCacheIfPossible->setChecked( true ); // Config changed notifications... - connect ( m_dlg->cbUseCache, SIGNAL(toggled(bool)), SLOT(configChanged()) ); - connect ( m_dlg->bgCachePolicy, SIGNAL(clicked (int)), SLOT(configChanged()) ); - connect ( m_dlg->sbMaxCacheSize, SIGNAL(valueChanged(int)), SLOT(configChanged()) ); - connect ( m_dlg->pbClearCache, SIGNAL(clicked()), SLOT(slotClearCache()) ); + connect ( m_dlg->cbUseCache, TQT_SIGNAL(toggled(bool)), TQT_SLOT(configChanged()) ); + connect ( m_dlg->bgCachePolicy, TQT_SIGNAL(clicked (int)), TQT_SLOT(configChanged()) ); + connect ( m_dlg->sbMaxCacheSize, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(configChanged()) ); + connect ( m_dlg->pbClearCache, TQT_SIGNAL(clicked()), TQT_SLOT(slotClearCache()) ); emit changed( false ); } @@ -100,7 +100,7 @@ void KCacheConfigDialog::defaults() m_dlg->sbMaxCacheSize->setValue( DEFAULT_MAX_CACHE_SIZE ); } -QString KCacheConfigDialog::quickHelp() const +TQString KCacheConfigDialog::quickHelp() const { return i18n( "<h1>Cache</h1><p>This module lets you configure your cache settings.</p>" "<p>The cache is an internal memory in Konqueror where recently " diff --git a/kcontrol/kio/cache.h b/kcontrol/kio/cache.h index d2d12e5e2..07ff0a6c8 100644 --- a/kcontrol/kio/cache.h +++ b/kcontrol/kio/cache.h @@ -31,13 +31,13 @@ class KCacheConfigDialog : public KCModule Q_OBJECT public: - KCacheConfigDialog( QWidget* parent = 0 ); + KCacheConfigDialog( TQWidget* parent = 0 ); ~KCacheConfigDialog() {}; virtual void load(); virtual void save(); virtual void defaults(); - QString quickHelp() const; + TQString quickHelp() const; protected slots: void configChanged(); diff --git a/kcontrol/kio/fakeuaprovider.cpp b/kcontrol/kio/fakeuaprovider.cpp index 08949c27b..00a87567e 100644 --- a/kcontrol/kio/fakeuaprovider.cpp +++ b/kcontrol/kio/fakeuaprovider.cpp @@ -27,16 +27,16 @@ #include "fakeuaprovider.h" #define UA_PTOS(x) (*it)->property(x).toString() -#define QFL(x) QString::fromLatin1(x) +#define QFL(x) TQString::fromLatin1(x) FakeUASProvider::FakeUASProvider() { m_bIsDirty = true; } -FakeUASProvider::StatusCode FakeUASProvider::createNewUAProvider( const QString& uaStr ) +FakeUASProvider::StatusCode FakeUASProvider::createNewUAProvider( const TQString& uaStr ) { - QStringList split; + TQStringList split; int pos = (uaStr).find("::"); if ( pos == -1 ) @@ -50,7 +50,7 @@ FakeUASProvider::StatusCode FakeUASProvider::createNewUAProvider( const QString& } else { - split = QStringList::split("::", uaStr); + split = TQStringList::split("::", uaStr); } if ( m_lstIdentity.contains(split[1]) ) @@ -76,7 +76,7 @@ void FakeUASProvider::loadFromDesktopFiles() void FakeUASProvider::parseDescription() { - QString tmp; + TQString tmp; KTrader::OfferList::ConstIterator it = m_providers.begin(); KTrader::OfferList::ConstIterator lastItem = m_providers.end(); @@ -90,24 +90,24 @@ void FakeUASProvider::parseDescription() struct utsname utsn; uname( &utsn ); - tmp.replace( QFL("appSysName"), QString(utsn.sysname) ); - tmp.replace( QFL("appSysRelease"), QString(utsn.release) ); - tmp.replace( QFL("appMachineType"), QString(utsn.machine) ); + tmp.replace( QFL("appSysName"), TQString(utsn.sysname) ); + tmp.replace( QFL("appSysRelease"), TQString(utsn.release) ); + tmp.replace( QFL("appMachineType"), TQString(utsn.machine) ); - QStringList languageList = KGlobal::locale()->languageList(); + TQStringList languageList = KGlobal::locale()->languageList(); if ( languageList.count() ) { - QStringList::Iterator it = languageList.find( QString::fromLatin1("C") ); + TQStringList::Iterator it = languageList.find( TQString::fromLatin1("C") ); if( it != languageList.end() ) { - if( languageList.contains( QString::fromLatin1("en") ) > 0 ) + if( languageList.contains( TQString::fromLatin1("en") ) > 0 ) languageList.remove( it ); else - (*it) = QString::fromLatin1("en"); + (*it) = TQString::fromLatin1("en"); } } - tmp.replace( QFL("appLanguage"), QString("%1").arg(languageList.join(", ")) ); + tmp.replace( QFL("appLanguage"), TQString("%1").arg(languageList.join(", ")) ); tmp.replace( QFL("appPlatform"), QFL("X11") ); } @@ -117,12 +117,12 @@ void FakeUASProvider::parseDescription() m_lstIdentity << tmp; - tmp = QString("%1 %2").arg(UA_PTOS("X-KDE-UA-SYSNAME")).arg(UA_PTOS("X-KDE-UA-SYSRELEASE")); + tmp = TQString("%1 %2").arg(UA_PTOS("X-KDE-UA-SYSNAME")).arg(UA_PTOS("X-KDE-UA-SYSRELEASE")); if ( tmp.stripWhiteSpace().isEmpty() ) - tmp = QString("%1 %2").arg(UA_PTOS("X-KDE-UA-" + tmp = TQString("%1 %2").arg(UA_PTOS("X-KDE-UA-" "NAME")).arg(UA_PTOS("X-KDE-UA-VERSION")); else - tmp = QString("%1 %2 on %3").arg(UA_PTOS("X-KDE-UA-" + tmp = TQString("%1 %2 on %3").arg(UA_PTOS("X-KDE-UA-" "NAME")).arg(UA_PTOS("X-KDE-UA-VERSION")).arg(tmp); m_lstAlias << tmp; @@ -131,44 +131,44 @@ void FakeUASProvider::parseDescription() m_bIsDirty = false; } -QString FakeUASProvider::aliasStr( const QString& name ) +TQString FakeUASProvider::aliasStr( const TQString& name ) { int id = userAgentStringList().findIndex(name); if ( id == -1 ) - return QString::null; + return TQString::null; else return m_lstAlias[id]; } -QString FakeUASProvider::agentStr( const QString& name ) +TQString FakeUASProvider::agentStr( const TQString& name ) { int id = userAgentAliasList().findIndex(name); if ( id == -1 ) - return QString::null; + return TQString::null; else return m_lstIdentity[id]; } -QStringList FakeUASProvider::userAgentStringList() +TQStringList FakeUASProvider::userAgentStringList() { if ( m_bIsDirty ) { loadFromDesktopFiles(); if ( !m_providers.count() ) - return QStringList(); + return TQStringList(); parseDescription(); } return m_lstIdentity; } -QStringList FakeUASProvider::userAgentAliasList () +TQStringList FakeUASProvider::userAgentAliasList () { if ( m_bIsDirty ) { loadFromDesktopFiles(); if ( !m_providers.count() ) - return QStringList(); + return TQStringList(); parseDescription(); } return m_lstAlias; diff --git a/kcontrol/kio/fakeuaprovider.h b/kcontrol/kio/fakeuaprovider.h index fedf155bf..3e9f600dd 100644 --- a/kcontrol/kio/fakeuaprovider.h +++ b/kcontrol/kio/fakeuaprovider.h @@ -36,11 +36,11 @@ public: FakeUASProvider(); ~FakeUASProvider(){}; - StatusCode createNewUAProvider( const QString& ); - QString aliasStr( const QString& ); - QString agentStr( const QString& ); - QStringList userAgentStringList(); - QStringList userAgentAliasList(); + StatusCode createNewUAProvider( const TQString& ); + TQString aliasStr( const TQString& ); + TQString agentStr( const TQString& ); + TQStringList userAgentStringList(); + TQStringList userAgentAliasList(); bool isListDirty() const { return m_bIsDirty; } void setListDirty( bool dirty ) { m_bIsDirty = dirty; } @@ -50,8 +50,8 @@ protected: private: KTrader::OfferList m_providers; - QStringList m_lstIdentity; - QStringList m_lstAlias; + TQStringList m_lstIdentity; + TQStringList m_lstAlias; bool m_bIsDirty; }; #endif diff --git a/kcontrol/kio/kcookiesmain.cpp b/kcontrol/kio/kcookiesmain.cpp index f25a28011..8233f0d20 100644 --- a/kcontrol/kio/kcookiesmain.cpp +++ b/kcontrol/kio/kcookiesmain.cpp @@ -3,8 +3,8 @@ // First version of cookies configuration by Waldo Bastian <[email protected]> // This dialog box created by David Faure <[email protected]> -#include <qlayout.h> -#include <qtabwidget.h> +#include <tqlayout.h> +#include <tqtabwidget.h> #include <klocale.h> #include <kapplication.h> @@ -16,14 +16,14 @@ #include "kcookiespolicies.h" #include "kcookiesmanagement.h" -KCookiesMain::KCookiesMain(QWidget *parent) +KCookiesMain::KCookiesMain(TQWidget *parent) : KCModule(parent, "kcmkio") { management = 0; bool managerOK = true; DCOPReply reply = DCOPRef( "kded", "kded" ).call( "loadModule", - QCString( "kcookiejar" ) ); + TQCString( "kcookiejar" ) ); if( !reply.isValid() ) { @@ -34,19 +34,19 @@ KCookiesMain::KCookiesMain(QWidget *parent) "are stored on your computer.")); } - QVBoxLayout *layout = new QVBoxLayout(this); - tab = new QTabWidget(this); + TQVBoxLayout *layout = new TQVBoxLayout(this); + tab = new TQTabWidget(this); layout->addWidget(tab); policies = new KCookiesPolicies(this); tab->addTab(policies, i18n("&Policy")); - connect(policies, SIGNAL(changed(bool)), SIGNAL(changed(bool))); + connect(policies, TQT_SIGNAL(changed(bool)), TQT_SIGNAL(changed(bool))); if( managerOK ) { management = new KCookiesManagement(this); tab->addTab(management, i18n("&Management")); - connect(management, SIGNAL(changed(bool)), SIGNAL(changed(bool))); + connect(management, TQT_SIGNAL(changed(bool)), TQT_SIGNAL(changed(bool))); } } @@ -78,7 +78,7 @@ void KCookiesMain::defaults() management->defaults(); } -QString KCookiesMain::quickHelp() const +TQString KCookiesMain::quickHelp() const { return i18n("<h1>Cookies</h1> Cookies contain information that Konqueror" " (or other KDE applications using the HTTP protocol) stores on your" diff --git a/kcontrol/kio/kcookiesmain.h b/kcontrol/kio/kcookiesmain.h index fef111100..802f89c17 100644 --- a/kcontrol/kio/kcookiesmain.h +++ b/kcontrol/kio/kcookiesmain.h @@ -17,7 +17,7 @@ class KCookiesMain : public KCModule { Q_OBJECT public: - KCookiesMain(QWidget *parent = 0L); + KCookiesMain(TQWidget *parent = 0L); ~KCookiesMain(); KCookiesPolicies* policyDlg() { return policies; } @@ -25,11 +25,11 @@ public: virtual void load(); virtual void save(); virtual void defaults(); - virtual QString quickHelp() const; + virtual TQString quickHelp() const; private: - QTabWidget* tab; + TQTabWidget* tab; KCookiesPolicies* policies; KCookiesManagement* management; }; diff --git a/kcontrol/kio/kcookiesmanagement.cpp b/kcontrol/kio/kcookiesmanagement.cpp index 58e983439..f2cd45c42 100644 --- a/kcontrol/kio/kcookiesmanagement.cpp +++ b/kcontrol/kio/kcookiesmanagement.cpp @@ -19,15 +19,15 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qapplication.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qgroupbox.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qtimer.h> -#include <qdatetime.h> -#include <qtoolbutton.h> +#include <tqapplication.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqgroupbox.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqtimer.h> +#include <tqdatetime.h> +#include <tqtoolbutton.h> #include <kidna.h> #include <kdebug.h> @@ -49,24 +49,24 @@ struct CookieProp { - QString host; - QString name; - QString value; - QString domain; - QString path; - QString expireDate; - QString secure; + TQString host; + TQString name; + TQString value; + TQString domain; + TQString path; + TQString expireDate; + TQString secure; bool allLoaded; }; -CookieListViewItem::CookieListViewItem(QListView *parent, QString dom) - :QListViewItem(parent) +CookieListViewItem::CookieListViewItem(TQListView *parent, TQString dom) + :TQListViewItem(parent) { init( 0, dom ); } -CookieListViewItem::CookieListViewItem(QListViewItem *parent, CookieProp *cookie) - :QListViewItem(parent) +CookieListViewItem::CookieListViewItem(TQListViewItem *parent, CookieProp *cookie) + :TQListViewItem(parent) { init( cookie ); } @@ -76,7 +76,7 @@ CookieListViewItem::~CookieListViewItem() delete mCookie; } -void CookieListViewItem::init( CookieProp* cookie, QString domain, +void CookieListViewItem::init( CookieProp* cookie, TQString domain, bool cookieLoaded ) { mCookie = cookie; @@ -91,38 +91,38 @@ CookieProp* CookieListViewItem::leaveCookie() return ret; } -QString CookieListViewItem::text(int f) const +TQString CookieListViewItem::text(int f) const { if (mCookie) - return f == 0 ? QString::null : KIDNA::toUnicode(mCookie->host); + return f == 0 ? TQString::null : KIDNA::toUnicode(mCookie->host); else - return f == 0 ? KIDNA::toUnicode(mDomain) : QString::null; + return f == 0 ? KIDNA::toUnicode(mDomain) : TQString::null; } -KCookiesManagement::KCookiesManagement(QWidget *parent) +KCookiesManagement::KCookiesManagement(TQWidget *parent) : KCModule(parent, "kcmkio") { // Toplevel layout - QVBoxLayout* mainLayout = new QVBoxLayout(this, KDialog::marginHint(), + TQVBoxLayout* mainLayout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint()); dlg = new KCookiesManagementDlgUI (this); - dlg->tbClearSearchLine->setIconSet(SmallIconSet(QApplication::reverseLayout() ? "clear_left" : "locationbar_erase")); + dlg->tbClearSearchLine->setIconSet(SmallIconSet(TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase")); dlg->kListViewSearchLine->setListView(dlg->lvCookies); mainLayout->addWidget(dlg); dlg->lvCookies->setSorting(0); - connect(dlg->lvCookies, SIGNAL(expanded(QListViewItem*)), SLOT(getCookies(QListViewItem*)) ); - connect(dlg->lvCookies, SIGNAL(selectionChanged(QListViewItem*)), SLOT(showCookieDetails(QListViewItem*)) ); + connect(dlg->lvCookies, TQT_SIGNAL(expanded(TQListViewItem*)), TQT_SLOT(getCookies(TQListViewItem*)) ); + connect(dlg->lvCookies, TQT_SIGNAL(selectionChanged(TQListViewItem*)), TQT_SLOT(showCookieDetails(TQListViewItem*)) ); - connect(dlg->pbDelete, SIGNAL(clicked()), SLOT(deleteCookie())); - connect(dlg->pbDeleteAll, SIGNAL(clicked()), SLOT(deleteAllCookies())); - connect(dlg->pbReload, SIGNAL(clicked()), SLOT(getDomains())); - connect(dlg->pbPolicy, SIGNAL(clicked()), SLOT(doPolicy())); + connect(dlg->pbDelete, TQT_SIGNAL(clicked()), TQT_SLOT(deleteCookie())); + connect(dlg->pbDeleteAll, TQT_SIGNAL(clicked()), TQT_SLOT(deleteAllCookies())); + connect(dlg->pbReload, TQT_SIGNAL(clicked()), TQT_SLOT(getDomains())); + connect(dlg->pbPolicy, TQT_SIGNAL(clicked()), TQT_SLOT(doPolicy())); - connect(dlg->lvCookies, SIGNAL(doubleClicked (QListViewItem *)), SLOT(doPolicy())); + connect(dlg->lvCookies, TQT_SIGNAL(doubleClicked (TQListViewItem *)), TQT_SLOT(doPolicy())); deletedCookies.setAutoDelete(true); m_bDeleteAll = false; mainWidget = parent; @@ -147,8 +147,8 @@ void KCookiesManagement::save() { if(!DCOPRef("kded", "kcookiejar").send("deleteAllCookies")) { - QString caption = i18n ("DCOP Communication Error"); - QString message = i18n ("Unable to delete all the cookies as requested."); + TQString caption = i18n ("DCOP Communication Error"); + TQString message = i18n ("Unable to delete all the cookies as requested."); KMessageBox::sorry (this, message,caption); return; } @@ -156,19 +156,19 @@ void KCookiesManagement::save() } // Certain groups of cookies were deleted... - QStringList::Iterator dIt = deletedDomains.begin(); + TQStringList::Iterator dIt = deletedDomains.begin(); while( dIt != deletedDomains.end() ) { - QByteArray call; - QByteArray reply; - QCString replyType; - QDataStream callStream(call, IO_WriteOnly); + TQByteArray call; + TQByteArray reply; + TQCString replyType; + TQDataStream callStream(call, IO_WriteOnly); callStream << *dIt; if( !DCOPRef("kded", "kcookiejar").send("deleteCookiesFromDomain", (*dIt)) ) { - QString caption = i18n ("DCOP Communication Error"); - QString message = i18n ("Unable to delete cookies as requested."); + TQString caption = i18n ("DCOP Communication Error"); + TQString message = i18n ("Unable to delete cookies as requested."); KMessageBox::sorry (this, message,caption); return; } @@ -178,12 +178,12 @@ void KCookiesManagement::save() // Individual cookies were deleted... bool success = true; // Maybe we can go on... - QDictIterator<CookiePropList> cookiesDom(deletedCookies); + TQDictIterator<CookiePropList> cookiesDom(deletedCookies); while(cookiesDom.current()) { CookiePropList *list = cookiesDom.current(); - QPtrListIterator<CookieProp> cookie(*list); + TQPtrListIterator<CookieProp> cookie(*list); while(*cookie) { @@ -236,7 +236,7 @@ void KCookiesManagement::clearCookieDetails() dlg->leSecure->clear(); } -QString KCookiesManagement::quickHelp() const +TQString KCookiesManagement::quickHelp() const { return i18n("<h1>Cookies Management Quick Help</h1>" ); } @@ -247,14 +247,14 @@ void KCookiesManagement::getDomains() if( !reply.isValid() ) { - QString caption = i18n ("Information Lookup Failure"); - QString message = i18n ("Unable to retrieve information about the " + TQString caption = i18n ("Information Lookup Failure"); + TQString message = i18n ("Unable to retrieve information about the " "cookies stored on your computer."); KMessageBox::sorry (this, message, caption); return; } - QStringList domains = reply; + TQStringList domains = reply; if ( dlg->lvCookies->childCount() ) { @@ -263,7 +263,7 @@ void KCookiesManagement::getDomains() } CookieListViewItem *dom; - for(QStringList::Iterator dIt = domains.begin(); dIt != domains.end(); dIt++) + for(TQStringList::Iterator dIt = domains.begin(); dIt != domains.end(); dIt++) { dom = new CookieListViewItem(dlg->lvCookies, *dIt); dom->setExpandable(true); @@ -273,25 +273,25 @@ void KCookiesManagement::getDomains() dlg->pbDeleteAll->setEnabled(dlg->lvCookies->childCount()); } -void KCookiesManagement::getCookies(QListViewItem *cookieDom) +void KCookiesManagement::getCookies(TQListViewItem *cookieDom) { CookieListViewItem* ckd = static_cast<CookieListViewItem*>(cookieDom); if ( ckd->cookiesLoaded() ) return; - QValueList<int> fields; + TQValueList<int> fields; fields << 0 << 1 << 2 << 3; DCOPReply reply = DCOPRef ("kded", "kcookiejar").call ("findCookies", - DCOPArg(fields, "QValueList<int>"), + DCOPArg(fields, "TQValueList<int>"), ckd->domain(), - QString::null, - QString::null, - QString::null); + TQString::null, + TQString::null, + TQString::null); if(reply.isValid()) { - QStringList fieldVal = reply; - QStringList::Iterator fIt = fieldVal.begin(); + TQStringList fieldVal = reply; + TQStringList::Iterator fIt = fieldVal.begin(); while(fIt != fieldVal.end()) { @@ -310,11 +310,11 @@ void KCookiesManagement::getCookies(QListViewItem *cookieDom) bool KCookiesManagement::cookieDetails(CookieProp *cookie) { - QValueList<int> fields; + TQValueList<int> fields; fields << 4 << 5 << 7; DCOPReply reply = DCOPRef ("kded", "kcookiejar").call ("findCookies", - DCOPArg(fields, "QValueList<int>"), + DCOPArg(fields, "TQValueList<int>"), cookie->domain, cookie->host, cookie->path, @@ -322,9 +322,9 @@ bool KCookiesManagement::cookieDetails(CookieProp *cookie) if( !reply.isValid() ) return false; - QStringList fieldVal = reply; + TQStringList fieldVal = reply; - QStringList::Iterator c = fieldVal.begin(); + TQStringList::Iterator c = fieldVal.begin(); cookie->value = *c++; unsigned tmp = (*c++).toUInt(); @@ -332,7 +332,7 @@ bool KCookiesManagement::cookieDetails(CookieProp *cookie) cookie->expireDate = i18n("End of session"); else { - QDateTime expDate; + TQDateTime expDate; expDate.setTime_t(tmp); cookie->expireDate = KGlobal::locale()->formatDateTime(expDate); } @@ -343,7 +343,7 @@ bool KCookiesManagement::cookieDetails(CookieProp *cookie) return true; } -void KCookiesManagement::showCookieDetails(QListViewItem* item) +void KCookiesManagement::showCookieDetails(TQListViewItem* item) { kdDebug () << "::showCookieDetails... " << endl; CookieProp *cookie = static_cast<CookieListViewItem*>(item)->cookie(); @@ -379,7 +379,7 @@ void KCookiesManagement::doPolicy() { CookieProp *cookie = item->cookie(); - QString domain = cookie->domain; + TQString domain = cookie->domain; if( domain.isEmpty() ) { @@ -402,7 +402,7 @@ void KCookiesManagement::doPolicy() } -void KCookiesManagement::deleteCookie(QListViewItem* deleteItem) +void KCookiesManagement::deleteCookie(TQListViewItem* deleteItem) { CookieListViewItem *item = static_cast<CookieListViewItem*>( deleteItem ); if( item->cookie() ) @@ -433,7 +433,7 @@ void KCookiesManagement::deleteCookie() { deleteCookie(dlg->lvCookies->currentItem()); - QListViewItem* currentItem = dlg->lvCookies->currentItem(); + TQListViewItem* currentItem = dlg->lvCookies->currentItem(); if ( currentItem ) { @@ -461,7 +461,7 @@ void KCookiesManagement::deleteAllCookies() } else { - QListViewItem* item = dlg->lvCookies->firstChild(); + TQListViewItem* item = dlg->lvCookies->firstChild(); while (item) { diff --git a/kcontrol/kio/kcookiesmanagement.h b/kcontrol/kio/kcookiesmanagement.h index 636be0ed3..cd7f4c62a 100644 --- a/kcontrol/kio/kcookiesmanagement.h +++ b/kcontrol/kio/kcookiesmanagement.h @@ -24,9 +24,9 @@ #ifndef __KCOOKIESMANAGEMENT_H #define __KCOOKIESMANAGEMENT_H -#include <qdict.h> -#include <qstringlist.h> -#include <qlistview.h> +#include <tqdict.h> +#include <tqstringlist.h> +#include <tqlistview.h> #include <kcmodule.h> @@ -39,23 +39,23 @@ struct CookieProp; class CookieListViewItem : public QListViewItem { public: - CookieListViewItem(QListView *parent, QString dom); - CookieListViewItem(QListViewItem *parent, CookieProp *cookie); + CookieListViewItem(TQListView *parent, TQString dom); + CookieListViewItem(TQListViewItem *parent, CookieProp *cookie); ~CookieListViewItem(); - QString domain() const { return mDomain; } + TQString domain() const { return mDomain; } CookieProp* cookie() const { return mCookie; } CookieProp* leaveCookie(); void setCookiesLoaded() { mCookiesLoaded = true; } bool cookiesLoaded() const { return mCookiesLoaded; } - virtual QString text(int f) const; + virtual TQString text(int f) const; private: void init( CookieProp* cookie, - QString domain = QString::null, + TQString domain = TQString::null, bool cookieLoaded=false ); CookieProp *mCookie; - QString mDomain; + TQString mDomain; bool mCookiesLoaded; }; @@ -64,25 +64,25 @@ class KCookiesManagement : public KCModule Q_OBJECT public: - KCookiesManagement(QWidget *parent = 0 ); + KCookiesManagement(TQWidget *parent = 0 ); ~KCookiesManagement(); virtual void load(); virtual void save(); virtual void defaults(); - virtual QString quickHelp() const; + virtual TQString quickHelp() const; private slots: void deleteCookie(); void deleteAllCookies(); void getDomains(); - void getCookies(QListViewItem*); - void showCookieDetails(QListViewItem*); + void getCookies(TQListViewItem*); + void showCookieDetails(TQListViewItem*); void doPolicy(); private: void reset (); - void deleteCookie(QListViewItem*); + void deleteCookie(TQListViewItem*); bool cookieDetails(CookieProp *cookie); void clearCookieDetails(); bool policyenabled(); @@ -90,12 +90,12 @@ private: private: bool m_bDeleteAll; - QWidget* mainWidget; + TQWidget* mainWidget; KCookiesManagementDlgUI* dlg; - QStringList deletedDomains; - typedef QPtrList<CookieProp> CookiePropList; - QDict<CookiePropList> deletedCookies; + TQStringList deletedDomains; + typedef TQPtrList<CookieProp> CookiePropList; + TQDict<CookiePropList> deletedCookies; }; #endif // __KCOOKIESMANAGEMENT_H diff --git a/kcontrol/kio/kcookiespolicies.cpp b/kcontrol/kio/kcookiespolicies.cpp index 7ee302ec1..63f4dd21a 100644 --- a/kcontrol/kio/kcookiespolicies.cpp +++ b/kcontrol/kio/kcookiespolicies.cpp @@ -22,15 +22,15 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qheader.h> -#include <qvbox.h> -#include <qlayout.h> -#include <qcheckbox.h> -#include <qwhatsthis.h> -#include <qpushbutton.h> -#include <qradiobutton.h> -#include <qtoolbutton.h> -#include <qvbuttongroup.h> +#include <tqheader.h> +#include <tqvbox.h> +#include <tqlayout.h> +#include <tqcheckbox.h> +#include <tqwhatsthis.h> +#include <tqpushbutton.h> +#include <tqradiobutton.h> +#include <tqtoolbutton.h> +#include <tqvbuttongroup.h> #include <kiconloader.h> #include <kidna.h> @@ -46,18 +46,18 @@ #include "kcookiespolicies.h" #include "kcookiespoliciesdlg_ui.h" -KCookiesPolicies::KCookiesPolicies(QWidget *parent) +KCookiesPolicies::KCookiesPolicies(TQWidget *parent) :KCModule(parent, "kcmkio") { - QVBoxLayout *mainLayout = new QVBoxLayout(this, 0, 0); + TQVBoxLayout *mainLayout = new TQVBoxLayout(this, 0, 0); dlg = new KCookiesPolicyDlgUI (this); dlg->lvDomainPolicy->header()->setStretchEnabled(true, 0); dlg->lvDomainPolicy->setColumnWidthMode(0, KListView::Manual); dlg->lvDomainPolicy->setColumnWidthMode(1, KListView::Maximum); - dlg->tbClearSearchLine->setIconSet(SmallIconSet(QApplication::reverseLayout() ? "clear_left" : "locationbar_erase")); + dlg->tbClearSearchLine->setIconSet(SmallIconSet(TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase")); dlg->kListViewSearchLine->setListView(dlg->lvDomainPolicy); - QValueList<int> columns; + TQValueList<int> columns; columns.append(0); dlg->kListViewSearchLine->setSearchColumns(columns); @@ -107,7 +107,7 @@ void KCookiesPolicies::autoAcceptSessionCookies ( bool enable ) dlg->gbDomainSpecific->setEnabled( !enable ); } -void KCookiesPolicies::addNewPolicy(const QString& domain) +void KCookiesPolicies::addNewPolicy(const TQString& domain) { PolicyDlg pdlg (i18n("New Cookie Policy"), this); pdlg.setEnableHostEdit (true, domain); @@ -119,13 +119,13 @@ void KCookiesPolicies::addNewPolicy(const QString& domain) if (pdlg.exec() && !pdlg.domain().isEmpty()) { - QString domain = KIDNA::toUnicode(pdlg.domain()); + TQString domain = KIDNA::toUnicode(pdlg.domain()); int advice = pdlg.advice(); if ( !handleDuplicate(domain, advice) ) { const char* strAdvice = KCookieAdvice::adviceToStr(advice); - QListViewItem* index = new QListViewItem (dlg->lvDomainPolicy, + TQListViewItem* index = new TQListViewItem (dlg->lvDomainPolicy, domain, i18n(strAdvice)); m_pDomainPolicy.insert (index, strAdvice); configChanged(); @@ -136,17 +136,17 @@ void KCookiesPolicies::addNewPolicy(const QString& domain) void KCookiesPolicies::addPressed() { - addNewPolicy (QString::null); + addNewPolicy (TQString::null); } void KCookiesPolicies::changePressed() { - QListViewItem* index = dlg->lvDomainPolicy->currentItem(); + TQListViewItem* index = dlg->lvDomainPolicy->currentItem(); if (!index) return; - QString oldDomain = index->text(0); + TQString oldDomain = index->text(0); PolicyDlg pdlg (i18n("Change Cookie Policy"), this); pdlg.setPolicy (KCookieAdvice::strToAdvice(m_pDomainPolicy[index])); @@ -154,7 +154,7 @@ void KCookiesPolicies::changePressed() if( pdlg.exec() && !pdlg.domain().isEmpty()) { - QString newDomain = KIDNA::toUnicode(pdlg.domain()); + TQString newDomain = KIDNA::toUnicode(pdlg.domain()); int advice = pdlg.advice(); if (newDomain == oldDomain || !handleDuplicate(newDomain, advice)) { @@ -166,14 +166,14 @@ void KCookiesPolicies::changePressed() } } -bool KCookiesPolicies::handleDuplicate( const QString& domain, int advice ) +bool KCookiesPolicies::handleDuplicate( const TQString& domain, int advice ) { - QListViewItem* item = dlg->lvDomainPolicy->firstChild(); + TQListViewItem* item = dlg->lvDomainPolicy->firstChild(); while ( item != 0 ) { if ( item->text(0) == domain ) { - QString msg = i18n("<qt>A policy already exists for" + TQString msg = i18n("<qt>A policy already exists for" "<center><b>%1</b></center>" "Do you want to replace it?</qt>").arg(domain); int res = KMessageBox::warningContinueCancel(this, msg, @@ -197,8 +197,8 @@ bool KCookiesPolicies::handleDuplicate( const QString& domain, int advice ) void KCookiesPolicies::deletePressed() { - QListViewItem* nextItem = 0L; - QListViewItem* item = dlg->lvDomainPolicy->firstChild (); + TQListViewItem* nextItem = 0L; + TQListViewItem* item = dlg->lvDomainPolicy->firstChild (); while (item != 0L) { @@ -241,21 +241,21 @@ void KCookiesPolicies::updateButtons() dlg->pbDeleteAll->setEnabled ( hasItems ); } -void KCookiesPolicies::updateDomainList(const QStringList &domainConfig) +void KCookiesPolicies::updateDomainList(const TQStringList &domainConfig) { dlg->lvDomainPolicy->clear(); - QStringList::ConstIterator it = domainConfig.begin(); + TQStringList::ConstIterator it = domainConfig.begin(); for (; it != domainConfig.end(); ++it) { - QString domain; + TQString domain; KCookieAdvice::Value advice = KCookieAdvice::Dunno; splitDomainAdvice(*it, domain, advice); if (!domain.isEmpty()) { - QListViewItem* index = new QListViewItem( dlg->lvDomainPolicy, KIDNA::toUnicode(domain), + TQListViewItem* index = new TQListViewItem( dlg->lvDomainPolicy, KIDNA::toUnicode(domain), i18n(KCookieAdvice::adviceToStr(advice)) ); m_pDomainPolicy[index] = KCookieAdvice::adviceToStr(advice); } @@ -264,7 +264,7 @@ void KCookiesPolicies::updateDomainList(const QStringList &domainConfig) void KCookiesPolicies::selectionChanged () { - QListViewItem* item = dlg->lvDomainPolicy->firstChild (); + TQListViewItem* item = dlg->lvDomainPolicy->firstChild (); d_itemsSelected = 0; @@ -323,40 +323,40 @@ void KCookiesPolicies::load() } // Connect the main swicth :) Enable/disable cookie support - connect( dlg->cbEnableCookies, SIGNAL( toggled(bool) ), - SLOT( cookiesEnabled(bool) ) ); - connect( dlg->cbEnableCookies, SIGNAL( toggled(bool) ), - SLOT( configChanged() ) ); + connect( dlg->cbEnableCookies, TQT_SIGNAL( toggled(bool) ), + TQT_SLOT( cookiesEnabled(bool) ) ); + connect( dlg->cbEnableCookies, TQT_SIGNAL( toggled(bool) ), + TQT_SLOT( configChanged() ) ); // Connect the preference check boxes... - connect ( dlg->cbRejectCrossDomainCookies, SIGNAL(clicked()), - SLOT(configChanged())); - connect ( dlg->cbAutoAcceptSessionCookies, SIGNAL(toggled(bool)), - SLOT(configChanged())); - connect ( dlg->cbIgnoreCookieExpirationDate, SIGNAL(toggled(bool)), - SLOT(configChanged())); - - connect ( dlg->cbAutoAcceptSessionCookies, SIGNAL(toggled(bool)), - SLOT(autoAcceptSessionCookies(bool))); - connect ( dlg->cbIgnoreCookieExpirationDate, SIGNAL(toggled(bool)), - SLOT(ignoreCookieExpirationDate(bool))); + connect ( dlg->cbRejectCrossDomainCookies, TQT_SIGNAL(clicked()), + TQT_SLOT(configChanged())); + connect ( dlg->cbAutoAcceptSessionCookies, TQT_SIGNAL(toggled(bool)), + TQT_SLOT(configChanged())); + connect ( dlg->cbIgnoreCookieExpirationDate, TQT_SIGNAL(toggled(bool)), + TQT_SLOT(configChanged())); + + connect ( dlg->cbAutoAcceptSessionCookies, TQT_SIGNAL(toggled(bool)), + TQT_SLOT(autoAcceptSessionCookies(bool))); + connect ( dlg->cbIgnoreCookieExpirationDate, TQT_SIGNAL(toggled(bool)), + TQT_SLOT(ignoreCookieExpirationDate(bool))); // Connect the default cookie policy radio buttons... - connect(dlg->bgDefault, SIGNAL(clicked(int)), SLOT(configChanged())); + connect(dlg->bgDefault, TQT_SIGNAL(clicked(int)), TQT_SLOT(configChanged())); // Connect signals from the domain specific policy listview. - connect( dlg->lvDomainPolicy, SIGNAL(selectionChanged()), - SLOT(selectionChanged()) ); - connect( dlg->lvDomainPolicy, SIGNAL(doubleClicked (QListViewItem *)), - SLOT(changePressed() ) ); - connect( dlg->lvDomainPolicy, SIGNAL(returnPressed ( QListViewItem * )), - SLOT(changePressed() ) ); + connect( dlg->lvDomainPolicy, TQT_SIGNAL(selectionChanged()), + TQT_SLOT(selectionChanged()) ); + connect( dlg->lvDomainPolicy, TQT_SIGNAL(doubleClicked (TQListViewItem *)), + TQT_SLOT(changePressed() ) ); + connect( dlg->lvDomainPolicy, TQT_SIGNAL(returnPressed ( TQListViewItem * )), + TQT_SLOT(changePressed() ) ); // Connect the buttons... - connect( dlg->pbNew, SIGNAL(clicked()), SLOT( addPressed() ) ); - connect( dlg->pbChange, SIGNAL( clicked() ), SLOT( changePressed() ) ); - connect( dlg->pbDelete, SIGNAL( clicked() ), SLOT( deletePressed() ) ); - connect( dlg->pbDeleteAll, SIGNAL( clicked() ), SLOT( deleteAllPressed() ) ); + connect( dlg->pbNew, TQT_SIGNAL(clicked()), TQT_SLOT( addPressed() ) ); + connect( dlg->pbChange, TQT_SIGNAL( clicked() ), TQT_SLOT( changePressed() ) ); + connect( dlg->pbDelete, TQT_SIGNAL( clicked() ), TQT_SLOT( deletePressed() ) ); + connect( dlg->pbDeleteAll, TQT_SIGNAL( clicked() ), TQT_SLOT( deleteAllPressed() ) ); } void KCookiesPolicies::save() @@ -377,7 +377,7 @@ void KCookiesPolicies::save() state = dlg->cbIgnoreCookieExpirationDate->isChecked(); cfg.writeEntry( "IgnoreExpirationDate", state ); - QString advice; + TQString advice; if (dlg->rbPolicyAccept->isChecked()) advice = KCookieAdvice::adviceToStr(KCookieAdvice::Accept); else if (dlg->rbPolicyReject->isChecked()) @@ -387,12 +387,12 @@ void KCookiesPolicies::save() cfg.writeEntry("CookieGlobalAdvice", advice); - QStringList domainConfig; - QListViewItem *at = dlg->lvDomainPolicy->firstChild(); + TQStringList domainConfig; + TQListViewItem *at = dlg->lvDomainPolicy->firstChild(); while( at ) { - domainConfig.append(QString::fromLatin1("%1:%2").arg(KIDNA::toAscii(at->text(0))).arg(m_pDomainPolicy[at])); + domainConfig.append(TQString::fromLatin1("%1:%2").arg(KIDNA::toAscii(at->text(0))).arg(m_pDomainPolicy[at])); at = at->nextSibling(); } @@ -431,7 +431,7 @@ void KCookiesPolicies::defaults() updateButtons(); } -void KCookiesPolicies::splitDomainAdvice (const QString& cfg, QString &domain, +void KCookiesPolicies::splitDomainAdvice (const TQString& cfg, TQString &domain, KCookieAdvice::Value &advice) { int sepPos = cfg.findRev(':'); @@ -444,7 +444,7 @@ void KCookiesPolicies::splitDomainAdvice (const QString& cfg, QString &domain, advice = KCookieAdvice::strToAdvice( cfg.mid( sepPos+1 ) ); } -QString KCookiesPolicies::quickHelp() const +TQString KCookiesPolicies::quickHelp() const { return i18n("<h1>Cookies</h1> Cookies contain information that Konqueror" " (or any other KDE application using the HTTP protocol) stores" diff --git a/kcontrol/kio/kcookiespolicies.h b/kcontrol/kio/kcookiespolicies.h index 5b2eaf086..b6f1de2e0 100644 --- a/kcontrol/kio/kcookiespolicies.h +++ b/kcontrol/kio/kcookiespolicies.h @@ -26,7 +26,7 @@ #ifndef __KCOOKIESPOLICIES_H #define __KCOOKIESPOLICIES_H -#include <qmap.h> +#include <tqmap.h> #include <kcmodule.h> #include "policydlg.h" @@ -41,15 +41,15 @@ class KCookiesPolicies : public KCModule Q_OBJECT public: - KCookiesPolicies(QWidget *parent = 0); + KCookiesPolicies(TQWidget *parent = 0); ~KCookiesPolicies(); virtual void load(); virtual void save(); virtual void defaults(); - virtual QString quickHelp() const; + virtual TQString quickHelp() const; - void addNewPolicy(const QString& domain); + void addNewPolicy(const TQString& domain); protected slots: void autoAcceptSessionCookies ( bool ); @@ -66,16 +66,16 @@ protected slots: void addPressed(); private: - void updateDomainList(const QStringList& list); - bool handleDuplicate( const QString& domain, int ); - void splitDomainAdvice (const QString& configStr, QString &domain, + void updateDomainList(const TQStringList& list); + bool handleDuplicate( const TQString& domain, int ); + void splitDomainAdvice (const TQString& configStr, TQString &domain, KCookieAdvice::Value &advice); private: int d_itemsSelected; bool d_configChanged; KCookiesPolicyDlgUI* dlg; - QMap<QListViewItem*, const char*> m_pDomainPolicy; + TQMap<TQListViewItem*, const char*> m_pDomainPolicy; }; #endif // __KCOOKIESPOLICIES_H diff --git a/kcontrol/kio/kenvvarproxydlg.cpp b/kcontrol/kio/kenvvarproxydlg.cpp index eaad2b1b6..22accb4e9 100644 --- a/kcontrol/kio/kenvvarproxydlg.cpp +++ b/kcontrol/kio/kenvvarproxydlg.cpp @@ -21,11 +21,11 @@ #include <stdlib.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qcheckbox.h> -#include <qwhatsthis.h> -#include <qpushbutton.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqcheckbox.h> +#include <tqwhatsthis.h> +#include <tqpushbutton.h> #include <kdebug.h> #include <klocale.h> @@ -42,16 +42,16 @@ #define NO_PROXY "NO_PROXY,no_proxy" -static QString getProxyEnv(const QString& var) +static TQString getProxyEnv(const TQString& var) { - return QString::fromLocal8Bit(::getenv(var.local8Bit().data())); + return TQString::fromLocal8Bit(::getenv(var.local8Bit().data())); } -static bool autoDetectProxySetting(const QString& type, QString& proxyEnv) +static bool autoDetectProxySetting(const TQString& type, TQString& proxyEnv) { - QStringList list = QStringList::split( ',', type); - QStringList::ConstIterator it = list.begin(); - QStringList::ConstIterator end = list.end(); + TQStringList list = TQStringList::split( ',', type); + TQStringList::ConstIterator it = list.begin(); + TQStringList::ConstIterator end = list.end(); for(; it != end; ++it) { @@ -65,7 +65,7 @@ static bool autoDetectProxySetting(const QString& type, QString& proxyEnv) return false; } -KEnvVarProxyDlg::KEnvVarProxyDlg( QWidget* parent, const char* name ) +KEnvVarProxyDlg::KEnvVarProxyDlg( TQWidget* parent, const char* name ) :KProxyDialogBase( parent, name, true, i18n( "Variable Proxy Configuration" ) ) { @@ -83,9 +83,9 @@ void KEnvVarProxyDlg::init() { m_bHasValidData = false; - connect( mDlg->cbShowValue, SIGNAL( clicked() ), SLOT( showValuePressed() ) ); - connect( mDlg->pbVerify, SIGNAL( clicked() ), SLOT( verifyPressed() ) ); - connect( mDlg->pbDetect, SIGNAL( clicked() ), SLOT( autoDetectPressed() ) ); + connect( mDlg->cbShowValue, TQT_SIGNAL( clicked() ), TQT_SLOT( showValuePressed() ) ); + connect( mDlg->pbVerify, TQT_SIGNAL( clicked() ), TQT_SLOT( verifyPressed() ) ); + connect( mDlg->pbDetect, TQT_SIGNAL( clicked() ), TQT_SLOT( autoDetectPressed() ) ); } void KEnvVarProxyDlg::setProxyData( const KProxyData& data ) @@ -103,7 +103,7 @@ void KEnvVarProxyDlg::setProxyData( const KProxyData& data ) mEnvVarsMap["ftp"] = data.proxyList["ftp"]; // Setup NO Proxy For... - QString noProxyFor = data.noProxyFor.join(""); + TQString noProxyFor = data.noProxyFor.join(""); if (!getProxyEnv(noProxyFor).isEmpty()) mEnvVarsMap["noProxy"] = noProxyFor; @@ -133,10 +133,10 @@ void KEnvVarProxyDlg::verifyPressed() { if ( !validate() ) { - QString msg = i18n("You must specify at least one valid proxy " + TQString msg = i18n("You must specify at least one valid proxy " "environment variable."); - QString details = i18n("<qt>Make sure you entered the actual environment " + TQString details = i18n("<qt>Make sure you entered the actual environment " "variable name rather than its value. For " "example, if the environment variable is <br><b>" "HTTP_PROXY=http://localhost:3128</b><br> you need " @@ -163,24 +163,24 @@ void KEnvVarProxyDlg::autoDetectPressed() setHighLight (mDlg->lbNoProxy, false); // Detect HTTP proxy settings... - found |= autoDetectProxySetting (QString::fromLatin1(ENV_HTTP_PROXY), mEnvVarsMap["http"]); + found |= autoDetectProxySetting (TQString::fromLatin1(ENV_HTTP_PROXY), mEnvVarsMap["http"]); // Detect HTTPS proxy settings... - found |= autoDetectProxySetting (QString::fromLatin1(ENV_HTTPS_PROXY), mEnvVarsMap["https"]); + found |= autoDetectProxySetting (TQString::fromLatin1(ENV_HTTPS_PROXY), mEnvVarsMap["https"]); // Detect FTP proxy settings... - found |= autoDetectProxySetting (QString::fromLatin1(ENV_FTP_PROXY), mEnvVarsMap["ftp"]); + found |= autoDetectProxySetting (TQString::fromLatin1(ENV_FTP_PROXY), mEnvVarsMap["ftp"]); // Detect the NO_PROXY settings... - found |= autoDetectProxySetting (QString::fromLatin1(NO_PROXY), mEnvVarsMap["noProxy"]); + found |= autoDetectProxySetting (TQString::fromLatin1(NO_PROXY), mEnvVarsMap["noProxy"]); if ( !found ) { - QString msg = i18n("Did not detect any environment variables " + TQString msg = i18n("Did not detect any environment variables " "commonly used to set system wide proxy " "information."); - QString details = i18n("<qt>To learn about the variable names the " + TQString details = i18n("<qt>To learn about the variable names the " "automatic detection process searches for, " "press OK, click on the quick help button " "on the window title bar of the " @@ -197,7 +197,7 @@ void KEnvVarProxyDlg::autoDetectPressed() void KEnvVarProxyDlg::updateVariables() { - QString text = mDlg->leHttp->text(); + TQString text = mDlg->leHttp->text(); if (mEnvVarsMap["http"] != text) mEnvVarsMap["http"] = text; @@ -258,22 +258,22 @@ bool KEnvVarProxyDlg::validate(bool erase) bool notFound = getProxyEnv(mEnvVarsMap["http"]).isEmpty(); m_bHasValidData |= !notFound; setHighLight (mDlg->lbHttp, notFound); - if(notFound && erase) mEnvVarsMap["http"] = QString::null; + if(notFound && erase) mEnvVarsMap["http"] = TQString::null; notFound = getProxyEnv(mEnvVarsMap["https"]).isEmpty(); m_bHasValidData |= !notFound; setHighLight (mDlg->lbHttps, notFound); - if(notFound && erase) mEnvVarsMap["https"] = QString::null; + if(notFound && erase) mEnvVarsMap["https"] = TQString::null; notFound = getProxyEnv(mEnvVarsMap["ftp"]).isEmpty(); m_bHasValidData |= !notFound; setHighLight (mDlg->lbFtp, notFound); - if(notFound && erase) mEnvVarsMap["ftp"] = QString::null; + if(notFound && erase) mEnvVarsMap["ftp"] = TQString::null; notFound = getProxyEnv(mEnvVarsMap["noProxy"]).isEmpty(); m_bHasValidData |= !notFound; setHighLight (mDlg->lbNoProxy, notFound); - if(notFound && erase) mEnvVarsMap["noProxy"] = QString::null; + if(notFound && erase) mEnvVarsMap["noProxy"] = TQString::null; return m_bHasValidData; } @@ -282,10 +282,10 @@ void KEnvVarProxyDlg::slotOk() { if(!validate(true)) { - QString msg = i18n("You must specify at least one valid proxy " + TQString msg = i18n("You must specify at least one valid proxy " "environment variable."); - QString details = i18n("<qt>Make sure you entered the actual environment " + TQString details = i18n("<qt>Make sure you entered the actual environment " "variable name rather than its value. For " "example, if the environment variable is <br><b>" "HTTP_PROXY=http://localhost:3128</b><br> you need " diff --git a/kcontrol/kio/kenvvarproxydlg.h b/kcontrol/kio/kenvvarproxydlg.h index bf4c073a6..3ddbc989f 100644 --- a/kcontrol/kio/kenvvarproxydlg.h +++ b/kcontrol/kio/kenvvarproxydlg.h @@ -21,7 +21,7 @@ #ifndef KENVVAR_PROXY_DIALOG_H #define KENVVAR_PROXY_DIALOG_H -#include <qmap.h> +#include <tqmap.h> #include "kproxydlgbase.h" @@ -32,7 +32,7 @@ class KEnvVarProxyDlg : public KProxyDialogBase Q_OBJECT public: - KEnvVarProxyDlg( QWidget* parent = 0, const char* name = 0 ); + KEnvVarProxyDlg( TQWidget* parent = 0, const char* name = 0 ); ~KEnvVarProxyDlg(); virtual const KProxyData data() const; @@ -52,6 +52,6 @@ protected: private: EnvVarProxyDlgUI* mDlg; - QMap<QString, QString> mEnvVarsMap; + TQMap<TQString, TQString> mEnvVarsMap; }; #endif diff --git a/kcontrol/kio/kmanualproxydlg.cpp b/kcontrol/kio/kmanualproxydlg.cpp index 9a3df6afb..92e8a98e6 100644 --- a/kcontrol/kio/kmanualproxydlg.cpp +++ b/kcontrol/kio/kmanualproxydlg.cpp @@ -19,12 +19,12 @@ Boston, MA 02110-1301, USA. */ -#include <qlabel.h> -#include <qlayout.h> -#include <qspinbox.h> -#include <qcheckbox.h> -#include <qwhatsthis.h> -#include <qpushbutton.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqspinbox.h> +#include <tqcheckbox.h> +#include <tqwhatsthis.h> +#include <tqpushbutton.h> #include <kdebug.h> #include <klocale.h> @@ -42,7 +42,7 @@ #include "kmanualproxydlg.h" -KManualProxyDlg::KManualProxyDlg( QWidget* parent, const char* name ) +KManualProxyDlg::KManualProxyDlg( TQWidget* parent, const char* name ) :KProxyDialogBase( parent, name, true, i18n("Manual Proxy Configuration") ) { @@ -50,7 +50,7 @@ KManualProxyDlg::KManualProxyDlg( QWidget* parent, const char* name ) setMainWidget( mDlg ); mDlg->pbCopyDown->setPixmap( BarIcon("down", KIcon::SizeSmall) ); - QSizePolicy sizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed, + TQSizePolicy sizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed, mDlg->pbCopyDown->sizePolicy().hasHeightForWidth() ); mDlg->pbCopyDown->setSizePolicy( sizePolicy ); @@ -63,19 +63,19 @@ void KManualProxyDlg::init() mDlg->sbHttps->setRange( 0, MAX_PORT_VALUE ); mDlg->sbFtp->setRange( 0, MAX_PORT_VALUE ); - connect( mDlg->pbNew, SIGNAL( clicked() ), SLOT( newPressed() ) ); - connect( mDlg->pbChange, SIGNAL( clicked() ), SLOT( changePressed() ) ); - connect( mDlg->pbDelete, SIGNAL( clicked() ), SLOT( deletePressed() ) ); - connect( mDlg->pbDeleteAll, SIGNAL( clicked() ), SLOT( deleteAllPressed() ) ); + connect( mDlg->pbNew, TQT_SIGNAL( clicked() ), TQT_SLOT( newPressed() ) ); + connect( mDlg->pbChange, TQT_SIGNAL( clicked() ), TQT_SLOT( changePressed() ) ); + connect( mDlg->pbDelete, TQT_SIGNAL( clicked() ), TQT_SLOT( deletePressed() ) ); + connect( mDlg->pbDeleteAll, TQT_SIGNAL( clicked() ), TQT_SLOT( deleteAllPressed() ) ); - connect( mDlg->lbExceptions, SIGNAL(selectionChanged()), SLOT(updateButtons()) ); - connect( mDlg->lbExceptions, SIGNAL(doubleClicked (QListBoxItem *)), SLOT(changePressed())); + connect( mDlg->lbExceptions, TQT_SIGNAL(selectionChanged()), TQT_SLOT(updateButtons()) ); + connect( mDlg->lbExceptions, TQT_SIGNAL(doubleClicked (TQListBoxItem *)), TQT_SLOT(changePressed())); - connect( mDlg->cbSameProxy, SIGNAL( toggled(bool) ), SLOT( sameProxy(bool) ) ); - connect( mDlg->pbCopyDown, SIGNAL( clicked() ), SLOT( copyDown() ) ); + connect( mDlg->cbSameProxy, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( sameProxy(bool) ) ); + connect( mDlg->pbCopyDown, TQT_SIGNAL( clicked() ), TQT_SLOT( copyDown() ) ); - connect( mDlg->leHttp, SIGNAL(textChanged(const QString&)), SLOT(textChanged(const QString&)) ); - connect( mDlg->sbHttp, SIGNAL(valueChanged(int)), SLOT(valueChanged (int)) ); + connect( mDlg->leHttp, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(textChanged(const TQString&)) ); + connect( mDlg->sbHttp, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(valueChanged (int)) ); } void KManualProxyDlg::setProxyData( const KProxyData &data ) @@ -142,7 +142,7 @@ void KManualProxyDlg::setProxyData( const KProxyData &data ) } } - QStringList::ConstIterator it = data.noProxyFor.begin(); + TQStringList::ConstIterator it = data.noProxyFor.begin(); for( ; it != data.noProxyFor.end(); ++it ) { // "no_proxy" is a keyword used by the environment variable @@ -182,7 +182,7 @@ const KProxyData KManualProxyDlg::data() const if ( mDlg->lbExceptions->count() ) { - QListBoxItem* item = mDlg->lbExceptions->firstItem(); + TQListBoxItem* item = mDlg->lbExceptions->firstItem(); for( ; item != 0L; item = item->next() ) data.noProxyFor << item->text(); } @@ -210,7 +210,7 @@ void KManualProxyDlg::sameProxy( bool enable ) mOldHttpsPort = mDlg->sbHttps->value(); int port = mDlg->sbHttp->value(); - QString text = mDlg->leHttp->text(); + TQString text = mDlg->leHttp->text(); mDlg->leFtp->setText (text); mDlg->leHttps->setText (text); @@ -276,7 +276,7 @@ bool KManualProxyDlg::validate() return (count > 0); } -void KManualProxyDlg::textChanged(const QString& text) +void KManualProxyDlg::textChanged(const TQString& text) { if (!mDlg->cbSameProxy->isChecked()) return; @@ -332,17 +332,17 @@ void KManualProxyDlg::slotOk() } } -bool KManualProxyDlg::handleDuplicate( const QString& site ) +bool KManualProxyDlg::handleDuplicate( const TQString& site ) { - QListBoxItem* item = mDlg->lbExceptions->firstItem(); + TQListBoxItem* item = mDlg->lbExceptions->firstItem(); while ( item != 0 ) { if ( item->text().findRev( site ) != -1 && item != mDlg->lbExceptions->selectedItem() ) { - QString msg = i18n("You entered a duplicate address. " + TQString msg = i18n("You entered a duplicate address. " "Please try again."); - QString details = i18n("<qt><center><b>%1</b></center> " + TQString details = i18n("<qt><center><b>%1</b></center> " "is already in the list.</qt>").arg(site); KMessageBox::detailedError( this, msg, details, i18n("Duplicate Entry") ); return true; @@ -355,14 +355,14 @@ bool KManualProxyDlg::handleDuplicate( const QString& site ) void KManualProxyDlg::newPressed() { - QString result; + TQString result; if( getException(result, i18n("New Exception")) && !handleDuplicate(result) ) mDlg->lbExceptions->insertItem( result ); } void KManualProxyDlg::changePressed() { - QString result; + TQString result; if( getException( result, i18n("Change Exception"), mDlg->lbExceptions->currentText() ) && !handleDuplicate( result ) ) @@ -392,11 +392,11 @@ void KManualProxyDlg::updateButtons() mDlg->pbChange->setEnabled( itemSelected ); } -QString KManualProxyDlg::urlFromInput(const KLineEdit* edit, - const QSpinBox* spin) const +TQString KManualProxyDlg::urlFromInput(const KLineEdit* edit, + const TQSpinBox* spin) const { if (!edit) - return QString::null; + return TQString::null; KURL u( edit->text() ); @@ -406,11 +406,11 @@ QString KManualProxyDlg::urlFromInput(const KLineEdit* edit, return u.url(); } -bool KManualProxyDlg::isValidURL( const QString& _url, KURL* result ) const +bool KManualProxyDlg::isValidURL( const TQString& _url, KURL* result ) const { KURL url (_url); - QStringList filters; + TQStringList filters; filters << "kshorturifilter" << "localdomainurifilter"; // If the typed URL is malformed, and the filters cannot filter it @@ -419,7 +419,7 @@ bool KManualProxyDlg::isValidURL( const QString& _url, KURL* result ) const !url.hasHost() ) return false; - QString host (url.host()); + TQString host (url.host()); // We only check for a relevant subset of characters that are // not allowed in <authority> component of a URL. @@ -432,11 +432,11 @@ bool KManualProxyDlg::isValidURL( const QString& _url, KURL* result ) const return true; } -void KManualProxyDlg::showErrorMsg( const QString& caption, - const QString& message ) +void KManualProxyDlg::showErrorMsg( const TQString& caption, + const TQString& message ) { - QString cap( caption ); - QString msg( message ); + TQString cap( caption ); + TQString msg( message ); if ( cap.isNull() ) cap = i18n("Invalid Entry"); @@ -444,7 +444,7 @@ void KManualProxyDlg::showErrorMsg( const QString& caption, if ( msg.isNull() ) msg = i18n("The address you have entered is not valid."); - QString details = i18n("<qt>Make sure none of the addresses or URLs you " + TQString details = i18n("<qt>Make sure none of the addresses or URLs you " "specified contain invalid or wildcard characters " "such as spaces, asterisks (*), or question marks(?).<p>" "<u>Examples of VALID entries:</u><br/>" @@ -457,11 +457,11 @@ void KManualProxyDlg::showErrorMsg( const QString& caption, KMessageBox::detailedError( this, msg, details, cap ); } -bool KManualProxyDlg::getException ( QString& result, - const QString& caption, - const QString& value ) +bool KManualProxyDlg::getException ( TQString& result, + const TQString& caption, + const TQString& value ) { - QString label; + TQString label; // Specify the appropriate message... if ( mDlg->cbReverseProxy->isChecked() ) @@ -471,7 +471,7 @@ bool KManualProxyDlg::getException ( QString& result, label = i18n("Enter the address or URL that should be excluded from " "using the above proxy settings:"); - QString whatsThis = i18n("<qt>Enter a valid address or url.<p>" + TQString whatsThis = i18n("<qt>Enter a valid address or url.<p>" "<b><u>NOTE:</u></b> Wildcard matching such as " "<code>*.kde.org</code> is not supported. If you want " "to match any host in the <code>.kde.org</code> domain, " @@ -480,7 +480,7 @@ bool KManualProxyDlg::getException ( QString& result, bool ok; result = KInputDialog::text( caption, label, value, &ok, 0, 0, 0, - QString::null, whatsThis ); + TQString::null, whatsThis ); // If the user pressed cancel, do nothing... if (!ok) diff --git a/kcontrol/kio/kmanualproxydlg.h b/kcontrol/kio/kmanualproxydlg.h index a21e3775c..ee8682e28 100644 --- a/kcontrol/kio/kmanualproxydlg.h +++ b/kcontrol/kio/kmanualproxydlg.h @@ -33,7 +33,7 @@ class KManualProxyDlg : public KProxyDialogBase Q_OBJECT public: - KManualProxyDlg( QWidget* parent = 0, const char* name = 0 ); + KManualProxyDlg( TQWidget* parent = 0, const char* name = 0 ); ~KManualProxyDlg() {}; virtual void setProxyData( const KProxyData &data ); @@ -49,7 +49,7 @@ protected slots: void copyDown(); void sameProxy( bool ); void valueChanged (int value); - void textChanged (const QString&); + void textChanged (const TQString&); void newPressed(); void updateButtons(); @@ -58,20 +58,20 @@ protected slots: void deleteAllPressed(); private: - QString urlFromInput( const KLineEdit* edit, const QSpinBox* spin ) const; - bool isValidURL( const QString&, KURL* = 0 ) const; - bool handleDuplicate( const QString& ); - bool getException ( QString&, const QString&, - const QString& value = QString::null ); - void showErrorMsg( const QString& caption = QString::null, - const QString& message = QString::null ); + TQString urlFromInput( const KLineEdit* edit, const TQSpinBox* spin ) const; + bool isValidURL( const TQString&, KURL* = 0 ) const; + bool handleDuplicate( const TQString& ); + bool getException ( TQString&, const TQString&, + const TQString& value = TQString::null ); + void showErrorMsg( const TQString& caption = TQString::null, + const TQString& message = TQString::null ); private: ManualProxyDlgUI* mDlg; int mOldFtpPort; int mOldHttpsPort; - QString mOldFtpText; - QString mOldHttpsText; + TQString mOldFtpText; + TQString mOldHttpsText; }; #endif diff --git a/kcontrol/kio/kproxydlg.cpp b/kcontrol/kio/kproxydlg.cpp index c7f9d7d20..bbe7a76bd 100644 --- a/kcontrol/kio/kproxydlg.cpp +++ b/kcontrol/kio/kproxydlg.cpp @@ -19,14 +19,14 @@ Boston, MA 02110-1301, USA. */ -#include <qlabel.h> -#include <qlayout.h> -#include <qregexp.h> -#include <qcheckbox.h> -#include <qwhatsthis.h> -#include <qbuttongroup.h> -#include <qradiobutton.h> -#include <qtabwidget.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqregexp.h> +#include <tqcheckbox.h> +#include <tqwhatsthis.h> +#include <tqbuttongroup.h> +#include <tqradiobutton.h> +#include <tqtabwidget.h> #include <klocale.h> #include <klineedit.h> @@ -40,12 +40,12 @@ #include "kproxydlg.h" #include "kproxydlg_ui.h" -KProxyOptions::KProxyOptions (QWidget* parent ) +KProxyOptions::KProxyOptions (TQWidget* parent ) :KCModule (parent, "kcmkio") { - QVBoxLayout *layout = new QVBoxLayout(this); + TQVBoxLayout *layout = new TQVBoxLayout(this); - mTab = new QTabWidget(this); + mTab = new TQTabWidget(this); layout->addWidget(mTab); mProxy = new KProxyDialog(mTab); @@ -54,9 +54,9 @@ KProxyOptions::KProxyOptions (QWidget* parent ) mTab->addTab(mProxy, i18n("&Proxy")); mTab->addTab(mSocks, i18n("&SOCKS")); - connect(mProxy, SIGNAL(changed(bool)), SIGNAL(changed(bool))); - connect(mSocks, SIGNAL(changed(bool)), SIGNAL(changed(bool))); - connect(mTab, SIGNAL(currentChanged(QWidget *)), SIGNAL(quickHelpChanged())); + connect(mProxy, TQT_SIGNAL(changed(bool)), TQT_SIGNAL(changed(bool))); + connect(mSocks, TQT_SIGNAL(changed(bool)), TQT_SIGNAL(changed(bool))); + connect(mTab, TQT_SIGNAL(currentChanged(TQWidget *)), TQT_SIGNAL(quickHelpChanged())); } KProxyOptions::~KProxyOptions() @@ -81,9 +81,9 @@ void KProxyOptions::defaults() mSocks->defaults(); } -QString KProxyOptions::quickHelp() const +TQString KProxyOptions::quickHelp() const { - QWidget *w = mTab->currentPage(); + TQWidget *w = mTab->currentPage(); if (w && w->inherits("KCModule")) { @@ -91,14 +91,14 @@ QString KProxyOptions::quickHelp() const return m->quickHelp(); } - return QString::null; + return TQString::null; } -KProxyDialog::KProxyDialog( QWidget* parent) +KProxyDialog::KProxyDialog( TQWidget* parent) :KCModule( parent, "kcmkio" ) { - QVBoxLayout* mainLayout = new QVBoxLayout( this, KDialog::marginHint(), + TQVBoxLayout* mainLayout = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); mDlg = new KProxyDialogUI( this ); @@ -106,27 +106,27 @@ KProxyDialog::KProxyDialog( QWidget* parent) mainLayout->addStretch(); // signals and slots connections - connect( mDlg->rbNoProxy, SIGNAL( toggled(bool) ), - SLOT( slotUseProxyChanged() ) ); + connect( mDlg->rbNoProxy, TQT_SIGNAL( toggled(bool) ), + TQT_SLOT( slotUseProxyChanged() ) ); - connect( mDlg->rbAutoDiscover, SIGNAL( toggled(bool) ), - SLOT( slotChanged() ) ); - connect( mDlg->rbAutoScript, SIGNAL( toggled(bool) ), - SLOT( slotChanged() ) ); + connect( mDlg->rbAutoDiscover, TQT_SIGNAL( toggled(bool) ), + TQT_SLOT( slotChanged() ) ); + connect( mDlg->rbAutoScript, TQT_SIGNAL( toggled(bool) ), + TQT_SLOT( slotChanged() ) ); - connect( mDlg->rbPrompt, SIGNAL( toggled(bool) ), - SLOT( slotChanged() ) ); - connect( mDlg->rbPresetLogin, SIGNAL( toggled(bool) ), - SLOT( slotChanged() ) ); + connect( mDlg->rbPrompt, TQT_SIGNAL( toggled(bool) ), + TQT_SLOT( slotChanged() ) ); + connect( mDlg->rbPresetLogin, TQT_SIGNAL( toggled(bool) ), + TQT_SLOT( slotChanged() ) ); - connect( mDlg->cbPersConn, SIGNAL( toggled(bool) ), - SLOT( slotChanged() ) ); + connect( mDlg->cbPersConn, TQT_SIGNAL( toggled(bool) ), + TQT_SLOT( slotChanged() ) ); - connect( mDlg->location, SIGNAL( textChanged(const QString&) ), - SLOT( slotChanged() ) ); + connect( mDlg->location, TQT_SIGNAL( textChanged(const TQString&) ), + TQT_SLOT( slotChanged() ) ); - connect( mDlg->pbEnvSetup, SIGNAL( clicked() ), SLOT( setupEnvProxy() ) ); - connect( mDlg->pbManSetup, SIGNAL( clicked() ), SLOT( setupManProxy() ) ); + connect( mDlg->pbEnvSetup, TQT_SIGNAL( clicked() ), TQT_SLOT( setupEnvProxy() ) ); + connect( mDlg->pbManSetup, TQT_SIGNAL( clicked() ), TQT_SLOT( setupManProxy() ) ); load(); } @@ -150,7 +150,7 @@ void KProxyDialog::load() mData->proxyList["ftp"] = proto.proxyFor( "ftp" ); mData->proxyList["script"] = proto.proxyConfigScript(); mData->useReverseProxy = proto.useReverseProxy(); - mData->noProxyFor = QStringList::split( QRegExp("[',''\t'' ']"), + mData->noProxyFor = TQStringList::split( TQRegExp("[',''\t'' ']"), proto.noProxyForRaw() ); mDlg->gbAuth->setEnabled( useProxy ); @@ -306,7 +306,7 @@ void KProxyDialog::setupManProxy() dlgManual.setProxyData( *mData ); - if ( dlgManual.exec() == QDialog::Accepted ) + if ( dlgManual.exec() == TQDialog::Accepted ) { *mData = dlgManual.data(); mDlg->rbManual->setChecked(true); @@ -320,7 +320,7 @@ void KProxyDialog::setupEnvProxy() dlgEnv.setProxyData( *mData ); - if ( dlgEnv.exec() == QDialog::Accepted ) + if ( dlgEnv.exec() == TQDialog::Accepted ) { *mData = dlgEnv.data(); mDlg->rbEnvVar->setChecked(true); @@ -343,7 +343,7 @@ void KProxyDialog::slotUseProxyChanged() emit changed( true ); } -QString KProxyDialog::quickHelp() const +TQString KProxyDialog::quickHelp() const { return i18n( "<h1>Proxy</h1>" "<p>A proxy server is an intermediate program that sits between " @@ -357,9 +357,9 @@ QString KProxyDialog::quickHelp() const "<p><u>Note:</u> Some proxy servers provide both services.</p>" ); } -void KProxyDialog::showInvalidMessage( const QString& _msg ) +void KProxyDialog::showInvalidMessage( const TQString& _msg ) { - QString msg; + TQString msg; if( !_msg.isEmpty() ) msg = _msg; diff --git a/kcontrol/kio/kproxydlg.h b/kcontrol/kio/kproxydlg.h index bbac5641d..d8ef1db9e 100644 --- a/kcontrol/kio/kproxydlg.h +++ b/kcontrol/kio/kproxydlg.h @@ -22,7 +22,7 @@ #ifndef _KPROXYDIALOG_H #define _KPROXYDIALOG_H -#include <qstring.h> +#include <tqstring.h> #include <kcmodule.h> @@ -36,18 +36,18 @@ class KProxyOptions : public KCModule Q_OBJECT public: - KProxyOptions( QWidget* parent = 0 ); + KProxyOptions( TQWidget* parent = 0 ); ~KProxyOptions(); virtual void load(); virtual void save(); virtual void defaults(); - virtual QString quickHelp() const; + virtual TQString quickHelp() const; private: KCModule* mProxy; KCModule* mSocks; - QTabWidget* mTab; + TQTabWidget* mTab; }; class KProxyDialog : public KCModule @@ -55,13 +55,13 @@ class KProxyDialog : public KCModule Q_OBJECT public: - KProxyDialog( QWidget* parent = 0 ); + KProxyDialog( TQWidget* parent = 0 ); ~KProxyDialog(); virtual void load(); virtual void save(); virtual void defaults(); - QString quickHelp() const; + TQString quickHelp() const; private slots: void slotChanged(); @@ -71,7 +71,7 @@ private slots: void setupEnvProxy(); private: - void showInvalidMessage( const QString& _msg = QString::null ); + void showInvalidMessage( const TQString& _msg = TQString::null ); private: KProxyDialogUI* mDlg; diff --git a/kcontrol/kio/kproxydlgbase.cpp b/kcontrol/kio/kproxydlgbase.cpp index c901037e3..e95625713 100644 --- a/kcontrol/kio/kproxydlgbase.cpp +++ b/kcontrol/kio/kproxydlgbase.cpp @@ -56,19 +56,19 @@ void KProxyData::init() } -KProxyDialogBase::KProxyDialogBase( QWidget* parent, const char* name, - bool modal, const QString &caption ) +KProxyDialogBase::KProxyDialogBase( TQWidget* parent, const char* name, + bool modal, const TQString &caption ) :KDialogBase( parent, name, modal, caption, Ok|Cancel, Ok, true ) { m_bHasValidData = false; } -void KProxyDialogBase::setHighLight (QWidget* widget, bool highlight) +void KProxyDialogBase::setHighLight (TQWidget* widget, bool highlight) { if (!widget) return; - QFont f = widget->font(); + TQFont f = widget->font(); f.setBold( highlight ); widget->setFont( f ); } diff --git a/kcontrol/kio/kproxydlgbase.h b/kcontrol/kio/kproxydlgbase.h index 7c39f31c0..06ffa8753 100644 --- a/kcontrol/kio/kproxydlgbase.h +++ b/kcontrol/kio/kproxydlgbase.h @@ -22,9 +22,9 @@ #ifndef KPROXY_DIALOG_BASE_H #define KPROXY_DIALOG_BASE_H -#include <qmap.h> -#include <qstring.h> -#include <qstringlist.h> +#include <tqmap.h> +#include <tqstring.h> +#include <tqstringlist.h> #include <kdialogbase.h> #include <kprotocolmanager.h> @@ -40,9 +40,9 @@ public: bool useReverseProxy; bool showEnvVarValue; - QStringList noProxyFor; + TQStringList noProxyFor; KProtocolManager::ProxyType type; - QMap<QString, QString> proxyList; + TQMap<TQString, TQString> proxyList; private: void init(); @@ -52,8 +52,8 @@ private: class KProxyDialogBase : public KDialogBase { public: - KProxyDialogBase( QWidget* parent = 0, const char* name = 0, - bool modal = false, const QString &caption = QString::null); + KProxyDialogBase( TQWidget* parent = 0, const char* name = 0, + bool modal = false, const TQString &caption = TQString::null); virtual ~KProxyDialogBase() {}; @@ -62,7 +62,7 @@ public: virtual void setProxyData (const KProxyData&)=0; protected: - void setHighLight (QWidget* widget = 0, bool highlight = false); + void setHighLight (TQWidget* widget = 0, bool highlight = false); bool m_bHasValidData; }; #endif diff --git a/kcontrol/kio/ksaveioconfig.cpp b/kcontrol/kio/ksaveioconfig.cpp index a251c0aed..50d56d86e 100644 --- a/kcontrol/kio/ksaveioconfig.cpp +++ b/kcontrol/kio/ksaveioconfig.cpp @@ -82,7 +82,7 @@ void KSaveIOConfig::reparseConfiguration () void KSaveIOConfig::setReadTimeout( int _timeout ) { KConfig* cfg = config (); - cfg->setGroup( QString::null ); + cfg->setGroup( TQString::null ); cfg->writeEntry("ReadTimeout", QMAX(MIN_TIMEOUT_VALUE,_timeout)); cfg->sync(); } @@ -90,7 +90,7 @@ void KSaveIOConfig::setReadTimeout( int _timeout ) void KSaveIOConfig::setConnectTimeout( int _timeout ) { KConfig* cfg = config (); - cfg->setGroup( QString::null ); + cfg->setGroup( TQString::null ); cfg->writeEntry("ConnectTimeout", QMAX(MIN_TIMEOUT_VALUE,_timeout)); cfg->sync(); } @@ -98,7 +98,7 @@ void KSaveIOConfig::setConnectTimeout( int _timeout ) void KSaveIOConfig::setProxyConnectTimeout( int _timeout ) { KConfig* cfg = config (); - cfg->setGroup( QString::null ); + cfg->setGroup( TQString::null ); cfg->writeEntry("ProxyConnectTimeout", QMAX(MIN_TIMEOUT_VALUE,_timeout)); cfg->sync(); } @@ -106,7 +106,7 @@ void KSaveIOConfig::setProxyConnectTimeout( int _timeout ) void KSaveIOConfig::setResponseTimeout( int _timeout ) { KConfig* cfg = config (); - cfg->setGroup( QString::null ); + cfg->setGroup( TQString::null ); cfg->writeEntry("ResponseTimeout", QMAX(MIN_TIMEOUT_VALUE,_timeout)); cfg->sync(); } @@ -115,7 +115,7 @@ void KSaveIOConfig::setResponseTimeout( int _timeout ) void KSaveIOConfig::setMarkPartial( bool _mode ) { KConfig* cfg = config (); - cfg->setGroup( QString::null ); + cfg->setGroup( TQString::null ); cfg->writeEntry( "MarkPartial", _mode ); cfg->sync(); } @@ -123,7 +123,7 @@ void KSaveIOConfig::setMarkPartial( bool _mode ) void KSaveIOConfig::setMinimumKeepSize( int _size ) { KConfig* cfg = config (); - cfg->setGroup( QString::null ); + cfg->setGroup( TQString::null ); cfg->writeEntry( "MinimumKeepSize", _size ); cfg->sync(); } @@ -131,7 +131,7 @@ void KSaveIOConfig::setMinimumKeepSize( int _size ) void KSaveIOConfig::setAutoResume( bool _mode ) { KConfig* cfg = config (); - cfg->setGroup( QString::null ); + cfg->setGroup( TQString::null ); cfg->writeEntry( "AutoResume", _mode ); cfg->sync(); } @@ -153,7 +153,7 @@ void KSaveIOConfig::setMaxCacheSize( int cache_size ) void KSaveIOConfig::setCacheControl(KIO::CacheControl policy) { KConfig* cfg = http_config (); - QString tmp = KIO::getCacheControlString(policy); + TQString tmp = KIO::getCacheControlString(policy); cfg->writeEntry("cache", tmp); cfg->sync(); } @@ -189,7 +189,7 @@ void KSaveIOConfig::setProxyAuthMode(KProtocolManager::ProxyAuthMode mode) cfg->sync(); } -void KSaveIOConfig::setNoProxyFor( const QString& _noproxy ) +void KSaveIOConfig::setNoProxyFor( const TQString& _noproxy ) { KConfig* cfg = config (); cfg->setGroup( "Proxy Settings" ); @@ -197,8 +197,8 @@ void KSaveIOConfig::setNoProxyFor( const QString& _noproxy ) cfg->sync(); } -void KSaveIOConfig::setProxyFor( const QString& protocol, - const QString& _proxy ) +void KSaveIOConfig::setProxyFor( const TQString& protocol, + const TQString& _proxy ) { KConfig* cfg = config (); cfg->setGroup( "Proxy Settings" ); @@ -206,7 +206,7 @@ void KSaveIOConfig::setProxyFor( const QString& protocol, cfg->sync(); } -void KSaveIOConfig::setProxyConfigScript( const QString& _url ) +void KSaveIOConfig::setProxyConfigScript( const TQString& _url ) { KConfig* cfg = config (); cfg->setGroup( "Proxy Settings" ); @@ -217,7 +217,7 @@ void KSaveIOConfig::setProxyConfigScript( const QString& _url ) void KSaveIOConfig::setPersistentProxyConnection( bool enable ) { KConfig* cfg = config (); - cfg->setGroup( QString::null ); + cfg->setGroup( TQString::null ); cfg->writeEntry( "PersistentProxyConnection", enable ); cfg->sync(); } @@ -225,33 +225,33 @@ void KSaveIOConfig::setPersistentProxyConnection( bool enable ) void KSaveIOConfig::setPersistentConnections( bool enable ) { KConfig* cfg = config (); - cfg->setGroup( QString::null ); + cfg->setGroup( TQString::null ); cfg->writeEntry( "PersistentConnections", enable ); cfg->sync(); } -void KSaveIOConfig::updateRunningIOSlaves (QWidget *parent) +void KSaveIOConfig::updateRunningIOSlaves (TQWidget *parent) { // Inform all running io-slaves about the changes... // if we cannot update, ioslaves inform the end user... - if (!DCOPRef("*", "KIO::Scheduler").send("reparseSlaveConfiguration", QString::null)) + if (!DCOPRef("*", "KIO::Scheduler").send("reparseSlaveConfiguration", TQString::null)) { - QString caption = i18n("Update Failed"); - QString message = i18n("You have to restart the running applications " + TQString caption = i18n("Update Failed"); + TQString message = i18n("You have to restart the running applications " "for these changes to take effect."); KMessageBox::information (parent, message, caption); return; } } -void KSaveIOConfig::updateProxyScout( QWidget * parent ) +void KSaveIOConfig::updateProxyScout( TQWidget * parent ) { // Inform the proxyscout kded module about changes // if we cannot update, ioslaves inform the end user... if (!DCOPRef("kded", "proxyscout").send("reset")) { - QString caption = i18n("Update Failed"); - QString message = i18n("You have to restart KDE " + TQString caption = i18n("Update Failed"); + TQString message = i18n("You have to restart KDE " "for these changes to take effect."); KMessageBox::information (parent, message, caption); return; diff --git a/kcontrol/kio/ksaveioconfig.h b/kcontrol/kio/ksaveioconfig.h index 3a6528ed2..2bf107131 100644 --- a/kcontrol/kio/ksaveioconfig.h +++ b/kcontrol/kio/ksaveioconfig.h @@ -60,11 +60,11 @@ public: static void setProxyAuthMode( KProtocolManager::ProxyAuthMode ); - static void setProxyConfigScript( const QString& ); + static void setProxyConfigScript( const TQString& ); - static void setProxyFor( const QString&, const QString& ); + static void setProxyFor( const TQString&, const TQString& ); - static void setNoProxyFor( const QString& ); + static void setNoProxyFor( const TQString& ); /** Miscelaneous Settings */ @@ -80,10 +80,10 @@ public: /** Update all running io-slaves */ - static void updateRunningIOSlaves (QWidget * parent = 0L); + static void updateRunningIOSlaves (TQWidget * parent = 0L); /** Update proxy scout */ - static void updateProxyScout( QWidget * parent = 0L ); + static void updateProxyScout( TQWidget * parent = 0L ); protected: static KConfig* config (); diff --git a/kcontrol/kio/main.cpp b/kcontrol/kio/main.cpp index dfe2eb0f8..96821defa 100644 --- a/kcontrol/kio/main.cpp +++ b/kcontrol/kio/main.cpp @@ -20,10 +20,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qfile.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qtabwidget.h> +#include <tqfile.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqtabwidget.h> #include <kcmoduleloader.h> #include <klocale.h> @@ -40,44 +40,44 @@ extern "C" { - KDE_EXPORT KCModule *create_cookie(QWidget *parent, const char /**name*/) + KDE_EXPORT KCModule *create_cookie(TQWidget *parent, const char /**name*/) { return new KCookiesMain(parent); } - KDE_EXPORT KCModule *create_smb(QWidget *parent, const char /**name*/) + KDE_EXPORT KCModule *create_smb(TQWidget *parent, const char /**name*/) { return new SMBRoOptions(parent); } - KDE_EXPORT KCModule *create_useragent(QWidget *parent, const char /**name*/) + KDE_EXPORT KCModule *create_useragent(TQWidget *parent, const char /**name*/) { return new UserAgentDlg(parent); } - KDE_EXPORT KCModule *create_proxy(QWidget *parent, const char /**name*/) + KDE_EXPORT KCModule *create_proxy(TQWidget *parent, const char /**name*/) { return new KProxyOptions(parent); } - KDE_EXPORT KCModule *create_cache(QWidget *parent, const char /**name*/) + KDE_EXPORT KCModule *create_cache(TQWidget *parent, const char /**name*/) { return new KCacheConfigDialog( parent ); } - KDE_EXPORT KCModule *create_netpref(QWidget *parent, const char /**name*/) + KDE_EXPORT KCModule *create_netpref(TQWidget *parent, const char /**name*/) { return new KIOPreferences(parent); } - KDE_EXPORT KCModule *create_lanbrowser(QWidget *parent, const char *) + KDE_EXPORT KCModule *create_lanbrowser(TQWidget *parent, const char *) { return new LanBrowser(parent); } } -LanBrowser::LanBrowser(QWidget *parent) +LanBrowser::LanBrowser(TQWidget *parent) :KCModule(parent,"kcmkio") ,layout(this) ,tabs(this) @@ -103,27 +103,27 @@ LanBrowser::LanBrowser(QWidget *parent) smbPage = create_smb(&tabs, 0); tabs.addTab(smbPage, i18n("&Windows Shares")); - connect(smbPage,SIGNAL(changed(bool)), SLOT( changed() )); + connect(smbPage,TQT_SIGNAL(changed(bool)), TQT_SLOT( changed() )); lisaPage = KCModuleLoader::loadModule("kcmlisa", KCModuleLoader::None, &tabs); if (lisaPage) { tabs.addTab(lisaPage,i18n("&LISa Daemon")); - connect(lisaPage,SIGNAL(changed()), SLOT( changed() )); + connect(lisaPage,TQT_SIGNAL(changed()), TQT_SLOT( changed() )); } // resLisaPage = KCModuleLoader::loadModule("kcmreslisa", &tabs); // if (resLisaPage) // { // tabs.addTab(resLisaPage,i18n("R&esLISa Daemon")); -// connect(resLisaPage,SIGNAL(changed()), SLOT( changed() )); +// connect(resLisaPage,TQT_SIGNAL(changed()), TQT_SLOT( changed() )); // } kioLanPage = KCModuleLoader::loadModule("kcmkiolan", KCModuleLoader::None, &tabs); if (kioLanPage) { tabs.addTab(kioLanPage,i18n("lan:/ Iosla&ve")); - connect(kioLanPage,SIGNAL(changed()), SLOT( changed() )); + connect(kioLanPage,TQT_SIGNAL(changed()), TQT_SLOT( changed() )); } setButtons(Apply|Help); diff --git a/kcontrol/kio/main.h b/kcontrol/kio/main.h index d2499c5e4..70a64c44a 100644 --- a/kcontrol/kio/main.h +++ b/kcontrol/kio/main.h @@ -30,13 +30,13 @@ class LanBrowser:public KCModule { Q_OBJECT public: - LanBrowser(QWidget *parent=0); + LanBrowser(TQWidget *parent=0); virtual void load(); virtual void save(); private: - QVBoxLayout layout; - QTabWidget tabs; + TQVBoxLayout layout; + TQTabWidget tabs; KCModule *smbPage; KCModule *lisaPage; // KCModule *resLisaPage; diff --git a/kcontrol/kio/netpref.cpp b/kcontrol/kio/netpref.cpp index 6aa20c4e7..1c1de3316 100644 --- a/kcontrol/kio/netpref.cpp +++ b/kcontrol/kio/netpref.cpp @@ -1,7 +1,7 @@ -#include <qlayout.h> -#include <qcheckbox.h> -#include <qwhatsthis.h> -#include <qvgroupbox.h> +#include <tqlayout.h> +#include <tqcheckbox.h> +#include <tqwhatsthis.h> +#include <tqvgroupbox.h> #include <kio/ioslave_defaults.h> #include <knuminput.h> @@ -14,13 +14,13 @@ #define MAX_TIMEOUT_VALUE 3600 -KIOPreferences::KIOPreferences( QWidget* parent ) +KIOPreferences::KIOPreferences( TQWidget* parent ) :KCModule( parent, "kcmkio" ) { - QVBoxLayout* mainLayout = new QVBoxLayout( this, 0, + TQVBoxLayout* mainLayout = new TQVBoxLayout( this, 0, KDialog::spacingHint() ); - gb_Timeout = new QVGroupBox( i18n("Timeout Values"), this, "gb_Timeout" ); - QWhatsThis::add( gb_Timeout, i18n("Here you can set timeout values. " + gb_Timeout = new TQVGroupBox( i18n("Timeout Values"), this, "gb_Timeout" ); + TQWhatsThis::add( gb_Timeout, i18n("Here you can set timeout values. " "You might want to tweak them if your " "connection is very slow. The maximum " "allowed value is %1 seconds.").arg(MAX_TIMEOUT_VALUE)); @@ -29,43 +29,43 @@ KIOPreferences::KIOPreferences( QWidget* parent ) sb_socketRead = new KIntNumInput( gb_Timeout, "sb_socketRead" ); sb_socketRead->setSuffix( i18n( " sec" ) ); sb_socketRead->setLabel( i18n( "Soc&ket read:" ), AlignVCenter); - connect(sb_socketRead, SIGNAL(valueChanged ( int )), - this, SLOT(configChanged())); + connect(sb_socketRead, TQT_SIGNAL(valueChanged ( int )), + this, TQT_SLOT(configChanged())); sb_proxyConnect = new KIntNumInput( sb_socketRead, 0, gb_Timeout, 10, "sb_proxyConnect" ); sb_proxyConnect->setSuffix( i18n( " sec" ) ); sb_proxyConnect->setLabel( i18n( "Pro&xy connect:" ), AlignVCenter); - connect(sb_proxyConnect, SIGNAL(valueChanged ( int )), - this, SLOT(configChanged())); + connect(sb_proxyConnect, TQT_SIGNAL(valueChanged ( int )), + this, TQT_SLOT(configChanged())); sb_serverConnect = new KIntNumInput( sb_proxyConnect, 0, gb_Timeout, 10, "sb_serverConnect" ); sb_serverConnect->setSuffix( i18n( " sec" ) ); sb_serverConnect->setLabel( i18n("Server co&nnect:"), AlignVCenter); - connect(sb_serverConnect, SIGNAL(valueChanged ( int )), - this, SLOT(configChanged())); + connect(sb_serverConnect, TQT_SIGNAL(valueChanged ( int )), + this, TQT_SLOT(configChanged())); sb_serverResponse = new KIntNumInput( sb_serverConnect, 0, gb_Timeout, 10, "sb_serverResponse" ); sb_serverResponse->setSuffix( i18n( " sec" ) ); sb_serverResponse->setLabel( i18n("&Server response:"), AlignVCenter); - connect(sb_serverResponse, SIGNAL(valueChanged ( int )), - this, SLOT(configChanged())); - - gb_Ftp = new QVGroupBox( i18n( "FTP Options" ), this, "gb_Ftp" ); - cb_ftpEnablePasv = new QCheckBox( i18n( "Enable passive &mode (PASV)" ), gb_Ftp ); - QWhatsThis::add(cb_ftpEnablePasv, i18n( "Enables FTP's \"passive\" mode. This is required to allow FTP to work from behind firewalls." )); - cb_ftpMarkPartial = new QCheckBox( i18n( "Mark &partially uploaded files" ), gb_Ftp ); - QWhatsThis::add(cb_ftpMarkPartial, i18n( "<p>Marks partially uploaded FTP files.</p>" + connect(sb_serverResponse, TQT_SIGNAL(valueChanged ( int )), + this, TQT_SLOT(configChanged())); + + gb_Ftp = new TQVGroupBox( i18n( "FTP Options" ), this, "gb_Ftp" ); + cb_ftpEnablePasv = new TQCheckBox( i18n( "Enable passive &mode (PASV)" ), gb_Ftp ); + TQWhatsThis::add(cb_ftpEnablePasv, i18n( "Enables FTP's \"passive\" mode. This is required to allow FTP to work from behind firewalls." )); + cb_ftpMarkPartial = new TQCheckBox( i18n( "Mark &partially uploaded files" ), gb_Ftp ); + TQWhatsThis::add(cb_ftpMarkPartial, i18n( "<p>Marks partially uploaded FTP files.</p>" "<p>When this option is enabled, partially uploaded files " "will have a \".part\" extension. This extension will be removed " "once the transfer is complete.</p>")); mainLayout->addWidget( gb_Ftp ); - connect(cb_ftpEnablePasv, SIGNAL(toggled(bool)), SLOT(configChanged())); - connect(cb_ftpMarkPartial, SIGNAL(toggled(bool)), SLOT(configChanged())); + connect(cb_ftpEnablePasv, TQT_SIGNAL(toggled(bool)), TQT_SLOT(configChanged())); + connect(cb_ftpMarkPartial, TQT_SIGNAL(toggled(bool)), TQT_SLOT(configChanged())); mainLayout->addStretch(); @@ -126,7 +126,7 @@ void KIOPreferences::defaults() emit changed(true); } -QString KIOPreferences::quickHelp() const +TQString KIOPreferences::quickHelp() const { return i18n("<h1>Network Preferences</h1>Here you can define" " the behavior of KDE programs when using Internet" diff --git a/kcontrol/kio/netpref.h b/kcontrol/kio/netpref.h index 2e269d4cd..ff8a7ffcf 100644 --- a/kcontrol/kio/netpref.h +++ b/kcontrol/kio/netpref.h @@ -17,23 +17,23 @@ class KIOPreferences : public KCModule Q_OBJECT public: - KIOPreferences( QWidget* parent = 0); + KIOPreferences( TQWidget* parent = 0); ~KIOPreferences(); void load(); void save(); void defaults(); - QString quickHelp() const; + TQString quickHelp() const; protected slots: void configChanged() { emit changed(true); } private: - QVGroupBox* gb_Ftp; - QVGroupBox* gb_Timeout; - QCheckBox* cb_ftpEnablePasv; - QCheckBox* cb_ftpMarkPartial; + TQVGroupBox* gb_Ftp; + TQVGroupBox* gb_Timeout; + TQCheckBox* cb_ftpEnablePasv; + TQCheckBox* cb_ftpMarkPartial; KIntNumInput* sb_socketRead; KIntNumInput* sb_proxyConnect; diff --git a/kcontrol/kio/policydlg.cpp b/kcontrol/kio/policydlg.cpp index 8e59c4bb0..463806266 100644 --- a/kcontrol/kio/policydlg.cpp +++ b/kcontrol/kio/policydlg.cpp @@ -16,11 +16,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qpushbutton.h> -#include <qwhatsthis.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qvalidator.h> +#include <tqpushbutton.h> +#include <tqwhatsthis.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqvalidator.h> #include <klineedit.h> #include <kcombobox.h> @@ -33,12 +33,12 @@ class DomainLineValidator : public QValidator { public: - DomainLineValidator(QObject *parent) - :QValidator(parent, "domainValidator") + DomainLineValidator(TQObject *parent) + :TQValidator(parent, "domainValidator") { } - State validate(QString &input, int &) const + State validate(TQString &input, int &) const { if (input.isEmpty() || (input == ".")) return Intermediate; @@ -56,7 +56,7 @@ public: }; -PolicyDlg::PolicyDlg (const QString& caption, QWidget *parent, +PolicyDlg::PolicyDlg (const TQString& caption, TQWidget *parent, const char *name) : KDialogBase(parent, name, true, caption, Ok|Cancel, Ok, true) { @@ -67,14 +67,14 @@ PolicyDlg::PolicyDlg (const QString& caption, QWidget *parent, m_dlgUI->cbPolicy->setMinimumWidth( m_dlgUI->cbPolicy->fontMetrics().maxWidth() * 25 ); enableButtonOK( false ); - connect(m_dlgUI->leDomain, SIGNAL(textChanged(const QString&)), - SLOT(slotTextChanged(const QString&))); + connect(m_dlgUI->leDomain, TQT_SIGNAL(textChanged(const TQString&)), + TQT_SLOT(slotTextChanged(const TQString&))); setFixedSize (sizeHint()); m_dlgUI->leDomain->setFocus (); } -void PolicyDlg::setEnableHostEdit( bool state, const QString& host ) +void PolicyDlg::setEnableHostEdit( bool state, const TQString& host ) { if ( !host.isEmpty() ) m_dlgUI->leDomain->setText( host ); @@ -95,12 +95,12 @@ int PolicyDlg::advice () const return m_dlgUI->cbPolicy->currentItem() + 1; } -QString PolicyDlg::domain () const +TQString PolicyDlg::domain () const { return m_dlgUI->leDomain->text(); } -void PolicyDlg::slotTextChanged( const QString& text ) +void PolicyDlg::slotTextChanged( const TQString& text ) { enableButtonOK( text.length() > 1 ); } diff --git a/kcontrol/kio/policydlg.h b/kcontrol/kio/policydlg.h index dcdca5136..815b4d01d 100644 --- a/kcontrol/kio/policydlg.h +++ b/kcontrol/kio/policydlg.h @@ -19,7 +19,7 @@ #ifndef _POLICYDLG_H #define _POLICYDLG_H -#include <qstring.h> +#include <tqstring.h> #include <kdialogbase.h> @@ -47,16 +47,16 @@ public: } } - static KCookieAdvice::Value strToAdvice (const QString& advice) + static KCookieAdvice::Value strToAdvice (const TQString& advice) { if (advice.isEmpty()) return KCookieAdvice::Dunno; - if (advice.find (QString::fromLatin1("accept"), 0, false) == 0) + if (advice.find (TQString::fromLatin1("accept"), 0, false) == 0) return KCookieAdvice::Accept; - else if (advice.find (QString::fromLatin1("reject"), 0, false) == 0) + else if (advice.find (TQString::fromLatin1("reject"), 0, false) == 0) return KCookieAdvice::Reject; - else if (advice.find (QString::fromLatin1("ask"), 0, false) == 0) + else if (advice.find (TQString::fromLatin1("ask"), 0, false) == 0) return KCookieAdvice::Ask; return KCookieAdvice::Dunno; @@ -68,18 +68,18 @@ class PolicyDlg : public KDialogBase Q_OBJECT public: - PolicyDlg (const QString& caption, QWidget *parent = 0, + PolicyDlg (const TQString& caption, TQWidget *parent = 0, const char *name = 0); ~PolicyDlg (){}; int advice() const; - QString domain() const; + TQString domain() const; - void setEnableHostEdit( bool, const QString& host = QString::null ); + void setEnableHostEdit( bool, const TQString& host = TQString::null ); void setPolicy (int policy); protected slots: - void slotTextChanged( const QString& ); + void slotTextChanged( const TQString& ); private: PolicyDlgUI* m_dlgUI; diff --git a/kcontrol/kio/smbrodlg.cpp b/kcontrol/kio/smbrodlg.cpp index dc075c793..90dfd9170 100644 --- a/kcontrol/kio/smbrodlg.cpp +++ b/kcontrol/kio/smbrodlg.cpp @@ -18,9 +18,9 @@ Boston, MA 02110-1301, USA. */ -#include <qlayout.h> -#include <qlabel.h> -#include <qtextcodec.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqtextcodec.h> #include <klocale.h> #include <kconfig.h> @@ -35,49 +35,49 @@ #endif -SMBRoOptions::SMBRoOptions(QWidget *parent) +SMBRoOptions::SMBRoOptions(TQWidget *parent) : KCModule(parent, "kcmkio") { - QGridLayout *layout = new QGridLayout(this,2,-1,KDialog::marginHint(), + TQGridLayout *layout = new TQGridLayout(this,2,-1,KDialog::marginHint(), KDialog::spacingHint()); - QLabel *label=new QLabel(i18n("This is the configuration for the samba client only, not the server."),this); + TQLabel *label=new TQLabel(i18n("This is the configuration for the samba client only, not the server."),this); layout->addMultiCellWidget(label,0,0,0,1); - m_userLe=new QLineEdit(this); - label=new QLabel(m_userLe,i18n("Default user name:"),this); + m_userLe=new TQLineEdit(this); + label=new TQLabel(m_userLe,i18n("Default user name:"),this); layout->addWidget(label,1,0); layout->addWidget(m_userLe,1,1); - m_passwordLe=new QLineEdit(this); - m_passwordLe->setEchoMode(QLineEdit::Password); - label=new QLabel(m_passwordLe,i18n("Default password:"),this); + m_passwordLe=new TQLineEdit(this); + m_passwordLe->setEchoMode(TQLineEdit::Password); + label=new TQLabel(m_passwordLe,i18n("Default password:"),this); layout->addWidget(label,2,0); layout->addWidget(m_passwordLe,2,1); -/* m_workgroupLe=new QLineEdit(this); - label=new QLabel(m_workgroupLe,i18n("Workgroup:"),this); +/* m_workgroupLe=new TQLineEdit(this); + label=new TQLabel(m_workgroupLe,i18n("Workgroup:"),this); layout->addWidget(label,3,0); layout->addWidget(m_workgroupLe,3,1); - m_showHiddenShares=new QCheckBox(i18n("Show hidden shares"),this); + m_showHiddenShares=new TQCheckBox(i18n("Show hidden shares"),this); layout->addMultiCellWidget(m_showHiddenShares,4,4,0,1); m_encodingList = new KComboBox( false, this ); - QStringList _strList = KGlobal::charsets()->availableEncodingNames(); + TQStringList _strList = KGlobal::charsets()->availableEncodingNames(); m_encodingList->insertStringList( _strList ); - label = new QLabel( m_encodingList, i18n( "MS Windows encoding:" ), this ); + label = new TQLabel( m_encodingList, i18n( "MS Windows encoding:" ), this ); layout->addWidget( label, 3, 0 ); layout->addWidget( m_encodingList, 3, 1 ); */ - layout->addWidget(new QWidget(this),4,0); + layout->addWidget(new TQWidget(this),4,0); -// connect(m_showHiddenShares, SIGNAL(toggled(bool)), this, SLOT(changed())); - connect(m_userLe, SIGNAL(textChanged(const QString&)), this, SLOT(changed())); - connect(m_passwordLe, SIGNAL(textChanged(const QString&)), this, SLOT(changed())); -// connect(m_workgroupLe, SIGNAL(textChanged(const QString&)), this, SLOT(changed())); -// connect( m_encodingList, SIGNAL( activated( const QString & ) ), this , SLOT( changed() ) ); +// connect(m_showHiddenShares, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(changed())); + connect(m_userLe, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(changed())); + connect(m_passwordLe, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(changed())); +// connect(m_workgroupLe, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(changed())); +// connect( m_encodingList, TQT_SIGNAL( activated( const TQString & ) ), this , TQT_SLOT( changed() ) ); layout->setRowStretch(4, 1); @@ -93,29 +93,29 @@ void SMBRoOptions::load() { KConfig *cfg = new KConfig("kioslaverc"); - QString tmp; + TQString tmp; cfg->setGroup( "Browser Settings/SMBro" ); m_userLe->setText(cfg->readEntry("User")); // m_workgroupLe->setText(cfg->readEntry("Workgroup")); // m_showHiddenShares->setChecked(cfg->readBoolEntry("ShowHiddenShares",false)); -// QStringList _strList = KGlobal::charsets()->availableEncodingNames(); -// QString m_encoding = QTextCodec::codecForLocale()->name(); +// TQStringList _strList = KGlobal::charsets()->availableEncodingNames(); +// TQString m_encoding = TQTextCodec::codecForLocale()->name(); // m_encodingList->setCurrentItem( _strList.findIndex( cfg->readEntry( "Encoding", m_encoding.lower() ) ) ); // unscramble - QString scrambled = cfg->readEntry( "Password" ); - QString password = ""; + TQString scrambled = cfg->readEntry( "Password" ); + TQString password = ""; for (uint i=0; i<scrambled.length()/3; i++) { - QChar qc1 = scrambled[i*3]; - QChar qc2 = scrambled[i*3+1]; - QChar qc3 = scrambled[i*3+2]; + TQChar qc1 = scrambled[i*3]; + TQChar qc2 = scrambled[i*3+1]; + TQChar qc3 = scrambled[i*3+2]; unsigned int a1 = qc1.latin1() - '0'; unsigned int a2 = qc2.latin1() - 'A'; unsigned int a3 = qc3.latin1() - '0'; unsigned int num = ((a1 & 0x3F) << 10) | ((a2& 0x1F) << 5) | (a3 & 0x1F); - password[i] = QChar((uchar)((num - 17) ^ 173)); // restore + password[i] = TQChar((uchar)((num - 17) ^ 173)); // restore } m_passwordLe->setText(password); @@ -135,11 +135,11 @@ void SMBRoOptions::save() //taken from Nicola Brodu's smb ioslave //it's not really secure, but at //least better than storing the plain password - QString password(m_passwordLe->text()); - QString scrambled; + TQString password(m_passwordLe->text()); + TQString scrambled; for (uint i=0; i<password.length(); i++) { - QChar c = password[i]; + TQChar c = password[i]; unsigned int num = (c.unicode() ^ 173) + 17; unsigned int a1 = (num & 0xFC00) >> 10; unsigned int a2 = (num & 0x3E0) >> 5; @@ -166,7 +166,7 @@ void SMBRoOptions::changed() emit KCModule::changed(true); } -QString SMBRoOptions::quickHelp() const +TQString SMBRoOptions::quickHelp() const { return i18n("<h1>Windows Shares</h1>Konqueror is able to access shared " "windows filesystems if properly configured. If there is a " diff --git a/kcontrol/kio/smbrodlg.h b/kcontrol/kio/smbrodlg.h index d72972516..b1696e1e2 100644 --- a/kcontrol/kio/smbrodlg.h +++ b/kcontrol/kio/smbrodlg.h @@ -21,9 +21,9 @@ #ifndef __SMBRODLG_H #define __SMBRODLG_H -#include <qwidget.h> -#include <qlineedit.h> -#include <qcheckbox.h> +#include <tqwidget.h> +#include <tqlineedit.h> +#include <tqcheckbox.h> #include <kcmodule.h> @@ -33,22 +33,22 @@ class SMBRoOptions : public KCModule { Q_OBJECT public: - SMBRoOptions(QWidget *parent = 0); + SMBRoOptions(TQWidget *parent = 0); ~SMBRoOptions(); virtual void load(); virtual void save(); virtual void defaults(); - QString quickHelp() const; + TQString quickHelp() const; private slots: void changed(); private: - QLineEdit *m_userLe; - QLineEdit *m_passwordLe; -// QLineEdit *m_workgroupLe; //currently unused, Alex -// QCheckBox *m_showHiddenShares; //currently unused, Alex + TQLineEdit *m_userLe; + TQLineEdit *m_passwordLe; +// TQLineEdit *m_workgroupLe; //currently unused, Alex +// TQCheckBox *m_showHiddenShares; //currently unused, Alex // KComboBox *m_encodingList; //currently unused }; diff --git a/kcontrol/kio/socks.cpp b/kcontrol/kio/socks.cpp index 9c6678a5d..fd1ce7d8e 100644 --- a/kcontrol/kio/socks.cpp +++ b/kcontrol/kio/socks.cpp @@ -20,10 +20,10 @@ */ -#include <qlayout.h> -#include <qlabel.h> -#include <qvbuttongroup.h> -#include <qcheckbox.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqvbuttongroup.h> +#include <tqcheckbox.h> #include <kfiledialog.h> #include <klistview.h> @@ -34,7 +34,7 @@ #include "socks.h" #include <kaboutdata.h> -KSocksConfig::KSocksConfig(QWidget *parent) +KSocksConfig::KSocksConfig(TQWidget *parent) : KCModule(parent, "kcmkio") { @@ -48,30 +48,30 @@ KSocksConfig::KSocksConfig(QWidget *parent) setAboutData( about ); - QVBoxLayout *layout = new QVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint()); + TQVBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint()); base = new SocksBase(this); layout->add(base); - connect(base->_c_enableSocks, SIGNAL(clicked()), this, SLOT(enableChanged())); - connect(base->bg, SIGNAL(clicked(int)), this, SLOT(methodChanged(int))); + connect(base->_c_enableSocks, TQT_SIGNAL(clicked()), this, TQT_SLOT(enableChanged())); + connect(base->bg, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(methodChanged(int))); // The custom library - connect(base->_c_customPath, SIGNAL(openFileDialog(KURLRequester *)), this, SLOT(chooseCustomLib(KURLRequester *))); - connect(base->_c_customPath, SIGNAL(textChanged(const QString&)), - this, SLOT(customPathChanged(const QString&))); + connect(base->_c_customPath, TQT_SIGNAL(openFileDialog(KURLRequester *)), this, TQT_SLOT(chooseCustomLib(KURLRequester *))); + connect(base->_c_customPath, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(customPathChanged(const TQString&))); // Additional libpaths - connect(base->_c_newPath, SIGNAL(openFileDialog(KURLRequester *)), this, SLOT(chooseCustomLib(KURLRequester *))); - connect(base->_c_newPath, SIGNAL(returnPressed(const QString&)), - this, SLOT(addThisLibrary(const QString&))); - connect(base->_c_newPath, SIGNAL(textChanged(const QString&)), - this, SLOT(libTextChanged(const QString&))); - connect(base->_c_add, SIGNAL(clicked()), this, SLOT(addLibrary())); - connect(base->_c_remove, SIGNAL(clicked()), this, SLOT(removeLibrary())); - connect(base->_c_libs, SIGNAL(selectionChanged()), this, SLOT(libSelection())); + connect(base->_c_newPath, TQT_SIGNAL(openFileDialog(KURLRequester *)), this, TQT_SLOT(chooseCustomLib(KURLRequester *))); + connect(base->_c_newPath, TQT_SIGNAL(returnPressed(const TQString&)), + this, TQT_SLOT(addThisLibrary(const TQString&))); + connect(base->_c_newPath, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(libTextChanged(const TQString&))); + connect(base->_c_add, TQT_SIGNAL(clicked()), this, TQT_SLOT(addLibrary())); + connect(base->_c_remove, TQT_SIGNAL(clicked()), this, TQT_SLOT(removeLibrary())); + connect(base->_c_libs, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(libSelection())); // The "Test" button - connect(base->_c_test, SIGNAL(clicked()), this, SLOT(testClicked())); + connect(base->_c_test, TQT_SIGNAL(clicked()), this, TQT_SLOT(testClicked())); // The config backend load(); @@ -110,7 +110,7 @@ void KSocksConfig::methodChanged(int id) } -void KSocksConfig::customPathChanged(const QString&) +void KSocksConfig::customPathChanged(const TQString&) { emit changed(true); } @@ -140,7 +140,7 @@ void KSocksConfig::testClicked() void KSocksConfig::chooseCustomLib(KURLRequester * url) { url->setMode( KFile::Directory ); -/* QString newFile = KFileDialog::getOpenFileName(); +/* TQString newFile = KFileDialog::getOpenFileName(); if (newFile.length() > 0) { base->_c_customPath->setURL(newFile); emit changed(true); @@ -149,7 +149,7 @@ void KSocksConfig::chooseCustomLib(KURLRequester * url) -void KSocksConfig::libTextChanged(const QString& lib) +void KSocksConfig::libTextChanged(const TQString& lib) { if (lib.length() > 0) base-> _c_add->setEnabled(true); @@ -157,10 +157,10 @@ void KSocksConfig::libTextChanged(const QString& lib) } -void KSocksConfig::addThisLibrary(const QString& lib) +void KSocksConfig::addThisLibrary(const TQString& lib) { if (lib.length() > 0) { - new QListViewItem(base->_c_libs, lib); + new TQListViewItem(base->_c_libs, lib); base->_c_newPath->clear(); base->_c_add->setEnabled(false); base->_c_newPath->setFocus(); @@ -177,7 +177,7 @@ void KSocksConfig::addLibrary() void KSocksConfig::removeLibrary() { - QListViewItem *thisitem = base->_c_libs->selectedItem(); + TQListViewItem *thisitem = base->_c_libs->selectedItem(); base->_c_libs->takeItem(thisitem); delete thisitem; base->_c_libs->clearSelection(); @@ -207,17 +207,17 @@ void KSocksConfig::load() } base->_c_customPath->setURL(config.readPathEntry("SOCKS_lib")); - QListViewItem *thisitem; + TQListViewItem *thisitem; while ((thisitem = base->_c_libs->firstChild())) { base->_c_libs->takeItem(thisitem); delete thisitem; } - QStringList libs = config.readPathListEntry("SOCKS_lib_path"); - for(QStringList::Iterator it = libs.begin(); + TQStringList libs = config.readPathListEntry("SOCKS_lib_path"); + for(TQStringList::Iterator it = libs.begin(); it != libs.end(); ++it ) { - new QListViewItem(base->_c_libs, *it); + new TQListViewItem(base->_c_libs, *it); } base->_c_libs->clearSelection(); base->_c_remove->setEnabled(false); @@ -232,9 +232,9 @@ void KSocksConfig::save() config.writeEntry("SOCKS_enable",base-> _c_enableSocks->isChecked(), true, true); config.writeEntry("SOCKS_method", base->bg->id(base->bg->selected()), true, true); config.writePathEntry("SOCKS_lib", base->_c_customPath->url(), true, true); - QListViewItem *thisitem = base->_c_libs->firstChild(); + TQListViewItem *thisitem = base->_c_libs->firstChild(); - QStringList libs; + TQStringList libs; while (thisitem) { libs << thisitem->text(0); thisitem = thisitem->itemBelow(); @@ -254,7 +254,7 @@ void KSocksConfig::defaults() base->_c_customLabel->setEnabled(false); base->_c_customPath->setEnabled(false); base->_c_customPath->setURL(""); - QListViewItem *thisitem; + TQListViewItem *thisitem; while ((thisitem = base->_c_libs->firstChild())) { base->_c_libs->takeItem(thisitem); delete thisitem; @@ -265,7 +265,7 @@ void KSocksConfig::defaults() emit changed(true); } -QString KSocksConfig::quickHelp() const +TQString KSocksConfig::quickHelp() const { return i18n("<h1>SOCKS</h1><p>This module allows you to configure KDE support" " for a SOCKS server or proxy.</p><p>SOCKS is a protocol to traverse firewalls" diff --git a/kcontrol/kio/socks.h b/kcontrol/kio/socks.h index 1d950f607..69f4ab4fd 100644 --- a/kcontrol/kio/socks.h +++ b/kcontrol/kio/socks.h @@ -37,7 +37,7 @@ class KSocksConfig : public KCModule { Q_OBJECT public: - KSocksConfig(QWidget *parent); + KSocksConfig(TQWidget *parent); virtual ~KSocksConfig(); SocksBase *base; @@ -47,7 +47,7 @@ public: void defaults(); int buttons(); - QString quickHelp() const; + TQString quickHelp() const; public slots: void configChanged(); @@ -57,10 +57,10 @@ private slots: void methodChanged(int id); void testClicked(); void chooseCustomLib(KURLRequester *url); - void customPathChanged(const QString&); + void customPathChanged(const TQString&); void addLibrary(); - void libTextChanged(const QString& lib); - void addThisLibrary(const QString& lib); + void libTextChanged(const TQString& lib); + void addThisLibrary(const TQString& lib); void removeLibrary(); void libSelection(); diff --git a/kcontrol/kio/uagentproviderdlg.cpp b/kcontrol/kio/uagentproviderdlg.cpp index 3b71b29f4..9e945948d 100644 --- a/kcontrol/kio/uagentproviderdlg.cpp +++ b/kcontrol/kio/uagentproviderdlg.cpp @@ -16,11 +16,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qlabel.h> -#include <qlayout.h> -#include <qlistbox.h> -#include <qwhatsthis.h> -#include <qpushbutton.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqlistbox.h> +#include <tqwhatsthis.h> +#include <tqpushbutton.h> #include <kdebug.h> #include <klocale.h> @@ -32,7 +32,7 @@ #include "uagentproviderdlg.h" #include "uagentproviderdlg_ui.h" -UALineEdit::UALineEdit( QWidget *parent, const char *name ) +UALineEdit::UALineEdit( TQWidget *parent, const char *name ) :KLineEdit( parent, name ) { // For now do not accept any drops since they might contain @@ -41,10 +41,10 @@ UALineEdit::UALineEdit( QWidget *parent, const char *name ) setAcceptDrops( false ); } -void UALineEdit::keyPressEvent( QKeyEvent* e ) +void UALineEdit::keyPressEvent( TQKeyEvent* e ) { int key = e->key(); - QString keycode = e->text(); + TQString keycode = e->text(); if ( (key >= Qt::Key_Escape && key <= Qt::Key_Help) || key == Qt::Key_Period || (cursorPosition() > 0 && key == Qt::Key_Minus) || (!keycode.isEmpty() && keycode.unicode()->isLetterOrNumber()) ) @@ -55,13 +55,13 @@ void UALineEdit::keyPressEvent( QKeyEvent* e ) e->accept(); } -UAProviderDlg::UAProviderDlg( const QString& caption, QWidget *parent, +UAProviderDlg::UAProviderDlg( const TQString& caption, TQWidget *parent, FakeUASProvider* provider, const char *name ) :KDialog(parent, name, true), m_provider(provider) { setCaption ( caption ); - QVBoxLayout* mainLayout = new QVBoxLayout(this, 0, 0); + TQVBoxLayout* mainLayout = new TQVBoxLayout(this, 0, 0); dlg = new UAProviderDlgUI (this); mainLayout->addWidget(dlg); @@ -82,14 +82,14 @@ UAProviderDlg::~UAProviderDlg() void UAProviderDlg::init() { - connect( dlg->pbOk, SIGNAL(clicked()), SLOT(accept()) ); - connect( dlg->pbCancel, SIGNAL(clicked()), SLOT(reject()) ); + connect( dlg->pbOk, TQT_SIGNAL(clicked()), TQT_SLOT(accept()) ); + connect( dlg->pbCancel, TQT_SIGNAL(clicked()), TQT_SLOT(reject()) ); - connect( dlg->leSite, SIGNAL(textChanged(const QString&)), - SLOT(slotTextChanged( const QString&)) ); + connect( dlg->leSite, TQT_SIGNAL(textChanged(const TQString&)), + TQT_SLOT(slotTextChanged( const TQString&)) ); - connect( dlg->cbAlias, SIGNAL(activated(const QString&)), - SLOT(slotActivated(const QString&)) ); + connect( dlg->cbAlias, TQT_SIGNAL(activated(const TQString&)), + TQT_SLOT(slotActivated(const TQString&)) ); dlg->cbAlias->clear(); dlg->cbAlias->insertStringList( m_provider->userAgentAliasList() ); @@ -99,7 +99,7 @@ void UAProviderDlg::init() dlg->leSite->setFocus(); } -void UAProviderDlg::slotActivated( const QString& text ) +void UAProviderDlg::slotActivated( const TQString& text ) { if ( text.isEmpty() ) dlg->leIdentity->setText( "" ); @@ -109,17 +109,17 @@ void UAProviderDlg::slotActivated( const QString& text ) dlg->pbOk->setEnabled( (!dlg->leSite->text().isEmpty() && !text.isEmpty()) ); } -void UAProviderDlg::slotTextChanged( const QString& text ) +void UAProviderDlg::slotTextChanged( const TQString& text ) { dlg->pbOk->setEnabled( (!text.isEmpty() && !dlg->cbAlias->currentText().isEmpty()) ); } -void UAProviderDlg::setSiteName( const QString& text ) +void UAProviderDlg::setSiteName( const TQString& text ) { dlg->leSite->setText( text ); } -void UAProviderDlg::setIdentity( const QString& text ) +void UAProviderDlg::setIdentity( const TQString& text ) { int id = dlg->cbAlias->listBox()->index( dlg->cbAlias->listBox()->findItem(text) ); dlg->cbAlias->setCurrentItem( id ); @@ -128,20 +128,20 @@ void UAProviderDlg::setIdentity( const QString& text ) dlg->cbAlias->setFocus(); } -QString UAProviderDlg::siteName() +TQString UAProviderDlg::siteName() { - QString site_name=dlg->leSite->text().lower(); + TQString site_name=dlg->leSite->text().lower(); site_name = site_name.remove( "https://" ); site_name = site_name.remove( "http://" ); return site_name; } -QString UAProviderDlg::identity() +TQString UAProviderDlg::identity() { return dlg->cbAlias->currentText(); } -QString UAProviderDlg::alias() +TQString UAProviderDlg::alias() { return dlg->leIdentity->text(); } diff --git a/kcontrol/kio/uagentproviderdlg.h b/kcontrol/kio/uagentproviderdlg.h index 67b38d42e..3e60edb54 100644 --- a/kcontrol/kio/uagentproviderdlg.h +++ b/kcontrol/kio/uagentproviderdlg.h @@ -32,10 +32,10 @@ class UALineEdit : public KLineEdit Q_OBJECT public: - UALineEdit( QWidget *parent, const char *name=0 ); + UALineEdit( TQWidget *parent, const char *name=0 ); protected: - virtual void keyPressEvent( QKeyEvent * ); + virtual void keyPressEvent( TQKeyEvent * ); }; class UAProviderDlg : public KDialog @@ -43,20 +43,20 @@ class UAProviderDlg : public KDialog Q_OBJECT public: - UAProviderDlg( const QString& caption, QWidget *parent = 0, + UAProviderDlg( const TQString& caption, TQWidget *parent = 0, FakeUASProvider* provider = 0, const char *name = 0 ); ~UAProviderDlg(); - void setSiteName( const QString& ); - void setIdentity( const QString& ); + void setSiteName( const TQString& ); + void setIdentity( const TQString& ); - QString siteName(); - QString identity(); - QString alias(); + TQString siteName(); + TQString identity(); + TQString alias(); protected slots: - void slotActivated( const QString& ); - void slotTextChanged( const QString& ); + void slotActivated( const TQString& ); + void slotTextChanged( const TQString& ); protected: void init(); diff --git a/kcontrol/kio/useragentdlg.cpp b/kcontrol/kio/useragentdlg.cpp index b8256b946..c34d5cadc 100644 --- a/kcontrol/kio/useragentdlg.cpp +++ b/kcontrol/kio/useragentdlg.cpp @@ -22,14 +22,14 @@ Boston, MA 02110-1301, USA. */ -#include <qvbox.h> -#include <qlayout.h> -#include <qcheckbox.h> -#include <qlineedit.h> -#include <qtooltip.h> -#include <qwhatsthis.h> -#include <qpushbutton.h> -#include <qvbuttongroup.h> +#include <tqvbox.h> +#include <tqlayout.h> +#include <tqcheckbox.h> +#include <tqlineedit.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> +#include <tqpushbutton.h> +#include <tqvbuttongroup.h> #include <kdebug.h> #include <kconfig.h> @@ -46,32 +46,32 @@ #include "useragentdlg.h" #include "useragentdlg_ui.h" -UserAgentDlg::UserAgentDlg( QWidget * parent ) +UserAgentDlg::UserAgentDlg( TQWidget * parent ) :KCModule( parent, "kcmkio" ) { - QVBoxLayout *mainLayout = new QVBoxLayout(this, 0, KDialog::spacingHint()); + TQVBoxLayout *mainLayout = new TQVBoxLayout(this, 0, KDialog::spacingHint()); dlg = new UserAgentDlgUI (this); mainLayout->addWidget(dlg); dlg->lvDomainPolicyList->setSorting(0); - connect( dlg->cbSendUAString, SIGNAL(clicked()), SLOT(configChanged()) ); + connect( dlg->cbSendUAString, TQT_SIGNAL(clicked()), TQT_SLOT(configChanged()) ); - connect( dlg->gbDefaultId, SIGNAL(clicked(int)), - SLOT(changeDefaultUAModifiers(int))); + connect( dlg->gbDefaultId, TQT_SIGNAL(clicked(int)), + TQT_SLOT(changeDefaultUAModifiers(int))); - connect( dlg->lvDomainPolicyList, SIGNAL(selectionChanged()), - SLOT(selectionChanged()) ); - connect( dlg->lvDomainPolicyList, SIGNAL(doubleClicked (QListViewItem *)), - SLOT(changePressed()) ); - connect( dlg->lvDomainPolicyList, SIGNAL( returnPressed ( QListViewItem * ) ), - SLOT( changePressed() )); + connect( dlg->lvDomainPolicyList, TQT_SIGNAL(selectionChanged()), + TQT_SLOT(selectionChanged()) ); + connect( dlg->lvDomainPolicyList, TQT_SIGNAL(doubleClicked (TQListViewItem *)), + TQT_SLOT(changePressed()) ); + connect( dlg->lvDomainPolicyList, TQT_SIGNAL( returnPressed ( TQListViewItem * ) ), + TQT_SLOT( changePressed() )); - connect( dlg->pbNew, SIGNAL(clicked()), SLOT( addPressed() ) ); - connect( dlg->pbChange, SIGNAL( clicked() ), SLOT( changePressed() ) ); - connect( dlg->pbDelete, SIGNAL( clicked() ), SLOT( deletePressed() ) ); - connect( dlg->pbDeleteAll, SIGNAL( clicked() ), SLOT( deleteAllPressed() ) ); + connect( dlg->pbNew, TQT_SIGNAL(clicked()), TQT_SLOT( addPressed() ) ); + connect( dlg->pbChange, TQT_SIGNAL( clicked() ), TQT_SLOT( changePressed() ) ); + connect( dlg->pbDelete, TQT_SIGNAL( clicked() ), TQT_SLOT( deletePressed() ) ); + connect( dlg->pbDeleteAll, TQT_SIGNAL( clicked() ), TQT_SLOT( deleteAllPressed() ) ); load(); } @@ -90,23 +90,23 @@ void UserAgentDlg::load() m_config = new KConfig("kio_httprc", false, false); m_provider = new FakeUASProvider(); - QStringList list = m_config->groupList(); - for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) + TQStringList list = m_config->groupList(); + for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { if ( (*it) == "<default>") continue; - QString domain = *it; + TQString domain = *it; m_config->setGroup(*it); - QString agentStr = m_config->readEntry("UserAgent"); + TQString agentStr = m_config->readEntry("UserAgent"); if (!agentStr.isEmpty()) { - QString realName = m_provider->aliasStr(agentStr); - (void) new QListViewItem( dlg->lvDomainPolicyList, domain.lower(), realName, agentStr ); + TQString realName = m_provider->aliasStr(agentStr); + (void) new TQListViewItem( dlg->lvDomainPolicyList, domain.lower(), realName, agentStr ); } } // Update buttons and checkboxes... - m_config->setGroup(QString::null); + m_config->setGroup(TQString::null); bool b = m_config->readBoolEntry("SendUserAgent", true); dlg->cbSendUAString->setChecked( b ); m_ua_keys = m_config->readEntry("UserAgentKeys", DEFAULT_USER_AGENT_KEYS).lower(); @@ -148,28 +148,28 @@ void UserAgentDlg::defaults() void UserAgentDlg::save() { - QStringList deleteList; + TQStringList deleteList; // This is tricky because we have to take care to delete entries // as well. - QStringList list = m_config->groupList(); - for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) + TQStringList list = m_config->groupList(); + for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { if ( (*it) == "<default>") continue; - QString domain = *it; + TQString domain = *it; m_config->setGroup(*it); if (m_config->hasKey("UserAgent")) deleteList.append(*it); } - QListViewItem* it = dlg->lvDomainPolicyList->firstChild(); + TQListViewItem* it = dlg->lvDomainPolicyList->firstChild(); while(it) { - QString domain = it->text(0); + TQString domain = it->text(0); if (domain[0] == '.') domain = domain.mid(1); - QString userAgent = it->text(2); + TQString userAgent = it->text(2); m_config->setGroup(domain); m_config->writeEntry("UserAgent", userAgent); deleteList.remove(domain); @@ -177,7 +177,7 @@ void UserAgentDlg::save() it = it->nextSibling(); } - m_config->setGroup(QString::null); + m_config->setGroup(TQString::null); m_config->writeEntry("SendUserAgent", dlg->cbSendUAString->isChecked()); m_config->writeEntry("UserAgentKeys", m_ua_keys ); m_config->sync(); @@ -187,7 +187,7 @@ void UserAgentDlg::save() { // Remove entries from local file. KSimpleConfig cfg("kio_httprc"); - for ( QStringList::Iterator it = deleteList.begin(); + for ( TQStringList::Iterator it = deleteList.begin(); it != deleteList.end(); ++it ) { cfg.setGroup(*it); @@ -198,12 +198,12 @@ void UserAgentDlg::save() m_config->reparseConfiguration(); // Check everything is gone, reset to blank otherwise. - for ( QStringList::Iterator it = deleteList.begin(); + for ( TQStringList::Iterator it = deleteList.begin(); it != deleteList.end(); ++it ) { m_config->setGroup(*it); if (m_config->hasKey("UserAgent")) - m_config->writeEntry("UserAgent", QString::null); + m_config->writeEntry("UserAgent", TQString::null); } m_config->sync(); } @@ -213,16 +213,16 @@ void UserAgentDlg::save() emit changed( false ); } -bool UserAgentDlg::handleDuplicate( const QString& site, - const QString& identity, - const QString& alias ) +bool UserAgentDlg::handleDuplicate( const TQString& site, + const TQString& identity, + const TQString& alias ) { - QListViewItem* item = dlg->lvDomainPolicyList->firstChild(); + TQListViewItem* item = dlg->lvDomainPolicyList->firstChild(); while ( item != 0 ) { if ( item->text(0) == site ) { - QString msg = i18n("<qt><center>Found an existing identification for" + TQString msg = i18n("<qt><center>Found an existing identification for" "<br/><b>%1</b><br/>" "Do you want to replace it?</center>" "</qt>").arg(site); @@ -247,11 +247,11 @@ void UserAgentDlg::addPressed() { UAProviderDlg pdlg ( i18n("Add Identification"), this, m_provider ); - if ( pdlg.exec() == QDialog::Accepted ) + if ( pdlg.exec() == TQDialog::Accepted ) { if ( !handleDuplicate( pdlg.siteName(), pdlg.identity(), pdlg.alias() ) ) { - QListViewItem* index = new QListViewItem( dlg->lvDomainPolicyList, + TQListViewItem* index = new TQListViewItem( dlg->lvDomainPolicyList, pdlg.siteName(), pdlg.identity(), pdlg.alias() ); @@ -266,18 +266,18 @@ void UserAgentDlg::changePressed() { UAProviderDlg pdlg ( i18n("Modify Identification"), this, m_provider ); - QListViewItem *index = dlg->lvDomainPolicyList->currentItem(); + TQListViewItem *index = dlg->lvDomainPolicyList->currentItem(); if(!index) return; - QString old_site = index->text(0); + TQString old_site = index->text(0); pdlg.setSiteName( old_site ); pdlg.setIdentity( index->text(1) ); - if ( pdlg.exec() == QDialog::Accepted ) + if ( pdlg.exec() == TQDialog::Accepted ) { - QString new_site = pdlg.siteName(); + TQString new_site = pdlg.siteName(); if ( new_site == old_site || !handleDuplicate( new_site, pdlg.identity(), pdlg.alias() ) ) { @@ -291,8 +291,8 @@ void UserAgentDlg::changePressed() void UserAgentDlg::deletePressed() { - QListViewItem* item; - QListViewItem* nextItem = 0; + TQListViewItem* item; + TQListViewItem* nextItem = 0; item = dlg->lvDomainPolicyList->firstChild (); @@ -353,7 +353,7 @@ void UserAgentDlg::changeDefaultUAModifiers( int ) dlg->cbOSVersion->setEnabled(m_ua_keys.contains('o')); - QString modVal = KProtocolManager::defaultUserAgent( m_ua_keys ); + TQString modVal = KProtocolManager::defaultUserAgent( m_ua_keys ); if ( dlg->leDefaultId->text() != modVal ) { dlg->leDefaultId->setSqueezedText(modVal); @@ -363,7 +363,7 @@ void UserAgentDlg::changeDefaultUAModifiers( int ) void UserAgentDlg::selectionChanged () { - QListViewItem* item; + TQListViewItem* item; d_itemsSelected = 0; item = dlg->lvDomainPolicyList->firstChild (); @@ -378,7 +378,7 @@ void UserAgentDlg::selectionChanged () updateButtons (); } -QString UserAgentDlg::quickHelp() const +TQString UserAgentDlg::quickHelp() const { return i18n( "<h1>Browser Identification</h1> " "The browser-identification module allows you to have full " diff --git a/kcontrol/kio/useragentdlg.h b/kcontrol/kio/useragentdlg.h index 56534e142..f5b20ac0d 100644 --- a/kcontrol/kio/useragentdlg.h +++ b/kcontrol/kio/useragentdlg.h @@ -36,13 +36,13 @@ class UserAgentDlg : public KCModule Q_OBJECT public: - UserAgentDlg ( QWidget * parent = 0) ; + UserAgentDlg ( TQWidget * parent = 0) ; ~UserAgentDlg(); virtual void load(); virtual void save(); virtual void defaults(); - QString quickHelp() const; + TQString quickHelp() const; private slots: void updateButtons(); @@ -57,7 +57,7 @@ private slots: void changeDefaultUAModifiers( int ); private: - bool handleDuplicate( const QString&, const QString&, const QString& ); + bool handleDuplicate( const TQString&, const TQString&, const TQString& ); enum { SHOW_OS = 0, @@ -68,7 +68,7 @@ private: }; // Useragent modifiers... - QString m_ua_keys; + TQString m_ua_keys; // Fake user-agent modifiers... FakeUASProvider* m_provider; |