diff options
author | Anne Jan Brouwer <brouwer@annejan.com> | 2018-10-12 17:25:04 +0200 |
---|---|---|
committer | Anne Jan Brouwer <brouwer@annejan.com> | 2018-10-12 17:25:04 +0200 |
commit | 777e20f67cca7ed7776863f3662547116597d1e4 (patch) | |
tree | b7760a5df2b120d75d2ff8e5f8af4a423c181e27 | |
parent | 69512ff6f286371d2846b84a809bbfbc9a7e7289 (diff) |
Some cleanup with help of Clang-Tidy and Clazy (part 3 of x)
35 files changed, 71 insertions, 67 deletions
diff --git a/localization/localization_ar_MA.ts b/localization/localization_ar_MA.ts index 9129cf16..dc52240f 100644 --- a/localization/localization_ar_MA.ts +++ b/localization/localization_ar_MA.ts @@ -384,7 +384,7 @@ email</source> <context> <name>ImitatePass</name> <message> - <location filename="../src/imitatepass.cpp" line="+80"/> + <location filename="../src/imitatepass.cpp" line="+81"/> <location line="+202"/> <source>Can not edit</source> <translation type="unfinished"></translation> @@ -948,7 +948,7 @@ Red entries are not valid, you will not be able to encrypt to these.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/usersdialog.cpp" line="+24"/> + <location filename="../src/usersdialog.cpp" line="+25"/> <source>Can not get key list</source> <translation type="unfinished"></translation> </message> diff --git a/localization/localization_ca.ts b/localization/localization_ca.ts index c9766d36..52ebc5a3 100644 --- a/localization/localization_ca.ts +++ b/localization/localization_ca.ts @@ -390,7 +390,7 @@ email</translation> <context> <name>ImitatePass</name> <message> - <location filename="../src/imitatepass.cpp" line="+80"/> + <location filename="../src/imitatepass.cpp" line="+81"/> <location line="+202"/> <source>Can not edit</source> <translation>No es pot editar</translation> @@ -1112,7 +1112,7 @@ Les entrades vermelles no són vàlides, no podreu xifrar.</translation> <translation>Mostra les claus inutilitzables</translation> </message> <message> - <location filename="../src/usersdialog.cpp" line="+24"/> + <location filename="../src/usersdialog.cpp" line="+25"/> <source>Can not get key list</source> <translation type="unfinished">No es pot obtenir la llista de claus</translation> </message> diff --git a/localization/localization_cs_CZ.ts b/localization/localization_cs_CZ.ts index 7a8cb012..334b1289 100644 --- a/localization/localization_cs_CZ.ts +++ b/localization/localization_cs_CZ.ts @@ -390,7 +390,7 @@ email</translation> <context> <name>ImitatePass</name> <message> - <location filename="../src/imitatepass.cpp" line="+80"/> + <location filename="../src/imitatepass.cpp" line="+81"/> <location line="+202"/> <source>Can not edit</source> <translation type="unfinished">Nelze upravovat</translation> @@ -1090,7 +1090,7 @@ Modře označené záznamy poskytují tajný klíč, vyberte jeden z nich, kter <translation>Zobrazit nepoužitelné klíče</translation> </message> <message> - <location filename="../src/usersdialog.cpp" line="+24"/> + <location filename="../src/usersdialog.cpp" line="+25"/> <source>Can not get key list</source> <translation type="unfinished">Nelze získat seznam klíčů</translation> </message> diff --git a/localization/localization_de_DE.ts b/localization/localization_de_DE.ts index 4b4057dd..f3a9f438 100755 --- a/localization/localization_de_DE.ts +++ b/localization/localization_de_DE.ts @@ -391,7 +391,7 @@ email</translation> <context> <name>ImitatePass</name> <message> - <location filename="../src/imitatepass.cpp" line="+80"/> + <location filename="../src/imitatepass.cpp" line="+81"/> <location line="+202"/> <source>Can not edit</source> <translation>Ändern nicht möglich</translation> @@ -1077,7 +1077,7 @@ Die roten Einträge sind ungültig / abgelaufen und für Entschlüsselung nicht <translation>unbrauchbare Schlüssel anzeigen</translation> </message> <message> - <location filename="../src/usersdialog.cpp" line="+24"/> + <location filename="../src/usersdialog.cpp" line="+25"/> <source>Can not get key list</source> <translation type="unfinished">Schlüssel-Liste nicht gefunden</translation> </message> diff --git a/localization/localization_de_LU.ts b/localization/localization_de_LU.ts index b3943ba0..5c1fa3c1 100755 --- a/localization/localization_de_LU.ts +++ b/localization/localization_de_LU.ts @@ -391,7 +391,7 @@ email</translation> <context> <name>ImitatePass</name> <message> - <location filename="../src/imitatepass.cpp" line="+80"/> + <location filename="../src/imitatepass.cpp" line="+81"/> <location line="+202"/> <source>Can not edit</source> <translation>Ändern nicht möglich</translation> @@ -1072,7 +1072,7 @@ Die roten Einträge sind ungültig / abgelaufen und für Entschlüsselung nicht <translation>unbrauchbare Schlüssel anzeigen</translation> </message> <message> - <location filename="../src/usersdialog.cpp" line="+24"/> + <location filename="../src/usersdialog.cpp" line="+25"/> <source>Can not get key list</source> <translation type="unfinished">Schlüssel-Liste nicht gefunden</translation> </message> diff --git a/localization/localization_el_GR.ts b/localization/localization_el_GR.ts index 4a1b6681..e9fdd230 100644 --- a/localization/localization_el_GR.ts +++ b/localization/localization_el_GR.ts @@ -384,7 +384,7 @@ email</source> <context> <name>ImitatePass</name> <message> - <location filename="../src/imitatepass.cpp" line="+80"/> + <location filename="../src/imitatepass.cpp" line="+81"/> <location line="+202"/> <source>Can not edit</source> <translation type="unfinished"></translation> @@ -951,7 +951,7 @@ Red entries are not valid, you will not be able to encrypt to these.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/usersdialog.cpp" line="+24"/> + <location filename="../src/usersdialog.cpp" line="+25"/> <source>Can not get key list</source> <translation type="unfinished"></translation> </message> diff --git a/localization/localization_en_GB.ts b/localization/localization_en_GB.ts index bbaaa4ed..24dede5c 100644 --- a/localization/localization_en_GB.ts +++ b/localization/localization_en_GB.ts @@ -390,7 +390,7 @@ email</translation> <context> <name>ImitatePass</name> <message> - <location filename="../src/imitatepass.cpp" line="+80"/> + <location filename="../src/imitatepass.cpp" line="+81"/> <location line="+202"/> <source>Can not edit</source> <translation>Can not edit</translation> @@ -1123,7 +1123,7 @@ Red entries are not valid, you will not be able to encrypt to these.</translatio <translation>Show unusable keys</translation> </message> <message> - <location filename="../src/usersdialog.cpp" line="+24"/> + <location filename="../src/usersdialog.cpp" line="+25"/> <source>Can not get key list</source> <translation type="unfinished">Can not get key list</translation> </message> diff --git a/localization/localization_en_US.ts b/localization/localization_en_US.ts index 45c3973a..23af34c0 100644 --- a/localization/localization_en_US.ts +++ b/localization/localization_en_US.ts @@ -390,7 +390,7 @@ email</translation> <context> <name>ImitatePass</name> <message> - <location filename="../src/imitatepass.cpp" line="+80"/> + <location filename="../src/imitatepass.cpp" line="+81"/> <location line="+202"/> <source>Can not edit</source> <translation>Can not edit</translation> @@ -1123,7 +1123,7 @@ Red entries are not valid, you will not be able to encrypt to these.</translatio <translation>Show unusable keys</translation> </message> <message> - <location filename="../src/usersdialog.cpp" line="+24"/> + <location filename="../src/usersdialog.cpp" line="+25"/> <source>Can not get key list</source> <translation type="unfinished">Can not get key list</translation> </message> diff --git a/localization/localization_es_ES.ts b/localization/localization_es_ES.ts index 85545907..7b2a2cc6 100644 --- a/localization/localization_es_ES.ts +++ b/localization/localization_es_ES.ts @@ -384,7 +384,7 @@ email</source> <context> <name>ImitatePass</name> <message> - <location filename="../src/imitatepass.cpp" line="+80"/> + <location filename="../src/imitatepass.cpp" line="+81"/> <location line="+202"/> <source>Can not edit</source> <translation>No se puede editar</translation> @@ -1054,7 +1054,7 @@ Entradas rojas no son válidos, usted no será capaz de cifrar a estos.</transla <translation>Mostrar claves no usables</translation> </message> <message> - <location filename="../src/usersdialog.cpp" line="+24"/> + <location filename="../src/usersdialog.cpp" line="+25"/> <source>Can not get key list</source> <translation type="unfinished">No se puede obtener lista de claves</translation> </message> diff --git a/localization/localization_fr_BE.ts b/localization/localization_fr_BE.ts index e10608ec..9ffbe8c3 100644 --- a/localization/localization_fr_BE.ts +++ b/localization/localization_fr_BE.ts @@ -390,7 +390,7 @@ email</translation> <context> <name>ImitatePass</name> <message> - <location filename="../src/imitatepass.cpp" line="+80"/> + <location filename="../src/imitatepass.cpp" line="+81"/> <location line="+202"/> <source>Can not edit</source> <translation>Impossible d'éditer</translation> @@ -1090,7 +1090,7 @@ Les entrées en rouge ne sont pas marquées comme étant de confiance dans GnuPG <translation>Afficher les clés inutilisables</translation> </message> <message> - <location filename="../src/usersdialog.cpp" line="+24"/> + <location filename="../src/usersdialog.cpp" line="+25"/> <source>Can not get key list</source> <translation type="unfinished">Impossible de récupérer la liste de clés</translation> </message> diff --git a/localization/localization_fr_FR.ts b/localization/localization_fr_FR.ts index 34d3436b..d2be43c3 100644 --- a/localization/localization_fr_FR.ts +++ b/localization/localization_fr_FR.ts @@ -390,7 +390,7 @@ email</translation> <context> <name>ImitatePass</name> <message> - <location filename="../src/imitatepass.cpp" line="+80"/> + <location filename="../src/imitatepass.cpp" line="+81"/> <location line="+202"/> <source>Can not edit</source> <translation>Impossible d'éditer</translation> @@ -1122,7 +1122,7 @@ Les entrées rouges ne sont pas valides, vous ne pourrez pas vous en servir pour <translation>Afficher les clés inutilisables</translation> </message> <message> - <location filename="../src/usersdialog.cpp" line="+24"/> + <location filename="../src/usersdialog.cpp" line="+25"/> <source>Can not get key list</source> <translation type="unfinished">Impossible de récupérer la liste de clés</translation> </message> diff --git a/localization/localization_fr_LU.ts b/localization/localization_fr_LU.ts index b5b0a5d1..e3a2cf99 100644 --- a/localization/localization_fr_LU.ts +++ b/localization/localization_fr_LU.ts @@ -390,7 +390,7 @@ email</translation> <context> <name>ImitatePass</name> <message> - <location filename="../src/imitatepass.cpp" line="+80"/> + <location filename="../src/imitatepass.cpp" line="+81"/> <location line="+202"/> <source>Can not edit</source> <translation>Impossible d'éditer</translation> @@ -1090,7 +1090,7 @@ Les entrées en rouge ne sont pas marquées comme étant de confiance dans GnuPG <translation>Afficher les clés inutilisables</translation> </message> <message> - <location filename="../src/usersdialog.cpp" line="+24"/> + <location filename="../src/usersdialog.cpp" line="+25"/> <source>Can not get key list</source> <translation type="unfinished">Impossible de récupérer la liste de clés</translation> </message> diff --git a/localization/localization_gl_ES.ts b/localization/localization_gl_ES.ts index dc545b5f..bc466956 100644 --- a/localization/localization_gl_ES.ts +++ b/localization/localization_gl_ES.ts @@ -451,7 +451,7 @@ email</source> <context> <name>ImitatePass</name> <message> - <location filename="../src/imitatepass.cpp" line="+80"/> + <location filename="../src/imitatepass.cpp" line="+81"/> <location line="+202"/> <source>Can not edit</source> <translation type="unfinished"></translation> @@ -1090,7 +1090,7 @@ Red entries are not valid, you will not be able to encrypt to these.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/usersdialog.cpp" line="+24"/> + <location filename="../src/usersdialog.cpp" line="+25"/> <source>Can not get key list</source> <translation type="unfinished"></translation> </message> diff --git a/localization/localization_he_IL.ts b/localization/localization_he_IL.ts index 5c0060e6..2a0ec7f1 100644 --- a/localization/localization_he_IL.ts +++ b/localization/localization_he_IL.ts @@ -384,7 +384,7 @@ email</source> <context> <name>ImitatePass</name> <message> - <location filename="../src/imitatepass.cpp" line="+80"/> + <location filename="../src/imitatepass.cpp" line="+81"/> <location line="+202"/> <source>Can not edit</source> <translation type="unfinished"></translation> @@ -948,7 +948,7 @@ Red entries are not valid, you will not be able to encrypt to these.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/usersdialog.cpp" line="+24"/> + <location filename="../src/usersdialog.cpp" line="+25"/> <source>Can not get key list</source> <translation type="unfinished"></translation> </message> diff --git a/localization/localization_hu_HU.ts b/localization/localization_hu_HU.ts index 97e58d0b..3517933a 100644 --- a/localization/localization_hu_HU.ts +++ b/localization/localization_hu_HU.ts @@ -384,7 +384,7 @@ email</source> <context> <name>ImitatePass</name> <message> - <location filename="../src/imitatepass.cpp" line="+80"/> + <location filename="../src/imitatepass.cpp" line="+81"/> <location line="+202"/> <source>Can not edit</source> <translation type="unfinished"></translation> @@ -983,7 +983,7 @@ Red entries are not valid, you will not be able to encrypt to these.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/usersdialog.cpp" line="+24"/> + <location filename="../src/usersdialog.cpp" line="+25"/> <source>Can not get key list</source> <translation type="unfinished"></translation> </message> diff --git a/localization/localization_it_IT.ts b/localization/localization_it_IT.ts index ad78b5a8..b6993b77 100644 --- a/localization/localization_it_IT.ts +++ b/localization/localization_it_IT.ts @@ -391,7 +391,7 @@ email</translation> <context> <name>ImitatePass</name> <message> - <location filename="../src/imitatepass.cpp" line="+80"/> + <location filename="../src/imitatepass.cpp" line="+81"/> <location line="+202"/> <source>Can not edit</source> <translation>Impossibile modificare</translation> @@ -1134,7 +1134,7 @@ Le righe rosse non sono valide, non saranno utilizzabili per cifrare.</translati <translation>Mostra chiavi non utilizzabili</translation> </message> <message> - <location filename="../src/usersdialog.cpp" line="+24"/> + <location filename="../src/usersdialog.cpp" line="+25"/> <source>Can not get key list</source> <translation type="unfinished">Impossibile ottenere la lista delle chiavi</translation> </message> diff --git a/localization/localization_lb_LU.ts b/localization/localization_lb_LU.ts index af3eed91..9e476b04 100644 --- a/localization/localization_lb_LU.ts +++ b/localization/localization_lb_LU.ts @@ -384,7 +384,7 @@ email</source> <context> <name>ImitatePass</name> <message> - <location filename="../src/imitatepass.cpp" line="+80"/> + <location filename="../src/imitatepass.cpp" line="+81"/> <location line="+202"/> <source>Can not edit</source> <translation type="unfinished"></translation> @@ -947,7 +947,7 @@ Red entries are not valid, you will not be able to encrypt to these.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/usersdialog.cpp" line="+24"/> + <location filename="../src/usersdialog.cpp" line="+25"/> <source>Can not get key list</source> <translation type="unfinished"></translation> </message> diff --git a/localization/localization_nl.ts b/localization/localization_nl.ts index 7035e8bb..b786abb2 100644 --- a/localization/localization_nl.ts +++ b/localization/localization_nl.ts @@ -390,7 +390,7 @@ email</translation> <context> <name>ImitatePass</name> <message> - <location filename="../src/imitatepass.cpp" line="+80"/> + <location filename="../src/imitatepass.cpp" line="+81"/> <location line="+202"/> <source>Can not edit</source> <translation>Kan niet bewerken</translation> @@ -1115,7 +1115,7 @@ Rode entries zijn ongeldig, je zult niet in staat zijn om te versleutelen voor d <translation>Toon onbruikbare sleutels</translation> </message> <message> - <location filename="../src/usersdialog.cpp" line="+24"/> + <location filename="../src/usersdialog.cpp" line="+25"/> <source>Can not get key list</source> <translation type="unfinished">Kan lijst sleutels niet verkrijgen</translation> </message> diff --git a/localization/localization_pl_PL.ts b/localization/localization_pl_PL.ts index 854dda00..2159b0ee 100644 --- a/localization/localization_pl_PL.ts +++ b/localization/localization_pl_PL.ts @@ -384,7 +384,7 @@ email</source> <context> <name>ImitatePass</name> <message> - <location filename="../src/imitatepass.cpp" line="+80"/> + <location filename="../src/imitatepass.cpp" line="+81"/> <location line="+202"/> <source>Can not edit</source> <translation type="unfinished"></translation> @@ -951,7 +951,7 @@ Red entries are not valid, you will not be able to encrypt to these.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../src/usersdialog.cpp" line="+24"/> + <location filename="../src/usersdialog.cpp" line="+25"/> <source>Can not get key list</source> <translation type="unfinished"></translation> </message> diff --git a/localization/localization_pt_PT.ts b/localization/localization_pt_PT.ts index 6549ad40..9e34648c 100644 --- a/localization/localization_pt_PT.ts +++ b/localization/localization_pt_PT.ts @@ -384,7 +384,7 @@ email</source> <context> <name>ImitatePass</name> <message> - <location filename="../src/imitatepass.cpp" line="+80"/> + <location filename="../src/imitatepass.cpp" line="+81"/> <location line="+202"/> <source>Can not edit</source> <translation>Não pode ser editado</translation> @@ -1073,7 +1073,7 @@ Os elementos a vermelho não são válidos. Não será possível desencriptar ut <translation>Mostrar chaves não utilizáveis</translation> </message> <message> - <location filename="../src/usersdialog.cpp" line="+24"/> + <location filename="../src/usersdialog.cpp" line="+25"/> <source>Can not get key list</source> <translation type="unfinished">Não é possível obter a lista de chaves</translation> </message> diff --git a/localization/localization_ru_RU.ts b/localization/localization_ru_RU.ts index 0ff4caa8..bdc59bd2 100644 --- a/localization/localization_ru_RU.ts +++ b/localization/localization_ru_RU.ts @@ -391,7 +391,7 @@ email</translation> <context> <name>ImitatePass</name> <message> - <location filename="../src/imitatepass.cpp" line="+80"/> + <location filename="../src/imitatepass.cpp" line="+81"/> <location line="+202"/> <source>Can not edit</source> <translation>Невозможно изменить содержимое</translation> @@ -1087,7 +1087,7 @@ Red entries are not valid, you will not be able to encrypt to these.</source> <translation>Показать непригодные ключи</translation> </message> <message> - <location filename="../src/usersdialog.cpp" line="+24"/> + <location filename="../src/usersdialog.cpp" line="+25"/> <source>Can not get key list</source> <translation type="unfinished">Не удалось получить список ключей</translation> </message> diff --git a/localization/localization_sv_SE.ts b/localization/localization_sv_SE.ts index 8f7e1af4..fc8864b8 100644 --- a/localization/localization_sv_SE.ts +++ b/localization/localization_sv_SE.ts @@ -384,7 +384,7 @@ email</source> <context> <name>ImitatePass</name> <message> - <location filename="../src/imitatepass.cpp" line="+80"/> + <location filename="../src/imitatepass.cpp" line="+81"/> <location line="+202"/> <source>Can not edit</source> <translation type="unfinished">Kan inte ändra</translation> @@ -1032,7 +1032,7 @@ Röd färg betyder att nyckeln är ogiltig. Du kan inte använda någon av dessa <translation>Visa oanvändbara nycklar</translation> </message> <message> - <location filename="../src/usersdialog.cpp" line="+24"/> + <location filename="../src/usersdialog.cpp" line="+25"/> <source>Can not get key list</source> <translation type="unfinished">Kan inte hämta nyckellista</translation> </message> diff --git a/localization/localization_zh_CN.ts b/localization/localization_zh_CN.ts index dd53a3ae..e4526c97 100644 --- a/localization/localization_zh_CN.ts +++ b/localization/localization_zh_CN.ts @@ -390,7 +390,7 @@ email</source> <context> <name>ImitatePass</name> <message> - <location filename="../src/imitatepass.cpp" line="+80"/> + <location filename="../src/imitatepass.cpp" line="+81"/> <location line="+202"/> <source>Can not edit</source> <translation>无法编辑</translation> @@ -1089,7 +1089,7 @@ Red entries are not valid, you will not be able to encrypt to these.</source> <translation>显示不可用密钥</translation> </message> <message> - <location filename="../src/usersdialog.cpp" line="+24"/> + <location filename="../src/usersdialog.cpp" line="+25"/> <source>Can not get key list</source> <translation type="unfinished">无法获取密钥列表</translation> </message> diff --git a/src/imitatepass.cpp b/src/imitatepass.cpp index 7998bf0f..a0b19d1e 100644 --- a/src/imitatepass.cpp +++ b/src/imitatepass.cpp @@ -1,6 +1,7 @@ #include "imitatepass.h" #include "qtpasssettings.h" #include <QDirIterator> +#include <utility> #ifdef QT_DEBUG #include "debughelper.h" @@ -222,7 +223,7 @@ bool ImitatePass::removeDir(const QString &dirName) { * This is stil quite experimental.. * @param dir */ -void ImitatePass::reencryptPath(QString dir) { +void ImitatePass::reencryptPath(const QString &dir) { emit statusMsg(tr("Re-encrypting from folder %1").arg(dir), 3000); emit startReencryptPath(); if (QtPassSettings::isAutoPull()) { @@ -395,7 +396,7 @@ void ImitatePass::Copy(const QString src, const QString dest, */ void ImitatePass::executeGpg(PROCESS id, const QStringList &args, QString input, bool readStdout, bool readStderr) { - executeWrapper(id, QtPassSettings::getGpgExecutable(), args, input, + executeWrapper(id, QtPassSettings::getGpgExecutable(), args, std::move(input), readStdout, readStderr); } /** @@ -404,7 +405,7 @@ void ImitatePass::executeGpg(PROCESS id, const QStringList &args, QString input, */ void ImitatePass::executeGit(PROCESS id, const QStringList &args, QString input, bool readStdout, bool readStderr) { - |