summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* add docs for QPlatformTheme::WheelScrollLines, MouseDoubleClickDistance5.7Shawn Rutledge2016-12-131-0/+7
| | | | | | | | | These theme hints were added in fac71528 and 4a2e297b respectively. Change-Id: Ic39f32dae4d0843b1b2398beb27081ad07d75772 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> (cherry picked from commit 847a152474550e0952d31f15069fb346565938df) Reviewed-by: Simo Fält <simo.falt@qt.io>
* Merge remote-tracking branch 'origin/5.7.1' into 5.7Liang Qi2016-12-071-10/+21
|\ | | | | | | Change-Id: Ic2cdbd0c826bd63f545479495fa095ec666ddd5a
| * Fix the JPEG EXIF reader to deal with some broken/corrupt filesv5.7.1Thiago Macieira2016-12-011-10/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We parse the EXIF header in order to get the proper orientation, so let's be a bit more careful in what we accept. This patch adds better handling for reading past the end of the stream, plus it limits the number of IFDs read (to avoid processing too much data) and deals with a pathological case of the EXIF file format: EXIF (due to its TIFF origins) permits the offset to the next IFD to be backwards in the file, which means it could result in a loop or pointing to plain corrupt data. We disallow any backwards pointers, since it seems that's what other decoders do (libexif, for example). Change-Id: Iaeecaffe26af4535b416fffd1489332db92e3888 (cherry picked from 5.6 commit 02150649f95b8f46f826e6e002be3fa0b6d009bc) Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * Prevent stale QOpenGLContext fbo pointerMorten Johan Sørvig2016-11-112-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is logic for clearing the qgl_curent_fbo pointer in release(), but it is not always called, causing the pointer to become stale on QOpenGLFramebufferObject deletion. As a last resort, clear the qgl_curent_fbo pointer on the current context if it’s pointing to the object that is being deleted. Change-Id: I0a91d686cec5fcbe4c1520a9ba96cea833bb2249 Task-number: QTBUG-56639 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * macOS: Clear event dispatcher interrupt stateGabriel de Dietrich2016-11-089-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A pending interrupt of a QEventLoop may interfere with native runModal calls, resulting in Cocoa's main event loop to be stopped unexpectedly. After commit 9ab60b9c processEvents() no longer resets the event dispatcher interrupt flag. Add QCocoaEventDispatcher::clearCurrentThreadCocoa EventDispatcherInterruptFlag(). Use it to clear the interrupt state before calling runModal and variants. Work around the inability to use platform API in the print support code. Change-Id: I3e03e7ec21ff6c49442c7a6e803a7200aac0b58d Task-number: QTBUG-56746 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
| * Apple OS: Handle QSetting strings with embedded zero-bytesTor Arne Vestbø2016-10-214-16/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Saving strings with embedded zero-bytes (\0) as CFStrings would sometimes fail, and only write the part of the string leading up to the first zero-byte, instead of all the way to the final zero-terminator. This bug was revealed by the code-path that falls back to storing e.g. QTime as strings, via the helper method QSettingsPrivate::variantToString(). We now use the same approach as on platforms such as Windows and WinRT, where the string produced by variantToString() is checked for null-bytes, and if so, stored using a binary representation instead of as a string. For our case that means we fall back to CFData when detecting the null-byte. To separate strings from regular byte arrays, new logic has been added to variantToString() that wraps the null-byte strings in @String(). That way we can implement a fast-path when converting back from CFData, that doesn't go via the slow and lossy conversion via UTF8, and the resulting QVariant will be of type QVariant::ByteArray. The reason for using UTF-8 as the binary representation of the string is that in the case of storing a QByteArray("@foo") we need to still be able to convert it back to the same byte array, which doesn't work if the on-disk format is UTF-16. Task-number: QTBUG-56124 Change-Id: Iab2f71cf96cf3225de48dc5e71870d74b6dde1e8 Cherry-picked: 764f5bf48cc87f4c72550b853ab93b815454cd48 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
| * Windows: Fix regression in QFSFileEnginePrivate::nativeWrite()Andy Shaw2016-10-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change 0696566b1e19c8178e00c0d14f185935e17d9e8b caused the block size to be incorrect for data > 32MB. Since bytesToWrite changes within the do...while loop, then the block size can potentially change too each time. So it needs to be recalculated each time rather than just once. Task-number: QTBUG-56616 Change-Id: I9880d0985f2d0242c30e67230be7271eb806db95 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit 683c9bc4a8e656b2251871b9d8c9952e58681a52)
* | ~QHttpNetworkConnectionPrivate - disconnect from socket's signalsTimur Pocheptsov2016-12-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have a 'channel' object connected to a socket with Qt::DirectConnection. QHttpNetworkConnectionPrivate in its dtor (note, it's a private object destroyed after its 'q' - QHttpNetworkConnection - was destroyed) calls socket->close() and this can end up in socket setting an error and emitting (for example, in QSslSocket::transmit). The slot (QHttpNetworkConnectionChannel::_q_error) will access the now-dead/non-existing connection then. So disconnect the channel from the socket early, before closing the socket. Task-number: QTBUG-54167 Change-Id: I3ed4ba4b00650c3a39e5c1f33aa786e47bfbbc57 Reviewed-by: Konstantin Tokarev <annulen@yandex.ru> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Remove unnecessary warning disablingThiago Macieira2016-11-271-5/+0
| | | | | | | | | | | | | | Qt 5.7 cannot be compiled in C++03 mode anymore. Change-Id: Iaeecaffe26af4535b416fffd1489d808edc3c996 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QtGui: Add missing overrideAlexander Volkov2016-11-2710-73/+73
| | | | | | | | | | Change-Id: Ief5b0863d7649d5a8d421c05766513276c264776 Reviewed-by: hjk <hjk@qt.io>
* | Make sure all pattern args get cleared when parsing a new patternThiago Macieira2016-11-261-0/+4
| | | | | | | | | | | | | | | | | | The user can call qSetMessagePattern after program start, so we need to be sure that the parsed argument data is properly cleared. Task-number: QTBUG-57144 Change-Id: I1978c6b95bd84639a8c4fffd1487429b04725522 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-11-2511-53/+63
|\ \ | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qml_module.prf src/corelib/tools/qdatetimeparser_p.h Change-Id: I5382cee3ddb33107dc61ee20f7a9188c4a68a882
| * | Remove nokia reference in example mimetypeOrgad Shaneh2016-11-241-1/+1
| | | | | | | | | | | | | | | | | | Change-Id: I45c01fd57171f4ba6ea195d7ad3ae988a1797acb Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: David Faure <david.faure@kdab.com>
| * | ICC: Fix MySQL driver buildJesus Fernandez2016-11-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In function `QMYSQLDriver::formatValue(QSqlField const&, bool) const': qsql_mysql.cpp:1569: undefined reference to `QString::operator=( QLatin1String) Change-Id: I56104cdd53fdc083670510f24b735cf05948f156 Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch> Reviewed-by: Milian Wolff <milian.wolff@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | QDateTimeParser: introduce at least some encapsulationEdward Welbourne2016-11-231-39/+42
| | | | | | | | | | | | | | | | | | | | | | | | Shuffled its parts to make clear which bits are public, private and protected. QDateTimeEditPrivate makes rather heavy use of the last. Change-Id: Ic5f9d0c5cc85f02e57d3f31e9ac31a17428c5311 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * | Fix two leaky uses of realloc()Edward Welbourne2016-11-232-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If it fails, we get NULL back but haven't free()d the old pointer; saving the NULL return over the old pointer forgets it, leaking the memory it pointed to. This is particularly severe in the JSON parser's grow(), where reading a very large JSON document can lead to the last successful realloc() in a doubling pattern being very large indeed; the subsequent failure will leak this very last allocation. Only worth checking for, however, when the subsequent code takes care to handle failure: in most cases, if realloc() fails, we're about to crash anyway. Change-Id: Icd3a503f169be224f0a058c58e8b7c82a3241ae7 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
| * | Typo fix in QDateTime::toString() documentationEdward Welbourne2016-11-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Text that should simply have been naming days of the week used Qt::Sunday rather than the simple day name. Change-Id: I64a3cdacd854c1c9c0fbf2d11826555086d674f4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | _q_networkSessionClosed - disconnect the correct objectTimur Pocheptsov2016-11-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have: ... auto networkSession = getNetworkSession(); ... getNetworkSession() can return non-null pointer even if networkSessionStrongRef is null: ... if (networkSessionStrongRef) return networkSessionStrongRef; return networkSessionWeakRef.toStrongRef(); .... We check the result: if (networkSession) { // here we disconnect signals } But we should use the same networkSession when disconnecting, not start using networkSessionStrongRef suddenly, since it can be null. Task-number: QTBUG-57110 Change-Id: I96babb42c2182e741e6eabaf7d1abb88869861f4 Reviewed-by: Jesus Fernandez <jesus.fernandez@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * | Windows QPA: Do not send key events for mouse-synthesized app commandsFriedemann Kleint2016-11-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sending key events in addition causes applications to respond twice to for example the back / forward extra mouse buttons. Suppress the keypress by checking on the device. This is in line with the other platforms, which do not send keypresses either. Native event filters will still be able to listen for WM_APPCOMMAND. Task-number: QTBUG-48117 Task-number: QTBUG-57198 Change-Id: I219e17244087663f06ab2c5a8cf4b880c3655700 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| * | If there are no available sizes, then fallback to the requested sizeAndy Shaw2016-11-233-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a case like the SVG iconengine there is no available sizes implementation. However in that case we don't need to provide different sizes as we can have SVG scale it for us to the one requested. So it is assumed that with no available sizes implementation that the icon engine will take care of this for us. This ensures that SVG files can be used as icons inside the menu on macOS. Task-number: QTBUG-40225 Task-number: QTBUG-55932 Change-Id: If01ca582c4c07834e6de16652924e0b7e118c87c Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-11-2322-107/+131
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This also reverts commit 0d2f0164f45cb626c40a7c95026ba00fa56ac249. Conflicts: header.BSD-NEW qmake/Makefile.win32 src/openglextensions/qopenglextensions.cpp src/openglextensions/qopenglextensions.h src/winmain/qtmain_win.cpp src/winmain/qtmain_winrt.cpp tools/configure/configureapp.cpp util/glgen/qopenglextensions.cpp.header util/glgen/qopenglextensions.h.header Change-Id: If26c6f4111b342378dd88bbdc657e322d2ab6ad8
| * | QDir::tempPath - use NSTemporaryDirectory on DarwinTimur Pocheptsov2016-11-221-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | Instead of hardcoded "/tmp". Task-number: QTBUG-57165 Change-Id: I9d3ae157c22ce131281b8279149eea87a26244e8 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * | eglfs: Avoid unexpectedly flushing QPA input eventsLaszlo Agocs2016-11-222-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Flushing all events to ensure that the expose (or other queued events) get processed right away is dangerous. Instead, pass ExcludeUserInputEvents like many other platform plugins do. This way queued input events do not get processed at an unexpected point in time and so do not interfere with modal dialogs for instance. Task-number: QTBUG-57229 Change-Id: I9da09e62627d26485fb5a37fc190cb4a4bcb28b6 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
| * | Add more information for QKeySequence::toString on macOSJesus Fernandez2016-11-221-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous documentation said: "On OS X, the string returned resembles the sequence that is shown in the menu bar." That was not completely true because the string returned depends on the format passed to the function. Task-number: QTWEBSITE-744 Change-Id: I1b7d9367547326670d1b3a8cfe48f066910f5a10 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
| * | Handle RemovePath correctly when calling matches()Andy Shaw2016-11-221-0/+3
| | | | | | | | | | | | | | | Change-Id: Ied324a537df127e676fad26b42e658a9d5aeec9b Reviewed-by: David Faure <david.faure@kdab.com>
| * | Enable constexpr support for Visual Studio 2017Oliver Wolff2016-11-222-0/+8
| | | | | | | | | | | | | | | | | | Change-Id: I894789c41cc2c1a327c14d0526e658520d096085 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | Add support for Visual Studio 2017Oliver Wolff2016-11-221-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | Tested with RC Task-number: QTBUG-57086 Change-Id: I21f56edca3852b52edd2c5fdcce76817141e8d4a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * | qnativesocketengine_winrt - do not shadow a variableTimur Pocheptsov2016-11-221-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | We first hide identifier 'hr' and then later we check the one that was never correctly initialized. Task-number: QTBUG-57226 Change-Id: Ibbf1bb99aa752c2e4090caf4533dc5f5b71b5e41 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| * | QFutureInterface: make accesses to 'state' thread-safeMarc Mutz2016-11-202-47/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce helper functions switch_{on,off,from_to} to make the code more readable, and prepare everything for later optimizations reducing the sizes of critical sections (by locking the mutex later, or even never). This commit, however, is only concerned with shutting up tsan. In waitForResult(), simplified the code by removing an unneeded if guard: the condition is checked in the while loop immediately following in the then-block, and the local variable declaration that precedes the loop is not worth guarding. Change-Id: I24bfd864ca96f862302536ad8662065e6f366fa8 Reviewed-by: David Faure <david.faure@kdab.com>
| * | eglfs: fix eglfs_mali compile for odroid-maliPeter Seiderer2016-11-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid duplicated struct fbdev_window definition (introduced by commit 58bed4cda98e8e25db8adc61c7db73b6853077dc) by renaming the local shadow definition to struct shadow_fbdev_window. Task-number: QTBUG-57156 Change-Id: I72b03f09fc57ddcd0284d6d3554a5658e02b80fc Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Julien Corjon <corjon.j@ecagroup.com>
| * | Also release winmain, qopenglextensions under commercial licensesKai Koehne2016-11-184-10/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add commercial licenses as an alternative to BSD for code that is statically linked into applications by default. BSD requires attribution even for commercial customers, which is not intended. This is a manual backport of parts of change 71404b0be146 in 5.7, and should be dropped when merging to 5.7. [ChangeLog][License Changes] Static libraries that are linked into executables (winmain and qopenglextensions) are now licensed under BSD _and_ commercial licenses. Change-Id: I0d33bc09c06548d63b11a39027e9bb12c1b9a915 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | Doc: Add missing reference to qInfo()Kai Koehne2016-11-181-1/+1
| | | | | | | | | | | | | | | Change-Id: I7438aa8ff9fddf2e0155ffe0d442f96d4d9265d4 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
| * | QDateTimeParser: localize variable to avoid shadowingEdward Welbourne2016-11-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The outer scope it was in had a later clause with its own pos variable. Change-Id: I8d083d3d5935416ef82a78890ed145f02d6d6ded Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * | Use QPersistentModelIndex for storing a model indexAndy Shaw2016-11-172-36/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QModelIndex is not safe to be used to store an index as it is designed to be discarded right after use as the index information can change. Therefore a QPersistentModelIndex should be used instead to store the index. Subsequently the m_index does not need to be updated whenever the model changes anymore as this is already done for us. Task-number: QTBUG-49907 Change-Id: Icc93e410de2821c503ea15a7a1dd9ae32634914e Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
| * | QXbmHandler: don't construct a QByteArray just to find '0x' in textMarc Mutz2016-11-161-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even QByteArray::fromRawData() allocates memory. Instead of QByteArray::contains() and indexOf(), use good ol' strstr(), like already done elsewhere in the same function. Apart from the memory allocations saved, this fixes a Coverity error complaining that indexOf() can return -1. It's a false positive on the first occurrence, because we didn't call that function unless we know there is a "0x" in the string, but the second _was_ wrong, because we applied it on a new buffer, with unknown content. Coverity-Id: 11262 Change-Id: I18f352c5576e24f89a5c3ef7f2f1b2176f2a235d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * | docs: Reference QLineEdit::hasAcceptableInput() in setValidator()Sérgio Martins2016-11-161-1/+1
| | | | | | | | | | | | | | | | | | | | | Easy to miss otherwise and hasAcceptableInput() already references setValidator(). Change-Id: Id2d63050db670ab8f7150d7f76492664751cd2da Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * | QCss: Fix parsing of charsetMartin T. H. Sandsmark2016-11-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When including a CSS file in a HTML file sent to QTextDocument, and the CSS file starts with «@charset "UTF-8";», which is the correct way of declaring that, the parsing fails. If you omit the space, like «@charset"UTF-8";» the parsing succeeds, which is wrong. Fix this by expecting and swallowing whitespace after the @charset tokens. Task-number: QTBUG-54829 Change-Id: I32044e8d24bda70c1eb06bf74af50d4cabe2211d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * | QXbmHandler: fix missing NUL-terminationMarc Mutz2016-11-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The buffer is fed into strstr() on the next loop iteration, but strstr() expects a NUL-terminated string. In the equivalent code some lines up, the buffer is explicitly terminated, and we never write the last character of the buffer again, so we'll not fall off the end of the buffer, but if we read less bytes than in the last line, we'll parse garbage from the previous line. Change-Id: I354e1ce1dea71188942305190500b4778a69b4ff Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * | QFontEngine: Cache whether or not a font can be smoothly scaledRobin Burchell2016-11-153-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will be used by QtQuick to correct a performance regression introduced by 592614ea3ecd90ede2ae1b8e6579d1b898f474ec -- QFontDatabase::isSmoothlyScalable is quite computationally expensive; and now it is unconditionally expensive regardless of the platform. Change-Id: I82bfa65a963c6c3c276d574f2b379da4a9ba5b69 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | | QtCore: Add missing overrideAlexander Volkov2016-11-165-20/+20
| | | | | | | | | | | | | | | Change-Id: Ifdec31aabdd0371f36abbb382e49f52f5b58ee94 Reviewed-by: hjk <hjk@qt.io>
* | | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-11-1542-150/+339
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/plugins/platforms/eglfs/qeglfsintegration.cpp src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp Change-Id: Id2da7c775439adb62646d5b741ee7c638042b34b
| * | Cocoa: Make dictation via speech recognition workMorten Johan Sørvig2016-11-141-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Returning NSNotFound from the NSTextInputClient selectedRange implementation when there is no selection prevents dictation from activating (for unknown reasons). Return an empty {0, 0} range instead. Text input methods such as Pinyin still work after this change. [ChangeLog][macOS] Speech to text dictation now works for Qt text input. Change-Id: Ibf1729bdd271e8ed5ce3c9d2a0373c8ab3613d8e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * | QClipboard: Fix emitting changed() in XCBPalo Kisa2016-11-141-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In XCB environment the QClipboard::changed() was not delivered if the QClipboard::clear() was issued by other Qt app/process. If the QClipboard::clear() is used, then the owner in xcb_xfixes_selection_notify_event_t is XCB_NONE, so we need make the decission to handle this event by the selection_timestamp and our m_timestamp[mode]. Task-number: QTBUG-56972 Change-Id: If4c486ac02223eac506465cac7ff1a07bd02a187 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | Revert "Optimize QJsonObject::operator=="Marc Mutz2016-11-142-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 862fa24179505ef725ff78bb64bdabd54bd00c95, which attempted to optimize QJsonObject::operator== under the assumption that the entries it holds are lexicographically sorted. They should be, because Object::indexOf() finds them by binary search, but apparently both fromJson(), as well as construction through op[] leave (some) entries unsorted. This behavior should be fixed, because other code relies on sorted entries, too, but until the problem is more fully under- stood, revert the patch to unbreak equality comparisons. Task-number: QTBUG-56843 Change-Id: I5b608c16d1bbcb4f01b75ce93bd58b49ff050be2 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | doc: Add missing documentation for QXcbWindowFunctions::setWmWindowRole()Alexander Volkov2016-11-121-0/+29
| | | | | | | | | | | | | | | | | | Change-Id: I5a457eb19fee011868cdf6d0534713c760fd57d2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: David Faure <david.faure@kdab.com>
| * | doc: Remove obsolete note for QWidget::paintEvent()Alexander Volkov2016-11-122-13/+0
| | | | | | | | | | | | | | | | | | | | | qt_x11_set_global_double_buffer() is dead code since Qt 5. Change-Id: Ie9a33b6f03dc2e39f12bc790292bb0d227f05c44 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * | Remove unused variable in QIconLoader::findIconHelper()Alexander Volkov2016-11-121-2/+0
| | | | | | | | | | | | | | | Change-Id: Idac0b24631187063445ea5acfd078b2479359d52 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * | Improve the validation algorithm for binary JSONLars Knoll2016-11-112-19/+41
| | | | | | | | | | | | | | | | | | | | | | | | Add better boundary checks and catch (hopefully all) cases where invalid binary JSON could cause crashes. Change-Id: I206510b7c5e3ba953802a5f46645878e65704ecc Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * | xcb: Warn and bail out when even the basic, dummy context failsLaszlo Agocs2016-11-101-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | Do not move on to glGet since the behavior is undefined. Task-number: QTBUG-48986 Change-Id: Ifd279635ed1b8441f92697965d15ae3ecb59a7e3 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
| * | Enable GL prototypes with recent Khronos headersLaszlo Agocs2016-11-101-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent Khronos headers decided to break the world by guarding all function prototypes with GL_GLEXT_PROTOTYPES which has traditionally been used for extension headers only. Until this gets corrected - see https://lists.freedesktop.org/archives/mesa-dev/2016-September/128654.html - add the define to the config tests and qopengl.h. While 5.7 already has some of the qopengl.h fixes due to an upgraded ANGLE shipping with newer headers, this is a cross-platform issue that will surface everywhere eventually. Therefore we target the full set of fixes to 5.6. This time we also make sure the forced define of GL_GLEXT_PROTOTYPES is removed before including the ext header, thus apps get the ext protos only if they actually requested them. Task-number: QTBUG-56764 Change-Id: Ib2c6d2e7b71b8fb8683424f43e6289e64e4ee46c Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Andy Nichols <andy.nichols@qt.io>