SVN commit 1181420 by dfaure: Unittest which showed that 252911 was not really a bug, more like a bad rc file. CCBUG: 252911 M +48 -0 kxmlgui_unittest.cpp M +1 -0 kxmlgui_unittest.h --- trunk/KDE/kdelibs/kdeui/tests/kxmlgui_unittest.cpp #1181419:1181420 @@ -409,6 +409,54 @@ << "other_file_action"); } +void KXmlGui_UnitTest::testPartMergingSettings() // #252911 +{ + const QByteArray hostXml = + "\n" + "\n" + "\n" + "\n" +// The solution was to remove the duplicated definition +// " &Settings\n" +// " \n" +// " \n" +// " \n" +// " \n" +// " \n" +// " \n" + "\n"; + TestGuiClient hostClient; + hostClient.createActions(QStringList() << "options_configure_keybinding" << "options_configure_toolbars"); + hostClient.createGUI(hostXml, true /*ui_standards.rc*/); + //kDebug() << hostClient.domDocument().toString(); + QMainWindow mainWindow; + KXMLGUIBuilder builder(&mainWindow); + KXMLGUIFactory factory(&builder); + factory.addClient(&hostClient); + QWidget* settingsMenu = qobject_cast(factory.container("settings", &hostClient)); + QVERIFY(settingsMenu); + //debugActions(settingsMenu->actions()); + + const QByteArray partXml = + "\n" + "\n" + "\n" + "\n" + " &Settings\n" + " \n" + " \n" + "\n"; + TestGuiClient partClient(partXml); + partClient.createActions(QStringList() << "configure_klinkstatus"); + factory.addClient(&partClient); + //debugActions(settingsMenu->actions()); + checkActions(settingsMenu->actions(), QStringList() + << "separator" // that's ok, QMenuPrivate::filterActions won't show it + << "options_configure_keybinding" + << "options_configure_toolbars" + << "configure_klinkstatus"); +} + void KXmlGui_UnitTest::testUiStandardsMerging_data() { QTest::addColumn("xml"); --- trunk/KDE/kdelibs/kdeui/tests/kxmlgui_unittest.h #1181419:1181420 @@ -33,6 +33,7 @@ void testVersionHandlerNewVersionNothingKept(); void testVersionHandlerNewVersionUserChanges(); void testPartMerging(); + void testPartMergingSettings(); void testUiStandardsMerging_data(); void testUiStandardsMerging(); void testActionListAndSeparator();