diff options
author | Liang Qi <liang.qi@qt.io> | 2019-02-08 09:28:00 +0100 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2019-02-08 12:31:02 +0100 |
commit | fbfacd33be482fa3cf0aa5cffaf7006d538a2f92 (patch) | |
tree | 92da72786b3740e37004623612c4fc1c9640d30f /src/plugins/platforms/eglfs | |
parent | c1f4286a5cbc1794fe7be5bdbbd6a0bf29ef84d4 (diff) | |
parent | 74e04d6ace7aa949db97ae2e46c38a4dc0d4d36a (diff) |
Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
src/android/templates/AndroidManifest.xml
src/network/ssl/qsslsocket_mac.cpp
src/widgets/styles/qstylesheetstyle.cpp
tests/auto/corelib/kernel/qtimer/BLACKLIST
tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp
tests/auto/testlib/selftests/expected_blacklisted.lightxml
tests/auto/testlib/selftests/expected_blacklisted.tap
tests/auto/testlib/selftests/expected_blacklisted.teamcity
tests/auto/testlib/selftests/expected_blacklisted.txt
tests/auto/testlib/selftests/expected_blacklisted.xml
tests/auto/testlib/selftests/expected_blacklisted.xunitxml
tests/auto/testlib/selftests/expected_float.tap
tests/auto/testlib/selftests/expected_float.teamcity
tests/auto/testlib/selftests/expected_float.txt
tests/auto/testlib/selftests/expected_float.xunitxml
Done-With: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Done-With: Edward Welbourne <edward.welbourne@qt.io>
Done-With: Timur Pocheptsov <timur.pocheptsov@qt.io>
Change-Id: If93cc432a56ae3ac1b6533d0028e4dc497415a52
Diffstat (limited to 'src/plugins/platforms/eglfs')
-rw-r--r-- | src/plugins/platforms/eglfs/api/qeglfsdeviceintegration.cpp | 4 | ||||
-rw-r--r-- | src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_vsp2/qlinuxmediadevice.cpp | 25 |
2 files changed, 26 insertions, 3 deletions
diff --git a/src/plugins/platforms/eglfs/api/qeglfsdeviceintegration.cpp b/src/plugins/platforms/eglfs/api/qeglfsdeviceintegration.cpp index f151713400..0a3a37863a 100644 --- a/src/plugins/platforms/eglfs/api/qeglfsdeviceintegration.cpp +++ b/src/plugins/platforms/eglfs/api/qeglfsdeviceintegration.cpp @@ -51,7 +51,9 @@ #include <private/qguiapplication_p.h> #include <QScreen> #include <QDir> -#include <QRegularExpression> +#if QT_CONFIG(regularexpression) +# include <QRegularExpression> +#endif #include <QLoggingCategory> #if defined(Q_OS_LINUX) diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_vsp2/qlinuxmediadevice.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_vsp2/qlinuxmediadevice.cpp index 25b0c39050..f77430d7a0 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_vsp2/qlinuxmediadevice.cpp +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_vsp2/qlinuxmediadevice.cpp @@ -273,9 +273,30 @@ bool QLinuxMediaDevice::disableLink(struct media_link *link) return true; } -media_entity *QLinuxMediaDevice::getEntity(const QString &name) +// Between the v4l-utils 1.10 and 1.12 releases, media_get_entity_by_name changed signature, +// i.e. breaking source compatibility. Unfortunately the v4l-utils version is not exposed +// through anything we can use through a regular ifdef so here we do a hack and create two +// overloads for a function based on the signature of the function pointer argument. This +// means that by calling safeGetEntity with media_get_entity_by_name as an argument, the +// compiler will pick the correct version. +// +// v4l-utils v1.12 and later +static struct media_entity *safeGetEntity(struct media_entity *(get_entity_by_name_fn)(struct media_device *, const char *), + struct media_device *device, const QString &name) { - struct media_entity *entity = media_get_entity_by_name(m_mediaDevice, name.toStdString().c_str(), name.length()); + return get_entity_by_name_fn(device, name.toStdString().c_str()); +} +// v4l-utils v1.10 and earlier +static struct media_entity *safeGetEntity(struct media_entity *(get_entity_by_name_fn)(struct media_device *, const char *, size_t), + struct media_device *device, + const QString &name) +{ + return get_entity_by_name_fn(device, name.toStdString().c_str(), name.length()); +} + +struct media_entity *QLinuxMediaDevice::getEntity(const QString &name) +{ + struct media_entity *entity = safeGetEntity(media_get_entity_by_name, m_mediaDevice, name); if (!entity) qWarning() << "Failed to get media entity:" << name; |