| Message ID | 20260216145410.495478-1-barnabas.pocze@ideasonboard.com |
|---|---|
| State | New |
| Headers | show |
| Series |
|
| Related | show |
diff --git a/src/apps/qcam/main_window.cpp b/src/apps/qcam/main_window.cpp index 96a2d5090..5a88c5aa8 100644 --- a/src/apps/qcam/main_window.cpp +++ b/src/apps/qcam/main_window.cpp @@ -18,6 +18,7 @@ #include <QFileDialog> #include <QImage> #include <QImageWriter> +#include <QMessageBox> #include <QMutexLocker> #include <QStandardPaths> #include <QStringList> @@ -637,7 +638,8 @@ void MainWindow::saveImageAs() QImageWriter writer(filename); writer.setQuality(95); - writer.write(image); + if (!writer.write(image)) + QMessageBox::warning(this, "Failed to save image", writer.errorString()); } void MainWindow::captureRaw()
When saving the current iamge, `QImageWriter::write()` may fail for various reasons. However, this is currently not reported in any way. Use a simple `QMessageBox` to report the issues. Link: https://gitlab.freedesktop.org/camera/libcamera/-/issues/313 Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> --- src/apps/qcam/main_window.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)