aboutsummaryrefslogtreecommitdiffstats
path: root/subversion/libsvn_auth_kwallet/kwallet.cpp
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2018-05-08 03:44:38 +0000
committerPeter Wemm <peter@FreeBSD.org>2018-05-08 03:44:38 +0000
commit3faf8d6bffc5d0fb2525ba37bb504c53366caf9d (patch)
tree7e47911263e75034b767fe34b2f8d3d17e91f66d /subversion/libsvn_auth_kwallet/kwallet.cpp
parenta55fb3c0d5eca7d887798125d5b95942b1f01d4b (diff)
downloadsrc-3faf8d6bffc5d0fb2525ba37bb504c53366caf9d.tar.gz
src-3faf8d6bffc5d0fb2525ba37bb504c53366caf9d.zip
Import Subversion-1.10.0vendor/subversion/subversion-1.10.0
Notes
Notes: svn path=/vendor/subversion/dist/; revision=333347 svn path=/vendor/subversion/subversion-1.10.0/; revision=333348; tag=vendor/subversion/subversion-1.10.0
Diffstat (limited to 'subversion/libsvn_auth_kwallet/kwallet.cpp')
-rw-r--r--subversion/libsvn_auth_kwallet/kwallet.cpp30
1 files changed, 28 insertions, 2 deletions
diff --git a/subversion/libsvn_auth_kwallet/kwallet.cpp b/subversion/libsvn_auth_kwallet/kwallet.cpp
index 74e4eaf846ff..f59e04778b3c 100644
--- a/subversion/libsvn_auth_kwallet/kwallet.cpp
+++ b/subversion/libsvn_auth_kwallet/kwallet.cpp
@@ -39,8 +39,6 @@
#include <QtCore/QString>
#include <kaboutdata.h>
-#include <kcmdlineargs.h>
-#include <kcomponentdata.h>
#include <klocalizedstring.h>
#include <kwallet.h>
@@ -57,6 +55,10 @@
#include "svn_private_config.h"
+#ifndef SVN_HAVE_KF5
+#include <kcmdlineargs.h>
+#include <kcomponentdata.h>
+#endif
/*-----------------------------------------------------------------------*/
/* KWallet simple provider, puts passwords in KWallet */
@@ -221,6 +223,16 @@ kwallet_password_get(svn_boolean_t *done,
app = new QCoreApplication(argc, q_argv);
}
+#if SVN_HAVE_KF5
+ KLocalizedString::setApplicationDomain("subversion"); /* translation domain */
+
+ /* componentName appears in KDE GUI prompts */
+ KAboutData aboutData(QStringLiteral("subversion"), /* componentName */
+ i18n(get_application_name(parameters,
+ pool)), /* displayName */
+ QStringLiteral(SVN_VER_NUMBER));
+ KAboutData::setApplicationData(aboutData);
+#else
KCmdLineArgs::init(q_argc, q_argv,
get_application_name(parameters, pool),
"subversion",
@@ -229,6 +241,8 @@ kwallet_password_get(svn_boolean_t *done,
ki18n("Version control system"),
KCmdLineArgs::CmdLineArgKDE);
KComponentData component_data(KCmdLineArgs::aboutData());
+#endif
+
QString folder = QString::fromUtf8("Subversion");
QString key =
QString::fromUtf8(username) + "@" + QString::fromUtf8(realmstring);
@@ -291,6 +305,16 @@ kwallet_password_set(svn_boolean_t *done,
app = new QCoreApplication(argc, q_argv);
}
+#if SVN_HAVE_KF5
+ KLocalizedString::setApplicationDomain("subversion"); /* translation domain */
+
+ /* componentName appears in KDE GUI prompts */
+ KAboutData aboutData(QStringLiteral("subversion"), /* componentName */
+ i18n(get_application_name(parameters,
+ pool)), /* displayName */
+ QStringLiteral(SVN_VER_NUMBER));
+ KAboutData::setApplicationData(aboutData);
+#else
KCmdLineArgs::init(q_argc, q_argv,
get_application_name(parameters, pool),
"subversion",
@@ -299,6 +323,8 @@ kwallet_password_set(svn_boolean_t *done,
ki18n("Version control system"),
KCmdLineArgs::CmdLineArgKDE);
KComponentData component_data(KCmdLineArgs::aboutData());
+#endif
+
QString q_password = QString::fromUtf8(password);
QString folder = QString::fromUtf8("Subversion");
KWallet::Wallet *wallet = get_wallet(wallet_name, parameters);