summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2019-05-27 17:47:22 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2019-06-06 15:54:32 +0200
commit548513a4bd050d3df0a85fed6e2d1a00ce06d2ab (patch)
tree9e65f2701e013c1d1232082d5635c1b4e7817dd3 /src
parent29e3a4dfeaf5d4924eaa68824fb21998de687809 (diff)
Separate out the time, zone, date code from corelib/tools/
We'll be adding calendar code here as well, and tools/ was getting rather crowded, so it looks like time to move out a reasonably coherent sub-bundle of it all. Change-Id: I7e8030f38c31aa307f519dd918a43fc44baa6aa1 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/corelib.pro1
-rw-r--r--src/corelib/time/qdatetime.cpp (renamed from src/corelib/tools/qdatetime.cpp)0
-rw-r--r--src/corelib/time/qdatetime.h (renamed from src/corelib/tools/qdatetime.h)0
-rw-r--r--src/corelib/time/qdatetime_p.h (renamed from src/corelib/tools/qdatetime_p.h)0
-rw-r--r--src/corelib/time/qdatetimeparser.cpp (renamed from src/corelib/tools/qdatetimeparser.cpp)0
-rw-r--r--src/corelib/time/qdatetimeparser_p.h (renamed from src/corelib/tools/qdatetimeparser_p.h)0
-rw-r--r--src/corelib/time/qtimezone.cpp (renamed from src/corelib/tools/qtimezone.cpp)0
-rw-r--r--src/corelib/time/qtimezone.h (renamed from src/corelib/tools/qtimezone.h)0
-rw-r--r--src/corelib/time/qtimezoneprivate.cpp (renamed from src/corelib/tools/qtimezoneprivate.cpp)0
-rw-r--r--src/corelib/time/qtimezoneprivate_android.cpp (renamed from src/corelib/tools/qtimezoneprivate_android.cpp)0
-rw-r--r--src/corelib/time/qtimezoneprivate_data_p.h (renamed from src/corelib/tools/qtimezoneprivate_data_p.h)0
-rw-r--r--src/corelib/time/qtimezoneprivate_icu.cpp (renamed from src/corelib/tools/qtimezoneprivate_icu.cpp)0
-rw-r--r--src/corelib/time/qtimezoneprivate_mac.mm (renamed from src/corelib/tools/qtimezoneprivate_mac.mm)0
-rw-r--r--src/corelib/time/qtimezoneprivate_p.h (renamed from src/corelib/tools/qtimezoneprivate_p.h)2
-rw-r--r--src/corelib/time/qtimezoneprivate_tz.cpp (renamed from src/corelib/tools/qtimezoneprivate_tz.cpp)3
-rw-r--r--src/corelib/time/qtimezoneprivate_win.cpp (renamed from src/corelib/tools/qtimezoneprivate_win.cpp)0
-rw-r--r--src/corelib/time/time.pri34
-rw-r--r--src/corelib/tools/qlocale.cpp2
-rw-r--r--src/corelib/tools/tools.pri30
-rw-r--r--src/tools/bootstrap/bootstrap.pro2
20 files changed, 39 insertions, 35 deletions
diff --git a/src/corelib/corelib.pro b/src/corelib/corelib.pro
index 6babbac8f5..521f840292 100644
--- a/src/corelib/corelib.pro
+++ b/src/corelib/corelib.pro
@@ -36,6 +36,7 @@ qtConfig(animation): include(animation/animation.pri)
include(global/global.pri)
include(thread/thread.pri)
include(tools/tools.pri)
+include(time/time.pri)
include(io/io.pri)
include(itemmodels/itemmodels.pri)
include(plugin/plugin.pri)
diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/time/qdatetime.cpp
index 9220d210f1..9220d210f1 100644
--- a/src/corelib/tools/qdatetime.cpp
+++ b/src/corelib/time/qdatetime.cpp
diff --git a/src/corelib/tools/qdatetime.h b/src/corelib/time/qdatetime.h
index 3e3b953b52..3e3b953b52 100644
--- a/src/corelib/tools/qdatetime.h
+++ b/src/corelib/time/qdatetime.h
diff --git a/src/corelib/tools/qdatetime_p.h b/src/corelib/time/qdatetime_p.h
index 6018f8f7b0..6018f8f7b0 100644
--- a/src/corelib/tools/qdatetime_p.h
+++ b/src/corelib/time/qdatetime_p.h
diff --git a/src/corelib/tools/qdatetimeparser.cpp b/src/corelib/time/qdatetimeparser.cpp
index 728b066db1..728b066db1 100644
--- a/src/corelib/tools/qdatetimeparser.cpp
+++ b/src/corelib/time/qdatetimeparser.cpp
diff --git a/src/corelib/tools/qdatetimeparser_p.h b/src/corelib/time/qdatetimeparser_p.h
index d9e39f0795..d9e39f0795 100644
--- a/src/corelib/tools/qdatetimeparser_p.h
+++ b/src/corelib/time/qdatetimeparser_p.h
diff --git a/src/corelib/tools/qtimezone.cpp b/src/corelib/time/qtimezone.cpp
index ef323de14a..ef323de14a 100644
--- a/src/corelib/tools/qtimezone.cpp
+++ b/src/corelib/time/qtimezone.cpp
diff --git a/src/corelib/tools/qtimezone.h b/src/corelib/time/qtimezone.h
index 62ecee49bb..62ecee49bb 100644
--- a/src/corelib/tools/qtimezone.h
+++ b/src/corelib/time/qtimezone.h
diff --git a/src/corelib/tools/qtimezoneprivate.cpp b/src/corelib/time/qtimezoneprivate.cpp
index 569b343187..569b343187 100644
--- a/src/corelib/tools/qtimezoneprivate.cpp
+++ b/src/corelib/time/qtimezoneprivate.cpp
diff --git a/src/corelib/tools/qtimezoneprivate_android.cpp b/src/corelib/time/qtimezoneprivate_android.cpp
index be4f374fdd..be4f374fdd 100644
--- a/src/corelib/tools/qtimezoneprivate_android.cpp
+++ b/src/corelib/time/qtimezoneprivate_android.cpp
diff --git a/src/corelib/tools/qtimezoneprivate_data_p.h b/src/corelib/time/qtimezoneprivate_data_p.h
index 40d6c972c2..40d6c972c2 100644
--- a/src/corelib/tools/qtimezoneprivate_data_p.h
+++ b/src/corelib/time/qtimezoneprivate_data_p.h
diff --git a/src/corelib/tools/qtimezoneprivate_icu.cpp b/src/corelib/time/qtimezoneprivate_icu.cpp
index 5570ce7571..5570ce7571 100644
--- a/src/corelib/tools/qtimezoneprivate_icu.cpp
+++ b/src/corelib/time/qtimezoneprivate_icu.cpp
diff --git a/src/corelib/tools/qtimezoneprivate_mac.mm b/src/corelib/time/qtimezoneprivate_mac.mm
index d3c4fbe5da..d3c4fbe5da 100644
--- a/src/corelib/tools/qtimezoneprivate_mac.mm
+++ b/src/corelib/time/qtimezoneprivate_mac.mm
diff --git a/src/corelib/tools/qtimezoneprivate_p.h b/src/corelib/time/qtimezoneprivate_p.h
index b5e9286f6a..5f6491ef81 100644
--- a/src/corelib/tools/qtimezoneprivate_p.h
+++ b/src/corelib/time/qtimezoneprivate_p.h
@@ -53,7 +53,7 @@
//
#include "qtimezone.h"
-#include "qlocale_p.h"
+#include "private/qlocale_p.h"
#include "qvector.h"
#if QT_CONFIG(icu)
diff --git a/src/corelib/tools/qtimezoneprivate_tz.cpp b/src/corelib/time/qtimezoneprivate_tz.cpp
index f5440799ab..2c845b1bce 100644
--- a/src/corelib/tools/qtimezoneprivate_tz.cpp
+++ b/src/corelib/time/qtimezoneprivate_tz.cpp
@@ -40,6 +40,7 @@
#include "qtimezone.h"
#include "qtimezoneprivate_p.h"
#include "qdatetime_p.h" // ### Qt 5.14: remove once YearRange is on QDateTime
+#include "private/qlocale_tools_p.h"
#include <QtCore/QFile>
#include <QtCore/QHash>
@@ -48,8 +49,6 @@
#include <qdebug.h>
-#include "qlocale_tools_p.h"
-
#include <algorithm>
QT_BEGIN_NAMESPACE
diff --git a/src/corelib/tools/qtimezoneprivate_win.cpp b/src/corelib/time/qtimezoneprivate_win.cpp
index 1bf2366748..1bf2366748 100644
--- a/src/corelib/tools/qtimezoneprivate_win.cpp
+++ b/src/corelib/time/qtimezoneprivate_win.cpp
diff --git a/src/corelib/time/time.pri b/src/corelib/time/time.pri
new file mode 100644
index 0000000000..bacb7e875d
--- /dev/null
+++ b/src/corelib/time/time.pri
@@ -0,0 +1,34 @@
+# Qt time / date / zone / calendar module
+
+HEADERS += \
+ time/qdatetime.h \
+ time/qdatetime_p.h
+
+SOURCES += time/qdatetime.cpp
+
+qtConfig(timezone) {
+ HEADERS += \
+ time/qtimezone.h \
+ time/qtimezoneprivate_p.h \
+ time/qtimezoneprivate_data_p.h
+ SOURCES += \
+ time/qtimezone.cpp \
+ time/qtimezoneprivate.cpp
+ !nacl:darwin: {
+ SOURCES += time/qtimezoneprivate_mac.mm
+ } else: android:!android-embedded: {
+ SOURCES += time/qtimezoneprivate_android.cpp
+ } else: unix: {
+ SOURCES += time/qtimezoneprivate_tz.cpp
+ qtConfig(icu): SOURCES += time/qtimezoneprivate_icu.cpp
+ } else: qtConfig(icu): {
+ SOURCES += time/qtimezoneprivate_icu.cpp
+ } else: win32: {
+ SOURCES += time/qtimezoneprivate_win.cpp
+ }
+}
+
+qtConfig(datetimeparser) {
+ HEADERS += time/qdatetimeparser_p.h
+ SOURCES += time/qdatetimeparser.cpp
+}
diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp
index f6eaa53c3a..c8740e55f3 100644
--- a/src/corelib/tools/qlocale.cpp
+++ b/src/corelib/tools/qlocale.cpp
@@ -55,7 +55,7 @@
#include "qlocale_p.h"
#include "qlocale_tools_p.h"
#if QT_CONFIG(datetimeparser)
-#include "qdatetimeparser_p.h"
+#include "private/qdatetimeparser_p.h"
#endif
#include "qnamespace.h"
#include "qdatetime.h"
diff --git a/src/corelib/tools/tools.pri b/src/corelib/tools/tools.pri
index 5dcb6c9ee0..52eddd5d6b 100644
--- a/src/corelib/tools/tools.pri
+++ b/src/corelib/tools/tools.pri
@@ -20,8 +20,6 @@ HEADERS += \
tools/qcontainerfwd.h \
tools/qcontainertools_impl.h \
tools/qcryptographichash.h \
- tools/qdatetime.h \
- tools/qdatetime_p.h \
tools/qdoublescanprint_p.h \
tools/qeasingcurve.h \
tools/qfreelist_p.h \
@@ -86,7 +84,6 @@ SOURCES += \
tools/qbytearraymatcher.cpp \
tools/qcollator.cpp \
tools/qcryptographichash.cpp \
- tools/qdatetime.cpp \
tools/qeasingcurve.cpp \
tools/qfreelist.cpp \
tools/qhash.cpp \
@@ -154,33 +151,6 @@ qtConfig(icu) {
SOURCES += tools/qcollator_posix.cpp
}
-qtConfig(timezone) {
- HEADERS += \
- tools/qtimezone.h \
- tools/qtimezoneprivate_p.h \
- tools/qtimezoneprivate_data_p.h
- SOURCES += \
- tools/qtimezone.cpp \
- tools/qtimezoneprivate.cpp
- !nacl:darwin: {
- SOURCES += tools/qtimezoneprivate_mac.mm
- } else: android:!android-embedded: {
- SOURCES += tools/qtimezoneprivate_android.cpp
- } else: unix: {
- SOURCES += tools/qtimezoneprivate_tz.cpp
- qtConfig(icu): SOURCES += tools/qtimezoneprivate_icu.cpp
- } else: qtConfig(icu): {
- SOURCES += tools/qtimezoneprivate_icu.cpp
- } else: win32: {
- SOURCES += tools/qtimezoneprivate_win.cpp
- }
-}
-
-qtConfig(datetimeparser) {
- HEADERS += tools/qdatetimeparser_p.h
- SOURCES += tools/qdatetimeparser.cpp
-}
-
qtConfig(regularexpression) {
QMAKE_USE_PRIVATE += pcre2
diff --git a/src/tools/bootstrap/bootstrap.pro b/src/tools/bootstrap/bootstrap.pro
index 3aeca6e7af..40c0702f0a 100644
--- a/src/tools/bootstrap/bootstrap.pro
+++ b/src/tools/bootstrap/bootstrap.pro
@@ -72,6 +72,7 @@ SOURCES += \
../../corelib/serialization/qtextstream.cpp \
../../corelib/serialization/qxmlutils.cpp \
../../corelib/serialization/qxmlstream.cpp \
+ ../../corelib/time/qdatetime.cpp \
../../corelib/tools/qbitarray.cpp \
../../corelib/tools/qbytearray.cpp \
../../corelib/tools/qarraydata.cpp \
@@ -79,7 +80,6 @@ SOURCES += \
../../corelib/tools/qcommandlineparser.cpp \
../../corelib/tools/qcommandlineoption.cpp \
../../corelib/tools/qcryptographichash.cpp \
- ../../corelib/tools/qdatetime.cpp \
../../corelib/tools/qhash.cpp \
../../corelib/tools/qlist.cpp \
../../corelib/tools/qlinkedlist.cpp \