Mercurial > octave
comparison libgui/src/gui-preferences.h @ 31637:34c3cd39c4b9
eliminate unused gui_pref::ignore data member
* gui-settings.h (gui_settings::value): Don't check pref.ignore. No
code in Octave sets it to true.
* gui-preferences.h (gui_pref::ignore): Delete unused data member.
(gui_pref::gui_pref): Remove ignore arg from constructor.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sun, 04 Dec 2022 15:29:51 -0500 |
parents | 796f54d4ddbf |
children | e518e1f7e944 |
comparison
equal
deleted
inserted
replaced
31636:b69d89906ae9 | 31637:34c3cd39c4b9 |
---|---|
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 const bool ignore_arg = false) | 40 : key (key_arg), def (def_arg) |
41 : key (key_arg), def (def_arg), ignore (ignore_arg) | |
42 { } | 41 { } |
43 | 42 |
44 // No copying! | 43 // No copying! |
45 | 44 |
46 gui_pref (const gui_pref&) = delete; | 45 gui_pref (const gui_pref&) = delete; |
49 | 48 |
50 ~gui_pref (void) = default; | 49 ~gui_pref (void) = default; |
51 | 50 |
52 const QString key; // the key name | 51 const QString key; // the key name |
53 const QVariant def; // the default value | 52 const QVariant def; // the default value |
54 const bool ignore; // when true, ignore, i.e. always take default | |
55 }; | 53 }; |
56 | 54 |
57 // The version for shortcuts, where the default value is stored as a | 55 // The version for shortcuts, where the default value is stored as a |
58 // combination of Qt:Keys (resutling in an unsigend int, when added) | 56 // combination of Qt:Keys (resutling in an unsigend int, when added) |
59 // or as one of the predefined standard key sequences. | 57 // or as one of the predefined standard key sequences. |