diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 4 | ||||
-rw-r--r-- | src/gpg/CMakeLists.txt | 5 | ||||
-rw-r--r-- | src/ui/MainWindow.cpp | 9 | ||||
-rw-r--r-- | src/ui/MainWindow.h | 2 | ||||
-rw-r--r-- | src/ui/help/AboutDialog.cpp | 2 | ||||
-rw-r--r-- | src/ui/main_window/MainWindowSlotFunction.cpp | 15 |
6 files changed, 21 insertions, 16 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d5a713b1..bf9a89c2 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -225,6 +225,10 @@ if (APPLICATION_BUILD) crypto ssl intl) else () message(STATUS "Link Application Static Library For UNIX ") + if (APP_IMAGE_UPDATE) + target_link_libraries(${AppName} + libappimageupdate) + endif () target_link_libraries(${AppName} ${GPGFRONTEND_LIBS} ${QT_DEPENDENCY_LIBS} diff --git a/src/gpg/CMakeLists.txt b/src/gpg/CMakeLists.txt index 886f8fdc..19b9f00f 100644 --- a/src/gpg/CMakeLists.txt +++ b/src/gpg/CMakeLists.txt @@ -34,9 +34,12 @@ elseif (APPLE) ${libgpgme} ${libgpg-error} ${libassuan} dl) else () + find_library(libgpgme NAMES libgpgme.a) + find_library(libgpg-error NAMES libgpg-error.a) + find_library(libassuan NAMES libassuan.a) message(STATUS "Link GPG Static Library For Unix") target_link_libraries(gpg_core ${THIRD_PARTY_LIBS} - libgpgme.a libgpg-error.a libassuan.a + ${libgpgme} ${libgpg-error} ${libassuan} ${BOOST_LIBS} pthread dl) endif () diff --git a/src/ui/MainWindow.cpp b/src/ui/MainWindow.cpp index 6b0977fd..e29278e9 100644 --- a/src/ui/MainWindow.cpp +++ b/src/ui/MainWindow.cpp @@ -51,7 +51,7 @@ void MainWindow::init() noexcept { networkAccessManager = new QNetworkAccessManager(this); - /* get path were app was started */ + /* get path where app was started */ setCorner(Qt::BottomLeftCorner, Qt::LeftDockWidgetArea); setCorner(Qt::BottomRightCorner, Qt::RightDockWidgetArea); @@ -140,12 +140,13 @@ void MainWindow::init() noexcept { connect(version_thread, SIGNAL(finished()), version_thread, SLOT(deleteLater())); - connect(version_thread, - SIGNAL(upgradeVersion(const QString&, const QString&)), this, - SLOT(slotVersionUpgrade(const QString&, const QString&))); + connect(version_thread, &VersionCheckThread::upgradeVersion, this, + &MainWindow::slotVersionUpgrade); version_thread->start(); + #endif + } catch (...) { LOG(FATAL) << _("Critical error occur while loading GpgFrontend."); QMessageBox::critical(nullptr, _("Loading Failed"), diff --git a/src/ui/MainWindow.h b/src/ui/MainWindow.h index e0bf9f5a..f4eb70a8 100644 --- a/src/ui/MainWindow.h +++ b/src/ui/MainWindow.h @@ -421,7 +421,7 @@ class MainWindow : public QMainWindow { QAction* importKeyFromClipboardAct{}; QAction* importKeyFromKeyServerAct{}; - QLabel* statusBarIcon{}; /**< TODO */ + QLabel* statusBarIcon{}; KeyList* mKeyList{}; InfoBoardWidget* infoBoard{}; diff --git a/src/ui/help/AboutDialog.cpp b/src/ui/help/AboutDialog.cpp index 836c165e..72100713 100644 --- a/src/ui/help/AboutDialog.cpp +++ b/src/ui/help/AboutDialog.cpp @@ -42,7 +42,7 @@ AboutDialog::AboutDialog(int defaultIndex, QWidget* parent) : QDialog(parent) { tabWidget->addTab(updateTab, _("Update")); connect(tabWidget, &QTabWidget::currentChanged, this, - [&](int index) { qDebug() << "Current Index" << index; }); + [&](int index) { LOG(INFO) << "Current Index" << index; }); if (defaultIndex < tabWidget->count() && defaultIndex >= 0) { tabWidget->setCurrentIndex(defaultIndex); diff --git a/src/ui/main_window/MainWindowSlotFunction.cpp b/src/ui/main_window/MainWindowSlotFunction.cpp index 205b9440..f1432196 100644 --- a/src/ui/main_window/MainWindowSlotFunction.cpp +++ b/src/ui/main_window/MainWindowSlotFunction.cpp @@ -91,7 +91,7 @@ void MainWindow::slotEncrypt() { auto resultAnalyse = EncryptResultAnalyse(error, std::move(result)); resultAnalyse.analyse(); process_result_analyse(edit, infoBoard, resultAnalyse); - + if (check_gpg_error_2_err_code(error) == GPG_ERR_NO_ERROR) edit->slotFillTextEditWithText(QString::fromStdString(*tmp)); #ifdef SMTP_SUPPORT @@ -538,15 +538,12 @@ void MainWindow::slotOpenFile(QString& path) { edit->slotOpenFile(path); } void MainWindow::slotVersionUpgrade(const QString& currentVersion, const QString& latestVersion) { + LOG(INFO) << _("called"); if (currentVersion < latestVersion) { - QMessageBox::warning( - this, _("Outdated Version"), - QString(_("This version(%1) is out of date, please update " - "the latest version in time. ")) - .arg(currentVersion) + - QString(_("You can download the latest version(%1) on " - "Github Releases Page.<br/>")) - .arg(latestVersion)); + statusBar()->showMessage( + QString(_("GpgFrontend Upgradeable (New Version: %1).")) + .arg(latestVersion), + 30000); } else if (currentVersion > latestVersion) { QMessageBox::warning( this, _("Unreleased Version"), |