summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Add first/last accessors to QMapMathias Hasselmann2013-09-081-0/+29
| | | | | | | | | | | | | | | QMap explicitly sorts its entries by key value. For an ordered container it's (often?) useful to access the first or last entry, for instance to quickly compute the next key of the mapping. The first entry is easily accessible by the STL begin() method, but for accessing the last entry pretty ugly iterator arithmetics must be applied: *(end() - 1). With their first() and last() accessors the container classes QList and QVector provide a much nicer method of accessing extrema, so for consistency this syntactical sugar also should be applied to QMap. Change-Id: Ibd544acbad8c3ac16f12a1e74362207ea1694375 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* QDateTime - Change debug output to ISO FormatJohn Layt2013-09-061-1/+3
| | | | | | | | | | | Change the debug format from Qt::TextDate to a more detailed ISO style format including better time spec output. [ChangeLog][QtCore][QDateTime] The debug datastream is now an ISO-like format instead of Qt::TextDate Change-Id: Iddbb8199c3bfbf7bca845482617e7a85da43259d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make the automatic 1arg and 2arg metatype macros work with namespaced Qt.Stephen Kelly2013-09-061-0/+25
| | | | | Change-Id: I64aa3cacd0cf57235ad43f089716765b384ef412 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Fix the automatic declaration of smart pointer types.Stephen Kelly2013-09-061-0/+26
| | | | | | | | | | | | Before this patch, qRegisterMetaType<QSharedPointer<double> >("QSharedPointer<double>") without a metatype declaration fails to compile, whereas it works with Qt 5.1 (ie, before commit e9a69c3ba928bd88974563b386b000ad6583f969) Change-Id: I9408f711c9df810ff29b879b7696dab81c1160f1 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* QDateTime - Clean up Qt::DateFormat formatting and parsingJohn Layt2013-09-062-6/+70
| | | | | | | | | | | | | | | | Clean-up the implementation of toString() and fromString() methods in QDate, QTime and QDateTime code to be more consistent in ISODate and TextDate behavior, especially when handling TimeSpec. Reformat some code so all methods are consistent in appearance and function to make maintenance easier. This changes some corner-case behavior in TextDate and ISODate, but this either fixes bugs or makes the behavior match the documentation. Change-Id: I457aa1d7cd4f448cd9f8a2e80ec635f3cb98e58c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* QDateTime - Switch to using the QLocale date formatterJohn Layt2013-09-051-57/+7
| | | | | | | | | | Switch the implementation of toString() methods in QDate, QTime and QDateTime to use the QLocale formatter, and remove the now redundant QDateTime formatter. Change-Id: Ie4f17c8a6e31acde3ce066f19835bb2b83351ce8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* QLocale - Improve date formatterJohn Layt2013-09-051-0/+100
| | | | | | | | | | | | | | | | Modify the QLocale date formatter to be consistent with the QDateTime date formatter and able to replace the QDateTime formatter in a subsequent change. Fix the treatment of negative years. The internal QLocale::timeZone() has been replaced by the QDateTime::timeZoneAbbreviation() to ensure the correct tz for the date/time is used rather than always the current system default. Change-Id: I2ef26700856e2e69b979069226aa504ecbb50071 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* add QProcess::InputChannelModeOswald Buddenhagen2013-09-052-7/+19
| | | | | | | | | | | this enables forwarding standard input from the parent process. Change-Id: I7ee72b9842acc96320d4da693b95dd15d9a7b4d4 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* add QProcess::Forwarded{Output,Error}ChannelOswald Buddenhagen2013-09-052-9/+43
| | | | | | | Change-Id: Ifc5ed20c38f3228ef25c28681f296d0456b61abe Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QVariant: Make it possible to extract a QObject* from a wrapper without ↵Stephen Kelly2013-09-051-0/+1
| | | | | | | conversion. Change-Id: I3a054d87d12e08d72dd4c77b6d467dc63f9a2231 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QVariant: Don't crash when doing user-defined conversion to QObject*Stephen Kelly2013-09-051-0/+36
| | | | | | | | | The destructor of the ConverterFunctor calls unregisterConverter. If the instance is static (as it is in qmetatype.h), then this method can be called after the QGlobalStatic has already been destroyed. Change-Id: I33b70734cbe09dfa888e887280c349e43ad1b855 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* fix warnings - qprocess needs a qcoreapp instanceOswald Buddenhagen2013-09-051-1/+4
| | | | | Change-Id: Icf36c2e76595d8f2ed470da13e78c465cfa962f9 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* remove redundant forwardedChannels() testOswald Buddenhagen2013-09-051-21/+0
| | | | | | | | | forwardedChannelsOutput() actually tests forwarding. also having the older test only eats CPU cycles. rename the new test to the old name for clarity. Change-Id: I16a326c8692bb594d7df7897bc53d31b23c66d90 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* make error reporting in forwardedChannelsOutput test more usefulOswald Buddenhagen2013-09-052-6/+16
| | | | | Change-Id: I0350ddfd6740d2a2cd3e0f49220cdaa83b854abf Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* micro-optimization/-clarificationOswald Buddenhagen2013-09-051-4/+4
| | | | | | | | | close stdin and let the process finish right away instead of first waiting for a reaction (which is not supposed to come) and then finishing. Change-Id: Ifcf200eead5ed95217843e105f9d2dbb5398d646 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Make tst_qalgorithms compliant with the StandardGiuseppe D'Angelo2013-09-051-0/+7
| | | | | | | | | | | | | | §24.4.1 [iterator.traits] of N3337 makes it *mandatory* to define the various types std::iterator_traits<Iterator>::{value,pointer,...} for any given iterator. §24.4.1.2 makes it enough to define them within our iterator class. Change-Id: I1305c8392d224889b09395e30ecc77b194020a15 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Revert "Implement move-ctor and move-assignment-op for QScopedPointer"Stephen Kelly2013-09-052-156/+0
| | | | | | | | | | | | | | | This reverts commit 5b9006bbdba7dcab01b8e640554a7d7a4b64f76b. Also revert "Doc: Enable documentation for QScopedPointer's rvalue ref functions" This reverts commit 5f8416ec659b134db90df7e7f857db77fd27b6ab. Adding a move contructor to QScopedPointer makes no sense, because moving means 'escaping the scope', which breaks the fundamental point of QScopedPointer. Change-Id: I4ac1b108bf199af6e436fa1629aa2d3b93c27724 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add an advisory interruption mechanism to QThread.Corentin Jabot2013-09-051-0/+40
| | | | | | | | | | | | | | To ease interruption of long running tasks, a new method QThread::setInterruptionRequested() can be called. The task can check QThread::isInterruptionRequested() and act upon it by stopping itself. These methods are designed to replace the use of a global variable and other hacky ways to stop a task running in another thread. Change-Id: I17622dd60d2262078210e7e4294ad6c53a6dc179 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Don't assume processEvents(WaitForMoreEvents) will process timersTor Arne Vestbø2013-09-051-4/+2
| | | | | | | | | | | | | The WaitForMoreEvents flag only guarantees that we will process _some_ events -- either if they are in the event queue already, or by sleeping and then waking up to process an event. This event might be a system event, not the timer firing, so a single call to processEvents() is not enough to guarantee that the timer has fired. Instead we do a Q_COMPARE with a timeout, where we continiously process events until we see that the timer fired. Change-Id: I5dc04377f04190f3505be22e877af73d11b7547d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix layouts with expanding items with maximum sizePaul Olav Tvete2013-09-041-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | Layout items with a Preferred size policy would be treated as fixed size if they were in the same layout as an Expanding item (or one with a stretch factor). This occurred e.g. if a layout was configured similar to this: 1. One item with ExpandFlag/stretch but with a maximumSize set, e.g. (100x100). 2. Another item with 'just' GrowFlag, and a maximum size bigger than its size hint. If the above layout was resized to e.g. (200x50) it would cause the expanding item to correctly get the size (100x50), but the 'growing' item would not stretch beyond its size hint. Instead, it would distribute space around both items, behaving as if the 'growing' item was fixed'. The expected behavior is to continue to grow the 'growing' item after the expanding item has reached its size limit. Task-number: QTBUG-33104 Change-Id: Ie410653d905f7ca4d702528dafb269f30a0e4f61 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* QPluginLoader: add 'staticPlugins' functionRichard Moe Gustavsen2013-09-041-1/+1
| | | | | | | | | | | | | | | | | | Currently there is no API to extract the meta data from static plugins. This is needed in e.g QtDeclarative for loading static module plugins. This patch moves the 'staticPlugins' function from QLibraryPrivate into QPluginLoader, and makes it public. As such, we now also export QStaticPlugin. Since an application developer cannot do much with raw metadata, we add a new function QStaticPlugin::metaData() that returns the QJsonObject for the plugin. The old metaData function is renamed 'rawMetaData'. Change-Id: Idb0bf9ad8ebb13340565512e1998b26e762a357e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDateTime - Add api for Time Zone AbbreviationJohn Layt2013-09-031-1/+32
| | | | | | | | | | | | | | | | | Add a new method to return the time zone abbreviation for the current time spec. For LocalTime this is the abbreviation returned by mktime. This new method will later be used in changes to the date formatter and QTimeZone. Note this change does not implement WinCE support. [ChangeLog][QtCore][QDateTime] Add method timeZoneAbbreviation() to return effective time zone abbreviation. Change-Id: I265a5e96c72eb7236974f80f053f1fb341e3c816 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Skip tst_QGraphicsProxyWidget::popup_subwidget on Windows.Friedemann Kleint2013-09-031-0/+3
| | | | | | Task-number: QTBUG-33213 Change-Id: I1c8daa3a859f9d0d760054f1d8934abd84f62f0d Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* Fix test compilation when QT_NO_CURSOR is definedAndrew Knight2013-09-031-3/+11
| | | | | | | | The implicitConstruction() test case will fail to compile if QCursor is unavailable. Change-Id: If26743995505a48da648a2fa2a498debec91c933 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Add QT_NO_PROCESS guards in tests where they are missingAndrew Knight2013-09-039-1/+82
| | | | | | | | | | A handful of tests lack QT_NO_PROCESS guards, making them non-compilable on Qt builds with no QProcess support. This commit does not change QProcess-specific tests, which should be left out of the build using the .pro file mechanism. Change-Id: Iac8562428abc1f59ccbb23bf5c3a919785e41f12 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QHeaderView - add maximum section sizeThorbjørn Martsum2013-09-021-0/+14
| | | | | | | | | | | | | | | When we auto resize it is handy to be able to limit the maximum size (just like the minimum size). [ChangeLog][QtWidgets][QHeaderView]A maximumSize for sections has been introduced. The maximum section size is by default the largest possible section size which in Qt 5.2 has been limited to 1048575 pixels. Task-number: QTBUG-4346 Change-Id: Ida9cbcc11bd5c4498e319df2e6379c69a7033c04 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* item delegates: fix clicking on tristate checkboxes.David Faure2013-09-021-0/+51
| | | | | | | | | QCheckBox cycles through the 3 states, but item delegates didn't do that. Change-Id: Iad1e464341033ca357925fe8064f53bb584459f4 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Sergio Ahumada2013-09-0228-36/+487
|\ | | | | | | refs/staging/dev
| * Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-08-2728-36/+487
| |\ | | | | | | | | | | | | | | | | | | Conflicts: examples/widgets/doc/src/addressbook-fr.qdoc Change-Id: Id1196e8e0c6445f1616c3f29234c974d809f8e48
| | * Add more comparisons to narrow down error case.Stephen Kelly2013-08-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-32927 Change-Id: I83d6def83c37febd8cd83676bff9d74f364ecfad Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Simo Fält <simo.falt@digia.com>
| | * moc generated code should compile with QT_NO_KEYWORDSOlivier Goffart2013-08-221-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Don't use the 'emit' keyword in the moc generated code for properties with MEMBER Task-number: QTBUG-33094 Change-Id: I5a0950e9c7a0dee347a6a6c79098e3e7d4776014 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * moc: Fix related objects containing itselfOlivier Goffart2013-08-221-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This may happen when we have namespaces and the qualified name is used to scope an enum. Task-number: QTBUG-32933 Change-Id: Ic4923bbfb138387bae1e3694172661ace8342089 Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * moc: Issue a warning instead of an error when macro argument mismatchOlivier Goffart2013-08-221-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | moc's C++ is not 100% accurate, so better process the invalid macro with a warning rather than an error. Such errors occurred in the QSKIP macro with variadic arguments since that macro is defined conditionally. It is also causing problem in boost header (cf task QTBUG-29331) Task-number: QTBUG-29331 Change-Id: Ice6a01b675286540d6470c8e36920b7efd39b540 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| | * tests: Make the QT assignments more explicitSergio Ahumada2013-08-2116-32/+15
| | | | | | | | | | | | | | | | | | | | | | | | Remove unused 'QT -= gui' and replace some others with 'QT = core ...' Change-Id: I2d14fae963afc21dbd21a4acdbba2c30cdf8fa61 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| | * CMake: Allow specifying a TARGET in invocations of macros.Stephen Kelly2013-08-216-0/+245
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Forward-port of 9ce60ff509c4ff27fe861fc5b2080f50897a68c4 (Qt4Macros: Allow specifying a TARGET in invokations of macros., 2013-02-26) from cmake.git. This causes the INCLUDE_DIRECTORIES and COMPILE_DEFINITIONS to be used from the specified target when running moc. Change-Id: I868a35ade3c6b059e64d226291cf2046709d86d4 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
| | * Populate INTERFACE_LINK_LIBRARIES property in the cmake files.Stephen Kelly2013-08-215-0/+183
| | | | | | | | | | | | | | | | | | | | | | | | This is new in CMake 2.8.12 and replaces the old properties matching IMPORTED_INTERFACE_LINK_LIBRARIES_<CONFIG>. Change-Id: I5d4c454972f2535f6792e95718c73d80c56ac24c Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
| | * Add debugging output to randomly failing test.Stephen Kelly2013-08-211-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The result at http://thread.gmane.org/gmane.comp.lib.qt.ci-reports/12118 shows an unusual value. The expected output is QDEBUG : tst_QColumnView::scrollTo() last= 0 ; HorizontalOffset= -256 QDEBUG : tst_QColumnView::scrollTo() last= -256 ; HorizontalOffset= -512 QDEBUG : tst_QColumnView::scrollTo() last= -512 ; HorizontalOffset= -768 QDEBUG : tst_QColumnView::scrollTo() last= -768 ; HorizontalOffset= -1024 Change-Id: I8db091f4390cb1a41547d44ca966d172ac278e1a Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | | Fix remaining use of QTEST_NOOP_MAINAndrew Knight2013-09-021-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | QTEST_NOOP_MAIN was removed in Qt 5, but was still in the source of the QProcessEnvironment auto test. Change-Id: I0048c330c9d4e99c46192cc05ffd3b77d404fb6d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jason McDonald <macadder1@gmail.com>
* | | Remove qguieventloop from auto tests if network is unavailableAndrew Knight2013-09-021-0/+3
| | | | | | | | | | | | | | | | | | | | | This test relies on network support. Change-Id: I8918a7fe2f411fcaa2e4300486b8a66c63898221 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | | Remove qopengl auto test when Qt is not configured with OpenGL supportAndrew Knight2013-09-021-0/+2
| | | | | | | | | | | | | | | Change-Id: Id2fbf9308c5dbce5e7778f0d841cc8bda784a80f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | | Revert Mac event loop changes.Morten Johan Sørvig2013-09-022-11/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "Make QGuiApplication::exec() run within NSApplicationMain()" "Make Qt process native and timer events on Cocoa applications" "Cocoa: Fix QFontDialog, QColorDialog auto-tests" This reverts commits 1e14762b8d79118540bd09a84dd3e48f4f5e113e e4b2a0b4bab2a17a65fedafe9bae50af1fe019f6 df7944e7d7dd8b2bbccbd639eff0ab09745d6cc3 Change-Id: I80b65b5ee0297b090f807bd420664233dfc44f7b Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | add QProcess::nullDevice()Oswald Buddenhagen2013-08-301-0/+25
| | | | | | | | | | | | | | | | | | Change-Id: I15273fa3f3ba323a835350153f2a20404f12420b Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QTreeView - fix next focus when there is no current indexThorbjørn Martsum2013-08-302-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before we went through non hidden indexes, but we never considered the visual order. This patch fixes that issue. Though it was wrong before, it probably never was a big problem since it was unlikely that the tree (on logical index 0) was swapped or hidden, but 658e42e77a00596b63823482c9b77644556b647c makes it more likely that problems with wrong focus could occur. Change-Id: Ic7b6cd2df1f8638be1a7c9e6df27f428685869fc Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | | Cocoa: Fix QFontDialog, QColorDialog auto-testsGabriel de Dietrich2013-08-292-17/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new Cocoa event dispatcher made apparent some deficiencies in the way the dialog helpers were being hidden. In particular, we would not stop a dialog helper's modal loop when closing the dialog, resulting in the auto-tests hanging. Also, since the QApplication event loop is runnig with [NSApp run] in the stack, the previous workarounds are no longer needed. Task-number: QTBUG-24321 Change-Id: Ifba713c286638d78a699c319a15683d09714f06f Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* | | QFileDialog: add MIME Type filtersDavid Faure2013-08-292-5/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently just a convenience method for setNameFilters(), it uses QMimeType to create a name filter from the glob patterns and description defined in each MIME type. In the longer term, this API could be used to do proper mimetype-based filtering using QMimeDatabase::mimeTypeForFile() in the builtin QFileDialog (aka "not native"), instead of only looking at globs via the name filters. Change-Id: I0edccf5f30c514481b47cd100d743d1ed7a24024 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | | tst_qthreadpool: fix flaky test I introduced in last commitDavid Faure2013-08-291-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | (dacf9961da86) In order to see 2 active threads, we must check activeThreadCount() before the runnable finishes. Change-Id: I1a48b41e0c1fd81a65d915b9bd1e741ff267ed2b Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | | QLinkedList - extend the auto test.Thorbjørn Martsum2013-08-291-1/+1005
| | | | | | | | | | | | | | | | | | | | | | | | This extends the QLinkedList auto test. This is copy paste with small edits from the QList auto test. Change-Id: I5bce7ee304998d1c7258f11b2f31a7fb87706936 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QDateTime - Extend fromMSecsSinceEpoch APIJohn Layt2013-08-291-7/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add convenience methods for fromMSecsSinceEpoch() and fromTime_t() to enable direct creation of other time specs than LocalTime without the overhead of unncessary conversions. For example instead of: QDateTime dt = fromMSecsSinceEpoch(12345).toUtc(); the following saves two conversions: QDateTime dt = fromMSecsSinceEpoch(12345, Qt:UTC); This will improve the performance of the new QTimeZone class. [ChangeLog][QtCore][QDateTime] Added convenience methods for fromMSecsSinceEpoch() and fromTime_t() to take time spec to be used in returned datetime. Change-Id: I133635bfe3d35ee496a287257e13b2d600225a38 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* | | QDateTime - Improve and expose Qt::OffsetFromUtcJohn Layt2013-08-282-64/+288
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Qt::OffsetFromUtc TimeSpec was made public in Qt 4.4 but the access methods were never made public in the apidox effectively meaning the feature was never used. The implementation was also incomplete and inconsistent. This change cleans up the implementation and exports new public API for using the TimeSpec using new method names consistent with the new QTimeZone support. This change increases the QDataStream Version number for Qt 5.2 to 15. The behavior of one constructor has changed slightly to be consistent with the rest of the feature, but this behavior was never documented. [ChangeLog][QtCore][QDateTime] Fully implement support for Qt::TimeSpec of Qt::OffsetFromUTC, added new methods for offsetFromUTC(), toTimeSpec(), and toOffsetFromUTC(). Task-number: QTBUG-26161 Task-number: QTBUG-29666 Change-Id: If3cc7fc9778ca2b831644408ae749448d5975a3a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* | | QButtonGroup - add buttonToggled signalsThorbjørn Martsum2013-08-282-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QButtonGroup emits signals on clicked, pressed and released for buttons in the group, but for some (insuffienct) reason it did not emit anything for toggle (the only signal that it didn't emit anything for). This patch changes that, by adding handling of that signal to QButtonGroup. Task-number: QTBUG-14857 Change-Id: I88bcd7b060b78c7ff05ea1adf7baaddfe6d463be Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>