diff options
author | mae <qt-info@nokia.com> | 2011-04-29 11:44:43 +0200 |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2011-05-10 12:54:52 +0200 |
commit | 4b75ceea08815c096ec35a077c5c1e3bfca0e5ed (patch) | |
tree | 5d77dd989e1659f5d925b3d8d0dbb6aec7c02775 /src/corelib/kernel/qcoreapplication_p.h | |
parent | d454d694080d2a1e6e54f040c374480dd6a91dbc (diff) |
Reduce open and stat system calls for QSettings
The patch moves the global static QSettings object
from QLibrary to QCoreApplication and reduces a
few stat and open calls.
Without the patch, a large Trolltech.conf was
pushed out of the unused settings cache during
startup, meaning Trolltech.conf was parsed
more than once.
Reviewed-by: Liang Qi
(cherry picked from commit 31ef8fa6abc2ea23c6f0a996b36494d88aafb0b5)
Diffstat (limited to 'src/corelib/kernel/qcoreapplication_p.h')
-rw-r--r-- | src/corelib/kernel/qcoreapplication_p.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/kernel/qcoreapplication_p.h b/src/corelib/kernel/qcoreapplication_p.h index fdceab4724..937a101085 100644 --- a/src/corelib/kernel/qcoreapplication_p.h +++ b/src/corelib/kernel/qcoreapplication_p.h @@ -55,6 +55,7 @@ #include "QtCore/qcoreapplication.h" #include "QtCore/qtranslator.h" +#include "QtCore/qsettings.h" #include "private/qobject_p.h" #ifdef Q_OS_SYMBIAN @@ -141,6 +142,7 @@ public: #if defined(QT3_SUPPORT) static bool useQt3Support; #endif + static QSettings *trolltechConf; }; QT_END_NAMESPACE |