From aa7acf474f58c0c33666386493f867aead8a853e Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 2 Feb 2018 15:11:37 +0100 Subject: Bump version Change-Id: Id86c5209e7b3f1d77208912e37d809f6adc2a08a --- .qmake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.qmake.conf b/.qmake.conf index 582d48f..73d9b97 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -2,4 +2,4 @@ load(qt_build_config) DEFINES += QT_NO_FOREACH -MODULE_VERSION = 5.9.4 +MODULE_VERSION = 5.9.5 -- cgit v1.2.3 From 7fb85fcbfdc796109abd80d24ca54a695822294c Mon Sep 17 00:00:00 2001 From: Antti Kokko Date: Tue, 30 Jan 2018 15:39:50 +0200 Subject: Add changes file for Qt 5.10.1 Change-Id: I52e291483598f7730e3125830078dc997bda8266 Reviewed-by: Christian Stromme --- dist/changes-5.10.1 | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 dist/changes-5.10.1 diff --git a/dist/changes-5.10.1 b/dist/changes-5.10.1 new file mode 100644 index 0000000..695c4e3 --- /dev/null +++ b/dist/changes-5.10.1 @@ -0,0 +1,26 @@ +Qt 5.10.1 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.10.0. + +For more details, refer to the online documentation included in this +distribution. The documentation is also available online: + +http://doc.qt.io/qt-5/index.html + +The Qt version 5.10 series is binary compatible with the 5.9.x series. +Applications compiled for 5.9 will continue to run with 5.10. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + +https://bugreports.qt.io/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + +This release contains all fixes included in the Qt 5.9.4 release. + +**************************************************************************** +* Qt 5.10.1 Changes * +**************************************************************************** + + - This release contains only minor code improvements. -- cgit v1.2.3 From 77c94d077b41439217c23c01a1a3015fcd6497d6 Mon Sep 17 00:00:00 2001 From: BogDan Vatra Date: Tue, 6 Feb 2018 12:40:04 +0200 Subject: Delay QtAndroidPrivate::setOnBindListener call until the QAndroidService constructor exits If we call QtAndroidPrivate::setOnBindListener before QAndroidService constructor exits the virtual table is not set and m_service->onBind will call the wrong method. Task-number: QTBUG-66222 Change-Id: I3d057e33dd36a317c5605d7eb5d6892827ad7b13 Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/androidextras/android/qandroidservice.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/androidextras/android/qandroidservice.cpp b/src/androidextras/android/qandroidservice.cpp index 3a7626d..272c829 100644 --- a/src/androidextras/android/qandroidservice.cpp +++ b/src/androidextras/android/qandroidservice.cpp @@ -46,6 +46,7 @@ #include #include +#include #include QT_BEGIN_NAMESPACE @@ -56,7 +57,7 @@ public: QAndroidServicePrivate(QAndroidService *service) : m_service(service) { - QtAndroidPrivate::setOnBindListener(this); + QTimer::singleShot(0,this, [this]{ QtAndroidPrivate::setOnBindListener(this);}); } ~QAndroidServicePrivate() -- cgit v1.2.3 From 9b6aeb9511150f53c46bd3927d956697d34606b3 Mon Sep 17 00:00:00 2001 From: BogDan Vatra Date: Tue, 6 Feb 2018 14:18:31 +0200 Subject: Allow the user to easily register a binder creator Until now the users were forced to subclass QAndroidService in order to provide the binder. Now is much easier, the user just pass a lambda in the QAndroidService constructor e.g. QAndroidService app(argc, argv, [](const QAndroidIntent &){ return new MyBinder{};}); Change-Id: I97608f806b311ad3c853a86cde132aea8352349b Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/androidextras/android/qandroidservice.cpp | 25 ++++++++++++++++++++----- src/androidextras/android/qandroidservice.h | 7 +++++++ 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/src/androidextras/android/qandroidservice.cpp b/src/androidextras/android/qandroidservice.cpp index 3a7626d..f6c68be 100644 --- a/src/androidextras/android/qandroidservice.cpp +++ b/src/androidextras/android/qandroidservice.cpp @@ -53,8 +53,9 @@ QT_BEGIN_NAMESPACE class QAndroidServicePrivate : public QObject, public QtAndroidPrivate::OnBindListener { public: - QAndroidServicePrivate(QAndroidService *service) + QAndroidServicePrivate(QAndroidService *service, const std::function &binder = {}) : m_service(service) + , m_binder(binder) { QtAndroidPrivate::setOnBindListener(this); } @@ -73,7 +74,8 @@ public: // OnBindListener interface jobject onBind(jobject intent) override { - auto binder = m_service->onBind(QAndroidIntent(intent)); + auto qai = QAndroidIntent(intent); + auto binder = m_binder ? m_binder(qai) : m_service->onBind(qai); if (binder) { { QMutexLocker lock(&m_bindersMutex); @@ -92,8 +94,9 @@ private: m_binders.remove(obj); } -private: - QAndroidService *m_service; +public: + QAndroidService *m_service = nullptr; + std::function m_binder; QMutex m_bindersMutex; QSet m_binders; }; @@ -116,7 +119,19 @@ private: */ QAndroidService::QAndroidService(int &argc, char **argv, int flags) : QCoreApplication (argc, argv, QtAndroidPrivate::acuqireServiceSetup(flags)) - , d(new QAndroidServicePrivate(this)) + , d(new QAndroidServicePrivate{this}) +{ +} + +/*! + Creates a new Android Service + + \a binder is used to create a binder each when is needed + \sa QCoreApplication + */ +QAndroidService::QAndroidService(int &argc, char **argv, const std::function &binder, int flags) + : QCoreApplication (argc, argv, QtAndroidPrivate::acuqireServiceSetup(flags)) + , d(new QAndroidServicePrivate{this, binder}) { } diff --git a/src/androidextras/android/qandroidservice.h b/src/androidextras/android/qandroidservice.h index 72e47a4..8c0855c 100644 --- a/src/androidextras/android/qandroidservice.h +++ b/src/androidextras/android/qandroidservice.h @@ -43,6 +43,7 @@ #include #include #include +#include QT_BEGIN_NAMESPACE class QAndroidServicePrivate; @@ -54,6 +55,12 @@ public: QAndroidService(int &argc, char **argv #ifndef Q_QDOC , int flags = ApplicationFlags +#endif + ); + QAndroidService(int &argc, char **argv, + const std::function & binder +#ifndef Q_QDOC + , int flags = ApplicationFlags #endif ); virtual ~QAndroidService(); -- cgit v1.2.3