Commit 411fa6f6 authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

Run clang-format

If you want git blame to ignore formatting revisions run:
git config blame.ignoreRevsFile .git-blame-ignore-revs
parent bdf0f352
......@@ -17,24 +17,24 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
#include <sys/resource.h>
#include <memory>
#include <sys/resource.h>
#include <kwallet.h>
#include <KPasswordDialog>
#include <KAboutData>
#include <KLocalizedString>
#include <KMessageBox>
#include <KPasswordDialog>
#include <kwallet.h>
#include <QApplication>
#include <QCommandLineParser>
#include <QTextStream>
#include <QCommandLineOption>
#include <QCommandLineParser>
#include <QDesktopWidget>
#include <QInputDialog>
#include <QLoggingCategory>
#include <QPointer>
#include <QRegularExpression>
#include <QLoggingCategory>
#include <QDesktopWidget>
#include <QTextStream>
Q_LOGGING_CATEGORY(LOG_KSSHASKPASS, "ksshaskpass")
......@@ -47,7 +47,7 @@ enum Type {
// Try to understand what we're asked for by parsing the phrase. Unfortunately, sshaskpass interface does not
// include any saner methods to pass the action or the name of the keyfile. Fortunately, openssh and git
// has no i18n, so this should work for all languages as long as the string is unchanged.
static void parsePrompt(const QString &prompt, QString& identifier, bool& ignoreWallet, enum Type& type)
static void parsePrompt(const QString &prompt, QString &identifier, bool &ignoreWallet, enum Type &type)
{
QRegularExpressionMatch match;
......@@ -255,9 +255,8 @@ int main(int argc, char **argv)
QApplication app(argc, argv);
KLocalizedString::setApplicationDomain("ksshaskpass");
//TODO update it.
KAboutData about(
QStringLiteral("ksshaskpass"),
// TODO update it.
KAboutData about(QStringLiteral("ksshaskpass"),
i18n("Ksshaskpass"),
QStringLiteral(PROJECT_VERSION),
i18n("KDE version of ssh-askpass"),
......@@ -265,8 +264,7 @@ int main(int argc, char **argv)
i18n("(c) 2006 Hans van Leeuwen\n(c) 2008-2010 Armin Berres\n(c) 2013 Pali Rohár"),
i18n("Ksshaskpass allows you to interactively prompt users for a passphrase for ssh-add"),
QStringLiteral("https://commits.kde.org/ksshaskpass"),
QStringLiteral("armin@space-based.de")
);
QStringLiteral("armin@space-based.de"));
about.addAuthor(i18n("Armin Berres"), i18n("Current author"), QStringLiteral("armin@space-based.de"));
about.addAuthor(i18n("Hans van Leeuwen"), i18n("Original author"), QStringLiteral("hanz@hanz.nl"));
......@@ -310,7 +308,7 @@ int main(int argc, char **argv)
// around the identifier and even older versions have an extra space appended to the identifier.
// key file name. Try these keys too, and, if there's a match, ensure that it's properly
// replaced with proper one.
for(auto templ : QStringList{QStringLiteral("'%0'"), QStringLiteral("%0 "), QStringLiteral("'%0' ")}) {
for (auto templ : QStringList{QStringLiteral("'%0'"), QStringLiteral("%0 "), QStringLiteral("'%0' ")}) {
const QString keyFile = templ.arg(identifier);
wallet->readPassword(keyFile, item);
if (!item.isEmpty()) {
......@@ -379,4 +377,3 @@ int main(int argc, char **argv)
out << item << "\n";
return 0;
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment