diff --git a/src/app/tape/main.cpp b/src/app/tape/main.cpp index d98541ebb..b47ab4ef5 100644 --- a/src/app/tape/main.cpp +++ b/src/app/tape/main.cpp @@ -31,7 +31,6 @@ #include "../fervor/fvupdater.h" #include "../vmisc/vsysexits.h" -#include #include // For QT_REQUIRE_VERSION #include @@ -46,14 +45,6 @@ int main(int argc, char *argv[]) QT_REQUIRE_VERSION(argc, argv, "5.4.0")// clazy:exclude=qstring-arg,qstring-allocations -#if defined(APPIMAGE) - /* When deploying with AppImage based on OpenSuse, the ICU library has a hardcoded path to the icudt*.dat file. - * This prevents the library from using shared in memory data. There are few ways to resolve this issue. According - * to documentation we can either use ICU_DATA environment variable or the function u_setDataDirectory(). - */ - qputenv("ICU_DATA", QString(QCoreApplication::applicationDirPath() + QStringLiteral("/../share/icu")).toUtf8()); -#endif - #if defined(Q_OS_WIN) VAbstractApplication::WinAttachConsole(); #endif diff --git a/src/app/valentina/main.cpp b/src/app/valentina/main.cpp index e59fc15e0..c86e10461 100644 --- a/src/app/valentina/main.cpp +++ b/src/app/valentina/main.cpp @@ -31,7 +31,6 @@ #include "../fervor/fvupdater.h" #include "../vpatterndb/vpiecenode.h" -#include #include // For QT_REQUIRE_VERSION #include @@ -50,14 +49,6 @@ int main(int argc, char *argv[]) QT_REQUIRE_VERSION(argc, argv, "5.4.0")// clazy:exclude=qstring-arg,qstring-allocations -#if defined(APPIMAGE) - /* When deploying with AppImage based on OpenSuse, the ICU library has a hardcoded path to the icudt*.dat file. - * This prevents the library from using shared in memory data. There are few ways to resolve this issue. According - * to documentation we can either use ICU_DATA environment variable or the function u_setDataDirectory(). - */ - qputenv("ICU_DATA", QString(QCoreApplication::applicationDirPath() + QStringLiteral("/../share/icu")).toUtf8()); -#endif - #if defined(Q_OS_WIN) VAbstractApplication::WinAttachConsole(); #endif @@ -72,7 +63,6 @@ int main(int argc, char *argv[]) #endif //Q_OS_MAC VApplication app(argc, argv); - app.InitOptions(); qDebug() << "ICU_DATA: " << qgetenv("ICU_DATA"); diff --git a/src/libs/vmisc/vabstractapplication.cpp b/src/libs/vmisc/vabstractapplication.cpp index 28384e0eb..02f385f65 100644 --- a/src/libs/vmisc/vabstractapplication.cpp +++ b/src/libs/vmisc/vabstractapplication.cpp @@ -68,6 +68,14 @@ VAbstractApplication::VAbstractApplication(int &argc, char **argv) openingPattern(false), mode(Draw::Calculation) { +#if defined(APPIMAGE) + /* When deploying with AppImage based on OpenSuse, the ICU library has a hardcoded path to the icudt*.dat file. + * This prevents the library from using shared in memory data. There are few ways to resolve this issue. According + * to documentation we can either use ICU_DATA environment variable or the function u_setDataDirectory(). + */ + qputenv("ICU_DATA", QString(QCoreApplication::applicationDirPath() + QStringLiteral("/../share/icu")).toUtf8()); +#endif + QString rules; #if QT_VERSION >= QT_VERSION_CHECK(5, 4, 1)