[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1345740 - /subversion/trunk/subversion/libsvn_auth_kwallet/kwallet.cpp

From: Greg Stein <gstein_at_gmail.com>
Date: Sun, 3 Jun 2012 18:14:07 -0400

On Jun 3, 2012 2:54 PM, <peters_at_apache.org> wrote:
>...
> +++ subversion/trunk/subversion/libsvn_auth_kwallet/kwallet.cpp Sun Jun
 3 18:54:26 2012
> @@ -60,6 +60,9 @@
> /* KWallet simple provider, puts passwords in KWallet
 */
>
 /*-----------------------------------------------------------------------*/
>
> +static int q_argc = 1;
> +static char q_argv0[] = "svn"; // Build non-const char * from string
constant
> +static char *q_argv[] = { q_argv0 };
>
> static const char *
> get_application_name(apr_hash_t *parameters,
> @@ -212,12 +215,11 @@ kwallet_password_get(svn_boolean_t *done
> QCoreApplication *app;
> if (! qApp)
> {
> - int argc = 1;
> - app = new QCoreApplication(argc, (char *[1]) {(char *) "svn"});
> + int argc = q_argc;
> + app = new QCoreApplication(argc, q_argv);

Why keep argc around? Just use q_argc.

> }
>
> - KCmdLineArgs::init(1,
> - (char *[1]) {(char *) "svn"},
> + KCmdLineArgs::init(q_argc, q_argv,
> get_application_name(parameters, pool),
> "subversion",
> ki18n(get_application_name(parameters, pool)),
> @@ -289,12 +291,11 @@ kwallet_password_set(svn_boolean_t *done
> QCoreApplication *app;
> if (! qApp)
> {
> - int argc = 1;
> - app = new QCoreApplication(argc, (char *[1]) {(char *) "svn"});
> + int argc = q_argc;
> + app = new QCoreApplication(argc, q_argv);

Likewise.

> }
>
> - KCmdLineArgs::init(1,
> - (char *[1]) {(char *) "svn"},
> + KCmdLineArgs::init(q_argc, q_argv,
> get_application_name(parameters, pool),
> "subversion",
> ki18n(get_application_name(parameters, pool)),
>
>
Received on 2012-06-04 00:14:43 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.