diff options
author | Timothy Pearson <[email protected]> | 2014-10-02 23:12:28 -0500 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2014-10-02 23:12:28 -0500 |
commit | 34cc40d9fb8f21485a467c2cfaba6fd0b063719f (patch) | |
tree | 57f99591753b14a358a7c859003a3eb6f858e9a8 | |
parent | c6c4c0e2a1ddecae1da3c8156dc2c97f40189f3a (diff) | |
download | tdebase-34cc40d9fb8f21485a467c2cfaba6fd0b063719f.tar.gz tdebase-34cc40d9fb8f21485a467c2cfaba6fd0b063719f.zip |
Fix layout issues when starting root tdecmshell plugins
This resolves Bug 1888
-rw-r--r-- | kcontrol/kcontrol/modules.cpp | 21 | ||||
-rw-r--r-- | kcontrol/kcontrol/modules.h | 1 |
2 files changed, 5 insertions, 17 deletions
diff --git a/kcontrol/kcontrol/modules.cpp b/kcontrol/kcontrol/modules.cpp index 302949025..e40d62568 100644 --- a/kcontrol/kcontrol/modules.cpp +++ b/kcontrol/kcontrol/modules.cpp @@ -48,7 +48,7 @@ template class TQPtrList<ConfigModule>; ConfigModule::ConfigModule(const KService::Ptr &s) : TDECModuleInfo(s), _changed(false), _module(0), _embedWidget(0), - _rootProcess(0), _embedLayout(0), _embedFrame(0), _embedStack(0) + _rootProcess(0), _embedFrame(0), _embedStack(0) { } @@ -102,14 +102,11 @@ void ConfigModule::deleteClient() delete _embedFrame; _embedFrame = 0; kapp->syncX(); - + if(_module) _module->close(true); _module = 0; - delete _embedLayout; - _embedLayout = 0; - TDECModuleLoader::unloadModule(*this); _changed = false; } @@ -137,21 +134,18 @@ void ConfigModule::runAsRoot() delete _rootProcess; delete _embedWidget; - delete _embedLayout; delete _embedStack; // create an embed widget that will embed the // tdecmshell running as root - _embedLayout = new TQVBoxLayout(_module->parentWidget()); - _embedFrame = new TQVBox( _module->parentWidget() ); + TQWidget* parentWidget = _module->parentWidget(); + _embedFrame = new TQVBox( parentWidget ); _embedFrame->setFrameStyle( TQFrame::Box | TQFrame::Raised ); TQPalette pal( red ); - pal.setColor( TQColorGroup::Background, - _module->parentWidget()->colorGroup().background() ); + pal.setColor( TQColorGroup::Background, parentWidget->colorGroup().background() ); _embedFrame->setPalette( pal ); _embedFrame->setLineWidth( 2 ); _embedFrame->setMidLineWidth( 2 ); - _embedLayout->addWidget(_embedFrame,1); // cannot reparent anything else inside QXEmbed, so put the busy label separately _embedStack = new TQWidgetStack(_embedFrame); _embedWidget = new KControlEmbed(_embedStack); @@ -220,8 +214,6 @@ void ConfigModule::runAsRoot() _embedStack = 0; delete _embedFrame; _embedWidget = 0; - delete _embedLayout; - _embedLayout = 0; _module->show(); } @@ -237,9 +229,6 @@ void ConfigModule::rootExited(TDEProcess *) delete _rootProcess; _rootProcess = 0; - delete _embedLayout; - _embedLayout = 0; - delete _module; _module=0; diff --git a/kcontrol/kcontrol/modules.h b/kcontrol/kcontrol/modules.h index b5b4a8085..63ddee668 100644 --- a/kcontrol/kcontrol/modules.h +++ b/kcontrol/kcontrol/modules.h @@ -81,7 +81,6 @@ private: ProxyWidget *_module; QXEmbed *_embedWidget; TDEProcess *_rootProcess; - TQVBoxLayout *_embedLayout; TQVBox *_embedFrame; TQWidgetStack *_embedStack; |