summaryrefslogtreecommitdiffhomepage
path: root/variant/default/main-window.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-02-03 12:12:35 +0100
committerStanislaw Halik <sthalik@misaki.pl>2019-02-09 12:13:25 +0100
commitf5662b59896917512f0d4e5f1e853ba6c6b20d38 (patch)
tree1d10c499cba7ca2d2ca3a16bcb86d5c2ab35acf5 /variant/default/main-window.hpp
parent195767619e7a7aeeeb33b13420538f687bef0104 (diff)
opentrack: fix profile list storage
The authoritative source for profile names is now a vector rather than a user interface element. Add some sanity checks to `main_window::set_profile'. Remove the `config_listed' abomination.
Diffstat (limited to 'variant/default/main-window.hpp')
-rw-r--r--variant/default/main-window.hpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/variant/default/main-window.hpp b/variant/default/main-window.hpp
index e6b2ed2e..49dda590 100644
--- a/variant/default/main-window.hpp
+++ b/variant/default/main-window.hpp
@@ -32,6 +32,7 @@
#include <QAction>
#include <QEvent>
#include <QCloseEvent>
+#include <QList>
#include <tuple>
#include <memory>
@@ -64,6 +65,8 @@ class main_window final : public QMainWindow, private State
process_detector_worker det;
QMenu profile_menu;
+ QList<QString> profile_list;
+
QAction menu_action_header { &tray_menu },
menu_action_show { &tray_menu },
menu_action_exit { &tray_menu },
@@ -118,8 +121,7 @@ class main_window final : public QMainWindow, private State
void set_profile(const QString& new_name, bool migrate = true);
void set_profile_in_registry(const QString& profile);
- void refresh_config_list();
- bool config_listed(const QString& name);
+ void refresh_profile_list();
void die_on_config_not_writable();
void maybe_start_profile_from_executable();
[[nodiscard]] static bool get_new_config_name_from_dialog(QString &ret);