summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Fix SCTP API according to Qt conventionsFriedemann Kleint2016-11-226-43/+43
| | | | | | | | inDatagramMode() -> isInDatagramMode() maxChannelCount -> maximumChannelCount Change-Id: Ib64bf52cc3b40354927ee11e3f41d47e84c6d9c4 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix missing last modification time stamp in qrc contentSimon Hausmann2016-11-224-17/+96
| | | | | | | | | The time stamp is added at the end of the node information and consequently this also bumps the version. Task-number: QTBUG-57182 Change-Id: Ia10e006f28c0b168b2bcd74ed8b7098f84d10af3 Reviewed-by: hjk <hjk@qt.io>
* PCRE: Document upstream versionKai Koehne2016-11-191-2/+3
| | | | | | | | Also update copyright. Change-Id: I42a23701734c2c8d3ae43f70cc69dfb609b3a7a3 Reviewed-by: André Klitzing <aklitzing@gmail.com> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* QDeadlineTimer: mark more functions nothrowMarc Mutz2016-11-181-7/+7
| | | | | Change-Id: I3be9c69b46901311e9150a7f718707d8ff523e9e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QRawFont: Add a qHash overloadRobin Burchell2016-11-162-0/+15
| | | | | | | | This will be used in QtQuick to avoid costly string manipulation (which in turn involves memory allocations). Change-Id: I51a67a4cd97cc576f399483c9c0c13da1e1c6e72 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* QCocoaMenu: Force NSMenuValidation when syncing itemsGabriel de Dietrich2016-11-161-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When a menu item's enabled state changes after -[QCocoaMenuDelegate menuWillOpen:] is invoked, i.e., during or after QMenu::aboutToShow() is emitted, that state change may not be taken into account. This is because the automatic menu validation, upon which Qt relies, is not made aware of any such change. By calling -[NSMenu update] when syncing the QPA menu item, we induce Cocoa to invoke -[QCocoaMenuDelegate validateMenuItem:] and ensure that previously synced items, whose state may have changed, will be properly updated. This, however, has a small side effect, namely that menu-holding items will also go through the automatic menu enabling path and may appear disabled since, until now, they were not properly configured. In order to solve this, we set the action on those items as well, and make sure that both of QCocoaMenuDelegate's relevant methods, validateMenuItem: and itemFired:, properly process menu-holding items. Menurama manual test updated accordingly. Change-Id: I62f955538b8be09b8494ea0ce87fca7910148d38 Task-number: QTBUG-56850 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* winrt: Do not shadow variableMaurice Kalinowski2016-11-161-4/+4
| | | | | Change-Id: I70fc9254bfdfe42bf0e8d379537eb60b21be8275 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* winrt: move to range based loopMaurice Kalinowski2016-11-161-7/+9
| | | | | Change-Id: I0694adcff9b591eecf1025074e8b1c478484bd74 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* winrt: Fix ill-constructed loopMaurice Kalinowski2016-11-161-1/+1
| | | | | | | | That loop could never have worked properly. Identified by analyze compile switch. Change-Id: I5e987dc9f5c57d3ffbcf054b7b417b506c02e7e1 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.7' into 5.8" into refs/staging/5.8Liang Qi2016-11-1643-146/+317
|\
| * Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-11-1643-146/+317
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/common/linux-android.conf src/gui/opengl/qopengl.h src/network/socket/qnativesocketengine_winrt.cpp src/network/socket/qnativesocketengine_winrt_p.h src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/eglfs/api/qeglfsintegration.cpp src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp sync.profile Change-Id: If70aaf2c49df91157b864cf0d7d9513546c9bec4
| | * 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>
| | | * Do not guard tslib with evdevLaszlo Agocs2016-11-102-12/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That relation is incorrect. We can have tslib support without evdev. Task-number: QTBUG-54998 Change-Id: I2c09bad73210fa4a13000077480c70365d482e2e Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| | | * Don't count no-break spaces as trailing spacesEskil Abrahamsen Blomfeldt2016-11-091-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No-break-spaces should not be counted in the space data, but rather be treated as any other non-breakable character. We were already taking care of this in the loop we reach if the item starts with a character which isn't whitespace, but there is a second loop for items that begin with whitespace characters. The result of this was that in certain circumstances where you gave the nbsp its own format and made the line wrap, the previous line would count an extra trailing space and it would swallow the first character in its following line. [ChangeLog][QtGui][Text] Fixed a bug where a no-break space would sometimes cause the first character of the containing line to not be displayed. Task-number: QTBUG-56714 Change-Id: Idd760a389052e6de70f6cc397122b217987fa5f2 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | | * Correct a Q_CHECK_PTR()'s parameterEdward Welbourne2016-11-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Someone cut-and-pasted but forgot one of the changes. Change-Id: I647dc8117ebfe8ce3d4b26d468b80c15d4e533e8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | * Documentation: Specify units for QTextDocument::pageSizeSteve Schilz2016-11-091-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Parameter in setPageSize is QSizeF. Without a specified unit it is hard to know what to use as input. Units depend upon the underlying paint device Change-Id: If001b3e9587d6085cc18017680fa20396e936adb Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Nico Vertriest <nico.vertriest@theqtcompany.com> Reviewed-by: Steve Schilz <sschilz@pasco.com>
| | | * QLabel: take DPR of QMovie in account when calculating sizeHintDaniel Vrátil2016-11-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QLabel already does that for QPixmap, so just do the same for QMovie's current pixmap. Task-number: QTBUG-48157 Change-Id: I7b26460f778e56ff017a5efd433f8929f30e4b41 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | | * winrt: remove superfluous codeMaurice Kalinowski2016-11-091-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We do not need to check for an invalid timer id, as this can only happen if the above check is already true. Hence, this was doing the same check twice. Task-number: QTBUG-56756 Change-Id: Icca9b26c32ce88eab76dd02c6c10b24af07bfad7 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| | | * winrt: Do not copy into a referenceMaurice Kalinowski2016-11-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The intention has probably been to reset a reference, which is not required. Task-number: QTBUG-56756 Change-Id: I1ef44b6c9b8365ac5c8d48234137e518558e9398 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| | | * QFontconfigDatabase: remove 200 unneeded relocationsMarc Mutz2016-11-081-26/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Same change as in QColor (d38f86e50b01c6dd60f5a97355031e08d6a47d18). No text and data reduction numbers (ubsan build). Change-Id: I7280a511e785c9442a3a6a1ed55e10011ce0a84e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | | * QGraphicsSceneBspTreeIndex: fix misleading code in event()Marc Mutz2016-11-081-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old code employed a switch statement to filter timer events, but fell unconditionally through to the default case of calling QObject::event(). The final return statement following the switch is thus dead code. Fix by turning the switch into an if and returning QObject::event() unconditionally afterwards, which much better describes the intent of the code, and also fixes the GCC 7 warning about implicit fall- through in the switch (which wasn't implicit to a human, but GCC's comment-reading-capabilities are somewhat limited at this point). Change-Id: I6756a65b3679a446d09fd721dfd0adc24fdf7772 Reviewed-by: Sérgio Martins <sergio.martins@kdab.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | | * QGraphicsWidget: add missing break statement to switch in event()Marc Mutz2016-11-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the QEvent::GraphicsSceneMousePress case falls through, it does so because d->hasDecoration() == false or the virtual call to windowFrameEvent() returned false. It falls through to the case for QEvent::GraphicsSceneMouseMove, etc, which ensures d->windowData and then checks hasDecoration() again, with some other conditions on top, and calls the same virtual function, windowFrameEvent(), with the same arguments again. Now, it could, theoretically, be possible that that second call would, due to the presence of a windowData that wasn't there before, return true when before it did return false. But the only modification to *this between the calls to windowFrameEvent() is the potential allocation of d->windowData, which, if actually effected, will have d->windowData->grabbedSection == Qt::NoSection, hence windowFrameEvent() won't even be called a second time It is therefore safe to assume that a break was intended here, so add it. Discovered independently be GCC 7 and Coverity. Coverity-Id: 11149 Change-Id: Id708a1689ed0f0c914622e388c456ea4576fda02 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>