summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Diaglib: Make mouse event logging more verboseFriedemann Kleint2018-02-021-0/+29
| | | | | | | | Add information about mouse tracking/grabbing for widgets and window where applicable. Change-Id: Idfe8bef6d146ff06dfe95c0bad5e29e7a4ea7adc Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Make it easier to specify test databases on a per system levelAndy Shaw2018-01-261-72/+52
| | | | | | | | | | | | | | | Instead of having to modify the tst_databases.h file whenever you want to add a test database, this will now read from a file to find what databases are available. This defaults to dbs.json in the same directory or the QT_TEST_DATABASES_FILE environment variable can be set to point to the file that contains the databases. The latter makes it easier for CI then to have something set up on a per configuration basis. The SQLite database stays hardcoded so this will continue to be tested as before without any additional changes. Change-Id: I7e7ccde6a6be3e490dd640b1590e3b691a6b2ab3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* itemviews: When an index widget gets focus, update the current indexAndy Shaw2018-01-221-0/+53
| | | | | | | | | | | By ensuring that the current index follows the focus of an index widget, we can ensure that moving the cursor will happen in the way that is expected from the focused widget. Task-number: QTBUG-27793 Change-Id: Ia36891a94ce41c7d12fba678de23a6f3b69374ae Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* QMenuBar: Fix repetitive emission of triggered() when using addAction(QString)Yulong Bai2018-01-211-2/+26
| | | | | | | | | | | | | | | | | | The action which added by QMenuBar::addAction(const QString &text) already connected relevant signals and slots implicitly, however, while QMenuBarPrivate::updateGeometry -ing, it reconnects them if there's a extension button associated with a hidden popup menu. In that case the QMenuBar::triggered would be fired twice. Since the QAction's ownership may be changed or added dynamically, there are still very rare cases like several widgets share the same QAction object to result in this problem. [ChangeLog][QtWidgets][QMenu] Fixed a bug in QMenu that caused QMenuBar::triggered to be fired multiple times. Task-number: QTBUG-25669 Change-Id: I4d52e82a2136a992e0b37118e41237d96a2c5d22 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-01-205-56/+63
|\ | | | | | | | | | | | | Conflicts: tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: If089d5010d15c33b3c1f13912d4386207456c1a9
| * Merge remote-tracking branch 'origin/5.9' into 5.10Tor Arne Vestbø2018-01-163-27/+1
| |\ | | | | | | | | | Change-Id: I896b0cf54f317c4336cc3d3db319a0b89e421728
| | * Merge remote-tracking branch 'origin/5.9.4' into 5.9Liang Qi2018-01-111-24/+0
| | |\ | | | | | | | | | | | | Change-Id: Ic23e90146470d69060313628562f76a710696bab
| | | * Revert "QTreeView: Make sure QHeaderView is notified on layoutChanged()"Thorbjørn Lund Martsum2018-01-051-24/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It caused some sorting issues. This reverts commit 93dabeba9dc5f6cbab60e65b3cc8df5fe48745a9. Change-Id: Ie8c7f2d47885be6626ddb6284474a78dcf09cf33 Task-number: QTBUG-65478 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | * | macOS: Blacklist modalWindowEnterEventOnHide_QTBUG35109 instead of skippingTor Arne Vestbø2018-01-092-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have the ability to blacklist tests for CI runs now. Task-number: QTBUG-35109 Change-Id: I8590e83faba764dce2d52e8c62e2e2c63f7bf219 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * | | Test for leaks in QMetaObject::invoke with functorsOlivier Goffart2018-01-141-25/+55
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-65462 Change-Id: Ifa9735f5610a6df3ceabd286a0321e87bbd05ca3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | Skip a date-time test when we don't know what result it should giveEdward Welbourne2018-01-121-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The operator_eqeq(data13) test expected the local-time epoch and UTC epoch to agree precisely if the localTimeType set by the test's constructor says local time is UTC; however, when the local zone is *sometimes* ahead of (or behind) UTC, due to DST, localTimeType is duly set to indicate that, which doesn't preclude the zone agreeing with UTC at the epoch. This indeed happens for Europe/London, which agrees on the epoch but was ahead a few months later. So we can't determine what outcome to expect based solely on localTimeType, although we can be sure of a match when local time is UTC. So skip this test when local time isn't UTC (and document what's going on a bit better). Task-number: QTBUG-65435 Change-Id: Id9b8aa0402f2a2b410e0234f6eca4ab0d1010bc4 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | Fix explicitly set width not being respectedIgor Mironchik2018-01-201-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The size of the QStaticText was always adjusted, even if setTextWidth() was used. Now size of the QStaticText is calculated according to the set width of the text, and if no width was set, then the automatically adjusted size is used. [ChangeLog][QtGui][QStaticText] Fixed explicitly set width not being respected. Task-number: QTBUG-65836 Change-Id: If2f9f6952fb168f4bcb6d8fabfdc7360f8a36485 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | | | Add rvalue overload of insert/prepend to QVarLengthArray and QVectorAllan Sandfeld Jensen2018-01-202-9/+194
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improves performance and STL compatibility by adding rvalue versions of prepend and insert. [ChangeLog][QtCore][QVarLengthArray] Added rvalue overloads of prepend and insert. [ChangeLog][QtCore][QVector] Added rvalue overloads of prepend and insert. [ChangeLog][QtCore][QVarLengthArray] Can now contain movable but non-copyable types, such as std::unique_ptr. Change-Id: I6c946acc5b67502c91c52ac5dea67cedb1af93a5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | Test Russia's post-DST transitions are reported correctlyEdward Welbourne2018-01-191-0/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a regression test for bugs resulting from failure to take account of the MS TZ APIs fake-DST handling of standard-time transitions happening during DST. Has to skip the 2014 test on Win7, as it's so old it doesn't know about the (for it) "future" transition. Task-number: QTBUG-42021 Change-Id: I853b86d03a86f0269371bf1622bf63882fb8ee5d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | Sync QItemDelegate::doLayout with QCommonStylePrivate::viewItemLayoutChristian Ehrlicher2018-01-181-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QItemDelegate::doLayout added a margin after the checkbox which is not done within QCommonStylePrivate::viewItemLayout. This created a small but visual difference between using QItemDelegate or QStyledItemDelegate. The additional margin was removed from viewItemLayout somehwere between 4.4 and 4.5 so it was intentional. Change-Id: I2fc3f287fe8b181355edeebec9626c49d85fe74d Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* | | | uic: Support id-based translationsFriedemann Kleint2018-01-182-0/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use Ids from newly introduced id attribute depending on the global form setting. Change-Id: I0a5094d5543c0714c88511fa159b60afc9be3c81 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | | Add QIODevice::NewOnly and QIODevice::ExistingOnly OpenMode flagsd3fault2018-01-171-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When QFile::open is called with the NewOnly flag, the call will fail if the file already exists. As usual, if the file does not exist, it will be created. Like QTemporaryFile, there is a guarantee from the operating system that you are not accidentally creating a new file on top of an older file. When QFile::open is called with the ExistingOnly flag, the call will fail if the file does not exist. The ExistingOnly flag only provides new functionality when used with the WriteOnly flag. For ReadOnly it provides no change in functionality, as ReadOnly by itself already never creates. Task-number: QTBUG-52244 Change-Id: I8e3206728f245f95172c225bf297023fb078fc6d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | | Don't generate QAction include unconditionallyJarek Kobus2018-01-1596-96/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generate it only when the form contains some actions. Change-Id: Ic1d64003ccff6102174771c04999cf7c90ac2ae8 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | | Don't generate QButtonGroup include unconditionallyJarek Kobus2018-01-15105-103/+487
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add it only when ui contains button groups. Change-Id: I60a249a36565e6c7c3f7cb51bc146317bc7ddbe5 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | | Don't generate QHeaderView include unconditionallyJarek Kobus2018-01-1580-80/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generate it only when needed. Change-Id: I7a89b18ec0f2ee7d55fcad1b3f9701269d7616ec Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | | Introduce QIcon::fallbackSearchPaths()Alexander Volkov2018-01-154-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... that will be used if an icon can't be found in the current theme. The Icon Theme Specification https://standards.freedesktop.org/icon-theme-spec/latest/ar01s05.html states that unthemed icons must be searched in the base directories, i.e. /usr/share/icons, ... But in practice unthemed icons are installed into /usr/share/pixmaps and this dir is not used as a base dir for icon themes. So it's better to explicitly specify fallback dirs to avoid needless access to the filesystem. Also some KDE application install their own unthemed icons (into /usr/share/<appname>/pics), that can't be found by QIconLoader. With this change it would be possible for them to specify dirs with unthemed icons and thus be displayed correctly in non-KDE environments. [ChangeLog][QtGui][QIcon] Added fallbackSearchPaths() that will be used to find icons missing in the current icon theme. Change-Id: I0dc55ba958b29356a3b0a2123d6b8faa24d4c91e Task-number: QTBUG-33123 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | | Add QModelIndex::siblingAtColumn and ::siblingAtRowAndre Somers2018-01-122-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Data in item models is most often organized in rows, where each column contains an attribute of the item represented by the row. Often when sibling is used, it is to request another piece of data from the same row. Having a specialized version makes this easier and less awkward to do, simplifying auto sibling = index.sibling(index.row(), columnOfInterest); to auto sibling = index.siblingAtColumn(columnOfInterest); For symmetry reasons, siblingAtRow(rowOfInterest) was also added. Change-Id: Ib203b2cdb16154cbb2680d16fb5c6a7538f33d07 Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: David Faure <david.faure@kdab.com>
* | | | Use TESTDATA for QSsl* testsMårten Nordheim2018-01-125-122/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apparently this (undocumented) TESTDATA feature creates resource files, but lets you use wildcards as well, which is very handy. The reason I didn't know/realize this when adapting the tests to use a ".qrc"-file* was because some of the test-cases were using relative paths instead of the 'testDataDir' variable. This commit fixes the remaining uses of relative paths, removes a usage of QDir::setCurrent, and adapts QSslSocket to use TESTDATA. * in now-reverted commit e1600c1a73e0594f5fbea8f7341a9552d6ae3fbb Change-Id: Iee6d88f1e0810eeaadac90e7d44bc6db84bfeabf Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* | | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-01-1111-57/+389
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty/harfbuzz-ng/src/hb-private.hh src/sql/doc/snippets/code/doc_src_sql-driver.cpp src/sql/doc/src/sql-driver.qdoc Change-Id: I38f0e82fcd37926cbf3c1915e009a731040d4598
| * | | Fix license headersJani Heikkinen2018-01-112-33/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove usage of outdated header.LGPL21 and replace those with proper one (header.LGPL in src, header.GPL-EXCEPT in tests) Change-Id: Ia4d1c0d84b77f09787fe7c30670747a1fe2aff29 Reviewed-by: Liang Qi <liang.qi@qt.io>
| * | | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-01-095-21/+291
| |\| | | | | | | | | | | | | | Change-Id: I840849c072075a69819eb185b20bc42c3de0f825
| | * | QFtp: only use fall-back password for anonymous accessRyan Chu2018-01-091-2/+207
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code used to fall back to anonymous login independently for username and password; however, it should only use a fall-back password if the username is missing or (case-insensitive) "anonymous". When a non-anonymous username is given without password, we should simply skip he PASS message to FTP. If the FTP server requests a password, in the latter case, QFtp will signal authenticationRequired; in all cases, if the server rejects the given credentials, QFtp signals authenticationFailed. Either way, the client code can then query the user for credentials as usual. Task-number: QTBUG-25033 Change-Id: I2a4a3b2725819ab19c8a7e4baa431af539edcd8d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * | CoreText: Order fallback fonts based on writing system supportEskil Abrahamsen Blomfeldt2018-01-091-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After we stopped sanitizing the fallback font list (with change 6ca48a847a1805c3826004c5b989b4ae14397a37), we now need to make sure it is ordered so that the fonts that support the writing system in question are always tested first, otherwise we can end up loading a lot of fonts that will never be used. Task-number: QTBUG-65605 Change-Id: Id2a65bbff3e64e6d6e6b4f72500778ee3e811e84 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
| | * | QFileSystemModel/Windows: Make file name checking case-insensitiveFriedemann Kleint2018-01-091-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a special hash modeled on the one used for QFileSystemWatcher on Windows. Task-number: QTBUG-31103 Task-number: QTBUG-64147 Change-Id: I69ebabe841716e4957ae3fb04fa5c43d233a3552 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | * | Fix license headersJani Heikkinen2018-01-091-14/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Old header.LGPL21 header was used at some files. Replase those with new header.LGPL one Remove old header.LGPL21 Task-number: QTBUG-57147 Change-Id: I650e39024ed4876bba27e954c7d61fdb025b46ef Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * | Fix fallback fonts for non-common writing systemEskil Abrahamsen Blomfeldt2018-01-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we request fallback fonts, we cannot discriminate the fonts based on the writing system support. This is especially important since common script is now merged with other scripts, meaning that a common script character will always go through the fallback mechanism when not supported by the main font. When drawing for instance a string of Devanagari characters on macOS, we would get a list of 33 fallback fonts, but almost all of them would be the default Devanagari font, since none of the other fallbacks would support that script. Meaning that we would just check the same font over and over, which makes no sense. The fallback list has been retrieved specifically for the given script, so we do not need to consider that when fetching the fonts. For most of the common set, we will not have noticed the bug, because at least one of the writing system-specific fallbacks will have had support for latin characters as well. But when trying to mix emojis and some non-common script, we would get a box in place of the emoji, which had been adopted to the main script and would only be looked for in the fonts supporting this. Note that this exposed an issue with the QRawFont test on some systems. When the sample text contained a space, it would be possible to get a fallback font for this character, since we now effectively support fallbacks. This is not the correct behavior, but it is unrelated to this fix, and it was not what the QRawFont::unsupportedWritingSystem() test was written to check. I have therefore removed the space from the sample text to make the test pass, and will make a separate task of fixing the issue of merging fonts for whitespace characters. [ChangeLog][QtGui][Text] Fixed a bug where mixing different writing systems with emojis could lead to missing glyphs. Task-number: QTBUG-61882 Change-Id: I00f6043bb01af1f2277723ccf643034aebf3e18f Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
| | * | Revert "Blacklist tst_QDateTime::operator_eqeq"Edward Welbourne2018-01-071-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove black-listing of test; the problem was due to misconfigured time-zone on the CI system - it was on some zone that presently coincides with UTC, not actually on UTC as supposed. This reverts commit 597b96b8fa2fc8b9331db8ecc85d742be83fbec5. Change-Id: I72ad1dfa38532362c05aef33cd874f7f79879a41 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
| * | | sqlite: Bind duplicated named placeholders correctlyAndy Shaw2018-01-081-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sqlite will reuse the index for bound parameters when the named placeholder is duplicated so we only need to call bind one time for each placeholder. Therefore we need to have just one instance of each value when doing the bind. Task-number: QTBUG-65150 Change-Id: I75c4bcc4563e43c180a59a7a4cbb770dbe994642 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
| * | | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-01-072-3/+19
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp Change-Id: Ib6dd965a7eb6f59103e276b3407739147ecd37b2
| | * | tst_QUdpSocket - unblacklist tests on Ubuntu 16.04Timur Pocheptsov2018-01-052-4/+19
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | We use QSKIP instead for kernel versions [4.6, 4.13). Task-number: QTBUG-65440 Change-Id: Ie764b5a4eb8a67dc2a43d4dc67b5d6eb772f6b2a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Joni Jäntti <joni.jantti@qt.io>
| * | Make QPalette::setBrush() check before detachingGabriel de Dietrich2018-01-041-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Setting the same brush on the same group and role should not detach nor alter the result of QPalette::isCopyOf(). Task-number: QTBUG-56743 Change-Id: Ic2d0dd757d703b01e8c5d835a8c124b3317653f4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | QGuiApplication: Add fontChanged signalKai Uwe Broulik2018-01-111-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the need to install an event filter on qApp just for this. A similar thing was done with setPalette to reduce the number of event filters in e.g. SystemPalette and Quick Controls. [ChangeLog][QtGui][QGuiApplication] Added fontChanged signal Change-Id: Ifa843aa42b91ac63ab17c3b064ac0e764aac77d3 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | | Blacklist tst_QNetworkInterface::localAddress(linklocal-ipv4) in ciLiang Qi2018-01-101-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | To unblock qt5 5.10->dev merge. Task-number: QTBUG-65667 Change-Id: Iffd3648913efb52ad5be9dc5310a9f836fab3de1 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | Enable brainpool curves in qsslkey testsAndré Klitzing2018-01-1013-3/+34
| | | | | | | | | | | | | | | | | | | | | Change-Id: Ibdc0a045e0b0469bfb4dc362e3bc3e6b7940d783 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | QAbstractItemModelTester: fix the autotestsGiuseppe D'Angelo2018-01-0916-710/+44
| | | | | | | | | | | | | | | | | | | | | | | | Move the modeltest autotest in the right place, and fix the other autotests that were using it to use the version now in QtTestLib. Change-Id: Ic6838945f616d580f357c872ce0956c341be3b16 Reviewed-by: David Faure <david.faure@kdab.com>
* | | QSsl* tests: Ensure trailing slash on directory pathMårten Nordheim2018-01-092-43/+47
| | | | | | | | | | | | | | | | | | | | | Then we don't need to add a leading slash. (minor clean-up) Change-Id: I86af224841009fda838e7cb89d47d324963328c9 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Revert "Adapt the QSsl* tests to use the resource system"Mårten Nordheim2018-01-099-319/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit e1600c1a73e0594f5fbea8f7341a9552d6ae3fbb. The commit missed the fact that TESTDATA exists. Which supports wildcards and then can automatically pick up new files when added (as long as they match a wildcard) and then you don't need to maintain a giant qrc file. Change-Id: Ie31fadb5ef6e8dfe6105f4f9764292f78cffb512 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Introduce QAbstractItemModel::checkIndex()Giuseppe D'Angelo2018-01-082-1/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When implementing a custom model there's the habit, in each and every function that takes a QModelIndex, to carefully checking the index passed by the caller. This index is checked for "legality" (*): does the index belong to this model, is the index pointing to an existing row and column, and so on. These checks are hand-rolled and, as such, slightly different and possibly incomplete (i.e. wrong) every time. What's worse, these checks are implemented via "ordinary" code (if statements). However, passing an illegal index to a QAIM function is a precondition violation, and as such does not (and must not) be checked in ordinary conditions, as it triggers undefined behavior. On the other hand, while debugging a custom model or a custom hierarchy of (proxy) models, having such checks in place can be a significant aid. Enter checkIndex(): a debugging helper for QAbstractItemModel and its subclasses. checkIndex() centralizes the checks for legality of a given index. User code is free to assert on it, or have some other fallback mechanism in case a check fails. (*) Using "legality" here instead of "validity" in order to avoid confusion between QModelIndex::isValid() and what checkIndex() really does. [ChangeLog][QtCore][QAbstractItemModel] Added QAbstractItemModel::checkIndex(), a debugging function for QAbstractItemModel subclasses. Change-Id: I1eea0586b1ac3ededdbfbf46759145022dc5ad86 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: David Faure <david.faure@kdab.com>
* | | QStringBuilder: add support for QStringViewMarc Mutz2018-01-081-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][QStringBuilder] Added support for QStringView. Change-Id: I5b6803397b107ef69d198a935b3ba4339ac95087 Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | QStringBuilder: add support for char16_t{,*,[]}Marc Mutz2018-01-081-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][QStringBuilder] Added support for char16_t characters and strings. Change-Id: Iee727f07226f2a326ae0df28d44930336cd8f71e Reviewed-by: Milian Wolff <milian.wolff@kdab.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | QPSQL: Add support for multiple result setsRobert Szefner2018-01-081-4/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds support for multiple result sets in PostgreSQL. [Important Behavior Changes] The QPSQL driver now supports multiple result sets. Since QPSQL previously did not support multiple result sets, there may be some compatibility issues with the existing code that executed several queries as one and were expecting to get the results of the last one. In this case use QSqlQuery::nextResult() to move to the last result set. [ChangeLog][QtSql][QPSQL] Added support for multiple result sets Change-Id: I2bfc91f512c4dac83116f3aa42833839a6da084c Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | | Cocoa: Make AA_MacDontSwapCtrlMeta workAndy Shaw2018-01-082-4/+2
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-22775 Task-number: QTBUG-51293 Change-Id: If615426001a1ea482f854f49cbae33ca1c954e9a Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | | QStringBuilder: clean up testMarc Mutz2018-01-071-36/+102
| | | | | | | | | | | | | | | | | | | | | | | | Add some macros to enable systematic testing of QStringBuilder expressions. Change-Id: I6b7dbcb4a4ca0d1aebdfe7cb9861af881c0cd346 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | QMenuBar: Add overloads of addAction() using Qt 5 signals and slotsAnton Kudryavtsev2018-01-061-0/+38
| | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtWidgets][QMenuBar] Add overloads of addAction() using Qt 5 signals and slots Change-Id: Ief21974213b80111f0ca87df490eb72dd6b9c9b9 Reviewed-by: Martin Smith <martin.smith@qt.io>
* | | QPSQL: Add support for forward-only queriesRobert Szefner2018-01-061-0/+209
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this change, it is possible to significantly reduce memory consumption of applications that fetch large result sets from databases. The implementation is based on the new functionality called "single-row mode" that was introduced in PostgreSQL version 9.2: https://www.postgresql.org/docs/9.2/static/libpq-async.html It also uses asynchronous commands PQsendQuery(), PQgetResult(): https://www.postgresql.org/docs/9.2/static/libpq-single-row-mode.html [ChangeLog][QtSql][QPSQL] Added support for forward-only queries (requires libpq version 9.2 or later) [Important Behavior Changes] The QPSQL driver now supports forward-only queries. To use this feature, you must build QPSQL plugin with PostreSQL client library version 9.2 or later. See the Qt SQL documentation for more information about QPSQL limitations of forward-only queries (sql-driver.html). [Important Behavior Changes] If you build the QPSQL plugin with PostgreSQL version 9.2 or later, then you must distribute your application with libpq version 9.2 or later. Otherwise, the QPSQL plugin will fail to load. Task-number: QTBUG-63714 Change-Id: I15db8c8fd664f2a1f719329f5d113511fa69010c Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>