summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qcoreapplication_p.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@digia.com>2013-11-22 14:31:05 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-26 20:29:09 +0100
commit75a75624913a41274ff94aa5b491b303367c6a20 (patch)
tree8b65ee429b8e999b6103d38c9074ba8f90e007e7 /src/corelib/kernel/qcoreapplication_p.h
parentdb4afbef7d1e2405a3b8f007e9009f509b4a3eac (diff)
QCoreApplication: Add static setter for application file path.
In cases where QGuiApplication is instantiated by a library embedded into another application via some plugin mechanism (for example, Active X controls built using Qt), the QPA platform plugin and other plugins cannot be found next to the application executable. In this case, the library should set the application file path to its deployment location such that plugin paths are set accordingly, the directory is added to the path and qt.conf is found, should it exist. Task-number: QTBUG-34989 Change-Id: I4a53104b5121a8d26751129912f999228be45dfd Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Diffstat (limited to 'src/corelib/kernel/qcoreapplication_p.h')
-rw-r--r--src/corelib/kernel/qcoreapplication_p.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/corelib/kernel/qcoreapplication_p.h b/src/corelib/kernel/qcoreapplication_p.h
index ad0449f02c..0c00f396b5 100644
--- a/src/corelib/kernel/qcoreapplication_p.h
+++ b/src/corelib/kernel/qcoreapplication_p.h
@@ -139,7 +139,9 @@ public:
QCoreApplicationPrivate::Type application_type;
QString cachedApplicationDirPath;
- QString cachedApplicationFilePath;
+ static QString *cachedApplicationFilePath;
+ static void setApplicationFilePath(const QString &path);
+ static inline void clearApplicationFilePath() { delete cachedApplicationFilePath; cachedApplicationFilePath = 0; }
#ifndef QT_NO_QOBJECT
bool in_exec;