diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2015-07-26 08:36:47 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-07-26 08:36:47 +0200 |
commit | f01314fa7fb2560cdfd3eb645e8bfa7b2139d656 (patch) | |
tree | cbad5c01a38d31fa2885233a656dc0e5d068259a /facetracknoir/main.cpp | |
parent | 4589370ad6fa88a7255cc4673dbbcec28d06d2f5 (diff) | |
parent | 2f631a5159542f7e2813ca6ed7bc0be37c50afae (diff) |
merge unstable
Diffstat (limited to 'facetracknoir/main.cpp')
-rw-r--r-- | facetracknoir/main.cpp | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/facetracknoir/main.cpp b/facetracknoir/main.cpp index eff35c0b..85c4c7bd 100644 --- a/facetracknoir/main.cpp +++ b/facetracknoir/main.cpp @@ -18,18 +18,14 @@ using namespace options; // workaround QTBUG-38598, allow for launching from another directory static void add_program_library_path() { + char* p = _pgmptr; + char path[MAX_PATH+1]; + strcpy(path, p); + char* ptr = strrchr(path, '\\'); + if (ptr) { - char* p = _pgmptr; - { - char path[MAX_PATH+1]; - strcpy(path, p); - char* ptr = strrchr(path, '\\'); - if (ptr) - { - *ptr = '\0'; - QCoreApplication::addLibraryPath(path); - } - } + *ptr = '\0'; + QCoreApplication::addLibraryPath(path); } } #endif @@ -38,12 +34,14 @@ int main(int argc, char** argv) { #ifdef _WIN32 add_program_library_path(); -#endif +#elif !defined(__linux) // workaround QTBUG-38598 QCoreApplication::addLibraryPath("."); +#endif +#if defined(_WIN32) || defined(__APPLE__) // qt5 designer-made controls look like shit on 'doze -sh 20140921 -#ifdef _WIN32 + // also our OSX look leaves a lot to be desired -sh 20150726 { const QStringList preferred { "fusion", "windowsvista", "jazzbands'-marijuana", "macintosh", "windowsxp" }; for (const auto& style_name : preferred) |