[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Can't add certain cmdline-option
From:       Christian Nitschkowski <segfault_ii () web ! de>
Date:       2003-09-28 20:29:59
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi!
I've encountered a problem I can't explain.
Perhaps someone on this list is able to explain it to me.

I wanted today to add some command-line options to my app using

static KCmdLineOptions options[] =
    {
       { "autostart", I18N_NOOP( "Try to start an autostart-instance." ), 0 },
       { "splash", I18N_NOOP( "Show the splash" ), 0 },
       { "nosplash", I18N_NOOP( "Don't show the splash" ), 0 },
       { 0, 0, 0 }
    };

This is followed by
  KCmdLineArgs::init( argc, argv, &about );
  KCmdLineArgs::addCmdLineOptions( options );

  KCmdLineArgs * args = KCmdLineArgs::parsedArgs();

  if ( args->isSet( "autostart" ) ) {
    // bla bla
    }
  if ( args->isSet( "splash" ) ) {
    // bla bla
    }
  if ( args->isSet( "nosplash" ) ) {
    // bla bla
    }


Now, when I try to run the app after compiling, I get this:

FAILURE (KCmdLineArgs):
Application requests for isSet("nosplash") but the "nosplash" option
has never been specified via addCmdLineOptions( ... )

ERROR: Communication problem with kinitiator, it probably crashed.

This is rather strange, because this only happens when I add an option that is 
named "nosplash" or "no-splash".

When I change the string from "nosplash" to "blabla" it works just fine.

I now changed the string to "disable-splash" and it works as expected.

Do you have this problem, too?
What is going wrong there?

Regards
Christian Nitschkowski

- -- 
- --: Christian Nitschkowski <segfault_ii@web.de> :--
- --: Jabber: segfault_ii@a-message.de :--
- --: ICQ#: 66190597 :--

Go where the silence is and say something
- - Chumbawamba
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)

iD8DBQE/d0TH119BwfrC2gIRAts/AKDF9A0n6KgzSa7qr2KPMlhvZ5rOeACeOnUC
gSBbKT3X4vVEsxWtQNVSilU=
=y4Nz
-----END PGP SIGNATURE-----

 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic