diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-18 17:00:31 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-18 17:00:31 +0000 |
commit | 395a904bff7b4d6ead445c342f7ac0c5fbf29121 (patch) | |
tree | 9829cadb79d2cc7c29a940627fadb28b11e54150 /konq-plugins/khtmlsettingsplugin | |
parent | 399f47c376fdf4d19192732a701ea9578d11619d (diff) | |
download | tdeaddons-395a904bff7b4d6ead445c342f7ac0c5fbf29121.tar.gz tdeaddons-395a904bff7b4d6ead445c342f7ac0c5fbf29121.zip |
TQt4 port kdeaddons
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1237404 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'konq-plugins/khtmlsettingsplugin')
-rw-r--r-- | konq-plugins/khtmlsettingsplugin/settingsplugin.cpp | 30 | ||||
-rw-r--r-- | konq-plugins/khtmlsettingsplugin/settingsplugin.h | 3 |
2 files changed, 17 insertions, 16 deletions
diff --git a/konq-plugins/khtmlsettingsplugin/settingsplugin.cpp b/konq-plugins/khtmlsettingsplugin/settingsplugin.cpp index 989ec43..3d52c5b 100644 --- a/konq-plugins/khtmlsettingsplugin/settingsplugin.cpp +++ b/konq-plugins/khtmlsettingsplugin/settingsplugin.cpp @@ -39,9 +39,9 @@ static const KAboutData aboutdata("khtmlsettingsplugin", I18N_NOOP("HTML Setting K_EXPORT_COMPONENT_FACTORY( libkhtmlsettingsplugin, SettingsPluginFactory( &aboutdata ) ) -SettingsPlugin::SettingsPlugin( TQObject* parent, const char* name, +SettingsPlugin::SettingsPlugin( TQObject* tqparent, const char* name, const TQStringList & ) - : KParts::Plugin( parent, name ), mConfig(0) + : KParts::Plugin( tqparent, name ), mConfig(0) { setInstance(SettingsPluginFactory::instance()); @@ -118,13 +118,13 @@ SettingsPlugin::~SettingsPlugin() void SettingsPlugin::showPopup() { - if( !parent() || !parent()->inherits("KHTMLPart")) + if( !tqparent() || !tqparent()->inherits("KHTMLPart")) return; if (!mConfig) mConfig = new KConfig("settingspluginrc", false, false); - KHTMLPart *part = static_cast<KHTMLPart *>( parent() ); + KHTMLPart *part = static_cast<KHTMLPart *>( tqparent() ); KProtocolManager::reparseConfiguration(); bool cookies = cookiesEnabled( part->url().url() ); @@ -159,28 +159,28 @@ void SettingsPlugin::showPopup() void SettingsPlugin::toggleJava() { - if( parent() && parent()->inherits("KHTMLPart")) + if( tqparent() && tqparent()->inherits("KHTMLPart")) { - KHTMLPart *part = static_cast<KHTMLPart *>(parent()); + KHTMLPart *part = static_cast<KHTMLPart *>(tqparent()); part->setJavaEnabled( ((KToggleAction*)actionCollection()->action("java"))->isChecked() ); } } void SettingsPlugin::toggleJavascript() { - if( parent() && parent()->inherits("KHTMLPart")) + if( tqparent() && tqparent()->inherits("KHTMLPart")) { - KHTMLPart *part = static_cast<KHTMLPart *>(parent()); + KHTMLPart *part = static_cast<KHTMLPart *>(tqparent()); part->setJScriptEnabled( ((KToggleAction*)actionCollection()->action("javascript"))->isChecked() ); } } void SettingsPlugin::toggleCookies() { - if( !parent() || !parent()->inherits("KHTMLPart")) + if( !tqparent() || !tqparent()->inherits("KHTMLPart")) return; - KHTMLPart *part = static_cast<KHTMLPart *>( parent() ); + KHTMLPart *part = static_cast<KHTMLPart *>( tqparent() ); TQString advice; bool enable = ((KToggleAction*)actionCollection()->action("cookies"))->isChecked(); @@ -203,18 +203,18 @@ void SettingsPlugin::toggleCookies() void SettingsPlugin::togglePlugins() { - if( parent() && parent()->inherits("KHTMLPart")) + if( tqparent() && tqparent()->inherits("KHTMLPart")) { - KHTMLPart *part = static_cast<KHTMLPart *>(parent()); + KHTMLPart *part = static_cast<KHTMLPart *>(tqparent()); part->setPluginsEnabled( ((KToggleAction*)actionCollection()->action("plugins"))->isChecked() ); } } void SettingsPlugin::toggleImageLoading() { - if( parent() && parent()->inherits("KHTMLPart")) + if( tqparent() && tqparent()->inherits("KHTMLPart")) { - KHTMLPart *part = static_cast<KHTMLPart *>(parent()); + KHTMLPart *part = static_cast<KHTMLPart *>(tqparent()); part->setAutoloadImages( ((KToggleAction*)actionCollection()->action("imageloading"))->isChecked() ); } } @@ -229,7 +229,7 @@ bool SettingsPlugin::cookiesEnabled( const TQString& url ) bool enabled = false; - if ( replyType == "TQString" ) + if ( replyType == TQSTRING_OBJECT_NAME_STRING ) { TQString advice; TQDataStream s( reply, IO_ReadOnly ); diff --git a/konq-plugins/khtmlsettingsplugin/settingsplugin.h b/konq-plugins/khtmlsettingsplugin/settingsplugin.h index 63be54d..77fdc09 100644 --- a/konq-plugins/khtmlsettingsplugin/settingsplugin.h +++ b/konq-plugins/khtmlsettingsplugin/settingsplugin.h @@ -28,8 +28,9 @@ class KConfig; class SettingsPlugin : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - SettingsPlugin( TQObject* parent, const char* name, + SettingsPlugin( TQObject* tqparent, const char* name, const TQStringList & ); virtual ~SettingsPlugin(); |