diff options
Diffstat (limited to 'tracker-fusion/fusion.cpp')
-rw-r--r-- | tracker-fusion/fusion.cpp | 33 |
1 files changed, 10 insertions, 23 deletions
diff --git a/tracker-fusion/fusion.cpp b/tracker-fusion/fusion.cpp index 98e2465e..fba38d3d 100644 --- a/tracker-fusion/fusion.cpp +++ b/tracker-fusion/fusion.cpp @@ -6,23 +6,24 @@ * notice appear in all copies. */ +#undef NDEBUG + #include "fusion.h" #include "compat/library-path.hpp" #include <QDebug> #include <QMessageBox> #include <QApplication> +#include <cassert> -static const QString own_name = QStringLiteral("fusion"); +static const char* own_name = "fusion"; static auto get_modules() { - return Modules(OPENTRACK_BASE_PATH + OPENTRACK_LIBRARY_PATH); + return Modules(OPENTRACK_BASE_PATH + OPENTRACK_LIBRARY_PATH, dylib_load_quiet); } -fusion_tracker::fusion_tracker() -{ -} +fusion_tracker::fusion_tracker() = default; fusion_tracker::~fusion_tracker() { @@ -32,13 +33,6 @@ fusion_tracker::~fusion_tracker() rot_dylib = nullptr; pos_dylib = nullptr; - - if (other_frame) - { - if (other_frame->layout()) - delete other_frame->layout(); - other_frame = nullptr; - } } const QString& fusion_tracker::caption() @@ -110,7 +104,6 @@ module_status fusion_tracker::start_tracker(QFrame* frame) if (frame->layout() == nullptr) { status = rot_tracker->start_tracker(frame); - other_frame = nullptr; if (!status.is_ok()) { err = rot_dylib->name + QStringLiteral(":\n ") + status.error; @@ -119,16 +112,10 @@ module_status fusion_tracker::start_tracker(QFrame* frame) } else { - other_frame->setVisible(false); other_frame->setFixedSize(320, 240); // XXX magic frame size + other_frame->setVisible(false); - rot_tracker->start_tracker(other_frame.get()); - - if (other_frame->layout() == nullptr) - other_frame = nullptr; - else - other_frame->hide(); - + rot_tracker->start_tracker(&*other_frame); } end: @@ -159,8 +146,8 @@ fusion_dialog::fusion_dialog() connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(doOK())); connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel())); - ui.rot_tracker->addItem(""); - ui.pos_tracker->addItem(""); + ui.rot_tracker->addItem({}); + ui.pos_tracker->addItem({}); Modules libs = get_modules(); |