summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@theqtcompany.com>2015-03-18 15:23:56 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2015-03-18 22:27:24 +0000
commitdcf0ececbf167502ac9943c6435bb9ddeeb29d5e (patch)
tree19416d427b84f0a90e0d3028588404a544003734 /src/corelib/kernel
parent7aad6b9fd426e05fdfb3892d60432a45e4079887 (diff)
parent198606f6dbca95ba3a170fff387327d8271018cd (diff)
Merge "Merge remote-tracking branch 'origin/5.5' into dev" into refs/staging/dev
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp21
-rw-r--r--src/corelib/kernel/qvariant.cpp2
-rw-r--r--src/corelib/kernel/qvariant.h2
3 files changed, 18 insertions, 7 deletions
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
index 0bde57c8b3..dbffa83cee 100644
--- a/src/corelib/kernel/qcoreapplication.cpp
+++ b/src/corelib/kernel/qcoreapplication.cpp
@@ -2420,16 +2420,27 @@ Q_GLOBAL_STATIC_WITH_ARGS(QMutex, libraryPathMutex, (QMutex::Recursive))
Returns a list of paths that the application will search when
dynamically loading libraries.
+ The return value of this function may change when a QCoreApplication
+ is created. It is not recommended to call it before creating a
+ QCoreApplication. The directory of the application executable (\b not
+ the working directory) is part of the list if it is known. In order
+ to make it known a QCoreApplication has to be constructed as it will
+ use \c {argv[0]} to find it.
+
Qt provides default library paths, but they can also be set using
a \l{Using qt.conf}{qt.conf} file. Paths specified in this file
- will override default values.
+ will override default values. Note that if the qt.conf file is in
+ the directory of the application executable, it may not be found
+ until a QCoreApplication is created. If it is not found when calling
+ this function, the default library paths will be used.
- This list will include the installation directory for plugins if
+ The list will include the installation directory for plugins if
it exists (the default installation directory for plugins is \c
INSTALL/plugins, where \c INSTALL is the directory where Qt was
- installed). The directory of the application executable (NOT the
- working directory) is always added, as well as the colon separated
- entries of the \c QT_PLUGIN_PATH environment variable.
+ installed). The colon separated entries of the \c QT_PLUGIN_PATH
+ environment variable are always added. The plugin installation
+ directory (and its existence) may change when the directory of
+ the application executable becomes known.
If you want to iterate over the list, you can use the \l foreach
pseudo-keyword:
diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp
index 9ae6c779c0..f7a4abbf68 100644
--- a/src/corelib/kernel/qvariant.cpp
+++ b/src/corelib/kernel/qvariant.cpp
@@ -2536,7 +2536,7 @@ QModelIndex QVariant::toModelIndex() const
\sa canConvert(), convert(), toModelIndex()
*/
-QModelIndex QVariant::toPersistentModelIndex() const
+QPersistentModelIndex QVariant::toPersistentModelIndex() const
{
return qVariantToHelper<QPersistentModelIndex>(d, handlerManager);
}
diff --git a/src/corelib/kernel/qvariant.h b/src/corelib/kernel/qvariant.h
index d9eca94391..58dfc3aab0 100644
--- a/src/corelib/kernel/qvariant.h
+++ b/src/corelib/kernel/qvariant.h
@@ -320,7 +320,7 @@ class Q_CORE_EXPORT QVariant
QEasingCurve toEasingCurve() const;
QUuid toUuid() const;
QModelIndex toModelIndex() const;
- QModelIndex toPersistentModelIndex() const;
+ QPersistentModelIndex toPersistentModelIndex() const;
QJsonValue toJsonValue() const;
QJsonObject toJsonObject() const;
QJsonArray toJsonArray() const;