summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add documentation entries for new qvector/qvarlength methodsAllan Sandfeld Jensen2018-02-022-0/+44
| | | | | Change-Id: I4be1605ed8c9022795d5132203ad947e78481e67 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QString:: add remove() overload taking QLatin1StringAnton Kudryavtsev2018-02-023-10/+43
| | | | | | | [ChangeLog][QtCore][QString] Added remove() overload taking QLatin1String Change-Id: I11ddb8b8603144effe44f89d0d02e131a255122c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix HiDPI rendering issues in the WindowsVista styleAndre de la Rocha2018-02-022-28/+44
| | | | | | | | | | | | | | | Fixing miscellaneous rendering issues to make the WindowsVista style look good on High DPI displays: - Fixed size/resolution of combo box arrows, and changed to native look. - Fixed vanishing horizontal line in the frame of line edit widgets. - Fixed gaps in combo box popup. - Fixed size/resolution of arrow in push button menu. Task-number: QTBUG-49374 Task-number: QTBUG-65237 Task-number: QTBUG-65238 Change-Id: If68c2fae7472def3c19636483af741ca8ed2c490 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Fix HiDPI rendering issues in the Windows styleAndre de la Rocha2018-02-021-89/+55
| | | | | | | | | | | | | | | | Fixing miscellaneous rendering issues to make the Windows style look good on High DPI displays: - Fixed size/resolution of combo box arrows. - Fixed size/resolution of scroll bar arrows. - Fixed size/resolution of check boxes. - Fixed size/resolution of radio buttons. - Fixed the frame of default buttons. Task-number: QTBUG-49374 Task-number: QTBUG-65237 Change-Id: Ib7e2ef2ed027c50dbac23b16a73f7033000552f1 Reviewed-by: Andre de la Rocha <andre.rocha@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Fix HiDPI rendering issues in QCommonStyleAndre de la Rocha2018-02-021-12/+10
| | | | | | | | Fixed size/resolution of combo box and scroll bar arrows. Task-number: QTBUG-49374 Change-Id: I3016b082b5eb7149fbe0c0e740525ab8506ce391 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* QString: optimize remove()Anton Kudryavtsev2018-02-021-4/+9
| | | | | | | | | | In remove(const QString &str, Qt::CaseSensitivity cs) call remove(QChar c, Qt::CaseSensitivity cs) if str.size() is equal 1. It prevents quadratic behavior for that case. Change-Id: I9a7ab3019c580343533c8c6c6a04b6b0c8c1fb55 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix opening of flatpak FileChooser portalJan Grulich2018-02-022-55/+61
| | | | | | | | | | | | | My assumption before was that show() method calls exec(), but it seems to be vice-versa and so QML applications using QFileDialog were not able to open dialogs as they use visible property, which in turn calls show() method. I made the show() method to call new openPortal() method where I moved the actuall DBus call from exec() method. The exec() method now internally calls show(), at least this is my assumption and it seems to behave like that from my testing. Change-Id: I27a5b0198e9ff1a9ea031f9ae45b57ceae99c6ae 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>
* QBitArray: add manipulate a dense bit array directlyThiago Macieira2018-01-282-0/+43
| | | | | | | | [ChangeLog][QtCore][QBitArray] Added fromBits(), which creates a QBitArray from a dense bit array, and bits(), which returns that. Change-Id: Ia9c88b83534240a5872dfffd150b1c8b1c36ced5 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Support for LTTNG and ETW tracingRafael Roquetto2018-01-2833-10/+1719
| | | | | | | | | | This commit introduces minimal support for instrumentation within Qt. Currently, only LTTNG/Linux and ETW/Windows are supported. Change-Id: I59b48cf83acf5532a998bb493e6379e9177e14c8 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QMimeType: remove unwanted *.bin as preferredSuffix for octet-streamDavid Faure2018-01-282-0/+3
| | | | | | | | | | | | 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>
* JSON: use the new isLatin1 functionThiago Macieira2018-01-271-8/+1
| | | | | | | It's vectorized, so it should be faster than this version. Change-Id: I56b444f9d6274221a3b7fffd150c1519eb999cdc Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add a few methods to check if a string is US-ASCII or Latin1Thiago Macieira2018-01-273-1/+157
| | | | | | | | | isLatin1(QLatin1String) is provided for completeness sake, in case some generic code operates on both QLatin1String and QString/QStringView. Change-Id: I5e421e32396d44e4b39efffd150b99a18eedf648 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix broken rendering of RGB30 and ARGB32 on machines with AVX2Allan Sandfeld Jensen2018-01-271-2/+2
| | | | | | | Two small changes late in the review process were flawed. Change-Id: I4b1f6e3fdb8e17000a2e11bc30aae1b29d9f43a9 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>
* Doc: explain how QXmlStream{Reader,Writer} deal with encoding in QStringThiago Macieira2018-01-261-0/+20
| | | | | | | | | | | QXmlStreamWriter does not: it just writes the QString inputs to the output. QXmlStreamReader does: it first converts the QString to UTF-8 and stores locally. Then it tries to decode using the XML encoding header. Change-Id: I39332e0a867442d58082fffd1503d7652cb9fbff Reviewed-by: Martin Smith <martin.smith@qt.io>
* Create corelib/serialization and move existing file formats into itThiago Macieira2018-01-265193-92/+91
| | | | | | | | | 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-269-39/+99
| | | | | | | | | | | | 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-264-17/+130
| | | | | | | | | | | | | | 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-2611-0/+300
| | | | | | | | 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>
* qsimd_p.h: Reorganize and simplify the x86 intrinsics #includesThiago Macieira2018-01-251-68/+28
| | | | | | | | All of our compilers support #include <immintrin.h>, so we don't need the legacy code that includes the earlier versions. Change-Id: I938b024e38bf4aac9154fffd14f80214d1d744c8 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add support for converting from std::variantAllan Sandfeld Jensen2018-01-254-2/+75
| | | | | | | | 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-242-169/+262
| | | | | | | | | | | | | | | | | | | | 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>
* Document the new qfloat16 functions with the other qfloat16 functionsAllan Sandfeld Jensen2018-01-241-0/+2
| | | | | Change-Id: I82d3fcda44a9a49d9027d865f8ed200134d0f79e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Correct since value of QNetworkRequest::Http2DirectAttributeAllan Sandfeld Jensen2018-01-241-1/+1
| | | | | | | | It did not make it into 5.10 as far as I can tell. Change-Id: I01f950c476f2c98f4ed40d2cafd15ecc112a3427 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QMacStyle: CE_Splitter is HITheme-freeGabriel de Dietrich2018-01-242-7/+31
| | | | | | Change-Id: I96a5ba5d685d1b8f95fd11489e4e95096d0fa9a4 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QMacStyle: declare block in drawNSViewInRect() as noescapeGabriel de Dietrich2018-01-242-2/+2
| | | | | Change-Id: Ida67a963ab62c6b974eceeaf9d386b941f357798 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QMacStyle: PE_FrameLineEdit is HITheme-freeGabriel de Dietrich2018-01-242-30/+20
| | | | | | | | CT_LineEdit is as well, so that makes QLineEdit free of HITheme APIs. Change-Id: Ia02ce9f1003e5ae9c8bf47dab9ada030feca98ba Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QFusionStyle: Properly draw frameless editable combo boxesGabriel de Dietrich2018-01-241-1/+4
| | | | | | | Change-Id: If0b6f15dc0a1de38edec5b360b1b8b698d6ad5b8 Task-number: QTBUG-65728 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* cups: Clear cups options at the start of QPrintPropertiesDialog::setupPrinterAlbert Astals Cid2018-01-243-0/+10
| | | | | | | | | | | | | | | | | | For some reason the cups options are kept globally instead of per printer at QCupsPrintEnginePrivate so when setting the printer options on accepting the print dialog, we first need to clear them and then call the other functions that set them, otherwise, we will "reuse" cups option set on the previous print. How to reproduce: * Open print dialog, set some advanced option to a non default value, easiest one is print in grayscale * Print * Check it prints in grayscale * Open print dialog, check the advanced options are all on default values * Print * Check it incorrectly prints in grayscale Change-Id: I59aacaf30db844ad40887d6b771f9354557852b6 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* XCB: Implement native window dump for diaglibFriedemann Kleint2018-01-246-11/+91
| | | | | | | | | 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>
* Improve debug formatting of QInputMethodQueryEventFriedemann Kleint2018-01-241-4/+15
| | | | | | | | Add more queries, output the query enumeration value and output the hints as flags. Change-Id: Icfc648a8d6e144074455ecebae1b25c3c3e1063e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QMenuBar::mouseReleaseEvent: fix triggering hidden actionsYulong Bai2018-01-242-3/+26
| | | | | | | | | | 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>
* doc: clang-qdoc must not see certain function declarationsMartin Smith2018-01-242-2/+4
| | | | | | | | | | | | | | | The macro Q_DECLARE_INTERFACE declared some qobject_cast() functions that clang-qdoc must not see in the contexts where the macro is used. This update prevents that from happening by ensuring that Q_CLANG_QDOC is not defined when the macro is defined. This update also adds a \fn command for a declaration of qobject_cast() that was missing in the documentation. There are two versions of the function, one with a const parameter and one with a non-const parameter, and they both share one qdoc comment. Change-Id: Ic74d0aaae62767cd0391474ee95ae3f4f820b06e Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* doc: Add documentation for swap() functionsMartin Smith2018-01-242-0/+11
| | | | | | | | The functions had been added without documentation. This update adds the documentation. Change-Id: Ib29e9356b26c248b5fcc9f13ecf77371fbae054a Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* doc: Add more missing return types to \fn commandsMartin Smith2018-01-245-13/+7
| | | | | | | | Added missing return types to \fn commands and removed some unnecessary \internal comments. Change-Id: Ie6691f83a1c510134d1e83c3d98758360a67217e Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* doc: Fix a property declaration for clang-qdocMartin Smith2018-01-241-1/+1
| | | | | | | The * must be adjacent to the type for clang-qdoc. Change-Id: Icc3dedcb2f4cd426993901b8f3003c942e753c68 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* doc: Fix many qdoc warnings, mostly missing return typesMartin Smith2018-01-2421-49/+74
| | | | | | | | | | | Fixed many cases of missing return types in \fn commands. Added a fake GLxxx typedef for a GL type that wasn't there because the GL includes weren't accessible. Also added some fake declarations for a few functions declared in namespace Qt in QtWidgets that must be seen by qdoc in QtCore. Change-Id: Id82476042d0563d32fa85c4ae81a58c1298a468a Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* QOffscreenIntegration: add missing overrideAnton Kudryavtsev2018-01-241-2/+2
| | | | | Change-Id: I8165b44e28bd8da637e75e5b11bc429cdf2deb02 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QDockWidgetTitleButton: Limit icon size to dpiScaled(10) on WindowsFriedemann Kleint2018-01-241-5/+47
| | | | | | | | Adding larger pixmaps to the icon caused the icon to grow. Task-number: QTBUG-38776 Change-Id: I29148d70afa55e287f2ad254e449a98c4aa631fb Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* QCommonStyle: Add dock title bar iconsFriedemann Kleint2018-01-2415-0/+49
| | | | | | | | | Add larger pixmaps for the dock title bar icons; override them by the XPM in fusion style to maintain the behavior. Task-number: QTBUG-38776 Change-Id: I7d0e022bbf620d2aad2b6ee011b8bb9a745d7c3b Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* Rename existing dock title icons to contain "macstyle"Friedemann Kleint2018-01-245-4/+4
| | | | | | | | Make way for adding dock title icons to QCommonStyle. Task-number: QTBUG-38776 Change-Id: If1729478f55f0bce5e04399d0cca98afd2facb31 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* itemviews: When an index widget gets focus, update the current indexAndy Shaw2018-01-223-0/+74
| | | | | | | | | | | 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>
* QTextItemInt: replace 0 with nullptrAnton Kudryavtsev2018-01-221-6/+18
| | | | | | | | | While touching the code, move initialization from body of ctor to initializer list Change-Id: Idfcb4fb771d1414268f8685874395ca54b20621a Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QMenuBar: Fix repetitive emission of triggered() when using addAction(QString)Yulong Bai2018-01-212-5/+33
| | | | | | | | | | | | | | | | | | 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 "Merge remote-tracking branch 'origin/5.10' into dev" into ↵Liang Qi2018-01-21161-12973/+13831
|\ | | | | | | refs/staging/dev
| * Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-01-20161-12973/+13831
| |\ | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: If089d5010d15c33b3c1f13912d4386207456c1a9