aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/KeyServerImportDialog.cpp
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2021-06-09 19:02:41 +0000
committerSaturneric <[email protected]>2021-06-09 19:02:41 +0000
commit7d000da3e8c8a65b43174b5be2edcd4c1bd6c27e (patch)
tree698f2ace3c49453768bf3c85e97069d65700e950 /src/ui/KeyServerImportDialog.cpp
parentAdjust the output of analysis results. (diff)
downloadGpgFrontend-7d000da3e8c8a65b43174b5be2edcd4c1bd6c27e.tar.gz
GpgFrontend-7d000da3e8c8a65b43174b5be2edcd4c1bd6c27e.zip
Do not clear the text when the decryption operation fails.
Add decrypt and verify operation. Change the icon further. Fix the function of importing from the key server. Signed-off-by: Saturneric <[email protected]>
Diffstat (limited to '')
-rw-r--r--src/ui/KeyServerImportDialog.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ui/KeyServerImportDialog.cpp b/src/ui/KeyServerImportDialog.cpp
index a0775acc..789e194d 100644
--- a/src/ui/KeyServerImportDialog.cpp
+++ b/src/ui/KeyServerImportDialog.cpp
@@ -132,7 +132,7 @@ void KeyServerImportDialog::setMessage(const QString &text, bool error) {
}
void KeyServerImportDialog::slotSearch() {
- QUrl urlFromRemote = keyServerComboBox->currentText() + ":11371/pks/lookup?search=" + searchLineEdit->text() +
+ QUrl urlFromRemote = keyServerComboBox->currentText() + "/pks/lookup?search=" + searchLineEdit->text() +
"&op=index&options=mr";
qnam = new QNetworkAccessManager(this);
QNetworkReply *reply = qnam->get(QNetworkRequest(urlFromRemote));
@@ -175,10 +175,10 @@ void KeyServerImportDialog::slotSearchFinished() {
}
} else {
int row = 0;
- char buff[1024];
bool strikeout = false;
- while (reply->readLine(buff, sizeof(buff)) != -1) {
- QString decoded = QString::fromUtf8(QByteArray::fromPercentEncoding(buff));
+ while (reply->canReadLine()) {
+ auto line_buff = reply->readLine().trimmed();
+ QString decoded = QString::fromUtf8(line_buff.constData(), line_buff.size());
QStringList line = decoded.split(":");
//TODO: have a look at two following pub lines