summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-09-24 01:00:42 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-09-24 01:00:43 +0200
commita211c240a9bf92c0a9d1c3703420eff73d4f9cd6 (patch)
treea6bca2c76dc4fc90ab64c5b09db1ca1a51367501 /src/corelib/kernel
parent963941faae561aeadd3b3e97726d1b57e8bccf90 (diff)
parent70c053ee684448984b1f762abd3b40884cece2fa (diff)
Merge remote-tracking branch 'origin/5.14' into 5.15
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp24
-rw-r--r--src/corelib/kernel/qobject.cpp19
2 files changed, 22 insertions, 21 deletions
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
index c537e8f51b..e25049f821 100644
--- a/src/corelib/kernel/qcoreapplication.cpp
+++ b/src/corelib/kernel/qcoreapplication.cpp
@@ -2708,18 +2708,22 @@ QStringList QCoreApplication::libraryPathsLocked()
QStringList *app_libpaths = new QStringList;
coreappdata()->app_libpaths.reset(app_libpaths);
- QString libPathEnv = qEnvironmentVariable("QT_PLUGIN_PATH");
- if (!libPathEnv.isEmpty()) {
- QStringList paths = libPathEnv.split(QDir::listSeparator(), QString::SkipEmptyParts);
- for (QStringList::const_iterator it = paths.constBegin(); it != paths.constEnd(); ++it) {
- QString canonicalPath = QDir(*it).canonicalPath();
- if (!canonicalPath.isEmpty()
- && !app_libpaths->contains(canonicalPath)) {
- app_libpaths->append(canonicalPath);
+ auto setPathsFromEnv = [&](QString libPathEnv) {
+ if (!libPathEnv.isEmpty()) {
+ QStringList paths = libPathEnv.split(QDir::listSeparator(), QString::SkipEmptyParts);
+ for (QStringList::const_iterator it = paths.constBegin(); it != paths.constEnd(); ++it) {
+ QString canonicalPath = QDir(*it).canonicalPath();
+ if (!canonicalPath.isEmpty()
+ && !app_libpaths->contains(canonicalPath)) {
+ app_libpaths->append(canonicalPath);
+ }
}
}
- }
-
+ };
+ setPathsFromEnv(qEnvironmentVariable("QT_PLUGIN_PATH"));
+#ifdef Q_OS_ANDROID
+ setPathsFromEnv(qEnvironmentVariable("QT_BUNDLED_LIBS_PATH"));
+#endif
#ifdef Q_OS_DARWIN
// Check the main bundle's PlugIns directory as this is a standard location for Apple OSes.
// Note that the QLibraryInfo::PluginsPath below will coincidentally be the same as this value
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index f62eac61ed..cf107498dd 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -3908,11 +3908,12 @@ void doActivate(QObject *sender, int signal_index, void **argv)
if (connections->currentConnectionId.loadRelaxed() == 0)
senderDeleted = true;
}
- if (!senderDeleted)
+ if (!senderDeleted) {
sp->connections.loadRelaxed()->cleanOrphanedConnections(sender);
- if (callbacks_enabled && signal_spy_set->signal_end_callback != nullptr)
- signal_spy_set->signal_end_callback(sender, signal_index);
+ if (callbacks_enabled && signal_spy_set->signal_end_callback != nullptr)
+ signal_spy_set->signal_end_callback(sender, signal_index);
+ }
}
/*!
@@ -4399,22 +4400,18 @@ QDebug operator<<(QDebug dbg, const QObject *o)
\relates QObject
\obsolete
+ In new code, you should prefer the use of the Q_ENUM() macro, which makes the
+ type available also to the meta type system.
+ For instance, QMetaEnum::fromType() will not work with types declared with Q_ENUMS().
+
This macro registers one or several enum types to the meta-object
system.
- For example:
-
- \snippet code/src_corelib_kernel_qobject.cpp 38
-
If you want to register an enum that is declared in another class,
the enum must be fully qualified with the name of the class
defining it. In addition, the class \e defining the enum has to
inherit QObject as well as declare the enum using Q_ENUMS().
- In new code, you should prefer the use of the Q_ENUM() macro, which makes the
- type available also to the meta type system.
- For instance, QMetaEnum::fromType() will not work with types declared with Q_ENUMS().
-
\sa {Qt's Property System}
*/