]> sigrok.org Git - pulseview.git/blobdiff - pv/application.cpp
Fix #1035 by checking for exceptions when accessing config
[pulseview.git] / pv / application.cpp
index 4d0dde78f94d2c218d9c7ae7d5eefb95e8e46f25..f588fa3714ea44b8a17d63dbd3957923742018da 100644 (file)
@@ -115,14 +115,14 @@ void Application::collect_version_info(shared_ptr<sigrok::Context> context)
        // Firmware paths
        l_orig = sr_resourcepaths_get(SR_RESOURCE_FIRMWARE);
        for (GSList *l = l_orig; l; l = l->next)
-               fw_path_list_.push_back(QString((char*)l->data));
+               fw_path_list_.emplace_back((char*)l->data);
        g_slist_free_full(l_orig, g_free);
 
        // PD paths
 #ifdef ENABLE_DECODE
        l_orig = srd_searchpaths_get();
        for (GSList *l = l_orig; l; l = l->next)
-               pd_path_list_.push_back(QString((char*)l->data));
+               pd_path_list_.emplace_back((char*)l->data);
        g_slist_free_full(l_orig, g_free);
 #endif
 
@@ -156,7 +156,7 @@ void Application::collect_version_info(shared_ptr<sigrok::Context> context)
 
 void Application::print_version_info()
 {
-       cout << PV_TITLE << PV_VERSION_STRING << endl;
+       cout << PV_TITLE << " " << PV_VERSION_STRING << endl;
 
        cout << endl << "Libraries and features:" << endl;
        for (pair<QString, QString> &entry : version_info_)
@@ -191,8 +191,6 @@ void Application::print_version_info()
                cout << "  " << entry.first.leftJustified(21, ' ').toStdString() <<
                entry.second.toStdString() << endl;
 #endif
-
-       cout << endl;
 }
 
 vector< pair<QString, QString> > Application::get_version_info() const