X-Git-Url: http://git.code-monkey.de/?p=pulseview.git;a=blobdiff_plain;f=main.cpp;h=fca9aa7966e5b8f7f8be420ef1260953a7860b98;hp=c7fe9bb2dedc38029d115b324c3da58d2a3f6d58;hb=c9f573751bab3f53066aa87486f38216fde67ac8;hpb=0e96068df25f656653afe96145c35a2fdce4818f diff --git a/main.cpp b/main.cpp index c7fe9bb..fca9aa7 100644 --- a/main.cpp +++ b/main.cpp @@ -26,6 +26,8 @@ #include #include +#include + #include #include @@ -54,6 +56,7 @@ #include "pv/logging.hpp" #include "pv/mainwindow.hpp" #include "pv/session.hpp" +#include "pv/util.hpp" #ifdef ANDROID #include @@ -168,6 +171,9 @@ int main(int argc, char *argv[]) bool do_scan = true; bool show_version = false; + // Initialise gstreamermm. Must be called before any other GLib stuff. + Gst::init(); + Application a(argc, argv); #ifdef ANDROID @@ -254,9 +260,14 @@ 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(); settings.set_defaults_where_needed(); + settings.apply_theme(); pv::logging.init(); @@ -314,7 +325,7 @@ int main(int argc, char *argv[]) if (open_files.empty()) w.add_default_session(); else - for (string open_file : open_files) + for (string& open_file : open_files) w.add_session_with_file(open_file, open_file_format); #ifdef ENABLE_SIGNALS