summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools
diff options
context:
space:
mode:
authorhjk <hjk121@nokiamail.com>2013-04-22 08:34:53 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-23 18:57:45 +0200
commit32629676b977d98e853fc6101a63c0d888ff5598 (patch)
tree9c456ae30ee87beeecaa2f77f7b628bce6458c67 /src/corelib/tools
parent38bf6da7ddaa6975ea00c27144fcbc70c789d398 (diff)
Use a QVector<QDateTime> instead of an array in QFileInfoPrivate
Since QDateTime is pimpled, default allocation is expensive and regularly shows up in profiles of code using QFileInfo. For Qt 6, QDateTime's data members should be put into the class proper, and this change here reverted. Change-Id: I94a50e467b12772e1076181eb2ac6031984d8802 Reviewed-by: Thorbjørn Lindeijer <bjorn@lindeijer.nl> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'src/corelib/tools')
-rw-r--r--src/corelib/tools/qdatetime.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/corelib/tools/qdatetime.h b/src/corelib/tools/qdatetime.h
index d1cc10c877..5c1668033c 100644
--- a/src/corelib/tools/qdatetime.h
+++ b/src/corelib/tools/qdatetime.h
@@ -262,6 +262,10 @@ public:
private:
friend class QDateTimePrivate;
void detach();
+
+ // ### Qt6: Using a private here has high impact on runtime
+ // on users such as QFileInfo. In Qt 6, the data members
+ // should be inlined.
QExplicitlySharedDataPointer<QDateTimePrivate> d;
#ifndef QT_NO_DATASTREAM