summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2021-11-10 11:19:19 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-11-10 15:51:00 +0000
commitc0aceb344ebd36e2ee6df6bf7814df41bfe6be38 (patch)
tree8a1dae6dad6fb02716af70a865a798e814f12d95
parenta490a4fcd9e03027ab769bbcf1e3b3f90931872c (diff)
downloadqtmultimedia-c0aceb344ebd36e2ee6df6bf7814df41bfe6be38.tar.gz
Fix 'devices' example to build with MinGW
src/gui/kernel/qwindowdefs.h #defines main to qMain and qtentrypoint_win.cpp expects qMain to have 2 parameters in its signature: argc and argv. The 'devices' example was missing the parameters, which caused the app to fail at link time with qtentrypoint_win.cpp:97: undefined reference to `qMain(int, char**)' Add the parameters to the example signature. Task-number: COIN-762 Change-Id: I8baa4e84abf4c08f462f041a30d261023282a0b9 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 10f303b85d56069116b2c6ad362aeee48da79624) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--examples/multimedia/devices/main.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/multimedia/devices/main.cpp b/examples/multimedia/devices/main.cpp
index a07e7c468..79c1afb25 100644
--- a/examples/multimedia/devices/main.cpp
+++ b/examples/multimedia/devices/main.cpp
@@ -156,8 +156,11 @@ void printVideoDeviceInfo(QTextStream &out, const QCameraDevice &cameraDevice)
}
-int main()
+
+int main(int argc, char *argv[])
{
+ Q_UNUSED(argc);
+ Q_UNUSED(argv);
QTextStream out(stdout);
const auto audioInputDevices = QMediaDevices::audioInputs();