summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Document third-party code in Cocoa QPA pluginKai Koehne2016-11-252-0/+42
| | | | | Change-Id: I2c30f5da25c83d6129403cb9b745a2f17fd6fd9e Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.7' into 5.8" into refs/staging/5.8Liang Qi2016-11-2427-130/+153
|\
| * Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-11-2427-130/+153
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/socket/qnativesocketengine_winrt.cpp tools/configure/configureapp.cpp tools/configure/environment.cpp Change-Id: Ieae6f2ee004a87f041751852b687484f91ee4480
| | * 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>
* | | | Use harfbuzz feature to check for HarfBuzzLars Knoll2016-11-245-18/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | instead of defining a special macro for it. Change-Id: I715380717f7d871571f663be30b73f7d95d83d71 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* | | | Don't set platform specific QT_NO_FOO defines in qglobal.hLars Knoll2016-11-245-28/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They should be enabled/disabled through the configuration system. Remove some unused defines, and move one define from qglobal.h to a proper feature definition in Qt Gui. Change-Id: Ie8d5bff9712ba745af60b42ceca3f0440bed2706 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | Optimize fontdatabase fallbacksForFamilyAllan Sandfeld Jensen2016-11-231-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Short-cut the case-insensitive string comparison when lengths doesn't match. This reduces the time spend in ucstricmp from 8% during start-up of the textedit example, to under 1%. Change-Id: Ib3a92900b330453289ec9eff4830dfac6a9a5da2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | Clean up the resource reading codeSimon Hausmann2016-11-231-45/+24
|/ / / | | | | | | | | | | | | | | | | | | | | | Instead of doing the conversion from the big-endian data by hand, let's use the convenience functions from qendian.h. Change-Id: If3966ca94428afabb1f5c922967fb9970f976622 Reviewed-by: hjk <hjk@qt.io>
* | | QSettings: Replace deprecated Win32 SHGetSpecialFolderPathKai Koehne2016-11-231-35/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SHGetSpecialFolderPath is declared 'unsupported' by Microsoft, and has problems with non-ASCII characters. Replace it by the newer SHGetKnownFolderPath. Task-number: QTBUG-50570 Change-Id: I8b2dfa10fa5dc30e6c3be094a2ba8d7c3504f2ca GPush-Base: 4d181bd93234a3747b520d10417825a0147bfeb1 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | | Remove last traces of MeeGoLars Knoll2016-11-238-920/+2
| | | | | | | | | | | | | | | | | | Change-Id: I5242f1dfcfccf9811398e717b90196e6228d1dc5 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | | Revert "Revert "Deduplication fetchTransformed""Allan Sandfeld Jensen2016-11-231-137/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qdrawhelper.cpp is now compiled without PCH, and changes blocked by the ICE can be reinstated. This reverts commit cd9de59177ccbeb7fdfacf8716af7bb20112c880. Task-number: QTBUG-56817 Change-Id: I8d674768d16b3705598bfe5d08ed98376c97a478 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Remove Mac specific code paths from qiconvcodecLars Knoll2016-11-232-45/+1
| | | | | | | | | | | | | | | | | | | | | | | | The code is dead, as the codec is never used on macOS. Change-Id: I86138f1c95e5564256b4d592f0044e83658def93 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | | Clean up iconv configurationLars Knoll2016-11-236-22/+17
| | | | | | | | | | | | | | | | | | | | | | | | Turn iconv off if ICU is being used (in line with codecs.pri) and get rid of the DEFINES += GNU_LIBICONV in the pri file. Change-Id: I6fbca975498adbb3e67f913ae9b1dd5cc53ee8da Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | | De-duplicate the systemsemaphore entryLars Knoll2016-11-231-5/+1
| | | | | | | | | | | | | | | Change-Id: Id015cfe60956d899bbb58597b88204738578b7fe Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | | Register fonts with preferred names on WindowsAllan Sandfeld Jensen2016-11-235-175/+190
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Looks up the canonical names of enumerated fonts and register them under their preferred names if present. Also changes the logic handling registration of english aliases, so it is always done, even if it might in rare cases cause a double registration since that is safe. Task-number: QTBUG-53458 Change-Id: Ia010774b26072192b55697b717cc37442c852881 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | | Remove second mentioning of cycle.h 3rdparty licenseKai Koehne2016-11-231-29/+0
| | | | | | | | | | | | | | | | | | | | | | | | This is now documented in the qt_attribution.json file added in commit 41a7d74385eece725435159ca021151e871bf116 . Change-Id: I4f13397a14de7d9f98ba146cabf64dafac5dada4 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | List ANGLE contributions after anotherKai Koehne2016-11-231-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | Place ANGLE at the start of the title, so that the different entries are sorted correctly. Change-Id: I11e9d25874f06450a3d9049b5f5c94aa53621e08 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | Improve documentation for 3rdparty freebsd codeKai Koehne2016-11-231-7/+3
| | | | | | | | | | | | | | | Change-Id: Iad5c659c2c422bf20e7ba6161889c7b261512e9e Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | Fix forkfd 3rd party documenationKai Koehne2016-11-232-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bring the copyright lines in the license and the one's in the metadata into line by using the ones from forkfd.c. Also bring back description of forkfd from 5.6 documentation. Change-Id: I423ee8d5d1e1c866a34c346f78520d33ea099b5e Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | Document The Public Suffix ListKai Koehne2016-11-233-3/+402
| | | | | | | | | | | | | | | | | | Change-Id: I3c8b00e04ed30209b0de0927b473ba2b9a4f0c87 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | Extend documentation for SHA-3 third-party licenseKai Koehne2016-11-231-0/+2
| | | | | | | | | | | | | | | | | | | | | Write down which files are under CC0, and which under BSD. Change-Id: Ifdbfa3393b2a0f0d857e6c569bd105426c0719cb Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | Remove wince checksMaurice Kalinowski2016-11-231-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | Windows CE is not supported since 5.6. No need to have checks anymore. Change-Id: I384bd67e04dec06e83ee69b4ef5dc7dd97888c14 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | | winrt: Add printsupportMaurice Kalinowski2016-11-232-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For WinRT QPrinter and co are disabled in the new configure system. Still, we need to have printsupport enabled as a module, providing no printer. Task-number: QTBUG-56321 Change-Id: I95ce538e8f54073832af551ccf7f981e877a3b25 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | | winrt: Add support for Windows Information ProtectionMaurice Kalinowski2016-11-232-5/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Windows Information Protection is used for splitting corporate and personal data, requiring connections to be established in a different way instantiating ThreadNetworkContext. Usage is enabled via the QT_WINRT_USE_THREAD_NETWORK_CONTEXT environment variable. Change-Id: I3aaa097b66fc616d42cd05a1e20bbcb004f6e467 Reviewed-by: James Tong Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | | Remove some #if 0 blocks from API headersEdward Welbourne2016-11-232-13/+0
| | | | | | | | | | | | | | | | | | | | | Noticed in API review for 5.8 release. Change-Id: I1dd48c676924048c32fab8307868cf61915df131 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* | | AreArgumentsNarrowedBase: Correct logic for narrowing connect() castsEdward Welbourne2016-11-231-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The prior test deemed there to be narrowing if source and destination integral-or-enum types didn't have the same signedness; but all values of an unsigned source type can be represented in a larger signed destination type, so there is no narrowing in this case. Updated QObject test-case to match. Change-Id: I517a5997adcad70e185d7469a8d26788e463cb75 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | | QString: optimize remove(QChar, Qt::CaseSensitivity)Anton Kudryavtsev2016-11-231-15/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | remove(int, int) with O(N) was used in a loop. We had a quadratic complexity. Use erase-remove idiom to fix it. Change-Id: I643a2a75619ec5ea2bf99e48a25f64a7f69ba156 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Fix some qdoc-warningsFriedemann Kleint2016-11-234-22/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qtbase/src/corelib/kernel/qdeadlinetimer.cpp:343: warning: Cannot find 'setPreciseRemainingTime(...)' in '\fn' void QDeadlineTimer::setPreciseRemainingTime(qint64 secs, unsigned nsecs, Qt::TimerType type) qtbase/src/corelib/kernel/qdeadlinetimer.cpp:459: warning: Overrides a previous doc qtbase/src/corelib/kernel/qelapsedtimer.cpp:86: warning: Unknown command '\ref' qtbase/src/corelib/global/qglobal.cpp:1184: warning: Undocumented enum item 'MV_WATCHOS_2_2' in QSysInfo::MacVersion qtbase/src/corelib/global/qglobal.cpp:1184: warning: Undocumented enum item 'MV_WATCHOS_3_0' in QSysInfo::MacVersion qtbase/src/corelib/global/qglobal.cpp:1184: warning: Undocumented enum item 'MV_WATCHOS' in QSysInfo::MacVersion qtbase/src/corelib/global/qglobal.cpp:1184: warning: Undocumented enum item 'MV_WATCHOS_2_1' in QSysInfo::MacVersion qtbase/src/corelib/global/qglobal.cpp:1184: warning: Undocumented enum item 'MV_WATCHOS_2_0' in QSysInfo::MacVersion qtbase/src/corelib/kernel/qdeadlinetimer.cpp:175: warning: Missing parameter name qtbase/src/corelib/kernel/qdeadlinetimer.cpp:175: warning: No such parameter 'ForeverConstant' in QDeadlineTimer::QDeadlineTimer() qtbase/src/corelib/kernel/qdeadlinetimer.h:156: warning: No documentation for 'QDeadlineTimer::remainingTimeAsDuration()' qtbase/src/gui/painting/qcolor.cpp:796: warning: Undocumented parameter 'name' in QColor::QColor() qtbase/src/gui/painting/qcolor.cpp:802: warning: Undocumented parameter 'name' in QColor::QColor() Some errors in QDeadlineTimer remain due to qdoc not fully supporting templates. Change-Id: Ie7afd91c48048748eeda23c32056583c31fd7490 Reviewed-by: Nico Vertriest <nico.vertriest@theqtcompany.com> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | | Windows QPA: Detect Windows 10 tablet modeFriedemann Kleint2016-11-225-1/+231
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add new file for dynamically loading Window 10 Helpers via combase.dll and add function qt_windowsIsTabletMode() querying UIViewSettings::get_UserInteractionMode() for "Touch" mode. The style hint QPlatformIntegration::ShowIsMaximized will then reflect the tablet mode setting. Task-number: QTBUG-56831 Change-Id: Ia361dd172fcf0e54fdfc70863c43527f3ea72fe2 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* | | QMutex: make sure we try_lock_for no shorter than the duration passedMarc Mutz2016-11-222-10/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By templating on the <chrono> types and unconditionally using duration_cast to coerce the duration into a milliseconds, we allowed code such as mutex.try_lock_for(10us) to compile, which is misleading, since it's actually a zero- timeout try_lock(). Feedback from the std-discussions mailing list is that the wait_for functions should wait for _at least_ the duration given, because that is the natural direction of variance (tasks becoming ready to run might not get a CPU immediately, causing delays), while an interface that documents to wait _no more_ than the given duration is promising something it cannot fulfill. Fix by converting the given duration to the smallest number of milliseconds not less than the original duration. If that is not representable in an int, use INT_MAX, emulating the effect of a spurious wakeup, which are allowed to happen if the function returns false in that case. In the above example, the try_lock_for call is now equivalent to mutex.tryLock(1); The tryLock() docs state that the actual waiting time does not exceed the given milliseconds, but fixing that is a separate issue. Change-Id: Id4cbbea0ecc6fd2f94bb5aef28a1658be3728e52 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QFormLayout: fix use-after-free in clearQLayoutItem()Marc Mutz2016-11-221-14/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found by ASan when it should have been found by me in the initial review... The old code did, in this order: 1. delete item->layout() (which deletes item, as QLayoutItem::layout() is just a dynamic_cast implemented with virtual functions) 2. delete item->widget() (which is correct, but too late, as 'item' may have already been deleted; this is the first use-after-free bug) 3. delete item->spacerItem() (which is the second use-after-free). Fix by deleting item->widget() (which may be a no-op), _then_ checking for a QLayout, deleting all children (but not the layout), and finally deleting item as a QLayoutItem. Rename clearQLayoutItem() to clearAndDestroyQLayoutItem() to better match what it actually does. Change-Id: Id70a7a137dac5de466ef619f01bfd61dfc150418 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>