summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Cocoa: Support DnD to the TrashMorten Johan Sørvig2018-02-071-0/+1
| | | | | | | | | | | | | Map Qt:MoveAction to NSDragOperationDelete, in addition to the existing NSDragOperationMove mapping. From the point of view of the source there is no difference between Move and Delete; the source copy should be deleted. Task-number: QTBUG-63794 Change-Id: Iea5abe31efe0320dad150d243544f25167b3d18c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Cocoa: move setting of drag accepted stateMorten Johan Sørvig2018-02-071-4/+3
| | | | | | | | | | | | | | | | | | performDragOperation:sender is called when an application window receives a drop, either from an application sourced drag or from a foreign drag. draggingSession:endedAtPoint:operation is called when an application sourced drag ends, either on an application window or on a foreign window. Update the drag accepted state when the session ends in order to handle DnD from the application to a non-application window. Task-number: QTBUG-63794 Change-Id: If3e16ed6a086c5d051e7390e3ecf16ea210221ad Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Prefer ICU over system info on MS-WinEdward Welbourne2018-02-073-12/+13
| | | | | | | | | | | | | | | | | | | | | | | | The ICU data is more complete; and its APIs allow it to tell the whole story, which MS-Win's APIs can't (e.g. Morocco's otherwise-normal DST has a hole in it for Ramadan; when this makes four transitions in a year, the MS-APIs can't report more than two, so ignore the Ramadan gap); and their design obliges us to use heuristics to kludge round mis-description of simple changes to standard time in non-DST zones, which can't be distinguished from certain (more) obscure cases of changes to DST coinciding with a change to standard offset (causing a DST transition to hide, leaving its other end *looking like* a non-DST change to standard offset). Using ICU, when available, reduces how many end users shall be mislead by such kludges. [ChangeLog][Windows][QTimeZone] Changed MS-Win to use ICU for time-zone data, when available, in preference to MS's TZ APIs. The choice is made when building Qt. This will give reliable results when non-DST transitions arise, or when a zone's DST is not simple (e.g. interrupted by Ramadan). Task-number: QTBUG-42021 Change-Id: I9cdd65713ecdaf8cce52dd924fbc7371630977c8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add overloaded QBitmap::fromImage that takes QImage rvalueAnton Kudryavtsev2018-02-072-17/+36
| | | | | | | | | ... and use it. [ChangeLog][QtGui][QBitmap] Add overloaded QBitmap::fromImage that takes QImage rvalue Change-Id: Idb6e6bb1645371996700349714041cc54bb3d005 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Mention Qt Creator is compatible with testlibFrederik Gladhorn2018-02-071-2/+2
| | | | | Change-Id: Iea32858a7ae5d7450682a18247a76830b42a4ae4 Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
* Unalias some core drawhelper loopsAllan Sandfeld Jensen2018-02-062-63/+67
| | | | | | | | | | Some compilers will assume src and buffer are different and only vectorize the unaliased case and take a slow path when they are equal. In our case they are as often equal, so we need to manually unalias the variables to make sure both cases are fully optimized. Change-Id: I6ec86171dd179844facdf45376253c55980d9e36 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Documentation: Update CommonTableModel/StringListModel snippetsChristian Ehrlicher2018-02-054-28/+28
| | | | | | | | | | | | Update CommonTableModel/StringListModel snippets: - 0 -> nullptr - use 'override' - replace "" with QString() - use QStringLiteral instead QString - pass role to dataChanged() signal Change-Id: I5949d1bd6fee3186f12191f1f6235ae18908096e Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Handle coordinates related to component windowJosé Millán Soto2018-02-051-1/+7
| | | | | | | | | | | | AtSpiAdaptor::componentInterface was not checking the coordinate type in GetAccessibleAtPoint. Now, if the coordinate type is ATSPI_COORD_TYPE_WINDOW the coordinates of the window will be added to the specified coordinates. Change-Id: Iba571109a8da300f4141d616a94ef4ac87918f98 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Introduce QT6_VIRTUAL and QT6_NOT_VIRTUAL macrosSergio Martins2018-02-054-11/+10
| | | | | | | To avoid QT_VERSION_CHECK ifdefs Change-Id: I364903964c72f4df19b8b7c10c19b82d24f63600 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Use placeholder text for accessible description of QLineEditJosé Millán Soto2018-02-051-0/+2
| | | | | | | | | If the accessible description of a QLineEdit is requested and none has been set, the placeholder text will be provided if one is available. Change-Id: I4c0dad1d06fd3d8a6e00c963402d380c59bd7f05 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Remove QCupsPrintEnginePrivate::setupDefaultPrinterAlbert Astals Cid2018-02-052-33/+0
| | | | | | | it was declared but never used Change-Id: Iededb2943759cd2d66de95bcc1758dbcc4283ee3 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Remove QPlatformPrinterSupport::createDefaultPrintDeviceAlbert Astals Cid2018-02-052-6/+0
| | | | | | | no one uses it Change-Id: I03d0350a44a19545d57b47d1b21d85f1a2059f4d Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Modernize logging in CoreFoundation and iOS event dispatchersTor Arne Vestbø2018-02-053-83/+63
| | | | | | | | Instead of manually handling logging enablement, we use Qt's categorized logging system. Change-Id: I8d942601f76876030084c9fb130b7215ff6cc404 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Simplify how we set thread name for UNIX threadsTor Arne Vestbø2018-02-051-11/+8
| | | | | | | | Passing on the thread ID is confusing, as it's not really what the function does. The QNX code path can resolve the thread ID by itself. Change-Id: I5f0d54621058576cdcf3707d36a11762fe2383c8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use new QString::remove(QLatin1String)Anton Kudryavtsev2018-02-052-2/+2
| | | | | Change-Id: I5b3560709a8fb230a177511c701fd0bf25938f0f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QLineEdit: implement quick text selection by mouseElvis Angelaccio2018-02-039-3/+71
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* QCommonStyle::drawControl: use PM_HeaderMargin instead magic numberChristian Ehrlicher2018-02-021-2/+3
| | | | | | | | Replace '2' with the correct margin retrieved from PM_HeaderMargin during paniting of CE_HeaderLabel within QCommonStyle::drawControl(). Change-Id: I5a50e02f107a00f382a38e14c4d3fa8dcb97ad12 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* QHeaderView: consider Qt::DecorationRole size within paintSection()Christian Ehrlicher2018-02-021-5/+9
| | | | | | | | | When an icon was given through Qt::DecorationRole, the available space for the text was not adjusted which created a graphical glitch. Task-number: QTBUG-62091 Change-Id: I0f20b6de95deed14fb882efde5c81b83ab3e9a7e Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* 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-022-10/+37
| | | | | | | [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>
* 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-2829-8/+1657
| | | | | | | | | | 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-281-0/+2
| | | | | | | | | | | | 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>
* 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-2634-46/+42
| | | | | | | | | 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-266-15/+41
| | | | | | | | | | | | 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>
* QFileSystemModel/Win: Fix file system operations failing due to watchersFriedemann Kleint2018-01-263-17/+91
| | | | | | | | | | | | | | 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-2610-0/+170
| | | | | | | | 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>
* 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-252-0/+32
| | | | | | | | 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-160/+117
| | | | | | | | | | | | | | | | | | | | 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-245-10/+75
| | | | | | | | | 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>
* 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-241-0/+4
| | | | | | | | | | 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>