CVS commit by dagerbo: Defer initialization. Makes the plugin load faster and gives the VCS plugin time to appear before the FileTree asks for it. (A better solution is needed.) M +13 -6 fileviewpart.cpp 1.42 M +1 -0 fileviewpart.h 1.15 --- kdevelop/parts/fileview/fileviewpart.cpp #1.41:1.42 @@ -65,8 +65,4 @@ FileViewPart::FileViewPart(QObject *pare // setXMLFile("kdevfileview.rc"); - m_widget = new PartWidget( this ); - m_widget->setIcon( SmallIcon( info()->icon() ) ); - mainWindow()->embedSelectView( m_widget, i18n("File Tree"), i18n("File tree view in the project directory") ); - _configProxy = new ConfigWidgetProxy( core() ); _configProxy->createProjectConfigPage( i18n("File Tree"), FILETREE_OPTIONS, info()->icon() ); @@ -74,4 +70,15 @@ FileViewPart::FileViewPart(QObject *pare this, SLOT(insertConfigWidget(const KDialogBase*, QWidget*, unsigned int )) ); + QTimer::singleShot( 1000, this, SLOT(init()) ); +} + +/////////////////////////////////////////////////////////////////////////////// + +void FileViewPart::init( ) +{ + m_widget = new PartWidget( this ); + m_widget->setIcon( SmallIcon( info()->icon() ) ); + mainWindow()->embedSelectView( m_widget, i18n("File Tree"), i18n("File tree view in the project directory") ); + loadSettings(); --- kdevelop/parts/fileview/fileviewpart.h #1.14:1.15 @@ -37,4 +37,5 @@ public: private slots: void insertConfigWidget( const KDialogBase* dlg, QWidget * page, unsigned int ); + void init(); private: