[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/kdeui/dialogs
From: David Faure <faure () kde ! org>
Date: 2010-11-18 23:56:12
Message-ID: 20101118235612.98D8CAC8A0 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1198571 by dfaure:
Cleanups:
- Rename "non-kpart" to "old style" (filename-based, doesn't support any child xmlguiclients)
- Rename "kpart" to "from [xmlgui]factory", since that's what this is really about
- Remove outdated comment about code that was causing 97572, seems Qt got smart enough to not
change the scroll position on the listview when we're clearing and re-filling it.
M +11 -9 kedittoolbar.cpp
--- trunk/KDE/kdelibs/kdeui/dialogs/kedittoolbar.cpp #1198570:1198571
@@ -391,8 +391,8 @@
void setupLayout();
- void initNonKPart( const QString& file, bool global, const QString& defaultToolbar );
- void initKPart( KXMLGUIFactory* factory, const QString& defaultToolbar );
+ void initOldStyle( const QString& file, bool global, const QString& defaultToolbar );
+ void initFromFactory( KXMLGUIFactory* factory, const QString& defaultToolbar );
void loadToolBarCombo( const QString& defaultToolbar );
void loadActions(const QDomElement& elem);
@@ -707,15 +707,15 @@
void KEditToolBarWidget::load( const QString& file, bool global, const QString& defaultToolBar )
{
- d->initNonKPart( file, global, defaultToolBar );
+ d->initOldStyle( file, global, defaultToolBar );
}
void KEditToolBarWidget::load( KXMLGUIFactory* factory, const QString& defaultToolBar )
{
- d->initKPart( factory, defaultToolBar );
+ d->initFromFactory( factory, defaultToolBar );
}
-void KEditToolBarWidgetPrivate::initNonKPart( const QString& resourceFile,
+void KEditToolBarWidgetPrivate::initOldStyle( const QString& resourceFile,
bool global,
const QString& defaultToolBar )
{
@@ -755,7 +755,7 @@
m_widget->setMinimumSize( m_widget->sizeHint() );
}
-void KEditToolBarWidgetPrivate::initKPart( KXMLGUIFactory* factory,
+void KEditToolBarWidgetPrivate::initFromFactory(KXMLGUIFactory* factory,
const QString& defaultToolBar )
{
//TODO: make sure we can call this multiple times?
@@ -852,7 +852,7 @@
d->m_factory->removeClient(client);
}
- KXMLGUIClient *firstClient = clients.first();
+// KXMLGUIClient *firstClient = clients.first();
// now, rebuild the gui from the first to the last
//kDebug(240) << "rebuilding the gui";
@@ -865,12 +865,16 @@
// passing an empty stream forces the clients to reread the XML
client->setXMLGUIBuildDocument( QDomDocument() );
+#if 0 // This would be only for old-style construction, but then m_factory is NULL !?!?
// for the shell, merge in ui_standards.rc
if ( client == firstClient ) // same assumption as in the ctor: first==shell
client->setXMLFile(KStandardDirs::locate("config", "ui/ui_standards.rc"));
// and this forces it to use the *new* XML file
client->setXMLFile( file, client == firstClient /* merge if shell */ );
+#else
+ client->reloadXML();
+#endif
}
}
@@ -1279,8 +1283,6 @@
// we're modified, so let this change
emit m_widget->enableOk(true);
- // TODO: #### this causes #97572.
- // It would be better to just "delete item; loadActions( ... , ActiveListOnly );" or something.
slotToolBarSelected( m_toolbarCombo->currentIndex() );
selectActiveItem( internalName );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic