faure at kde.org
Mon Jan 2 10:28:09 GMT 2006
On Saturday 31 December 2005 12:31, Richard Lärkäng wrote:
> I ran in to the same problem when checking if audiocd:/ worked. The problem
> seems to be that in KDE 3 the qt args are added anyway (in
> KApplication::addCmdLineOptions) so the assert wasn't triggered. But in
> kdelibs from trunk the qt args are only added if requested (KCmdLineArgs::
> So I made a patch so it only checks for the qt args in qt_argc and qt_argv if
> they are requested, and otherwise returns just the application name as argv.
Patch looks good to me.
It makes me realize that we leak qt_argv, but we always did, nothing new there.
Hmm. If we want to get rid of KApplication for kde4, then we'll need to simply pass
all argc/argv from main to QApp, and then KCmdLineArgs::qt_arg[cv] can go away.
I'm not sure why KCmdLineArgs took care of filtering out non-qt options, when
Qt can do that by itself already.
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
More information about the kde-core-devel