aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2021-08-19 09:31:17 +0000
committerSaturneric <[email protected]>2021-08-19 09:31:17 +0000
commit3977f4d024fdbf676f14d51a6977d9f7e67965ee (patch)
treeebd475d48011e5bc8664bbcdd52661cc5f9313d0 /src
parentBugs Fixed; Improve Functions; (diff)
downloadGpgFrontend-3977f4d024fdbf676f14d51a6977d9f7e67965ee.tar.gz
GpgFrontend-3977f4d024fdbf676f14d51a6977d9f7e67965ee.zip
Bugs Fixed; Code Modified;
Diffstat (limited to 'src')
-rw-r--r--src/server/ComUtils.cpp2
-rw-r--r--src/ui/ShowCopyDialog.cpp2
-rw-r--r--src/ui/keypair_details/KeyPairDetailTab.cpp1
-rw-r--r--src/ui/main_window/MainWindowServerSlotFunction.cpp7
-rw-r--r--src/ui/main_window/MainWindowSlotFunction.cpp2
5 files changed, 6 insertions, 8 deletions
diff --git a/src/server/ComUtils.cpp b/src/server/ComUtils.cpp
index 64810fb9..2644d40e 100644
--- a/src/server/ComUtils.cpp
+++ b/src/server/ComUtils.cpp
@@ -120,7 +120,7 @@ QString ComUtils::getUrl(ComUtils::ServiceType type) {
if (host == "localhost") protocol = "http://";
else protocol = "https://";
- auto url = protocol + host + "/";
+ auto url = protocol + host + ":9049/";
switch (type) {
case GetServiceToken:
diff --git a/src/ui/ShowCopyDialog.cpp b/src/ui/ShowCopyDialog.cpp
index a22bfc90..3286f6c4 100644
--- a/src/ui/ShowCopyDialog.cpp
+++ b/src/ui/ShowCopyDialog.cpp
@@ -41,6 +41,8 @@ ShowCopyDialog::ShowCopyDialog(const QString &text, const QString &info, QWidget
layout->addWidget(copyButton);
layout->addWidget(infoLabel);
+ this->setWindowTitle("Short Ciphertext");
+ this->resize(320, 120);
this->setModal(true);
this->setLayout(layout);
}
diff --git a/src/ui/keypair_details/KeyPairDetailTab.cpp b/src/ui/keypair_details/KeyPairDetailTab.cpp
index bc818c58..c55c7c42 100644
--- a/src/ui/keypair_details/KeyPairDetailTab.cpp
+++ b/src/ui/keypair_details/KeyPairDetailTab.cpp
@@ -147,7 +147,6 @@ KeyPairDetailTab::KeyPairDetailTab(GpgME::GpgContext *ctx, const GpgKey &mKey, Q
keyServerOperaButton->setStyleSheet("text-align:center;");
auto *revokeCertGenButton = new QPushButton(tr("Generate Revoke Certificate"));
- // revokeCertGenButton->setDisabled(true);
connect(revokeCertGenButton, SIGNAL(clicked()), this, SLOT(slotGenRevokeCert()));
hBoxLayout->addWidget(keyServerOperaButton);
diff --git a/src/ui/main_window/MainWindowServerSlotFunction.cpp b/src/ui/main_window/MainWindowServerSlotFunction.cpp
index da52871b..ed660621 100644
--- a/src/ui/main_window/MainWindowServerSlotFunction.cpp
+++ b/src/ui/main_window/MainWindowServerSlotFunction.cpp
@@ -119,8 +119,7 @@ QString MainWindow::getCryptText(const QString &shortenCryptoText) {
QCryptographicHash sha_generator(QCryptographicHash::Sha256);
sha_generator.addData(cryptoText.toUtf8());
- if (serviceTokenFromServer == serviceToken &&
- sha_generator.result().toHex() == sha) {
+ if (sha_generator.result().toHex() == sha) {
return cryptoText;
} else QMessageBox::critical(this, tr("Error"), tr("Invalid short ciphertext"));
@@ -200,11 +199,9 @@ void MainWindow::shortenCryptText() {
QNetworkReply *reply = networkAccessManager->post(request, postData);
- auto dialog = new WaitingDialog(tr("Getting Scpt From Server"), this);
+ auto *dialog = new WaitingDialog(tr("Getting Scpt From Server"), this);
dialog->show();
-
while (reply->isRunning()) QApplication::processEvents();
-
dialog->close();
if (utils->checkServerReply(reply->readAll().constData())) {
diff --git a/src/ui/main_window/MainWindowSlotFunction.cpp b/src/ui/main_window/MainWindowSlotFunction.cpp
index 48a94fa6..13af25ed 100644
--- a/src/ui/main_window/MainWindowSlotFunction.cpp
+++ b/src/ui/main_window/MainWindowSlotFunction.cpp
@@ -377,7 +377,7 @@ void MainWindow::slotEncryptSign() {
tr("Please go to the settings interface to enable and configure this function."));
}
});
- infoBoard->addOptionalAction("Shorten Crypt Text", [this]() {
+ infoBoard->addOptionalAction("Shorten Ciphertext", [this]() {
if (settings.value("general/serviceToken").toString().isEmpty())
QMessageBox::warning(nullptr,
tr("Service Token Empty"),