summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAmir Masoud Abdol <amir.abdol@qt.io>2023-04-06 12:09:12 +0200
committerAmir Masoud Abdol <amir.abdol@qt.io>2023-04-06 12:54:16 +0200
commit0e3439d35917c61da016a94a4904ab7668486d0b (patch)
treefd9b8146de3e57cadaa13643975cf012ebc84d6d /examples
parent6493670c1b6c386ff5af697ab0eb1cdfb943d117 (diff)
downloadqtmultimedia-0e3439d35917c61da016a94a4904ab7668486d0b.tar.gz
Silence a few compiler warning
Unused parameter, and initialization order. Pick-to: 6.5 Change-Id: I7833420daab132266930aa68fb43a1483941c2a8 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'examples')
-rw-r--r--examples/multimedia/screencapture/screencapturepreview.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/examples/multimedia/screencapture/screencapturepreview.cpp b/examples/multimedia/screencapture/screencapturepreview.cpp
index 8a85904ba..1d514596b 100644
--- a/examples/multimedia/screencapture/screencapturepreview.cpp
+++ b/examples/multimedia/screencapture/screencapturepreview.cpp
@@ -17,22 +17,21 @@
#include <QLabel>
ScreenCapturePreview::ScreenCapturePreview(QWidget *parent)
- : QWidget(parent)
- , screenCapture(new QScreenCapture(this))
- , mediaCaptureSession(new QMediaCaptureSession(this))
- , videoWidget(new QVideoWidget(this))
- , screenListView(new QListView(this))
- , windowListView(new QListView(this))
- , lineEdit(new QLineEdit(this))
- , screenLabel(new QLabel("Double-click screen to capture:", this))
- , windowLabel(new QLabel("Double-click window to capture:", this))
- , windowIdLabel(
- new QLabel("Enter window ID: (e.g. 0x13C009E10 or 5301640720)", this))
- , videoWidgetLabel(new QLabel("QScreenCapture output:", this))
- , wIdButton(new QPushButton("Confirm", this))
- , startStopButton(new QPushButton("Stop screencapture", this))
- , gridLayout(new QGridLayout(this))
- , hBoxLayout(new QHBoxLayout)
+ : QWidget(parent),
+ screenListView(new QListView(this)),
+ windowListView(new QListView(this)),
+ screenCapture(new QScreenCapture(this)),
+ mediaCaptureSession(new QMediaCaptureSession(this)),
+ videoWidget(new QVideoWidget(this)),
+ gridLayout(new QGridLayout(this)),
+ hBoxLayout(new QHBoxLayout),
+ lineEdit(new QLineEdit(this)),
+ wIdButton(new QPushButton("Confirm", this)),
+ startStopButton(new QPushButton("Stop screencapture", this)),
+ screenLabel(new QLabel("Double-click screen to capture:", this)),
+ windowLabel(new QLabel("Double-click window to capture:", this)),
+ windowIdLabel(new QLabel("Enter window ID: (e.g. 0x13C009E10 or 5301640720)", this)),
+ videoWidgetLabel(new QLabel("QScreenCapture output:", this))
{
// Get lists of screens and windows:
@@ -105,7 +104,8 @@ void ScreenCapturePreview::onWindowIdSelectionChanged()
screenCapture->setWindowId(input);
}
-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);
}