From 21f5864602c5c1920fc9b44813f31e789bee6895 Mon Sep 17 00:00:00 2001 From: Soeren Apel Date: Sat, 27 Oct 2018 10:14:59 +0200 Subject: [PATCH] Move meta type declaration out of MainWindow --- main.cpp | 4 ++++ pv/mainwindow.cpp | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) 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(); -- 2.30.2