From: Soeren Apel Date: Sat, 27 Oct 2018 08:14:59 +0000 (+0200) Subject: Move meta type declaration out of MainWindow X-Git-Url: http://git.code-monkey.de/?p=pulseview.git;a=commitdiff_plain;h=21f5864602c5c1920fc9b44813f31e789bee6895;ds=sidebyside Move meta type declaration out of MainWindow --- diff --git a/main.cpp b/main.cpp index 12d3bb6..a77969e 100644 --- a/main.cpp +++ b/main.cpp @@ -54,6 +54,7 @@ #include "pv/logging.hpp" #include "pv/mainwindow.hpp" #include "pv/session.hpp" +#include "pv/util.hpp" #ifdef ANDROID #include @@ -254,6 +255,9 @@ int main(int argc, char *argv[]) for (int i = 0; i < argc; i++) open_files.emplace_back(argv[i]); + qRegisterMetaType("util::Timestamp"); + qRegisterMetaType("uint64_t"); + // Prepare the global settings since logging needs them early on pv::GlobalSettings settings; settings.save_internal_defaults(); diff --git a/pv/mainwindow.cpp b/pv/mainwindow.cpp index c79364e..fd889e9 100644 --- a/pv/mainwindow.cpp +++ b/pv/mainwindow.cpp @@ -75,9 +75,6 @@ MainWindow::MainWindow(DeviceManager &device_manager, QWidget *parent) : icon_green_(":/icons/status-green.svg"), icon_grey_(":/icons/status-grey.svg") { - qRegisterMetaType("util::Timestamp"); - qRegisterMetaType("uint64_t"); - GlobalSettings::add_change_handler(this); setup_ui();