From 7d5be857ff915cdf41bf6807c1438028433ef9ea Mon Sep 17 00:00:00 2001 From: ArsenArsen Date: Wed, 5 Jul 2017 13:01:53 +0200 Subject: [PATCH] Add a warning for unset recording formats --- mainwindow.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 3589a58..c7d4afd 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -4,6 +4,7 @@ #include "screenshotutil.hpp" #include "settingsdialog.hpp" #include "ui_mainwindow.h" +#include #include #include #include @@ -19,7 +20,10 @@ void MainWindow::rec() { if (controller->isRunning()) return; auto f = static_cast(settings::settings().value("recording/format", (int)formats::Recording::None).toInt()); - if (f >= formats::Recording::None) return; + if (f >= formats::Recording::None) { + qWarning() << "Recording format not set in settings. Aborting."; + return; + } RecordingContext *ctx = new RecordingContext; RecordingFormats *format = new RecordingFormats(f); ctx->consumer = format->getConsumer();