summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* macOS: Blacklist tst_QStyleSheetStyle::task232085_spinBoxLineEditBgTor Arne Vestbø2018-02-101-0/+3
| | | | | | | | | Likely fail is 3d29a0dd7487cdb1de40f8d16de988cb4ac6a09f. Is preventing merge from dev, so blacklisted for now. Task-number: QTBUG-66324 Change-Id: Ieb522897e93d4a1b4c0e423fadd4138dfb089093 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/dev' into 5.11Liang Qi2018-02-105167-159/+1415
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qvarlengtharray.qdoc src/corelib/tools/qvector.qdoc Resolved documentation changes in favor of 017569f702b6dd0, which keeps the move overloads along with its const-ref sibling. Change-Id: I0835b0b3211a418e5e50defc4cf315f0964fab79
| * Add drawTexture benchmarkAllan Sandfeld Jensen2018-02-063-0/+554
| | | | | | | | | | Change-Id: I086106adb49eca511d52c6b6b5cff5d72309f77c Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| * Benchmarks: tst_tcpserver: Remove unnecessary qprocess includeOliver Wolff2018-02-051-1/+0
| | | | | | | | | | | | | | | | The include is not needed and breaks build that do not have process support. Change-Id: I3951c24c950dd556a3b26744d8994709e294d397 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * tests: cleanup tst_QMenu::click_while_dismissing_submenu()Friedemann Kleint2018-02-031-8/+10
| | | | | | | | | | | | | | | | - Use Qt 5 connection syntax - Use QTest::mouseMove(QWindow *) Change-Id: Ia2ea8595355801db3f4569a96dead60a7af51109 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
| * QLineEdit: implement quick text selection by mouseElvis Angelaccio2018-02-031-1/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a standard feature in GtkEntry widgets or HTML <input type="text"> elements. During a normal text selection by mouse (LeftButton press + mouse move event), it's now possible to quickly select all the text from the start of the selection to the end of the line edit by moving the mouse cursor down. By moving it up instead, all the text up to the start of the line edit gets selected. If the layout direction is right-to-left, the semantic of the mouse movement is inverted. This feature is only enabled if the y() of the mouse move event is bigger than a fixed threshold, to avoid unexpected selections in the normal case. This threshold is set by the QPlatformTheme and a value smaller than zero disables this feature. The threshold is updated whenever the style or the screen changes. [ChangeLog][QtWidgets][QLineEdit] Implemented quick text selection by mouse in QLineEdit. Change-Id: I4de33c2d11c033ec295de2b2ea81adf786324f4b Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * QString:: add remove() overload taking QLatin1StringAnton Kudryavtsev2018-02-021-0/+6
| | | | | | | | | | | | | | [ChangeLog][QtCore][QString] Added remove() overload taking QLatin1String Change-Id: I11ddb8b8603144effe44f89d0d02e131a255122c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * tests: cleanup tst_QMenu::QTBUG47515_widgetActionEnterLeaveGatis Paeglis2018-01-291-51/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Allocate widgets on stack. The previous version was inconsistent (some widets were managed by QScopedPointer and some were simply leaking). - Use QTest::mouseMove(QWindow *) - "This test fails on OS X on CI" was a clear indication that test is flaky, the new implementation can reliably reproduce issue which is now tracked in QTBUG-63031. Task-number: QTBUG-63031 Change-Id: I59965ef8fa8edca17c8a73901d81e9efc7da3c5b Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
| * QMimeType: remove unwanted *.bin as preferredSuffix for octet-streamDavid Faure2018-01-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | This leads to an automatically appended .bin when saving a file. https://bugs.freedesktop.org/show_bug.cgi?id=101667 https://bugs.kde.org/382437 Fixed upstream in shared-mime-info 1.10 Change-Id: I125a0bc72c91a082706bf2bf149adcf63ff1ec6b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * tests/manual/widgets/styles: Extend the style icon displayFriedemann Kleint2018-01-261-22/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor the page displaying the standard pixmaps of a style: - Use a QGroupBox - Sort items by enumeration name Add a page displaying the standard icons along with the list of sizes. This allows for conveniently checking which resolutions are available. Change-Id: I2d7f655456fc3e7013c2582ad520b6ac582951e6 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * Create corelib/serialization and move existing file formats into itThiago Macieira2018-01-265145-11/+18
| | | | | | | | | | | | | | | | | | This is in preparation to adding CBOR support. We don't need yet another dir for CBOR and placing it in src/corelib/json is just wrong. Change-Id: I9741f017961b410c910dfffd14ffb9d870340fa6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * QListWidgetItem/QStandardItem: pass role to dataChanged() signalChristian Ehrlicher2018-01-263-24/+58
| | | | | | | | | | | | | | | | | | | | | | | | QAbstractItemModel::dataChanged() gained an optional role parameter with Qt5 which was not filled within QListWidgetItem/QStandardItem setData() functions Task-number: QTBUG-55903 Task-number: QTBUG-63766 Change-Id: I4da9346ef8401cc8633dc4b2ea7d00451d1e3942 Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
| * tst_QSplitter::replaceWidget: explicit wait for eventsChristian Ehrlicher2018-01-261-18/+39
| | | | | | | | | | | | | | | | | | | | | | | | Wait a little bit longer for the visibility and resize events. By directly waiting for the incoming events with QTRY_COMPARE we give the test some more time to deliver the expected events. Also move the check for the expectedResizeCount/expectedPaintCount before the geometry check for better debugging. Task-number: QTBUG-64639 Change-Id: I712e432aa8f8d35dd199adf88af3653009528b57 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * QFileSystemModel/Win: Fix file system operations failing due to watchersFriedemann Kleint2018-01-261-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | File system operations like renaming/removing may fail on Windows when file system watchers are present. Add functions to QFileSystemModelPrivate to temporarily remove the watchers prior to such operations and to restore them in case of failure. Use them for rename/remove (within a feature check for QFileSystemWatcher and Q_OS_WIN). Task-number: QTBUG-65683 Change-Id: I90142901892fbf9b1e1206a3397a95ffd3c8f010 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * Introduce QSslConfiguration::backendConfigLars Schmertmann2018-01-261-0/+130
| | | | | | | | | | | | | | | | With this change it is possible to use all supported configurations in different backends without any new interfaces. Change-Id: Ib233539a970681d30ae3907258730e491f8d3531 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * tst_qvarlengtharray: Add missing includeOliver Wolff2018-01-261-0/+2
| | | | | | | | | | | | | | | | The include is needed for std::unique_ptr on winrt. Change-Id: I72a28bd0951cc947ac65877ccc35f464c757c444 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
| * Add support for converting from std::variantAllan Sandfeld Jensen2018-01-252-2/+43
| | | | | | | | | | | | | | | | Adds inline handling of the C++17 type std::variant, so the type will be resolved if converted into a QVariant. Change-Id: I31809d70d7f347277389d42a3695836ec7a32d02 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Update the overflow functions to include qsizetypeThiago Macieira2018-01-241-9/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 29bc68cf169b8cf87d306a1c72e12eb9b6fbfce7 added support for unsigned and commit 5ff7a3d96e0ce0dcb3d388b53d038cdd40c7a975 later added support for int. This commit adds support for qsizetype, which isn't int on 64-bit platforms. We do this by reorganizing the code and using the generic version of __builtin_{add,sub,mul}_overflow from GCC 5 and Clang 3.8, which ICC 18 seems to support now too on Linux. That leaves older versions of GCC and Clang, as well as MSVC, ICC on Windows, and the GHS compiler, to use the generic implementations, as I've removed the assembly code those versions of GCC and Clang on x86 are now uncommon. Note: any older version of ICC probably breaks. We only support the latest. Change-Id: I9e2892cb6c374e93bcb7fffd14fc11bcd5f067a7 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * XCB: Implement native window dump for diaglibFriedemann Kleint2018-01-241-1/+16
| | | | | | | | | | | | | | | | | | Extract a helper function to determine the window title from QXcbConnection and add an invokable function to the native interface that dumps the window tree similar to existing functionality on Windows. Change-Id: I5544d69ea2b801eb16d3b5b8d64021b3e567b0d8 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * QTestlib/selftests: Refactor the code printing output differencesFriedemann Kleint2018-01-241-8/+73
| | | | | | | | | | | | | | | | | | | | | | Use qInfo() instead of qDebug() in case QDebug is turned off. If the 'diff' tool is available, write the output to temporary files and run diff on it. Otherwise, print the lines as was before, but onto one stream to avoid indentation by the testlib handler. Change-Id: Ib5a5dfb66ce481b493b85b915aa8c785ecb6b387 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * QMenuBar::mouseReleaseEvent: fix triggering hidden actionsYulong Bai2018-01-241-3/+22
| | | | | | | | | | | | | | | | | | | | While menubar actions are hidden, as menubar was too narrow to contain them, by clicking the blank area, where the action was supposed to place, can still trigger the action. Task-number: QTBUG-65488 Change-Id: I6b137e0717f634ebd3371dbcc2c1ce2089688374 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | QVariant: convert QDateTime and QTime to string with millisecondsThiago Macieira2018-02-051-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This way, it's lossless. This commit is a cherry-pick of ab1e50757454b5afda2f6dec52d2eb16a32d4798, which was reverted. [ChangeLog][QtCore][QVariant] Conversions of QDateTime to strings now contain the millisecond components. Change-Id: I5e421e32396d44e4b39efffd150b744e40fff3a1 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* | QUuid: add a way to get the string form without the bracesThiago Macieira2018-02-031-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | While we're at it, add a way to get it without the dashes too. I'm calling it "id128", as in "128-bit ID", as seen in journald's sd_id128_t type and the sd_id128_xxx() API. [ChangeLog][QtCore][QUuid] Added a parameter to both toString() and toByteArray() to allow controlling the use or not of the braces and dashes in the string form. Change-Id: I56b444f9d6274221a3b7fffd150cde706cfc5098 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | 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>