From fcb78b500076bf3917e5d8bf8507395bbc33a1a5 Mon Sep 17 00:00:00 2001 From: BogDan Vatra Date: Tue, 17 Sep 2019 09:56:14 +0300 Subject: Android: Fix plugins naming Android 5 doesn't extract the files from libs folder unless they are prefixed with "lib". This patch sets a proper name for the plugin which will make gdb happy and it will also avoid any name clashes. If we rename the plugins when we copy them, gdb won't find them, therefore it can't load their symbols. On Android all the libs are in a single folder, so to make sure we don't have any name clashes, we are prefixing the plugin name with it's relative path to qt folder (we replace / with _). Fixes: QTBUG-78616 Change-Id: I7e0e67d65448532769d69f46b1856c029e2cf5cb Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/corelib/corelib.pro | 2 +- src/corelib/plugin/qfactoryloader.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/corelib') diff --git a/src/corelib/corelib.pro b/src/corelib/corelib.pro index ba5f5adf8d..452d2db0fd 100644 --- a/src/corelib/corelib.pro +++ b/src/corelib/corelib.pro @@ -21,7 +21,7 @@ CONFIG += simd optimize_full QMAKE_DOCS = $$PWD/doc/qtcore.qdocconf ANDROID_LIB_DEPENDENCIES = \ - plugins/platforms/libqtforandroid.so + plugins/platforms/libplugins_platforms_qtforandroid.so ANDROID_BUNDLED_JAR_DEPENDENCIES = \ jar/QtAndroid.jar ANDROID_PERMISSIONS = \ diff --git a/src/corelib/plugin/qfactoryloader.cpp b/src/corelib/plugin/qfactoryloader.cpp index 79315ae50f..18f10c9b43 100644 --- a/src/corelib/plugin/qfactoryloader.cpp +++ b/src/corelib/plugin/qfactoryloader.cpp @@ -209,7 +209,7 @@ void QFactoryLoader::update() #if defined(Q_OS_WIN) QStringList(QStringLiteral("*.dll")), #elif defined(Q_OS_ANDROID) - QStringList(QLatin1String("plugins_%1_*.so").arg(d->suffix)), + QStringList(QLatin1String("libplugins_%1_*.so").arg(d->suffix)), #endif QDir::Files); QLibraryPrivate *library = 0; -- cgit v1.2.3 From c9478e90ff7abef1f019805f0846e651c484ebc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 24 Sep 2019 17:25:57 +0200 Subject: Export lcEventDispatcher in private namespace MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The category is used outside of QtCore, and needs to be exported for shared library builds. Change-Id: I9bba477d37b823146eaec4e1e53197651f09c013 Reviewed-by: Timur Pocheptsov Reviewed-by: Tor Arne Vestbø --- src/corelib/kernel/qeventdispatcher_cf.mm | 11 ++++++++--- src/corelib/kernel/qeventdispatcher_cf_p.h | 6 ++++-- 2 files changed, 12 insertions(+), 5 deletions(-) (limited to 'src/corelib') diff --git a/src/corelib/kernel/qeventdispatcher_cf.mm b/src/corelib/kernel/qeventdispatcher_cf.mm index b9e334f1f4..177551467c 100644 --- a/src/corelib/kernel/qeventdispatcher_cf.mm +++ b/src/corelib/kernel/qeventdispatcher_cf.mm @@ -56,6 +56,14 @@ # include #endif +QT_BEGIN_NAMESPACE +namespace QtPrivate { +Q_LOGGING_CATEGORY(lcEventDispatcher, "qt.eventdispatcher"); +Q_LOGGING_CATEGORY(lcEventDispatcherTimers, "qt.eventdispatcher.timers"); +} +using namespace QtPrivate; +QT_END_NAMESPACE + QT_USE_NAMESPACE /* @@ -148,9 +156,6 @@ static CFStringRef runLoopMode(NSDictionary *dictionary) QT_BEGIN_NAMESPACE -Q_LOGGING_CATEGORY(lcEventDispatcher, "qt.eventdispatcher"); -Q_LOGGING_CATEGORY(lcEventDispatcherTimers, "qt.eventdispatcher.timers"); - class RunLoopDebugger : public QObject { Q_OBJECT diff --git a/src/corelib/kernel/qeventdispatcher_cf_p.h b/src/corelib/kernel/qeventdispatcher_cf_p.h index 26191d520c..a2cecd9a93 100644 --- a/src/corelib/kernel/qeventdispatcher_cf_p.h +++ b/src/corelib/kernel/qeventdispatcher_cf_p.h @@ -98,8 +98,10 @@ Q_FORWARD_DECLARE_OBJC_CLASS(QT_MANGLE_NAMESPACE(RunLoopModeTracker)); QT_BEGIN_NAMESPACE -Q_DECLARE_LOGGING_CATEGORY(lcEventDispatcher); -Q_DECLARE_LOGGING_CATEGORY(lcEventDispatcherTimers) +namespace QtPrivate { +Q_CORE_EXPORT Q_DECLARE_LOGGING_CATEGORY(lcEventDispatcher); +Q_CORE_EXPORT Q_DECLARE_LOGGING_CATEGORY(lcEventDispatcherTimers) +} class QEventDispatcherCoreFoundation; -- cgit v1.2.3