From 14d065aa5b8c953439733e4948abc920142a1bca Mon Sep 17 00:00:00 2001 From: ValdikSS Date: Sat, 7 Jan 2017 23:34:14 +0300 Subject: [PATCH] Fix GnuPG configuration menu crash and add ECC subkey type There is no default case for key algorithm other than RSA, DSA and elGamal. Parsing keys of other types result in incomplete "rows" enum filling which later cause crash in Model::showKeys as could not find Fingerprint field and row.at(Fingerprint) resulted in NULL pointer. This commit adds default case and new ECC subkey type. --- generic/gnupgplugin/model.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/generic/gnupgplugin/model.cpp b/generic/gnupgplugin/model.cpp index ad420731..0fe914bd 100644 --- a/generic/gnupgplugin/model.cpp +++ b/generic/gnupgplugin/model.cpp @@ -97,6 +97,8 @@ QList parseLine(const QString &line) case 1: rows << new QStandardItem("RSA"); break; case 16: rows << new QStandardItem("ELG-E"); break; case 17: rows << new QStandardItem("DSA"); break; + case 18: rows << new QStandardItem("ECC"); break; + default: rows << new QStandardItem(""); break; } // Short ID