summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
| | * QUrl effective TLDs: update tableKai Koehne2016-10-212-11304/+12851
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are more than 1000 new entries since the table has been generated the last time. The autotest needs to be tweaked because the rules for the .mz domains have changed; use the .ck domain instead. Change-Id: Ife692afd46ac41a66604e966e5e8cb57c7aa649c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * QImage: cache colortable sizeMarc Mutz2016-10-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Coverity threw an error that in the else branch, the expression colorTableRGB16[tableSize - 1] accesses uninit'ed data. The working theory is that it fails to perform the implication isEmpty() → size() == 0 This patch, therefore, checks for size() == 0 instead of isEmpty(), which is hardly less readable and might help Coverity understand the code better. Then again, Coverity might not understand that the tableSize can never be negative. If that's the case, another patch will be needed, but let's try the simpler solution first. Coverity-Id: 11420 Change-Id: Ibfe2a798c55af95c8001fa909aa94a6c5bc7c647 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * Fix UB (ininited pointer read) in qt_egl_device_integration()Marc Mutz2016-10-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The m_integration member of DeviceIntegration, a naked pointer, was checked for nullptr in the DeviceIntegration ctor, but never set to nullptr. Fix by init'ing it to nullptr in the ctor-init-list. Coverity-Id: 172056 Change-Id: Ia1dc9b67b9d16a991bba82338eedb19de68f91d8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * QNetworkReplyHttpImpl: Fix UB (member call) in destruction sequenceMarc Mutz2016-10-201-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found by UBSan: qnetworkreplyhttpimpl.cpp:457:29: runtime error: member call on address 0x602000009cf0 which does not point to an object of type 'QNetworkReplyHttpImpl' 0x602000009cf0: note: object is of type 'QObject' 1e 00 80 18 20 e0 bb 12 54 7f 00 00 00 f2 00 00 70 61 00 00 02 00 00 00 ff ff ff 06 08 00 00 00 ^~~~~~~~~~~~~~~~~~~~~~~ vptr for 'QObject' #0 0x7f541461b71b in QNetworkReplyHttpImplPrivate::~QNetworkReplyHttpImplPrivate() qnetworkreplyhttpimpl.cpp:457 #1 0x7f541461b7f0 in QNetworkReplyHttpImplPrivate::~QNetworkReplyHttpImplPrivate() qnetworkreplyhttpimpl.cpp:458 #2 0x7f540f26df1a in QScopedPointerDeleter<QObjectData>::cleanup(QObjectData*) qscopedpointer.h:54 #3 0x7f540f26df1a in QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> >::~QScopedPointer() qscopedpointer.h:101 #4 0x7f540f26df1a in QObject::~QObject() qobject.cpp:940 #5 0x7f540e915f6e in QIODevice::~QIODevice() qiodevice.cpp:416 #6 0x7f5414599bae in QNetworkReply::~QNetworkReply() qnetworkreply.cpp:444 #7 0x7f54145e6f5e in QNetworkReplyHttpImpl::~QNetworkReplyHttpImpl() qnetworkreplyhttpimpl.cpp:239 #8 0x7f54145e6f5e in QNetworkReplyHttpImpl::~QNetworkReplyHttpImpl() qnetworkreplyhttpimpl.cpp:242 #9 0x7f54144b3539 in void qDeleteAll<QList<QNetworkReply*>::const_iterator>(QList<QNetworkReply*>::const_iterator, QList<QNetworkReply*>::const_iterator) qalgorithms.h:317 #10 0x7f54144b3539 in void qDeleteAll<QList<QNetworkReply*> >(QList<QNetworkReply*> const&) qalgorithms.h:325 #11 0x7f54144b3539 in QNetworkAccessManager::~QNetworkAccessManager() qnetworkaccessmanager.cpp:496 Fix by moving the emission of the QNetworkReplyHttpImpl::abortHttpRequest() signal from ~Private, when the public object is merely a QObject anymore, to ~QNetworkReplyHttpImpl(), when the public class is still itself. Change-Id: Ifb3b19f6d180452bdf3fc26f54629ef780a5d9d9 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
| | * winrt: Added timeout for cancellation of socket read operationOliver Wolff2016-10-201-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As the function runs on the XAML thread it can make the app unresponsive/wait forever on a socket close. Thus we should not wait forever but have a timeout. If the timeout is hit the socket is not closed properly but hard reset. Change-Id: I82e9425c0f8195e3465027fdc2417a93f1c1ad91 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
| | * macOS: Don't override the set tab text color with whiteAndy Shaw2016-10-192-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Originally on macOS it would override any tab text color with white for the active tab as it would set it directly on the option palette inside the style code. This would cause it to ignore any changes done by the user in a changed option, via setTabTextColor or in a proxy style. Therefore the setting of the color should be done when the style option is initialized and only if the tab text color has not been set by the user. This has the added effect of making it easier to change the color for tabs via a stylesheet since it will not be overridden in the style but setup correctly in the option instead. Change-Id: Ic338e96470112cba71d422bce79e664df0cb188a Reviewed-by: Jake Petroules <jake.petroules@qt.io>
| | * macOS: Only show menu and allow dragging on proxy when a file path is setAndy Shaw2016-10-194-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | If there is no file path set then it should not be possible to see a menu or to drag from a proxy icon in the titlebar. Task-number: QTBUG-56082 Change-Id: Ib8305bcab5717bc8cb7ddabbb079f152debbdded Reviewed-by: Jake Petroules <jake.petroules@qt.io>
| | * PDF: Handle monochrome images correctlyAndy Shaw2016-10-192-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an image is considered to be monochrome then it should not be making the white part of the image transparent, the colors should be kept as is. Task-number: QTBUG-56489 Change-Id: I3621ca7be2a0ebe6852363f860c0b3de28d28a31 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * Don't crash while parsing malformed CSSSérgio Martins2016-10-191-2/+7
| | | | | | | | | | | | | | | | | | Task-Id: QTBUG-53919 Change-Id: I31a0e218e4e41ee217f8f87164f115450d69d42c Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | * xcb: fix passing of focus from child to its top level QWindowClinton Stimpson2016-10-191-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the client message _NET_ACTIVE_WINDOW, not all window managers will pass focus from a child window to its root window, Detect this child-to-root case, and use xcb_set_input_focus() instead. Task-number: QTBUG-39362 Change-Id: Ib32193018e3b725b323f87d7306c9ae9493d78a7 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
| | * QOrderedMutexLocker: unlock in reverse order of lockingMarc Mutz2016-10-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an improvement for the following reasons: - Should mutex locking allocate any kind of resource, unlocking in reverse order will free those resources in inverse order, which helps typical allocators. - If the lock pair is contended, by unlocking in the same order as locking, we were allowing the waiting thread to wake up to take the first lock just to find that the second lock is still held by someone else. The order of unlocking has no influence on the correct- ness of the algorithm. Change-Id: Id16b0342aef325c14a7bd8836d3a75db68ef2588 Reviewed-by: David Faure <david.faure@kdab.com>
| | * Document QClipboard::mimeData can be nullAlbert Astals Cid2016-10-191-2/+3
| | | | | | | | | | | | | | | | | | | | | The current wording (reference) seems like it's always a pointer to valid stuff Change-Id: I2a9f8bde7d2ba672e4e664ff731a3272a6deaaaa Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * Windows: Fix regression in QFSFileEnginePrivate::nativeWrite()Andy Shaw2016-10-191-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>
| | * QJsonDocument: fix repetition of 'document' in docAnton Kudryavtsev2016-10-191-2/+1
| | | | | | | | | | | | | | | Change-Id: I8909336274b2c72e526d63fe9e21368550de6678 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * QAndroidPlatformTheme: wrap char* in QL1S to avoid warningsAnton Kudryavtsev2016-10-181-2/+2
| | | | | | | | | | | | | | | Change-Id: Idcc70038051b03366aa447f3a4c48912d3f911d5 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| | * Apple OS: Handle QSetting strings with embedded zero-bytesTor Arne Vestbø2016-10-184-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>
| | * QCommonStyle::standardIcon: Add 64x64 Qt logo pixmap for SP_TitleBarMenuButtonFriedemann Kleint2016-10-181-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For SP_TitleBarMenuButton, the style defaulted to standardPixmap() would return a 16x16 XPM encoded pixmap from qcommonstylepixmaps_p.h. This resulted in a too-small menu icon when displaying QMdiSubWindow with the default icon set on a High DPI screen with Qt::AA_DisableHighDpiScaling set. Add a larger icon from resources. Change-Id: If88c606a31ee9499f520089365f685ec75e0ddad Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | * QOrderedMutexLocker: fix UB (pointer comparison with <) in static relock()Marc Mutz2016-10-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Comparing pointers that do not point into the same array using operator< is UB. You need to use std::less<>. The QOrderedMutexLocker ctor already used std::less to compare pointers, but the static relock() function was not fixed. Amends 50073521649e3818d87920751ab95acd2c2dfd15. Change-Id: I584d382391dd5a2af75020a4e77f3e42ee5d5708 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
| | * Fix DBus compilationhjk2016-10-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Don't use C++11 nullptr in 5.6. Change-Id: I57e9595b2e1cede995eed09878bf02ee30482659 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Alberto Mardegan <mardy@users.sourceforge.net>
| * | Qt 5.7 requires C++11 so this hint is not needed anymoreFrederik Schwarzer2016-10-181-5/+2
| | | | | | | | | | | | | | | | | | Change-Id: I7e267c69ccf3835e4d69b4c612f1baaf40d8be39 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-10-1710-9/+38
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/macx-ios-clang/features/resolve_config.prf src/testlib/qtestcase.qdoc Change-Id: Icefa63056ffb37106f35299a8f19165535571799
| | * Fix QtGui compilation without OpenGLhjk2016-10-161-0/+2
| | | | | | | | | | | | | | | Change-Id: I2a9f8bde7d2ba672e4e664ff731a3272a6def516 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | * iOS: Report correct physical DPI for iPhone 7 PlusTor Arne Vestbø2016-10-141-2/+2
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-56509 Change-Id: Ibae94262c2a4c917aeca00cb1a1c28e5ae60f0c4 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
| | * Doc: Fix typo in QtStyledItemDelegate::paint() docsLeena Miettinen2016-10-141-1/+1
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-56399 Change-Id: Iaace0ed05098ab6d880b06a40d8e13aa9288c5ec Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
| | * Specify timeout is in millisecondsAlbert Astals Cid2016-10-141-3/+3
| | | | | | | | | | | | | | | Change-Id: I465b343b6fe64c8d1ce17e34be5f864e8556d374 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * QMimeXMLProvider: add missing out-of-line destructorJ-P Nurmi2016-10-132-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | Fixes build with the latest GCC 7. Change-Id: I4900a256ed1c6cb177d7f94d54e5b07c06ddad08 Task-number: QTBUG-56514 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| | * Doc: add notes about validator and completer in QComboBoxFrederik Gladhorn2016-10-131-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When setting the editable property to false, we delete the internal QLineEdit used by QComboBox. Add comments that this results in the loss of validator and completer. Task-number: QTBUG-56035 Change-Id: Ife04ac2b9bb3f32fae5328f1ec73b1d5d769d52c Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com> Reviewed-by: Nico Vertriest <nico.vertriest@theqtcompany.com>
| | * Unset qgl_current_fbo when the default FBO is boundAlexandru Croitor2016-10-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously when a new QOpenGLFramebufferObject was bound, the QOpenGLContextPrivate::qgl_current_fbo member was also updated to point to this new object. But if a user called QOpenGLFramebufferObject::bindDefault(), qgl_current_fbo was not unset, meaning that if the FBO object would be deleted at some point, qgl_current_fbo would be a dangling pointer. This patch makes sure to clear the value of qgl_current_fbo when bindDefault() is called. It is cleared, and not set to point to another object because the default platform OpenGL FBO is not backed by a QOpenGLFramebufferObject. Task-number: QTBUG-56296 Change-Id: I68b53d8b446660accdf5841df3d168ee2f133a90 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | * Show warning when setting new default QSurfaceFormatAlexandru Croitor2016-10-131-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a global shared context is created, and afterwards a new default QSurfaceFormat with a different version or profile is set, it can lead to issues with context sharing. The documentation for QSurfaceFormat::setDefaultFormat mentions this. It would be helpful to actually show a warning in case it happens. Change-Id: I71f7ce95496e1ecbfc6a0c7d7bed146ef8dc351e Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | * Document that am/pm in QDateTime::toString are locale-specificKai Koehne2016-10-131-3/+6
| | | | | | | | | | | | | | | | | | Change-Id: I28382b25ac94cbfbad4acff1308ddd8baf5ca693 Task-number: QTBUG-55632 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * QNetworkSession: make sure that "interface" isn't #definedThiago Macieira2016-10-131-0/+5
| | | | | | | | | | | | | | | | | | | | | Depending on #include order isn't a good idea. Change-Id: Ief935e1fcc5d40ecb510fffd147c08dffe6cba2d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * | iOS: check if qApp is still valid before accessing itRichard Moe Gustavsen2016-10-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the application quits, the iOS plugin can be told to delete after qApp has been set to null. So we need to add a check for this, to avoid error messages. Change-Id: I687e0b26e0c54fdd5a8539fe0f31b2e756ea92d8 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-10-1319-50/+107
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also bump minimum required Qt version for Android: Ministro updates. Conflicts: src/android/java/src/org/qtproject/qt5/android/bindings/QtActivityLoader.java src/android/java/src/org/qtproject/qt5/android/bindings/QtLoader.java src/plugins/platforms/android/androidjnimain.cpp Change-Id: I966f249bebf92da37bfdeb995ad21b027eb03301
| | * QIconLoaderEngine: add missing Q_DECL_OVERRIDEsAlexander Volkov2016-10-121-8/+8
| | | | | | | | | | | | | | | Change-Id: I7671b05f2e3c218870dca04f3ed52c231dbe4a9d Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| | * Fix illegal memory access on simple image rotatesAllan Sandfeld Jensen2016-10-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clip the transformed and rounded sourceClip to the source rectangle, so we don't try to rotate pixels outside the source. Task-number: QTBUG-56252 Change-Id: Ib9cb80f9856724118867aea37ead0b02a6c71495 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| | * Remove unused static member QIconLoaderEngineEntry::countAlexander Volkov2016-10-121-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | It was introduced in Qt 4 by the commit 13a31fe82845f8b1f4d86919080d3b2a87c4d061 and was unused even there. Change-Id: I5f3861918ea1f443f7e13439fafa067f2b28a91a Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| | * Android: Ministro updatesBogDan Vatra2016-10-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | - bump minimum required Qt version - use market://details instead which opens Ministro's page directly Change-Id: I3d879503625fe29e7b23149402217337fee6a863 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| | * Android: Don't update offscreen windowsChristian Strømme2016-10-121-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | Offscreen windows should not be handle by the platform plugin. Task-number: QTBUG-50973 Change-Id: I719a24b9bbcaad460d78fdc4095e86d615357cd2 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | * Don't resize windows that aren't attached to a platform windowChristian Strømme2016-10-121-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QWindows that aren't created, and therefore don't have a platform window attached, should not be treated as "normal" windows. The expectation, in our code, is that these windows won't get their geometry updated by the platform plugin, and that the geometry is only changed by the owner. In QQuickWidget's case this was causing the scene to be rendered incorrectly. Task-number: QTBUG-50973 Change-Id: Iea62dfb7fa90cbe450a662c5792c7c4f49c991fd Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | * QXcbShmImage: don't use shmget()'s return unless it succeedsEdward Welbourne2016-10-121-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When shmget() failed, we didn't set m_shm_info.shmid (not even to the -1 failure id) but did pass it (i.e. uninitialized noise) to shmat(), among other related functions. Guard against this; handle failure gracefully. Task-number: QTBUG-56419 Change-Id: Ie823c36c2ede03af6cb5d94ce7b4b5cd543c1008 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> Reviewed-by: Błażej Szczygieł <spaz16@wp.pl> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Joni Poikelin <joni.poikelin@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | * QToolBarAreaLayoutInfo: add missing break statements in switch in distance()Marc Mutz2016-10-121-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A fall-through here is logically non-sensical, because of symmetry (or lack thereof). Thus, a break must have been intended. Add it. While we're at it, also replace the default case label with the non-functional enum value QInternal::DockCount, so that -Wswitch can warn us if ever there should be a new DockPosition. Found independently by both GCC 7 and Coverity. Coverity-Id: 11145 Coverity-Id: 11146 Coverity-Id: 11147 Change-Id: I6bb31c1517e40f0cb06ceaee5aeb6fa78b84a523 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * harfbuzz: compile with GCC 7Marc Mutz2016-10-121-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC 7 warns about implicit fall-throughs now. Fix by adding the missing comment. Didn't send a patch to upstream, because upstream harfbuzz-old hasn't seen a commit in four years, and this code is no longer in harfbuzz-ng. Change-Id: Ic97efbe01edd37738dcdf43528e82511197d7fb2 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
| | * QtOpenGl: compile with GCC 7Marc Mutz2016-10-121-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC 7 warns about implicit fall-throughs now. Fix by adding the missing comments. Change-Id: I081d4db07c7f2b30ee6344a166aaec34ac639ee5 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * QtDBus: compile with GCC 7Marc Mutz2016-10-121-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | GCC 7 warns about implicit fall-throughs now. Fix by adding the missing comments. Change-Id: I629fb3aced9296c81496f19f6ff78c7a5a12e991 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * QComboBox: add missing break in switch in keyPressEvent()Marc Mutz2016-10-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the Key_Space case falls through, it does because !d->lineEdit, which makes the following case dead code, because it is guarded by the same condition. Fix by adding the break, which ensures that if those two cases ever diverge, the code stays working by intention, not chance. Independently discovered by GCC 7 and Coverity. Coverity-Id: 11157 Change-Id: Id14114b4157549d0f6fa036e8aa2bf0fa5a863cf Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | * QFusionStyle: add missing break in switch in drawControl()Marc Mutz2016-10-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old code fell through into from the CE_RubberBand case into the CE_SizeGrip case if the cast of the the QStyleOption to a QStyleOptionRubberBand failed. Quite obviously, the drawing of a rubber band was requested by the caller, drawing a size grip instead must be considered a bug, regardless of any additional guards employed by the size grip case. So, fix by removing the conditional return in the success case and adding an unconditional break. The function ends after the switch, and all other cases also break instead of return, so consider the switch from return to break a contribution to the internal consistency of the function. Discovered independently by GCC 7 and Coverity. Coverity-Id: 11182 Change-Id: I2158f03b9eb018b952716ffa5e615c7b3cc49132 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | * QCalendarWidget: fix misleading if-else cascade in QCalendarDayValidator::text()Marc Mutz2016-10-121-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By the time we hit the last else, its if condition is trivially true, so don't check it (but leave it as a comment). Consequently, remove the trailing (dead) return of a default- constructed QString. Coverity-Id: 62766 Change-Id: I47e1a49f40e6ec95d29c5052c78bfadb63af3b84 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * QCalendarWidget: fix a missing break statementMarc Mutz2016-10-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC 7 warns about implicit fall-throughs, and here it looks like a break was indeed missing. It surely isn't catastrophic that the other update code is executed, too, but it's also useless. Turns out Coverity knew it all along... Coverity-Id: 11162 Change-Id: I88fc0174a66ec337b2d93c006e70be8d5f3bbc33 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * QFileDialog: add missing break statements in switch in labelText()Marc Mutz2016-10-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is of course wrong to potentially return the text of the Cancel button if the text of the Accept role button was asked for. Found independently by GCC 7 and Coverity. Coverity-Id: 11150 Change-Id: Ie30f7875daee16a78eeff4b314ce17cbd7cd3aa8 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * Fix gradient race condition / read-after-freeAllan Sandfeld Jensen2016-10-122-26/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | A gradient table may be deallocated while in use because we don't keep track of references. To fix it we now reference count the cache entries. Task-number: QTBUG-14614 Change-Id: I772ebf565ccf41d476811ca9a51b721f10de8aeb Reviewed-by: Marc Mutz <marc.mutz@kdab.com>