summaryrefslogtreecommitdiffhomepage
path: root/main-window/module-mixin.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-11-03 06:48:51 +0100
committerStanislaw Halik <sthalik@misaki.pl>2018-11-03 06:48:51 +0100
commit310ca879118282f25b6cb2ae681627934278607a (patch)
tree71221b30269f84ceb75610960af8f963df94a7ed /main-window/module-mixin.cpp
parent0148a75d4b5301d279dd8c29ecbaeb9c85cf9efb (diff)
fix some mixin stuff, still not done
Diffstat (limited to 'main-window/module-mixin.cpp')
-rw-r--r--main-window/module-mixin.cpp35
1 files changed, 14 insertions, 21 deletions
diff --git a/main-window/module-mixin.cpp b/main-window/module-mixin.cpp
index 8d36cb0d..18b2867d 100644
--- a/main-window/module-mixin.cpp
+++ b/main-window/module-mixin.cpp
@@ -62,7 +62,7 @@ static bool mk_dialog(std::unique_ptr<t>& place, const std::shared_ptr<dylib>& l
if (lib && lib->Dialog)
return u{ (t*)lib->Dialog() };
else
- return nullptr;
+ return u{};
});
}
@@ -84,39 +84,34 @@ dylib_ptr module_mixin::current_filter()
return ptr;
}
-void module_mixin::show_tracker_settings()
+void module_mixin::show_tracker_settings_()
{
-#if 0
- if (mk_dialog(tracker_dialog, current_tracker()) && work && work->libs.pTracker)
- tracker_dialog->register_tracker(work->libs.pTracker.get());
+ if (mk_dialog(tracker_dialog, current_tracker()) && state.work && state.work->libs.pTracker)
+ tracker_dialog->register_tracker(state.work->libs.pTracker.get());
if (tracker_dialog)
QObject::connect(tracker_dialog.get(), &ITrackerDialog::closing,
- this, [this] { tracker_dialog = nullptr; });
-#endif
+ &fuzz, [this] { tracker_dialog = nullptr; });
}
-void module_mixin::show_proto_settings()
+void module_mixin::show_proto_settings_()
{
-#if 0
- if (mk_dialog(proto_dialog, current_protocol()) && work && work->libs.pProtocol)
- proto_dialog->register_protocol(work->libs.pProtocol.get());
+ if (mk_dialog(proto_dialog, current_protocol()) && state.work && state.work->libs.pProtocol)
+ proto_dialog->register_protocol(state.work->libs.pProtocol.get());
if (proto_dialog)
QObject::connect(proto_dialog.get(), &IProtocolDialog::closing,
- this, [this] { proto_dialog = nullptr; });
-#endif
+ &fuzz, [this] { proto_dialog = nullptr; });
}
-void module_mixin::show_filter_settings()
+void module_mixin::show_filter_settings_()
{
-#if 0
- if (mk_dialog(filter_dialog, current_filter()) && work && work->libs.pFilter)
- filter_dialog->register_filter(work->libs.pFilter.get());
+ if (mk_dialog(filter_dialog, current_filter()) && state.work && state.work->libs.pFilter)
+ filter_dialog->register_filter(state.work->libs.pFilter.get());
if (filter_dialog)
QObject::connect(filter_dialog.get(), &IFilterDialog::closing,
- this, [this] { filter_dialog = nullptr; });
-#endif
+ &fuzz, [this] { filter_dialog = nullptr; });
}
+// this template function must go to a separate function like "options_mixin".
template<typename t, typename... Args>
static bool mk_window(std::unique_ptr<t>& place, Args&&... params)
{
@@ -128,6 +123,4 @@ static bool mk_window(std::unique_ptr<t>& place, Args&&... params)
module_mixin::module_mixin() = default;
module_mixin::~module_mixin() = default;
-module_settings::module_settings() = default;
-
} // ns