diff options
author | Amir Masoud Abdol <amir.abdol@qt.io> | 2023-04-06 12:09:12 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2023-04-14 11:04:05 +0200 |
commit | bf146bdede2ff620b21f2e7ce0894cfdf2e1ce7c (patch) | |
tree | ea47b8ca9ea6b5df09f7148859d26c9b22999b53 | |
parent | d26c0f1c430b93c091bf6910838cc3fdee1e1184 (diff) | |
download | qtmultimedia-bf146bdede2ff620b21f2e7ce0894cfdf2e1ce7c.tar.gz |
Silence a few compiler warning
Unused parameter, and initialization order.
Change-Id: I7833420daab132266930aa68fb43a1483941c2a8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 0e3439d35917c61da016a94a4904ab7668486d0b)
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
-rw-r--r-- | examples/multimedia/screencapture/screencapturepreview.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/examples/multimedia/screencapture/screencapturepreview.cpp b/examples/multimedia/screencapture/screencapturepreview.cpp index ecf0d3518..2f78e3308 100644 --- a/examples/multimedia/screencapture/screencapturepreview.cpp +++ b/examples/multimedia/screencapture/screencapturepreview.cpp @@ -16,15 +16,15 @@ #include <QLabel> ScreenCapturePreview::ScreenCapturePreview(QWidget *parent) - : QWidget(parent) - , screenCapture(new QScreenCapture(this)) - , mediaCaptureSession(new QMediaCaptureSession(this)) - , videoWidget(new QVideoWidget(this)) - , screenListView(new QListView(this)) - , screenLabel(new QLabel("Double-click screen to capture:", this)) - , videoWidgetLabel(new QLabel("QScreenCapture output:", this)) - , startStopButton(new QPushButton("Stop screencapture", this)) - , gridLayout(new QGridLayout(this)) + : QWidget(parent), + screenListView(new QListView(this)), + screenCapture(new QScreenCapture(this)), + mediaCaptureSession(new QMediaCaptureSession(this)), + videoWidget(new QVideoWidget(this)), + gridLayout(new QGridLayout(this)), + startStopButton(new QPushButton("Stop screencapture", this)), + screenLabel(new QLabel("Double-click screen to capture:", this)), + videoWidgetLabel(new QLabel("QScreenCapture output:", this)) { // Get lists of screens: @@ -68,7 +68,8 @@ void ScreenCapturePreview::onScreenSelectionChanged(QModelIndex index) screenCapture->setScreen(screenListModel->screen(index)); } -void ScreenCapturePreview::onScreenCaptureErrorOccured(QScreenCapture::Error error, const QString &errorString) +void ScreenCapturePreview::onScreenCaptureErrorOccured([[maybe_unused]] QScreenCapture::Error error, + const QString &errorString) { QMessageBox::warning(this, "QScreenCapture: Error occurred", errorString); } |