From 3977f4d024fdbf676f14d51a6977d9f7e67965ee Mon Sep 17 00:00:00 2001 From: Saturneric Date: Thu, 19 Aug 2021 17:31:17 +0800 Subject: Bugs Fixed; Code Modified; --- src/ui/main_window/MainWindowServerSlotFunction.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/ui/main_window/MainWindowServerSlotFunction.cpp') 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())) { -- cgit v1.2.3