]> sigrok.org Git - pulseview.git/commitdiff
Fix #592 completely by showing the actual error message
authorSoeren Apel <redacted>
Fri, 28 Aug 2015 06:35:56 +0000 (08:35 +0200)
committerSoeren Apel <redacted>
Fri, 28 Aug 2015 06:35:56 +0000 (08:35 +0200)
Before, the supplied infoMessage was ignored (unnamed parameter)
and instead the local variable infoMessage was used, which was
empty. For this reason, the cause of the error never showed.

pv/mainwindow.cpp

index d7b1aa4411597145fb2c0cb794bb37a5d151297b..8b32046a6e8d3db5aa3ccdfce967bf7022fc3a25 100644 (file)
@@ -623,7 +623,6 @@ void MainWindow::load_file(QString file_name,
 {
        const QString errorMessage(
                QString("Failed to load file %1").arg(file_name));
-       const QString infoMessage;
 
        try {
                if (format)
@@ -646,7 +645,7 @@ void MainWindow::load_file(QString file_name,
 
        update_device_list();
 
-       session_.start_capture([&, errorMessage, infoMessage](QString) {
+       session_.start_capture([&, errorMessage](QString infoMessage) {
                session_error(errorMessage, infoMessage); });
 }