From kde-commits Fri Nov 11 15:37:02 2005 From: Laurent Montel Date: Fri, 11 Nov 2005 15:37:02 +0000 To: kde-commits Subject: KDE/kdelibs Message-Id: <1131723422.625838.14542.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=113172345003089 SVN commit 479735 by mlaurent: Backport: read all argument (necessary for isSet("icons") which is into kde standard option) M +0 -2 kcmshell/main.cpp M +10 -3 kdecore/kcmdlineargs.cpp --- trunk/KDE/kdelibs/kcmshell/main.cpp #479734:479735 @@ -60,12 +60,10 @@ { "lang ", I18N_NOOP("Specify a particular language"), 0 }, { "embed ", I18N_NOOP("Embeds the module with buttons in window with id "), 0 }, { "embed-proxy ", I18N_NOOP("Embeds the module without buttons in window with id "), 0 }, - { "icon ", I18N_NOOP("Use 'icon' as the application icon"), 0}, { "silent", I18N_NOOP("Do not display main window"), 0 }, KCmdLineLastOption }; -#warning "fix parse icon argument which is into kcmargument too"; static void listModules(const QString &baseGroup) { --- trunk/KDE/kdelibs/kdecore/kcmdlineargs.cpp #479734:479735 @@ -1204,10 +1204,17 @@ // Look up the default. const char *opt_name; const char *def; - bool dummy = true; QByteArray opt = _opt; - int result = ::findOption( options, opt, opt_name, def, dummy) & ~4; - + int result = 0; + KCmdLineArgsList::Iterator args = argsList->begin(); + while (args != argsList->end()) + { + bool dummy = true; + result = ::findOption((*args)->options, opt, opt_name, def, dummy) & ~4; + if (result) break; + ++args; + } + if (result == 0) { fprintf(stderr, "\n\nFAILURE (KCmdLineArgs):\n");