summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Fix widget leak in tst_qmainwindow.Friedemann Kleint2014-11-201-0/+8
| | | | | | Task-number: QTBUG-38152 Change-Id: I4cf94a4a8977019dcfc099966643b5b036cc1021 Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* Observe QLocale::RejectGroupSeparator in QInt/DoubleValidator.Friedemann Kleint2014-11-201-9/+18
| | | | | | | | Pass it as additional boolean parameter to QLocaleData::validateChars(). Task-number: QTBUG-42522 Change-Id: I4b2367f4e2fdcbd17e343d215edad57e6687697a Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Fix QString::section() behavior on negative and out-of-range indexesAlex Trotsenko2014-11-201-0/+22
| | | | | Change-Id: I3bff6ba73b15ee810bb11b2902d11244c3205b2a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix how qsocks5socketengine autotests are blacklistedTony Sarajärvi2014-11-201-0/+2
| | | | | Change-Id: I6436491267b737fc00c33af7bd9491510c21b7c5 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* fix how qnetworkreply autotests are blacklistedTony Sarajärvi2014-11-201-0/+2
| | | | | Change-Id: Id5b0ec07504020f246e57d3ad57ffd5ce0be61ab Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Allow empty string as intermediate matchPaul Olav Tvete2014-11-201-0/+3
| | | | | | | | | | | QRegularExpressionValidator and QRegularExpression disagree on what a partial match means. [ChangeLog][QtGui][QRegularExpressionValidator] Allow empty string as intermediate match Change-Id: Ia6c55beb54870b1be5c88b6ef3eceebc8ca3f86b Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QSortFilterProxyModel: keep the sorting on unrelated changesGiuseppe D'Angelo2014-11-201-0/+74
| | | | | | | | | | | | | | | | | | | | | Whenever the source model of a QSortFilterProxyModel changes, and the changes involve the sorted column, the implementation removes the changed rows from the mapping, sorts them, and inserts them back; in case of identical items, the rows are inserted at the end of the block of equal rows. The problem is that if the change doesn't actually happen on the roles that are used for sorting, then we shuffle the rows, terribly confusing the user. The typical case is a model with identical checkable rows: (un)checking one row will move it at the end. So, instead of trying to be smart with the removal/sort/insert sorted, simply resort everything under the changed parent index. Since the sorting used is stable, this keeps the items in the same positions. Task-number: QTBUG-1548 Change-Id: Id0e61bd49da53b0a3e8aefa6b6893ac41179dc6f Reviewed-by: David Faure <david.faure@kdab.com>
* Enable tst_QGraphicsView on OSXJørgen Lind2014-11-192-1/+9
| | | | | Change-Id: If1cec2ff90ff0a4bdcfdd0e21aa5c2118ce4e862 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* Enable tst_qfiledialog2 on OSXJørgen Lind2014-11-192-1/+2
| | | | | | Change-Id: I7147d326b0f5bb218f4dbc013ed82efb4c1e1440 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* Fix rubberband position for tabbed mdi windowsPaul Olav Tvete2014-11-191-1/+1
| | | | | | | | | | | Place the rubberband over the tabs instead of where the hidden subwindows happen to be. [ChangeLog][QtWidgets][QMdiArea] Fix rubberband position for tabbed mdi windows Task-number: QTBUG-42612 Change-Id: I41e81ab8b99ab9e0fa533fd4ed1b2a8141d19753 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Fix invalid qmake syntaxPaul Olav Tvete2014-11-191-3/+5
| | | | | | | | Task-number: QTBUG-42549 Change-Id: I57ba3150e3a3b915faf0356d8a3f89801eb4963e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* Add Windows-specific notation for WebDAV to QUrl.Friedemann Kleint2014-11-171-0/+9
| | | | | | | | | | | Convert a Windows-specific WebDAV specification "//host@SSL/path" into URL's with scheme set to "webdavs" and back to local file (Windows only). Task-number: QTBUG-42346 Change-Id: I12663243848ea7b2d3f208743e837e9de14a93eb Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QPanGestureRecognizer: Make the number of touch points a parameter.Friedemann Kleint2014-11-171-0/+1
| | | | | | | | | | | | | Prepare for determining the suitable number of touch points from the device type. For now, 2 points are used as before, which can be overridden by setting the environment variable QT_PAN_TOUCHPOINTS. Add member variable to QPanGesturePrivate which is set on gesture creation and later used for comparison. Task-number: QTBUG-40461 Change-Id: I6d9e35ca752375bc6a54435482ca0925195b8142 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Blacklist one test function in tst_QNetworkReplyTony Sarajärvi2014-11-141-0/+1
| | | | | | Task-number: QTBUG-32435 Change-Id: I07b1888b33daa00864e1793c1d12b1dccf562664 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add C++11 if available for QVariant autotestJørgen Lind2014-11-131-0/+1
| | | | | | | | | gcc 4.9 has the __has_include feature which enables the TEST_FORWARD_LIST and includes the forward_list header. This in turn checks that the c++11 flags are enabled, or throws an error. Change-Id: I44aa58e47c2f9ba6f14cb5a68d24da4a76698e5f Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Add diaglib under manual tests.Friedemann Kleint2014-11-1313-0/+1104
| | | | | | | | | | | Add a set of helper functions and classes providing functionality for dumping widget/window hierarchies and logging events. They can be used by including a .pri file for diagnosing bugs and comparing Qt 5 to Qt 4. Change-Id: I0206f8e57b02540cd80a3e9446c894023d442ddc Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Mark QSocks5SocketEngine tests blacklistedTony Sarajärvi2014-11-131-0/+2
| | | | | | Task-number: QTBUG-42528 Change-Id: I3ba17b9d0f604215e6be0ec7199b12bf009c8b55 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fixed QtGui's GL paint engine getting out of sync when using QtOpenGLSamuel Rødal2014-11-111-0/+27
| | | | | | | | | | We need to reset the active_engine belonging to QOpenGLContext whenever we make the QtOpenGL paint engine active, to give the OpenGL paint engine in QtGui a chance to sync its state if we've used the QtOpenGL paint engine inbetween. Change-Id: I445ce2f99bfbacf55650c881c4fdf07f2ff85069 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Fix for current_fbo getting out of sync in QtOpenGLSamuel Rødal2014-11-111-0/+63
| | | | | | | | | | | | | | | When using QGLWidget in combination with QOpenGLFramebufferObject from QtGui, instead of QGLFramebufferObject from QtOpenGL, the current_fbo variable doesn't get updated when framebuffer object bindings change. To ensure that the QGLWidget correctly releases the currently bound framebuffer object when using a QPainter, we keep track of whether QOpenGLFramebufferObject has modified the current FBO binding, and if that's the case we need to read the OpenGL state directly instead of relying on a cached value. Change-Id: If7e0bd936e202cad07365b5ce641ee01d2251930 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* tst_qitemdelegate: make the test more robustDavid Faure2014-11-111-3/+1
| | | | | Change-Id: Ieb05d7a05d5d8f6f652a0351deba7208d0770dd6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* tst_QTimer::singleShotToFunctors: Allocate static event loop on heap.Friedemann Kleint2014-11-111-5/+14
| | | | | | | | | | | Fix warning: QEventLoop: Cannot be used without QApplication and occasional crashes on Windows. Task-number: QTBUG-26406 Change-Id: Ia8b2a4e3d375d1e43f0e66fe64a39af5f9cf4d60 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Dario Freddi <dario.freddi@ispirata.com>
* Define Q_CC_CLANG to be the version of upstream Clang that's in useTor Arne Vestbø2014-11-051-1/+1
| | | | | | | | | | | | We map the Apple Clang versions to upstream, so that we have one define to compare against. Fixes build break on iOS due to qbasicatomic.h not defining QT_BASIC_ATOMIC_HAS_CONSTRUCTORS on Apple Clang versions, which is needed after 1e9db9f5e18123f2e686c10b Change-Id: I17493c0187c20abc5d22e71944d62bfd16afbad2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix too many resizes and move events for native widgetsJørgen Lind2014-11-041-0/+101
| | | | | | | | | | | | | | | When the QWidgetWindow receives a resize or move event, it should check with the widget if its crect already has this geometry. if not then send the resize or move event Ideally events should be sent whenever the QWidgetWindow receives them. QTBUG-42383 is created for this problem Task-number: QTBUG-29937 Task-number: QTBUG-38768 Task-number: QTBUG-30744 Change-Id: I1e9a5d25de29a98885edece927ba14d7a763eb01 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Autotest: synchronize with the peer before emitting more signalsThiago Macieira2014-10-312-1/+38
| | | | | | | | | | | | | | | Several of the unit tests request that the peer emit more than one signal, but only handle one. The rest of the signals stay queued in the socket and will be delivered at the next test, causing it to fail often. This doesn't happen in the tests with the bus. There, we don't receive the extraneous signals due to AddMatch/ReceiveMatch on each signal individually and the synchronous nature of the emission (the signals have already been emitted by the next AddMatch and cannot match it). Task-number: QTBUG-42145 Change-Id: I743a0553074972042fca46b76db5d9e7b3209620 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Remove executable mode on qwidget_window.proJørgen Lind2014-10-311-0/+0
| | | | | Change-Id: Ibb522af33e8490719010af441cce712bdc7a71bf Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Add manual test for touch events.Friedemann Kleint2014-10-303-0/+215
| | | | | | | | | Unlike qtouchevents, this provides a touch area which logs its events and devices. Task-number: QTBUG-40461 Change-Id: Iaaa3589dd692caf8c7078f5ed2ff1e8b2322a369 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* tst_qvariant: automate testing of forward_listMarc Mutz2014-10-291-6/+6
| | | | | | | ...using the SD-6 __has_include macro. Change-Id: I629e2ad1c8090aba9e86ab9febf6d09a504219f9 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Properly detect UTF-8 BOM markers in ini filesLars Knoll2014-10-293-8/+23
| | | | | | | | | If we detect a utf8 BOM mark at the beginning of the .ini file, skip the marker and set the iniCodec to utf8. Task-number: QTBUG-23381 Change-Id: I1b37fc4f1638a48e4f3ee71ab165e2989bc592f1 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* moc: do not error if the last token of a define is #Olivier Goffart2014-10-281-0/+2
| | | | | | | | | | | | We do not need to emit a diagnostic at definition time. The diagnostic will be emit at expansion time. Fix error when parsing boost header: /usr/include/boost/fusion/container/vector/vector.hpp:25: Error: '#' is not followed by a macro parameter Task-number: QTBUG-42233 Change-Id: I27deab362341f17ca3b0160615bb1b0934c3d5c3 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Fix tst_QAccessibility::abstractScrollAreaTest for OS X 10.9Frederik Gladhorn2014-10-282-16/+24
| | | | | | | | OS X now has a setting (General->Show scroll bars) to use only transient scroll bars. Task-number: QTBUG-41340 Change-Id: Iffe30e9d601c169d955a380002743bab518f41ea Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* Hardcode UTF-8 for "unicode" in QTextCodec::codecForHtml().Friedemann Kleint2014-10-281-0/+4
| | | | | | | | | | ICU would return a utf-16 (endian dependent) codec for unicode which is very rarely what people want. In most cases, unicode is encoded in utf8 these days, so return a utf8 codec for it. Task-number: QTBUG-41998 Change-Id: I51ee758d520702b263a8b2011787eb1f3455ed96 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Rotate images according to Exif orientationRainer Keller2014-10-279-0/+18
| | | | | | Task-number: QTBUG-37946 Change-Id: I181f88acdff0ef76aa02e968dc6afca1ed495f38 Reviewed-by: aavit <eirik.aavitsland@digia.com>
* Remove trailing '\n' in qFormatLogMessage outputKai Koehne2014-10-271-6/+6
| | | | | | | | | | | | | | | Do not automatically add a \n to all messages formatted by qFormatLogMessage. Some backends require a final newline, some don't, so it's best to only append it where it's actually needed. The returned string will be null if the pattern is empty. This allows to differentiate between the case that the pattern just didn't apply (empty line is printed), and the case that qSetMessagePattern(QString()) have been called (nothing is printed). Change-Id: I17fde997a4074f58f82de6dea129948155c322d6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Add extra declarations to make rcc output pass -Wmissing-declarationshjk2014-10-251-0/+2
| | | | | | | | | | The previously produced code was valid C++. Add the declaration nevertheless to help people who want to use the switch in their own code. Task-number: QTBUG-42119 Change-Id: Ia47cf3930684474ff65e5cf37335d7d7f57a1d31 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Android: Keyboard doesn't hide from done buttonSamuel Nevala2014-10-251-0/+2
| | | | | | | | | | QLineEdit commits and hides QInputMethod on enter key press. When Qt::ImhMultiLine input method hint is set, virtual keyboard is not hidden. Task-number: QTBUG-37850 Change-Id: I018351caa18bd2116665771e5f024a57182a01b9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Fix doc about the list of supported codecsAlexander Volkov2014-10-241-7/+2
| | | | | | | | | | | | | Replace "Apple Roman" by "Macintosh" which is registered by IANA: http://tools.ietf.org/html/rfc1345. Replace unsupported "GB18030-0" by "GB18030". Remove "JIS X 0201" and "JIS X 0208" as they are supported as parts of other Japanese encodings but not directly. Add "HP-ROMAN8" which is supported by both Qt and ICU. Also clean the codecs test. Change-Id: Iaf8e8ff1900d3f92ea0e0df75c60fe1534de23ac Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add support for "Apple Roman" encodingAlexander Volkov2014-10-241-0/+1
| | | | | | | | Substitute this encoding by "macintosh" when Qt is built with ICU. It is for compatibility with Qt 4.x. Change-Id: I70c51cba7d473ac81e25862736cb71a2f6894055 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QGraphicsScene: stabilize stacking order of toplevel itemsaavit2014-10-241-0/+37
| | | | | | | | | Removing and adding toplevel items could result in invalid stacking order (not corresponding to insertion order). Task-number: QTBUG-19316 Change-Id: Ia8646784a2181cfa936b101e2adaf7e7e73bb83d Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* Fix rubberband selection in rotated GraphicsViewaavit2014-10-241-0/+43
| | | | | | | | | | Selection rectangle was incorrectly mapped to scene space when the view was rotated. It became a rotated rectangle instead of the correct polygon (rhombus). Task-number: QTBUG-42008 Change-Id: Ib7b366bec7e1f83109e03c434268ad6897138f30 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* QPrinter - Fix DuplexMode on all platformsJohn Layt2014-10-242-20/+34
| | | | | | | | | | | | | Add support to get/set the DuplexMode on Windows and Mac, improve the CUPS duplex handling, ensure support is the same on all platforms. [ChangeLog][QtPrintSupport][QPrinter] Added duplex support for Windows and OS X. Task-number: QTBUG-11332 Change-Id: I9d61d63233d828c3b1fd6df54072c6049f3c6298 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QStyleSheetStyle: Don't interfere with QFontDialogPierre Rossi2014-10-249-13/+46
| | | | | | | | | | | | | The sample lineedit in Qt's own font dialog shouldn't have its font affected by stylesheets. Not only does this hampers the ability to preview the font, it actually overrides the font selection as that one is taken directly from the widget. Task-number: QTBUG-41513 Change-Id: I11d0bef8c7bf7bdae4cc08b6b9276d0fc14a75fb Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* Fix QVariant associative container conversion from built-in types.Jędrzej Nowacki2014-10-241-0/+45
| | | | | | Task-number: QTBUG-41403 Change-Id: I9dab0f9450cac11678eb6d20abd2dd08e86e0900 Reviewed-by: Stephen Kelly <steveire@gmail.com>
* Update QSsl::SecureProtocols to not include Sslv3Allan Sandfeld Jensen2014-10-241-9/+9
| | | | | | | | | | | After the poodle vulnerability SSLv3 should like SSLv2 no longer be considered safe, so when a user request a safe protocol we should only allow TLS versions. [ChangeLog][QtNetwork][QSsl] QSsl::SecureProtocols now also excludes SSLv3 Change-Id: If825f6beb599294b028d706903b39db6b20be519 Reviewed-by: Richard J. Moore <rich@kde.org>
* Correctly update QComboBox appearance on editable changeEskil Abrahamsen Blomfeldt2014-10-241-0/+28
| | | | | | | | | | | | | | | | The updateDelegate() function checks isEditable() which in turn checks if d->lineEdit != 0, so we need to make the call after the lineEdit has actually been set/unset, otherwise the change to the delegate will not come until the next time you update the delegate. [ChangeLog][QComboBox] Fixed updating appearance of popup menu when changing the editable state of the combo box. Change-Id: Ib32f36cabd53c2c30d6256484a1eae131419960a Task-number: QTBUG-33537 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* QMainWindow: respect the maximum size of the central widgetPaul Olav Tvete2014-10-241-0/+45
| | | | | | | | | | | | | Make sure the dock widgets get the available space when the central widget cannot expand any more. [ChangeLog][QtWidgets][QMainWindow] Dock widgets will now be resized properly when the central widget has a fixed size. Task-number: QTBUG-40410 Change-Id: Id06c07b79aa3102aa41212fa2c621f5fa426fe02 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* QSwipeGestureRecognizer: Fix gesture cancel on direction change.Friedemann Kleint2014-10-231-0/+6
| | | | | | | Task-number: QTBUG-12736 Change-Id: I6d8d09843b45df17cb9158070f63b3397c5b4c07 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* Add autotest for QGestureRecognizer.Friedemann Kleint2014-10-234-0/+341
| | | | | | | | | | Task-number: QTBUG-12736 Task-number: QTBUG-15768 Task-number: QTBUG-40461 Change-Id: Ib6dfaa9336f615e17d41444f7aa686cb93d04fca Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Adjust the layout if a QGraphicsWidget is explicitly hiddenJan Arve Saether2014-10-233-0/+150
| | | | | | | | | Since layout items can now be hidden, this also makes sure we respect the QSizePolicy::retainSizeWhenHidden Task-number: QTBUG-20132 Change-Id: Iab59fc9b61d4ca1bb2208c479a027da6eb0283a9 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Fix QWidget::mapTo/FromGlobal() when embedded in QGraphicsView.Friedemann Kleint2014-10-231-0/+28
| | | | | | | | | | Map the positions via QGraphicsScene and the first QGraphicsView (as is done in existing code). Fall back to the previous code path when no QGraphicsView exists, which is hit in the tests. Change-Id: I0754765d05cded6bc1b64045f2513fef8afde337 Task-number: QTBUG-41135 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* Cocoa: Fix icon size calculation for system tray.Christoph Schleifenbaum2014-10-2210-0/+106
| | | | | | | | | | | | | | | | | | | | | The Overall goal is to make it possible to use correctly- sized pixmaps in a predictable way, while still doing something reasonable with small and large pixmaps. (The recommended pixmap height is up to 18 points.) Enable use of rectangular icons by selecting pixmaps based on pixmap height. Draw a low-resolution pixmap on retina displays if there is no high-resolution pixmap available. Scale large pixmaps to fit the available menu bar area. Add a manual-test with various pixmap sizes Task-number: QTBUG-33441 Change-Id: I1926181fe27cae526bae58022df3240bae9f8ac8 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>