]> sigrok.org Git - pulseview.git/commitdiff
Move meta type declaration out of MainWindow
authorSoeren Apel <redacted>
Sat, 27 Oct 2018 08:14:59 +0000 (10:14 +0200)
committerUwe Hermann <redacted>
Sat, 27 Oct 2018 19:17:52 +0000 (21:17 +0200)
main.cpp
pv/mainwindow.cpp

index 12d3bb6e30748ca9278e39477a1c7b2042c18848..a77969ea7f72313e6c42b71cf0cd09980c53e0da 100644 (file)
--- 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 <libsigrokandroidutils/libsigrokandroidutils.h>
@@ -254,6 +255,9 @@ int main(int argc, char *argv[])
        for (int i = 0; i < argc; i++)
                open_files.emplace_back(argv[i]);
 
+       qRegisterMetaType<pv::util::Timestamp>("util::Timestamp");
+       qRegisterMetaType<uint64_t>("uint64_t");
+
        // Prepare the global settings since logging needs them early on
        pv::GlobalSettings settings;
        settings.save_internal_defaults();
index c79364ebe738c8aca735f7cdae2a7f9c0ce1ce51..fd889e9e9176d6017c340f30d31d4b2b105b545d 100644 (file)
@@ -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>("util::Timestamp");
-       qRegisterMetaType<uint64_t>("uint64_t");
-
        GlobalSettings::add_change_handler(this);
 
        setup_ui();