diff options
author | Saturneric <[email protected]> | 2021-12-16 19:07:55 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2021-12-16 19:07:55 +0000 |
commit | b942f0d50763cfe4f087af634a00071bed44a070 (patch) | |
tree | c69ecf0b7ed1f9f0d009916d6b59f059de1f346c /src/main.cpp | |
parent | Fixed Known Issues on Export. (diff) | |
download | GpgFrontend-b942f0d50763cfe4f087af634a00071bed44a070.tar.gz GpgFrontend-b942f0d50763cfe4f087af634a00071bed44a070.zip |
Fix problem on Windows.
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp index d3e85c68..c03f072b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -30,7 +30,7 @@ #include "gpg/GpgContext.h" #include "gpg/function/GpgKeyGetter.h" #include "ui/MainWindow.h" -#include "ui/WaitingDialog.h" +#include "ui/settings/GlobalSettingStation.h" // Easy Logging Cpp INITIALIZE_EASYLOGGINGPP @@ -76,9 +76,10 @@ int main(int argc, char* argv[]) { // unicode in source QTextCodec::setCodecForLocale(QTextCodec::codecForName("utf-8")); -#if !defined(RELEASE) && defined(WINDOWS) +#if defined(WINDOWS) // css - QFile file(RESOURCE_DIR(qApp->applicationDirPath()) + "/css/default.qss"); + boost::filesystem::path css_path = GpgFrontend::UI::GlobalSettingStation::GetInstance().GetResourceDir() / "css" / "default.qss"; + QFile file(css_path.string().c_str()); file.open(QFile::ReadOnly); QString styleSheet = QLatin1String(file.readAll()); qApp->setStyleSheet(styleSheet); @@ -142,7 +143,11 @@ int main(int argc, char* argv[]) { int return_from_event_loop_code; do { +#ifndef WINDOWS int r = sigsetjmp(recover_env, 1); +#else + int r = setjmp(recover_env); +#endif if (!r) { try { |