summaryrefslogtreecommitdiffhomepage
path: root/gui
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-05-06 13:23:44 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-05-10 11:19:22 +0200
commit03c5a15199b34b564314ac222d51ab687fc97a93 (patch)
treec130aa8785dc273090dbe0f3fa04e5055d851483 /gui
parent632cd5bf7778cb9062633f8d27ecd6aadcaa5d28 (diff)
get rid of the silly mem -> shared_ptr alias
Diffstat (limited to 'gui')
-rw-r--r--gui/main-window.cpp8
-rw-r--r--gui/main-window.hpp8
-rw-r--r--gui/main.cpp4
3 files changed, 10 insertions, 10 deletions
diff --git a/gui/main-window.cpp b/gui/main-window.cpp
index 96be298e..aa8e16f3 100644
--- a/gui/main-window.cpp
+++ b/gui/main-window.cpp
@@ -74,13 +74,13 @@ MainWindow::MainWindow() :
{
modules.filters().push_front(std::make_shared<dylib>("", dylib::Filter));
- for (mem<dylib>& x : modules.trackers())
+ for (std::shared_ptr<dylib>& x : modules.trackers())
ui.iconcomboTrackerSource->addItem(x->icon, x->name);
- for (mem<dylib>& x : modules.protocols())
+ for (std::shared_ptr<dylib>& x : modules.protocols())
ui.iconcomboProtocol->addItem(x->icon, x->name);
- for (mem<dylib>& x : modules.filters())
+ for (std::shared_ptr<dylib>& x : modules.filters())
ui.iconcomboFilter->addItem(x->icon, x->name);
}
@@ -601,7 +601,7 @@ inline bool MainWindow::mk_window(ptr<t>& place, Args&&... params)
}
template<typename t>
-bool MainWindow::mk_dialog(mem<dylib> lib, ptr<t>& d)
+bool MainWindow::mk_dialog(std::shared_ptr<dylib> lib, ptr<t>& d)
{
const bool just_created = mk_window_common(d, [&]() -> t* {
if (lib && lib->Dialog)
diff --git a/gui/main-window.hpp b/gui/main-window.hpp
index 71e372f0..ef6143e7 100644
--- a/gui/main-window.hpp
+++ b/gui/main-window.hpp
@@ -68,15 +68,15 @@ class MainWindow : public QMainWindow, private State
menu_action_tracker, menu_action_filter, menu_action_proto,
menu_action_options, menu_action_mappings;
- mem<dylib> current_tracker()
+ std::shared_ptr<dylib> current_tracker()
{
return modules.trackers().value(ui.iconcomboTrackerSource->currentIndex(), nullptr);
}
- mem<dylib> current_protocol()
+ std::shared_ptr<dylib> current_protocol()
{
return modules.protocols().value(ui.iconcomboProtocol->currentIndex(), nullptr);
}
- mem<dylib> current_filter()
+ std::shared_ptr<dylib> current_filter()
{
return modules.filters().value(ui.iconcomboFilter->currentIndex(), nullptr);
}
@@ -99,7 +99,7 @@ class MainWindow : public QMainWindow, private State
// only use in impl file since no definition in header!
template<typename t>
- bool mk_dialog(mem<dylib> lib, ptr<t>& d);
+ bool mk_dialog(std::shared_ptr<dylib> lib, ptr<t>& d);
// idem
template<typename t, typename... Args>
diff --git a/gui/main.cpp b/gui/main.cpp
index 80040732..16e08b6e 100644
--- a/gui/main.cpp
+++ b/gui/main.cpp
@@ -129,13 +129,13 @@ main(int argc, char** argv)
if (!QSettings(OPENTRACK_ORG).value("disable-translation", false).toBool())
{
- (void) t.load(QLocale(), "", "", QCoreApplication::applicationDirPath() + "/" + OPENTRACK_I18N_PATH, ".qm");
+ (void) t.load(QLocale(), "", "", QCoreApplication::applicationDirPath() + "/" OPENTRACK_I18N_PATH, ".qm");
(void) QCoreApplication::installTranslator(&t);
}
do
{
- mem<MainWindow> w = std::make_shared<MainWindow>();
+ std::shared_ptr<MainWindow> w = std::make_shared<MainWindow>();
if (!w->isEnabled())
break;