summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Allow to use short names for Windows Registry root keysSebastian Schuberth2013-10-071-0/+13
| | | | | | Change-Id: I58b7681bb49e93b7577bc559d754c81d3c6f007b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Replace QLoggingCategory::isEnabled by non-template functionshjk2013-10-061-18/+20
| | | | | | | | | This yields the same results as previously and is more in line with existing interfaces. Change-Id: I0bf0372bf18f3bfde579385cddbe594bf71e3c52 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Fix potential crash: adding int to stringFrederik Gladhorn2013-10-041-1/+1
| | | | | | | | | | | | | qtbase/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp:652:36: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int] f.write(QByteArray("i am " + i)); ~~~~~~~~^~~ qtbase/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp:652:36: note: use array indexing to silence this warning f.write(QByteArray("i am " + i)); ^ & [ ] Change-Id: Icc966559be3c2cde3416193b8a1ddab7e0323ade Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix temporary file leak in tst_qfiledialog2.Friedemann Kleint2013-10-031-6/+5
| | | | | | | Change-Id: I5a1e601e3aa6e84300efa09bfbd9232fecab903e Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com> Reviewed-by: David Faure <david.faure@kdab.com>
* Fix QStandardPath test on some linuxesFrederik Gladhorn2013-10-021-5/+8
| | | | | | | | On one suse box I have both /usr/bin/sh and /bin/sh which means that the test should prefer the one first in the path instead of random order. Change-Id: Ie94bf8404479fa42a36a8ee45e09986114693871 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* AccessibleRelation::get_relationType didn't handle all enum values.Jan Arve Saether2013-10-021-4/+59
| | | | | | Add some more tests for relations Change-Id: I934cd6aed36ca5ca88786325ed364fbc3abfc6f7 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Base tst_QGuiApplication on tst_QCoreApplication to increase GUI ED coverageTor Arne Vestbø2013-10-015-49/+122
| | | | | | | | | | The QCoreApplication test has quite a few test cases that we would like to exercise using the GUI event-dispatcher. Instead of duplicating the tests for the GUI dispatcher, we inherit tst_QCoreApplication, which also lets us add extra tests that are specific to tst_QGuiApplication. Change-Id: Ib411457131b8d3fed871f682c1c0568577f6127d Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Fix temporary directory leak in tst_qsavefile.Friedemann Kleint2013-10-011-45/+24
| | | | | | | Task-number: QTBUG-33769 Change-Id: I5177f09df22fd2b9b0d9eca4301c383c600d5ab8 Reviewed-by: David Faure <david.faure@kdab.com>
* OpenGL autotests: verify create()/makeCurrent()Andrew Knight2013-09-302-16/+16
| | | | | | | If create() or makeCurrent() calls fail, the test should fail fast. Change-Id: I025c541f94c8eee492cf0e1545bfbb8027eff2a7 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* tst_qsavefile: Check temporary dir and output open errors.Friedemann Kleint2013-09-301-12/+27
| | | | | Change-Id: Id28306ad414050a37b7779525f36edc3e15281b5 Reviewed-by: David Faure <david.faure@kdab.com>
* QDateTime - Fix round-trip of second occurrence timesJohn Layt2013-09-271-24/+6
| | | | | | | | | | | | | | | | | | | | | | | At the Daylight Tme to Standard Time transition, the local time repeats itself, i.e. 2am occurs twice. Qt's behavior when setting this using the local time is ambiguous, as it depends on the system implementation of mktime, which behaves differently on different platforms. Currently this behavior remains undefined. When setting using an msecs or time_t value however we can determine the correct instance to use and cache it to ensure that any conversion back from local time to msecs is performed consistantly on all platforms. Note that caching this value will result in any calculations being wrong should the system time zone change, or its rules change. This will be fixed in Qt 5.3 when the system time zone change signal is implemented and QDateTime switches to using QTimeZone instead of mktime to provide consistnt behavior across platforms. The QTimeZone spec does not require this fix as it already caches the correct offset in setMSecsFromEpoch(). Change-Id: I799588db474e744a6d81e80f6a0442920569ebd3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Mac: QWizard default background pixmap works againLiang Qi2013-09-261-16/+4
| | | | | | | | Task-number: QTBUG-26722 Change-Id: I579111b5d34f8e3cdc6bb016d9c0e42ec3ffb8c9 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Stephen Chu <stephen@ju-ju.com>
* QLocale - Fix Mac date format code translationJohn Layt2013-09-261-4/+1
| | | | | | | | | | | | | | | | | | | | Mac uses the CLDR format codes which need to be translated into their Qt equivalent. The existing code mistranslates the year code, is outdated for a number of new codes introduced in recent versions of CLDR, and by default accepted any codes it didn't recognize. This change updates support to the latest version of CLDR, fixes the treatment of years, and defaults to ignoring any new format codes added in the future. Note that this change cannot have auto tests written as the system locale formats change between versions of OSX. Testing must be done manually by changing system locale and formats. Task-number: QTBUG-25057 Change-Id: I69dda25b4a0b38d3971995644546306876922d57 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* QString::reserve fix to avoid truncationMarko Pellikka2013-09-261-0/+12
| | | | | | | | | | In case of implicit memory sharing, QString::reserve caused data truncation if given size was smaller than size of data. Task-number: QTBUG-29664 Change-Id: If2da5ad051385635ebb829c18b5ebaa349f08e8a Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Expose QTest::currentAppName() and remove hard-coded argv[0] in testsTor Arne Vestbø2013-09-266-31/+39
| | | | | | | | Except where we're actually testing QCoreApplication::applicationName() and friends. Change-Id: I25514884c11f43a4f82b1f818f822dc3d79f69a3 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* tst_QNetworkReply: Don't remove file if never createdTor Arne Vestbø2013-09-261-1/+2
| | | | | | | If we end up QSKIP'ing the test 'wronlyFileName' is never created. Change-Id: I2ccbfdb630b58d7904e73b476a65a82a45ab90d7 Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
* Add QKeySequenceEditIvan Komissarov2013-09-244-0/+111
| | | | | Change-Id: I497309d3e6cbf38b298afb5ff3cb1ed6a0e82000 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* moc: Don't stumble over MSVC __declspec.Stephen Kelly2013-09-241-3/+10
| | | | | | | | | Commit 310031188c6 (Fix moc stumbling over gcc __attribute__ extensions, 2012-10-01) applied similar logic for GNU style attributes. Change-Id: I550eaefd703b4e974e6ffae7716f02074c8a8823 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* When calling setPageSizeMM then the size needs to be passed as MMAndy Shaw2013-09-231-0/+1
| | | | | | | | This simplifies the code a bit and ensures that it is respecting what the relevant function expects the size to be as. Change-Id: Iec88fab84c27a33d6f1a9e9413ea6beb0a39c68d Reviewed-by: John Layt <jlayt@kde.org>
* Fix a c&p bug in the IA2 bridge when returning the row descriptionJan Arve Saether2013-09-231-2/+7
| | | | | | | | Unfortunately we returned the column description when the AT client asked for the row description.... Change-Id: I46bc0edb4fd0f7cc6d98d7d6e0d8ca6f77553a26 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* tst_QReadWriteLock: replace a volatile bool with an atomic intMarc Mutz2013-09-231-6/+6
| | | | | | | | Fixes the obvious race between the test of 'release' in the thread and the setting of 'release' in the test function. Change-Id: I92df52d7b18e8154f17229a3dbd4a0e58f4a3b5b Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* tst_QMutex: fix a raceMarc Mutz2013-09-231-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code uses a QSignalSpy to check whether the thread started, but the signal emission (and subsequent appending to the spy) and the check for spy.count() before the final thr.wait() are not synchronized: The signal emission happens-after the thr.start() and -before the final thr.wait(). Likewise, the spy.count() happens-after thr.start() and -before thr.wait(), but neither one happens-before the other. Thus, there is a data race. The wait(200) between thr.start() and mutex.unlock() doesn't help, either, because we check only that it doesn't return true, iow, we check that it timed out. But it will happily do that if the thread has not yet started executing, so there's no happens-before relation to be had via that avenue, either. I first fixed by moving the spy.count() check to after thr.wait(). In that case: signal emission happens-before thread finishing happens-before thr.wait() returning happens-before spy.count() so no race. Arguably, that makes the check rather useless, so I decided to remove it completely. Change-Id: I6bb47c4114961ee6e9251cfebeb4b7794ba674a9 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QDateTime - Remove some benchmark testsJohn Layt2013-09-231-83/+0
| | | | | | | | Remove benchmark tests that are no longer required as they are simple overloads of other methods. Change-Id: I610211543d17c077f482fa2145ac3da7d0767282 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDateTime - Add QTimeZone supportJohn Layt2013-09-233-1/+302
| | | | | | | | | | | Add support to QDateTime for time zones using the new QTimeZone class. [ChangeLog][QtCore][QDateTime] Add support for a new Qt::TimeZone spec to be used with QTimeZone to define times in a specific time zone. Change-Id: I21bfa52a8ba8989b55bb74e025d1f2b2b623b2a7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QTimeZone - Add Windows backendJohn Layt2013-09-231-25/+84
| | | | | | | Add backend implementation for Windows times zones. Change-Id: I30946f6672488c3f1d1d05754e9479aa62cce46f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QTimeZone - Add Mac backendJohn Layt2013-09-231-0/+50
| | | | | | | Add Mac backend support Change-Id: Iafa2dbd925e18431f571e3eac62983015f8bc977 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QTimeZone - Add TZ File BackendJohn Layt2013-09-221-0/+138
| | | | | | | | | | Add a backend for TZ Files. If available uses ICU for the display names and translations, otherwise the abbreviation is used. Change-Id: I58c777462810b1a76ea7bd95886836b70b8a3db5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QTimeZone - Add ICU supportJohn Layt2013-09-221-0/+141
| | | | | | | Add ICU backend for QTimeZone Change-Id: I92e53a848477e366591102064b093e936f0b49d2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QTimeZone - Define new class and apiJohn Layt2013-09-223-0/+509
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement the new QTimeZone class based on the Olsen Time Zone ID's. This is the base implementation and does not include the Platform backends which are implemented separately. This change does include a default UTC backed to be used if no Platform backend is available, i.e. if QT_NO_SYSTEMLOCALE is set and ICU is not configured. This backend also provides a default set of time zones in the standard "UTC+00:00" offset format that are guaranteed to always exist regardless of the Platform backend. This change includes conversion functions between the Olsen ID's and Windows ID's using a conversion table based on Unicode CLDR data. This is implemented for all platforms for scenarios such as a Linux program needing to communicate with a Windows Exchange Server using the Windows ID. The CLDR conversion table is included under the UNICODE license, see http://unicode.org/copyright.html for details. [ChangeLog][QtCore][QTimeZone] Added new QTimeZone class to support time tone calculations using the host platform time zone database and the Olsen time zone ID's. Change-Id: Ibb417d08cf2663a0979d2be855d2c6ad6ad01509 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Q_STATIC_ASSERT: use __COUNTER__ instead of __LINE__ if the compiler supports itMarc Mutz2013-09-221-0/+5
| | | | | | | | | | | When using __LINE__ to construct unique names, use of Q_STATIC_ASSERT is limited to one instance per line of code. On compilers that support __COUNTER__ (GCC and MSVC, probably others), we can get around that limitation by using that one to always get a new unique number, so use it. Change-Id: I89bcfaa32376b7a665f03e4275e89b13fa3e650d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add widget replace function to QLayoutThorbjørn Lund Martsum2013-09-217-2/+276
| | | | | | | Sometimes it is nice to be able to replace a widget in a layout. Change-Id: I23a6a65e417e94d53bc48639503db1a142bc3f10 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Merge branch 'stable' into devSergio Ahumada2013-09-213-0/+128
|\ | | | | | | Change-Id: I37d85631ab1165ab91457d8880c4da907a9df73b
| * Fix QFileSystemWatcher inotifyRiccardo Ferrazzo2013-09-191-0/+81
| | | | | | | | | | | | | | | | | | | | | | On linux using QFileSystemWatcher with inotify backend when a watched file is moved and added again to the watched files its path is not replaced with the new one. This behavior prevents the emission of the fileChanged signal with the wrong file path. Task-number: QTBUG-33211 Change-Id: Ib45d8efdf5afbf8b8f6b4b26e43f3d6ee740aca6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * xcb: QWindow never uses XCB_GRAVITY_CENTERShawn Rutledge2013-09-161-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | Center gravity doesn't mean center the window, it only affects the method of converting between internal window bounds and decorated bounds. So wanting to have each dialog centered w.r.t. its transient parent is not a reason for using center gravity. Instead it caused the bug that when you resize a QMessageBox by clicking the Show Details button, it jumps downwards on the screen. Task-number: QTBUG-32473 Change-Id: I3fabf3caa1e4d10fd4f7508e297f73efe5cc51b6 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
| * tst_QTextLayout: fix unhandled enum value in switch warningMarc Mutz2013-09-161-0/+2
| | | | | | | | | | Change-Id: I006286487a409d492fe398a2fed5dd854f758f9f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* | Add Mac type conversion functions to QtCoreMorten Johan Sørvig2013-09-216-0/+171
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New API: static QString QString::fromCFString(CFStringRef string); CFStringRef QString::toCFString() const; static QString QString::fromNSString(const NSString *string); NSString *QString::toNSString() const; static QUrl QUrl::fromCFURL(CFURLRef url); CFURLRef QUrl::toCFURL() const; static QUrl QUrl::fromNSURL(const NSURL *url); NSURL * QUrl::toNSURL() const; Add Q_OS_MAC-protected function declarations to header files, add implementation to _mm files. CF and NS types are forward-declared in the header files to avoid including the CoreFoundation and Foundation headers. This prevents accidental use of native types in application code. Add helper macros for forward- declaration to qglobal.h Add cf_returns_retained/ns_returns_autoreleased attributes to toCFString() and toNSURL(). These attributes assists the clang static analyzer. Add Q_DECL_ helper macros to qcompilerdetection.h. Add test functions (in _mac.mm files) to the QString and QUrl tests. Split out the test class declarations into a separate headers files. Change-Id: I60fd5e93f042316196284c3db0595835fe8c4ad4 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | Use the correct identifier for the OS X operating system.Jake Petroules2013-09-212-1/+1
| | | | | | | | | | | | | | | | This is consistent with other areas of Qt: qmake, Qt.platform.os (QML), qbs.targetOS (QBS), and #define Q_OS_OSX. Change-Id: Ibf98e6ba3556a14187dadae1b0235e9c907c9001 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Sergio Ahumada2013-09-212-4/+5
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-09-162-4/+5
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qstring.cpp Change-Id: Ifc6cd3a0f1cf14cc0fe6cf30afb0c7f40cfdbc3e
| | * tst_qurlinternal: fix a use of memcpy on overlapping memoryMarc Mutz2013-09-141-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old code smply copied 100 shorts from the pointer passed into the ushortarray ctor, regardless of the actual bounds of the original array. Fix by making the ctor take the array by deference, deducing the size as a template parameter, and only copying that much. Fixes asan trace: ==18660==ERROR: AddressSanitizer: memcpy-param-overlap: memory ranges [0x7fff3c56de00,0x7fff3c56dec8) and [0x7fff3c56dd60, 0x7fff3c56de28) overlap #0 0x457161 in memcpy asan_interceptors.cc:330 #1 0x4c40fe in ushortarray::ushortarray(unsigned short*) qtbase/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp:62 #2 0x4b0437 in ushortarray::ushortarray(unsigned short*) qtbase/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp:63 #3 0x47b643 in tst_QUrlInternal::idna_testsuite_data() qtbase/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp:119 ... Change-Id: Ie497bc8d337bc680a562482ca71ace535797ffb3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * tst_QSettings: add missing () around a macro argument useMarc Mutz2013-09-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'val' was set to QList<...>() << ... << ... further down. Fixes a Clang warning. Change-Id: I5fe80d87dbe2c1d50652dfd7b6c5f4a9198cd467 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QCompleter::setFilterMode() add property filterMode.Oto Magaldadze2013-09-201-0/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QCompleter::setFilterMode(Qt::MatchContains) will enable filtering out entries that contain typed characters in any place, instead of the default behavior when only those entries that start with typed characters are displayed. Qt::MatchEndsWith is also possible. QCompleter::setFilterMode(Qt::MatchStartsWith) will bring the default behavior back. Task-number: QTBUG-3414 Change-Id: I3845704c59eb8fc401e9a650c54a9c934ed28c2e Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | | tst_QPainter: fix a Q_DECLARE_METATYPE coming too lateMarc Mutz2013-09-201-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The compiler complained that the specialization was required before it was issued. Fixed by moving it up to the others near the top of the file. Change-Id: I0ae162a5db5ef29f24cd1d32285a1870fdd24b9b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | | Import qlogger frameworkKai Koehne2013-09-204-0/+831
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge most parts of the qlogger framework from git://gitorious.org/qtplayground/qlogger.git The categorized logging feature is a replacement for qDebug, qWarning and friends. With logging statements in an app/library, a developer can turn on the statements they care about and turn off the ones they don't. Most work for this was done by Wolfgang Beck and Lincoln Ramsay. Task-number: QTBUG-25694 Change-Id: Ib0cdfbbf3694f86ad9ec553b2ea36f09a477cded Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QDateTime - Add api for isDaylightTime()John Layt2013-09-201-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add new method to return if the current time is Daylight Time. [ChangeLog][QtCore][QDateTime] Added new method isDaylightTime() to return if the datetime is in Daylight Time or not. Change-Id: Icb93fd5dd0b2f7d83d2d4643eeb12922c1137e3e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QDateTime - Fix Daylight Transition for "missing" hourJohn Layt2013-09-201-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When Daylight Time transtion goes from Standard Time to Daylight Time there is a "missing" hour, i.e. at 2am CET the clock goes forward to 3am. Currently QDateTime ignores this gap and considers the time to be valid and able to be manipulated. This change respects the transition, so any time set in the missing hour is considered invalid, and any date maths returns valid results. The validity in the current time zone needs to be checked every time isValid() is called in case the system time zone has changed since the last time it was checked. This is done by calling mktime to check the returned result matches the expected result. This could be very inefficient, but the returned offset value is cached each time so mktime is not required to be called again within each method call, effectively meaning mktime is called the same number of times by each method. Note that this means any new methods added must be careful to ensure either isValid() or refreshLocalTime() is called first by any method needing to use the UTC value. [ChangeLog][QtCore][QDateTime] The Standard Time to Daylight Time transition for Qt::LocalTime is now handled correctly. Any date set in the "missing" hour is now considered invalid. All date math results that fall into the missing hour will be automatically adjusted to a valid time in the following hour. Change-Id: Ia652c8511b45df15f4917acf12403ec01a7f08e7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QDateTime - Change date/time storage to msecsJohn Layt2013-09-201-34/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change from storing the date and time as QDate and QTime to a serialised msecs format. This format is a direct translation of the QDate and QTime values, it is not the actual msecs since the Unix epoch. This msecs format ensures we are always able to recreate the original QDate and QTime values, but should still simplify the code and improve performance. Because we no longer store the explicit date and time we need to store their isNull()/isValid() status separately. The changes in storage results in the same memory footprint as before. Note that this change does not optimize the code nor set out to fix the known bugs, it only seeks to maintain the current behavior, although some bugs are fixed implicitly. More bug fixes and optimizations will follow. [ChangeLog][Important Behavior Changes] The supported date range in QDateTime has been reduced to about +/- 292 million years, the range supported by the number of msecs since the Unix epoch of 1 Jan 1970 as stored in a qint64, and as able to be used in the setMSecsSinceEpoch() and toMSecsSinceEpoch() methods. Change-Id: I98804d8781909555d3313a3a7080eb8e70cb46ad Reviewed-by: Sérgio Martins <sergio.martins@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QDateTime - Add Benchmark TestsJohn Layt2013-09-203-0/+612
| | | | | | | | | | | | | | | | | | | | | Add benchmark tests for QDateTime. Change-Id: I839f8bc81e6cae56d93539c7c3f999d9eec10ad7 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* | | test: fix tst_QFont::defaultFamily on Mac OS X 10.8Liang Qi2013-09-201-8/+0
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-32834 Change-Id: Iac771eb0a544ae58d203717c39a13d2d21e3c3ed Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* | | Revert "test: Mark tst_QRawFont::fromFont() as XFAIL"Liang Qi2013-09-201-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The commit 3745b0ca126f46eadfeeb7e3d1d53360dbf800cd resolved this issue. This reverts commit 08d3b0165ae49a9ca019b7074423606492856b70. Task-number: QTBUG-32654 Change-Id: Ie8dba4bd2efb35d44b70c67e59b4fff855edec79 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>