summaryrefslogtreecommitdiffhomepage
path: root/facetracknoir/ui.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-10-07 13:10:30 +0200
committerStanislaw Halik <sthalik@misaki.pl>2015-10-07 13:10:30 +0200
commitd81cf6d2b47af80b5fef0d18ef5bcb5eea695a55 (patch)
treed20eb4c4d531a8a5af8a46f058dd54563f1a8b56 /facetracknoir/ui.cpp
parent2b95bdafd9d48f7214d12104a08c0248b9ec0d15 (diff)
parent7abfd9593409bb0c16f4ee6d19fea14d7e85c57d (diff)
Merge branch 'work' into trackhat-ui
* work: qfc: double the discrete value count shortcuts: sleep less, drop less keystrokes accela: revert rot gains to rc15 ft: try without locking this time ft: cleanup comments csv: cleanup main, ui: fix sort order ui: fix close on save
Diffstat (limited to 'facetracknoir/ui.cpp')
-rw-r--r--facetracknoir/ui.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/facetracknoir/ui.cpp b/facetracknoir/ui.cpp
index 43358f1b..b615ace7 100644
--- a/facetracknoir/ui.cpp
+++ b/facetracknoir/ui.cpp
@@ -21,13 +21,6 @@
# include <windows.h>
#endif
-template<typename t>
-static QList<t> sorted(QList<t> xs)
-{
- std::sort(xs.begin(), xs.end(), [&](const t& a, const t& b) { return a->name.toLower() < b->name.toLower(); });
- return xs;
-}
-
MainWindow::MainWindow() :
pose_update_timer(this),
kbd_quit(QKeySequence("Ctrl+Q"), this),
@@ -46,7 +39,7 @@ MainWindow::MainWindow() :
connect(ui.btnShortcuts, SIGNAL(clicked()), this, SLOT(show_options_dialog()));
connect(ui.btnShowServerControls, SIGNAL(clicked()), this, SLOT(showProtocolSettings()));
- for (auto x : sorted(modules.protocols()))
+ for (auto x : modules.protocols())
ui.iconcomboProtocol->addItem(x->icon, x->name);
refresh_config_list();
@@ -117,12 +110,11 @@ bool MainWindow::get_new_config_name_from_dialog(QString& ret)
MainWindow::~MainWindow()
{
- save_timer.stop();
+ maybe_save();
if (tray)
tray->hide();
stopTracker();
- maybe_save();
}
void MainWindow::set_working_directory()