diff options
| author | Bartlomiej Moskal <bartlomiej.moskal@qt.io> | 2025-04-18 09:28:50 +0200 |
|---|---|---|
| committer | Bartlomiej Moskal <bartlomiej.moskal@qt.io> | 2025-05-29 08:01:13 +0000 |
| commit | 393c294e102bcd733141539552fda2f148e8b51b (patch) | |
| tree | 2b67f515c954870bf56094b693fdf4eb4cea578c /src/plugins/platforms/android/qandroidplatformintegration.cpp | |
| parent | d446df75990d4ec03ff8b29a11a515f3f982e995 (diff) | |
Android: Avoid lazy initialization of QAndroidPlatformServices
In commit ff51ea5418d131248b07e327513b41dad1231f37, lazy initialization
was introduced for QPlatformServices, including
QAndroidPlatformServices. However, this approach causes a regression.
When QAndroidPlatformServices is lazily initialized, the intent listener
registration is delayed. As a result, handling custom URL schemes is
affected - especially those coming from external applications.
To address this issue, this commit removes lazy initialization for
QAndroidPlatformServices.
Fixes: QTBUG-135489
Pick-to: 6.9 6.8 6.5
Change-Id: I24becdf4ac573e7a2ca101cfbc27560d1eb4adef
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Diffstat (limited to 'src/plugins/platforms/android/qandroidplatformintegration.cpp')
| -rw-r--r-- | src/plugins/platforms/android/qandroidplatformintegration.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/plugins/platforms/android/qandroidplatformintegration.cpp b/src/plugins/platforms/android/qandroidplatformintegration.cpp index be7fcddf6ee..749871dec4f 100644 --- a/src/plugins/platforms/android/qandroidplatformintegration.cpp +++ b/src/plugins/platforms/android/qandroidplatformintegration.cpp @@ -216,6 +216,7 @@ QAndroidPlatformIntegration::QAndroidPlatformIntegration(const QStringList ¶ m_mainThread = QThread::currentThread(); m_androidFDB = new QAndroidPlatformFontDatabase(); + m_androidPlatformServices.reset(new QAndroidPlatformServices); #ifndef QT_NO_CLIPBOARD m_androidPlatformClipboard = new QAndroidPlatformClipboard(); @@ -452,9 +453,6 @@ QPlatformNativeInterface *QAndroidPlatformIntegration::nativeInterface() const QPlatformServices *QAndroidPlatformIntegration::services() const { - if (m_androidPlatformServices.isNull()) - m_androidPlatformServices.reset(new QAndroidPlatformServices); - return m_androidPlatformServices.data(); } |
