]> sigrok.org Git - pulseview.git/commitdiff
Log settings location when using "-l 5".
authorUwe Hermann <redacted>
Tue, 9 May 2017 20:08:59 +0000 (22:08 +0200)
committerUwe Hermann <redacted>
Tue, 9 May 2017 20:08:59 +0000 (22:08 +0200)
This can have various types (e.g. a file or a registry entry) and it can
be in various locations on different OSes, so having this as part of the
log output is pretty useful.

main.cpp

index 690a559c29e9a8952b74e2a840475b227650d5b3..d0ca64a2483a85fb7cdac23c5a7170c1c3f02d34 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -27,6 +27,7 @@
 #include <getopt.h>
 
 #include <QDebug>
+#include <QSettings>
 
 #ifdef ENABLE_SIGNALS
 #include "signalhandler.hpp"
@@ -120,6 +121,11 @@ int main(int argc, char *argv[])
                        srd_log_loglevel_set(loglevel);
 #endif
 
+                       if (loglevel >= 5) {
+                               const QSettings settings;
+                               qDebug() << "Settings:" << settings.fileName()
+                                       << "format" << settings.format();
+                       }
                        break;
                }