diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:22:56 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:22:56 +0000 |
commit | 7346aee26bf190a7e70333c40fab4caca847cd27 (patch) | |
tree | 4b019b434f88dcc3eeaafe1d3f26240b4c4718e8 /konq-plugins/khtmlsettingsplugin | |
parent | 23a3d3aa5b44cbdf305495919866d9dbf4f6da54 (diff) | |
download | tdeaddons-7346aee26bf190a7e70333c40fab4caca847cd27.tar.gz tdeaddons-7346aee26bf190a7e70333c40fab4caca847cd27.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1157634 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'konq-plugins/khtmlsettingsplugin')
-rw-r--r-- | konq-plugins/khtmlsettingsplugin/settingsplugin.cpp | 60 | ||||
-rw-r--r-- | konq-plugins/khtmlsettingsplugin/settingsplugin.h | 6 |
2 files changed, 33 insertions, 33 deletions
diff --git a/konq-plugins/khtmlsettingsplugin/settingsplugin.cpp b/konq-plugins/khtmlsettingsplugin/settingsplugin.cpp index 74f2613..989ec43 100644 --- a/konq-plugins/khtmlsettingsplugin/settingsplugin.cpp +++ b/konq-plugins/khtmlsettingsplugin/settingsplugin.cpp @@ -39,8 +39,8 @@ static const KAboutData aboutdata("khtmlsettingsplugin", I18N_NOOP("HTML Setting K_EXPORT_COMPONENT_FACTORY( libkhtmlsettingsplugin, SettingsPluginFactory( &aboutdata ) ) -SettingsPlugin::SettingsPlugin( QObject* parent, const char* name, - const QStringList & ) +SettingsPlugin::SettingsPlugin( TQObject* parent, const char* name, + const TQStringList & ) : KParts::Plugin( parent, name ), mConfig(0) { @@ -57,40 +57,40 @@ SettingsPlugin::SettingsPlugin( QObject* parent, const char* name, action = new KToggleAction( i18n("Java&Script"), 0, - this, SLOT(toggleJavascript()), + this, TQT_SLOT(toggleJavascript()), actionCollection(), "javascript" ); menu->insert( action ); action = new KToggleAction( i18n("&Java"), 0, - this, SLOT(toggleJava()), + this, TQT_SLOT(toggleJava()), actionCollection(), "java" ); menu->insert( action ); action = new KToggleAction( i18n("&Cookies"), 0, - this, SLOT(toggleCookies()), + this, TQT_SLOT(toggleCookies()), actionCollection(), "cookies" ); menu->insert( action ); action = new KToggleAction( i18n("&Plugins"), 0, - this, SLOT(togglePlugins()), + this, TQT_SLOT(togglePlugins()), actionCollection(), "plugins" ); menu->insert( action ); action = new KToggleAction( i18n("Autoload &Images"), 0, - this, SLOT(toggleImageLoading()), + this, TQT_SLOT(toggleImageLoading()), actionCollection(), "imageloading" ); menu->insert( action ); menu->insert( new KActionSeparator(actionCollection()) ); action = new KToggleAction( i18n("Enable Pro&xy"), 0, - this, SLOT(toggleProxy()), + this, TQT_SLOT(toggleProxy()), actionCollection(), "useproxy" ); action->setCheckedState(i18n("Disable Pro&xy")); menu->insert( action ); action = new KToggleAction( i18n("Enable Cac&he"), 0, - this, SLOT(toggleCache()), + this, TQT_SLOT(toggleCache()), actionCollection(), "usecache" ); action->setCheckedState(i18n("Disable Cac&he")); menu->insert( action ); @@ -99,16 +99,16 @@ SettingsPlugin::SettingsPlugin( QObject* parent, const char* name, KSelectAction *sAction = new KSelectAction( i18n("Cache Po&licy"), 0, 0, 0, actionCollection(), "cachepolicy" ); - QStringList policies; + TQStringList policies; policies += i18n( "&Keep Cache in Sync" ); policies += i18n( "&Use Cache if Possible" ); policies += i18n( "&Offline Browsing Mode" ); sAction->setItems( policies ); - connect( sAction, SIGNAL( activated( int ) ), SLOT( cachePolicyChanged(int) ) ); + connect( sAction, TQT_SIGNAL( activated( int ) ), TQT_SLOT( cachePolicyChanged(int) ) ); menu->insert( sAction ); - connect( menu->popupMenu(), SIGNAL( aboutToShow() ), SLOT( showPopup() )); + connect( menu->popupMenu(), TQT_SIGNAL( aboutToShow() ), TQT_SLOT( showPopup() )); } SettingsPlugin::~SettingsPlugin() @@ -182,16 +182,16 @@ void SettingsPlugin::toggleCookies() KHTMLPart *part = static_cast<KHTMLPart *>( parent() ); - QString advice; + TQString advice; bool enable = ((KToggleAction*)actionCollection()->action("cookies"))->isChecked(); advice = enable ? "Accept" : "Reject"; - QCString replyType; - QByteArray data, replyData; - QDataStream stream( data, IO_WriteOnly ); + TQCString replyType; + TQByteArray data, replyData; + TQDataStream stream( data, IO_WriteOnly ); stream << part->url().url() << advice; bool ok = kapp->dcopClient()->call( "kded", "kcookiejar", - "setDomainAdvice(QString,QString)", + "setDomainAdvice(TQString,TQString)", data, replyType, replyData, true ); if ( !ok ) @@ -219,20 +219,20 @@ void SettingsPlugin::toggleImageLoading() } } -bool SettingsPlugin::cookiesEnabled( const QString& url ) +bool SettingsPlugin::cookiesEnabled( const TQString& url ) { - QByteArray data, reply; - QCString replyType; - QDataStream stream( data, IO_WriteOnly ); + TQByteArray data, reply; + TQCString replyType; + TQDataStream stream( data, IO_WriteOnly ); stream << url; - kapp->dcopClient()->call( "kcookiejar", "kcookiejar", "getDomainAdvice(QString)", data, replyType, reply, true ); + kapp->dcopClient()->call( "kcookiejar", "kcookiejar", "getDomainAdvice(TQString)", data, replyType, reply, true ); bool enabled = false; - if ( replyType == "QString" ) + if ( replyType == "TQString" ) { - QString advice; - QDataStream s( reply, IO_ReadOnly ); + TQString advice; + TQDataStream s( reply, IO_ReadOnly ); s >> advice; enabled = ( advice == "Accept" ); if ( !enabled && advice == "Dunno" ) { @@ -288,7 +288,7 @@ void SettingsPlugin::toggleCache() void SettingsPlugin::cachePolicyChanged( int p ) { - QString policy; + TQString policy; switch ( p ) { case 0: @@ -312,17 +312,17 @@ void SettingsPlugin::cachePolicyChanged( int p ) void SettingsPlugin::updateIOSlaves() { - QByteArray data; - QDataStream stream( data, IO_WriteOnly ); + TQByteArray data; + TQDataStream stream( data, IO_WriteOnly ); DCOPClient* client = kapp->dcopClient(); if ( !client->isAttached() ) client->attach(); - QString protocol; // null -> all of them + TQString protocol; // null -> all of them stream << protocol; client->send( "*", "KIO::Scheduler", - "reparseSlaveConfiguration(QString)", data ); + "reparseSlaveConfiguration(TQString)", data ); } #include "settingsplugin.moc" diff --git a/konq-plugins/khtmlsettingsplugin/settingsplugin.h b/konq-plugins/khtmlsettingsplugin/settingsplugin.h index 367846b..63be54d 100644 --- a/konq-plugins/khtmlsettingsplugin/settingsplugin.h +++ b/konq-plugins/khtmlsettingsplugin/settingsplugin.h @@ -29,12 +29,12 @@ class SettingsPlugin : public KParts::Plugin { Q_OBJECT public: - SettingsPlugin( QObject* parent, const char* name, - const QStringList & ); + SettingsPlugin( TQObject* parent, const char* name, + const TQStringList & ); virtual ~SettingsPlugin(); private: - bool cookiesEnabled( const QString& url ); + bool cookiesEnabled( const TQString& url ); void updateIOSlaves(); private slots: |