summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2021-11-10 11:19:19 +0100
committerJoerg Bornemann <joerg.bornemann@qt.io>2021-11-10 15:04:10 +0000
commit10f303b85d56069116b2c6ad362aeee48da79624 (patch)
tree6771fa6bd48235d03dd289a499d5a753a3692436 /examples
parent6e754229f49e3368394eb545f48ed107d8eaf932 (diff)
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. Pick-to: 6.2 Task-number: COIN-762 Change-Id: I8baa4e84abf4c08f462f041a30d261023282a0b9 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'examples')
-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();