summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Add operator[] to QVectorND classesSean Harmer2013-08-271-0/+80
| | | | | | Change-Id: Ia786d4fab64da974bb60f24c05325925d42a1e70 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Add QJsonValue::toInt().Mitch Curtis2013-08-271-4/+18
| | | | | | | | | | | | | | | It's a nice feature to have. MSVC also complains about using doubles to create enum values, so the ugly workaround is: enumValue = MyEnum(qRound(json["myEnumValue"].toDouble())); [ChangeLog][QtCore][QJsonValue]Added QJsonValue::toInt(). Change-Id: I1a200b912abf66b2e96390b1980caff26cfa2685 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QAIV - Fix scollbars with ScrollPerPixel to scroll 1 pixel.Thorbjørn Lund Martsum2013-08-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The documentation says that we scroll one pixel Quote: "QAbstractItemView::ScrollPerPixel (value 1)" "The view will scroll the contents one pixel at a time." However until now Qt has tried to be smarter than the documentation, but is actually getting in the way of the user, where a manual set value to setSingleStep will continuingly be overwritten (on e.g resize). This patch ensures the behavior described in the documentation for the vertical headers - and leaves the control to the user. [ChangeLog][QtWidgets][QAbstractItemView] QTBUG-7232 - In ItemViews scrollbars will now by default only scroll 1 pixel when scrollMode is set to scrollPerPixel. That is it will (when scrollMode is scrollPerPixel) do what is stated in the documentation, and no longer automatically adjust the scrollbars singleStep. The user can now control that value. Task-number: QTBUG-7232 Change-Id: I8a61d3100be65d0c4ee32aad58caed019aa2669c Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Long live QCommandLineParser!David Faure2013-08-246-0/+638
| | | | | | | | | | | | | | The QCommandLineParser class provides a means for handling the command line options. QCoreApplication provides the command-line arguments as a simple list of strings. QCommandLineParser provides the ability to define a set of options, parse the command-line arguments, and store which options have actually been used, as well as option values. Done-with: Laszlo Papp <lpapp@kde.org> Change-Id: Ic7bebc10b3f8d8dd06ad0f4bb897c51d566e3b7c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QLinkedList - fix insert with iterator when the list is shared.Thorbjørn Martsum2013-08-241-0/+19
| | | | | | | | Before a call to erase on a shared instance would imply that the item was inserted into the shared data (i.e all instances) Change-Id: I655ccf04b1ad9bf82e6bfade58929538fa7df000 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QList - fix insert with iterator on shared instanceThorbjørn Martsum2013-08-241-0/+16
| | | | | | | | This patch ensures correct detach when insert with an iterator is called on a shared instance (i.e same behavior as QVector) Change-Id: Id660eacd3cc7b633456dfa989997bbad747e1df2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QLinkedList - fix erase with iterator when the list is shared.Thorbjørn Martsum2013-08-243-0/+83
| | | | | | | | | | | Before a call to erase on a shared instance would imply that the item was removed from the shared data (i.e all instances) This patch improves the behavior to detach and erase the item specified by the iterator (i.e same behavior as QVector) Change-Id: Ib3cfb5363c86b400886c80b75b0c20ca854ce801 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QList - fix QList::erase when the list is sharedThorbjørn Martsum2013-08-241-0/+33
| | | | | | | | | | | | Before calls to erase on a shared instance would in release mode imply that items were removed from the shared data (i.e all instances). In debug mode it would assert. This patch improves the behavior to detach and erase items specified by the iterator(s) (i.e same behavior as QVector) Change-Id: I89b69446cb1ffd43a98402b7ab1ec9a59bceb8e6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QMap - fix erase with iterator when the map is sharedThorbjørn Martsum2013-08-241-0/+57
| | | | | | | | | | | Before a call to erase on a shared instance would imply that the item was removed from the shared data (i.e all instances) This patch improves the behavior to detach and erase the item specified by the iterator (i.e same behavior as QVector) Change-Id: Ia44db84fc1388d92308bf0d2b32539ac4d53850b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QHash/QSet - fix QHash::erase when the hash is sharedThorbjørn Martsum2013-08-241-0/+30
| | | | | | | | | | | | | Before a call to erase on a shared instance would imply that the item was removed from the shared data (i.e all instances) This patch improves the behavior to detach and erase the item specified by the iterator (i.e same behavior as QVector) Since QSet uses QHash it improves QSet the same way. Change-Id: I850b1efcf7bdfc85ceddb23128b048af95f75063 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QThreadPool: fix counting of waiting threadsDavid Faure2013-08-241-0/+56
| | | | | | | | | | | | | | | | | | QTBUG-21051 has a testcase where activeThreadCount() could actually end up at -1 (converted to an autotest in this commit). The reason was: start() calls tryStart() which returns false due to too many active threads (reserveThread() causes this), so it calls enqueueTask() - which actually wakes up the waiting thread, but it didn't decrement the number of waiting threads. Note that tryStart() is "if I can grab a waiting thread, enqueue task and wake it" while start(), in case tryStart() fails, wants to "enqueue, and then if I can grab a waiting thread, wake it". This is why enqueue shouldn't wake; waking must happen only if we can grab a thread (d->waitingThreads > 0). Task-number: QTBUG-21051 Change-Id: I3d98337103031c9bdf0bf365295f245be0c66aa7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add unit test to ensure %3A in a path isn't decoded to ':'Thiago Macieira2013-08-231-0/+5
| | | | | | | | | | | QUrl("http%3A%2F%2Fexample.com") has only a path of "http%3A%2F%2Fexample.com". In Qt 5.0 and 5.1, the %3A would get decoded to ':', which in turn makes the URL invalid (colon before first slash). Found via discussion on the interest mailing list. Change-Id: I7f4f242b330df280e635eb97cce123e742aa1b10 Reviewed-by: David Faure <david.faure@kdab.com>
* Move SnapToDefaultButton from QPlatformDialogHelper to QPlatformThemeAndy Shaw2013-08-232-3/+32
| | | | | | | | | | | Since QPlatformTheme covers all dialogs whereas QPlatformDialogHelper is really only for the native dialogs then the SnapToDefaultButton hint is moved as it has relevance for all dialogs Task-number: QTBUG-32631 Change-Id: I1dce0bb4abcd4cfd39c4a199a33fc7078176ab4b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Thiago Macieira2013-08-229-11/+252
|\ | | | | | | refs/staging/dev
| * Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-08-219-11/+252
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/doc/src/qmake-manual.qdoc src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/src.pro Change-Id: I0a560826c420e46988da3776bd8f9160c365459a
| | * QtBase: Skip some tst_qwidget steps in Ubuntu 11.10Simo Fält2013-08-192-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | Same steps keeps failing on Ubuntu 11.10 without valid reason. Task-number: QTBUG-30566 Change-Id: Ic7bf65496ff9ad9c4fdef42a30b808aa2c45a1e5 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
| | * Fix QGraphics(Ellipse)Item autotestGiuseppe D'Angelo2013-08-191-4/+7
| | | | | | | | | | | | | | | Change-Id: I6d5d702e97a0186979bd3bdcd0526d53afeecbd8 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| | * Fix QPointF::division autotestGiuseppe D'Angelo2013-08-191-2/+2
| | | | | | | | | | | | | | | Change-Id: I567c1252b63aff4273bf15c0d52817f058ea0703 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| | * Add manual test for shortcutsGatis Paeglis2013-08-193-0/+155
| | | | | | | | | | | | | | | Change-Id: I98ba26d97ca60c4a4e22da3b856d0e7e366e6690 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| | * test: Skip some more qsslsocket flaky tests [part 2]Sergio Ahumada2013-08-161-5/+13
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-29941 Change-Id: I28e71f952fcade6ab0aa76db71a1e2f408952830 Reviewed-by: Richard J. Moore <rich@kde.org>
| | * QHeaderView::paintSection(): fix visible index handlingJ-P Nurmi2013-08-151-0/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sections may be hidden => QStyleOptionHeader::position must reflect the state seen on the screen. Otherwise styles will give wrong visual results. Task-number: QTBUG-32203 Change-Id: I7ef86496be092bf6f52ec45f757b501f38c3a431 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | | QUrl: Use decoded mode by default for individual getters/setters.David Faure2013-08-211-13/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the wrong value for path() and fileName() when a path or file name actually contains a '%'. userInfo() and authority() are not individual getters, they combine two or more fields, so full decoding isn't possible (e.g. username containing a ':'). [ChangeLog][Important Behavior Changes][QUrl and QUrlQuery]QUrl now defaults to decoded mode in the getters and setters for userName, password, host, topLevelDomain, path and fileName. This means a '%' in one of those fields is now returned (or set) as '%' rather than "%25". In the unlikely case where the former behavior was expected, pass PrettyDecoded to the getter and TolerantMode to the setter. Change-Id: Iaeecbde9c269882e79f08b29ff8c661157c41743 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QUrl: fix host(FullyDecoded), it shouldn't trigger EncodeUnicode.David Faure2013-08-211-0/+25
| | | | | | | | | | | | | | | Change-Id: I9a62d5eb8b099b659cfcfc591c983b3d73ca9569 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Add benchmark for QThreadPool.David Faure2013-08-213-1/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | The current question is whether activeThreadCount() should be lock-free (using atomic ints) or mutex-protected, so this tests start() and activeThreadCount() directly. Change-Id: Ica4a2ad023c2002e3c7d81558e6b9ee64af7f690 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | | tst_qgraphicsproxywidget: fix memory leakDavid Faure2013-08-211-0/+5
| | | | | | | | | | | | | | | Change-Id: Ib449dc05cebd333310d6ea6b434c9db7082bdee9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | | QComboBox - only react on a mouse-release if we had a mousepressThorbjørn Lund Martsum2013-08-211-6/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In delegates we get into trouble with calling showPopup in setEditorData (edit by double click) - and that is not reasonable. The user has requested edit - and therefore it is natural to save a click for the user and show the popup at once. However that fails since we have the mouse down and as soon as we release the mouse we will call hidePopup. This patch ensures that the mouseReleaseEvent, that caused the problem is only considered if we have had a mousePressEvent. Change-Id: Ibe031fcb9ad2158f6969e41127bbb5f651b9cae6 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | | QNetworkReply auto test: adapt to new session life timePeter Hartmann2013-08-211-5/+7
|/ / | | | | | | | | | | | | | | | | ... supported on the new test server. Once the new server image is in place, we can only allow for the new life time hint of 300 seconds. Task-number: QTBUG-33040 Change-Id: Id6ad9983789cc6badf3fc2f6628bf79379988201 Reviewed-by: Richard J. Moore <rich@kde.org>
* | QDateTime - Fix tests to correctly restore time zoneJohn Layt2013-08-211-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | The unit tests were caching the original TZ value to restore later after testing with different TZ values. The problem is reading TZ will return a null value if no override TZ value is set, and if you then set the TZ to null the system assumes UTC and not the system time zone. Instead we need to unset TZ if it was null to start with. Change-Id: Ib0625b1712e565f9fdfa99e2ffe1e5d74f059354 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | change reporting of missing filesOswald Buddenhagen2013-08-201-1/+1
| | | | | | | | | | | | | | | | | | | | use the new parser flags to report all i/o errors directly. as a notable side effect, the "WARNING" prefix is gone (even though it is still treated like that, which is mildly insane to start with). Change-Id: I084375d5e7a3314ae763795f7c318804a9fb84b6 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | Fetch StandardKey shortcuts from QPlatformThemeDavid Edmundson2013-08-201-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows platforms to dynamically alter their keyboard shortcuts, for example if they are user-configurable on that platform. Current behavior remains the same. QEvent previously used the hardcoded values in QKeySequencePrivate so this was modified to use QKeySequence::keyBindings(). In order to keep the speed of QEvent's former binary search, we moved this code to QPlatformTheme::keyBindings(), making it faster for all keyBinding lookups. As we now need to search by StandardKey instead of by shortcut the list is reordered and a test is changed to reflect that. Change-Id: Iefb402fbbe8768be2208ce036f3c2deed72dcc6c Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | Extend QStyle API with a SH_Splitter_OpaqueResize styleHintRohan Garg2013-08-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Currently the default for QSplitter::opaqueResize is hard coded, which is less than ideal. Instead this should be provided as a style hint via QStyle so as to give a more uniform look to all applications. Change-Id: I5711811f7b672e36aafcd292ed320308570a0390 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Skip tst_QGraphicsProxyWidget::deleteProxyForChildWidget on WinFrederik Gladhorn2013-08-201-0/+4
| | | | | | | | | | | | | | | | | | This tests crashes a lot lately. Task-number: QTBUG-29684 Change-Id: I6892238dc071f050b0208dd5b4843629fa707347 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* | tst_qgraphicsproxywidget: skip crashing test on Mac/Windows.David Faure2013-08-201-0/+3
| | | | | | | | | | | | | | Created QTBUG-33067 for tracking the issue, after some debugging. Change-Id: Iaf5556db2e0858e40a7cf6c9dbbe7e6fd6120bac Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2013-08-1631-154/+508
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-08-1431-154/+508
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure mkspecs/macx-xcode/Info.plist.app mkspecs/macx-xcode/Info.plist.lib qmake/doc/qmake.qdocconf src/corelib/global/qglobal.h tests/auto/other/exceptionsafety/exceptionsafety.pro tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp Change-Id: I3c769a4a82dc2e99a12c69123fbf17613fd2ac2a
| | * Fix crash in QProcess::waitForStarted() on Unix.Christian Strømme2013-08-131-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Invoking waitForStarted() on a QProcess before or after an unsuccessful call to start() (e.g., with an empty command), would execute FD_SET with an invalid file descriptor and cause the process to abort. The bug can be reliably reproduced on OSX. Task-number: QTBUG-32958 Change-Id: Id25b7781168489281645e21571361ca1a71d43e3 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * RCC: Make auto-test pick up the right binaryhjk2013-08-131-6/+10
| | | | | | | | | | | | | | | | | | Change-Id: I30f42d40c69789eb1e292ab6bd1cf2c09d81b11b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
| | * test: Skip some more qsslsocket flaky testsSergio Ahumada2013-08-131-4/+9
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-29941 Change-Id: Iaf1c4834ef36db284464184639a1ab00928510cf Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
| | * Make the QItemSelectionModel test widgets-independent.Stephen Kelly2013-08-133-54/+51
| | | | | | | | | | | | | | | Change-Id: I695afe535ff291bc98f43185469a434cd9178926 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| | * Add auto-test for running the QEventLoop test with the GUI dispatcherTor Arne Vestbø2013-08-124-1/+9
| | | | | | | | | | | | | | | | | | | | | Follows a similar include-pattern as the qguieventdispatcher test. Change-Id: Ie8669a5bc155abd6687e81526f2b95d0d19b009e Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
| | * Don't assume Q_OS_UNIX means we support QEventLoop::X11ExcludeTimersTor Arne Vestbø2013-08-122-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A QCoreApplication may run a different event dispatcher, such as the QEventDispatcherBlackberry, and QGuiApplications will have the GUI dispatcher provided by the QPA plugin, such as QCocoaEventDispatcher. Neither support X11ExcludeTimers. Change-Id: Id5ea1c7dd74a127e13fa4d2eaa9a1bd2715a9dbb Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
| | * Add some debugging information to diagnose bug.Stephen Kelly2013-08-121-2/+11
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-32927 Change-Id: I7d0a1ad9eeb63ac0ec28483106f42109ed1a834c Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
| | * test: Mark tst_QFileSystemWatcher::watchFileAndItsDirectory() as XFAILSergio Ahumada2013-08-111-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is a flaky test on Windows 8 64-bit, so marking it as XFAIL if it is expected to fail. Task-number: QTBUG-30943 Change-Id: Idd276f80b54fcd5cf295a7e1adebcf0020eaa8ca Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
| | * test: Skip some flaky tests, but only if they are expected to failSergio Ahumada2013-08-101-33/+77
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-29941 Change-Id: Ieca736c26711fa292855b3281229282628dce608 Reviewed-by: Richard J. Moore <rich@kde.org>
| | * test: Mark tst_QGlyphRun::drawMultiScriptText2() as XFAILSergio Ahumada2013-08-091-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is a flaky test on OS X 10.8, so marking it as XFAIL if it is expected to fail. Task-number: QTBUG-32690 Change-Id: I0665c7474bb62c4c0a70e4b93cc977e3dbf1e150 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
| | * Merge branch 'release' into stableSergio Ahumada2013-08-091-0/+44
| | |\ | | | | | | | | | | | | Change-Id: I5e94c4f01564df633c9925561ebb0b553bd31a2e
| | | * QHttpMultiPart: fix data corruption in readData methodPeter Hartmann2013-07-291-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When readData() is called repeatedly, we need to keep track which part of the multipart message we are currently reading from. Hereby we also need to take the boundary size into account, and not only the size of the multipart; otherwise we would skip a not completely read part. This would then later lead to advancing the read pointer by negative indexes and data loss. Task-number: QTBUG-32534 Change-Id: Ibb6dff16adaf4ea67181d23d1d0c8459e33a0ed0 Reviewed-by: Jonathan Liu <net147@gmail.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
| | * | Expect fail font family mismatch in the right placeFrederik Gladhorn2013-08-081-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes 4ca4fb93f666820ab10fc0e17f54b2b777540779 where the fix was right, just in the wrong place. Change-Id: I3cde24624e3789870f1c16ccb92f78f7fc567fd5 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
| | * | Revert c3f485c5250a503832e767e1fe5e40595126f6c5Albert Astals Cid2013-08-083-131/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It has been discovered it changes the behavior of qdbuscpp2xml resulting in builds of some apps breaking. Even if the behavior is more correct, such behavior change in a stable branch is not acceptable Change-Id: I1d79104ebf11c3f48c84f109be2926af96cddae7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * | QComboBox: fix item activation via completerJ-P Nurmi2013-08-081-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-31146 Change-Id: I64291f397d80bf934152f63e629810540abf466e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>