summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Remove some unnecessary namespace prefixingEdward Welbourne2017-11-061-1/+1
| | | | | | | | QWinTimeZonePrivate is based on QTimeZonePrivate, so can reference its members without prefix. Change-Id: I7b6bc33f70c4a497ec0caf897d48886a21f8fd65 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge "Merge remote-tracking branch 'origin/5.10' into dev" into ↵Liang Qi2017-11-0640-6030/+10236
|\ | | | | | | refs/staging/dev
| * Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-0540-6030/+10236
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/minimum-linux.S src/network/access/qhttpthreaddelegate.cpp src/widgets/kernel/qwidgetwindow.cpp Change-Id: Id2e817e85f85c68f5482c9a12912d35590f9d5f8
| | * QFileSystemEngine: Fix renameat2() failures on non-local filesystemsThiago Macieira2017-10-291-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The RENAME_NOREPLACE flag is supported for all Linux local filesystems, since that can be easily checked by the VFS layer (it knows which files exist and which ones don't). For non-local filesystems, the backend needs support and that might need server-side support too. So we may get EINVAL errors for those, in which case we fall back to link/unlink, which in turn can fall back to rename(). EINVAL can also happen if we attempt to make a directory a subdirectory of itself. In that case, we will attempt to link() it, which will result in EPERM as we can't hardlink directories. Then we try rename() again, which should result in the expected EINVAL. Task-number: QTBUG-64008 Change-Id: Icaa86fc7b54d4b368c0efffd14f09ca23602dd2e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * Fix GCC -Wfloat-conversion warnings (available since GCC 4.9)Thiago Macieira2017-10-297-13/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This warning used to be part of -Wconversion, but that generates too more noise than we're willing to fix now (like conversion from qint64 to int). The float conversion does trigger for conversion from double to float, as shown in all the QVectorND uses of float, but more importantly, it triggers on passing floats to ints. Change-Id: I69f37f9304f24709a823fffd14e69cfd33f75988 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * Mark the previously public qstringalgorithms.h functions privateThiago Macieira2017-10-296-132/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Discussed during Qt Contributor Summit 2017. We concluded that we don't want to make these functions public, as they do not follow Qt coding style API. Specifically, qStartsWith(a, b) is not easily understood which argument is the needle and which argument is the haystack (same problem memcpy() has). Compare that to a.startsWith(b) which can clearly be read in English as a subject-verb-object sentence. This commit removes the unit tests that called compare(). Discussed-on: http://lists.qt-project.org/pipermail/development/2017-October/031060.html Change-Id: Icaa86fc7b54d4b368c0efffd14ee6205eb9043fb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * QRandomGenerator: add system() and global()Thiago Macieira2017-10-295-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now,this does really nothing. This commit is just to allow us to transition the other modules (besides qtbase) to use the syntax that will become the API. I've marked three places to use the system CSPRNG: 1) the QHash seed 2) QUuid 3) QAuthenticator I didn't think the HTTP multipart boundary needed to be cryptographically safe, so I changed that one to the global generator. Change-Id: Ib17dde1a1dbb49a7bba8fffd14ecf1938bd8ff61 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * Move the minimum Linux version declarations to a headerThiago Macieira2017-10-283-29/+103
| | | | | | | | | | | | | | | | | | | | | | | | I'll need it in the AF_NETLINK implementation of QNetworkInterface. Change-Id: Icaa86fc7b54d4b368c0efffd14ef5ce895d0ed5b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Fix -no-opengl buildTimur Pocheptsov2017-10-281-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A follow-up patch for 8e70241dccaf5a9e5c79c8d6da5665b881c5914d: Make 'shareContext' conditionally included/compiled (protected by QT_CONFIG(opengl)). Change-Id: Ieaeea6b146b47fba7a77e2576ae0a33042280199 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
| | * uic: Fix clazy warnings clazy-qstring-left, clazy-unused-non-trivial-variableFriedemann Kleint2017-10-272-2/+1
| | | | | | | | | | | | | | | | | | Change-Id: Ibbb9a85dba7773bb70298906bc370b4e24d7d901 Reviewed-by: Robert Loehning <robert.loehning@qt.io> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
| | * Add a comment about the weird refcount for adopted QThreadDataThiago Macieira2017-10-271-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's perfectly benign, but I spent a lot of time debugging this and trying to figure out how to solve something that didn't need solving. So document for posterity. For an adopted thread, the TLS destructors or the adopted thread watcher on Windows will call QThreadData::deref(): - QThreadData::deref(), count drops to zero -> delete this; - ~QThreadData() deletes the QAdoptedThread -> delete t; - ~QThreadPrivate() calls deref() again -> data->deref(); - QThreadData::deref(), count drops to -1, no action taken - ~QObjectPrivate() calls deref() yet again -> threadData->deref() - QThreadData::deref(), count drops to -2, no action taken Change-Id: Icaa86fc7b54d4b368c0efffd14ee448e0796e8d7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Update bundled sqlite to 3.20.1André Klitzing2017-10-274-5777/+9718
| | | | | | | | | | | | | | | | | | | | | [ChangeLog][Third-Party Code] Sqlite was updated to version 3.20.1 Change-Id: I538a4de9b915fd1655479e44aa7ca8bae7b9a0b3 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| | * HTTP/2 - make protocol settings configurablev5.10.0-beta3Timur Pocheptsov2017-10-2610-68/+262
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Recently we have updated our receive window size to a larger value. Unfortunately, this also results in auto-test pumping through more data, which probably takes more time on CI. At the moment we do not have any public API on QNAM's level to customize HTTP/2 parameters (aka 5.10/FF and so on). So we use the fact that QNAM is QObject and we can set a property on it. This property is our Http2::ProtocolParameters object that allows us to configure: - HPACK parameters (in 5.10 - noop) - session receive window size - different SETTINGS as described by RFC 7540, 6.5.2. 2. Undocumented environment variable to set ENABLE_PUSH is not needed anymore. 3. In 5.11 Http2::ProtocolParameter will become a public API and we'll introduce a new setter in QNAM. Change-Id: If08fd5e09e7c0b61cf9700b426b60b5837b6b2e6 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Modernize use of 'http' featureUlf Hermann2017-11-0633-126/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Exclude QHttp(Multi)Part from being built if http is disabled, and replace the exclusion macros. Use the qmake project files to exclude source files, and QT_REQUIRE_CONFIG(http) in headers. Change-Id: I432fa3c78aa97b5ed2eb1027ac1dc3bdb134f9ba Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | | mouse handling: fix issue when mixing QTest::mouse* APIsGatis Paeglis2017-11-051-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... that become apparent after switching qtestlib to use enhanced mouse event (a37785ec7638e7485112b87dd7e767881fecc114). With the old code path, where QGuiApplication was deducing event type it would deduce mouse release event even when there wasn't one. The new code path doesn't do that, which revealed an obscure problem when mixing QTest::mouse* APIs (where QWindow overload goes through QWindowSystemInterface API and QWidget overload goes through QApplication::notify() and sets mouse_buttons from there). What happened in this specific test case "./tst_qtreeview selection statusTip" was: // tst_QTreeView::selection sets mouse_buttons = Qt::LeftButton from QApplication::notify QTest::mousePress(widget, Qt::LeftButton, ..) // tst_QTreeView::statusTip QTest::mouseMove(window, ) The old code path sees that position and state has changed, creates a fake mouse event, which gets deduced as mouse release even if there wasn't one. And by luck this happened to set mouse_buttons=Qt::NoButton. So when we use mouse_buttons later to create QMouseEvent everything works as expected. With the enhanced mouse we don't clear the pressed button from mouse_buttons (set in tst_QTreeView::selection) as this is done only from press/release events, then pass it to QMouseEvent and later because of that QApplicationPrivate:: pickMouseReceiver() returns nullptr. The fix here is to use e->buttons when constructing QMouseEvent, instead of relying on mouse_buttons which gets changed from various places and has other issues that can not be solved without invalidating the current documentation of QGuiApplication::mouseButtons() (e.g QTBUG-33161). Tests and any Qt code in general should avoid using the fragile QGuiApplication::mouseButtons() API. This patch does not affect the old code path (it continues working as before) and fixes the issue described above for the enhanced mouse API. The enhanced mouse API actually is better in a way that it does not get affected by button state from test functions that run earlier, as opposed to the old code path where every subsequent test function uses mouse_buttons in whatever state it was left by the test functions that run earlier. Not relying on mouse_buttons when creating QMouseEvent helped also to discover other logic error. This caused an in incorrect button state for a mouse move event that is generated for a release event that simultaneously changes a mouse position. Task-number: QTBUG-64043 Change-Id: I6ad8e49d8437ab0858180c2d0d45694f3b3c2d60 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | QSysInfo: add a function that returns the boot IDThiago Macieira2017-11-052-2/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][QSysInfo] Added machineUniqueId() and bootUniqueId(). Task-number: QTBUG-63425 Change-Id: I0b48fc8e90304e0dacc3fffd14e91064020d165b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | QSysInfo: add a function that returns a somewhat permanent unique IDThiago Macieira2017-11-052-2/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can use the D-Bus / systemd machine-id file (which is a UUID without the dashes) on systems with D-Bus. On Windows, there's a value in the registry that is filled when Windows is installed, like on Linux. For BSD systems, the kernel has a UUID we can use too, so extract that. Task-number: QTBUG-63425 Change-Id: I27eaacb532114dd188c4ffff13d32f2e3c1d74bb Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Cleanup of qcompositionfunctionsAllan Sandfeld Jensen2017-11-052-177/+60
|/ / | | | | | | | | | | | | | | | | | | | | Remove long unused preload defines, make sign of alpha more consistent and use the RGB64 define structure more. This is preparing for trying to unify the declarations in case we need a third form with floating points for HDR. Change-Id: I47fc283aff1fe31a1eaba17e0413bc1e722f6a06 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | Remove references to obsolete platformsJake Petroules2017-11-0515-142/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ultrix and reliant have not seen a release since 1995. dgux not since 2001. bsdi not since 2003. irix not since 2006. osf not since 2010. dynix... unclear, but no later than 2002. symbian needs no mention. All considered obsolete, all gone. sco and unixware are effectively obsolete. Remove them until someone expresses a real need. Change-Id: Ia3d9d370016adce9213ae5ad0ef965ef8de2a3ff Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QSemaphore: Fix futexMultiWaiterBit for 32bit systemsUlf Hermann2017-11-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | We don't actually need it in that case, but as the code that uses it is disabled by a constant expression we cannot disable the variable itself by a macro. The static_cast makes sure the compiler does not complain about implicitly casting a 64bit value to a 32bit one. thread/qsemaphore.cpp:156:59: error: large integer implicitly truncated to unsigned type [-Werror=overflow] Task-number: QTBUG-64261 Change-Id: I96f53e28b290e57033737b4f994f8af5b5666587 Reviewed-by: Liang Qi <liang.qi@qt.io>
* | Accessibility docs: remove wrong statementFrederik Gladhorn2017-10-291-1/+0
| | | | | | | | | | | | | | | | All accessible interfaces are stored in a cache, we never pass ownership to callers. Change-Id: I99f0e27baf111e4ca820c8f31875c0c55b4d6edb Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | qwidgetwindow: remove seemingly stray QApplicationPrivate::mouse_buttonsGatis Paeglis2017-10-271-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes mouse_buttons related code from qwidgetwindow.cpp as it does not belong there for the following reasons: - The commit (ed2a2dc6dae0a2523cecfd272609d322ace16145) that added it in Qt5 says that the logic was copied from qapplication_x11.cpp (filename in Qt4 repository). Other qapplication_*.cpp platform implementations did not have this kind of logic; thus having it in cross platform location qwidgetwindow.cpp does not make sense. - According to the documentation, QApplicationPrivate::mouse_buttons: "Returns the current state of the buttons on the mouse. The current state is updated synchronously as the event queue is emptied". So the only place where changing this variable makes sense is in QGuiApplicationPrivate::processMouseEvent, which is *when the event queue is emptied*. There are other places in source code where this variable is changed, but all of those are hacks and should be cleaned out eventually: // a hack due to insufficient QWindowSystemInterface API plugins/platforms/windows/qwindowsdrag.cpp // a hack to support code that bypasses QWSI API when sending mouse events // via qApp->notify(). widgets/kernel/qapplication.cpp - AFACT, the released button bit will be already unset by the time mouse release event reaches QWidgetWindow::handleMouseEvent. Change-Id: Ifb2b3b443ffff0274545e5d3c631cf1e77160502 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | QWidgetTextControl: allow context menu to open for a QTextEdit with ↵Richard Moe Gustavsen2017-10-271-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt::NoFocus set Currently a context menu will only open when right-clicking on a text edit that has input focus. This means that you cannot e.g bring up the context menu to copy text for a text edit that doesn't accept input focus (but you are still allowed to select text with the mouse, which feels a bit contradictory). This is different from how QLineEdit works, and also different compared to how native applications work, at least after testing on macOS and Ubuntu. This patch will change this behavior, so that the context menu always open on both QPlainTextEdit and QTextEdit, even when they don't accept focus. Task-number: QTBUG-63868 Change-Id: Ibc4cbcc900077546828690ddc958820677211a5a Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | Windows Font Database: Remove usage of deprecated QSysInfo::WindowsVersionFriedemann Kleint2017-10-271-7/+2
| | | | | | | | | | Change-Id: I7ba5a29c70bc8674ad77a2a3cdcc83cee6bc0c9f Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.10' into dev" into ↵Liang Qi2017-10-2683-522/+581
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/5.10' into devAllan Sandfeld Jensen2017-10-2483-522/+581
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/windows/qwindowsmousehandler.cpp src/plugins/platforms/xcb/qxcbimage.cpp tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/manual/qtabletevent/regular_widgets/main.cpp Done-with: Friedemann Kleint<Friedemann.Kleint@qt.io> Done-with: Mårten Nordheim<marten.nordheim@qt.io> Change-Id: I5b2499513a92c590ed0756f7d2e93c35a64b7f30
| | * QHstsStore - use qAsConst in a range-loopTimur Pocheptsov2017-10-231-1/+1
| | | | | | | | | | | | | | | | | | | | | Found by clazy-range-loop. Change-Id: If43e8d127697f768dc7b1871dc9fef9dcc57ad54 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * Fix build on Integrity: the compiler doesn't understand this constructThiago Macieira2017-10-231-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | "global/qrandom.cpp", line 155: error #2000-D: attribute "destructor" is not implemented and will be ignored Task-number: QTBUG-63948 Change-Id: Icaa86fc7b54d4b368c0efffd14efa35381d4e797 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-2319-81/+149
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/direct2d/direct2d.pro src/plugins/platforms/ios/qiosclipboard.mm src/plugins/platforms/windows/windows.pro Change-Id: Idffa03b3990bd642784f528821c5446b2e1008ef
| | | * xcb: Convert synthetic mouse enter event position to native pixelsBłażej Szczygieł2017-10-201-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mouse position is converted from native pixels later, so we must provide native pixels for "QWindowSystemInterface::handleEnterEvent". Amends 7091be1b7999d93fe2126042161dcd1d8fd20026 Task-number: QTBUG-63865 Change-Id: I813c171f2fc1d321af702ac30eb5f2e4232e97c4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | | * Windows QPA: Fix build with -no-feature-tableteventFriedemann Kleint2017-10-201-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Guard #include by QT_CONFIG. Task-number: QTBUG-63874 Change-Id: I33f4a4c4fbdae3d25874ee9cdc3f1c7e1ab783e3 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| | | * Windows/Direct2D QPA: Fix build with -no-accessibilityFriedemann Kleint2017-10-202-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-63876 Change-Id: Ib9216977dd495e05d032e679c2f23ffe6a6953a6 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
| | | * winrt: Fully initialize CREATEFILE2_EXTENDED_PARAMETERS structOliver Wolff2017-10-201-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not properly initializing all members of the extended parameter struct will cause an "invalid handle specified" exception on use. Task-number: QTBUG-63883 Change-Id: Ic3a58df864c9e29ccbadc04bd71c18c8ef34374c Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
| | | * QCocoaSystemTrayIcon: Remove unused classesGabriel de Dietrich2017-10-201-31/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both QNSMenu and QSystemTrayIconQMenu aren't referenced anywhere else, including within qcocoasystemtrayicon.mm, since the QPA backend was added. Change-Id: I632c1b230226b2d08afce7f0f0019e9f7c030ba5 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | | * iOS: add support for adding mimetypes other than text on the clipboardRichard Moe Gustavsen2017-10-191-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A QVariant can only be converted to a QByteArray if it has user type QMetaType::QByteArray or QMetaType::QString. The way it stood, we always tried to convert the mime data to a QByteArray, and then put the result into a QVariant. This would fail if the mime data contained e.g a QPixmap. This patch will inspect what kind of data the QMimeData contains, and convert it to a QVariant using the expected API. Backport of 6d3c483 Task-number: QTBUG-57428 Task-number: QTBUG-63660 Change-Id: I09b4a94aef7b52773e1a79c468ead71b36dfbfc5 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | | * Fix cookie path matching for empty url pathMårten Nordheim2017-10-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The path wouldn't match if the cookie's path was root ('/') and the URLs path was empty. Change-Id: I6dcd10f1fdf4f48f14e50f1b169cbdfda7005849 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | | * Cocoa QPA: Remove usage of OBJECTIVE_SOURCESGabriel de Dietrich2017-10-191-6/+5
| | | | | | | | | | | | | | | | | | | | Change-Id: I5924ab0ddb442624f5aeeef023428be228348707 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
| | | * QTableGenerator: Fix handling of illegal characters in fromBase8 againRobert Loehning2017-10-191-1/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: Iaee19f71e5b74b0d43b628739039ca3c2be60cd0 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | | * QTabletEvent: Add doc note about Windows driversFriedemann Kleint2017-10-181-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent drivers no longer contain wintab32.dll, point out a version that still has it. Change-Id: I4125a0af3c11ab739f8006b91f58899aeed54458 Reviewed-by: Andre de la Rocha <andre.rocha@qt.io> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | | * network: add a QT_CONFIG(bearermanagement) guardLiang Qi2017-10-182-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for QNetworkReplyHttpImplPrivate::startWaitForSession(). This amends 8a39384e907e830c907f73009f498c486b22bd20. Task-number: QTBUG-63847 Change-Id: Ic20a4ac3ab97ed25010e0679810ef64c3ff42c05 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | | * Fix redirecting POST for HTTP 307 and 308Mårten Nordheim2017-10-173-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All POST requests that were redirected would previously turn into GET requests. This does not follow the standard for HTTP codes 307 and 308. Task-number: QTBUG-63142 Change-Id: Ibd25a9566066e589670a9bc34e5dc5111f8139d5 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | | * Open a session during redirects when neededMårten Nordheim2017-10-172-21/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some cases when a session isn't needed (i.e. for localhost), the session is not opened at all. If a program (e.g. our tests) redirects from localhost to a different system (e.g. the qt network test servers, or the internet) it will wait for a session forever. So, we need to check if a session is needed for the redirect-target and then open one. It is usually opened in QNetworkReplyHttpImplPrivate::_q_startOperation Change-Id: Id3b78182a3fb3f63f0235ecb1fb665df8bd0c4ca Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | | * QNAM (redirects) - clear 'raw' headers before sending the next requestTimur Pocheptsov2017-10-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We already cleared 'cookedHeaders', which is a QHash for 'known headers' (enumerators as keys instead of strings), now do the same for 'rawHeaders'- not to end up with some weird mix of headers from all possible redirect responses and the final response. Task-number: QTBUG-61300 Change-Id: Ifd6655c4167840bb00d29446d36ce65ba2d5491a Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | | * Doc: State that qDebug and friends are thread-safeKai Koehne2017-10-172-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's a common misconception that qDebug and friends are not thread-safe, so let's explicitly state this. Change-Id: I48d4ab8983017a9f2e7c9932a49ed573baa22929 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | * Android Accessibility: protect from accessing invalid interfacesFrederik Gladhorn2017-10-171-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I am not sure if this is going to help, but it is required that the bridge checks that the interfaces it accesses are valid, since that protects from accessing them when they are in the destructor. This should be done, whether it fixes the issue or not. Task-number: QTBUG-45855 Change-Id: I2b96999ca4043f8b33607c864d1d178695d03192 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
| | | * Windows QPA: Fix reporting of TabletLeaveProximity eventsFriedemann Kleint2017-10-171-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the check for totalPacks below; it prevents leave notifications from being handled. Task-number: QTBUG-53628 Change-Id: I2436c51308803337e6d48ef958e03123283d4a1d Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | | * QShortcut: Fall back to cross platform code in absence of QPA menuGabriel de Dietrich2017-10-171-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On macOS, absence of a QPA menu means that we should be using our own internal logic since there's no entity on the QCocoaMenuDelegate to take care of the shortcuts. Change-Id: I35ed8f0b55445f61d0528709d4debb636a502002 Task-number: QTBUG-61039 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * | Fix implementation of spell check underline stylesDmitry Shachnev2017-10-214-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QTextCharFormat documentation said that the used style is based on QStyle::SH_SpellCheckUnderlineStyle style hint, however in fact the implementation (drawTextItemDecoration in qpainter.cpp) uses themeHint(QPlatformTheme::SpellCheckUnderlineStyle) instead since Qt 5 (see commit 1f9ae50457a3750f). Make the documentation match that behavior, and update QPlatformTheme to use the correct default value. Also, switch Cocoa theme to use DotLine, as that is what native macOS applications use. Change-Id: I2a6bb3da6c7b0686dca87ed2c251b6abc006123c Task-number: QTBUG-50499 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
| | * | QRandomGenerator: improve floating-point random generationThiago Macieira2017-10-201-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous version was good, just not optimal. Because the input was an unsigned 64-bit number, compilers needed to generate extra code to deal with HW instructions that only convert 64-bit signed input. And that was useless because a double uniformly distributed from 0 to 1 can only have 53 bits of randomness. The previous implementation did exactly what the Microsoft libstdc++ and libc++ implementations do. In my opinion, those implementations have an imperfect distribution, which is corrected in this commit. In those, all random input bigger than 0x20000000000000 has a different frequency compared to input below that mark. For example, both 0x20000000000000 and 0x20000000000001 produce the same result (4.8828125e-4). What's more, for the libc++ and MSVC implementations, input between 0xfffffffffffff001 and 0xffffffffffffffff results in 1.0 (probability 1 in 2⁵³), even though the Standard is very clear that the result should be strictly less than 1. GCC 7's libstdc++ doesn't have this issue, whereas the versions before would enter an infinite loop. Change-Id: Ib17dde1a1dbb49a7bba8fffd14eced3c375dd2ec Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * | QRandomGenerator: fix the timing of the closing of the Unix random fdThiago Macieira2017-10-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let's make it happen even later: at the time of QtCore's unloading from memory. This prevents issues with something using QRandomGenerator after the global static destructor would have run. Change-Id: Icaa86fc7b54d4b368c0efffd14eed56bbbb51cb6 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>