comparison libgui/src/gui-preferences.h @ 31640:e518e1f7e944

Backed out changeset 34c3cd39c4b9 Revert change because there is code that uses gui_pref.ignore, but only on MAC_OS: global_use_native_dialogs in gui-preferences-global.h. Are there others?
author John W. Eaton <jwe@octave.org>
date Mon, 05 Dec 2022 10:17:17 -0500
parents 34c3cd39c4b9
children 5749674b826e
comparison
equal deleted inserted replaced
31639:ca7d58406f82 31640:e518e1f7e944
34 34
35 // Structure for the definition of pairs: key and default value 35 // Structure for the definition of pairs: key and default value
36 36
37 struct gui_pref 37 struct gui_pref
38 { 38 {
39 gui_pref (const QString& key_arg, const QVariant& def_arg) 39 gui_pref (const QString& key_arg, const QVariant& def_arg,
40 : key (key_arg), def (def_arg) 40 const bool ignore_arg = false)
41 : key (key_arg), def (def_arg), ignore (ignore_arg)
41 { } 42 { }
42 43
43 // No copying! 44 // No copying!
44 45
45 gui_pref (const gui_pref&) = delete; 46 gui_pref (const gui_pref&) = delete;
48 49
49 ~gui_pref (void) = default; 50 ~gui_pref (void) = default;
50 51
51 const QString key; // the key name 52 const QString key; // the key name
52 const QVariant def; // the default value 53 const QVariant def; // the default value
54 const bool ignore; // when true, ignore, i.e. always take default
53 }; 55 };
54 56
55 // The version for shortcuts, where the default value is stored as a 57 // The version for shortcuts, where the default value is stored as a
56 // combination of Qt:Keys (resutling in an unsigend int, when added) 58 // combination of Qt:Keys (resutling in an unsigend int, when added)
57 // or as one of the predefined standard key sequences. 59 // or as one of the predefined standard key sequences.