summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/global/archdetect.cpp6
-rw-r--r--src/corelib/global/qcompilerdetection.h4
-rw-r--r--src/corelib/kernel/qmetatype.cpp2
-rw-r--r--src/corelib/kernel/qtcore_eval.cpp6
-rw-r--r--src/corelib/tools/qdatetimeparser.cpp2
-rw-r--r--src/corelib/tools/qelapsedtimer.cpp15
-rw-r--r--src/corelib/tools/qelapsedtimer.h7
-rw-r--r--src/corelib/tools/qelapsedtimer_generic.cpp2
-rw-r--r--src/corelib/tools/qrect.cpp2
9 files changed, 34 insertions, 12 deletions
diff --git a/src/corelib/global/archdetect.cpp b/src/corelib/global/archdetect.cpp
index e35595e727..344c363031 100644
--- a/src/corelib/global/archdetect.cpp
+++ b/src/corelib/global/archdetect.cpp
@@ -83,10 +83,10 @@
# define ARCH_PROCESSOR "unknown"
#endif
-// endinanness
-#if defined(Q_LITTLE_ENDIAN)
+// endianness
+#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
# define ARCH_ENDIANNESS "little_endian"
-#elif defined(Q_BIG_ENDIAN)
+#elif Q_BYTE_ORDER == Q_BIG_ENDIAN
# define ARCH_ENDIANNESS "big_endian"
#endif
diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h
index 3bf1cc0cbb..2c7a00133d 100644
--- a/src/corelib/global/qcompilerdetection.h
+++ b/src/corelib/global/qcompilerdetection.h
@@ -742,7 +742,6 @@
# define Q_COMPILER_DEFAULT_MEMBERS
# define Q_COMPILER_DELETE_MEMBERS
# define Q_COMPILER_EXTERN_TEMPLATES
-# define Q_COMPILER_INITIALIZER_LISTS
# define Q_COMPILER_UNIFORM_INIT
# define Q_COMPILER_UNICODE_STRINGS
# define Q_COMPILER_VARIADIC_TEMPLATES
@@ -750,6 +749,9 @@
# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405
/* C++11 features supported in GCC 4.5: */
# define Q_COMPILER_EXPLICIT_CONVERSIONS
+ /* GCC 4.4 implements initializer_list but does not define typedefs required
+ * by the standard. */
+# define Q_COMPILER_INITIALIZER_LISTS
# define Q_COMPILER_LAMBDA
# define Q_COMPILER_RAW_STRINGS
# endif
diff --git a/src/corelib/kernel/qmetatype.cpp b/src/corelib/kernel/qmetatype.cpp
index 0647513221..5fe1047426 100644
--- a/src/corelib/kernel/qmetatype.cpp
+++ b/src/corelib/kernel/qmetatype.cpp
@@ -310,7 +310,7 @@ struct DefinedTypesFilter {
name to a type so that it can be created and destructed
dynamically at run-time. Declare new types with Q_DECLARE_METATYPE()
to make them available to QVariant and other template-based functions.
- Call qRegisterMetaType() to make type available to non-template based
+ Call qRegisterMetaType() to make types available to non-template based
functions, such as the queued signal and slot connections.
Any class or struct that has a public default
diff --git a/src/corelib/kernel/qtcore_eval.cpp b/src/corelib/kernel/qtcore_eval.cpp
index a5c4c36638..c938e0fb5b 100644
--- a/src/corelib/kernel/qtcore_eval.cpp
+++ b/src/corelib/kernel/qtcore_eval.cpp
@@ -119,9 +119,11 @@ static EvaluationStatus qt_eval_is_supported()
static int qt_eval_days_left()
{
+ const char *expiry_date = const_cast<const char*>(qt_eval_expiry_date + 12);
+
QDate today = QDate::currentDate();
- QDate build = QLibraryInfo::buildDate();
- return qMax<qint64>(-1, today.daysTo(build) + 30);
+ QDate lastday = QDate::fromString(QString::fromLatin1(expiry_date), Qt::ISODate);
+ return today.daysTo(lastday);
}
static bool qt_eval_is_expired()
diff --git a/src/corelib/tools/qdatetimeparser.cpp b/src/corelib/tools/qdatetimeparser.cpp
index fb5c5f5943..edb4f4e048 100644
--- a/src/corelib/tools/qdatetimeparser.cpp
+++ b/src/corelib/tools/qdatetimeparser.cpp
@@ -749,7 +749,6 @@ int QDateTimeParser::parseSection(const QDateTime &currentValue, int sectionInde
break;
}
if (state != Invalid) {
- QString str = text;
text.replace(index, used, sectiontext.left(used));
}
break; }
@@ -770,7 +769,6 @@ int QDateTimeParser::parseSection(const QDateTime &currentValue, int sectionInde
if (num != -1) {
state = (used == sectiontext.size() ? Acceptable : Intermediate);
- QString str = text;
text.replace(index, used, sectiontext.left(used));
} else {
state = Intermediate;
diff --git a/src/corelib/tools/qelapsedtimer.cpp b/src/corelib/tools/qelapsedtimer.cpp
index 1da85fce96..08fc1cf5e2 100644
--- a/src/corelib/tools/qelapsedtimer.cpp
+++ b/src/corelib/tools/qelapsedtimer.cpp
@@ -202,6 +202,17 @@ QT_BEGIN_NAMESPACE
*/
/*!
+ \fn QElapsedTimer::QElapsedTimer()
+ \since 5.4
+
+ Constructs an invalid QElapsedTimer. A timer becomes valid once it has been
+ started.
+
+ \sa isValid(), start()
+*/
+
+
+/*!
\fn bool QElapsedTimer::operator ==(const QElapsedTimer &other) const
Returns \c true if this object and \a other contain the same time.
@@ -230,8 +241,8 @@ void QElapsedTimer::invalidate() Q_DECL_NOTHROW
}
/*!
- Returns \c false if this object was invalidated by a call to invalidate() and
- has not been restarted since.
+ Returns \c false if the timer has never been started or invalidated by a
+ call to invalidate().
\sa invalidate(), start(), restart()
*/
diff --git a/src/corelib/tools/qelapsedtimer.h b/src/corelib/tools/qelapsedtimer.h
index b06afe4ab4..7df5dec63a 100644
--- a/src/corelib/tools/qelapsedtimer.h
+++ b/src/corelib/tools/qelapsedtimer.h
@@ -57,6 +57,13 @@ public:
MachAbsoluteTime,
PerformanceCounter
};
+
+ Q_DECL_CONSTEXPR QElapsedTimer()
+ : t1(Q_INT64_C(0x8000000000000000))
+ , t2(Q_INT64_C(0x8000000000000000))
+ {
+ }
+
static ClockType clockType() Q_DECL_NOTHROW;
static bool isMonotonic() Q_DECL_NOTHROW;
diff --git a/src/corelib/tools/qelapsedtimer_generic.cpp b/src/corelib/tools/qelapsedtimer_generic.cpp
index 6324be00c0..7a52faa3c5 100644
--- a/src/corelib/tools/qelapsedtimer_generic.cpp
+++ b/src/corelib/tools/qelapsedtimer_generic.cpp
@@ -87,6 +87,8 @@ void QElapsedTimer::start() Q_DECL_NOTHROW
and then starting the timer again with start(), but it does so in one
single operation, avoiding the need to obtain the clock value twice.
+ Restarting the timer makes it valid again.
+
The following example illustrates how to use this function to calibrate a
parameter to a slow operation (for example, an iteration count) so that
this operation takes at least 250 milliseconds:
diff --git a/src/corelib/tools/qrect.cpp b/src/corelib/tools/qrect.cpp
index 04269e485b..57cc863696 100644
--- a/src/corelib/tools/qrect.cpp
+++ b/src/corelib/tools/qrect.cpp
@@ -284,7 +284,7 @@ QT_BEGIN_NAMESPACE
Returns \c true if the rectangle is valid, otherwise returns \c false.
- A valid rectangle has a left() < right() and top() <
+ A valid rectangle has a left() <= right() and top() <=
bottom(). Note that non-trivial operations like intersections are
not defined for invalid rectangles. A valid rectangle is not empty
(i.e., isValid() == !isEmpty()).