bastian at kde.org
Mon Jan 2 20:46:01 GMT 2006
On Monday 02 January 2006 02:28, you wrote:
> 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:: addStdCmdLineOptions)
> > 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
> 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
It's to handle test cases like these:
echo hello > '--reverse'; kedit -- --reverse // Open file '--reverse'
kedit --reverse // Activates reverse layout
kedit -reverse // Activates reverse layout
kedit --caption --reverse // Sets title to '--reverse'
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
More information about the kde-core-devel