summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/doc/src/dontdocument.qdoc2
-rw-r--r--src/corelib/global/qglobal.h2
-rw-r--r--src/corelib/global/qnumeric_p.h3
-rw-r--r--src/corelib/io/qprocess.cpp4
-rw-r--r--src/corelib/itemmodels/qstringlistmodel.cpp5
-rw-r--r--src/corelib/time/qdatetimeparser.cpp29
-rw-r--r--src/corelib/tools/qline.cpp2
-rw-r--r--src/corelib/tools/qscopeguard.qdoc8
-rw-r--r--src/corelib/tools/qsharedpointer.cpp2
9 files changed, 33 insertions, 24 deletions
diff --git a/src/corelib/doc/src/dontdocument.qdoc b/src/corelib/doc/src/dontdocument.qdoc
index 19ca7db299..ff0aa98709 100644
--- a/src/corelib/doc/src/dontdocument.qdoc
+++ b/src/corelib/doc/src/dontdocument.qdoc
@@ -37,5 +37,5 @@
QCborValueRef qfloat16 QDeferredDeleteEvent QSpecialInteger QLittleEndianStorageType
QBigEndianStorageType QFactoryInterface QFutureWatcherBase QJsonValuePtr
QJsonValueRefPtr QLinkedListNode QAbstractConcatenable QStringBuilderCommon
- QTextCodec::ConverterState QThreadStorageData)
+ QTextCodec::ConverterState QThreadStorageData QTextStreamManipulator)
*/
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index 1bfe2c1615..35c0482768 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -945,7 +945,7 @@ QT_WARNING_POP
#endif
QT_WARNING_PUSH
-// warning: noexcept-expression evaluates to ‘false’ because of a call to ‘void swap(..., ...)'
+// warning: noexcept-expression evaluates to 'false' because of a call to 'void swap(..., ...)'
QT_WARNING_DISABLE_GCC("-Wnoexcept")
namespace QtPrivate
diff --git a/src/corelib/global/qnumeric_p.h b/src/corelib/global/qnumeric_p.h
index fdfcbda6ca..7418579fe0 100644
--- a/src/corelib/global/qnumeric_p.h
+++ b/src/corelib/global/qnumeric_p.h
@@ -249,7 +249,8 @@ QT_WARNING_POP
// size_t. Implementations for 8- and 16-bit types will work but may not be as
// efficient. Implementations for 64-bit may be missing on 32-bit platforms.
-#if (defined(Q_CC_GNU) && (Q_CC_GNU >= 500) || (defined(Q_CC_INTEL) && !defined(Q_OS_WIN))) || __has_builtin(__builtin_add_overflow)
+#if ((defined(Q_CC_INTEL) ? (Q_CC_INTEL >= 1800 && !defined(Q_OS_WIN)) : defined(Q_CC_GNU)) \
+ && Q_CC_GNU >= 500) || __has_builtin(__builtin_add_overflow)
// GCC 5, ICC 18, and Clang 3.8 have builtins to detect overflows
template <typename T> inline
diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp
index 816026a36c..aedcae2cdc 100644
--- a/src/corelib/io/qprocess.cpp
+++ b/src/corelib/io/qprocess.cpp
@@ -1004,7 +1004,7 @@ QT_WARNING_POP
/*!
\internal
- Returns true if we emitted readyRead().
+ Returns \c true if we emitted readyRead().
*/
bool QProcessPrivate::tryReadFromChannel(Channel *channel)
{
@@ -2187,6 +2187,8 @@ bool QProcess::startDetached(qint64 *pid)
This method is an alias for start(), and exists only to fully implement
the interface defined by QIODevice.
+ Returns \c true if the program has been started.
+
\sa start(), setProgram(), setArguments()
*/
bool QProcess::open(OpenMode mode)
diff --git a/src/corelib/itemmodels/qstringlistmodel.cpp b/src/corelib/itemmodels/qstringlistmodel.cpp
index 9c87ff853a..a950783ed8 100644
--- a/src/corelib/itemmodels/qstringlistmodel.cpp
+++ b/src/corelib/itemmodels/qstringlistmodel.cpp
@@ -212,6 +212,7 @@ Qt::ItemFlags QStringListModel::flags(const QModelIndex &index) const
\a index in the model, to the provided \a value.
The dataChanged() signal is emitted if the item is changed.
+ Returns \c true after emitting the dataChanged() signal.
\sa Qt::ItemDataRole, data()
*/
@@ -249,6 +250,8 @@ bool QStringListModel::clearItemData(const QModelIndex &index)
specified, indicating that the rows are inserted in the top level of
the model.
+ Returns \c true if the insertion was successful.
+
\sa QAbstractItemModel::insertRows()
*/
@@ -275,6 +278,8 @@ bool QStringListModel::insertRows(int row, int count, const QModelIndex &parent)
specified, indicating that the rows are removed in the top level of
the model.
+ Returns \c true if the row removal was successful.
+
\sa QAbstractItemModel::removeRows()
*/
diff --git a/src/corelib/time/qdatetimeparser.cpp b/src/corelib/time/qdatetimeparser.cpp
index fa0884c827..31d8e6cc20 100644
--- a/src/corelib/time/qdatetimeparser.cpp
+++ b/src/corelib/time/qdatetimeparser.cpp
@@ -137,13 +137,12 @@ bool QDateTimeParser::setDigit(QDateTime &v, int index, int newVal) const
#endif
return false;
}
- const SectionNode &node = sectionNodes.at(index);
- const QDate date = v.date();
+ QCalendar::YearMonthDay date = calendar.partsFromDate(v.date());
+ if (!date.isValid())
+ return false;
+
const QTime time = v.time();
- int year = date.year(calendar);
- int month = date.month(calendar);
- int day = date.day(calendar);
int hour = time.hour();
int minute = time.minute();
int second = time.second();
@@ -152,14 +151,15 @@ bool QDateTimeParser::setDigit(QDateTime &v, int index, int newVal) const
// Only offset from UTC is amenable to setting an int value:
int offset = tspec == Qt::OffsetFromUTC ? v.offsetFromUtc() : 0;
+ const SectionNode &node = sectionNodes.at(index);
switch (node.type) {
case Hour24Section: case Hour12Section: hour = newVal; break;
case MinuteSection: minute = newVal; break;
case SecondSection: second = newVal; break;
case MSecSection: msec = newVal; break;
case YearSection2Digits:
- case YearSection: year = newVal; break;
- case MonthSection: month = newVal; break;
+ case YearSection: date.year = newVal; break;
+ case MonthSection: date.month = newVal; break;
case DaySection:
case DayOfWeekSectionShort:
case DayOfWeekSectionLong:
@@ -169,7 +169,7 @@ bool QDateTimeParser::setDigit(QDateTime &v, int index, int newVal) const
// to 31 for february should return true
return false;
}
- day = newVal;
+ date.day = newVal;
break;
case TimeZoneSection:
if (newVal < absoluteMin(index) || newVal > absoluteMax(index))
@@ -185,15 +185,14 @@ bool QDateTimeParser::setDigit(QDateTime &v, int index, int newVal) const
}
if (!(node.type & DaySectionMask)) {
- if (day < cachedDay)
- day = cachedDay;
- const int max = calendar.daysInMonth(month, year);
- if (day > max) {
- day = max;
- }
+ if (date.day < cachedDay)
+ date.day = cachedDay;
+ const int max = calendar.daysInMonth(date.month, date.year);
+ if (date.day > max)
+ date.day = max;
}
- const QDate newDate(year, month, day, calendar);
+ const QDate newDate = calendar.dateFromParts(date);
const QTime newTime(hour, minute, second, msec);
if (!newDate.isValid() || !newTime.isValid())
return false;
diff --git a/src/corelib/tools/qline.cpp b/src/corelib/tools/qline.cpp
index 3afd23d76b..dde66ed093 100644
--- a/src/corelib/tools/qline.cpp
+++ b/src/corelib/tools/qline.cpp
@@ -374,7 +374,7 @@ QDataStream &operator>>(QDataStream &stream, QLine &line)
*/
/*!
- \enum QLineF::IntersectionType
+ \enum QLineF::IntersectType
Describes the intersection between two lines.
diff --git a/src/corelib/tools/qscopeguard.qdoc b/src/corelib/tools/qscopeguard.qdoc
index 5a9b7fd210..6b3c942e84 100644
--- a/src/corelib/tools/qscopeguard.qdoc
+++ b/src/corelib/tools/qscopeguard.qdoc
@@ -51,10 +51,10 @@ QT_BEGIN_NAMESPACE
of the scope.
\ingroup misc
- QScopeGuard<F> is a class which sole purpose is to run a function \e F in
- its destructor. This is useful for guaranteeing your cleanup code is
- executed, whether the function is exited normally, exited early by a return
- statement, or exited by an exception.
+ QScopeGuard<F> is a class of which the sole purpose is to run the function
+ \a f in its destructor. This is useful for guaranteeing
+ your cleanup code is executed, whether the function is exited normally,
+ exited early by a return statement, or exited by an exception.
If \e F is a lambda then you cannot instantiate the template directly,
therefore the qScopeGuard() helper is provided and QScopeGuard<F> is made a
diff --git a/src/corelib/tools/qsharedpointer.cpp b/src/corelib/tools/qsharedpointer.cpp
index f185d2f23f..0576fb2bd0 100644
--- a/src/corelib/tools/qsharedpointer.cpp
+++ b/src/corelib/tools/qsharedpointer.cpp
@@ -1285,6 +1285,8 @@
\relates QSharedPointer
\since 5.14
+ Returns a shared pointer to the pointer held by \a src.
+
Same as qSharedPointerObjectCast(). This function is provided for STL
compatibility.
*/