From 8f8dfdb120cf365eb403f9928ec124d590c52392 Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Sat, 21 Apr 2018 19:10:02 +0000 Subject: [PATCH] Include path of .WAV file in .WAV file write error message box Thanks to Mike, W9MDB, for this contribution. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8626 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- mainwindow.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index b7b6d5ad1..f8fd49c1a 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1448,13 +1448,14 @@ QString MainWindow::save_wave_file (QString const& name, short const * data, int {{{'I','C','R','D'}}, QDateTime::currentDateTime () .toString ("yyyy-MM-ddTHH:mm:ss.zzzZ").toLocal8Bit ()}, {{{'I','C','M','T'}}, comment.toLocal8Bit ()}, - }; - BWFFile wav {format, name + ".wav", list_info}; + }; + auto file_name = name + ".wav"; + BWFFile wav {format, file_name, list_info}; if (!wav.open (BWFFile::WriteOnly) || 0 > wav.write (reinterpret_cast (data) , sizeof (short) * seconds * format.sampleRate ())) { - return wav.errorString (); + return file_name + ": " + wav.errorString (); } return QString {}; }