File tree Expand file tree Collapse file tree 4 files changed +11
-2
lines changed
Expand file tree Collapse file tree 4 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -146,6 +146,7 @@ Supported build options (among regular CMake options):
146146| ` CMAKE_BUILD_TYPE ` | ` Debug ` , ` Release ` , ` Coverage ` ... | ` Release ` | |
147147| ` CMAKE_CXX_COMPILER ` | ` g++ ` , ` clang++ ` ... | | |
148148| ` QRFL_MINIMAL ` | ` ON ` , ` OFF ` | ` OFF ` | Disable GUI and Qt dependency |
149+ | ` QRFL_PORTABILITY_TWEAKS ` | ` ON ` , ` OFF ` | ` OFF ` | Disable usage of platform native dialogs ([ Qt doc] ( https://doc.qt.io/qt-6/qt.html#ApplicationAttribute-enum ) ) |
149150
150151<br >
151152
Original file line number Diff line number Diff line change 77, lato
88, withDoc ? true
99, withGui ? true
10+ , withPortabilityTweaks ? false
1011} :
1112
1213assert lib . asserts . assertMsg ( withGui -> withDoc )
@@ -40,8 +41,9 @@ stdenv.mkDerivation {
4041 unset NIX_HARDENING_ENABLE
4142 '' ;
4243
43- cmakeFlags = lib . optionals ( ! withGui ) [
44- "-DQRFL_MINIMAL=ON"
44+ cmakeFlags = [
45+ ( lib . cmakeBool "QRFL_MINIMAL" ( ! withGui ) )
46+ ( lib . cmakeBool "QRFL_PORTABILITY_TWEAKS" withPortabilityTweaks )
4547 ] ;
4648
4749 nativeBuildInputs = [
Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ target_compile_definitions( ${PROJECT_NAME}
5050 QRFL_OEMS_TUTORIAL="${QRFL_OEMS_TUTORIAL} "
5151 QRFL_BUGREPORT="${QRFL_BUGREPORT} "
5252 $<$<BOOL :${QRFL_MINIMAL} >:QRFL_MINIMAL>
53+ $<$<BOOL :${QRFL_PORTABILITY_TWEAKS} >:QRFL_PORTABILITY_TWEAKS>
5354 )
5455
5556target_compile_features ( ${PROJECT_NAME}
Original file line number Diff line number Diff line change @@ -232,6 +232,11 @@ int main(int argc, char* argv[]) {
232232 if (gui) {
233233 cout << " GUI mode\n " ;
234234 QApplication a (argc, argv);
235+
236+ #ifdef QRFL_PORTABILITY_TWEAKS
237+ a.setAttribute (Qt::AA_DontUseNativeDialogs);
238+ #endif // QRFL_PORTABILITY_TWEAKS
239+
235240 // Avoid a stold() bug introduced by QApplication() performing setlocale(LC_ALL, "")
236241 setlocale (LC_NUMERIC, " C" );
237242 MainWindow w (data, gui_theme);
You can’t perform that action at this time.
0 commit comments