OpenCoverage

qdatetime.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/corelib/tools/qdatetime.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8namespace { namespace Q_QGS_defaultDateTimePrivate { typedef QSharedDataPointer<QDateTimePrivate> Type; QBasicAtomicInt guard = { QtGlobalStatic::Uninitialized }; __attribute__((visibility("hidden"))) inline Type *innerFunction() { struct HolderBase { ~HolderBase() noexcept { if (guard.load() == QtGlobalStatic::Initialized
guard.load() =...c::InitializedDescription
TRUEevaluated 326 times by 128 tests
Evaluated by:
  • tst_languagechange - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractslider - unknown status
  • tst_qaccessibility - unknown status
  • tst_qasn1element - unknown status
  • tst_qatomicint - unknown status
  • tst_qauthenticator - unknown status
  • tst_qbuttongroup - unknown status
  • tst_qcalendarwidget - unknown status
  • tst_qcolordialog - unknown status
  • tst_qcombobox - unknown status
  • tst_qcommandlinkbutton - unknown status
  • tst_qcompleter - unknown status
  • tst_qcoreapplication - unknown status
  • tst_qdatastream - unknown status
  • tst_qdate - unknown status
  • tst_qdatetime - unknown status
  • tst_qdatetimeedit - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusmarshall - unknown status
  • ...
FALSEnever evaluated
) guard.store(QtGlobalStatic::Destroyed);
executed 326 times by 128 tests: guard.store(QtGlobalStatic::Destroyed);
Executed by:
  • tst_languagechange - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractslider - unknown status
  • tst_qaccessibility - unknown status
  • tst_qasn1element - unknown status
  • tst_qatomicint - unknown status
  • tst_qauthenticator - unknown status
  • tst_qbuttongroup - unknown status
  • tst_qcalendarwidget - unknown status
  • tst_qcolordialog - unknown status
  • tst_qcombobox - unknown status
  • tst_qcommandlinkbutton - unknown status
  • tst_qcompleter - unknown status
  • tst_qcoreapplication - unknown status
  • tst_qdatastream - unknown status
  • tst_qdate - unknown status
  • tst_qdatetime - unknown status
  • tst_qdatetimeedit - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusmarshall - unknown status
  • ...
}
executed 326 times by 128 tests: end of block
Executed by:
  • tst_languagechange - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractslider - unknown status
  • tst_qaccessibility - unknown status
  • tst_qasn1element - unknown status
  • tst_qatomicint - unknown status
  • tst_qauthenticator - unknown status
  • tst_qbuttongroup - unknown status
  • tst_qcalendarwidget - unknown status
  • tst_qcolordialog - unknown status
  • tst_qcombobox - unknown status
  • tst_qcommandlinkbutton - unknown status
  • tst_qcompleter - unknown status
  • tst_qcoreapplication - unknown status
  • tst_qdatastream - unknown status
  • tst_qdate - unknown status
  • tst_qdatetime - unknown status
  • tst_qdatetimeedit - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusmarshall - unknown status
  • ...
}; static struct Holder : public HolderBase { Type value; Holder() noexcept(noexcept(Type (new QDateTimePrivate()))) : value (new QDateTimePrivate()) { guard.store(QtGlobalStatic::Initialized); } } holder; return
executed 7100330 times by 127 tests: return &holder.value;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDBusMetaType
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • ...
&holder.value;
executed 7100330 times by 127 tests: return &holder.value;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDBusMetaType
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • ...
} } } static QGlobalStatic<QSharedDataPointer<QDateTimePrivate>, Q_QGS_defaultDateTimePrivate::innerFunction, Q_QGS_defaultDateTimePrivate::guard> defaultDateTimePrivate;
0-7100330
9-
10-
11-
12-
13-
14enum {-
15 SECS_PER_DAY = 86400,-
16 MSECS_PER_DAY = 86400000,-
17 SECS_PER_HOUR = 3600,-
18 MSECS_PER_HOUR = 3600000,-
19 SECS_PER_MIN = 60,-
20 MSECS_PER_MIN = 60000,-
21 TIME_T_MAX = 2145916799,-
22 JULIAN_DAY_FOR_EPOCH = 2440588-
23};-
24-
25-
26-
27-
28-
29static inline QDate fixedDate(int y, int m, int d)-
30{-
31 QDate result(y, m, 1);-
32 result.setDate(y, m, qMin(d, result.daysInMonth()));-
33 return
executed 288 times by 4 tests: return result;
Executed by:
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
result;
executed 288 times by 4 tests: return result;
Executed by:
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
288
34}-
35static inline qint64 floordiv(qint64 a, int b)-
36{-
37 return
executed 96372952 times by 106 tests: return (a - (a < 0 ? b - 1 : 0)) / b;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • ...
(a - (a < 0 ? b - 1 : 0)) / b;
executed 96372952 times by 106 tests: return (a - (a < 0 ? b - 1 : 0)) / b;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • ...
96372952
38}-
39-
40static inline int floordiv(int a, int b)-
41{-
42 return
executed 138065546 times by 106 tests: return (a - (a < 0 ? b - 1 : 0)) / b;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • ...
(a - (a < 0 ? b - 1 : 0)) / b;
executed 138065546 times by 106 tests: return (a - (a < 0 ? b - 1 : 0)) / b;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • ...
138065546
43}-
44-
45static inline qint64 julianDayFromDate(int year, int month, int day)-
46{-
47-
48 if (year < 0
year < 0Description
TRUEevaluated 239374 times by 2 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
FALSEevaluated 21340606 times by 106 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • ...
)
239374-21340606
49 ++
executed 239374 times by 2 tests: ++year;
Executed by:
  • tst_QDate
  • tst_QDateTime
year;
executed 239374 times by 2 tests: ++year;
Executed by:
  • tst_QDate
  • tst_QDateTime
239374
50-
51-
52-
53-
54-
55-
56 int a = floordiv(14 - month, 12);-
57 qint64 y = (qint64)year + 4800 - a;-
58 int m = month + 12 * a - 3;-
59 return
executed 21563880 times by 106 tests: return day + floordiv(153 * m + 2, 5) + 365 * y + floordiv(y, 4) - floordiv(y, 100) + floordiv(y, 400) - 32045;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • ...
day + floordiv(153 * m + 2, 5) + 365 * y + floordiv(y, 4) - floordiv(y, 100) + floordiv(y, 400) - 32045;
executed 21563880 times by 106 tests: return day + floordiv(153 * m + 2, 5) + 365 * y + floordiv(y, 4) - floordiv(y, 100) + floordiv(y, 400) - 32045;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • ...
21563880
60}-
61-
62struct ParsedDate-
63{-
64 int year, month, day;-
65};-
66-
67-
68__attribute__((noinline))-
69static ParsedDate getDateFromJulianDay(qint64 julianDay)-
70{-
71-
72-
73-
74-
75-
76 qint64 a = julianDay + 32044;-
77 qint64 b = floordiv(4 * a + 3, 146097);-
78 int c = a - floordiv(146097 * b, 4);-
79-
80 int d = floordiv(4 * c + 3, 1461);-
81 int e = c - floordiv(1461 * d, 4);-
82 int m = floordiv(5 * e + 2, 153);-
83-
84 int day = e - floordiv(153 * m + 2, 5) + 1;-
85 int month = m + 3 - 12 * floordiv(m, 10);-
86 int year = 100 * b + d - 4800 + floordiv(m, 10);-
87-
88-
89 if (year <= 0
year <= 0Description
TRUEevaluated 715840 times by 5 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
FALSEevaluated 15118575 times by 103 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • ...
)
715840-15118575
90 --
executed 715840 times by 5 tests: --year ;
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
year ;
executed 715840 times by 5 tests: --year ;
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
715840
91-
92 const ParsedDate result = { year, month, day };-
93 return
executed 15841708 times by 103 tests: return result;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • ...
result;
executed 15841708 times by 103 tests: return result;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • ...
15841708
94}-
95-
96-
97-
98-
99-
100static const char monthDays[] = { 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };-
101-
102-
103static const char qt_shortMonthNames[][4] = {-
104 "Jan", "Feb", "Mar", "Apr", "May", "Jun",-
105 "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };-
106-
107static int qt_monthNumberFromShortName(QStringRef shortName)-
108{-
109 for (unsigned int i = 0; i < sizeof(qt_shortMonthNames) / sizeof(qt_shortMonthNames[0])
i < sizeof(qt_...MonthNames[0])Description
TRUEevaluated 579 times by 4 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkRequest
  • tst_QTime
FALSEevaluated 25 times by 3 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QTime
; ++i) {
25-579
110 if (shortName == QLatin1String(qt_shortMonthNames[i], 3)
shortName == Q...thNames[i], 3)Description
TRUEevaluated 90 times by 4 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkRequest
  • tst_QTime
FALSEevaluated 489 times by 4 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkRequest
  • tst_QTime
)
90-489
111 return
executed 90 times by 4 tests: return i + 1;
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkRequest
  • tst_QTime
i + 1;
executed 90 times by 4 tests: return i + 1;
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkRequest
  • tst_QTime
90
112 }
executed 489 times by 4 tests: end of block
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkRequest
  • tst_QTime
489
113 return
executed 25 times by 3 tests: return -1;
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QTime
-1;
executed 25 times by 3 tests: return -1;
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QTime
25
114}-
115static int qt_monthNumberFromShortName(const QString &shortName)-
116{ return
executed 48 times by 3 tests: return qt_monthNumberFromShortName(QStringRef(&shortName));
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QTime
qt_monthNumberFromShortName(QStringRef(&shortName));
executed 48 times by 3 tests: return qt_monthNumberFromShortName(QStringRef(&shortName));
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QTime
}
48
117-
118static int fromShortMonthName(const QStringRef &monthName)-
119{-
120-
121 int month = qt_monthNumberFromShortName(monthName);-
122 if (month != -1
month != -1Description
TRUEevaluated 51 times by 3 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkRequest
FALSEevaluated 16 times by 2 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
)
16-51
123 return
executed 51 times by 3 tests: return month;
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkRequest
month;
executed 51 times by 3 tests: return month;
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkRequest
51
124-
125 for (int i = 1; i <= 12
i <= 12Description
TRUEevaluated 192 times by 2 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
FALSEevaluated 16 times by 2 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
; ++i) {
16-192
126 if (monthName == QDate::shortMonthName(i)
monthName == Q...rtMonthName(i)Description
TRUEnever evaluated
FALSEevaluated 192 times by 2 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
)
0-192
127 return
never executed: return i;
i;
never executed: return i;
0
128 }
executed 192 times by 2 tests: end of block
Executed by:
  • tst_QDate
  • tst_QDateTime
192
129 return
executed 16 times by 2 tests: return -1;
Executed by:
  • tst_QDate
  • tst_QDateTime
-1;
executed 16 times by 2 tests: return -1;
Executed by:
  • tst_QDate
  • tst_QDateTime
16
130}-
131-
132-
133-
134struct ParsedRfcDateTime {-
135 QDate date;-
136 QTime time;-
137 int utcOffset;-
138};-
139-
140static ParsedRfcDateTime rfcDateImpl(const QString &s)-
141{-
142 ParsedRfcDateTime result;-
143-
144-
145 QRegExp rex(([]() -> QString { enum { Size = sizeof(u"" "^(?:[A-Z][a-z]+,)?[ \\t]*(\\d{1,2})[ \\t]+([A-Z][a-z]+)[ \\t]+(\\d\\d\\d\\d)(?:[ \\t]+(\\d\\d):(\\d\\d)(?::(\\d\\d))?)?[ \\t]*(?:([+-])(\\d\\d)(\\d\\d))?")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "^(?:[A-Z][a-z]+,)?[ \\t]*(\\d{1,2})[ \\t]+([A-Z][a-z]+)[ \\t]+(\\d\\d\\d\\d)(?:[ \\t]+(\\d\\d):(\\d\\d)(?::(\\d\\d))?)?[ \\t]*(?:([+-])(\\d\\d)(\\d\\d))?" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 71 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QTime
qstring_literal_temp;
executed 71 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QTime
}()));
71
146 if (s.indexOf(rex) == 0
s.indexOf(rex) == 0Description
TRUEevaluated 33 times by 3 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QTime
FALSEevaluated 38 times by 3 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QTime
) {
33-38
147 const QStringList cap = rex.capturedTexts();-
148 result.date = QDate(cap[3].toInt(), qt_monthNumberFromShortName(cap[2]), cap[1].toInt());-
149 if (!cap[4].isEmpty()
!cap[4].isEmpty()Description
TRUEevaluated 27 times by 3 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QTime
FALSEevaluated 6 times by 3 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QTime
)
6-27
150 result.time = QTime(cap[4].toInt(), cap[5].toInt(), cap[6].toInt());
executed 27 times by 3 tests: result.time = QTime(cap[4].toInt(), cap[5].toInt(), cap[6].toInt());
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QTime
27
151 const bool positiveOffset = (cap[7] == QLatin1String("+"));-
152 const int hourOffset = cap[8].toInt();-
153 const int minOffset = cap[9].toInt();-
154 result.utcOffset = ((hourOffset * 60 + minOffset) * (positiveOffset ? 60 : -60));-
155 }
executed 33 times by 3 tests: end of block
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QTime
else {
33
156-
157 QRegExp rex(([]() -> QString { enum { Size = sizeof(u"" "^[A-Z][a-z]+[ \\t]+([A-Z][a-z]+)[ \\t]+(\\d\\d)(?:[ \\t]+(\\d\\d):(\\d\\d):(\\d\\d))?[ \\t]+(\\d\\d\\d\\d)[ \\t]*(?:([+-])(\\d\\d)(\\d\\d))?")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "^[A-Z][a-z]+[ \\t]+([A-Z][a-z]+)[ \\t]+(\\d\\d)(?:[ \\t]+(\\d\\d):(\\d\\d):(\\d\\d))?[ \\t]+(\\d\\d\\d\\d)[ \\t]*(?:([+-])(\\d\\d)(\\d\\d))?" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 38 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QTime
qstring_literal_temp;
executed 38 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QTime
}()));
38
158 if (s.indexOf(rex) == 0
s.indexOf(rex) == 0Description
TRUEevaluated 15 times by 3 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QTime
FALSEevaluated 23 times by 3 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QTime
) {
15-23
159 const QStringList cap = rex.capturedTexts();-
160 result.date = QDate(cap[6].toInt(), qt_monthNumberFromShortName(cap[1]), cap[2].toInt());-
161 if (!cap[3].isEmpty()
!cap[3].isEmpty()Description
TRUEevaluated 12 times by 3 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QTime
FALSEevaluated 3 times by 3 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QTime
)
3-12
162 result.time = QTime(cap[3].toInt(), cap[4].toInt(), cap[5].toInt());
executed 12 times by 3 tests: result.time = QTime(cap[3].toInt(), cap[4].toInt(), cap[5].toInt());
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QTime
12
163 const bool positiveOffset = (cap[7] == QLatin1String("+"));-
164 const int hourOffset = cap[8].toInt();-
165 const int minOffset = cap[9].toInt();-
166 result.utcOffset = ((hourOffset * 60 + minOffset) * (positiveOffset ? 60 : -60));-
167 }
executed 15 times by 3 tests: end of block
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QTime
15
168 }
executed 38 times by 3 tests: end of block
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QTime
38
169-
170 return
executed 71 times by 3 tests: return result;
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QTime
result;
executed 71 times by 3 tests: return result;
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QTime
71
171}-
172-
173-
174-
175static QString toOffsetString(Qt::DateFormat format, int offset)-
176{-
177 return
executed 98 times by 2 tests: return QString::asprintf("%c%02d%s%02d", offset >= 0 ? '+' : '-', qAbs(offset) / SECS_PER_HOUR, format == Qt::TextDate ? "" : ":", (qAbs(offset) / 60) % 60);
Executed by:
  • tst_QDateTime
  • tst_selftests - unknown status
QString::asprintf("%c%02d%s%02d",
executed 98 times by 2 tests: return QString::asprintf("%c%02d%s%02d", offset >= 0 ? '+' : '-', qAbs(offset) / SECS_PER_HOUR, format == Qt::TextDate ? "" : ":", (qAbs(offset) / 60) % 60);
Executed by:
  • tst_QDateTime
  • tst_selftests - unknown status
98
178 offset >= 0 ? '+' : '-',
executed 98 times by 2 tests: return QString::asprintf("%c%02d%s%02d", offset >= 0 ? '+' : '-', qAbs(offset) / SECS_PER_HOUR, format == Qt::TextDate ? "" : ":", (qAbs(offset) / 60) % 60);
Executed by:
  • tst_QDateTime
  • tst_selftests - unknown status
98
179 qAbs(offset) / SECS_PER_HOUR,
executed 98 times by 2 tests: return QString::asprintf("%c%02d%s%02d", offset >= 0 ? '+' : '-', qAbs(offset) / SECS_PER_HOUR, format == Qt::TextDate ? "" : ":", (qAbs(offset) / 60) % 60);
Executed by:
  • tst_QDateTime
  • tst_selftests - unknown status
98
18098
181 format == Qt::TextDate ? "" : ":",
executed 98 times by 2 tests: return QString::asprintf("%c%02d%s%02d", offset >= 0 ? '+' : '-', qAbs(offset) / SECS_PER_HOUR, format == Qt::TextDate ? "" : ":", (qAbs(offset) / 60) % 60);
Executed by:
  • tst_QDateTime
  • tst_selftests - unknown status
98
182 (qAbs(offset) / 60) % 60);
executed 98 times by 2 tests: return QString::asprintf("%c%02d%s%02d", offset >= 0 ? '+' : '-', qAbs(offset) / SECS_PER_HOUR, format == Qt::TextDate ? "" : ":", (qAbs(offset) / 60) % 60);
Executed by:
  • tst_QDateTime
  • tst_selftests - unknown status
98
183}-
184-
185-
186static int fromOffsetString(const QStringRef &offsetString, bool *valid) noexcept-
187{-
188 *valid = false;-
189-
190 const int size = offsetString.size();-
191 if (size < 2
size < 2Description
TRUEnever evaluated
FALSEevaluated 22 times by 1 test
Evaluated by:
  • tst_QDateTime
|| size > 6
size > 6Description
TRUEnever evaluated
FALSEevaluated 22 times by 1 test
Evaluated by:
  • tst_QDateTime
)
0-22
192 return
never executed: return 0;
0;
never executed: return 0;
0
193-
194-
195 int sign;-
196-
197-
198 const QChar signChar = offsetString.at(0);-
199 if (signChar == QLatin1Char('+')
signChar == QLatin1Char('+')Description
TRUEevaluated 11 times by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 11 times by 1 test
Evaluated by:
  • tst_QDateTime
)
11
200 sign = 1;
executed 11 times by 1 test: sign = 1;
Executed by:
  • tst_QDateTime
11
201 else if (signChar == QLatin1Char('-')
signChar == QLatin1Char('-')Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDateTime
)
1-10
202 sign = -1;
executed 10 times by 1 test: sign = -1;
Executed by:
  • tst_QDateTime
10
203 else-
204 return
executed 1 time by 1 test: return 0;
Executed by:
  • tst_QDateTime
0;
executed 1 time by 1 test: return 0;
Executed by:
  • tst_QDateTime
1
205-
206-
207 const QStringRef time = offsetString.mid(1);-
208 int hhLen = time.indexOf(QLatin1Char(':'));-
209 int mmIndex;-
210 if (hhLen == -1
hhLen == -1Description
TRUEevaluated 13 times by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_QDateTime
)
8-13
211 mmIndex = hhLen = 2;
executed 13 times by 1 test: mmIndex = hhLen = 2;
Executed by:
  • tst_QDateTime
13
212 else-
213 mmIndex = hhLen + 1;
executed 8 times by 1 test: mmIndex = hhLen + 1;
Executed by:
  • tst_QDateTime
8
214-
215 const QStringRef hhRef = time.left(hhLen);-
216 bool ok = false;-
217 const int hour = hhRef.toInt(&ok);-
218 if (!ok
!okDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 19 times by 1 test
Evaluated by:
  • tst_QDateTime
)
2-19
219 return
executed 2 times by 1 test: return 0;
Executed by:
  • tst_QDateTime
0;
executed 2 times by 1 test: return 0;
Executed by:
  • tst_QDateTime
2
220-
221 const QStringRef mmRef = time.mid(mmIndex);-
222 const int minute = mmRef.isEmpty()
mmRef.isEmpty()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 15 times by 1 test
Evaluated by:
  • tst_QDateTime
? 0 : mmRef.toInt(&ok);
4-15
223 if (!ok
!okDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 18 times by 1 test
Evaluated by:
  • tst_QDateTime
|| minute < 0
minute < 0Description
TRUEnever evaluated
FALSEevaluated 18 times by 1 test
Evaluated by:
  • tst_QDateTime
|| minute > 59
minute > 59Description
TRUEnever evaluated
FALSEevaluated 18 times by 1 test
Evaluated by:
  • tst_QDateTime
)
0-18
224 return
executed 1 time by 1 test: return 0;
Executed by:
  • tst_QDateTime
0;
executed 1 time by 1 test: return 0;
Executed by:
  • tst_QDateTime
1
225-
226 *valid = true;-
227 return
executed 18 times by 1 test: return sign * ((hour * 60) + minute) * 60;
Executed by:
  • tst_QDateTime
sign * ((hour * 60) + minute) * 60;
executed 18 times by 1 test: return sign * ((hour * 60) + minute) * 60;
Executed by:
  • tst_QDateTime
18
228}-
229QDate::QDate(int y, int m, int d)-
230{-
231 setDate(y, m, d);-
232}
executed 21012299 times by 106 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • ...
21012299
233int QDate::year() const-
234{-
235 if (isNull()
isNull()Description
TRUEevaluated 24 times by 2 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
FALSEevaluated 621887 times by 42 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • ...
)
24-621887
236 return
executed 24 times by 2 tests: return 0;
Executed by:
  • tst_QDate
  • tst_QDateTime
0;
executed 24 times by 2 tests: return 0;
Executed by:
  • tst_QDate
  • tst_QDateTime
24
237-
238 return
executed 621887 times by 42 tests: return getDateFromJulianDay(jd).year;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • ...
getDateFromJulianDay(jd).year;
executed 621887 times by 42 tests: return getDateFromJulianDay(jd).year;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • ...
621887
239}-
240int QDate::month() const-
241{-
242 if (isNull()
isNull()Description
TRUEevaluated 24 times by 2 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
FALSEevaluated 611545 times by 41 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • ...
)
24-611545
243 return
executed 24 times by 2 tests: return 0;
Executed by:
  • tst_QDate
  • tst_QDateTime
0;
executed 24 times by 2 tests: return 0;
Executed by:
  • tst_QDate
  • tst_QDateTime
24
244-
245 return
executed 611545 times by 41 tests: return getDateFromJulianDay(jd).month;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • ...
getDateFromJulianDay(jd).month;
executed 611545 times by 41 tests: return getDateFromJulianDay(jd).month;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • ...
611545
246}-
247int QDate::day() const-
248{-
249 if (isNull()
isNull()Description
TRUEevaluated 24 times by 2 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
FALSEevaluated 647403 times by 40 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • ...
)
24-647403
250 return
executed 24 times by 2 tests: return 0;
Executed by:
  • tst_QDate
  • tst_QDateTime
0;
executed 24 times by 2 tests: return 0;
Executed by:
  • tst_QDate
  • tst_QDateTime
24
251-
252 return
executed 647403 times by 40 tests: return getDateFromJulianDay(jd).day;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • ...
getDateFromJulianDay(jd).day;
executed 647403 times by 40 tests: return getDateFromJulianDay(jd).day;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • ...
647403
253}-
254int QDate::dayOfWeek() const-
255{-
256 if (isNull()
isNull()Description
TRUEevaluated 77 times by 3 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
FALSEevaluated 39478 times by 17 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QStyleSheetStyle
  • tst_QTime
  • tst_QTimeZone
  • tst_QXmlStream
  • tst_qmakelib
)
77-39478
257 return
executed 77 times by 3 tests: return 0;
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
0;
executed 77 times by 3 tests: return 0;
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
77
258-
259 if (jd >= 0
jd >= 0Description
TRUEevaluated 39470 times by 17 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QStyleSheetStyle
  • tst_QTime
  • tst_QTimeZone
  • tst_QXmlStream
  • tst_qmakelib
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_QDate
)
8-39470
260 return
executed 39470 times by 17 tests: return (jd % 7) + 1;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QStyleSheetStyle
  • tst_QTime
  • tst_QTimeZone
  • tst_QXmlStream
  • tst_qmakelib
(jd % 7) + 1;
executed 39470 times by 17 tests: return (jd % 7) + 1;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QStyleSheetStyle
  • tst_QTime
  • tst_QTimeZone
  • tst_QXmlStream
  • tst_qmakelib
39470
261 else-
262 return
executed 8 times by 1 test: return ((jd + 1) % 7) + 7;
Executed by:
  • tst_QDate
((jd + 1) % 7) + 7;
executed 8 times by 1 test: return ((jd + 1) % 7) + 7;
Executed by:
  • tst_QDate
8
263}-
264int QDate::dayOfYear() const-
265{-
266 if (isNull()
isNull()Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDate
FALSEevaluated 1907 times by 3 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
)
1-1907
267 return
executed 1 time by 1 test: return 0;
Executed by:
  • tst_QDate
0;
executed 1 time by 1 test: return 0;
Executed by:
  • tst_QDate
1
268-
269 return
executed 1907 times by 3 tests: return jd - julianDayFromDate(year(), 1, 1) + 1;
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
jd - julianDayFromDate(year(), 1, 1) + 1;
executed 1907 times by 3 tests: return jd - julianDayFromDate(year(), 1, 1) + 1;
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
1907
270}-
271int QDate::daysInMonth() const-
272{-
273 if (isNull()
isNull()Description
TRUEevaluated 41 times by 2 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTimeEdit
FALSEevaluated 4510 times by 8 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QStyleSheetStyle
  • tst_QTime
)
41-4510
274 return
executed 41 times by 2 tests: return 0;
Executed by:
  • tst_QDate
  • tst_QDateTimeEdit
0;
executed 41 times by 2 tests: return 0;
Executed by:
  • tst_QDate
  • tst_QDateTimeEdit
41
275-
276 const ParsedDate pd = getDateFromJulianDay(jd);-
277 if (pd.month == 2
pd.month == 2Description
TRUEevaluated 223 times by 7 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QStyleSheetStyle
FALSEevaluated 4287 times by 8 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QStyleSheetStyle
  • tst_QTime
&& isLeapYear(pd.year)
isLeapYear(pd.year)Description
TRUEevaluated 159 times by 7 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QStyleSheetStyle
FALSEevaluated 64 times by 4 tests
Evaluated by:
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
)
64-4287
278 return
executed 159 times by 7 tests: return 29;
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QStyleSheetStyle
29;
executed 159 times by 7 tests: return 29;
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QStyleSheetStyle
159
279 else-
280 return
executed 4351 times by 8 tests: return monthDays[pd.month];
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QStyleSheetStyle
  • tst_QTime
monthDays[pd.month];
executed 4351 times by 8 tests: return monthDays[pd.month];
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QStyleSheetStyle
  • tst_QTime
4351
281}-
282int QDate::daysInYear() const-
283{-
284 if (isNull()
isNull()Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDate
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_QDate
)
1-4
285 return
executed 1 time by 1 test: return 0;
Executed by:
  • tst_QDate
0;
executed 1 time by 1 test: return 0;
Executed by:
  • tst_QDate
1
286-
287 return
executed 4 times by 1 test: return isLeapYear(getDateFromJulianDay(jd).year) ? 366 : 365;
Executed by:
  • tst_QDate
isLeapYear(getDateFromJulianDay(jd).year) ? 366 : 365;
executed 4 times by 1 test: return isLeapYear(getDateFromJulianDay(jd).year) ? 366 : 365;
Executed by:
  • tst_QDate
4
288}-
289int QDate::weekNumber(int *yearNumber) const-
290{-
291 if (!isValid()
!isValid()Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QDate
FALSEevaluated 1894 times by 3 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
)
3-1894
292 return
executed 3 times by 1 test: return 0;
Executed by:
  • tst_QDate
0;
executed 3 times by 1 test: return 0;
Executed by:
  • tst_QDate
3
293-
294 int year = QDate::year();-
295 int yday = dayOfYear();-
296 int wday = dayOfWeek();-
297-
298 int week = (yday - wday + 10) / 7;-
299-
300 if (week == 0
week == 0Description
TRUEevaluated 172 times by 1 test
Evaluated by:
  • tst_QDate
FALSEevaluated 1722 times by 3 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
) {
172-1722
301-
302 --year;-
303 week = (yday + 365 + (QDate::isLeapYear(year)
QDate::isLeapYear(year)Description
TRUEevaluated 42 times by 1 test
Evaluated by:
  • tst_QDate
FALSEevaluated 130 times by 1 test
Evaluated by:
  • tst_QDate
? 1 : 0) - wday + 10) / 7;
42-130
304 ((!(week == 52 || week == 53)) ? qt_assert("week == 52 || week == 53",__FILE__,602) : qt_noop());-
305 }
executed 172 times by 1 test: end of block
Executed by:
  • tst_QDate
else if (week == 53
week == 53Description
TRUEevaluated 315 times by 2 tests
Evaluated by:
  • tst_QCalendarWidget
  • tst_QDate
FALSEevaluated 1407 times by 3 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
) {
172-1407
306-
307 int w = (yday - 365 - (QDate::isLeapYear(year)
QDate::isLeapYear(year)Description
TRUEevaluated 96 times by 1 test
Evaluated by:
  • tst_QDate
FALSEevaluated 219 times by 2 tests
Evaluated by:
  • tst_QCalendarWidget
  • tst_QDate
? 1 : 0) - wday + 10) / 7;
96-219
308 if (w > 0
w > 0Description
TRUEevaluated 173 times by 2 tests
Evaluated by:
  • tst_QCalendarWidget
  • tst_QDate
FALSEevaluated 142 times by 1 test
Evaluated by:
  • tst_QDate
) {
142-173
309 ++year;-
310 week = w;-
311 }
executed 173 times by 2 tests: end of block
Executed by:
  • tst_QCalendarWidget
  • tst_QDate
173
312 ((!(week == 53 || week == 1)) ? qt_assert("week == 53 || week == 1",__FILE__,610) : qt_noop());-
313 }
executed 315 times by 2 tests: end of block
Executed by:
  • tst_QCalendarWidget
  • tst_QDate
315
314-
315 if (yearNumber != 0
yearNumber != 0Description
TRUEevaluated 1600 times by 1 test
Evaluated by:
  • tst_QDate
FALSEevaluated 294 times by 2 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
)
294-1600
316 *
executed 1600 times by 1 test: *yearNumber = year;
Executed by:
  • tst_QDate
yearNumber = year;
executed 1600 times by 1 test: *yearNumber = year;
Executed by:
  • tst_QDate
1600
317 return
executed 1894 times by 3 tests: return week;
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
week;
executed 1894 times by 3 tests: return week;
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
1894
318}-
319QString QDate::shortMonthName(int month, QDate::MonthNameType type)-
320{-
321 if (month >= 1
month >= 1Description
TRUEevaluated 624 times by 4 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_qmakelib
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QDate
|| month <= 12
month <= 12Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QDate
FALSEnever evaluated
) {
0-624
322 switch (type) {-
323 case
executed 612 times by 4 tests: case QDate::DateFormat:
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_qmakelib
QDate::DateFormat:
executed 612 times by 4 tests: case QDate::DateFormat:
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_qmakelib
612
324 return
executed 612 times by 4 tests: return QLocale::system().monthName(month, QLocale::ShortFormat);
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_qmakelib
QLocale::system().monthName(month, QLocale::ShortFormat);
executed 612 times by 4 tests: return QLocale::system().monthName(month, QLocale::ShortFormat);
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_qmakelib
612
325 case
executed 14 times by 1 test: case QDate::StandaloneFormat:
Executed by:
  • tst_QDate
QDate::StandaloneFormat:
executed 14 times by 1 test: case QDate::StandaloneFormat:
Executed by:
  • tst_QDate
14
326 return
executed 14 times by 1 test: return QLocale::system().standaloneMonthName(month, QLocale::ShortFormat);
Executed by:
  • tst_QDate
QLocale::system().standaloneMonthName(month, QLocale::ShortFormat);
executed 14 times by 1 test: return QLocale::system().standaloneMonthName(month, QLocale::ShortFormat);
Executed by:
  • tst_QDate
14
327 }-
328 }
never executed: end of block
0
329 return
never executed: return QString();
QString();
never executed: return QString();
0
330}-
331QString QDate::longMonthName(int month, MonthNameType type)-
332{-
333 if (month >= 1
month >= 1Description
TRUEevaluated 38 times by 3 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QDate
&& month <= 12
month <= 12Description
TRUEevaluated 36 times by 3 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QDate
) {
2-38
334 switch (type) {-
335 case
executed 24 times by 3 tests: case QDate::DateFormat:
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
QDate::DateFormat:
executed 24 times by 3 tests: case QDate::DateFormat:
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
24
336 return
executed 24 times by 3 tests: return QLocale::system().monthName(month, QLocale::LongFormat);
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
QLocale::system().monthName(month, QLocale::LongFormat);
executed 24 times by 3 tests: return QLocale::system().monthName(month, QLocale::LongFormat);
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
24
337 case
executed 12 times by 1 test: case QDate::StandaloneFormat:
Executed by:
  • tst_QDate
QDate::StandaloneFormat:
executed 12 times by 1 test: case QDate::StandaloneFormat:
Executed by:
  • tst_QDate
12
338 return
executed 12 times by 1 test: return QLocale::system().standaloneMonthName(month, QLocale::LongFormat);
Executed by:
  • tst_QDate
QLocale::system().standaloneMonthName(month, QLocale::LongFormat);
executed 12 times by 1 test: return QLocale::system().standaloneMonthName(month, QLocale::LongFormat);
Executed by:
  • tst_QDate
12
339 }-
340 }
never executed: end of block
0
341 return
executed 4 times by 1 test: return QString();
Executed by:
  • tst_QDate
QString();
executed 4 times by 1 test: return QString();
Executed by:
  • tst_QDate
4
342}-
343QString QDate::shortDayName(int weekday, MonthNameType type)-
344{-
345 if (weekday >= 1
weekday >= 1Description
TRUEevaluated 422 times by 4 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_qmakelib
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QDate
&& weekday <= 7
weekday <= 7Description
TRUEevaluated 420 times by 4 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_qmakelib
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QDate
) {
2-422
346 switch (type) {-
347 case
executed 413 times by 4 tests: case QDate::DateFormat:
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_qmakelib
QDate::DateFormat:
executed 413 times by 4 tests: case QDate::DateFormat:
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_qmakelib
413
348 return
executed 413 times by 4 tests: return QLocale::system().dayName(weekday, QLocale::ShortFormat);
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_qmakelib
QLocale::system().dayName(weekday, QLocale::ShortFormat);
executed 413 times by 4 tests: return QLocale::system().dayName(weekday, QLocale::ShortFormat);
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_qmakelib
413
349 case
executed 7 times by 1 test: case QDate::StandaloneFormat:
Executed by:
  • tst_QDate
QDate::StandaloneFormat:
executed 7 times by 1 test: case QDate::StandaloneFormat:
Executed by:
  • tst_QDate
7
350 return
executed 7 times by 1 test: return QLocale::system().standaloneDayName(weekday, QLocale::ShortFormat);
Executed by:
  • tst_QDate
QLocale::system().standaloneDayName(weekday, QLocale::ShortFormat);
executed 7 times by 1 test: return QLocale::system().standaloneDayName(weekday, QLocale::ShortFormat);
Executed by:
  • tst_QDate
7
351 }-
352 }
never executed: end of block
0
353 return
executed 4 times by 1 test: return QString();
Executed by:
  • tst_QDate
QString();
executed 4 times by 1 test: return QString();
Executed by:
  • tst_QDate
4
354}-
355QString QDate::longDayName(int weekday, MonthNameType type)-
356{-
357 if (weekday >= 1
weekday >= 1Description
TRUEevaluated 23 times by 1 test
Evaluated by:
  • tst_QDate
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QDate
&& weekday <= 7
weekday <= 7Description
TRUEevaluated 21 times by 1 test
Evaluated by:
  • tst_QDate
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QDate
) {
2-23
358 switch (type) {-
359 case
executed 14 times by 1 test: case QDate::DateFormat:
Executed by:
  • tst_QDate
QDate::DateFormat:
executed 14 times by 1 test: case QDate::DateFormat:
Executed by:
  • tst_QDate
14
360 return
executed 14 times by 1 test: return QLocale::system().dayName(weekday, QLocale::LongFormat);
Executed by:
  • tst_QDate
QLocale::system().dayName(weekday, QLocale::LongFormat);
executed 14 times by 1 test: return QLocale::system().dayName(weekday, QLocale::LongFormat);
Executed by:
  • tst_QDate
14
361 case
executed 7 times by 1 test: case QDate::StandaloneFormat:
Executed by:
  • tst_QDate
QDate::StandaloneFormat:
executed 7 times by 1 test: case QDate::StandaloneFormat:
Executed by:
  • tst_QDate
7
362 return
executed 7 times by 1 test: return QLocale::system().standaloneDayName(weekday, QLocale::LongFormat);
Executed by:
  • tst_QDate
QLocale::system().standaloneDayName(weekday, QLocale::LongFormat);
executed 7 times by 1 test: return QLocale::system().standaloneDayName(weekday, QLocale::LongFormat);
Executed by:
  • tst_QDate
7
363 }-
364 }
never executed: end of block
0
365 return
executed 4 times by 1 test: return QString();
Executed by:
  • tst_QDate
QString();
executed 4 times by 1 test: return QString();
Executed by:
  • tst_QDate
4
366}-
367-
368-
369-
370-
371-
372static QString toStringTextDate(QDate date)-
373{-
374 const ParsedDate pd = getDateFromJulianDay(date.toJulianDay());-
375 static const QLatin1Char sp(' ');-
376 return
executed 2 times by 1 test: return date.shortDayName(date.dayOfWeek()) + sp + date.shortMonthName(pd.month) + sp + QString::number(pd.day) + sp + QString::number(pd.year);
Executed by:
  • tst_QDate
date.shortDayName(date.dayOfWeek()) + sp
executed 2 times by 1 test: return date.shortDayName(date.dayOfWeek()) + sp + date.shortMonthName(pd.month) + sp + QString::number(pd.day) + sp + QString::number(pd.year);
Executed by:
  • tst_QDate
2
377 + date.shortMonthName(pd.month) + sp
executed 2 times by 1 test: return date.shortDayName(date.dayOfWeek()) + sp + date.shortMonthName(pd.month) + sp + QString::number(pd.day) + sp + QString::number(pd.year);
Executed by:
  • tst_QDate
2
378 + QString::number(pd.day) + sp
executed 2 times by 1 test: return date.shortDayName(date.dayOfWeek()) + sp + date.shortMonthName(pd.month) + sp + QString::number(pd.day) + sp + QString::number(pd.year);
Executed by:
  • tst_QDate
2
379 + QString::number(pd.year);
executed 2 times by 1 test: return date.shortDayName(date.dayOfWeek()) + sp + date.shortMonthName(pd.month) + sp + QString::number(pd.day) + sp + QString::number(pd.year);
Executed by:
  • tst_QDate
2
380}-
381-
382-
383static QString toStringIsoDate(qint64 jd)-
384{-
385 const ParsedDate pd = getDateFromJulianDay(jd);-
386 if (pd.year >= 0
pd.year >= 0Description
TRUEevaluated 36 times by 5 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkRequest
  • tst_QSqlTableModel
  • tst_QVariant
FALSEevaluated 3 times by 2 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
&& pd.year <= 9999
pd.year <= 9999Description
TRUEevaluated 36 times by 5 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkRequest
  • tst_QSqlTableModel
  • tst_QVariant
FALSEnever evaluated
)
0-36
387 return
executed 36 times by 5 tests: return QString::asprintf("%04d-%02d-%02d", pd.year, pd.month, pd.day);
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkRequest
  • tst_QSqlTableModel
  • tst_QVariant
QString::asprintf("%04d-%02d-%02d", pd.year, pd.month, pd.day);
executed 36 times by 5 tests: return QString::asprintf("%04d-%02d-%02d", pd.year, pd.month, pd.day);
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkRequest
  • tst_QSqlTableModel
  • tst_QVariant
36
388 else-
389 return
executed 3 times by 2 tests: return QString();
Executed by:
  • tst_QDate
  • tst_QDateTime
QString();
executed 3 times by 2 tests: return QString();
Executed by:
  • tst_QDate
  • tst_QDateTime
3
390}-
391QString QDate::toString(Qt::DateFormat format) const-
392{-
393 if (!isValid()
!isValid()Description
TRUEevaluated 2 times by 2 tests
Evaluated by:
  • tst_QDate
  • tst_QVariant
FALSEevaluated 98 times by 5 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkRequest
  • tst_QSqlTableModel
  • tst_QVariant
)
2-98
394 return
executed 2 times by 2 tests: return QString();
Executed by:
  • tst_QDate
  • tst_QVariant
QString();
executed 2 times by 2 tests: return QString();
Executed by:
  • tst_QDate
  • tst_QVariant
2
395-
396 switch (format) {-
397 case
never executed: case Qt::SystemLocaleDate:
Qt::SystemLocaleDate:
never executed: case Qt::SystemLocaleDate:
0
398 case
executed 14 times by 1 test: case Qt::SystemLocaleShortDate:
Executed by:
  • tst_QDate
Qt::SystemLocaleShortDate:
executed 14 times by 1 test: case Qt::SystemLocaleShortDate:
Executed by:
  • tst_QDate
14
399 return
executed 14 times by 1 test: return QLocale::system().toString(*this, QLocale::ShortFormat);
Executed by:
  • tst_QDate
QLocale::system().toString(*this, QLocale::ShortFormat);
executed 14 times by 1 test: return QLocale::system().toString(*this, QLocale::ShortFormat);
Executed by:
  • tst_QDate
14
400 case
executed 14 times by 1 test: case Qt::SystemLocaleLongDate:
Executed by:
  • tst_QDate
Qt::SystemLocaleLongDate:
executed 14 times by 1 test: case Qt::SystemLocaleLongDate:
Executed by:
  • tst_QDate
14
401 return
executed 14 times by 1 test: return QLocale::system().toString(*this, QLocale::LongFormat);
Executed by:
  • tst_QDate
QLocale::system().toString(*this, QLocale::LongFormat);
executed 14 times by 1 test: return QLocale::system().toString(*this, QLocale::LongFormat);
Executed by:
  • tst_QDate
14
402 case
never executed: case Qt::LocaleDate:
Qt::LocaleDate:
never executed: case Qt::LocaleDate:
0
403 case
executed 14 times by 1 test: case Qt::DefaultLocaleShortDate:
Executed by:
  • tst_QDate
Qt::DefaultLocaleShortDate:
executed 14 times by 1 test: case Qt::DefaultLocaleShortDate:
Executed by:
  • tst_QDate
14
404 return
executed 14 times by 1 test: return QLocale().toString(*this, QLocale::ShortFormat);
Executed by:
  • tst_QDate
QLocale().toString(*this, QLocale::ShortFormat);
executed 14 times by 1 test: return QLocale().toString(*this, QLocale::ShortFormat);
Executed by:
  • tst_QDate
14
405 case
executed 14 times by 1 test: case Qt::DefaultLocaleLongDate:
Executed by:
  • tst_QDate
Qt::DefaultLocaleLongDate:
executed 14 times by 1 test: case Qt::DefaultLocaleLongDate:
Executed by:
  • tst_QDate
14
406 return
executed 14 times by 1 test: return QLocale().toString(*this, QLocale::LongFormat);
Executed by:
  • tst_QDate
QLocale().toString(*this, QLocale::LongFormat);
executed 14 times by 1 test: return QLocale().toString(*this, QLocale::LongFormat);
Executed by:
  • tst_QDate
14
407 case
executed 1 time by 1 test: case Qt::RFC2822Date:
Executed by:
  • tst_QDate
Qt::RFC2822Date:
executed 1 time by 1 test: case Qt::RFC2822Date:
Executed by:
  • tst_QDate
1
408 return
executed 1 time by 1 test: return QLocale::c().toString(*this, ([]() -> QString { enum { Size = sizeof(u"" "dd MMM yyyy")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "dd MMM yyyy" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }()));
Executed by:
  • tst_QDate
QLocale::c().toString(*this, ([]() -> QString { enum { Size = sizeof(u"" "dd MMM yyyy")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "dd MMM yyyy" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 1 time by 1 test: return qstring_literal_temp;
Executed by:
  • tst_QDate
qstring_literal_temp;
executed 1 time by 1 test: return qstring_literal_temp;
Executed by:
  • tst_QDate
}()));
executed 1 time by 1 test: return QLocale::c().toString(*this, ([]() -> QString { enum { Size = sizeof(u"" "dd MMM yyyy")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "dd MMM yyyy" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }()));
Executed by:
  • tst_QDate
1
409 default
never executed: default:
:
never executed: default:
0
410-
411 case
executed 2 times by 1 test: case Qt::TextDate:
Executed by:
  • tst_QDate
Qt::TextDate:
executed 2 times by 1 test: case Qt::TextDate:
Executed by:
  • tst_QDate
2
412 return
executed 2 times by 1 test: return toStringTextDate(*this);
Executed by:
  • tst_QDate
toStringTextDate(*this);
executed 2 times by 1 test: return toStringTextDate(*this);
Executed by:
  • tst_QDate
2
413-
414 case
executed 39 times by 5 tests: case Qt::ISODate:
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkRequest
  • tst_QSqlTableModel
  • tst_QVariant
Qt::ISODate:
executed 39 times by 5 tests: case Qt::ISODate:
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkRequest
  • tst_QSqlTableModel
  • tst_QVariant
39
415 return
executed 39 times by 5 tests: return toStringIsoDate(jd);
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkRequest
  • tst_QSqlTableModel
  • tst_QVariant
toStringIsoDate(jd);
executed 39 times by 5 tests: return toStringIsoDate(jd);
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkRequest
  • tst_QSqlTableModel
  • tst_QVariant
39
416 }-
417}-
418QString QDate::toString(const QString& format) const-
419{-
420 return
executed 13977 times by 8 tests: return QLocale::system().toString(*this, format);
Executed by:
  • tst_QCalendarWidget
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QVariant
QLocale::system().toString(*this, format);
executed 13977 times by 8 tests: return QLocale::system().toString(*this, format);
Executed by:
  • tst_QCalendarWidget
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QVariant
13977
421}-
422bool QDate::setDate(int year, int month, int day)-
423{-
424 if (isValid(year, month, day)
isValid(year, month, day)Description
TRUEevaluated 21571360 times by 106 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • ...
FALSEevaluated 11380 times by 6 tests
Evaluated by:
  • tst_QDBusMarshall
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QNetworkCookie
  • tst_QTime
)
11380-21571360
425 jd = julianDayFromDate(year, month, day);
executed 21573166 times by 106 tests: jd = julianDayFromDate(year, month, day);
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • ...
21573166
426 else-
427 jd = nullJd();
executed 11380 times by 6 tests: jd = nullJd();
Executed by:
  • tst_QDBusMarshall
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QNetworkCookie
  • tst_QTime
11380
428-
429 return
executed 21589453 times by 106 tests: return isValid();
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • ...
isValid();
executed 21589453 times by 106 tests: return isValid();
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • ...
21589453
430}-
431void QDate::getDate(int *year, int *month, int *day) const-
432{-
433 ParsedDate pd = { 0, 0, 0 };-
434 if (isValid()
isValid()Description
TRUEevaluated 13951235 times by 101 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
FALSEevaluated 3 times by 2 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
)
3-13951235
435 pd = getDateFromJulianDay(jd);
executed 13956030 times by 101 tests: pd = getDateFromJulianDay(jd);
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
13956030
436-
437 if (year
yearDescription
TRUEevaluated 13956030 times by 101 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_QDateTime
)
3-13956030
438 *
executed 13956030 times by 101 tests: *year = pd.year;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
year = pd.year;
executed 13956030 times by 101 tests: *year = pd.year;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
13956030
439 if (month
monthDescription
TRUEevaluated 13955044 times by 101 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_QDateTime
)
3-13955044
440 *
executed 13956030 times by 101 tests: *month = pd.month;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
month = pd.month;
executed 13956030 times by 101 tests: *month = pd.month;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
13956030
441 if (day
dayDescription
TRUEevaluated 13942777 times by 101 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_QDateTime
)
3-13942777
442 *
executed 13954660 times by 101 tests: *day = pd.day;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
day = pd.day;
executed 13954660 times by 101 tests: *day = pd.day;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
13954660
443}
executed 13941005 times by 101 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
13941005
444-
445-
446-
447-
448-
449-
450void QDate::getDate(int *year, int *month, int *day)-
451{-
452 qAsConst(*this).getDate(year, month, day);-
453}
executed 13947892 times by 101 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
13947892
454QDate QDate::addDays(qint64 ndays) const-
455{-
456 if (isNull()
isNull()Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDate
FALSEevaluated 630822 times by 13 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QStyleSheetStyle
  • tst_QTime
  • tst_QTimeZone
)
1-630822
457 return
executed 1 time by 1 test: return QDate();
Executed by:
  • tst_QDate
QDate();
executed 1 time by 1 test: return QDate();
Executed by:
  • tst_QDate
1
458-
459-
460-
461 return
executed 630822 times by 13 tests: return fromJulianDay(jd + ndays);
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QStyleSheetStyle
  • tst_QTime
  • tst_QTimeZone
fromJulianDay(jd + ndays);
executed 630822 times by 13 tests: return fromJulianDay(jd + ndays);
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QStyleSheetStyle
  • tst_QTime
  • tst_QTimeZone
630822
462}-
463QDate QDate::addMonths(int nmonths) const-
464{-
465 if (!isValid()
!isValid()Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDate
FALSEevaluated 172 times by 4 tests
Evaluated by:
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
)
1-172
466 return
executed 1 time by 1 test: return QDate();
Executed by:
  • tst_QDate
QDate();
executed 1 time by 1 test: return QDate();
Executed by:
  • tst_QDate
1
467 if (!nmonths
!nmonthsDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 168 times by 4 tests
Evaluated by:
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
)
4-168
468 return
executed 4 times by 1 test: return *this;
Executed by:
  • tst_QDateTime
*this;
executed 4 times by 1 test: return *this;
Executed by:
  • tst_QDateTime
4
469-
470 int old_y, y, m, d;-
471 {-
472 const ParsedDate pd = getDateFromJulianDay(jd);-
473 y = pd.year;-
474 m = pd.month;-
475 d = pd.day;-
476 }-
477 old_y = y;-
478-
479 bool increasing = nmonths > 0;-
480-
481 while (nmonths != 0
nmonths != 0Description
TRUEevaluated 188 times by 4 tests
Evaluated by:
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
FALSEevaluated 168 times by 4 tests
Evaluated by:
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
) {
168-188
482 if (nmonths < 0
nmonths < 0Description
TRUEevaluated 97 times by 3 tests
Evaluated by:
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
FALSEevaluated 91 times by 4 tests
Evaluated by:
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
&& nmonths + 12 <= 0
nmonths + 12 <= 0Description
TRUEevaluated 15 times by 2 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
FALSEevaluated 82 times by 3 tests
Evaluated by:
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
) {
15-97
483 y--;-
484 nmonths+=12;-
485 }
executed 15 times by 2 tests: end of block
Executed by:
  • tst_QDate
  • tst_QDateTime
else if (nmonths < 0
nmonths < 0Description
TRUEevaluated 82 times by 3 tests
Evaluated by:
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
FALSEevaluated 91 times by 4 tests
Evaluated by:
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
) {
15-91
486 m+= nmonths;-
487 nmonths = 0;-
488 if (m <= 0
m <= 0Description
TRUEevaluated 49 times by 3 tests
Evaluated by:
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
FALSEevaluated 33 times by 3 tests
Evaluated by:
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
) {
33-49
489 --y;-
490 m += 12;-
491 }
executed 49 times by 3 tests: end of block
Executed by:
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
49
492 }
executed 82 times by 3 tests: end of block
Executed by:
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
else if (nmonths - 12 >= 0
nmonths - 12 >= 0Description
TRUEevaluated 16 times by 2 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
FALSEevaluated 75 times by 4 tests
Evaluated by:
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
) {
16-82
493 y++;-
494 nmonths -= 12;-
495 }
executed 16 times by 2 tests: end of block
Executed by:
  • tst_QDate
  • tst_QDateTime
else if (m == 12
m == 12Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QDate
FALSEevaluated 73 times by 4 tests
Evaluated by:
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
) {
2-73
496 y++;-
497 m = 0;-
498 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_QDate
else {
2
499 m += nmonths;-
500 nmonths = 0;-
501 if (m > 12
m > 12Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDate
FALSEevaluated 72 times by 4 tests
Evaluated by:
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
) {
1-72
502 ++y;-
503 m -= 12;-
504 }
executed 1 time by 1 test: end of block
Executed by:
  • tst_QDate
1
505 }
executed 73 times by 4 tests: end of block
Executed by:
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
73
506 }-
507-
508-
509 if ((old_y > 0
old_y > 0Description
TRUEevaluated 165 times by 4 tests
Evaluated by:
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_QDate
&& y <= 0
y <= 0Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QDate
FALSEevaluated 163 times by 4 tests
Evaluated by:
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
) ||
2-165
510 (old_y < 0
old_y < 0Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QDate
FALSEevaluated 163 times by 4 tests
Evaluated by:
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
&& y >= 0
y >= 0Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QDate
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDate
))
1-163
511-
512 y += increasing
increasingDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QDate
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QDate
? +1 : -1;
executed 4 times by 1 test: y += increasing ? +1 : -1;
Executed by:
  • tst_QDate
2-4
513-
514 return
executed 168 times by 4 tests: return fixedDate(y, m, d);
Executed by:
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
fixedDate(y, m, d);
executed 168 times by 4 tests: return fixedDate(y, m, d);
Executed by:
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
168
515}-
516QDate QDate::addYears(int nyears) const-
517{-
518 if (!isValid()
!isValid()Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDate
FALSEevaluated 120 times by 4 tests
Evaluated by:
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
)
1-120
519 return
executed 1 time by 1 test: return QDate();
Executed by:
  • tst_QDate
QDate();
executed 1 time by 1 test: return QDate();
Executed by:
  • tst_QDate
1
520-
521 ParsedDate pd = getDateFromJulianDay(jd);-
522-
523 int old_y = pd.year;-
524 pd.year += nyears;-
525-
526-
527 if ((old_y > 0
old_y > 0Description
TRUEevaluated 99 times by 4 tests
Evaluated by:
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
FALSEevaluated 21 times by 2 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
&& pd.year <= 0
pd.year <= 0Description
TRUEevaluated 8 times by 2 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
FALSEevaluated 91 times by 4 tests
Evaluated by:
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
) ||
8-99
528 (old_y < 0
old_y < 0Description
TRUEevaluated 21 times by 2 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
FALSEevaluated 91 times by 4 tests
Evaluated by:
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
&& pd.year >= 0
pd.year >= 0Description
TRUEevaluated 8 times by 2 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
FALSEevaluated 13 times by 2 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
))
8-91
529-
530 pd.year += nyears > 0
nyears > 0Description
TRUEevaluated 8 times by 2 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
FALSEevaluated 8 times by 2 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
? +1 : -1;
executed 16 times by 2 tests: pd.year += nyears > 0 ? +1 : -1;
Executed by:
  • tst_QDate
  • tst_QDateTime
8-16
531-
532 return
executed 120 times by 4 tests: return fixedDate(pd.year, pd.month, pd.day);
Executed by:
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
fixedDate(pd.year, pd.month, pd.day);
executed 120 times by 4 tests: return fixedDate(pd.year, pd.month, pd.day);
Executed by:
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
120
533}-
534qint64 QDate::daysTo(const QDate &d) const-
535{-
536 if (isNull()
isNull()Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDate
FALSEevaluated 18592 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QStyleSheetStyle
  • tst_QTime
|| d.isNull()
d.isNull()Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDate
FALSEevaluated 18591 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QStyleSheetStyle
  • tst_QTime
)
1-18592
537 return
executed 2 times by 1 test: return 0;
Executed by:
  • tst_QDate
0;
executed 2 times by 1 test: return 0;
Executed by:
  • tst_QDate
2
538-
539-
540 return
executed 18591 times by 13 tests: return d.jd - jd;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QStyleSheetStyle
  • tst_QTime
d.jd - jd;
executed 18591 times by 13 tests: return d.jd - jd;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QStyleSheetStyle
  • tst_QTime
18591
541}-
542QDate QDate::fromString(const QString& string, Qt::DateFormat format)-
543{-
544 if (string.isEmpty()
string.isEmpty()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QDate
FALSEevaluated 111 times by 5 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkReply
  • tst_QSqlQuery
  • tst_QVariant
)
2-111
545 return
executed 2 times by 1 test: return QDate();
Executed by:
  • tst_QDate
QDate();
executed 2 times by 1 test: return QDate();
Executed by:
  • tst_QDate
2
546-
547 switch (format) {-
548 case
never executed: case Qt::SystemLocaleDate:
Qt::SystemLocaleDate:
never executed: case Qt::SystemLocaleDate:
0
549 case
never executed: case Qt::SystemLocaleShortDate:
Qt::SystemLocaleShortDate:
never executed: case Qt::SystemLocaleShortDate:
0
550 return
never executed: return QLocale::system().toDate(string, QLocale::ShortFormat);
QLocale::system().toDate(string, QLocale::ShortFormat);
never executed: return QLocale::system().toDate(string, QLocale::ShortFormat);
0
551 case
never executed: case Qt::SystemLocaleLongDate:
Qt::SystemLocaleLongDate:
never executed: case Qt::SystemLocaleLongDate:
0
552 return
never executed: return QLocale::system().toDate(string, QLocale::LongFormat);
QLocale::system().toDate(string, QLocale::LongFormat);
never executed: return QLocale::system().toDate(string, QLocale::LongFormat);
0
553 case
never executed: case Qt::LocaleDate:
Qt::LocaleDate:
never executed: case Qt::LocaleDate:
0
554 case
never executed: case Qt::DefaultLocaleShortDate:
Qt::DefaultLocaleShortDate:
never executed: case Qt::DefaultLocaleShortDate:
0
555 return
never executed: return QLocale().toDate(string, QLocale::ShortFormat);
QLocale().toDate(string, QLocale::ShortFormat);
never executed: return QLocale().toDate(string, QLocale::ShortFormat);
0
556 case
never executed: case Qt::DefaultLocaleLongDate:
Qt::DefaultLocaleLongDate:
never executed: case Qt::DefaultLocaleLongDate:
0
557 return
never executed: return QLocale().toDate(string, QLocale::LongFormat);
QLocale().toDate(string, QLocale::LongFormat);
never executed: return QLocale().toDate(string, QLocale::LongFormat);
0
558 case
executed 21 times by 1 test: case Qt::RFC2822Date:
Executed by:
  • tst_QDate
Qt::RFC2822Date:
executed 21 times by 1 test: case Qt::RFC2822Date:
Executed by:
  • tst_QDate
21
559 return
executed 21 times by 1 test: return rfcDateImpl(string).date;
Executed by:
  • tst_QDate
rfcDateImpl(string).date;
executed 21 times by 1 test: return rfcDateImpl(string).date;
Executed by:
  • tst_QDate
21
560 default
never executed: default:
:
never executed: default:
0
561-
562 case
executed 14 times by 1 test: case Qt::TextDate:
Executed by:
  • tst_QDate
Qt::TextDate:
executed 14 times by 1 test: case Qt::TextDate:
Executed by:
  • tst_QDate
{
14
563 QVector<QStringRef> parts = string.splitRef(QLatin1Char(' '), QString::SkipEmptyParts);-
564-
565 if (parts.count() != 4
parts.count() != 4Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDate
FALSEevaluated 13 times by 1 test
Evaluated by:
  • tst_QDate
)
1-13
566 return
executed 1 time by 1 test: return QDate();
Executed by:
  • tst_QDate
QDate();
executed 1 time by 1 test: return QDate();
Executed by:
  • tst_QDate
1
567-
568 QStringRef monthName = parts.at(1);-
569 const int month = fromShortMonthName(monthName);-
570 if (month == -1
month == -1Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDate
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_QDate
) {
1-12
571-
572 return
executed 1 time by 1 test: return QDate();
Executed by:
  • tst_QDate
QDate();
executed 1 time by 1 test: return QDate();
Executed by:
  • tst_QDate
1
573 }-
574-
575 bool ok = false;-
576 int year = parts.at(3).toInt(&ok);-
577 if (!ok
!okDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDate
FALSEevaluated 11 times by 1 test
Evaluated by:
  • tst_QDate
)
1-11
578 return
executed 1 time by 1 test: return QDate();
Executed by:
  • tst_QDate
QDate();
executed 1 time by 1 test: return QDate();
Executed by:
  • tst_QDate
1
579-
580 return
executed 11 times by 1 test: return QDate(year, month, parts.at(2).toInt());
Executed by:
  • tst_QDate
QDate(year, month, parts.at(2).toInt());
executed 11 times by 1 test: return QDate(year, month, parts.at(2).toInt());
Executed by:
  • tst_QDate
11
581 }-
582-
583 case
executed 76 times by 5 tests: case Qt::ISODate:
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkReply
  • tst_QSqlQuery
  • tst_QVariant
Qt::ISODate:
executed 76 times by 5 tests: case Qt::ISODate:
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkReply
  • tst_QSqlQuery
  • tst_QVariant
{
76
584-
585 if (string.size() < 10
string.size() < 10Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QVariant
FALSEevaluated 75 times by 5 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkReply
  • tst_QSqlQuery
  • tst_QVariant
|| string.at(4).isDigit()
string.at(4).isDigit()Description
TRUEevaluated 6 times by 2 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
FALSEevaluated 69 times by 5 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkReply
  • tst_QSqlQuery
  • tst_QVariant
|| string.at(7).isDigit()
string.at(7).isDigit()Description
TRUEnever evaluated
FALSEevaluated 69 times by 5 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkReply
  • tst_QSqlQuery
  • tst_QVariant
0-75
586 || (string.size() > 10
string.size() > 10Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QDate
FALSEevaluated 66 times by 5 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkReply
  • tst_QSqlQuery
  • tst_QVariant
&& string.at(10).isDigit()
string.at(10).isDigit()Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDate
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QDate
)) {
1-66
587 return
executed 8 times by 3 tests: return QDate();
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QVariant
QDate();
executed 8 times by 3 tests: return QDate();
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QVariant
8
588 }-
589 const int year = string.midRef(0, 4).toInt();-
590 if (year <= 0
year <= 0Description
TRUEevaluated 4 times by 2 tests
Evaluated by:
  • tst_QDate
  • tst_QVariant
FALSEevaluated 64 times by 5 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkReply
  • tst_QSqlQuery
  • tst_QVariant
|| year > 9999
year > 9999Description
TRUEnever evaluated
FALSEevaluated 64 times by 5 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkReply
  • tst_QSqlQuery
  • tst_QVariant
)
0-64
591 return
executed 4 times by 2 tests: return QDate();
Executed by:
  • tst_QDate
  • tst_QVariant
QDate();
executed 4 times by 2 tests: return QDate();
Executed by:
  • tst_QDate
  • tst_QVariant
4
592 return
executed 64 times by 5 tests: return QDate(year, string.midRef(5, 2).toInt(), string.midRef(8, 2).toInt());
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkReply
  • tst_QSqlQuery
  • tst_QVariant
QDate(year, string.midRef(5, 2).toInt(), string.midRef(8, 2).toInt());
executed 64 times by 5 tests: return QDate(year, string.midRef(5, 2).toInt(), string.midRef(8, 2).toInt());
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkReply
  • tst_QSqlQuery
  • tst_QVariant
64
593 }-
594 }-
595 return
never executed: return QDate();
QDate();
never executed: return QDate();
0
596}-
597QDate QDate::fromString(const QString &string, const QString &format)-
598{-
599 QDate date;-
600-
601 QDateTimeParser dt(QVariant::Date, QDateTimeParser::FromString);-
602 if (dt.parseFormat(format)
dt.parseFormat(format)Description
TRUEevaluated 44 times by 1 test
Evaluated by:
  • tst_QDate
FALSEnever evaluated
)
0-44
603 dt.fromString(string, &date, 0);
executed 44 times by 1 test: dt.fromString(string, &date, 0);
Executed by:
  • tst_QDate
44
604-
605-
606-
607-
608 return
executed 44 times by 1 test: return date;
Executed by:
  • tst_QDate
date;
executed 44 times by 1 test: return date;
Executed by:
  • tst_QDate
44
609}-
610bool QDate::isValid(int year, int month, int day)-
611{-
612-
613 if (year == 0
year == 0Description
TRUEevaluated 143 times by 4 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QTime
FALSEevaluated 21594977 times by 106 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • ...
)
143-21594977
614 return
executed 143 times by 4 tests: return false;
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QTime
false;
executed 143 times by 4 tests: return false;
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QTime
143
615-
616 return
executed 21588267 times by 106 tests: return (day > 0 && month > 0 && month <= 12) && (day <= monthDays[month] || (day == 29 && month == 2 && isLeapYear(year)));
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • ...
(day > 0 && month > 0 && month <= 12) &&
executed 21588267 times by 106 tests: return (day > 0 && month > 0 && month <= 12) && (day <= monthDays[month] || (day == 29 && month == 2 && isLeapYear(year)));
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • ...
21588267
617 (day <= monthDays[month] || (day == 29 && month == 2 && isLeapYear(year)));
executed 21588267 times by 106 tests: return (day > 0 && month > 0 && month <= 12) && (day <= monthDays[month] || (day == 29 && month == 2 && isLeapYear(year)));
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • ...
21588267
618}-
619bool QDate::isLeapYear(int y)-
620{-
621-
622 if ( y < 1
y < 1Description
TRUEevaluated 9596 times by 1 test
Evaluated by:
  • tst_QDate
FALSEevaluated 27921 times by 9 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QNetworkCookie
  • tst_QStyleSheetStyle
  • tst_QTimeZone
)
9596-27921
623 ++
executed 9596 times by 1 test: ++y;
Executed by:
  • tst_QDate
y;
executed 9596 times by 1 test: ++y;
Executed by:
  • tst_QDate
9596
624-
625 return
executed 37517 times by 9 tests: return (y % 4 == 0 && y % 100 != 0) || y % 400 == 0;
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QNetworkCookie
  • tst_QStyleSheetStyle
  • tst_QTimeZone
(y % 4 == 0 && y % 100 != 0) || y % 400 == 0;
executed 37517 times by 9 tests: return (y % 4 == 0 && y % 100 != 0) || y % 400 == 0;
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QNetworkCookie
  • tst_QStyleSheetStyle
  • tst_QTimeZone
37517
626}-
627QTime::QTime(int h, int m, int s, int ms)-
628{-
629 setHMS(h, m, s, ms);-
630}
executed 20948141 times by 107 tests: end of block
Executed by:
  • tst_Collections
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • ...
20948141
631bool QTime::isValid() const-
632{-
633 return
executed 83770922 times by 109 tests: return mds > NullTime && mds < MSECS_PER_DAY;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDBusMetaType
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • ...
mds > NullTime && mds < MSECS_PER_DAY;
executed 83770922 times by 109 tests: return mds > NullTime && mds < MSECS_PER_DAY;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDBusMetaType
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • ...
83770922
634}-
635int QTime::hour() const-
636{-
637 if (!isValid()
!isValid()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QTime
FALSEevaluated 13963461 times by 103 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • ...
)
4-13963461
638 return
executed 4 times by 1 test: return -1;
Executed by:
  • tst_QTime
-1;
executed 4 times by 1 test: return -1;
Executed by:
  • tst_QTime
4
639-
640 return
executed 13972447 times by 103 tests: return ds() / MSECS_PER_HOUR;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • ...
ds() / MSECS_PER_HOUR;
executed 13972447 times by 103 tests: return ds() / MSECS_PER_HOUR;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • ...
13972447
641}-
642int QTime::minute() const-
643{-
644 if (!isValid()
!isValid()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QTime
FALSEevaluated 13965934 times by 103 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • ...
)
4-13965934
645 return
executed 4 times by 1 test: return -1;
Executed by:
  • tst_QTime
-1;
executed 4 times by 1 test: return -1;
Executed by:
  • tst_QTime
4
646-
647 return
executed 13966387 times by 103 tests: return (ds() % MSECS_PER_HOUR) / MSECS_PER_MIN;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • ...
(ds() % MSECS_PER_HOUR) / MSECS_PER_MIN;
executed 13966387 times by 103 tests: return (ds() % MSECS_PER_HOUR) / MSECS_PER_MIN;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • ...
13966387
648}-
649int QTime::second() const-
650{-
651 if (!isValid()
!isValid()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QTime
FALSEevaluated 13964385 times by 103 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • ...
)
4-13964385
652 return
executed 4 times by 1 test: return -1;
Executed by:
  • tst_QTime
-1;
executed 4 times by 1 test: return -1;
Executed by:
  • tst_QTime
4
653-
654 return
executed 13948402 times by 103 tests: return (ds() / 1000)%SECS_PER_MIN;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • ...
(ds() / 1000)%SECS_PER_MIN;
executed 13948402 times by 103 tests: return (ds() / 1000)%SECS_PER_MIN;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • ...
13948402
655}-
656int QTime::msec() const-
657{-
658 if (!isValid()
!isValid()Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QTime
FALSEevaluated 13962710 times by 103 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • ...
)
3-13962710
659 return
executed 3 times by 1 test: return -1;
Executed by:
  • tst_QTime
-1;
executed 3 times by 1 test: return -1;
Executed by:
  • tst_QTime
3
660-
661 return
executed 13960494 times by 103 tests: return ds() % 1000;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • ...
ds() % 1000;
executed 13960494 times by 103 tests: return ds() % 1000;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • ...
13960494
662}-
663QString QTime::toString(Qt::DateFormat format) const-
664{-
665 if (!isValid()
!isValid()Description
TRUEnever evaluated
FALSEevaluated 452 times by 8 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QFile
  • tst_QNetworkRequest
  • tst_QSqlTableModel
  • tst_QTime
  • tst_QVariant
  • tst_qmakelib
)
0-452
666 return
never executed: return QString();
QString();
never executed: return QString();
0
667-
668 switch (format) {-
669 case
never executed: case Qt::SystemLocaleDate:
Qt::SystemLocaleDate:
never executed: case Qt::SystemLocaleDate:
0
670 case
executed 2 times by 1 test: case Qt::SystemLocaleShortDate:
Executed by:
  • tst_QTime
Qt::SystemLocaleShortDate:
executed 2 times by 1 test: case Qt::SystemLocaleShortDate:
Executed by:
  • tst_QTime
2
671 return
executed 2 times by 1 test: return QLocale::system().toString(*this, QLocale::ShortFormat);
Executed by:
  • tst_QTime
QLocale::system().toString(*this, QLocale::ShortFormat);
executed 2 times by 1 test: return QLocale::system().toString(*this, QLocale::ShortFormat);
Executed by:
  • tst_QTime
2
672 case
executed 2 times by 1 test: case Qt::SystemLocaleLongDate:
Executed by:
  • tst_QTime
Qt::SystemLocaleLongDate:
executed 2 times by 1 test: case Qt::SystemLocaleLongDate:
Executed by:
  • tst_QTime
2
673 return
executed 2 times by 1 test: return QLocale::system().toString(*this, QLocale::LongFormat);
Executed by:
  • tst_QTime
QLocale::system().toString(*this, QLocale::LongFormat);
executed 2 times by 1 test: return QLocale::system().toString(*this, QLocale::LongFormat);
Executed by:
  • tst_QTime
2
674 case
never executed: case Qt::LocaleDate:
Qt::LocaleDate:
never executed: case Qt::LocaleDate:
0
675 case
executed 2 times by 1 test: case Qt::DefaultLocaleShortDate:
Executed by:
  • tst_QTime
Qt::DefaultLocaleShortDate:
executed 2 times by 1 test: case Qt::DefaultLocaleShortDate:
Executed by:
  • tst_QTime
2
676 return
executed 2 times by 1 test: return QLocale().toString(*this, QLocale::ShortFormat);
Executed by:
  • tst_QTime
QLocale().toString(*this, QLocale::ShortFormat);
executed 2 times by 1 test: return QLocale().toString(*this, QLocale::ShortFormat);
Executed by:
  • tst_QTime
2
677 case
executed 2 times by 1 test: case Qt::DefaultLocaleLongDate:
Executed by:
  • tst_QTime
Qt::DefaultLocaleLongDate:
executed 2 times by 1 test: case Qt::DefaultLocaleLongDate:
Executed by:
  • tst_QTime
2
678 return
executed 2 times by 1 test: return QLocale().toString(*this, QLocale::LongFormat);
Executed by:
  • tst_QTime
QLocale().toString(*this, QLocale::LongFormat);
executed 2 times by 1 test: return QLocale().toString(*this, QLocale::LongFormat);
Executed by:
  • tst_QTime
2
679 case
executed 1 time by 1 test: case Qt::RFC2822Date:
Executed by:
  • tst_QTime
Qt::RFC2822Date:
executed 1 time by 1 test: case Qt::RFC2822Date:
Executed by:
  • tst_QTime
1
680 case
executed 32 times by 5 tests: case Qt::ISODate:
Executed by:
  • tst_QDateTime
  • tst_QNetworkRequest
  • tst_QSqlTableModel
  • tst_QTime
  • tst_QVariant
Qt::ISODate:
executed 32 times by 5 tests: case Qt::ISODate:
Executed by:
  • tst_QDateTime
  • tst_QNetworkRequest
  • tst_QSqlTableModel
  • tst_QTime
  • tst_QVariant
32
681 case
executed 411 times by 5 tests: case Qt::TextDate:
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QFile
  • tst_QTime
  • tst_qmakelib
Qt::TextDate:
executed 411 times by 5 tests: case Qt::TextDate:
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QFile
  • tst_QTime
  • tst_qmakelib
411
682 default
never executed: default:
:
never executed: default:
0
683 return
executed 444 times by 8 tests: return QString::asprintf("%02d:%02d:%02d", hour(), minute(), second());
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QFile
  • tst_QNetworkRequest
  • tst_QSqlTableModel
  • tst_QTime
  • tst_QVariant
  • tst_qmakelib
QString::asprintf("%02d:%02d:%02d", hour(), minute(), second());
executed 444 times by 8 tests: return QString::asprintf("%02d:%02d:%02d", hour(), minute(), second());
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QFile
  • tst_QNetworkRequest
  • tst_QSqlTableModel
  • tst_QTime
  • tst_QVariant
  • tst_qmakelib
444
684 }-
685}-
686QString QTime::toString(const QString& format) const-
687{-
688 return
executed 14782 times by 7 tests: return QLocale::system().toString(*this, format);
Executed by:
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QTime
  • tst_QVariant
QLocale::system().toString(*this, format);
executed 14782 times by 7 tests: return QLocale::system().toString(*this, format);
Executed by:
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QTime
  • tst_QVariant
14782
689}-
690bool QTime::setHMS(int h, int m, int s, int ms)-
691{-
692-
693-
694-
695 if (!isValid(h,m,s,ms)
!isValid(h,m,s,ms)Description
TRUEevaluated 238 times by 5 tests
Evaluated by:
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QNetworkCookie
  • tst_QTime
FALSEevaluated 20948610 times by 107 tests
Evaluated by:
  • tst_Collections
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • ...
) {
238-20948610
696 mds = NullTime;-
697 return
executed 238 times by 5 tests: return false;
Executed by:
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QNetworkCookie
  • tst_QTime
false;
executed 238 times by 5 tests: return false;
Executed by:
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QNetworkCookie
  • tst_QTime
238
698 }-
699 mds = (h*SECS_PER_HOUR + m*SECS_PER_MIN + s)*1000 + ms;-
700 return
executed 20947141 times by 107 tests: return true;
Executed by:
  • tst_Collections
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • ...
true;
executed 20947141 times by 107 tests: return true;
Executed by:
  • tst_Collections
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • ...
20947141
701}-
702QTime QTime::addSecs(int s) const-
703{-
704 s %= SECS_PER_DAY;-
705 return
executed 8 times by 3 tests: return addMSecs(s * 1000);
Executed by:
  • tst_QDateTime
  • tst_QItemDelegate
  • tst_QTime
addMSecs(s * 1000);
executed 8 times by 3 tests: return addMSecs(s * 1000);
Executed by:
  • tst_QDateTime
  • tst_QItemDelegate
  • tst_QTime
8
706}-
707int QTime::secsTo(const QTime &t) const-
708{-
709 if (!isValid()
!isValid()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QTime
FALSEevaluated 9 times by 1 test
Evaluated by:
  • tst_QTime
|| !t.isValid()
!t.isValid()Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QTime
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_QTime
)
1-9
710 return
executed 3 times by 1 test: return 0;
Executed by:
  • tst_QTime
0;
executed 3 times by 1 test: return 0;
Executed by:
  • tst_QTime
3
711-
712-
713 int ourSeconds = ds() / 1000;-
714 int theirSeconds = t.ds() / 1000;-
715 return
executed 8 times by 1 test: return theirSeconds - ourSeconds;
Executed by:
  • tst_QTime
theirSeconds - ourSeconds;
executed 8 times by 1 test: return theirSeconds - ourSeconds;
Executed by:
  • tst_QTime
8
716}-
717QTime QTime::addMSecs(int ms) const-
718{-
719 QTime t;-
720 if (isValid()
isValid()Description
TRUEevaluated 214 times by 4 tests
Evaluated by:
  • tst_QDateTime
  • tst_QItemDelegate
  • tst_QNetworkCookie
  • tst_QTime
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QTime
) {
1-214
721 if (ms < 0
ms < 0Description
TRUEevaluated 40 times by 3 tests
Evaluated by:
  • tst_QDateTime
  • tst_QNetworkCookie
  • tst_QTime
FALSEevaluated 174 times by 4 tests
Evaluated by:
  • tst_QDateTime
  • tst_QItemDelegate
  • tst_QNetworkCookie
  • tst_QTime
) {
40-174
722-
723 int negdays = (MSECS_PER_DAY - ms) / MSECS_PER_DAY;-
724 t.mds = (ds() + ms + negdays * MSECS_PER_DAY) % MSECS_PER_DAY;-
725 }
executed 40 times by 3 tests: end of block
Executed by:
  • tst_QDateTime
  • tst_QNetworkCookie
  • tst_QTime
else {
40
726 t.mds = (ds() + ms) % MSECS_PER_DAY;-
727 }
executed 174 times by 4 tests: end of block
Executed by:
  • tst_QDateTime
  • tst_QItemDelegate
  • tst_QNetworkCookie
  • tst_QTime
174
728 }-
729-
730-
731-
732-
733 return
executed 215 times by 4 tests: return t;
Executed by:
  • tst_QDateTime
  • tst_QItemDelegate
  • tst_QNetworkCookie
  • tst_QTime
t;
executed 215 times by 4 tests: return t;
Executed by:
  • tst_QDateTime
  • tst_QItemDelegate
  • tst_QNetworkCookie
  • tst_QTime
215
734}-
735int QTime::msecsTo(const QTime &t) const-
736{-
737 if (!isValid()
!isValid()Description
TRUEevaluated 5 times by 3 tests
Evaluated by:
  • tst_QTextStream
  • tst_QThreadPool
  • tst_QTime
FALSEevaluated 6942460 times by 33 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractSlider
  • tst_QAtomicInt
  • tst_QCoreApplication
  • tst_QDateTimeEdit
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QFtp
  • tst_QFutureWatcher
  • tst_QGuiApplication
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QLabel
  • tst_QLocalSocket
  • tst_QMovie
  • tst_QMutex
  • tst_QNetworkReply
  • tst_QObjectPerformance
  • tst_QProcess
  • tst_QReadWriteLock
  • tst_QSharedMemory
  • tst_QSqlTableModel
  • tst_QTcpSocket
  • tst_QTextStream
  • ...
|| !t.isValid()
!t.isValid()Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QTime
FALSEevaluated 6943571 times by 33 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractSlider
  • tst_QAtomicInt
  • tst_QCoreApplication
  • tst_QDateTimeEdit
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QFtp
  • tst_QFutureWatcher
  • tst_QGuiApplication
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QLabel
  • tst_QLocalSocket
  • tst_QMovie
  • tst_QMutex
  • tst_QNetworkReply
  • tst_QObjectPerformance
  • tst_QProcess
  • tst_QReadWriteLock
  • tst_QSharedMemory
  • tst_QSqlTableModel
  • tst_QTcpSocket
  • tst_QTextStream
  • ...
)
1-6943571
738 return
executed 6 times by 3 tests: return 0;
Executed by:
  • tst_QTextStream
  • tst_QThreadPool
  • tst_QTime
0;
executed 6 times by 3 tests: return 0;
Executed by:
  • tst_QTextStream
  • tst_QThreadPool
  • tst_QTime
6
739-
740-
741-
742-
743-
744-
745 return
executed 6943182 times by 33 tests: return t.ds() - ds();
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractSlider
  • tst_QAtomicInt
  • tst_QCoreApplication
  • tst_QDateTimeEdit
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QFtp
  • tst_QFutureWatcher
  • tst_QGuiApplication
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QLabel
  • tst_QLocalSocket
  • tst_QMovie
  • tst_QMutex
  • tst_QNetworkReply
  • tst_QObjectPerformance
  • tst_QProcess
  • tst_QReadWriteLock
  • tst_QSharedMemory
  • tst_QSqlTableModel
  • tst_QTcpSocket
  • tst_QTextStream
  • ...
t.ds() - ds();
executed 6943182 times by 33 tests: return t.ds() - ds();
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractSlider
  • tst_QAtomicInt
  • tst_QCoreApplication
  • tst_QDateTimeEdit
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QFtp
  • tst_QFutureWatcher
  • tst_QGuiApplication
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QLabel
  • tst_QLocalSocket
  • tst_QMovie
  • tst_QMutex
  • tst_QNetworkReply
  • tst_QObjectPerformance
  • tst_QProcess
  • tst_QReadWriteLock
  • tst_QSharedMemory
  • tst_QSqlTableModel
  • tst_QTcpSocket
  • tst_QTextStream
  • ...
6943182
746}-
747static QTime fromIsoTimeString(const QStringRef &string, Qt::DateFormat format, bool *isMidnight24)-
748{-
749 if (isMidnight24
isMidnight24Description
TRUEevaluated 54 times by 4 tests
Evaluated by:
  • tst_QDateTime
  • tst_QNetworkReply
  • tst_QSqlQuery
  • tst_QVariant
FALSEevaluated 30 times by 2 tests
Evaluated by:
  • tst_QTime
  • tst_QVariant
)
30-54
750 *
executed 54 times by 4 tests: *isMidnight24 = false;
Executed by:
  • tst_QDateTime
  • tst_QNetworkReply
  • tst_QSqlQuery
  • tst_QVariant
isMidnight24 = false;
executed 54 times by 4 tests: *isMidnight24 = false;
Executed by:
  • tst_QDateTime
  • tst_QNetworkReply
  • tst_QSqlQuery
  • tst_QVariant
54
751-
752 const int size = string.size();-
753 if (size < 5
size < 5Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QTime
FALSEevaluated 83 times by 5 tests
Evaluated by:
  • tst_QDateTime
  • tst_QNetworkReply
  • tst_QSqlQuery
  • tst_QTime
  • tst_QVariant
)
1-83
754 return
executed 1 time by 1 test: return QTime();
Executed by:
  • tst_QTime
QTime();
executed 1 time by 1 test: return QTime();
Executed by:
  • tst_QTime
1
755-
756 bool ok = false;-
757 int hour = string.mid(0, 2).toInt(&ok);-
758 if (!ok
!okDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QVariant
FALSEevaluated 82 times by 5 tests
Evaluated by:
  • tst_QDateTime
  • tst_QNetworkReply
  • tst_QSqlQuery
  • tst_QTime
  • tst_QVariant
)
1-82
759 return
executed 1 time by 1 test: return QTime();
Executed by:
  • tst_QVariant
QTime();
executed 1 time by 1 test: return QTime();
Executed by:
  • tst_QVariant
1
760 const int minute = string.mid(3, 2).toInt(&ok);-
761 if (!ok
!okDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QTime
FALSEevaluated 80 times by 5 tests
Evaluated by:
  • tst_QDateTime
  • tst_QNetworkReply
  • tst_QSqlQuery
  • tst_QTime
  • tst_QVariant
)
2-80
762 return
executed 2 times by 1 test: return QTime();
Executed by:
  • tst_QTime
QTime();
executed 2 times by 1 test: return QTime();
Executed by:
  • tst_QTime
2
763 int second = 0;-
764 int msec = 0;-
765-
766 if (size == 5
size == 5Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_QTime
FALSEevaluated 74 times by 5 tests
Evaluated by:
  • tst_QDateTime
  • tst_QNetworkReply
  • tst_QSqlQuery
  • tst_QTime
  • tst_QVariant
) {
6-74
767-
768 second = 0;-
769 msec = 0;-
770 }
executed 6 times by 1 test: end of block
Executed by:
  • tst_QTime
else if (string.at(5) == QLatin1Char(',')
string.at(5) =...atin1Char(',')Description
TRUEevaluated 5 times by 2 tests
Evaluated by:
  • tst_QDateTime
  • tst_QTime
FALSEevaluated 69 times by 5 tests
Evaluated by:
  • tst_QDateTime
  • tst_QNetworkReply
  • tst_QSqlQuery
  • tst_QTime
  • tst_QVariant
|| string.at(5) == QLatin1Char('.')
string.at(5) =...atin1Char('.')Description
TRUEevaluated 4 times by 2 tests
Evaluated by:
  • tst_QDateTime
  • tst_QTime
FALSEevaluated 65 times by 5 tests
Evaluated by:
  • tst_QDateTime
  • tst_QNetworkReply
  • tst_QSqlQuery
  • tst_QTime
  • tst_QVariant
) {
4-69
771 if (format == Qt::TextDate
format == Qt::TextDateDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QTime
FALSEevaluated 8 times by 2 tests
Evaluated by:
  • tst_QDateTime
  • tst_QTime
)
1-8
772 return
executed 1 time by 1 test: return QTime();
Executed by:
  • tst_QTime
QTime();
executed 1 time by 1 test: return QTime();
Executed by:
  • tst_QTime
1
773 const QStringRef minuteFractionStr = string.mid(6, 5);-
774 const long minuteFractionInt = minuteFractionStr.toLong(&ok);-
775 if (!ok
!okDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QTime
FALSEevaluated 7 times by 2 tests
Evaluated by:
  • tst_QDateTime
  • tst_QTime
)
1-7
776 return
executed 1 time by 1 test: return QTime();
Executed by:
  • tst_QTime
QTime();
executed 1 time by 1 test: return QTime();
Executed by:
  • tst_QTime
1
777 const float minuteFraction = double(minuteFractionInt) / (std::pow(double(10), minuteFractionStr.count()));-
778-
779 const float secondWithMs = minuteFraction * 60;-
780 const float secondNoMs = std::floor(secondWithMs);-
781 const float secondFraction = secondWithMs - secondNoMs;-
782 second = secondNoMs;-
783 msec = qMin(qRound(secondFraction * 1000.0), 999);-
784 }
executed 7 times by 2 tests: end of block
Executed by:
  • tst_QDateTime
  • tst_QTime
else {
7
785-
786 second = string.mid(6, 2).toInt(&ok);-
787 if (!ok
!okDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QTime
FALSEevaluated 63 times by 5 tests
Evaluated by:
  • tst_QDateTime
  • tst_QNetworkReply
  • tst_QSqlQuery
  • tst_QTime
  • tst_QVariant
)
2-63
788 return
executed 2 times by 1 test: return QTime();
Executed by:
  • tst_QTime
QTime();
executed 2 times by 1 test: return QTime();
Executed by:
  • tst_QTime
2
789 if (size > 8
size > 8Description
TRUEevaluated 29 times by 3 tests
Evaluated by:
  • tst_QDateTime
  • tst_QSqlQuery
  • tst_QTime
FALSEevaluated 34 times by 4 tests
Evaluated by:
  • tst_QDateTime
  • tst_QNetworkReply
  • tst_QTime
  • tst_QVariant
&& (string.at(8) == QLatin1Char(',')
string.at(8) =...atin1Char(',')Description
TRUEevaluated 11 times by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 18 times by 3 tests
Evaluated by:
  • tst_QDateTime
  • tst_QSqlQuery
  • tst_QTime
|| string.at(8) == QLatin1Char('.')
string.at(8) =...atin1Char('.')Description
TRUEevaluated 15 times by 3 tests
Evaluated by:
  • tst_QDateTime
  • tst_QSqlQuery
  • tst_QTime
FALSEevaluated 3 times by 2 tests
Evaluated by:
  • tst_QDateTime
  • tst_QTime
)) {
3-34
790 const QStringRef msecStr(string.mid(9, 4));-
791 int msecInt = msecStr.isEmpty()
msecStr.isEmpty()Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 25 times by 3 tests
Evaluated by:
  • tst_QDateTime
  • tst_QSqlQuery
  • tst_QTime
? 0 : msecStr.toInt(&ok);
1-25
792 if (!ok
!okDescription
TRUEnever evaluated
FALSEevaluated 26 times by 3 tests
Evaluated by:
  • tst_QDateTime
  • tst_QSqlQuery
  • tst_QTime
)
0-26
793 return
never executed: return QTime();
QTime();
never executed: return QTime();
0
794 const double secondFraction(msecInt / (std::pow(double(10), msecStr.count())));-
795 msec = qMin(qRound(secondFraction * 1000.0), 999);-
796 }
executed 26 times by 3 tests: end of block
Executed by:
  • tst_QDateTime
  • tst_QSqlQuery
  • tst_QTime
26
797 }
executed 63 times by 5 tests: end of block
Executed by:
  • tst_QDateTime
  • tst_QNetworkReply
  • tst_QSqlQuery
  • tst_QTime
  • tst_QVariant
63
798-
799 if (format == Qt::ISODate
format == Qt::ISODateDescription
TRUEevaluated 69 times by 5 tests
Evaluated by:
  • tst_QDateTime
  • tst_QNetworkReply
  • tst_QSqlQuery
  • tst_QTime
  • tst_QVariant
FALSEevaluated 7 times by 1 test
Evaluated by:
  • tst_QTime
&& hour == 24
hour == 24Description
TRUEevaluated 7 times by 2 tests
Evaluated by:
  • tst_QDateTime
  • tst_QTime
FALSEevaluated 62 times by 5 tests
Evaluated by:
  • tst_QDateTime
  • tst_QNetworkReply
  • tst_QSqlQuery
  • tst_QTime
  • tst_QVariant
&& minute == 0
minute == 0Description
TRUEevaluated 7 times by 2 tests
Evaluated by:
  • tst_QDateTime
  • tst_QTime
FALSEnever evaluated
&& second == 0
second == 0Description
TRUEevaluated 7 times by 2 tests
Evaluated by:
  • tst_QDateTime
  • tst_QTime
FALSEnever evaluated
&& msec == 0
msec == 0Description
TRUEevaluated 7 times by 2 tests
Evaluated by:
  • tst_QDateTime
  • tst_QTime
FALSEnever evaluated
) {
0-69
800 if (isMidnight24
isMidnight24Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QTime
)
2-5
801 *
executed 5 times by 1 test: *isMidnight24 = true;
Executed by:
  • tst_QDateTime
isMidnight24 = true;
executed 5 times by 1 test: *isMidnight24 = true;
Executed by:
  • tst_QDateTime
5
802 hour = 0;-
803 }
executed 7 times by 2 tests: end of block
Executed by:
  • tst_QDateTime
  • tst_QTime
7
804-
805 return
executed 76 times by 5 tests: return QTime(hour, minute, second, msec);
Executed by:
  • tst_QDateTime
  • tst_QNetworkReply
  • tst_QSqlQuery
  • tst_QTime
  • tst_QVariant
QTime(hour, minute, second, msec);
executed 76 times by 5 tests: return QTime(hour, minute, second, msec);
Executed by:
  • tst_QDateTime
  • tst_QNetworkReply
  • tst_QSqlQuery
  • tst_QTime
  • tst_QVariant
76
806}-
807QTime QTime::fromString(const QString& string, Qt::DateFormat format)-
808{-
809 if (string.isEmpty()
string.isEmpty()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QTime
FALSEevaluated 50 times by 2 tests
Evaluated by:
  • tst_QTime
  • tst_QVariant
)
2-50
810 return
executed 2 times by 1 test: return QTime();
Executed by:
  • tst_QTime
QTime();
executed 2 times by 1 test: return QTime();
Executed by:
  • tst_QTime
2
811-
812 switch (format) {-
813 case
never executed: case Qt::SystemLocaleDate:
Qt::SystemLocaleDate:
never executed: case Qt::SystemLocaleDate:
0
814 case
never executed: case Qt::SystemLocaleShortDate:
Qt::SystemLocaleShortDate:
never executed: case Qt::SystemLocaleShortDate:
0
815 return
never executed: return QLocale::system().toTime(string, QLocale::ShortFormat);
QLocale::system().toTime(string, QLocale::ShortFormat);
never executed: return QLocale::system().toTime(string, QLocale::ShortFormat);
0
816 case
never executed: case Qt::SystemLocaleLongDate:
Qt::SystemLocaleLongDate:
never executed: case Qt::SystemLocaleLongDate:
0
817 return
never executed: return QLocale::system().toTime(string, QLocale::LongFormat);
QLocale::system().toTime(string, QLocale::LongFormat);
never executed: return QLocale::system().toTime(string, QLocale::LongFormat);
0
818 case
never executed: case Qt::LocaleDate:
Qt::LocaleDate:
never executed: case Qt::LocaleDate:
0
819 case
never executed: case Qt::DefaultLocaleShortDate:
Qt::DefaultLocaleShortDate:
never executed: case Qt::DefaultLocaleShortDate:
0
820 return
never executed: return QLocale().toTime(string, QLocale::ShortFormat);
QLocale().toTime(string, QLocale::ShortFormat);
never executed: return QLocale().toTime(string, QLocale::ShortFormat);
0
821 case
never executed: case Qt::DefaultLocaleLongDate:
Qt::DefaultLocaleLongDate:
never executed: case Qt::DefaultLocaleLongDate:
0
822 return
never executed: return QLocale().toTime(string, QLocale::LongFormat);
QLocale().toTime(string, QLocale::LongFormat);
never executed: return QLocale().toTime(string, QLocale::LongFormat);
0
823 case
executed 20 times by 1 test: case Qt::RFC2822Date:
Executed by:
  • tst_QTime
Qt::RFC2822Date:
executed 20 times by 1 test: case Qt::RFC2822Date:
Executed by:
  • tst_QTime
20
824 return
executed 20 times by 1 test: return rfcDateImpl(string).time;
Executed by:
  • tst_QTime
rfcDateImpl(string).time;
executed 20 times by 1 test: return rfcDateImpl(string).time;
Executed by:
  • tst_QTime
20
825 case
executed 20 times by 2 tests: case Qt::ISODate:
Executed by:
  • tst_QTime
  • tst_QVariant
Qt::ISODate:
executed 20 times by 2 tests: case Qt::ISODate:
Executed by:
  • tst_QTime
  • tst_QVariant
20
826 case
executed 10 times by 1 test: case Qt::TextDate:
Executed by:
  • tst_QTime
Qt::TextDate:
executed 10 times by 1 test: case Qt::TextDate:
Executed by:
  • tst_QTime
10
827 default
never executed: default:
:
never executed: default:
0
828 return
executed 30 times by 2 tests: return fromIsoTimeString(&string, format, 0);
Executed by:
  • tst_QTime
  • tst_QVariant
fromIsoTimeString(&string, format, 0);
executed 30 times by 2 tests: return fromIsoTimeString(&string, format, 0);
Executed by:
  • tst_QTime
  • tst_QVariant
30
829 }-
830}-
831QTime QTime::fromString(const QString &string, const QString &format)-
832{-
833 QTime time;-
834-
835 QDateTimeParser dt(QVariant::Time, QDateTimeParser::FromString);-
836 if (dt.parseFormat(format)
dt.parseFormat(format)Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_QTime
FALSEnever evaluated
)
0-12
837 dt.fromString(string, 0, &time);
executed 12 times by 1 test: dt.fromString(string, 0, &time);
Executed by:
  • tst_QTime
12
838-
839-
840-
841-
842 return
executed 12 times by 1 test: return time;
Executed by:
  • tst_QTime
time;
executed 12 times by 1 test: return time;
Executed by:
  • tst_QTime
12
843}-
844bool QTime::isValid(int h, int m, int s, int ms)-
845{-
846 return
executed 20961703 times by 107 tests: return (uint)h < 24 && (uint)m < 60 && (uint)s < 60 && (uint)ms < 1000;
Executed by:
  • tst_Collections
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • ...
(uint)h < 24 && (uint)m < 60 && (uint)s < 60 && (uint)ms < 1000;
executed 20961703 times by 107 tests: return (uint)h < 24 && (uint)m < 60 && (uint)s < 60 && (uint)ms < 1000;
Executed by:
  • tst_Collections
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • ...
20961703
847}-
848void QTime::start()-
849{-
850 *this = currentTime();-
851}
executed 677 times by 28 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractSlider
  • tst_QAtomicInt
  • tst_QCoreApplication
  • tst_QFtp
  • tst_QFutureWatcher
  • tst_QGuiApplication
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QLabel
  • tst_QLocalSocket
  • tst_QMovie
  • tst_QMutex
  • tst_QNetworkReply
  • tst_QObjectPerformance
  • tst_QProcess
  • tst_QReadWriteLock
  • tst_QSharedMemory
  • tst_QSocks5SocketEngine
  • tst_QSqlTableModel
  • tst_QTcpSocket
  • tst_QThread
  • tst_QThreadPool
  • tst_QTimer
  • ...
677
852int QTime::restart()-
853{-
854 QTime t = currentTime();-
855 int n = msecsTo(t);-
856 if (n < 0
n < 0Description
TRUEnever evaluated
FALSEevaluated 211 times by 3 tests
Evaluated by:
  • tst_QFtp
  • tst_QTextStream
  • tst_QThreadPool
)
0-211
857 n += 86400*1000;
never executed: n += 86400*1000;
0
858 *this = t;-
859 return
executed 211 times by 3 tests: return n;
Executed by:
  • tst_QFtp
  • tst_QTextStream
  • tst_QThreadPool
n;
executed 211 times by 3 tests: return n;
Executed by:
  • tst_QFtp
  • tst_QTextStream
  • tst_QThreadPool
211
860}-
861int QTime::elapsed() const-
862{-
863 int n = msecsTo(currentTime());-
864 if (n < 0
n < 0Description
TRUEnever evaluated
FALSEevaluated 6943291 times by 28 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractSlider
  • tst_QAtomicInt
  • tst_QCoreApplication
  • tst_QFtp
  • tst_QFutureWatcher
  • tst_QGuiApplication
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QLabel
  • tst_QLocalSocket
  • tst_QMovie
  • tst_QMutex
  • tst_QNetworkReply
  • tst_QObjectPerformance
  • tst_QProcess
  • tst_QReadWriteLock
  • tst_QSharedMemory
  • tst_QSqlTableModel
  • tst_QTcpSocket
  • tst_QTextStream
  • tst_QThread
  • tst_QThreadPool
  • tst_QTimer
  • ...
)
0-6943291
865 n += 86400 * 1000;
never executed: n += 86400 * 1000;
0
866 return
executed 6943291 times by 28 tests: return n;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractSlider
  • tst_QAtomicInt
  • tst_QCoreApplication
  • tst_QFtp
  • tst_QFutureWatcher
  • tst_QGuiApplication
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QLabel
  • tst_QLocalSocket
  • tst_QMovie
  • tst_QMutex
  • tst_QNetworkReply
  • tst_QObjectPerformance
  • tst_QProcess
  • tst_QReadWriteLock
  • tst_QSharedMemory
  • tst_QSqlTableModel
  • tst_QTcpSocket
  • tst_QTextStream
  • tst_QThread
  • tst_QThreadPool
  • tst_QTimer
  • ...
n;
executed 6943291 times by 28 tests: return n;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractSlider
  • tst_QAtomicInt
  • tst_QCoreApplication
  • tst_QFtp
  • tst_QFutureWatcher
  • tst_QGuiApplication
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QLabel
  • tst_QLocalSocket
  • tst_QMovie
  • tst_QMutex
  • tst_QNetworkReply
  • tst_QObjectPerformance
  • tst_QProcess
  • tst_QReadWriteLock
  • tst_QSharedMemory
  • tst_QSqlTableModel
  • tst_QTcpSocket
  • tst_QTextStream
  • tst_QThread
  • tst_QThreadPool
  • tst_QTimer
  • ...
6943291
867}-
868-
869-
870-
871-
872-
873-
874static void qt_tzset()-
875{-
876-
877-
878-
879-
880-
881-
882 tzset();-
883-
884}
executed 6954999 times by 98 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • ...
6954999
885-
886-
887-
888-
889-
890-
891static int qt_timezone()-
892{-
893 return
executed 7004 times by 16 tests: return timezone;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QStyleSheetStyle
  • tst_QTime
timezone;
executed 7004 times by 16 tests: return timezone;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QStyleSheetStyle
  • tst_QTime
7004
894-
895}-
896-
897-
898static QString qt_tzname(QDateTimePrivate::DaylightStatus daylightStatus)-
899{-
900 int isDst = (
(daylightStatu...:DaylightTime)Description
TRUEevaluated 250 times by 11 tests
Evaluated by:
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileInfo
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QSignalSpy
  • tst_QTime
  • tst_QVariant
FALSEevaluated 1021 times by 5 tests
Evaluated by:
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QNoDebug
daylightStatus == QDateTimePrivate::DaylightTime)
(daylightStatu...:DaylightTime)Description
TRUEevaluated 250 times by 11 tests
Evaluated by:
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileInfo
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QSignalSpy
  • tst_QTime
  • tst_QVariant
FALSEevaluated 1021 times by 5 tests
Evaluated by:
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QNoDebug
? 1 : 0;
250-1021
901-
902-
903-
904-
905-
906-
907-
908 return
executed 1271 times by 13 tests: return QString::fromLocal8Bit(tzname[isDst]);
Executed by:
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileInfo
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QTime
  • tst_QVariant
QString::fromLocal8Bit(tzname[isDst]);
executed 1271 times by 13 tests: return QString::fromLocal8Bit(tzname[isDst]);
Executed by:
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileInfo
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QTime
  • tst_QVariant
1271
909-
910-
911}-
912-
913-
914-
915-
916-
917-
918static qint64 qt_mktime(QDate *date, QTime *time, QDateTimePrivate::DaylightStatus *daylightStatus,-
919 QString *abbreviation, bool *ok = 0)-
920{-
921 const qint64 msec = time->msec();-
922 int yy, mm, dd;-
923 date->getDate(&yy, &mm, &dd);-
924 tm local;-
925 memset(&local, 0, sizeof(local));-
926 local.tm_sec = time->second();-
927 local.tm_min = time->minute();-
928 local.tm_hour = time->hour();-
929 local.tm_mday = dd;-
930 local.tm_mon = mm - 1;-
931 local.tm_year = yy - 1900;-
932 if (daylightStatus
daylightStatusDescription
TRUEevaluated 13933065 times by 101 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
FALSEnever evaluated
)
0-13933065
933 local.tm_isdst = int(*daylightStatus);
executed 13931755 times by 101 tests: local.tm_isdst = int(*daylightStatus);
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
13931755
934 else-
935 local.tm_isdst = -1;
never executed: local.tm_isdst = -1;
0
936-
937-
938-
939-
940 time_t secsSinceEpoch = mktime(&local);-
941 if (secsSinceEpoch != time_t(-1)
secsSinceEpoch != time_t(-1)Description
TRUEevaluated 13931934 times by 101 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
FALSEevaluated 36 times by 1 test
Evaluated by:
  • tst_QDateTime
) {
36-13931934
942 *date = QDate(local.tm_year + 1900, local.tm_mon + 1, local.tm_mday);-
943 *time = QTime(local.tm_hour, local.tm_min, local.tm_sec, msec);-
944 if (local.tm_isdst >= 1
local.tm_isdst >= 1Description
TRUEevaluated 13906500 times by 98 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • tst_QFile
  • ...
FALSEevaluated 16578 times by 40 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • ...
) {
16578-13906500
945 if (daylightStatus
daylightStatusDescription
TRUEevaluated 13911432 times by 98 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • tst_QFile
  • ...
FALSEnever evaluated
)
0-13911432
946 *
executed 13919505 times by 98 tests: *daylightStatus = QDateTimePrivate::DaylightTime;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • tst_QFile
  • ...
daylightStatus = QDateTimePrivate::DaylightTime;
executed 13919505 times by 98 tests: *daylightStatus = QDateTimePrivate::DaylightTime;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • tst_QFile
  • ...
13919505
947 if (abbreviation
abbreviationDescription
TRUEevaluated 250 times by 11 tests
Evaluated by:
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileInfo
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QSignalSpy
  • tst_QTime
  • tst_QVariant
FALSEevaluated 13917167 times by 98 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • tst_QFile
  • ...
)
250-13917167
948 *
executed 250 times by 11 tests: *abbreviation = qt_tzname(QDateTimePrivate::DaylightTime);
Executed by:
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileInfo
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QSignalSpy
  • tst_QTime
  • tst_QVariant
abbreviation = qt_tzname(QDateTimePrivate::DaylightTime);
executed 250 times by 11 tests: *abbreviation = qt_tzname(QDateTimePrivate::DaylightTime);
Executed by:
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileInfo
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QSignalSpy
  • tst_QTime
  • tst_QVariant
250
949 }
executed 13909999 times by 98 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • tst_QFile
  • ...
else if (local.tm_isdst == 0
local.tm_isdst == 0Description
TRUEevaluated 16578 times by 40 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • ...
FALSEnever evaluated
) {
0-13909999
950 if (daylightStatus
daylightStatusDescription
TRUEevaluated 16578 times by 40 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • ...
FALSEnever evaluated
)
0-16578
951 *
executed 16578 times by 40 tests: *daylightStatus = QDateTimePrivate::StandardTime;
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • ...
daylightStatus = QDateTimePrivate::StandardTime;
executed 16578 times by 40 tests: *daylightStatus = QDateTimePrivate::StandardTime;
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • ...
16578
952 if (abbreviation
abbreviationDescription
TRUEevaluated 691 times by 4 tests
Evaluated by:
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
FALSEevaluated 15887 times by 40 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • ...
)
691-15887
953 *
executed 691 times by 4 tests: *abbreviation = qt_tzname(QDateTimePrivate::StandardTime);
Executed by:
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
abbreviation = qt_tzname(QDateTimePrivate::StandardTime);
executed 691 times by 4 tests: *abbreviation = qt_tzname(QDateTimePrivate::StandardTime);
Executed by:
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
691
954 }
executed 16578 times by 40 tests: end of block
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • ...
else {
16578
955 if (daylightStatus
daylightStatusDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
956 *
never executed: *daylightStatus = QDateTimePrivate::UnknownDaylightTime;
daylightStatus = QDateTimePrivate::UnknownDaylightTime;
never executed: *daylightStatus = QDateTimePrivate::UnknownDaylightTime;
0
957 if (abbreviation
abbreviationDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
958 *
never executed: *abbreviation = qt_tzname(QDateTimePrivate::StandardTime);
abbreviation = qt_tzname(QDateTimePrivate::StandardTime);
never executed: *abbreviation = qt_tzname(QDateTimePrivate::StandardTime);
0
959 }
never executed: end of block
0
960 if (ok
okDescription
TRUEevaluated 1142 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • tst_QStyleSheetStyle
FALSEevaluated 13932348 times by 101 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
)
1142-13932348
961 *
executed 1142 times by 8 tests: *ok = true;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • tst_QStyleSheetStyle
ok = true;
executed 1142 times by 8 tests: *ok = true;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • tst_QStyleSheetStyle
1142
962 }
executed 13928513 times by 101 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
else {
13928513
963 *date = QDate();-
964 *time = QTime();-
965 if (daylightStatus
daylightStatusDescription
TRUEevaluated 36 times by 1 test
Evaluated by:
  • tst_QDateTime
FALSEnever evaluated
)
0-36
966 *
executed 36 times by 1 test: *daylightStatus = QDateTimePrivate::UnknownDaylightTime;
Executed by:
  • tst_QDateTime
daylightStatus = QDateTimePrivate::UnknownDaylightTime;
executed 36 times by 1 test: *daylightStatus = QDateTimePrivate::UnknownDaylightTime;
Executed by:
  • tst_QDateTime
36
967 if (abbreviation
abbreviationDescription
TRUEevaluated 11 times by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 25 times by 1 test
Evaluated by:
  • tst_QDateTime
)
11-25
968 *
executed 11 times by 1 test: *abbreviation = QString();
Executed by:
  • tst_QDateTime
abbreviation = QString();
executed 11 times by 1 test: *abbreviation = QString();
Executed by:
  • tst_QDateTime
11
969 if (ok
okDescription
TRUEevaluated 36 times by 1 test
Evaluated by:
  • tst_QDateTime
FALSEnever evaluated
)
0-36
970 *
executed 36 times by 1 test: *ok = false;
Executed by:
  • tst_QDateTime
ok = false;
executed 36 times by 1 test: *ok = false;
Executed by:
  • tst_QDateTime
36
971 }
executed 36 times by 1 test: end of block
Executed by:
  • tst_QDateTime
36
972-
973-
974 return
executed 13924464 times by 101 tests: return ((qint64)secsSinceEpoch * 1000) + msec;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
((qint64)secsSinceEpoch * 1000) + msec;
executed 13924464 times by 101 tests: return ((qint64)secsSinceEpoch * 1000) + msec;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
13924464
975}-
976-
977-
978-
979static bool qt_localtime(qint64 msecsSinceEpoch, QDate *localDate, QTime *localTime,-
980 QDateTimePrivate::DaylightStatus *daylightStatus)-
981{-
982 const time_t secsSinceEpoch = msecsSinceEpoch / 1000;-
983 const int msec = msecsSinceEpoch % 1000;-
984-
985 tm local;-
986 bool valid = false;-
987 qt_tzset();-
988-
989-
990 tm *res = 0;-
991 res = localtime_r(&secsSinceEpoch, &local);-
992 if (res
resDescription
TRUEevaluated 6953144 times by 95 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • ...
FALSEnever evaluated
)
0-6953144
993 valid = true;
executed 6953143 times by 95 tests: valid = true;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • ...
6953143
994 if (valid
validDescription
TRUEevaluated 6950715 times by 95 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • ...
FALSEnever evaluated
) {
0-6950715
995 *localDate = QDate(local.tm_year + 1900, local.tm_mon + 1, local.tm_mday);-
996 *localTime = QTime(local.tm_hour, local.tm_min, local.tm_sec, msec);-
997 if (daylightStatus
daylightStatusDescription
TRUEevaluated 6953144 times by 95 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • ...
FALSEnever evaluated
) {
0-6953144
998 if (local.tm_isdst > 0
local.tm_isdst > 0Description
TRUEevaluated 6949783 times by 94 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • ...
FALSEevaluated 690 times by 28 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QNetworkCookieJar
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QSystemTrayIcon
  • tst_QTextEdit
  • ...
)
690-6949783
999 *
executed 6952454 times by 94 tests: *daylightStatus = QDateTimePrivate::DaylightTime;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • ...
daylightStatus = QDateTimePrivate::DaylightTime;
executed 6952454 times by 94 tests: *daylightStatus = QDateTimePrivate::DaylightTime;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • ...
6952454
1000 else if (local.tm_isdst < 0
local.tm_isdst < 0Description
TRUEnever evaluated
FALSEevaluated 690 times by 28 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QNetworkCookieJar
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QSystemTrayIcon
  • tst_QTextEdit
  • ...
)
0-690
1001 *
never executed: *daylightStatus = QDateTimePrivate::UnknownDaylightTime;
daylightStatus = QDateTimePrivate::UnknownDaylightTime;
never executed: *daylightStatus = QDateTimePrivate::UnknownDaylightTime;
0
1002 else-
1003 *
executed 690 times by 28 tests: *daylightStatus = QDateTimePrivate::StandardTime;
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QNetworkCookieJar
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QSystemTrayIcon
  • tst_QTextEdit
  • ...
daylightStatus = QDateTimePrivate::StandardTime;
executed 690 times by 28 tests: *daylightStatus = QDateTimePrivate::StandardTime;
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QNetworkCookieJar
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QSystemTrayIcon
  • tst_QTextEdit
  • ...
690
1004 }-
1005 return
executed 6950531 times by 95 tests: return true;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • ...
true;
executed 6950531 times by 95 tests: return true;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • ...
6950531
1006 } else {-
1007 *localDate = QDate();-
1008 *localTime = QTime();-
1009 if (daylightStatus
daylightStatusDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1010 *
never executed: *daylightStatus = QDateTimePrivate::UnknownDaylightTime;
daylightStatus = QDateTimePrivate::UnknownDaylightTime;
never executed: *daylightStatus = QDateTimePrivate::UnknownDaylightTime;
0
1011 return
never executed: return false;
false;
never executed: return false;
0
1012 }-
1013}-
1014-
1015-
1016static void msecsToTime(qint64 msecs, QDate *date, QTime *time)-
1017{-
1018 qint64 jd = JULIAN_DAY_FOR_EPOCH;-
1019 qint64 ds = 0;-
1020-
1021 if (qAbs(msecs) >= MSECS_PER_DAY
qAbs(msecs) >= MSECS_PER_DAYDescription
TRUEevaluated 21021900 times by 103 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • ...
FALSEevaluated 1690 times by 15 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QDBusMarshall
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QStyleSheetStyle
  • tst_QTimeZone
  • tst_QVariant
) {
1690-21021900
1022 jd += (msecs / MSECS_PER_DAY);-
1023 msecs %= MSECS_PER_DAY;-
1024 }
executed 21017392 times by 103 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • ...
21017392
1025-
1026 if (msecs < 0
msecs < 0Description
TRUEevaluated 5847 times by 6 tests
Evaluated by:
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QNoDebug
  • tst_QTime
FALSEevaluated 21012031 times by 102 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • ...
) {
5847-21012031
1027 ds = MSECS_PER_DAY - msecs - 1;-
1028 jd -= ds / MSECS_PER_DAY;-
1029 ds = ds % MSECS_PER_DAY;-
1030 ds = MSECS_PER_DAY - ds - 1;-
1031 }
executed 5847 times by 6 tests: end of block
Executed by:
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QNoDebug
  • tst_QTime
else {
5847
1032 ds = msecs;-
1033 }
executed 21019418 times by 102 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • ...
21019418
1034-
1035 if (date
dateDescription
TRUEevaluated 14039817 times by 103 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • ...
FALSEevaluated 6984402 times by 73 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFtp
  • tst_QFutureWatcher
  • ...
)
6984402-14039817
1036 *
executed 14040024 times by 103 tests: *date = QDate::fromJulianDay(jd);
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • ...
date = QDate::fromJulianDay(jd);
executed 14040024 times by 103 tests: *date = QDate::fromJulianDay(jd);
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • ...
14040024
1037 if (time
timeDescription
TRUEevaluated 20947739 times by 103 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • ...
FALSEevaluated 71334 times by 43 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • ...
)
71334-20947739
1038 *
executed 20934261 times by 103 tests: *time = QTime::fromMSecsSinceStartOfDay(ds);
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • ...
time = QTime::fromMSecsSinceStartOfDay(ds);
executed 20934261 times by 103 tests: *time = QTime::fromMSecsSinceStartOfDay(ds);
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • ...
20934261
1039}
executed 21023529 times by 103 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • ...
21023529
1040-
1041-
1042static qint64 timeToMSecs(const QDate &date, const QTime &time)-
1043{-
1044 return
executed 13949302 times by 102 tests: return ((date.toJulianDay() - JULIAN_DAY_FOR_EPOCH) * MSECS_PER_DAY) + time.msecsSinceStartOfDay();
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
((date.toJulianDay() - JULIAN_DAY_FOR_EPOCH) * MSECS_PER_DAY)
executed 13949302 times by 102 tests: return ((date.toJulianDay() - JULIAN_DAY_FOR_EPOCH) * MSECS_PER_DAY) + time.msecsSinceStartOfDay();
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
13949302
1045 + time.msecsSinceStartOfDay();
executed 13949302 times by 102 tests: return ((date.toJulianDay() - JULIAN_DAY_FOR_EPOCH) * MSECS_PER_DAY) + time.msecsSinceStartOfDay();
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
13949302
1046}-
1047-
1048-
1049static bool epochMSecsToLocalTime(qint64 msecs, QDate *localDate, QTime *localTime,-
1050 QDateTimePrivate::DaylightStatus *daylightStatus = 0)-
1051{-
1052 if (msecs < 0
msecs < 0Description
TRUEevaluated 85 times by 2 tests
Evaluated by:
  • tst_QDateTime
  • tst_QDateTimeEdit
FALSEevaluated 6950521 times by 95 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • ...
) {
85-6950521
1053-
1054-
1055 qt_tzset();-
1056 msecsToTime(msecs - qt_timezone() * 1000, localDate, localTime);-
1057 if (daylightStatus
daylightStatusDescription
TRUEevaluated 85 times by 2 tests
Evaluated by:
  • tst_QDateTime
  • tst_QDateTimeEdit
FALSEnever evaluated
)
0-85
1058 *
executed 85 times by 2 tests: *daylightStatus = QDateTimePrivate::StandardTime;
Executed by:
  • tst_QDateTime
  • tst_QDateTimeEdit
daylightStatus = QDateTimePrivate::StandardTime;
executed 85 times by 2 tests: *daylightStatus = QDateTimePrivate::StandardTime;
Executed by:
  • tst_QDateTime
  • tst_QDateTimeEdit
85
1059 return
executed 85 times by 2 tests: return true;
Executed by:
  • tst_QDateTime
  • tst_QDateTimeEdit
true;
executed 85 times by 2 tests: return true;
Executed by:
  • tst_QDateTime
  • tst_QDateTimeEdit
85
1060 } else if (msecs > (qint64(TIME_T_MAX) * 1000)
msecs > (qint6...T_MAX) * 1000)Description
TRUEevaluated 58 times by 2 tests
Evaluated by:
  • tst_QDateTime
  • tst_QDateTimeEdit
FALSEevaluated 6953086 times by 95 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • ...
) {
58-6953086
1061-
1062-
1063-
1064-
1065-
1066 QDate utcDate;-
1067 QTime utcTime;-
1068 msecsToTime(msecs, &utcDate, &utcTime);-
1069 int year, month, day;-
1070 utcDate.getDate(&year, &month, &day);-
1071-
1072 if (month == 2
month == 2Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 49 times by 2 tests
Evaluated by:
  • tst_QDateTime
  • tst_QDateTimeEdit
&& day == 29
day == 29Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_QDateTime
)
3-49
1073 --
executed 3 times by 1 test: --day;
Executed by:
  • tst_QDateTime
day;
executed 3 times by 1 test: --day;
Executed by:
  • tst_QDateTime
3
1074 QDate fakeDate(2037, month, day);-
1075 qint64 fakeMsecs = QDateTime(fakeDate, utcTime, Qt::UTC).toMSecsSinceEpoch();-
1076 bool res = qt_localtime(fakeMsecs, localDate, localTime, daylightStatus);-
1077 *localDate = localDate->addDays(fakeDate.daysTo(utcDate));-
1078 return
executed 58 times by 2 tests: return res;
Executed by:
  • tst_QDateTime
  • tst_QDateTimeEdit
res;
executed 58 times by 2 tests: return res;
Executed by:
  • tst_QDateTime
  • tst_QDateTimeEdit
58
1079 } else {-
1080-
1081 return
executed 6952569 times by 95 tests: return qt_localtime(msecs, localDate, localTime, daylightStatus);
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • ...
qt_localtime(msecs, localDate, localTime, daylightStatus);
executed 6952569 times by 95 tests: return qt_localtime(msecs, localDate, localTime, daylightStatus);
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • ...
6952569
1082 }-
1083}-
1084-
1085-
1086-
1087-
1088static qint64 localMSecsToEpochMSecs(qint64 localMsecs,-
1089 QDateTimePrivate::DaylightStatus *daylightStatus,-
1090 QDate *localDate = 0, QTime *localTime = 0,-
1091 QString *abbreviation = 0)-
1092{-
1093 QDate dt;-
1094 QTime tm;-
1095 msecsToTime(localMsecs, &dt, &tm);-
1096-
1097 const qint64 msecsMax = qint64(TIME_T_MAX) * 1000;-
1098-
1099 if (localMsecs <= qint64(MSECS_PER_DAY)
localMsecs <= ...MSECS_PER_DAY)Description
TRUEevaluated 6995 times by 16 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QStyleSheetStyle
  • tst_QTime
FALSEevaluated 13934960 times by 101 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
) {
6995-13934960
1100-
1101-
1102-
1103-
1104-
1105 if (localMsecs >= -qint64(MSECS_PER_DAY)
localMsecs >= ...MSECS_PER_DAY)Description
TRUEevaluated 1136 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • tst_QStyleSheetStyle
FALSEevaluated 5859 times by 14 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QStyleSheetStyle
  • tst_QTime
) {
1136-5859
1106 bool valid;-
1107 qint64 utcMsecs = qt_mktime(&dt, &tm, daylightStatus, abbreviation, &valid);-
1108 if (valid
validDescription
TRUEevaluated 1100 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • tst_QStyleSheetStyle
FALSEevaluated 36 times by 1 test
Evaluated by:
  • tst_QDateTime
&& utcMsecs >= 0
utcMsecs >= 0Description
TRUEevaluated 76 times by 2 tests
Evaluated by:
  • tst_QDateTime
  • tst_QNetworkCookieJar
FALSEevaluated 1024 times by 7 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QNetworkCacheMetaData
  • tst_QStyleSheetStyle
) {
36-1100
1109-
1110 if (localDate
localDateDescription
TRUEevaluated 30 times by 2 tests
Evaluated by:
  • tst_QDateTime
  • tst_QNetworkCookieJar
FALSEevaluated 46 times by 2 tests
Evaluated by:
  • tst_QDateTime
  • tst_QNetworkCookieJar
)
30-46
1111 *
executed 30 times by 2 tests: *localDate = dt;
Executed by:
  • tst_QDateTime
  • tst_QNetworkCookieJar
localDate = dt;
executed 30 times by 2 tests: *localDate = dt;
Executed by:
  • tst_QDateTime
  • tst_QNetworkCookieJar
30
1112 if (localTime
localTimeDescription
TRUEevaluated 30 times by 2 tests
Evaluated by:
  • tst_QDateTime
  • tst_QNetworkCookieJar
FALSEevaluated 46 times by 2 tests
Evaluated by:
  • tst_QDateTime
  • tst_QNetworkCookieJar
)
30-46
1113 *
executed 30 times by 2 tests: *localTime = tm;
Executed by:
  • tst_QDateTime
  • tst_QNetworkCookieJar
localTime = tm;
executed 30 times by 2 tests: *localTime = tm;
Executed by:
  • tst_QDateTime
  • tst_QNetworkCookieJar
30
1114 return
executed 76 times by 2 tests: return utcMsecs;
Executed by:
  • tst_QDateTime
  • tst_QNetworkCookieJar
utcMsecs;
executed 76 times by 2 tests: return utcMsecs;
Executed by:
  • tst_QDateTime
  • tst_QNetworkCookieJar
76
1115 }-
1116 }
executed 1060 times by 7 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QNetworkCacheMetaData
  • tst_QStyleSheetStyle
else {
1060
1117-
1118 qt_tzset();-
1119 }
executed 5859 times by 14 tests: end of block
Executed by:
  • tst_QAccessibility
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QStyleSheetStyle
  • tst_QTime
5859
1120-
1121 qint64 utcMsecs = localMsecs + qt_timezone() * 1000;-
1122 if (localDate
localDateDescription
TRUEevaluated 4896 times by 15 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QStyleSheetStyle
  • tst_QTime
FALSEevaluated 2023 times by 8 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QNetworkCacheMetaData
  • tst_QNoDebug
  • tst_QStyleSheetStyle
|| localTime
localTimeDescription
TRUEnever evaluated
FALSEevaluated 2023 times by 8 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QNetworkCacheMetaData
  • tst_QNoDebug
  • tst_QStyleSheetStyle
)
0-4896
1123 msecsToTime(localMsecs, localDate, localTime);
executed 4896 times by 15 tests: msecsToTime(localMsecs, localDate, localTime);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QStyleSheetStyle
  • tst_QTime
4896
1124 if (daylightStatus
daylightStatusDescription
TRUEevaluated 6919 times by 16 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QStyleSheetStyle
  • tst_QTime
FALSEnever evaluated
)
0-6919
1125 *
executed 6919 times by 16 tests: *daylightStatus = QDateTimePrivate::StandardTime;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QStyleSheetStyle
  • tst_QTime
daylightStatus = QDateTimePrivate::StandardTime;
executed 6919 times by 16 tests: *daylightStatus = QDateTimePrivate::StandardTime;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QStyleSheetStyle
  • tst_QTime
6919
1126 if (abbreviation
abbreviationDescription
TRUEevaluated 330 times by 4 tests
Evaluated by:
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QNoDebug
FALSEevaluated 6589 times by 16 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QStyleSheetStyle
  • tst_QTime
)
330-6589
1127 *
executed 330 times by 4 tests: *abbreviation = qt_tzname(QDateTimePrivate::StandardTime);
Executed by:
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QNoDebug
abbreviation = qt_tzname(QDateTimePrivate::StandardTime);
executed 330 times by 4 tests: *abbreviation = qt_tzname(QDateTimePrivate::StandardTime);
Executed by:
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QNoDebug
330
1128 return
executed 6919 times by 16 tests: return utcMsecs;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QStyleSheetStyle
  • tst_QTime
utcMsecs;
executed 6919 times by 16 tests: return utcMsecs;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QStyleSheetStyle
  • tst_QTime
6919
1129-
1130 } else if (localMsecs >= msecsMax - MSECS_PER_DAY
localMsecs >= ... MSECS_PER_DAYDescription
TRUEevaluated 15125 times by 11 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QStyleSheetStyle
  • tst_QTime
FALSEevaluated 13917578 times by 101 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
) {
15125-13917578
1131-
1132-
1133-
1134-
1135-
1136-
1137 if (localMsecs <= msecsMax + MSECS_PER_DAY
localMsecs <= ... MSECS_PER_DAYDescription
TRUEevaluated 42 times by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 15083 times by 11 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QStyleSheetStyle
  • tst_QTime
) {
42-15083
1138 bool valid;-
1139 qint64 utcMsecs = qt_mktime(&dt, &tm, daylightStatus, abbreviation, &valid);-
1140 if (valid
validDescription
TRUEevaluated 42 times by 1 test
Evaluated by:
  • tst_QDateTime
FALSEnever evaluated
&& utcMsecs <= msecsMax
utcMsecs <= msecsMaxDescription
TRUEevaluated 33 times by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 9 times by 1 test
Evaluated by:
  • tst_QDateTime
) {
0-42
1141-
1142 if (localDate
localDateDescription
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 24 times by 1 test
Evaluated by:
  • tst_QDateTime
)
9-24
1143 *
executed 9 times by 1 test: *localDate = dt;
Executed by:
  • tst_QDateTime
localDate = dt;
executed 9 times by 1 test: *localDate = dt;
Executed by:
  • tst_QDateTime
9
1144 if (localTime
localTimeDescription
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 24 times by 1 test
Evaluated by:
  • tst_QDateTime
)
9-24
1145 *
executed 9 times by 1 test: *localTime = tm;
Executed by:
  • tst_QDateTime
localTime = tm;
executed 9 times by 1 test: *localTime = tm;
Executed by:
  • tst_QDateTime
9
1146 return
executed 33 times by 1 test: return utcMsecs;
Executed by:
  • tst_QDateTime
utcMsecs;
executed 33 times by 1 test: return utcMsecs;
Executed by:
  • tst_QDateTime
33
1147 }-
1148 }
executed 9 times by 1 test: end of block
Executed by:
  • tst_QDateTime
9
1149-
1150-
1151-
1152 int year, month, day;-
1153 dt.getDate(&year, &month, &day);-
1154-
1155 if (month == 2
month == 2Description
TRUEevaluated 75 times by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 15017 times by 11 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QStyleSheetStyle
  • tst_QTime
&& day == 29
day == 29Description
TRUEevaluated 33 times by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 42 times by 1 test
Evaluated by:
  • tst_QDateTime
)
33-15017
1156 --
executed 33 times by 1 test: --day;
Executed by:
  • tst_QDateTime
day;
executed 33 times by 1 test: --day;
Executed by:
  • tst_QDateTime
33
1157 QDate fakeDate(2037, month, day);-
1158 qint64 fakeDiff = fakeDate.daysTo(dt);-
1159 qint64 utcMsecs = qt_mktime(&fakeDate, &tm, daylightStatus, abbreviation);-
1160 if (localDate
localDateDescription
TRUEevaluated 14275 times by 11 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QStyleSheetStyle
  • tst_QTime
FALSEevaluated 817 times by 5 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QStyleSheetStyle
)
817-14275
1161 *
executed 14275 times by 11 tests: *localDate = fakeDate.addDays(fakeDiff);
Executed by:
  • tst_QAccessibility
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QStyleSheetStyle
  • tst_QTime
localDate = fakeDate.addDays(fakeDiff);
executed 14275 times by 11 tests: *localDate = fakeDate.addDays(fakeDiff);
Executed by:
  • tst_QAccessibility
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QStyleSheetStyle
  • tst_QTime
14275
1162 if (localTime
localTimeDescription
TRUEevaluated 14275 times by 11 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QStyleSheetStyle
  • tst_QTime
FALSEevaluated 817 times by 5 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QStyleSheetStyle
)
817-14275
1163 *
executed 14275 times by 11 tests: *localTime = tm;
Executed by:
  • tst_QAccessibility
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QStyleSheetStyle
  • tst_QTime
localTime = tm;
executed 14275 times by 11 tests: *localTime = tm;
Executed by:
  • tst_QAccessibility
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QStyleSheetStyle
  • tst_QTime
14275
1164 QDate utcDate;-
1165 QTime utcTime;-
1166 msecsToTime(utcMsecs, &utcDate, &utcTime);-
1167 utcDate = utcDate.addDays(fakeDiff);-
1168 utcMsecs = timeToMSecs(utcDate, utcTime);-
1169 return
executed 15092 times by 11 tests: return utcMsecs;
Executed by:
  • tst_QAccessibility
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QStyleSheetStyle
  • tst_QTime
utcMsecs;
executed 15092 times by 11 tests: return utcMsecs;
Executed by:
  • tst_QAccessibility
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QStyleSheetStyle
  • tst_QTime
15092
1170-
1171 } else {-
1172-
1173-
1174 qint64 utcMsecs = qt_mktime(&dt, &tm, daylightStatus, abbreviation);-
1175 if (localDate
localDateDescription
TRUEevaluated 13910084 times by 101 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
FALSEevaluated 1877 times by 30 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QComboBox
  • tst_QDBusAbstractAdaptor
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QFileInfo
  • tst_QFrame
  • tst_QFtp
  • tst_QIcon
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QLockFile
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPixmap
  • tst_QPixmapFilter
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSqlTableModel
  • ...
)
1877-13910084
1176 *
executed 13916853 times by 101 tests: *localDate = dt;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
localDate = dt;
executed 13916853 times by 101 tests: *localDate = dt;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
13916853
1177 if (localTime
localTimeDescription
TRUEevaluated 13916978 times by 101 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
FALSEevaluated 1877 times by 30 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QComboBox
  • tst_QDBusAbstractAdaptor
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QFileInfo
  • tst_QFrame
  • tst_QFtp
  • tst_QIcon
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QLockFile
  • tst_QMetaType
  • tst_QMimeDatabase
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPixmap
  • tst_QPixmapFilter
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSqlTableModel
  • ...
)
1877-13916978
1178 *
executed 13911926 times by 101 tests: *localTime = tm;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
localTime = tm;
executed 13911926 times by 101 tests: *localTime = tm;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
13911926
1179 return
executed 13897955 times by 101 tests: return utcMsecs;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
utcMsecs;
executed 13897955 times by 101 tests: return utcMsecs;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
13897955
1180-
1181 }-
1182}-
1183-
1184-
1185-
1186-
1187-
1188QDateTimePrivate::QDateTimePrivate(const QDate &toDate, const QTime &toTime, Qt::TimeSpec toSpec,-
1189 int offsetSeconds)-
1190 : m_msecs(0),-
1191 m_spec(Qt::LocalTime),-
1192 m_offsetFromUtc(0),-
1193 m_status(0)-
1194{-
1195 setTimeSpec(toSpec, offsetSeconds);-
1196 setDateTime(toDate, toTime);-
1197}
executed 65868 times by 35 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSettings
  • tst_QSqlQuery
  • ...
65868
1198-
1199-
1200QDateTimePrivate::QDateTimePrivate(const QDate &toDate, const QTime &toTime,-
1201 const QTimeZone &toTimeZone)-
1202 : m_spec(Qt::TimeZone),-
1203 m_offsetFromUtc(0),-
1204 m_timeZone(toTimeZone),-
1205 m_status(0)-
1206{-
1207 setDateTime(toDate, toTime);-
1208}
executed 22 times by 1 test: end of block
Executed by:
  • tst_QDateTime
22
1209-
1210-
1211void QDateTimePrivate::setTimeSpec(Qt::TimeSpec spec, int offsetSeconds)-
1212{-
1213 clearValidDateTime();-
1214 clearSetToDaylightStatus();-
1215-
1216-
1217 m_timeZone = QTimeZone();-
1218-
1219-
1220 switch (spec) {-
1221 case
executed 232 times by 4 tests: case Qt::OffsetFromUTC:
Executed by:
  • tst_QDateTime
  • tst_QNetworkDiskCache
  • tst_QSettings
  • tst_selftests - unknown status
Qt::OffsetFromUTC:
executed 232 times by 4 tests: case Qt::OffsetFromUTC:
Executed by:
  • tst_QDateTime
  • tst_QNetworkDiskCache
  • tst_QSettings
  • tst_selftests - unknown status
232
1222 if (offsetSeconds == 0
offsetSeconds == 0Description
TRUEevaluated 74 times by 2 tests
Evaluated by:
  • tst_QDateTime
  • tst_QNetworkDiskCache
FALSEevaluated 158 times by 4 tests
Evaluated by:
  • tst_QDateTime
  • tst_QNetworkDiskCache
  • tst_QSettings
  • tst_selftests - unknown status
) {
74-158
1223 m_spec = Qt::UTC;-
1224 m_offsetFromUtc = 0;-
1225 }
executed 74 times by 2 tests: end of block
Executed by:
  • tst_QDateTime
  • tst_QNetworkDiskCache
else {
74
1226 m_spec = Qt::OffsetFromUTC;-
1227 m_offsetFromUtc = offsetSeconds;-
1228 }
executed 158 times by 4 tests: end of block
Executed by:
  • tst_QDateTime
  • tst_QNetworkDiskCache
  • tst_QSettings
  • tst_selftests - unknown status
158
1229 break;
executed 232 times by 4 tests: break;
Executed by:
  • tst_QDateTime
  • tst_QNetworkDiskCache
  • tst_QSettings
  • tst_selftests - unknown status
232
1230 case
never executed: case Qt::TimeZone:
Qt::TimeZone:
never executed: case Qt::TimeZone:
0
1231-
1232 m_spec = Qt::LocalTime;-
1233 m_offsetFromUtc = 0;-
1234 break;
never executed: break;
0
1235 case
executed 60671 times by 27 tests: case Qt::UTC:
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QDBusMarshall
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QHttpNetworkConnection
  • tst_QItemModel
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QPrinter
  • tst_QSslCertificate
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTimeZone
  • tst_QVariant
  • tst_QXmlInputSource
  • ...
Qt::UTC:
executed 60671 times by 27 tests: case Qt::UTC:
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QDBusMarshall
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QHttpNetworkConnection
  • tst_QItemModel
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QPrinter
  • tst_QSslCertificate
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTimeZone
  • tst_QVariant
  • tst_QXmlInputSource
  • ...
60671
1236 case
executed 6970249 times by 102 tests: case Qt::LocalTime:
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
Qt::LocalTime:
executed 6970249 times by 102 tests: case Qt::LocalTime:
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
6970249
1237 m_spec = spec;-
1238 m_offsetFromUtc = 0;-
1239 break;
executed 7029386 times by 108 tests: break;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • ...
7029386
1240 }-
1241}
executed 7030619 times by 108 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • ...
7030619
1242-
1243void QDateTimePrivate::setDateTime(const QDate &date, const QTime &time)-
1244{-
1245-
1246 QTime useTime = time;-
1247 if (!useTime.isValid()
!useTime.isValid()Description
TRUEevaluated 1616 times by 14 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QStyleSheetStyle
  • tst_QTimeZone
  • tst_QVariant
FALSEevaluated 7021350 times by 106 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • ...
&& date.isValid()
date.isValid()Description
TRUEevaluated 1320 times by 6 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QStyleSheetStyle
  • tst_QTimeZone
FALSEevaluated 296 times by 9 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDateTime
  • tst_QFtp
  • tst_QMetaType
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QVariant
)
296-7021350
1248 useTime = QTime::fromMSecsSinceStartOfDay(0);
executed 1320 times by 6 tests: useTime = QTime::fromMSecsSinceStartOfDay(0);
Executed by:
  • tst_QAccessibility
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QStyleSheetStyle
  • tst_QTimeZone
1320
1249-
1250 StatusFlags newStatus;-
1251-
1252-
1253 qint64 days = 0;-
1254 if (date.isValid()
date.isValid()Description
TRUEevaluated 7025544 times by 106 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • ...
FALSEevaluated 340 times by 10 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QMetaType
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QVariant
) {
340-7025544
1255 days = date.toJulianDay() - JULIAN_DAY_FOR_EPOCH;-
1256 newStatus = ValidDate;-
1257 }
executed 7025544 times by 106 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • ...
else if (date.isNull()
date.isNull()Description
TRUEevaluated 340 times by 10 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QMetaType
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QVariant
FALSEnever evaluated
) {
0-7025544
1258 newStatus = NullDate;-
1259 }
executed 340 times by 10 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QMetaType
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QVariant
340
1260-
1261-
1262 int ds = 0;-
1263 if (useTime.isValid()
useTime.isValid()Description
TRUEevaluated 7025588 times by 106 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • ...
FALSEevaluated 296 times by 9 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDateTime
  • tst_QFtp
  • tst_QMetaType
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QVariant
) {
296-7025588
1264 ds = useTime.msecsSinceStartOfDay();-
1265 newStatus |= ValidTime;-
1266 }
executed 7025588 times by 106 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • ...
else if (time.isNull()
time.isNull()Description
TRUEevaluated 296 times by 9 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDateTime
  • tst_QFtp
  • tst_QMetaType
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QVariant
FALSEnever evaluated
) {
0-7025588
1267 newStatus |= NullTime;-
1268 }
executed 296 times by 9 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDateTime
  • tst_QFtp
  • tst_QMetaType
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QVariant
296
1269-
1270-
1271 m_msecs = (days * MSECS_PER_DAY) + ds;-
1272 m_status = newStatus;-
1273-
1274-
1275 checkValidDateTime();-
1276}
executed 7024909 times by 106 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • ...
7024909
1277-
1278QPair<QDate, QTime> QDateTimePrivate::getDateTime() const-
1279{-
1280 QPair<QDate, QTime> result;-
1281 msecsToTime(m_msecs, &result.first, &result.second);-
1282-
1283 if (isNullDate()
isNullDate()Description
TRUEevaluated 122 times by 5 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QMetaType
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QVariant
FALSEevaluated 7294 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QSettings
  • tst_QSqlTableModel
  • tst_QVariant
  • tst_qmakelib
)
122-7294
1284 result.first = QDate();
executed 122 times by 5 tests: result.first = QDate();
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QMetaType
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QVariant
122
1285-
1286 if (isNullTime()
isNullTime()Description
TRUEevaluated 122 times by 5 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QMetaType
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QVariant
FALSEevaluated 7294 times by 13 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QSettings
  • tst_QSqlTableModel
  • tst_QVariant
  • tst_qmakelib
)
122-7294
1287 result.second = QTime();
executed 122 times by 5 tests: result.second = QTime();
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QMetaType
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QVariant
122
1288-
1289 return
executed 7416 times by 14 tests: return result;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QSettings
  • tst_QSqlTableModel
  • tst_QVariant
  • tst_qmakelib
result;
executed 7416 times by 14 tests: return result;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QSettings
  • tst_QSqlTableModel
  • tst_QVariant
  • tst_qmakelib
7416
1290}-
1291-
1292-
1293void QDateTimePrivate::setDaylightStatus(QDateTimePrivate::DaylightStatus status)-
1294{-
1295 if (status == DaylightTime
status == DaylightTimeDescription
TRUEevaluated 6952454 times by 94 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • ...
FALSEevaluated 775 times by 28 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QNetworkCookieJar
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QSystemTrayIcon
  • tst_QTextEdit
  • ...
) {
775-6952454
1296 m_status = m_status & ~SetToStandardTime;-
1297 m_status = m_status | SetToDaylightTime;-
1298 }
executed 6949731 times by 94 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • ...
else if (status == StandardTime
status == StandardTimeDescription
TRUEevaluated 775 times by 28 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QNetworkCookieJar
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QSystemTrayIcon
  • tst_QTextEdit
  • ...
FALSEnever evaluated
) {
0-6949731
1299 m_status = m_status & ~SetToDaylightTime;-
1300 m_status = m_status | SetToStandardTime;-
1301 }
executed 775 times by 28 tests: end of block
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QNetworkCookieJar
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QSystemTrayIcon
  • tst_QTextEdit
  • ...
else {
775
1302 clearSetToDaylightStatus();-
1303 }
never executed: end of block
0
1304}-
1305-
1306-
1307QDateTimePrivate::DaylightStatus QDateTimePrivate::daylightStatus() const-
1308{-
1309 if ((
(m_status & Se...ToDaylightTimeDescription
TRUEevaluated 6950825 times by 94 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • ...
FALSEevaluated 6982577 times by 102 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
m_status & SetToDaylightTime) == SetToDaylightTime
(m_status & Se...ToDaylightTimeDescription
TRUEevaluated 6950825 times by 94 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • ...
FALSEevaluated 6982577 times by 102 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
)
6950825-6982577
1310 return
executed 6953018 times by 94 tests: return DaylightTime;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • ...
DaylightTime;
executed 6953018 times by 94 tests: return DaylightTime;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • ...
6953018
1311 if ((
(m_status & Se...ToStandardTimeDescription
TRUEevaluated 1597 times by 28 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QNetworkCookieJar
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QSystemTrayIcon
  • tst_QTextEdit
  • ...
FALSEevaluated 6980347 times by 102 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
m_status & SetToStandardTime) == SetToStandardTime
(m_status & Se...ToStandardTimeDescription
TRUEevaluated 1597 times by 28 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QNetworkCookieJar
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QSystemTrayIcon
  • tst_QTextEdit
  • ...
FALSEevaluated 6980347 times by 102 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
)
1597-6980347
1312 return
executed 1597 times by 28 tests: return StandardTime;
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QNetworkCookieJar
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QSystemTrayIcon
  • tst_QTextEdit
  • ...
StandardTime;
executed 1597 times by 28 tests: return StandardTime;
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QNetworkCookieJar
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QSystemTrayIcon
  • tst_QTextEdit
  • ...
1597
1313 return
executed 6979957 times by 102 tests: return UnknownDaylightTime;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
UnknownDaylightTime;
executed 6979957 times by 102 tests: return UnknownDaylightTime;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
6979957
1314}-
1315-
1316qint64 QDateTimePrivate::toMSecsSinceEpoch() const-
1317{-
1318 switch (m_spec) {-
1319 case
executed 191 times by 3 tests: case Qt::OffsetFromUTC:
Executed by:
  • tst_QDateTime
  • tst_QSettings
  • tst_selftests - unknown status
Qt::OffsetFromUTC:
executed 191 times by 3 tests: case Qt::OffsetFromUTC:
Executed by:
  • tst_QDateTime
  • tst_QSettings
  • tst_selftests - unknown status
191
1320 case
executed 134509 times by 23 tests: case Qt::UTC:
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QDBusMarshall
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QHttpNetworkConnection
  • tst_QItemModel
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QSslCertificate
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTimeZone
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_selftests - unknown status
Qt::UTC:
executed 134509 times by 23 tests: case Qt::UTC:
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QDBusMarshall
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QHttpNetworkConnection
  • tst_QItemModel
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QSslCertificate
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTimeZone
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_selftests - unknown status
134509
1321 return
executed 134700 times by 24 tests: return (m_msecs - (m_offsetFromUtc * 1000));
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QDBusMarshall
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QHttpNetworkConnection
  • tst_QItemModel
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QSettings
  • tst_QSslCertificate
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTimeZone
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_selftests - unknown status
(m_msecs - (m_offsetFromUtc * 1000));
executed 134700 times by 24 tests: return (m_msecs - (m_offsetFromUtc * 1000));
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QDBusMarshall
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QHttpNetworkConnection
  • tst_QItemModel
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QSettings
  • tst_QSslCertificate
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTimeZone
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_selftests - unknown status
134700
1322-
1323 case
executed 3536 times by 26 tests: case Qt::LocalTime:
Executed by:
  • tst_NetworkSelfTest
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QDBusAbstractAdaptor
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QFrame
  • tst_QFtp
  • tst_QIcon
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPixmap
  • tst_QPixmapFilter
  • tst_QSqlQuery
  • tst_QSqlTableModel
  • tst_QSslCertificate
  • tst_QStyle
  • tst_QStyleSheetStyle
  • ...
Qt::LocalTime:
executed 3536 times by 26 tests: case Qt::LocalTime:
Executed by:
  • tst_NetworkSelfTest
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QDBusAbstractAdaptor
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QFrame
  • tst_QFtp
  • tst_QIcon
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPixmap
  • tst_QPixmapFilter
  • tst_QSqlQuery
  • tst_QSqlTableModel
  • tst_QSslCertificate
  • tst_QStyle
  • tst_QStyleSheetStyle
  • ...
{
3536
1324-
1325 DaylightStatus status = daylightStatus();-
1326 return
executed 3536 times by 26 tests: return localMSecsToEpochMSecs(m_msecs, &status);
Executed by:
  • tst_NetworkSelfTest
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QDBusAbstractAdaptor
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QFrame
  • tst_QFtp
  • tst_QIcon
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPixmap
  • tst_QPixmapFilter
  • tst_QSqlQuery
  • tst_QSqlTableModel
  • tst_QSslCertificate
  • tst_QStyle
  • tst_QStyleSheetStyle
  • ...
localMSecsToEpochMSecs(m_msecs, &status);
executed 3536 times by 26 tests: return localMSecsToEpochMSecs(m_msecs, &status);
Executed by:
  • tst_NetworkSelfTest
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QDBusAbstractAdaptor
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QFrame
  • tst_QFtp
  • tst_QIcon
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QPixmap
  • tst_QPixmapFilter
  • tst_QSqlQuery
  • tst_QSqlTableModel
  • tst_QSslCertificate
  • tst_QStyle
  • tst_QStyleSheetStyle
  • ...
3536
1327 }-
1328-
1329 case
executed 490 times by 2 tests: case Qt::TimeZone:
Executed by:
  • tst_QDateTime
  • tst_QTimeZone
Qt::TimeZone:
executed 490 times by 2 tests: case Qt::TimeZone:
Executed by:
  • tst_QDateTime
  • tst_QTimeZone
490
1330-
1331-
1332-
1333 return
executed 490 times by 2 tests: return zoneMSecsToEpochMSecs(m_msecs, m_timeZone);
Executed by:
  • tst_QDateTime
  • tst_QTimeZone
zoneMSecsToEpochMSecs(m_msecs, m_timeZone);
executed 490 times by 2 tests: return zoneMSecsToEpochMSecs(m_msecs, m_timeZone);
Executed by:
  • tst_QDateTime
  • tst_QTimeZone
490
1334-
1335 }-
1336 do { ((!(false)) ? qt_assert_x("Q_UNREACHABLE()", "Q_UNREACHABLE was reached",__FILE__,2736) : qt_noop()); __builtin_unreachable(); } while (0);-
1337 return
never executed: return 0;
0;
never executed: return 0;
0
1338}-
1339-
1340-
1341void QDateTimePrivate::checkValidDateTime()-
1342{-
1343 switch (m_spec) {-
1344 case
executed 204 times by 4 tests: case Qt::OffsetFromUTC:
Executed by:
  • tst_QDateTime
  • tst_QNetworkDiskCache
  • tst_QSettings
  • tst_selftests - unknown status
Qt::OffsetFromUTC:
executed 204 times by 4 tests: case Qt::OffsetFromUTC:
Executed by:
  • tst_QDateTime
  • tst_QNetworkDiskCache
  • tst_QSettings
  • tst_selftests - unknown status
204
1345 case
executed 49310 times by 24 tests: case Qt::UTC:
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QDBusMarshall
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QHttpNetworkConnection
  • tst_QItemModel
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QSslCertificate
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTimeZone
  • tst_QVariant
  • tst_Spdy
  • tst_selftests - unknown status
Qt::UTC:
executed 49310 times by 24 tests: case Qt::UTC:
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QDBusMarshall
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QHttpNetworkConnection
  • tst_QItemModel
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QSslCertificate
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTimeZone
  • tst_QVariant
  • tst_Spdy
  • tst_selftests - unknown status
49310
1346-
1347 if (isValidDate()
isValidDate()Description
TRUEevaluated 48991 times by 24 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QDBusMarshall
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QHttpNetworkConnection
  • tst_QItemModel
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QSettings
  • tst_QSslCertificate
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTimeZone
  • tst_Spdy
  • tst_selftests - unknown status
FALSEevaluated 523 times by 6 tests
Evaluated by:
  • tst_QDateTime
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QVariant
&& isValidTime()
isValidTime()Description
TRUEevaluated 48991 times by 24 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QDBusMarshall
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QHttpNetworkConnection
  • tst_QItemModel
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QSettings
  • tst_QSslCertificate
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTimeZone
  • tst_Spdy
  • tst_selftests - unknown status
FALSEnever evaluated
)
0-48991
1348 setValidDateTime();
executed 48991 times by 24 tests: setValidDateTime();
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QDBusMarshall
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QHttpNetworkConnection
  • tst_QItemModel
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QSettings
  • tst_QSslCertificate
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTimeZone
  • tst_Spdy
  • tst_selftests - unknown status
48991
1349 else-
1350 clearValidDateTime();
executed 523 times by 6 tests: clearValidDateTime();
Executed by:
  • tst_QDateTime
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QVariant
523
1351 break;
executed 49514 times by 25 tests: break;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QDBusMarshall
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QHttpNetworkConnection
  • tst_QItemModel
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QSettings
  • tst_QSslCertificate
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTimeZone
  • tst_QVariant
  • tst_Spdy
  • tst_selftests - unknown status
49514
1352 case
executed 22 times by 1 test: case Qt::TimeZone:
Executed by:
  • tst_QDateTime
Qt::TimeZone:
executed 22 times by 1 test: case Qt::TimeZone:
Executed by:
  • tst_QDateTime
22
1353 case
executed 6974689 times by 102 tests: case Qt::LocalTime:
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
Qt::LocalTime:
executed 6974689 times by 102 tests: case Qt::LocalTime:
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
6974689
1354-
1355-
1356 refreshDateTime();-
1357 break;
executed 6977946 times by 102 tests: break;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
6977946
1358 }-
1359}
executed 7027460 times by 106 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • ...
7027460
1360-
1361-
1362void QDateTimePrivate::refreshDateTime()-
1363{-
1364 switch (m_spec) {-
1365 case
never executed: case Qt::OffsetFromUTC:
Qt::OffsetFromUTC:
never executed: case Qt::OffsetFromUTC:
0
1366 case
never executed: case Qt::UTC:
Qt::UTC:
never executed: case Qt::UTC:
0
1367-
1368 return;
never executed: return;
0
1369 case
executed 525 times by 2 tests: case Qt::TimeZone:
Executed by:
  • tst_QDateTime
  • tst_QTimeZone
Qt::TimeZone:
executed 525 times by 2 tests: case Qt::TimeZone:
Executed by:
  • tst_QDateTime
  • tst_QTimeZone
525
1370 case
executed 13931153 times by 102 tests: case Qt::LocalTime:
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
Qt::LocalTime:
executed 13931153 times by 102 tests: case Qt::LocalTime:
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
13931153
1371 break;
executed 13931678 times by 102 tests: break;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
13931678
1372 }-
1373-
1374-
1375 if (!isValidDate()
!isValidDate()Description
TRUEevaluated 366 times by 10 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QMetaType
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QVariant
FALSEevaluated 13931312 times by 102 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
|| !isValidTime()
!isValidTime()Description
TRUEnever evaluated
FALSEevaluated 13931312 times by 102 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
) {
0-13931312
1376 clearValidDateTime();-
1377 m_offsetFromUtc = 0;-
1378 return;
executed 366 times by 10 tests: return;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QMetaType
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QVariant
366
1379 }-
1380-
1381-
1382-
1383 if (m_spec == Qt::TimeZone
m_spec == Qt::TimeZoneDescription
TRUEevaluated 504 times by 2 tests
Evaluated by:
  • tst_QDateTime
  • tst_QTimeZone
FALSEevaluated 13930808 times by 102 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
&& !m_timeZone.isValid()
!m_timeZone.isValid()Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 503 times by 2 tests
Evaluated by:
  • tst_QDateTime
  • tst_QTimeZone
) {
1-13930808
1384 clearValidDateTime();-
1385 m_offsetFromUtc = 0;-
1386 return;
executed 1 time by 1 test: return;
Executed by:
  • tst_QDateTime
1
1387 }-
1388-
1389-
1390-
1391-
1392-
1393 QDate testDate;-
1394 QTime testTime;-
1395 qint64 epochMSecs = 0;-
1396 if (m_spec == Qt::LocalTime
m_spec == Qt::LocalTimeDescription
TRUEevaluated 13930808 times by 102 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
FALSEevaluated 503 times by 2 tests
Evaluated by:
  • tst_QDateTime
  • tst_QTimeZone
) {
503-13930808
1397 DaylightStatus status = daylightStatus();-
1398 epochMSecs = localMSecsToEpochMSecs(m_msecs, &status, &testDate, &testTime);-
1399-
1400 }
executed 13930808 times by 102 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
else {
13930808
1401 epochMSecs = zoneMSecsToEpochMSecs(m_msecs, m_timeZone, &testDate, &testTime);-
1402-
1403 }
executed 503 times by 2 tests: end of block
Executed by:
  • tst_QDateTime
  • tst_QTimeZone
503
1404 if (timeToMSecs(testDate, testTime) == m_msecs
timeToMSecs(te...me) == m_msecsDescription
TRUEevaluated 13931307 times by 102 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_QDateTime
) {
4-13931307
1405 setValidDateTime();-
1406-
1407 m_offsetFromUtc = (m_msecs - epochMSecs) / 1000;-
1408 }
executed 13931307 times by 102 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • ...
else {
13931307
1409 clearValidDateTime();-
1410 m_offsetFromUtc = 0;-
1411 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_QDateTime
4
1412}-
1413-
1414-
1415-
1416qint64 QDateTimePrivate::zoneMSecsToEpochMSecs(qint64 zoneMSecs, const QTimeZone &zone,-
1417 QDate *localDate, QTime *localTime)-
1418{-
1419-
1420 QTimeZonePrivate::Data data = zone.d->dataForLocalTime(zoneMSecs);-
1421-
1422-
1423 if (data.atMSecsSinceEpoch >= 0
data.atMSecsSinceEpoch >= 0Description
TRUEevaluated 988 times by 2 tests
Evaluated by:
  • tst_QDateTime
  • tst_QTimeZone
FALSEevaluated 5 times by 1 test
Evaluated by:
  • tst_QDateTime
) {
5-988
1424 msecsToTime(data.atMSecsSinceEpoch + (data.offsetFromUtc * 1000), localDate, localTime);-
1425 return
executed 988 times by 2 tests: return data.atMSecsSinceEpoch;
Executed by:
  • tst_QDateTime
  • tst_QTimeZone
data.atMSecsSinceEpoch;
executed 988 times by 2 tests: return data.atMSecsSinceEpoch;
Executed by:
  • tst_QDateTime
  • tst_QTimeZone
988
1426 } else {-
1427 msecsToTime(zoneMSecs, localDate, localTime);-
1428 return
executed 5 times by 1 test: return zoneMSecs - (data.standardTimeOffset * 1000);
Executed by:
  • tst_QDateTime
zoneMSecs - (data.standardTimeOffset * 1000);
executed 5 times by 1 test: return zoneMSecs - (data.standardTimeOffset * 1000);
Executed by:
  • tst_QDateTime
5
1429 }-
1430}-
1431QDateTime::QDateTime()-
1432 : d(*defaultDateTimePrivate())-
1433{-
1434}
executed 7103614 times by 127 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDBusMetaType
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • ...
7103614
1435-
1436-
1437-
1438-
1439-
1440-
1441-
1442QDateTime::QDateTime(const QDate &date)-
1443 : d(new QDateTimePrivate(date, QTime(0, 0, 0), Qt::LocalTime, 0))-
1444{-
1445}
executed 6 times by 3 tests: end of block
Executed by:
  • tst_QDateTime
  • tst_QNetworkRequest
  • tst_QVariant
6
1446QDateTime::QDateTime(const QDate &date, const QTime &time, Qt::TimeSpec spec)-
1447 : d(new QDateTimePrivate(date, time, spec, 0))-
1448{-
1449}
executed 65590 times by 34 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QNoDebug
  • tst_QSqlQuery
  • tst_QSslCertificate
  • ...
65590
1450QDateTime::QDateTime(const QDate &date, const QTime &time, Qt::TimeSpec spec, int offsetSeconds)-
1451 : d(new QDateTimePrivate(date, time, spec, offsetSeconds))-
1452{-
1453}
executed 272 times by 7 tests: end of block
Executed by:
  • tst_QDateTime
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QSqlQuery
  • tst_QVariant
  • tst_selftests - unknown status
272
1454QDateTime::QDateTime(const QDate &date, const QTime &time, const QTimeZone &timeZone)-
1455 : d(new QDateTimePrivate(date, time, timeZone))-
1456{-
1457}
executed 22 times by 1 test: end of block
Executed by:
  • tst_QDateTime
22
1458-
1459-
1460-
1461-
1462-
1463-
1464QDateTime::QDateTime(const QDateTime &other)-
1465 : d(other.d)-
1466{-
1467}
executed 479775 times by 63 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QButtonGroup
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGroupBox
  • tst_QHttpNetworkConnection
  • tst_QIcon
  • ...
479775
1468-
1469-
1470-
1471-
1472QDateTime::~QDateTime()-
1473{-
1474}-
1475-
1476-
1477-
1478-
1479-
1480-
1481QDateTime &QDateTime::operator=(const QDateTime &other)-
1482{-
1483 d = other.d;-
1484 return
executed 1834 times by 12 tests: return *this;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDBusAbstractAdaptor
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSslCertificate
  • tst_QSslSocket
*this;
executed 1834 times by 12 tests: return *this;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDBusAbstractAdaptor
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSslCertificate
  • tst_QSslSocket
1834
1485}-
1486bool QDateTime::isNull() const-
1487{-
1488 return
executed 4899 times by 10 tests: return d->isNullDate() && d->isNullTime();
Executed by:
  • tst_QAccessibility
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QSqlQuery
  • tst_QStyleSheetStyle
  • tst_QVariant
  • tst_QXmlStream
d->isNullDate() && d->isNullTime();
executed 4899 times by 10 tests: return d->isNullDate() && d->isNullTime();
Executed by:
  • tst_QAccessibility
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QSqlQuery
  • tst_QStyleSheetStyle
  • tst_QVariant
  • tst_QXmlStream
4899
1489}-
1490bool QDateTime::isValid() const-
1491{-
1492 return
executed 110720 times by 76 tests: return (d->isValidDateTime());
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QFrame
  • tst_QFtp
  • ...
(d->isValidDateTime());
executed 110720 times by 76 tests: return (d->isValidDateTime());
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QFrame
  • tst_QFtp
  • ...
110720
1493}-
1494-
1495-
1496-
1497-
1498-
1499-
1500-
1501QDate QDateTime::date() const-
1502{-
1503 if (d->isNullDate()
d->isNullDate()Description
TRUEevaluated 71 times by 6 tests
Evaluated by:
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDBusMetaType
  • tst_QDateTime
  • tst_qdbuscpp2xml
  • tst_qdbuscpp2xml - unknown status
FALSEevaluated 70844 times by 43 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • ...
)
71-70844
1504 return
executed 71 times by 6 tests: return QDate();
Executed by:
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDBusMetaType
  • tst_QDateTime
  • tst_qdbuscpp2xml
  • tst_qdbuscpp2xml - unknown status
QDate();
executed 71 times by 6 tests: return QDate();
Executed by:
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDBusMetaType
  • tst_QDateTime
  • tst_qdbuscpp2xml
  • tst_qdbuscpp2xml - unknown status
71
1505 QDate dt;-
1506 msecsToTime(d->m_msecs, &dt, 0);-
1507 return
executed 70844 times by 43 tests: return dt;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • ...
dt;
executed 70844 times by 43 tests: return dt;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • ...
70844
1508}-
1509-
1510-
1511-
1512-
1513-
1514-
1515-
1516QTime QDateTime::time() const-
1517{-
1518 if (d->isNullTime()
d->isNullTime()Description
TRUEevaluated 70 times by 6 tests
Evaluated by:
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDBusMetaType
  • tst_QDateTime
  • tst_qdbuscpp2xml
  • tst_qdbuscpp2xml - unknown status
FALSEevaluated 6983912 times by 72 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFtp
  • tst_QFutureWatcher
  • ...
)
70-6983912
1519 return
executed 70 times by 6 tests: return QTime();
Executed by:
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDBusMetaType
  • tst_QDateTime
  • tst_qdbuscpp2xml
  • tst_qdbuscpp2xml - unknown status
QTime();
executed 70 times by 6 tests: return QTime();
Executed by:
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDBusMetaType
  • tst_QDateTime
  • tst_qdbuscpp2xml
  • tst_qdbuscpp2xml - unknown status
70
1520 QTime tm;-
1521 msecsToTime(d->m_msecs, 0, &tm);-
1522 return
executed 6983912 times by 72 tests: return tm;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFtp
  • tst_QFutureWatcher
  • ...
tm;
executed 6983912 times by 72 tests: return tm;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFtp
  • tst_QFutureWatcher
  • ...
6983912
1523}-
1524-
1525-
1526-
1527-
1528-
1529-
1530-
1531Qt::TimeSpec QDateTime::timeSpec() const-
1532{-
1533 return
executed 2071 times by 18 tests: return d->m_spec;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDBusMetaType
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QNoDebug
  • tst_QSettings
  • tst_QVariant
  • tst_qdbuscpp2xml
  • tst_qdbuscpp2xml - unknown status
  • tst_qmakelib
d->m_spec;
executed 2071 times by 18 tests: return d->m_spec;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDBusMetaType
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QNoDebug
  • tst_QSettings
  • tst_QVariant
  • tst_qdbuscpp2xml
  • tst_qdbuscpp2xml - unknown status
  • tst_qmakelib
2071
1534}-
1535QTimeZone QDateTime::timeZone() const-
1536{-
1537 switch (d->m_spec) {-
1538 case
never executed: case Qt::UTC:
Qt::UTC:
never executed: case Qt::UTC:
0
1539 return
never executed: return QTimeZone::utc();
QTimeZone::utc();
never executed: return QTimeZone::utc();
0
1540 case
executed 1 time by 1 test: case Qt::OffsetFromUTC:
Executed by:
  • tst_QDateTime
Qt::OffsetFromUTC:
executed 1 time by 1 test: case Qt::OffsetFromUTC:
Executed by:
  • tst_QDateTime
1
1541 return
executed 1 time by 1 test: return QTimeZone(d->m_offsetFromUtc);
Executed by:
  • tst_QDateTime
QTimeZone(d->m_offsetFromUtc);
executed 1 time by 1 test: return QTimeZone(d->m_offsetFromUtc);
Executed by:
  • tst_QDateTime
1
1542 case
executed 22 times by 1 test: case Qt::TimeZone:
Executed by:
  • tst_QDateTime
Qt::TimeZone:
executed 22 times by 1 test: case Qt::TimeZone:
Executed by:
  • tst_QDateTime
22
1543 ((!(d->m_timeZone.isValid())) ? qt_assert("d->m_timeZone.isValid()",__FILE__,3169) : qt_noop());-
1544 return
executed 22 times by 1 test: return d->m_timeZone;
Executed by:
  • tst_QDateTime
d->m_timeZone;
executed 22 times by 1 test: return d->m_timeZone;
Executed by:
  • tst_QDateTime
22
1545 case
never executed: case Qt::LocalTime:
Qt::LocalTime:
never executed: case Qt::LocalTime:
0
1546 return
never executed: return QTimeZone::systemTimeZone();
QTimeZone::systemTimeZone();
never executed: return QTimeZone::systemTimeZone();
0
1547 }-
1548 return
never executed: return QTimeZone();
QTimeZone();
never executed: return QTimeZone();
0
1549}-
1550int QDateTime::offsetFromUtc() const-
1551{-
1552 return
executed 580 times by 4 tests: return d->m_offsetFromUtc;
Executed by:
  • tst_QDateTime
  • tst_QNetworkDiskCache
  • tst_QSettings
  • tst_QTimeZone
d->m_offsetFromUtc;
executed 580 times by 4 tests: return d->m_offsetFromUtc;
Executed by:
  • tst_QDateTime
  • tst_QNetworkDiskCache
  • tst_QSettings
  • tst_QTimeZone
580
1553}-
1554QString QDateTime::timeZoneAbbreviation() const-
1555{-
1556 switch (d->m_spec) {-
1557 case
executed 982 times by 6 tests: case Qt::UTC:
Executed by:
  • tst_QAsn1Element
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QNetworkReply
  • tst_QSslCertificate
  • tst_selftests - unknown status
Qt::UTC:
executed 982 times by 6 tests: case Qt::UTC:
Executed by:
  • tst_QAsn1Element
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QNetworkReply
  • tst_QSslCertificate
  • tst_selftests - unknown status
982
1558 return
executed 982 times by 6 tests: return QTimeZonePrivate::utcQString();
Executed by:
  • tst_QAsn1Element
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QNetworkReply
  • tst_QSslCertificate
  • tst_selftests - unknown status
QTimeZonePrivate::utcQString();
executed 982 times by 6 tests: return QTimeZonePrivate::utcQString();
Executed by:
  • tst_QAsn1Element
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QNetworkReply
  • tst_QSslCertificate
  • tst_selftests - unknown status
982
1559 case
executed 88 times by 2 tests: case Qt::OffsetFromUTC:
Executed by:
  • tst_QDateTime
  • tst_selftests - unknown status
Qt::OffsetFromUTC:
executed 88 times by 2 tests: case Qt::OffsetFromUTC:
Executed by:
  • tst_QDateTime
  • tst_selftests - unknown status
88
1560 return
executed 88 times by 2 tests: return QTimeZonePrivate::utcQString() + toOffsetString(Qt::ISODate, d->m_offsetFromUtc);
Executed by:
  • tst_QDateTime
  • tst_selftests - unknown status
QTimeZonePrivate::utcQString() + toOffsetString(Qt::ISODate, d->m_offsetFromUtc);
executed 88 times by 2 tests: return QTimeZonePrivate::utcQString() + toOffsetString(Qt::ISODate, d->m_offsetFromUtc);
Executed by:
  • tst_QDateTime
  • tst_selftests - unknown status
88
1561 case
executed 467 times by 2 tests: case Qt::TimeZone:
Executed by:
  • tst_QDateTime
  • tst_QTimeZone
Qt::TimeZone:
executed 467 times by 2 tests: case Qt::TimeZone:
Executed by:
  • tst_QDateTime
  • tst_QTimeZone
467
1562-
1563-
1564-
1565 return
executed 467 times by 2 tests: return d->m_timeZone.d->abbreviation(d->toMSecsSinceEpoch());
Executed by:
  • tst_QDateTime
  • tst_QTimeZone
d->m_timeZone.d->abbreviation(d->toMSecsSinceEpoch());
executed 467 times by 2 tests: return d->m_timeZone.d->abbreviation(d->toMSecsSinceEpoch());
Executed by:
  • tst_QDateTime
  • tst_QTimeZone
467
1566-
1567 case
executed 1249 times by 13 tests: case Qt::LocalTime:
Executed by:
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileInfo
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QTime
  • tst_QVariant
Qt::LocalTime:
executed 1249 times by 13 tests: case Qt::LocalTime:
Executed by:
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileInfo
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QTime
  • tst_QVariant
{
1249
1568 QString abbrev;-
1569 QDateTimePrivate::DaylightStatus status = d->daylightStatus();-
1570 localMSecsToEpochMSecs(d->m_msecs, &status, 0, 0, &abbrev);-
1571 return
executed 1249 times by 13 tests: return abbrev;
Executed by:
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileInfo
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QTime
  • tst_QVariant
abbrev;
executed 1249 times by 13 tests: return abbrev;
Executed by:
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileInfo
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QTime
  • tst_QVariant
1249
1572 }-
1573 }-
1574 return
never executed: return QString();
QString();
never executed: return QString();
0
1575}-
1576bool QDateTime::isDaylightTime() const-
1577{-
1578 switch (d->m_spec) {-
1579 case
executed 2 times by 1 test: case Qt::UTC:
Executed by:
  • tst_QDateTime
Qt::UTC:
executed 2 times by 1 test: case Qt::UTC:
Executed by:
  • tst_QDateTime
2
1580 case
executed 2 times by 1 test: case Qt::OffsetFromUTC:
Executed by:
  • tst_QDateTime
Qt::OffsetFromUTC:
executed 2 times by 1 test: case Qt::OffsetFromUTC:
Executed by:
  • tst_QDateTime
2
1581 return
executed 4 times by 1 test: return false;
Executed by:
  • tst_QDateTime
false;
executed 4 times by 1 test: return false;
Executed by:
  • tst_QDateTime
4
1582 case
executed 3 times by 1 test: case Qt::TimeZone:
Executed by:
  • tst_QDateTime
Qt::TimeZone:
executed 3 times by 1 test: case Qt::TimeZone:
Executed by:
  • tst_QDateTime
3
1583-
1584-
1585-
1586 return
executed 3 times by 1 test: return d->m_timeZone.d->isDaylightTime(toMSecsSinceEpoch());
Executed by:
  • tst_QDateTime
d->m_timeZone.d->isDaylightTime(toMSecsSinceEpoch());
executed 3 times by 1 test: return d->m_timeZone.d->isDaylightTime(toMSecsSinceEpoch());
Executed by:
  • tst_QDateTime
3
1587-
1588 case
executed 2 times by 1 test: case Qt::LocalTime:
Executed by:
  • tst_QDateTime
Qt::LocalTime:
executed 2 times by 1 test: case Qt::LocalTime:
Executed by:
  • tst_QDateTime
{
2
1589 QDateTimePrivate::DaylightStatus status = d->daylightStatus();-
1590 if (status == QDateTimePrivate::UnknownDaylightTime
status == QDat...wnDaylightTimeDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QDateTime
FALSEnever evaluated
)
0-2
1591 localMSecsToEpochMSecs(d->m_msecs, &status);
executed 2 times by 1 test: localMSecsToEpochMSecs(d->m_msecs, &status);
Executed by:
  • tst_QDateTime
2
1592 return
executed 2 times by 1 test: return (status == QDateTimePrivate::DaylightTime);
Executed by:
  • tst_QDateTime
(status == QDateTimePrivate::DaylightTime);
executed 2 times by 1 test: return (status == QDateTimePrivate::DaylightTime);
Executed by:
  • tst_QDateTime
2
1593 }-
1594 }-
1595 return
never executed: return false;
false;
never executed: return false;
0
1596}-
1597void QDateTime::setDate(const QDate &date)-
1598{-
1599 d->setDateTime(date, time());-
1600}
executed 133 times by 2 tests: end of block
Executed by:
  • tst_QDateTime
  • tst_QFtp
133
1601void QDateTime::setTime(const QTime &time)-
1602{-
1603 d->setDateTime(date(), time);-
1604}
executed 134 times by 2 tests: end of block
Executed by:
  • tst_QDateTime
  • tst_QNetworkCookie
134
1605void QDateTime::setTimeSpec(Qt::TimeSpec spec)-
1606{-
1607 QDateTimePrivate *d = this->d.data();-
1608 d->setTimeSpec(spec, 0);-
1609 d->checkValidDateTime();-
1610}
executed 1541 times by 12 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QItemModel
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QVariant
  • tst_Spdy
1541
1611void QDateTime::setOffsetFromUtc(int offsetSeconds)-
1612{-
1613 QDateTimePrivate *d = this->d.data();-
1614 d->setTimeSpec(Qt::OffsetFromUTC, offsetSeconds);-
1615 d->checkValidDateTime();-
1616}
executed 35 times by 2 tests: end of block
Executed by:
  • tst_QDateTime
  • tst_QSettings
35
1617void QDateTime::setTimeZone(const QTimeZone &toZone)-
1618{-
1619 QDateTimePrivate *d = this->d.data();-
1620 d->m_spec = Qt::TimeZone;-
1621 d->m_offsetFromUtc = 0;-
1622 d->m_timeZone = toZone;-
1623 d->refreshDateTime();-
1624}
executed 483 times by 2 tests: end of block
Executed by:
  • tst_QDateTime
  • tst_QTimeZone
483
1625qint64 QDateTime::toMSecsSinceEpoch() const-
1626{-
1627 return
executed 134960 times by 21 tests: return d->toMSecsSinceEpoch();
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QSettings
  • tst_QSslCertificate
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QStyleSheetStyle
  • tst_QTimeZone
  • tst_selftests - unknown status
d->toMSecsSinceEpoch();
executed 134960 times by 21 tests: return d->toMSecsSinceEpoch();
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QSettings
  • tst_QSslCertificate
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QStyleSheetStyle
  • tst_QTimeZone
  • tst_selftests - unknown status
134960
1628}-
1629uint QDateTime::toTime_t() const-
1630{-
1631 if (!isValid()
!isValid()Description
TRUEevaluated 964 times by 28 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTime
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGroupBox
  • tst_QIcon
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMdiSubWindow
  • tst_QMessageBox
  • tst_QPixmap
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QTextBrowser
  • ...
FALSEevaluated 181 times by 14 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAuthenticator
  • tst_QComboBox
  • tst_QDBusAbstractAdaptor
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFrame
  • tst_QIcon
  • tst_QLabel
  • tst_QNetworkDiskCache
  • tst_QPixmap
  • tst_QPixmapFilter
  • tst_QStyle
)
181-964
1632 return
executed 964 times by 28 tests: return uint(-1);
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTime
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGroupBox
  • tst_QIcon
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMdiSubWindow
  • tst_QMessageBox
  • tst_QPixmap
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QTextBrowser
  • ...
uint(-1);
executed 964 times by 28 tests: return uint(-1);
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QButtonGroup
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTime
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGroupBox
  • tst_QIcon
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMdiSubWindow
  • tst_QMessageBox
  • tst_QPixmap
  • tst_QPrinter
  • tst_QSidebar
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QTextBrowser
  • ...
964
1633 qint64 retval = d->toMSecsSinceEpoch() / 1000;-
1634 if (quint64(retval) >= static_cast<unsigned long long>(0xFFFFFFFFULL)
quint64(retval...0xFFFFFFFFULL)Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 178 times by 14 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAuthenticator
  • tst_QComboBox
  • tst_QDBusAbstractAdaptor
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFrame
  • tst_QIcon
  • tst_QLabel
  • tst_QNetworkDiskCache
  • tst_QPixmap
  • tst_QPixmapFilter
  • tst_QStyle
)
3-178
1635 return
executed 3 times by 1 test: return uint(-1);
Executed by:
  • tst_QDateTime
uint(-1);
executed 3 times by 1 test: return uint(-1);
Executed by:
  • tst_QDateTime
3
1636 return
executed 178 times by 14 tests: return uint(retval);
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAuthenticator
  • tst_QComboBox
  • tst_QDBusAbstractAdaptor
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFrame
  • tst_QIcon
  • tst_QLabel
  • tst_QNetworkDiskCache
  • tst_QPixmap
  • tst_QPixmapFilter
  • tst_QStyle
uint(retval);
executed 178 times by 14 tests: return uint(retval);
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QAuthenticator
  • tst_QComboBox
  • tst_QDBusAbstractAdaptor
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFrame
  • tst_QIcon
  • tst_QLabel
  • tst_QNetworkDiskCache
  • tst_QPixmap
  • tst_QPixmapFilter
  • tst_QStyle
178
1637}-
1638void QDateTime::setMSecsSinceEpoch(qint64 msecs)-
1639{-
1640 QDateTimePrivate *d = this->d.data();-
1641-
1642 d->m_status = 0;-
1643 switch (d->m_spec) {-
1644 case
executed 11649 times by 20 tests: case Qt::UTC:
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QPrinter
  • tst_QSslCertificate
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTimeZone
  • tst_QXmlInputSource
  • tst_Spdy
Qt::UTC:
executed 11649 times by 20 tests: case Qt::UTC:
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QPrinter
  • tst_QSslCertificate
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTimeZone
  • tst_QXmlInputSource
  • tst_Spdy
11649
1645 d->m_msecs = msecs;-
1646 d->m_status = d->m_status-
1647 | QDateTimePrivate::ValidDate-
1648 | QDateTimePrivate::ValidTime-
1649 | QDateTimePrivate::ValidDateTime;-
1650 break;
executed 11649 times by 20 tests: break;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QPrinter
  • tst_QSslCertificate
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTimeZone
  • tst_QXmlInputSource
  • tst_Spdy
11649
1651 case
executed 17 times by 2 tests: case Qt::OffsetFromUTC:
Executed by:
  • tst_QDateTime
  • tst_QNetworkDiskCache
Qt::OffsetFromUTC:
executed 17 times by 2 tests: case Qt::OffsetFromUTC:
Executed by:
  • tst_QDateTime
  • tst_QNetworkDiskCache
17
1652 d->m_msecs = msecs + (d->m_offsetFromUtc * 1000);-
1653 d->m_status = d->m_status-
1654 | QDateTimePrivate::ValidDate-
1655 | QDateTimePrivate::ValidTime-
1656 | QDateTimePrivate::ValidDateTime;-
1657 break;
executed 17 times by 2 tests: break;
Executed by:
  • tst_QDateTime
  • tst_QNetworkDiskCache
17
1658 case
executed 20 times by 1 test: case Qt::TimeZone:
Executed by:
  • tst_QDateTime
Qt::TimeZone:
executed 20 times by 1 test: case Qt::TimeZone:
Executed by:
  • tst_QDateTime
20
1659-
1660-
1661-
1662 if (msecs >= 0
msecs >= 0Description
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_QDateTime
)
4-16
1663 d->m_offsetFromUtc = d->m_timeZone.d->offsetFromUtc(msecs);
executed 16 times by 1 test: d->m_offsetFromUtc = d->m_timeZone.d->offsetFromUtc(msecs);
Executed by:
  • tst_QDateTime
16
1664 else-
1665 d->m_offsetFromUtc = d->m_timeZone.d->standardTimeOffset(msecs);
executed 4 times by 1 test: d->m_offsetFromUtc = d->m_timeZone.d->standardTimeOffset(msecs);
Executed by:
  • tst_QDateTime
4
1666 d->m_msecs = msecs + (d->m_offsetFromUtc * 1000);-
1667 d->m_status = d->m_status-
1668 | QDateTimePrivate::ValidDate-
1669 | QDateTimePrivate::ValidTime-
1670 | QDateTimePrivate::ValidDateTime;-
1671 d->refreshDateTime();-
1672-
1673 break;
executed 20 times by 1 test: break;
Executed by:
  • tst_QDateTime
20
1674 case
executed 6953229 times by 95 tests: case Qt::LocalTime:
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • ...
Qt::LocalTime:
executed 6953229 times by 95 tests: case Qt::LocalTime:
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • ...
{
6953229
1675 QDate dt;-
1676 QTime tm;-
1677 QDateTimePrivate::DaylightStatus status;-
1678 epochMSecsToLocalTime(msecs, &dt, &tm, &status);-
1679 d->setDateTime(dt, tm);-
1680 d->setDaylightStatus(status);-
1681 d->refreshDateTime();-
1682 break;
executed 6953229 times by 95 tests: break;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • ...
6953229
1683 }-
1684 }-
1685}
executed 6964915 times by 103 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • ...
6964915
1686void QDateTime::setTime_t(uint secsSince1Jan1970UTC)-
1687{-
1688 setMSecsSinceEpoch((qint64)secsSince1Jan1970UTC * 1000);-
1689}
executed 16 times by 1 test: end of block
Executed by:
  • tst_QDateTime
16
1690QString QDateTime::toString(Qt::DateFormat format) const-
1691{-
1692 QString buf;-
1693 if (!isValid()
!isValid()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 3156 times by 13 tests
Evaluated by:
  • tst_QCompleter
  • tst_QDate
  • tst_QDateTime
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_QNetworkRequest
  • tst_QSqlTableModel
  • tst_QVariant
  • tst_languageChange
  • tst_qmakelib
)
2-3156
1694 return
executed 2 times by 1 test: return buf;
Executed by:
  • tst_QDateTime
buf;
executed 2 times by 1 test: return buf;
Executed by:
  • tst_QDateTime
2
1695-
1696 switch (format) {-
1697 case
executed 2721 times by 8 tests: case Qt::SystemLocaleDate:
Executed by:
  • tst_QCompleter
  • tst_QDateTime
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_languageChange
Qt::SystemLocaleDate:
executed 2721 times by 8 tests: case Qt::SystemLocaleDate:
Executed by:
  • tst_QCompleter
  • tst_QDateTime
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_languageChange
2721
1698 case
executed 1 time by 1 test: case Qt::SystemLocaleShortDate:
Executed by:
  • tst_QDateTime
Qt::SystemLocaleShortDate:
executed 1 time by 1 test: case Qt::SystemLocaleShortDate:
Executed by:
  • tst_QDateTime
1
1699 return
executed 2722 times by 8 tests: return QLocale::system().toString(*this, QLocale::ShortFormat);
Executed by:
  • tst_QCompleter
  • tst_QDateTime
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_languageChange
QLocale::system().toString(*this, QLocale::ShortFormat);
executed 2722 times by 8 tests: return QLocale::system().toString(*this, QLocale::ShortFormat);
Executed by:
  • tst_QCompleter
  • tst_QDateTime
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_languageChange
2722
1700 case
executed 1 time by 1 test: case Qt::SystemLocaleLongDate:
Executed by:
  • tst_QDateTime
Qt::SystemLocaleLongDate:
executed 1 time by 1 test: case Qt::SystemLocaleLongDate:
Executed by:
  • tst_QDateTime
1
1701 return
executed 1 time by 1 test: return QLocale::system().toString(*this, QLocale::LongFormat);
Executed by:
  • tst_QDateTime
QLocale::system().toString(*this, QLocale::LongFormat);
executed 1 time by 1 test: return QLocale::system().toString(*this, QLocale::LongFormat);
Executed by:
  • tst_QDateTime
1
1702 case
executed 1 time by 1 test: case Qt::LocaleDate:
Executed by:
  • tst_QDateTime
Qt::LocaleDate:
executed 1 time by 1 test: case Qt::LocaleDate:
Executed by:
  • tst_QDateTime
1
1703 case
executed 1 time by 1 test: case Qt::DefaultLocaleShortDate:
Executed by:
  • tst_QDateTime
Qt::DefaultLocaleShortDate:
executed 1 time by 1 test: case Qt::DefaultLocaleShortDate:
Executed by:
  • tst_QDateTime
1
1704 return
executed 2 times by 1 test: return QLocale().toString(*this, QLocale::ShortFormat);
Executed by:
  • tst_QDateTime
QLocale().toString(*this, QLocale::ShortFormat);
executed 2 times by 1 test: return QLocale().toString(*this, QLocale::ShortFormat);
Executed by:
  • tst_QDateTime
2
1705 case
executed 1 time by 1 test: case Qt::DefaultLocaleLongDate:
Executed by:
  • tst_QDateTime
Qt::DefaultLocaleLongDate:
executed 1 time by 1 test: case Qt::DefaultLocaleLongDate:
Executed by:
  • tst_QDateTime
1
1706 return
executed 1 time by 1 test: return QLocale().toString(*this, QLocale::LongFormat);
Executed by:
  • tst_QDateTime
QLocale().toString(*this, QLocale::LongFormat);
executed 1 time by 1 test: return QLocale().toString(*this, QLocale::LongFormat);
Executed by:
  • tst_QDateTime
1
1707 case
executed 5 times by 1 test: case Qt::RFC2822Date:
Executed by:
  • tst_QDateTime
Qt::RFC2822Date:
executed 5 times by 1 test: case Qt::RFC2822Date:
Executed by:
  • tst_QDateTime
{
5
1708 buf = QLocale::c().toString(*this, ([]() -> QString { enum { Size = sizeof(u"" "dd MMM yyyy hh:mm:ss ")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "dd MMM yyyy hh:mm:ss " }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 5 times by 1 test: return qstring_literal_temp;
Executed by:
  • tst_QDateTime
qstring_literal_temp;
executed 5 times by 1 test: return qstring_literal_temp;
Executed by:
  • tst_QDateTime
}()));
5
1709 buf += toOffsetString(Qt::TextDate, d->m_offsetFromUtc);-
1710 return
executed 5 times by 1 test: return buf;
Executed by:
  • tst_QDateTime
buf;
executed 5 times by 1 test: return buf;
Executed by:
  • tst_QDateTime
5
1711 }-
1712 default
never executed: default:
:
never executed: default:
0
1713-
1714 case
executed 399 times by 3 tests: case Qt::TextDate:
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_qmakelib
Qt::TextDate:
executed 399 times by 3 tests: case Qt::TextDate:
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_qmakelib
{
399
1715 const QPair<QDate, QTime> p = d->getDateTime();-
1716 const QDate &dt = p.first;-
1717 const QTime &tm = p.second;-
1718-
1719 buf = QString::fromLatin1("%1 %2 %3 %4 %5").arg(dt.shortDayName(dt.dayOfWeek()))-
1720 .arg(dt.shortMonthName(dt.month()))-
1721 .arg(dt.day())-
1722 .arg(tm.toString(Qt::TextDate))-
1723 .arg(dt.year());-
1724 if (timeSpec() != Qt::LocalTime
timeSpec() != Qt::LocalTimeDescription
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 396 times by 3 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_qmakelib
) {
3-396
1725 buf += QLatin1String(" GMT");-
1726 if (d->m_spec == Qt::OffsetFromUTC
d->m_spec == Qt::OffsetFromUTCDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDateTime
)
1-2
1727 buf += toOffsetString(Qt::TextDate, d->m_offsetFromUtc);
executed 2 times by 1 test: buf += toOffsetString(Qt::TextDate, d->m_offsetFromUtc);
Executed by:
  • tst_QDateTime
2
1728 }
executed 3 times by 1 test: end of block
Executed by:
  • tst_QDateTime
3
1729 return
executed 399 times by 3 tests: return buf;
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_qmakelib
buf;
executed 399 times by 3 tests: return buf;
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_qmakelib
399
1730 }-
1731-
1732 case
executed 26 times by 4 tests: case Qt::ISODate:
Executed by:
  • tst_QDateTime
  • tst_QNetworkRequest
  • tst_QSqlTableModel
  • tst_QVariant
Qt::ISODate:
executed 26 times by 4 tests: case Qt::ISODate:
Executed by:
  • tst_QDateTime
  • tst_QNetworkRequest
  • tst_QSqlTableModel
  • tst_QVariant
{
26
1733 const QPair<QDate, QTime> p = d->getDateTime();-
1734 const QDate &dt = p.first;-
1735 const QTime &tm = p.second;-
1736 buf = dt.toString(Qt::ISODate);-
1737 if (buf.isEmpty()
buf.isEmpty()Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 25 times by 4 tests
Evaluated by:
  • tst_QDateTime
  • tst_QNetworkRequest
  • tst_QSqlTableModel
  • tst_QVariant
)
1-25
1738 return
executed 1 time by 1 test: return QString();
Executed by:
  • tst_QDateTime
QString();
executed 1 time by 1 test: return QString();
Executed by:
  • tst_QDateTime
1
1739 buf += QLatin1Char('T');-
1740 buf += tm.toString(Qt::ISODate);-
1741 switch (d->m_spec) {-
1742 case
executed 9 times by 2 tests: case Qt::UTC:
Executed by:
  • tst_QDateTime
  • tst_QNetworkRequest
Qt::UTC:
executed 9 times by 2 tests: case Qt::UTC:
Executed by:
  • tst_QDateTime
  • tst_QNetworkRequest
9
1743 buf += QLatin1Char('Z');-
1744 break;
executed 9 times by 2 tests: break;
Executed by:
  • tst_QDateTime
  • tst_QNetworkRequest
9
1745 case
executed 3 times by 1 test: case Qt::OffsetFromUTC:
Executed by:
  • tst_QDateTime
Qt::OffsetFromUTC:
executed 3 times by 1 test: case Qt::OffsetFromUTC:
Executed by:
  • tst_QDateTime
3
1746 buf += toOffsetString(Qt::ISODate, d->m_offsetFromUtc);-
1747 break;
executed 3 times by 1 test: break;
Executed by:
  • tst_QDateTime
3
1748 default
executed 13 times by 3 tests: default:
Executed by:
  • tst_QDateTime
  • tst_QSqlTableModel
  • tst_QVariant
:
executed 13 times by 3 tests: default:
Executed by:
  • tst_QDateTime
  • tst_QSqlTableModel
  • tst_QVariant
13
1749 break;
executed 13 times by 3 tests: break;
Executed by:
  • tst_QDateTime
  • tst_QSqlTableModel
  • tst_QVariant
13
1750 }-
1751 return
executed 25 times by 4 tests: return buf;
Executed by:
  • tst_QDateTime
  • tst_QNetworkRequest
  • tst_QSqlTableModel
  • tst_QVariant
buf;
executed 25 times by 4 tests: return buf;
Executed by:
  • tst_QDateTime
  • tst_QNetworkRequest
  • tst_QSqlTableModel
  • tst_QVariant
25
1752 }-
1753 }-
1754}-
1755QString QDateTime::toString(const QString& format) const-
1756{-
1757 return
executed 2377 times by 18 tests: return QLocale::system().toString(*this, format);
Executed by:
  • tst_QAsn1Element
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileInfo
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QVariant
  • tst_qlogging - unknown status
  • tst_qmessagehandler
  • tst_selftests - unknown status
QLocale::system().toString(*this, format);
executed 2377 times by 18 tests: return QLocale::system().toString(*this, format);
Executed by:
  • tst_QAsn1Element
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileInfo
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QNoDebug
  • tst_QSignalSpy
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QVariant
  • tst_qlogging - unknown status
  • tst_qmessagehandler
  • tst_selftests - unknown status
2377
1758}-
1759-
1760-
1761static void massageAdjustedDateTime(Qt::TimeSpec spec,-
1762-
1763 const QTimeZone &zone,-
1764-
1765 QDate *date,-
1766 QTime *time)-
1767{-
1768 if (spec == Qt::LocalTime
spec == Qt::LocalTimeDescription
TRUEevaluated 6374 times by 2 tests
Evaluated by:
  • tst_QDateTime
  • tst_QDateTimeEdit
FALSEevaluated 124 times by 1 test
Evaluated by:
  • tst_QDateTime
) {
124-6374
1769 QDateTimePrivate::DaylightStatus status = QDateTimePrivate::UnknownDaylightTime;-
1770 localMSecsToEpochMSecs(timeToMSecs(*date, *time), &status, date, time);-
1771-
1772 }
executed 6374 times by 2 tests: end of block
Executed by:
  • tst_QDateTime
  • tst_QDateTimeEdit
else if (spec == Qt::TimeZone
spec == Qt::TimeZoneDescription
TRUEnever evaluated
FALSEevaluated 124 times by 1 test
Evaluated by:
  • tst_QDateTime
) {
0-6374
1773 QDateTimePrivate::zoneMSecsToEpochMSecs(timeToMSecs(*date, *time), zone, date, time);-
1774-
1775 }
never executed: end of block
0
1776}
executed 6498 times by 2 tests: end of block
Executed by:
  • tst_QDateTime
  • tst_QDateTimeEdit
6498
1777QDateTime QDateTime::addDays(qint64 ndays) const-
1778{-
1779 QDateTime dt(*this);-
1780 QPair<QDate, QTime> p = d->getDateTime();-
1781 QDate &date = p.first;-
1782 QTime &time = p.second;-
1783 date = date.addDays(ndays);-
1784 massageAdjustedDateTime(d->m_spec, d->m_timeZone, &date, &time);-
1785 dt.d->setDateTime(date, time);-
1786 return
executed 6288 times by 2 tests: return dt;
Executed by:
  • tst_QDateTime
  • tst_QDateTimeEdit
dt;
executed 6288 times by 2 tests: return dt;
Executed by:
  • tst_QDateTime
  • tst_QDateTimeEdit
6288
1787}-
1788QDateTime QDateTime::addMonths(int nmonths) const-
1789{-
1790 QDateTime dt(*this);-
1791 QPair<QDate, QTime> p = d->getDateTime();-
1792 QDate &date = p.first;-
1793 QTime &time = p.second;-
1794 date = date.addMonths(nmonths);-
1795 massageAdjustedDateTime(d->m_spec, d->m_timeZone, &date, &time);-
1796 dt.d->setDateTime(date, time);-
1797 return
executed 119 times by 2 tests: return dt;
Executed by:
  • tst_QDateTime
  • tst_QDateTimeEdit
dt;
executed 119 times by 2 tests: return dt;
Executed by:
  • tst_QDateTime
  • tst_QDateTimeEdit
119
1798}-
1799QDateTime QDateTime::addYears(int nyears) const-
1800{-
1801 QDateTime dt(*this);-
1802 QPair<QDate, QTime> p = d->getDateTime();-
1803 QDate &date = p.first;-
1804 QTime &time = p.second;-
1805 date = date.addYears(nyears);-
1806 massageAdjustedDateTime(d->m_spec, d->m_timeZone, &date, &time);-
1807 dt.d->setDateTime(date, time);-
1808 return
executed 91 times by 1 test: return dt;
Executed by:
  • tst_QDateTime
dt;
executed 91 times by 1 test: return dt;
Executed by:
  • tst_QDateTime
91
1809}-
1810QDateTime QDateTime::addSecs(qint64 s) const-
1811{-
1812 return
executed 41141 times by 17 tests: return addMSecs(s * 1000);
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDateTime
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QSqlTableModel
  • tst_QSslCertificate
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QXmlInputSource
  • tst_Spdy
addMSecs(s * 1000);
executed 41141 times by 17 tests: return addMSecs(s * 1000);
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDateTime
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QSqlTableModel
  • tst_QSslCertificate
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QXmlInputSource
  • tst_Spdy
41141
1813}-
1814QDateTime QDateTime::addMSecs(qint64 msecs) const-
1815{-
1816 if (!isValid()
!isValid()Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 41229 times by 17 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDateTime
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QSqlTableModel
  • tst_QSslCertificate
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QXmlInputSource
  • tst_Spdy
)
5-41229
1817 return
executed 5 times by 1 test: return QDateTime();
Executed by:
  • tst_QDateTime
QDateTime();
executed 5 times by 1 test: return QDateTime();
Executed by:
  • tst_QDateTime
5
1818-
1819 QDateTime dt(*this);-
1820 if (d->m_spec == Qt::LocalTime
d->m_spec == Qt::LocalTimeDescription
TRUEevaluated 81 times by 2 tests
Evaluated by:
  • tst_QDateTime
  • tst_QSqlTableModel
FALSEevaluated 41148 times by 16 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDateTime
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QSslCertificate
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QXmlInputSource
  • tst_Spdy
|| d->m_spec == Qt::TimeZone
d->m_spec == Qt::TimeZoneDescription
TRUEnever evaluated
FALSEevaluated 41148 times by 16 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDateTime
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QSslCertificate
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QXmlInputSource
  • tst_Spdy
)
0-41148
1821-
1822 dt.setMSecsSinceEpoch(d->toMSecsSinceEpoch() + msecs);
executed 81 times by 2 tests: dt.setMSecsSinceEpoch(d->toMSecsSinceEpoch() + msecs);
Executed by:
  • tst_QDateTime
  • tst_QSqlTableModel
81
1823 else-
1824-
1825 dt.d->m_msecs = dt.d->m_msecs + msecs;
executed 41148 times by 16 tests: dt.d->m_msecs = dt.d->m_msecs + msecs;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDateTime
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QSslCertificate
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QXmlInputSource
  • tst_Spdy
41148
1826 return
executed 41229 times by 17 tests: return dt;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDateTime
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QSqlTableModel
  • tst_QSslCertificate
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QXmlInputSource
  • tst_Spdy
dt;
executed 41229 times by 17 tests: return dt;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDateTime
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QSqlTableModel
  • tst_QSslCertificate
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QXmlInputSource
  • tst_Spdy
41229
1827}-
1828qint64 QDateTime::daysTo(const QDateTime &other) const-
1829{-
1830 return
executed 114 times by 3 tests: return date().daysTo(other.date());
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDateTime
  • tst_QDateTimeEdit
date().daysTo(other.date());
executed 114 times by 3 tests: return date().daysTo(other.date());
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDateTime
  • tst_QDateTimeEdit
114
1831}-
1832qint64 QDateTime::secsTo(const QDateTime &other) const-
1833{-
1834 return
executed 813 times by 11 tests: return (msecsTo(other) / 1000);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDateTime
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
(msecsTo(other) / 1000);
executed 813 times by 11 tests: return (msecsTo(other) / 1000);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDateTime
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QXmlInputSource
  • tst_Spdy
813
1835}-
1836qint64 QDateTime::msecsTo(const QDateTime &other) const-
1837{-
1838 if (!isValid()
!isValid()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 1180 times by 15 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDateTime
  • tst_QDir
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QItemModel
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QSqlQuery
  • tst_QXmlInputSource
  • tst_Spdy
|| !other.isValid()
!other.isValid()Description
TRUEnever evaluated
FALSEevaluated 1180 times by 15 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDateTime
  • tst_QDir
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QItemModel
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QSqlQuery
  • tst_QXmlInputSource
  • tst_Spdy
)
0-1180
1839 return
executed 4 times by 1 test: return 0;
Executed by:
  • tst_QDateTime
0;
executed 4 times by 1 test: return 0;
Executed by:
  • tst_QDateTime
4
1840-
1841 return
executed 1180 times by 15 tests: return other.d->toMSecsSinceEpoch() - d->toMSecsSinceEpoch();
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDateTime
  • tst_QDir
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QItemModel
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QSqlQuery
  • tst_QXmlInputSource
  • tst_Spdy
other.d->toMSecsSinceEpoch() - d->toMSecsSinceEpoch();
executed 1180 times by 15 tests: return other.d->toMSecsSinceEpoch() - d->toMSecsSinceEpoch();
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDateTime
  • tst_QDir
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QItemModel
  • tst_QLockFile
  • tst_QMimeDatabase
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QSqlQuery
  • tst_QXmlInputSource
  • tst_Spdy
1180
1842}-
1843QDateTime QDateTime::toTimeSpec(Qt::TimeSpec spec) const-
1844{-
1845 if (d->m_spec == spec
d->m_spec == specDescription
TRUEevaluated 18124 times by 13 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QSslCertificate
  • tst_QStyleSheetStyle
  • tst_QTime
FALSEevaluated 1176 times by 7 tests
Evaluated by:
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QVariant
&& (spec == Qt::UTC
spec == Qt::UTCDescription
TRUEevaluated 1252 times by 4 tests
Evaluated by:
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QNetworkCookie
  • tst_QSslCertificate
FALSEevaluated 16872 times by 11 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QStyleSheetStyle
  • tst_QTime
|| spec == Qt::LocalTime
spec == Qt::LocalTimeDescription
TRUEevaluated 16872 times by 11 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QStyleSheetStyle
  • tst_QTime
FALSEnever evaluated
))
0-18124
1846 return
executed 18124 times by 13 tests: return *this;
Executed by:
  • tst_QAccessibility
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QSslCertificate
  • tst_QStyleSheetStyle
  • tst_QTime
*this;
executed 18124 times by 13 tests: return *this;
Executed by:
  • tst_QAccessibility
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QItemDelegate
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QSslCertificate
  • tst_QStyleSheetStyle
  • tst_QTime
18124
1847-
1848 if (!isValid()
!isValid()Description
TRUEevaluated 505 times by 6 tests
Evaluated by:
  • tst_QDateTime
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QVariant
FALSEevaluated 671 times by 3 tests
Evaluated by:
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QNetworkReply
) {
505-671
1849 QDateTime ret = *this;-
1850 ret.setTimeSpec(spec);-
1851 return
executed 505 times by 6 tests: return ret;
Executed by:
  • tst_QDateTime
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QVariant
ret;
executed 505 times by 6 tests: return ret;
Executed by:
  • tst_QDateTime
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QVariant
505
1852 }-
1853-
1854 return
executed 671 times by 3 tests: return fromMSecsSinceEpoch(d->toMSecsSinceEpoch(), spec, 0);
Executed by:
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QNetworkReply
fromMSecsSinceEpoch(d->toMSecsSinceEpoch(), spec, 0);
executed 671 times by 3 tests: return fromMSecsSinceEpoch(d->toMSecsSinceEpoch(), spec, 0);
Executed by:
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QNetworkReply
671
1855}-
1856QDateTime QDateTime::toOffsetFromUtc(int offsetSeconds) const-
1857{-
1858 if (d->m_spec == Qt::OffsetFromUTC
d->m_spec == Qt::OffsetFromUTCDescription
TRUEnever evaluated
FALSEevaluated 6 times by 2 tests
Evaluated by:
  • tst_QDateTime
  • tst_QNetworkDiskCache
&& d->m_offsetFromUtc == offsetSeconds
d->m_offsetFro... offsetSecondsDescription
TRUEnever evaluated
FALSEnever evaluated
)
0-6
1859 return
never executed: return *this;
*this;
never executed: return *this;
0
1860-
1861 if (!isValid()
!isValid()Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 5 times by 2 tests
Evaluated by:
  • tst_QDateTime
  • tst_QNetworkDiskCache
) {
1-5
1862 QDateTime ret = *this;-
1863 ret.setOffsetFromUtc(offsetSeconds);-
1864 return
executed 1 time by 1 test: return ret;
Executed by:
  • tst_QDateTime
ret;
executed 1 time by 1 test: return ret;
Executed by:
  • tst_QDateTime
1
1865 }-
1866-
1867 return
executed 5 times by 2 tests: return fromMSecsSinceEpoch(d->toMSecsSinceEpoch(), Qt::OffsetFromUTC, offsetSeconds);
Executed by:
  • tst_QDateTime
  • tst_QNetworkDiskCache
fromMSecsSinceEpoch(d->toMSecsSinceEpoch(), Qt::OffsetFromUTC, offsetSeconds);
executed 5 times by 2 tests: return fromMSecsSinceEpoch(d->toMSecsSinceEpoch(), Qt::OffsetFromUTC, offsetSeconds);
Executed by:
  • tst_QDateTime
  • tst_QNetworkDiskCache
5
1868}-
1869QDateTime QDateTime::toTimeZone(const QTimeZone &timeZone) const-
1870{-
1871 if (d->m_spec == Qt::TimeZone
d->m_spec == Qt::TimeZoneDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDateTime
&& d->m_timeZone == timeZone
d->m_timeZone == timeZoneDescription
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDateTime
)
0-1
1872 return
never executed: return *this;
*this;
never executed: return *this;
0
1873-
1874 if (!isValid()
!isValid()Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDateTime
) {
1
1875 QDateTime ret = *this;-
1876 ret.setTimeZone(timeZone);-
1877 return
executed 1 time by 1 test: return ret;
Executed by:
  • tst_QDateTime
ret;
executed 1 time by 1 test: return ret;
Executed by:
  • tst_QDateTime
1
1878 }-
1879-
1880 return
executed 1 time by 1 test: return fromMSecsSinceEpoch(d->toMSecsSinceEpoch(), timeZone);
Executed by:
  • tst_QDateTime
fromMSecsSinceEpoch(d->toMSecsSinceEpoch(), timeZone);
executed 1 time by 1 test: return fromMSecsSinceEpoch(d->toMSecsSinceEpoch(), timeZone);
Executed by:
  • tst_QDateTime
1
1881}-
1882bool QDateTime::operator==(const QDateTime &other) const-
1883{-
1884 if (d->m_spec == Qt::LocalTime
d->m_spec == Qt::LocalTimeDescription
TRUEevaluated 62344 times by 28 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QColorDialog
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QIcon
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QSignalSpy
  • tst_QSslCertificate
  • tst_QStyleSheetStyle
  • ...
FALSEevaluated 1272 times by 12 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QDBusMarshall
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QSettings
  • tst_QSslCertificate
  • tst_selftests - unknown status
1272-62344
1885 && other.d->m_spec == Qt::LocalTime
other.d->m_spe... Qt::LocalTimeDescription
TRUEevaluated 62311 times by 28 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QColorDialog
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QIcon
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QSignalSpy
  • tst_QSslCertificate
  • tst_QStyleSheetStyle
  • ...
FALSEevaluated 33 times by 2 tests
Evaluated by:
  • tst_QDateTime
  • tst_QDateTimeEdit
33-62311
1886 && d->m_status == other.d->m_status
d->m_status ==...er.d->m_statusDescription
TRUEevaluated 61608 times by 28 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QColorDialog
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QIcon
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QSignalSpy
  • tst_QSslCertificate
  • tst_QStyleSheetStyle
  • ...
FALSEevaluated 703 times by 8 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QDBusAbstractAdaptor
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QStyleSheetStyle
) {
703-61608
1887 return
executed 61608 times by 28 tests: return (d->m_msecs == other.d->m_msecs);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QColorDialog
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QIcon
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QSignalSpy
  • tst_QSslCertificate
  • tst_QStyleSheetStyle
  • ...
(d->m_msecs == other.d->m_msecs);
executed 61608 times by 28 tests: return (d->m_msecs == other.d->m_msecs);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QColorDialog
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileInfo
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QIcon
  • tst_QItemDelegate
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QSignalSpy
  • tst_QSslCertificate
  • tst_QStyleSheetStyle
  • ...
61608
1888 }-
1889-
1890 return
executed 2008 times by 18 tests: return (toMSecsSinceEpoch() == other.toMSecsSinceEpoch());
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QSettings
  • tst_QSslCertificate
  • tst_QStyleSheetStyle
  • tst_selftests - unknown status
(toMSecsSinceEpoch() == other.toMSecsSinceEpoch());
executed 2008 times by 18 tests: return (toMSecsSinceEpoch() == other.toMSecsSinceEpoch());
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QAsn1Element
  • tst_QDBusAbstractAdaptor
  • tst_QDBusMarshall
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QNetworkCacheMetaData
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QSettings
  • tst_QSslCertificate
  • tst_QStyleSheetStyle
  • tst_selftests - unknown status
2008
1891}-
1892bool QDateTime::operator<(const QDateTime &other) const-
1893{-
1894 if (d->m_spec == Qt::LocalTime
d->m_spec == Qt::LocalTimeDescription
TRUEevaluated 44463 times by 35 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QIcon
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QMimeDatabase
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QPlainTextEdit
  • tst_QPrinter
  • ...
FALSEevaluated 59466 times by 8 tests
Evaluated by:
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QSslCertificate
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTimeZone
44463-59466
1895 && other.d->m_spec == Qt::LocalTime
other.d->m_spe... Qt::LocalTimeDescription
TRUEevaluated 44454 times by 34 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QIcon
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSidebar
  • ...
FALSEevaluated 9 times by 2 tests
Evaluated by:
  • tst_QDateTime
  • tst_QNetworkCookieJar
9-44454
1896 && d->m_status == other.d->m_status
d->m_status ==...er.d->m_statusDescription
TRUEevaluated 43980 times by 34 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QIcon
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSidebar
  • ...
FALSEevaluated 474 times by 4 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QStyleSheetStyle
) {
474-43980
1897 return
executed 43980 times by 34 tests: return (d->m_msecs < other.d->m_msecs);
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QIcon
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSidebar
  • ...
(d->m_msecs < other.d->m_msecs);
executed 43980 times by 34 tests: return (d->m_msecs < other.d->m_msecs);
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QIcon
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMessageBox
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QPlainTextEdit
  • tst_QPrinter
  • tst_QSidebar
  • ...
43980
1898 }-
1899-
1900 return
executed 59949 times by 11 tests: return (toMSecsSinceEpoch() < other.toMSecsSinceEpoch());
Executed by:
  • tst_QAccessibility
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QSslCertificate
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QStyleSheetStyle
  • tst_QTimeZone
(toMSecsSinceEpoch() < other.toMSecsSinceEpoch());
executed 59949 times by 11 tests: return (toMSecsSinceEpoch() < other.toMSecsSinceEpoch());
Executed by:
  • tst_QAccessibility
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QItemDelegate
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
  • tst_QSslCertificate
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QStyleSheetStyle
  • tst_QTimeZone
59949
1901}-
1902QDate QDate::currentDate()-
1903{-
1904 return
executed 202 times by 8 tests: return QDateTime::currentDateTime().date();
Executed by:
  • tst_QAccessibility
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QMetaType
  • tst_QSettings
QDateTime::currentDateTime().date();
executed 202 times by 8 tests: return QDateTime::currentDateTime().date();
Executed by:
  • tst_QAccessibility
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QDate
  • tst_QDateTimeEdit
  • tst_QFtp
  • tst_QMetaType
  • tst_QSettings
202
1905}-
1906-
1907QTime QTime::currentTime()-
1908{-
1909 return
executed 6944229 times by 39 tests: return QDateTime::currentDateTime().time();
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractSlider
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCoreApplication
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QFile
  • tst_QFtp
  • tst_QFutureWatcher
  • tst_QGuiApplication
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QLabel
  • tst_QLocalSocket
  • tst_QMetaType
  • tst_QMovie
  • tst_QMutex
  • tst_QNetworkReply
  • tst_QObjectPerformance
  • tst_QProcess
  • tst_QProgressBar
  • tst_QReadWriteLock
  • tst_QSettings
  • ...
QDateTime::currentDateTime().time();
executed 6944229 times by 39 tests: return QDateTime::currentDateTime().time();
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractSlider
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCoreApplication
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QFile
  • tst_QFtp
  • tst_QFutureWatcher
  • tst_QGuiApplication
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QLabel
  • tst_QLocalSocket
  • tst_QMetaType
  • tst_QMovie
  • tst_QMutex
  • tst_QNetworkReply
  • tst_QObjectPerformance
  • tst_QProcess
  • tst_QProgressBar
  • tst_QReadWriteLock
  • tst_QSettings
  • ...
6944229
1910}-
1911-
1912QDateTime QDateTime::currentDateTime()-
1913{-
1914 return
executed 6945101 times by 60 tests: return fromMSecsSinceEpoch(currentMSecsSinceEpoch(), Qt::LocalTime);
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QFile
  • tst_QFileInfo
  • tst_QFtp
  • tst_QFutureWatcher
  • tst_QGuiApplication
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QLocalSocket
  • tst_QLockFile
  • ...
fromMSecsSinceEpoch(currentMSecsSinceEpoch(), Qt::LocalTime);
executed 6945101 times by 60 tests: return fromMSecsSinceEpoch(currentMSecsSinceEpoch(), Qt::LocalTime);
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QFile
  • tst_QFileInfo
  • tst_QFtp
  • tst_QFutureWatcher
  • tst_QGuiApplication
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QLocalSocket
  • tst_QLockFile
  • ...
6945101
1915}-
1916-
1917QDateTime QDateTime::currentDateTimeUtc()-
1918{-
1919 return
executed 3651 times by 18 tests: return fromMSecsSinceEpoch(currentMSecsSinceEpoch(), Qt::UTC);
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDateTime
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QPrinter
  • tst_QSslCertificate
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QXmlInputSource
  • tst_Spdy
fromMSecsSinceEpoch(currentMSecsSinceEpoch(), Qt::UTC);
executed 3651 times by 18 tests: return fromMSecsSinceEpoch(currentMSecsSinceEpoch(), Qt::UTC);
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QDateTime
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkCookie
  • tst_QNetworkCookieJar
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QPrinter
  • tst_QSslCertificate
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QXmlInputSource
  • tst_Spdy
3651
1920}-
1921-
1922qint64 QDateTime::currentMSecsSinceEpoch() noexcept-
1923{-
1924-
1925-
1926 struct timeval tv;-
1927 gettimeofday(&tv, 0);-
1928 return
executed 6948773 times by 70 tests: return qint64(tv.tv_sec) * static_cast<long long>(1000LL) + tv.tv_usec / 1000;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QFile
  • tst_QFileInfo
  • tst_QFtp
  • tst_QFutureWatcher
  • tst_QGuiApplication
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QLocalSocket
  • ...
qint64(tv.tv_sec) * static_cast<long long>(1000LL) + tv.tv_usec / 1000;
executed 6948773 times by 70 tests: return qint64(tv.tv_sec) * static_cast<long long>(1000LL) + tv.tv_usec / 1000;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QFile
  • tst_QFileInfo
  • tst_QFtp
  • tst_QFutureWatcher
  • tst_QGuiApplication
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QLocalSocket
  • ...
6948773
1929}-
1930QDateTime QDateTime::fromTime_t(uint seconds)-
1931{-
1932 return
executed 7782 times by 49 tests: return fromMSecsSinceEpoch((qint64)seconds * 1000, Qt::LocalTime);
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFrame
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • ...
fromMSecsSinceEpoch((qint64)seconds * 1000, Qt::LocalTime);
executed 7782 times by 49 tests: return fromMSecsSinceEpoch((qint64)seconds * 1000, Qt::LocalTime);
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QErrorMessage
  • tst_QFileDialog2
  • tst_QFileIconProvider
  • tst_QFileInfo
  • tst_QFileSystemModel
  • tst_QFileSystemWatcher
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFrame
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsWidget
  • tst_QGuiApplication
  • tst_QGuiVariant
  • tst_QIcon
  • ...
7782
1933}-
1934QDateTime QDateTime::fromTime_t(uint seconds, Qt::TimeSpec spec, int offsetSeconds)-
1935{-
1936 return
never executed: return fromMSecsSinceEpoch((qint64)seconds * 1000, spec, offsetSeconds);
fromMSecsSinceEpoch((qint64)seconds * 1000, spec, offsetSeconds);
never executed: return fromMSecsSinceEpoch((qint64)seconds * 1000, spec, offsetSeconds);
0
1937}-
1938QDateTime QDateTime::fromTime_t(uint seconds, const QTimeZone &timeZone)-
1939{-
1940 return
executed 1 time by 1 test: return fromMSecsSinceEpoch((qint64)seconds * 1000, timeZone);
Executed by:
  • tst_QDateTime
fromMSecsSinceEpoch((qint64)seconds * 1000, timeZone);
executed 1 time by 1 test: return fromMSecsSinceEpoch((qint64)seconds * 1000, timeZone);
Executed by:
  • tst_QDateTime
1
1941}-
1942QDateTime QDateTime::fromMSecsSinceEpoch(qint64 msecs)-
1943{-
1944 return
never executed: return fromMSecsSinceEpoch(msecs, Qt::LocalTime);
fromMSecsSinceEpoch(msecs, Qt::LocalTime);
never executed: return fromMSecsSinceEpoch(msecs, Qt::LocalTime);
0
1945}-
1946QDateTime QDateTime::fromMSecsSinceEpoch(qint64 msecs, Qt::TimeSpec spec, int offsetSeconds)-
1947{-
1948 QDateTime dt;-
1949 dt.d->setTimeSpec(spec, offsetSeconds);-
1950 dt.setMSecsSinceEpoch(msecs);-
1951 return
executed 6963970 times by 103 tests: return dt;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • ...
dt;
executed 6963970 times by 103 tests: return dt;
Executed by:
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAtomicInt
  • tst_QAuthenticator
  • tst_QCalendarWidget
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QCoreApplication
  • tst_QDBusAbstractAdaptor
  • tst_QDate
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDebug
  • tst_QDir
  • tst_QDnsLookup
  • tst_QDnsLookup_Appless
  • tst_QErrorMessage
  • tst_QFile
  • tst_QFileDialog2
  • ...
6963970
1952}-
1953QDateTime QDateTime::fromMSecsSinceEpoch(qint64 msecs, const QTimeZone &timeZone)-
1954{-
1955 QDateTime dt;-
1956 dt.setTimeZone(timeZone);-
1957 dt.setMSecsSinceEpoch(msecs);-
1958 return
executed 10 times by 1 test: return dt;
Executed by:
  • tst_QDateTime
dt;
executed 10 times by 1 test: return dt;
Executed by:
  • tst_QDateTime
10
1959}-
1960void QDateTime::setUtcOffset(int seconds)-
1961{-
1962 setOffsetFromUtc(seconds);-
1963}
executed 4 times by 1 test: end of block
Executed by:
  • tst_QDateTime
4
1964int QDateTime::utcOffset() const-
1965{-
1966 return
executed 20 times by 1 test: return offsetFromUtc();
Executed by:
  • tst_QDateTime
offsetFromUtc();
executed 20 times by 1 test: return offsetFromUtc();
Executed by:
  • tst_QDateTime
20
1967}-
1968QDateTime QDateTime::fromString(const QString& string, Qt::DateFormat format)-
1969{-
1970 if (string.isEmpty()
string.isEmpty()Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 144 times by 6 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QSqlQuery
  • tst_QVariant
)
5-144
1971 return
executed 5 times by 1 test: return QDateTime();
Executed by:
  • tst_QDateTime
QDateTime();
executed 5 times by 1 test: return QDateTime();
Executed by:
  • tst_QDateTime
5
1972-
1973 switch (format) {-
1974 case
executed 1 time by 1 test: case Qt::SystemLocaleDate:
Executed by:
  • tst_QDateTime
Qt::SystemLocaleDate:
executed 1 time by 1 test: case Qt::SystemLocaleDate:
Executed by:
  • tst_QDateTime
1
1975 case
executed 1 time by 1 test: case Qt::SystemLocaleShortDate:
Executed by:
  • tst_QDateTime
Qt::SystemLocaleShortDate:
executed 1 time by 1 test: case Qt::SystemLocaleShortDate:
Executed by:
  • tst_QDateTime
1
1976 return
executed 2 times by 1 test: return QLocale::system().toDateTime(string, QLocale::ShortFormat);
Executed by:
  • tst_QDateTime
QLocale::system().toDateTime(string, QLocale::ShortFormat);
executed 2 times by 1 test: return QLocale::system().toDateTime(string, QLocale::ShortFormat);
Executed by:
  • tst_QDateTime
2
1977 case
executed 1 time by 1 test: case Qt::SystemLocaleLongDate:
Executed by:
  • tst_QDateTime
Qt::SystemLocaleLongDate:
executed 1 time by 1 test: case Qt::SystemLocaleLongDate:
Executed by:
  • tst_QDateTime
1
1978 return
executed 1 time by 1 test: return QLocale::system().toDateTime(string, QLocale::LongFormat);
Executed by:
  • tst_QDateTime
QLocale::system().toDateTime(string, QLocale::LongFormat);
executed 1 time by 1 test: return QLocale::system().toDateTime(string, QLocale::LongFormat);
Executed by:
  • tst_QDateTime
1
1979 case
executed 1 time by 1 test: case Qt::LocaleDate:
Executed by:
  • tst_QDateTime
Qt::LocaleDate:
executed 1 time by 1 test: case Qt::LocaleDate:
Executed by:
  • tst_QDateTime
1
1980 case
executed 1 time by 1 test: case Qt::DefaultLocaleShortDate:
Executed by:
  • tst_QDateTime
Qt::DefaultLocaleShortDate:
executed 1 time by 1 test: case Qt::DefaultLocaleShortDate:
Executed by:
  • tst_QDateTime
1
1981 return
executed 2 times by 1 test: return QLocale().toDateTime(string, QLocale::ShortFormat);
Executed by:
  • tst_QDateTime
QLocale().toDateTime(string, QLocale::ShortFormat);
executed 2 times by 1 test: return QLocale().toDateTime(string, QLocale::ShortFormat);
Executed by:
  • tst_QDateTime
2
1982 case
executed 1 time by 1 test: case Qt::DefaultLocaleLongDate:
Executed by:
  • tst_QDateTime
Qt::DefaultLocaleLongDate:
executed 1 time by 1 test: case Qt::DefaultLocaleLongDate:
Executed by:
  • tst_QDateTime
1
1983 return
executed 1 time by 1 test: return QLocale().toDateTime(string, QLocale::LongFormat);
Executed by:
  • tst_QDateTime
QLocale().toDateTime(string, QLocale::LongFormat);
executed 1 time by 1 test: return QLocale().toDateTime(string, QLocale::LongFormat);
Executed by:
  • tst_QDateTime
1
1984 case
executed 30 times by 1 test: case Qt::RFC2822Date:
Executed by:
  • tst_QDateTime
Qt::RFC2822Date:
executed 30 times by 1 test: case Qt::RFC2822Date:
Executed by:
  • tst_QDateTime
{
30
1985 const ParsedRfcDateTime rfc = rfcDateImpl(string);-
1986-
1987 if (!rfc.date.isValid()
!rfc.date.isValid()Description
TRUEevaluated 11 times by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 19 times by 1 test
Evaluated by:
  • tst_QDateTime
|| !rfc.time.isValid()
!rfc.time.isValid()Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 16 times by 1 test
Evaluated by:
  • tst_QDateTime
)
3-19
1988 return
executed 14 times by 1 test: return QDateTime();
Executed by:
  • tst_QDateTime
QDateTime();
executed 14 times by 1 test: return QDateTime();
Executed by:
  • tst_QDateTime
14
1989-
1990 QDateTime dateTime(rfc.date, rfc.time, Qt::UTC);-
1991 dateTime.setOffsetFromUtc(rfc.utcOffset);-
1992 return
executed 16 times by 1 test: return dateTime;
Executed by:
  • tst_QDateTime
dateTime;
executed 16 times by 1 test: return dateTime;
Executed by:
  • tst_QDateTime
16
1993 }-
1994 case
executed 66 times by 4 tests: case Qt::ISODate:
Executed by:
  • tst_QDateTime
  • tst_QNetworkReply
  • tst_QSqlQuery
  • tst_QVariant
Qt::ISODate:
executed 66 times by 4 tests: case Qt::ISODate:
Executed by:
  • tst_QDateTime
  • tst_QNetworkReply
  • tst_QSqlQuery
  • tst_QVariant
{
66
1995 const int size = string.size();-
1996 if (size < 10
size < 10Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QVariant
FALSEevaluated 62 times by 4 tests
Evaluated by:
  • tst_QDateTime
  • tst_QNetworkReply
  • tst_QSqlQuery
  • tst_QVariant
)
4-62
1997 return
executed 4 times by 1 test: return QDateTime();
Executed by:
  • tst_QVariant
QDateTime();
executed 4 times by 1 test: return QDateTime();
Executed by:
  • tst_QVariant
4
1998-
1999 QStringRef isoString(&string);-
2000 Qt::TimeSpec spec = Qt::LocalTime;-
2001-
2002 QDate date = QDate::fromString(string.left(10), Qt::ISODate);-
2003 if (!date.isValid()
!date.isValid()Description
TRUEevaluated 7 times by 2 tests
Evaluated by:
  • tst_QDateTime
  • tst_QVariant
FALSEevaluated 55 times by 4 tests
Evaluated by:
  • tst_QDateTime
  • tst_QNetworkReply
  • tst_QSqlQuery
  • tst_QVariant
)
7-55
2004 return
executed 7 times by 2 tests: return QDateTime();
Executed by:
  • tst_QDateTime
  • tst_QVariant
QDateTime();
executed 7 times by 2 tests: return QDateTime();
Executed by:
  • tst_QDateTime
  • tst_QVariant
7
2005 if (size == 10
size == 10Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 54 times by 4 tests
Evaluated by:
  • tst_QDateTime
  • tst_QNetworkReply
  • tst_QSqlQuery
  • tst_QVariant
)
1-54
2006 return
executed 1 time by 1 test: return QDateTime(date);
Executed by:
  • tst_QDateTime
QDateTime(date);
executed 1 time by 1 test: return QDateTime(date);
Executed by:
  • tst_QDateTime
1
2007-
2008 isoString = isoString.right(isoString.length() - 11);-
2009 int offset = 0;-
2010-
2011 if (isoString.endsWith(QLatin1Char('Z'))
isoString.ends...tin1Char('Z'))Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 48 times by 4 tests
Evaluated by:
  • tst_QDateTime
  • tst_QNetworkReply
  • tst_QSqlQuery
  • tst_QVariant
) {
6-48
2012 spec = Qt::UTC;-
2013 isoString = isoString.left(isoString.size() - 1);-
2014 }
executed 6 times by 1 test: end of block
Executed by:
  • tst_QDateTime
else {
6
2015-
2016-
2017 int signIndex = isoString.size() - 1;-
2018 bool found = false;-
2019 {-
2020 const QChar plus = QLatin1Char('+');-
2021 const QChar minus = QLatin1Char('-');-
2022 do {-
2023 QChar character(isoString.at(signIndex));-
2024 found = character == plus
character == plusDescription
TRUEevaluated 5 times by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 397 times by 4 tests
Evaluated by:
  • tst_QDateTime
  • tst_QNetworkReply
  • tst_QSqlQuery
  • tst_QVariant
|| character == minus
character == minusDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 389 times by 4 tests
Evaluated by:
  • tst_QDateTime
  • tst_QNetworkReply
  • tst_QSqlQuery
  • tst_QVariant
;
5-397
2025 }
executed 402 times by 4 tests: end of block
Executed by:
  • tst_QDateTime
  • tst_QNetworkReply
  • tst_QSqlQuery
  • tst_QVariant
while (--
--signIndex >= 0Description
TRUEevaluated 367 times by 4 tests
Evaluated by:
  • tst_QDateTime
  • tst_QNetworkReply
  • tst_QSqlQuery
  • tst_QVariant
FALSEevaluated 35 times by 4 tests
Evaluated by:
  • tst_QDateTime
  • tst_QNetworkReply
  • tst_QSqlQuery
  • tst_QVariant
signIndex >= 0
--signIndex >= 0Description
TRUEevaluated 367 times by 4 tests
Evaluated by:
  • tst_QDateTime
  • tst_QNetworkReply
  • tst_QSqlQuery
  • tst_QVariant
FALSEevaluated 35 times by 4 tests
Evaluated by:
  • tst_QDateTime
  • tst_QNetworkReply
  • tst_QSqlQuery
  • tst_QVariant
&& !found
!foundDescription
TRUEevaluated 354 times by 4 tests
Evaluated by:
  • tst_QDateTime
  • tst_QNetworkReply
  • tst_QSqlQuery
  • tst_QVariant
FALSEevaluated 13 times by 1 test
Evaluated by:
  • tst_QDateTime
);
13-402
2026 ++signIndex;-
2027 }-
2028-
2029 if (found
foundDescription
TRUEevaluated 13 times by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 35 times by 4 tests
Evaluated by:
  • tst_QDateTime
  • tst_QNetworkReply
  • tst_QSqlQuery
  • tst_QVariant
) {
13-35
2030 bool ok;-
2031 offset = fromOffsetString(isoString.mid(signIndex), &ok);-
2032 if (!ok
!okDescription
TRUEnever evaluated
FALSEevaluated 13 times by 1 test
Evaluated by:
  • tst_QDateTime
)
0-13
2033 return
never executed: return QDateTime();
QDateTime();
never executed: return QDateTime();
0
2034 isoString = isoString.left(signIndex);-
2035 spec = Qt::OffsetFromUTC;-
2036 }
executed 13 times by 1 test: end of block
Executed by:
  • tst_QDateTime
13
2037 }
executed 48 times by 4 tests: end of block
Executed by:
  • tst_QDateTime
  • tst_QNetworkReply
  • tst_QSqlQuery
  • tst_QVariant
48
2038-
2039-
2040-
2041 bool isMidnight24 = false;-
2042 QTime time = fromIsoTimeString(isoString, Qt::ISODate, &isMidnight24);-
2043 if (!time.isValid()
!time.isValid()Description
TRUEnever evaluated
FALSEevaluated 54 times by 4 tests
Evaluated by:
  • tst_QDateTime
  • tst_QNetworkReply
  • tst_QSqlQuery
  • tst_QVariant
)
0-54
2044 return
never executed: return QDateTime();
QDateTime();
never executed: return QDateTime();
0
2045 if (isMidnight24
isMidnight24Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 49 times by 4 tests
Evaluated by:
  • tst_QDateTime
  • tst_QNetworkReply
  • tst_QSqlQuery
  • tst_QVariant
)
5-49
2046 date = date.addDays(1);
executed 5 times by 1 test: date = date.addDays(1);
Executed by:
  • tst_QDateTime
5
2047 return
executed 54 times by 4 tests: return QDateTime(date, time, spec, offset);
Executed by:
  • tst_QDateTime
  • tst_QNetworkReply
  • tst_QSqlQuery
  • tst_QVariant
QDateTime(date, time, spec, offset);
executed 54 times by 4 tests: return QDateTime(date, time, spec, offset);
Executed by:
  • tst_QDateTime
  • tst_QNetworkReply
  • tst_QSqlQuery
  • tst_QVariant
54
2048 }-
2049-
2050 case
executed 42 times by 3 tests: case Qt::TextDate:
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkRequest
Qt::TextDate:
executed 42 times by 3 tests: case Qt::TextDate:
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkRequest
{
42
2051 QVector<QStringRef> parts = string.splitRef(QLatin1Char(' '), QString::SkipEmptyParts);-
2052-
2053 if ((
(parts.count() < 5)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 41 times by 3 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkRequest
parts.count() < 5)
(parts.count() < 5)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 41 times by 3 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkRequest
|| (
(parts.count() > 6)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 40 times by 3 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkRequest
parts.count() > 6)
(parts.count() > 6)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 40 times by 3 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkRequest
)
1-41
2054 return
executed 2 times by 1 test: return QDateTime();
Executed by:
  • tst_QDateTime
QDateTime();
executed 2 times by 1 test: return QDateTime();
Executed by:
  • tst_QDateTime
2
2055-
2056-
2057 int month = 0;-
2058 int day = 0;-
2059 bool ok = false;-
2060-
2061-
2062 month = fromShortMonthName(parts.at(1));-
2063 if (month
monthDescription
TRUEevaluated 40 times by 3 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkRequest
FALSEnever evaluated
)
0-40
2064 day = parts.at(2).toInt();
executed 40 times by 3 tests: day = parts.at(2).toInt();
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkRequest
40
2065-
2066-
2067 if (!month
!monthDescription
TRUEnever evaluated
FALSEevaluated 40 times by 3 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkRequest
|| !day
!dayDescription
TRUEevaluated 14 times by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 26 times by 3 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkRequest
) {
0-40
2068 month = fromShortMonthName(parts.at(2));-
2069 if (month
monthDescription
TRUEevaluated 14 times by 1 test
Evaluated by:
  • tst_QDateTime
FALSEnever evaluated
) {
0-14
2070 QStringRef dayStr = parts.at(1);-
2071 if (dayStr.endsWith(QLatin1Char('.'))
dayStr.endsWit...tin1Char('.'))Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QDateTime
) {
2-12
2072 dayStr = dayStr.left(dayStr.size() - 1);-
2073 day = dayStr.toInt();-
2074 }
executed 12 times by 1 test: end of block
Executed by:
  • tst_QDateTime
12
2075 }
executed 14 times by 1 test: end of block
Executed by:
  • tst_QDateTime
14
2076 }
executed 14 times by 1 test: end of block
Executed by:
  • tst_QDateTime
14
2077-
2078-
2079 if (!month
!monthDescription
TRUEnever evaluated
FALSEevaluated 40 times by 3 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkRequest
|| !day
!dayDescription
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 37 times by 3 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkRequest
)
0-40
2080 return
executed 3 times by 1 test: return QDateTime();
Executed by:
  • tst_QDateTime
QDateTime();
executed 3 times by 1 test: return QDateTime();
Executed by:
  • tst_QDateTime
3
2081-
2082-
2083-
2084 int year = 0;-
2085 int yearPart = 0;-
2086 int timePart = 0;-
2087 if (parts.at(3).contains(QLatin1Char(':'))
parts.at(3).co...tin1Char(':'))Description
TRUEevaluated 23 times by 3 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkRequest
FALSEevaluated 14 times by 1 test
Evaluated by:
  • tst_QDateTime
) {
14-23
2088 yearPart = 4;-
2089 timePart = 3;-
2090 }
executed 23 times by 3 tests: end of block
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkRequest
else if (parts.at(4).contains(QLatin1Char(':'))
parts.at(4).co...tin1Char(':'))Description
TRUEevaluated 13 times by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDateTime
) {
1-23
2091 yearPart = 3;-
2092 timePart = 4;-
2093 }
executed 13 times by 1 test: end of block
Executed by:
  • tst_QDateTime
else {
13
2094 return
executed 1 time by 1 test: return QDateTime();
Executed by:
  • tst_QDateTime
QDateTime();
executed 1 time by 1 test: return QDateTime();
Executed by:
  • tst_QDateTime
1
2095 }-
2096-
2097 year = parts.at(yearPart).toInt(&ok);-
2098 if (!ok
!okDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 34 times by 3 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkRequest
)
2-34
2099 return
executed 2 times by 1 test: return QDateTime();
Executed by:
  • tst_QDateTime
QDateTime();
executed 2 times by 1 test: return QDateTime();
Executed by:
  • tst_QDateTime
2
2100-
2101 QDate date(year, month, day);-
2102 if (!date.isValid()
!date.isValid()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 32 times by 3 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkRequest
)
2-32
2103 return
executed 2 times by 1 test: return QDateTime();
Executed by:
  • tst_QDateTime
QDateTime();
executed 2 times by 1 test: return QDateTime();
Executed by:
  • tst_QDateTime
2
2104-
2105 QVector<QStringRef> timeParts = parts.at(timePart).split(QLatin1Char(':'));-
2106 if (timeParts.count() < 2
timeParts.count() < 2Description
TRUEnever evaluated
FALSEevaluated 32 times by 3 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkRequest
|| timeParts.count() > 3
timeParts.count() > 3Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 31 times by 3 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkRequest
)
0-32
2107 return
executed 1 time by 1 test: return QDateTime();
Executed by:
  • tst_QDateTime
QDateTime();
executed 1 time by 1 test: return QDateTime();
Executed by:
  • tst_QDateTime
1
2108-
2109 int hour = timeParts.at(0).toInt(&ok);-
2110 if (!ok
!okDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 30 times by 3 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkRequest
)
1-30
2111 return
executed 1 time by 1 test: return QDateTime();
Executed by:
  • tst_QDateTime
QDateTime();
executed 1 time by 1 test: return QDateTime();
Executed by:
  • tst_QDateTime
1
2112-
2113 int minute = timeParts.at(1).toInt(&ok);-
2114 if (!ok
!okDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 29 times by 3 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkRequest
)
1-29
2115 return
executed 1 time by 1 test: return QDateTime();
Executed by:
  • tst_QDateTime
QDateTime();
executed 1 time by 1 test: return QDateTime();
Executed by:
  • tst_QDateTime
1
2116-
2117 int second = 0;-
2118 int millisecond = 0;-
2119 if (timeParts.count() > 2
timeParts.count() > 2Description
TRUEevaluated 28 times by 3 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkRequest
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDateTime
) {
1-28
2120 const QVector<QStringRef> secondParts = timeParts.at(2).split(QLatin1Char('.'));-
2121 if (secondParts.size() > 2
secondParts.size() > 2Description
TRUEnever evaluated
FALSEevaluated 28 times by 3 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkRequest
) {
0-28
2122 return
never executed: return QDateTime();
QDateTime();
never executed: return QDateTime();
0
2123 }-
2124-
2125 second = secondParts.first().toInt(&ok);-
2126 if (!ok
!okDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 27 times by 3 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkRequest
) {
1-27
2127 return
executed 1 time by 1 test: return QDateTime();
Executed by:
  • tst_QDateTime
QDateTime();
executed 1 time by 1 test: return QDateTime();
Executed by:
  • tst_QDateTime
1
2128 }-
2129-
2130 if (secondParts.size() > 1
secondParts.size() > 1Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 26 times by 3 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkRequest
) {
1-26
2131 millisecond = secondParts.last().toInt(&ok);-
2132 if (!ok
!okDescription
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDateTime
) {
0-1
2133 return
never executed: return QDateTime();
QDateTime();
never executed: return QDateTime();
0
2134 }-
2135 }
executed 1 time by 1 test: end of block
Executed by:
  • tst_QDateTime
1
2136 }
executed 27 times by 3 tests: end of block
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkRequest
27
2137-
2138 QTime time(hour, minute, second, millisecond);-
2139 if (!time.isValid()
!time.isValid()Description
TRUEnever evaluated
FALSEevaluated 28 times by 3 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkRequest
)
0-28
2140 return
never executed: return QDateTime();
QDateTime();
never executed: return QDateTime();
0
2141-
2142 if (parts.count() == 5
parts.count() == 5Description
TRUEevaluated 15 times by 3 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkRequest
FALSEevaluated 13 times by 1 test
Evaluated by:
  • tst_QDateTime
)
13-15
2143 return
executed 15 times by 3 tests: return QDateTime(date, time, Qt::LocalTime);
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkRequest
QDateTime(date, time, Qt::LocalTime);
executed 15 times by 3 tests: return QDateTime(date, time, Qt::LocalTime);
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QNetworkRequest
15
2144-
2145 QStringRef tz = parts.at(5);-
2146 if (!tz.startsWith(QLatin1String("GMT"), Qt::CaseInsensitive)
!tz.startsWith...seInsensitive)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_QDateTime
)
1-12
2147 return
executed 1 time by 1 test: return QDateTime();
Executed by:
  • tst_QDateTime
QDateTime();
executed 1 time by 1 test: return QDateTime();
Executed by:
  • tst_QDateTime
1
2148 tz = tz.mid(3);-
2149 if (!tz.isEmpty()
!tz.isEmpty()Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_QDateTime
) {
3-9
2150 int offset = fromOffsetString(tz, &ok);-
2151 if (!ok
!okDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 5 times by 1 test
Evaluated by:
  • tst_QDateTime
)
4-5
2152 return
executed 4 times by 1 test: return QDateTime();
Executed by:
  • tst_QDateTime
QDateTime();
executed 4 times by 1 test: return QDateTime();
Executed by:
  • tst_QDateTime
4
2153 return
executed 5 times by 1 test: return QDateTime(date, time, Qt::OffsetFromUTC, offset);
Executed by:
  • tst_QDateTime
QDateTime(date, time, Qt::OffsetFromUTC, offset);
executed 5 times by 1 test: return QDateTime(date, time, Qt::OffsetFromUTC, offset);
Executed by:
  • tst_QDateTime
5
2154 } else {-
2155 return
executed 3 times by 1 test: return QDateTime(date, time, Qt::UTC);
Executed by:
  • tst_QDateTime
QDateTime(date, time, Qt::UTC);
executed 3 times by 1 test: return QDateTime(date, time, Qt::UTC);
Executed by:
  • tst_QDateTime
3
2156 }-
2157 }-
2158-
2159 }-
2160-
2161 return
never executed: return QDateTime();
QDateTime();
never executed: return QDateTime();
0
2162}-
2163QDateTime QDateTime::fromString(const QString &string, const QString &format)-
2164{-
2165-
2166 QTime time;-
2167 QDate date;-
2168-
2169 QDateTimeParser dt(QVariant::DateTime, QDateTimeParser::FromString);-
2170 if (dt.parseFormat(format)
dt.parseFormat(format)Description
TRUEevaluated 49 times by 4 tests
Evaluated by:
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
FALSEnever evaluated
&& dt.fromString(string, &date, &time)
dt.fromString(... &date, &time)Description
TRUEevaluated 41 times by 4 tests
Evaluated by:
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_QDateTime
)
0-49
2171 return
executed 41 times by 4 tests: return QDateTime(date, time);
Executed by:
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
QDateTime(date, time);
executed 41 times by 4 tests: return QDateTime(date, time);
Executed by:
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QNetworkCookieJar
  • tst_QNetworkReply
41
2172-
2173-
2174-
2175-
2176 return
executed 8 times by 1 test: return QDateTime();
Executed by:
  • tst_QDateTime
QDateTime();
executed 8 times by 1 test: return QDateTime();
Executed by:
  • tst_QDateTime
8
2177}-
2178QDataStream &operator<<(QDataStream &out, const QDate &date)-
2179{-
2180 if (out.version() < QDataStream::Qt_5_0
out.version() ...Stream::Qt_5_0Description
TRUEevaluated 248 times by 4 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QSettings
  • tst_QVariant
FALSEevaluated 495 times by 10 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QVariant
)
248-495
2181 return
executed 248 times by 4 tests: return out << quint32(date.jd);
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QSettings
  • tst_QVariant
out << quint32(date.jd);
executed 248 times by 4 tests: return out << quint32(date.jd);
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QSettings
  • tst_QVariant
248
2182 else-
2183 return
executed 495 times by 10 tests: return out << qint64(date.jd);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QVariant
out << qint64(date.jd);
executed 495 times by 10 tests: return out << qint64(date.jd);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QVariant
495
2184}-
2185QDataStream &operator>>(QDataStream &in, QDate &date)-
2186{-
2187 if (in.version() < QDataStream::Qt_5_0
in.version() <...Stream::Qt_5_0Description
TRUEevaluated 250 times by 4 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QSettings
  • tst_QVariant
FALSEevaluated 491 times by 10 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QVariant
) {
250-491
2188 quint32 jd;-
2189 in >> jd;-
2190-
2191 date.jd = (jd != 0
jd != 0Description
TRUEevaluated 234 times by 3 tests
Evaluated by:
  • tst_QDate
  • tst_QDateTime
  • tst_QSettings
FALSEevaluated 16 times by 2 tests
Evaluated by:
  • tst_QDate
  • tst_QVariant
? jd : QDate::nullJd());
16-234
2192 }
executed 250 times by 4 tests: end of block
Executed by:
  • tst_QDate
  • tst_QDateTime
  • tst_QSettings
  • tst_QVariant
else {
250
2193 qint64 jd;-
2194 in >> jd;-
2195 date.jd = jd;-
2196 }
executed 491 times by 10 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QVariant
491
2197-
2198 return
executed 741 times by 10 tests: return in;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QVariant
in;
executed 741 times by 10 tests: return in;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QVariant
741
2199}-
2200QDataStream &operator<<(QDataStream &out, const QTime &time)-
2201{-
2202 if (out.version() >= QDataStream::Qt_4_0
out.version() ...Stream::Qt_4_0Description
TRUEevaluated 872 times by 9 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDateTime
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QVariant
FALSEevaluated 73 times by 2 tests
Evaluated by:
  • tst_QDataStream
  • tst_QDateTime
) {
73-872
2203 return
executed 872 times by 9 tests: return out << quint32(time.mds);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDateTime
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QVariant
out << quint32(time.mds);
executed 872 times by 9 tests: return out << quint32(time.mds);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDateTime
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QVariant
872
2204 } else {-
2205-
2206 return
executed 73 times by 2 tests: return out << quint32(time.isNull() ? 0 : time.mds);
Executed by:
  • tst_QDataStream
  • tst_QDateTime
out << quint32(time.isNull() ? 0 : time.mds);
executed 73 times by 2 tests: return out << quint32(time.isNull() ? 0 : time.mds);
Executed by:
  • tst_QDataStream
  • tst_QDateTime
73
2207 }-
2208}-
2209QDataStream &operator>>(QDataStream &in, QTime &time)-
2210{-
2211 quint32 ds;-
2212 in >> ds;-
2213 if (in.version() >= QDataStream::Qt_4_0
in.version() >...Stream::Qt_4_0Description
TRUEevaluated 870 times by 9 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDateTime
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QVariant
FALSEevaluated 73 times by 2 tests
Evaluated by:
  • tst_QDataStream
  • tst_QDateTime
) {
73-870
2214 time.mds = int(ds);-
2215 }
executed 870 times by 9 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDateTime
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QVariant
else {
870
2216-
2217 time.mds = (
(ds == 0)Description
TRUEevaluated 25 times by 2 tests
Evaluated by:
  • tst_QDataStream
  • tst_QDateTime
FALSEevaluated 48 times by 1 test
Evaluated by:
  • tst_QDateTime
ds == 0)
(ds == 0)Description
TRUEevaluated 25 times by 2 tests
Evaluated by:
  • tst_QDataStream
  • tst_QDateTime
FALSEevaluated 48 times by 1 test
Evaluated by:
  • tst_QDateTime
? QTime::NullTime : int(ds);
25-48
2218 }
executed 73 times by 2 tests: end of block
Executed by:
  • tst_QDataStream
  • tst_QDateTime
73
2219 return
executed 943 times by 9 tests: return in;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDateTime
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QVariant
in;
executed 943 times by 9 tests: return in;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDateTime
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QVariant
943
2220}-
2221QDataStream &operator<<(QDataStream &out, const QDateTime &dateTime)-
2222{-
2223 QPair<QDate, QTime> dateAndTime;-
2224-
2225 if (out.version() >= QDataStream::Qt_5_2
out.version() ...Stream::Qt_5_2Description
TRUEevaluated 325 times by 9 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDateTime
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QVariant
FALSEevaluated 168 times by 3 tests
Evaluated by:
  • tst_QDateTime
  • tst_QNetworkDiskCache
  • tst_QVariant
) {
168-325
2226-
2227-
2228 dateAndTime = dateTime.d->getDateTime();-
2229 out << dateAndTime << qint8(dateTime.timeSpec());-
2230 if (dateTime.timeSpec() == Qt::OffsetFromUTC
dateTime.timeS...:OffsetFromUTCDescription
TRUEevaluated 11 times by 3 tests
Evaluated by:
  • tst_QDateTime
  • tst_QNetworkDiskCache
  • tst_QSettings
FALSEevaluated 314 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDateTime
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QVariant
)
11-314
2231 out << qint32(dateTime.offsetFromUtc());
executed 11 times by 3 tests: out << qint32(dateTime.offsetFromUtc());
Executed by:
  • tst_QDateTime
  • tst_QNetworkDiskCache
  • tst_QSettings
11
2232-
2233 else if (dateTime.timeSpec() == Qt::TimeZone
dateTime.timeS...= Qt::TimeZoneDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 313 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDateTime
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QVariant
)
1-313
2234 out << dateTime.timeZone();
executed 1 time by 1 test: out << dateTime.timeZone();
Executed by:
  • tst_QDateTime
1
2235-
2236-
2237 }
executed 325 times by 9 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDateTime
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QVariant
else if (out.version() == QDataStream::Qt_5_0
out.version() ...Stream::Qt_5_0Description
TRUEevaluated 9 times by 2 tests
Evaluated by:
  • tst_QDateTime
  • tst_QVariant
FALSEevaluated 159 times by 3 tests
Evaluated by:
  • tst_QDateTime
  • tst_QNetworkDiskCache
  • tst_QVariant
) {
9-325
2238-
2239-
2240-
2241-
2242-
2243 dateAndTime = (dateTime.isValid()
dateTime.isValid()Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QVariant
? dateTime.toUTC() : dateTime).d->getDateTime();
1-8
2244 out << dateAndTime << qint8(dateTime.timeSpec());-
2245-
2246 }
executed 9 times by 2 tests: end of block
Executed by:
  • tst_QDateTime
  • tst_QVariant
else if (out.version() >= QDataStream::Qt_4_0
out.version() ...Stream::Qt_4_0Description
TRUEevaluated 87 times by 3 tests
Evaluated by:
  • tst_QDateTime
  • tst_QNetworkDiskCache
  • tst_QVariant
FALSEevaluated 72 times by 1 test
Evaluated by:
  • tst_QDateTime
) {
9-87
2247-
2248-
2249 dateAndTime = dateTime.d->getDateTime();-
2250 out << dateAndTime;-
2251 switch (dateTime.timeSpec()) {-
2252 case
executed 56 times by 1 test: case Qt::UTC:
Executed by:
  • tst_QDateTime
Qt::UTC:
executed 56 times by 1 test: case Qt::UTC:
Executed by:
  • tst_QDateTime
56
2253 out << (qint8)QDateTimePrivate::UTC;-
2254 break;
executed 56 times by 1 test: break;
Executed by:
  • tst_QDateTime
56
2255 case
executed 1 time by 1 test: case Qt::OffsetFromUTC:
Executed by:
  • tst_QNetworkDiskCache
Qt::OffsetFromUTC:
executed 1 time by 1 test: case Qt::OffsetFromUTC:
Executed by:
  • tst_QNetworkDiskCache
1
2256 out << (qint8)QDateTimePrivate::OffsetFromUTC;-
2257 break;
executed 1 time by 1 test: break;
Executed by:
  • tst_QNetworkDiskCache
1
2258 case
never executed: case Qt::TimeZone:
Qt::TimeZone:
never executed: case Qt::TimeZone:
0
2259 out << (qint8)QDateTimePrivate::TimeZone;-
2260 break;
never executed: break;
0
2261 case
executed 30 times by 3 tests: case Qt::LocalTime:
Executed by:
  • tst_QDateTime
  • tst_QNetworkDiskCache
  • tst_QVariant
Qt::LocalTime:
executed 30 times by 3 tests: case Qt::LocalTime:
Executed by:
  • tst_QDateTime
  • tst_QNetworkDiskCache
  • tst_QVariant
30
2262 out << (qint8)QDateTimePrivate::LocalUnknown;-
2263 break;
executed 30 times by 3 tests: break;
Executed by:
  • tst_QDateTime
  • tst_QNetworkDiskCache
  • tst_QVariant
30
2264 }-
2265-
2266 }
executed 87 times by 3 tests: end of block
Executed by:
  • tst_QDateTime
  • tst_QNetworkDiskCache
  • tst_QVariant
else {
87
2267-
2268-
2269 dateAndTime = dateTime.d->getDateTime();-
2270 out << dateAndTime;-
2271-
2272 }
executed 72 times by 1 test: end of block
Executed by:
  • tst_QDateTime
72
2273-
2274 return
executed 493 times by 9 tests: return out;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDateTime
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QVariant
out;
executed 493 times by 9 tests: return out;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDateTime
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QVariant
493
2275}-
2276QDataStream &operator>>(QDataStream &in, QDateTime &dateTime)-
2277{-
2278 QDate dt;-
2279 QTime tm;-
2280 qint8 ts = 0;-
2281 Qt::TimeSpec spec = Qt::LocalTime;-
2282 qint32 offset = 0;-
2283-
2284 QTimeZone tz;-
2285-
2286-
2287 if (in.version() >= QDataStream::Qt_5_2
in.version() >...Stream::Qt_5_2Description
TRUEevaluated 303 times by 9 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDateTime
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QVariant
FALSEevaluated 116 times by 3 tests
Evaluated by:
  • tst_QDateTime
  • tst_QNetworkDiskCache
  • tst_QVariant
) {
116-303
2288-
2289-
2290 in >> dt >> tm >> ts;-
2291 spec = static_cast<Qt::TimeSpec>(ts);-
2292 if (spec == Qt::OffsetFromUTC
spec == Qt::OffsetFromUTCDescription
TRUEevaluated 11 times by 3 tests
Evaluated by:
  • tst_QDateTime
  • tst_QNetworkDiskCache
  • tst_QSettings
FALSEevaluated 292 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDateTime
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QVariant
) {
11-292
2293 in >> offset;-
2294 dateTime = QDateTime(dt, tm, spec, offset);-
2295-
2296 }
executed 11 times by 3 tests: end of block
Executed by:
  • tst_QDateTime
  • tst_QNetworkDiskCache
  • tst_QSettings
else if (spec == Qt::TimeZone
spec == Qt::TimeZoneDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QDateTime
FALSEevaluated 291 times by 8 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDateTime
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QVariant
) {
1-291
2297 in >> tz;-
2298 dateTime = QDateTime(dt, tm, tz);-
2299-
2300 }
executed 1 time by 1 test: end of block
Executed by:
  • tst_QDateTime
else {
1
2301 dateTime = QDateTime(dt, tm, spec);-
2302 }
executed 291 times by 8 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDateTime
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QVariant
291
2303-
2304 } else if (in.version() == QDataStream::Qt_5_0
in.version() =...Stream::Qt_5_0Description
TRUEevaluated 6 times by 2 tests
Evaluated by:
  • tst_QDateTime
  • tst_QVariant
FALSEevaluated 110 times by 3 tests
Evaluated by:
  • tst_QDateTime
  • tst_QNetworkDiskCache
  • tst_QVariant
) {
6-110
2305-
2306-
2307 in >> dt >> tm >> ts;-
2308 spec = static_cast<Qt::TimeSpec>(ts);-
2309 dateTime = QDateTime(dt, tm, Qt::UTC);-
2310 dateTime = dateTime.toTimeSpec(spec);-
2311-
2312 }
executed 6 times by 2 tests: end of block
Executed by:
  • tst_QDateTime
  • tst_QVariant
else if (in.version() >= QDataStream::Qt_4_0
in.version() >...Stream::Qt_4_0Description
TRUEevaluated 62 times by 3 tests
Evaluated by:
  • tst_QDateTime
  • tst_QNetworkDiskCache
  • tst_QVariant
FALSEevaluated 48 times by 1 test
Evaluated by:
  • tst_QDateTime
) {
6-62
2313-
2314-
2315 in >> dt >> tm >> ts;-
2316 switch ((QDateTimePrivate::Spec)ts) {-
2317 case
executed 28 times by 1 test: case QDateTimePrivate::UTC:
Executed by:
  • tst_QDateTime
QDateTimePrivate::UTC:
executed 28 times by 1 test: case QDateTimePrivate::UTC:
Executed by:
  • tst_QDateTime
28
2318 spec = Qt::UTC;-
2319 break;
executed 28 times by 1 test: break;
Executed by:
  • tst_QDateTime
28
2320 case
executed 2 times by 1 test: case QDateTimePrivate::OffsetFromUTC:
Executed by:
  • tst_QNetworkDiskCache
QDateTimePrivate::OffsetFromUTC:
executed 2 times by 1 test: case QDateTimePrivate::OffsetFromUTC:
Executed by:
  • tst_QNetworkDiskCache
2
2321 spec = Qt::OffsetFromUTC;-
2322 break;
executed 2 times by 1 test: break;
Executed by:
  • tst_QNetworkDiskCache
2
2323 case
never executed: case QDateTimePrivate::TimeZone:
QDateTimePrivate::TimeZone:
never executed: case QDateTimePrivate::TimeZone:
0
2324 spec = Qt::TimeZone;-
2325-
2326-
2327-
2328 break;
never executed: break;
0
2329 case
executed 32 times by 3 tests: case QDateTimePrivate::LocalUnknown:
Executed by:
  • tst_QDateTime
  • tst_QNetworkDiskCache
  • tst_QVariant
QDateTimePrivate::LocalUnknown:
executed 32 times by 3 tests: case QDateTimePrivate::LocalUnknown:
Executed by:
  • tst_QDateTime
  • tst_QNetworkDiskCache
  • tst_QVariant
32
2330 case
never executed: case QDateTimePrivate::LocalStandard:
QDateTimePrivate::LocalStandard:
never executed: case QDateTimePrivate::LocalStandard:
0
2331 case
never executed: case QDateTimePrivate::LocalDST:
QDateTimePrivate::LocalDST:
never executed: case QDateTimePrivate::LocalDST:
0
2332 spec = Qt::LocalTime;-
2333 break;
executed 32 times by 3 tests: break;
Executed by:
  • tst_QDateTime
  • tst_QNetworkDiskCache
  • tst_QVariant
32
2334 }-
2335 dateTime = QDateTime(dt, tm, spec, offset);-
2336-
2337 }
executed 62 times by 3 tests: end of block
Executed by:
  • tst_QDateTime
  • tst_QNetworkDiskCache
  • tst_QVariant
else {
62
2338-
2339-
2340 in >> dt >> tm;-
2341 dateTime = QDateTime(dt, tm, spec, offset);-
2342-
2343 }
executed 48 times by 1 test: end of block
Executed by:
  • tst_QDateTime
48
2344-
2345 return
executed 419 times by 9 tests: return in;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDateTime
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QVariant
in;
executed 419 times by 9 tests: return in;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDataStream
  • tst_QDateTime
  • tst_QMetaType
  • tst_QNetworkCacheMetaData
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QVariant
419
2346}-
2347-
2348-
2349-
2350-
2351-
2352-
2353-
2354QDebug operator<<(QDebug dbg, const QDate &date)-
2355{-
2356 QDebugStateSaver saver(dbg);-
2357 dbg.nospace() << "QDate(" << date.toString(Qt::ISODate) << ')';-
2358 return
executed 3 times by 2 tests: return dbg;
Executed by:
  • tst_QDate
  • tst_QVariant
dbg;
executed 3 times by 2 tests: return dbg;
Executed by:
  • tst_QDate
  • tst_QVariant
3
2359}-
2360-
2361QDebug operator<<(QDebug dbg, const QTime &time)-
2362{-
2363 QDebugStateSaver saver(dbg);-
2364 dbg.nospace() << "QTime(" << time.toString(([]() -> QString { enum { Size = sizeof(u"" "HH:mm:ss.zzz")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "HH:mm:ss.zzz" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 1 time by 1 test: return qstring_literal_temp;
Executed by:
  • tst_QVariant
qstring_literal_temp;
executed 1 time by 1 test: return qstring_literal_temp;
Executed by:
  • tst_QVariant
}())) << ')';
1
2365 return
executed 1 time by 1 test: return dbg;
Executed by:
  • tst_QVariant
dbg;
executed 1 time by 1 test: return dbg;
Executed by:
  • tst_QVariant
1
2366}-
2367-
2368QDebug operator<<(QDebug dbg, const QDateTime &date)-
2369{-
2370 QDebugStateSaver saver(dbg);-
2371 const Qt::TimeSpec ts = date.timeSpec();-
2372 dbg.nospace() << "QDateTime(";-
2373 dbg.noquote() << date.toString(([]() -> QString { enum { Size = sizeof(u"" "yyyy-MM-dd HH:mm:ss.zzz t")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "yyyy-MM-dd HH:mm:ss.zzz t" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 2 times by 2 tests: return qstring_literal_temp;
Executed by:
  • tst_QNoDebug
  • tst_QVariant
qstring_literal_temp;
executed 2 times by 2 tests: return qstring_literal_temp;
Executed by:
  • tst_QNoDebug
  • tst_QVariant
}()))
2
2374 << ' ' << ts;-
2375 switch (ts) {-
2376 case
never executed: case Qt::UTC:
Qt::UTC:
never executed: case Qt::UTC:
0
2377 break;
never executed: break;
0
2378 case
never executed: case Qt::OffsetFromUTC:
Qt::OffsetFromUTC:
never executed: case Qt::OffsetFromUTC:
0
2379 dbg << ' ' << date.offsetFromUtc() << 's';-
2380 break;
never executed: break;
0
2381 case
never executed: case Qt::TimeZone:
Qt::TimeZone:
never executed: case Qt::TimeZone:
0
2382-
2383 dbg << ' ' << date.timeZone().id();-
2384-
2385 break;
never executed: break;
0
2386 case
executed 2 times by 2 tests: case Qt::LocalTime:
Executed by:
  • tst_QNoDebug
  • tst_QVariant
Qt::LocalTime:
executed 2 times by 2 tests: case Qt::LocalTime:
Executed by:
  • tst_QNoDebug
  • tst_QVariant
2
2387 break;
executed 2 times by 2 tests: break;
Executed by:
  • tst_QNoDebug
  • tst_QVariant
2
2388 }-
2389 return
executed 2 times by 2 tests: return dbg << ')';
Executed by:
  • tst_QNoDebug
  • tst_QVariant
dbg << ')';
executed 2 times by 2 tests: return dbg << ')';
Executed by:
  • tst_QNoDebug
  • tst_QVariant
2
2390}-
2391uint qHash(const QDateTime &key, uint seed)-
2392{-
2393-
2394-
2395-
2396-
2397 return
executed 16 times by 1 test: return qHash(key.toMSecsSinceEpoch(), seed);
Executed by:
  • tst_QDateTime
qHash(key.toMSecsSinceEpoch(), seed);
executed 16 times by 1 test: return qHash(key.toMSecsSinceEpoch(), seed);
Executed by:
  • tst_QDateTime
16
2398}-
2399-
2400-
2401-
2402-
2403-
2404-
2405-
2406uint qHash(const QDate &key, uint seed) noexcept-
2407{-
2408 return
executed 6 times by 1 test: return qHash(key.toJulianDay(), seed);
Executed by:
  • tst_QDate
qHash(key.toJulianDay(), seed);
executed 6 times by 1 test: return qHash(key.toJulianDay(), seed);
Executed by:
  • tst_QDate
6
2409}-
2410-
2411-
2412-
2413-
2414-
2415-
2416-
2417uint qHash(const QTime &key, uint seed) noexcept-
2418{-
2419 return
executed 4 times by 1 test: return qHash(key.msecsSinceStartOfDay(), seed);
Executed by:
  • tst_QTime
qHash(key.msecsSinceStartOfDay(), seed);
executed 4 times by 1 test: return qHash(key.msecsSinceStartOfDay(), seed);
Executed by:
  • tst_QTime
4
2420}-
2421-
2422-
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9