summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Make some initializers be declarations.Edward Welbourne2016-01-201-10/+10
| | | | | | | | | | This shortens an earlier over-long line of declarations and makes visible that these are declare-and-initialize. Change-Id: I39fa9613196c34f7e2b2da04da729324d7f83a55 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* Avoid shadowing a name (and use the outer variable an extra time)Edward Welbourne2016-01-201-3/+3
| | | | | | | | | | | QDateTimeParser::parseFormat()'s top-level scope has a const int max; this was shadowed by a short-lived max in an inner scope; and the outer scope's max could be re-used one more time after that to save re-evaluating the same unchanged expression it held. Change-Id: I9f07452bb0b4e5ff4bcf6396d42d1419de6276fa Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* Avoid dereferencing before the start of a string.Edward Welbourne2016-01-201-1/+1
| | | | | | | | A check for a backslash before a quote neglected to pretest that the quote wasn't the first character in its string. Change-Id: Ib5226836d1111e37bed984938f7c667be59eb1c5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make it clearer what's happening with a fall-through.Edward Welbourne2016-01-201-2/+2
| | | | | | | | | | | | An if () {...}'s close-brace was hiding on the end of a break; line, an idiom used in several places for braces that existed to contain a case (for the sake of local declarations). This made it hard to see that there was an if() whose else was the resulting (commented) fall-through. So put that close-brace on the comment's line and make the comment clearly indicate it's an else. Change-Id: Ie7e7c7063bef96536d6231297b083fc384f2363e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Expand springForward_data() to cover a few more time-zones.Edward Welbourne2016-01-201-3/+35
| | | | | | | | | The important one is EET, for the benefit of our CI system; but other European zones and the USA's coastal zones likely have enough hackers in them to make this worth checking. Change-Id: Idcc703bce29808e1a0a6279680cc8d3cbed38dac Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Be fussier about setting tst_QDateTime's globals.Edward Welbourne2016-01-201-14/+63
| | | | | | | | | | | | | Time zones change on the whim of politicians. Consequently, we can seem to be in CET/CEST or on UTC (because we tested sample dates when our zone coincided) when we aren't (i.e. we're in a materially different zone at the time probed by some particular test). Make the initialization of the globals that test this more robust against governmental meddling and document the unfixable problem with Algeria: a DST transition *on the epoch*. Change-Id: I17c5c81d339b80af12f4ffab367e28052dd6c2fa Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Nomenclature corrections relating to CET.Edward Welbourne2016-01-201-37/+37
| | | | | | | | | | | | There are several European time zones; the only one relevant to the tests here is CET. They won't work with WET, GMT or EET. So name them and related variables for CET, not for Europe. CET's summer-time isn't called CST; and the (existing) spring forward test works only in CET/CEST, not elsewhere in Europe. Change-Id: I55c7544bf792de7495700b749b935ec534831d8b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QMainWindowLayout::unplug(): Prevent unplugging when the widget is not a window.Friedemann Kleint2016-01-201-11/+12
| | | | | | Task-number: QTBUG-50490 Change-Id: Icf02e2316bbad0794bd5ac6dccd857bfb28a498b Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Fix toDisplayString(QUrl::PreferLocalFile) on WinKevin Funk2016-01-202-23/+55
| | | | | | | | | | | | | | | | | | | | When using QUrl::PreferLocalFile we do want to strip the leading slash, as toLocalFile() would do as well. Behavior change by means of an example: QUrl url(QUrl::fromLocalFile("C:/file.txt") url.toLocalFile() --> "C:/file.txt" Before: url.toDisplayString(QUrl::PreferLocalFile) --> "/C:/file.txt" After: url.toDisplayString(QUrl::PreferLocalFile) --> "C:/file.txt" Task-number: QTBUG-41729 Change-Id: I7d425541f6077ebcf3fcf46feeb7e0f03a0d7fe2 Reviewed-by: Dominik Haumann <dhaumann@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tst_qtextcocumentlayout::blockVisibility - make the test more robustTimur Pocheptsov2016-01-191-1/+1
| | | | | | | | | | | | | The test inserts strings "0" ... "9" into the text document, takes the half of resulting document's size, makes half of lines invisible and compares sizes. On OS X 10.11 after inserting "4" the width changes, so making "4" invisible also reduces the width and QCOMPARE(currentSize, previosHalfSize) fails. Instead of digits, insert the same string "A" 10 times. Change-Id: Ie88a0442703f98949cea9bcdb694cecee59695f3 Task-number: QTBUG-49848 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* Doc: Fix return type of QWeakPointer assignment operatorsTopi Reinio2016-01-191-3/+3
| | | | | | | | | | | | Imprementation of QWeakPointer assign operators have return types that are references. However, in qsharedpointer.h where separate declarations are held for documentation purposes, the reference qualifiers were missing. This led to incorrect documentation being generated. Task-number: QTBUG-49862 Change-Id: I32727762826feb15a3f4f22446e51d2df16e605f Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* Fix transformed text with DirectWrite engineEskil Abrahamsen Blomfeldt2016-01-191-47/+98
| | | | | | | | | | | | | | | | This is a port of f54c5d9133d7aa7636988db36fa6cc51d26434b6 from Qt 4.8 which was lost in the transition to Qt 5. It makes sure we use the correct bounding box for the transformed glyph by getting from DirectWrite itself. [ChangeLog][Windows] Fixed transformed text when using the DirectWrite font engine. Task-number: QTBUG-50009 Change-Id: I416ab64253165b878af6b9837348134fede8092e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* OS X: Ensure system tray icon is prepared even when menu bar is hiddenTor Arne Vestbø2016-01-191-1/+1
| | | | | | | | | | | | | | | | | | On OS X 10.11 (El Capitan) the system menu bar can be automatically hidden, in which case the menu bar height is reported to be 0 when using the menuBarHeight API. This resulted in failing to prepare an image for the system tray icon item, making the tray item "invisible". Instead we now use the [[NSStatusBar systemStatusBar] thickness] API, which returns the correct height regardless of the menu bar being hidden or not. Task-number: QTBUG-48960 Change-Id: I208fb8df13754964a6f254cadfbff06dd56c6bab Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com> Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
* QtWidgets: Improve native and top-level OpenGL widget performanceBłażej Szczygieł2016-01-181-11/+15
| | | | | | | | | | | | | | | | | | | Since 7c6625b105511191f739d07dc658094ff6f682ac native OpenGL widgets are able to render, but performance is very low. It also slows down rendering for top-level OpenGL widgets. Render-to-texture widgets prevent triggering unnecessary backingstore painting when only the OpenGL content changes. This patch makes possible to use that feature for native and top-level widgets by calling "markDirtyOnScreen()" function only when necessary. This patch also prevents native and top-level OpenGL widgets from flickering during resizing. Task-number: QTBUG-50381 Task-number: QTBUG-49620 Change-Id: I0c16ea644fb869a00772fd74e1709611e627bff3 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* WinCE: Build accessibility support on WinCE7Tobias Koenig2016-01-182-17/+34
| | | | | | | | | | | Build the QPlatformAccessibility support on WinCE7, so that QtQuickControls, which depend on the availability of QPlatformAccessibility, can be used on WinCE7 as well. Change-Id: Ice7370b891a2963483bbfe1af8b219717541e64b Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* Support precompiled header files without file extension in VS projectsJoerg Bornemann2016-01-181-1/+1
| | | | | | | | | | | | | | Having a precompiled header file without file extension (or without common file extension) led to an incorrectly generated Visual Studio project file. The custom build step for automatically generating the corresponding source file was missing. Remove the file extension check that apparently was yet another feeble attempt of runtime optimization. Task-number: QTBUG-50442 Change-Id: I0552f94be12cbb70e2f32c242c7364699979bd81 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Center QPrintPropertiesDialog on top of its parentAlexander Volkov2016-01-181-8/+0
| | | | | | | | | Remove QPrintPropertiesDialog::showEvent(). It just accepts QShowEvent, it makes no sense. At the same time this method overrides QDialog::showEvent(), which centers dialogs. Change-Id: I11510feb4a946f347c19d6ac59874b4cb931020e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* CMake: Don't attempt gui-tests if Qt is built with -no-guiStephen Kelly2016-01-182-1/+4
| | | | | Change-Id: I5f327fa1b0c7827535a4b00ca7d0d4281b1eec7b Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* QFocusFrame: Don't crash on null d->widget.Morten Johan Sørvig2016-01-181-0/+4
| | | | | | | | | This can happen with a suitably complex use case (See QTBUG-50263) Change-Id: Ie8fa7b5872a902e802fda5795ade3369399ddb54 Task-number: QTBUG-50263 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* QOrderedMutexLocker: use std::less to prevent undefined behaviorGiuseppe D'Angelo2016-01-181-2/+4
| | | | | | | | operator< between pointers is undefined unless the two pointers point in the same array, which is not what QOrderedMutexLocker does. Change-Id: Ia6594900cfa807a73f20e157ce896b4321a3d746 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Avoid checking the fb status in every bindLaszlo Agocs2016-01-181-2/+0
| | | | | | | | | | | | | | | | On some drivers (e.g. NVIDIA, tested on Windows) the status check is apparently expensive. A simple FBO test app rendering into the FBO on every frame (and thus calling bind()) shows a 19-21% CPU usage. With the patch this gets reduced to 0.8-1%. The check is fairly useless too - whenever creating attachments, the status is checked, so d->valid is up-to-date. Task-number: QTBUG-50496 Change-Id: Ie9f0db34e5c2bc1a1141c734ca0b318419013c0d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Passing parameters to convertLineOffset by pointer instead of referenceFrederik Gladhorn2016-01-181-12/+12
| | | | | | | | | This is aligned with our coding style and it should have been this way from the start. Change-Id: I23a00eb220dd9f17d9239c811b556885a2c0186a Reviewed-by: Fredrik de Vibe <fredrik.devibe@theqtcompany.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* QHttpSocketEngine: ensure pending EOF triggers a notificationAlex Trotsenko2016-01-182-1/+51
| | | | | | | | | | | | When the remote peer closed the connection, a read notification needs to always be emitted, otherwise the higher layer does not get the disconnected signal. From the other side, underlying QAbstractSocket object could temporarily disable notifications from the engine at any time. To avoid possible blocking of the socket, take a pending EOF into account when the read notifications are re-enabled. Change-Id: Iac9d4e2f790530be3500baf5a2000f1f63df5cc2 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
* Haiku: Fix compilation of corelibTobias Koenig2016-01-181-1/+1
| | | | | | Change-Id: I8f962ac7ee85af50a573a451f54931d6c0dd67eb Reviewed-by: Augustin Cavalier <waddlesplash@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Mirclient: update with upstream changesEirik Aavitsland2016-01-1818-374/+956
| | | | | | | Merge in the changes up to revision 306 of the lp:qtubuntu repo. Change-Id: I55dcb9e06e0a3503d6abe4b0894d5ef5a785b6bb Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* Promote backingstore image format to alphaLaszlo Agocs2016-01-172-4/+15
| | | | | | | | | | | | | | Like xcb does since 1bcfc3de7586ddb9f5d1b778b97b26ae3dc9584d. For TranslucentBackground (ARGB32_Premultiplied) there is no change in practice. For RGB32 we will promote to ARGB32_Premultiplied but everything should behave like before, except that we do not rely on undefined behavior anymore when QOpenGL/QuickWidget is in use. For RGB16 this will enable QOpenGL/QuickWidget since there the hole punching mechanism needs an alpha channel always. Change-Id: Id04ea548cee245ec91642f1358a5e501b62ff64c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Android: fix native libs dir.BogDan Vatra2016-01-161-2/+2
| | | | | | | | | | On Andorid 64 bit O.S.s the libs are not located anymore on dataDir/lib/ but they are located on dataDir/lib/<arch>/. Using nativeLibraryDir instead of dataDir we'll get the right folder. Change-Id: I40ef9513eb5b51f81032bd41f9943ab7b959ad51 Task-number: QTBUG-50394 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* QFileDialog: Check whether sizeHint() is valid before resizing.Friedemann Kleint2016-01-151-1/+3
| | | | | | | | Fixes a regression appearing in 5.5 where QtWidgets-based file dialogs showed up too small on Windows. Change-Id: I5f74ab01d4368d67ab79d3a1b145fb63bdd69ca0 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* Lock qfontdatabase mutex in qt_fallbacksForFamilyAllan Sandfeld Jensen2016-01-151-6/+12
| | | | | | | | | | | When called from outside of qfontdatabase, the qfontdatabase mutex will not be locked upon entry to qt_fallbacksForFamily, so we need to add it to the exported version. Change-Id: I16a21708d7cca15730c12de3dbeeaab13ffbd315 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Handle RGB30 formats in OpenGL backing-store integrationAllan Sandfeld Jensen2016-01-152-19/+83
| | | | | | | | Optimizes composition on platforms that may use 10-bit per color channel formats. Change-Id: Ib303c391d47795c79a4ba55d78dbb1c3c702d90a Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Doc: add missing semi-colonThiago Macieira2016-01-151-1/+1
| | | | | | Change-Id: I408dcb81ba654c929f25ffff14291c57198e7367 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* Windows/Direct2D QPA plugins: Fix overrides.Friedemann Kleint2016-01-1411-93/+95
| | | | | | | Fix warnings found by clang. Change-Id: Ia8e7a271e9d33011eded1e63e61dbcaeaf692600 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Optimize OpenGL binding of ARGB32PM backing storeAllan Sandfeld Jensen2016-01-144-19/+60
| | | | | | | | | | Detect premultiplied backing store and upload it without conversion and adjust blend to not multiply alpha again. Task-number: QTBUG-50381 Change-Id: I51939c4f82fbb0c48eaca6e2475bf4cf3722bc2d Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* xcb: Don't clear alpha on every repaintBłażej Szczygieł2016-01-141-2/+7
| | | | | | | | | Since 1bcfc3de7586ddb9f5d1b778b97b26ae3dc9584d every image has alpha in XCB even if it is not used by window. This patch prevents clearing the alpha channel on every repaint when window is not transparent. Change-Id: Icfdd39f8636401906ace77ea3c2fa25386979d5f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* winrt: enable hardware buttons for Windows 10Maurice Kalinowski2016-01-143-37/+67
| | | | | | | | | | | | | | | | | | Previously the hardware and camera button handler were guarded inside a Q_OS_WINPHONE which does not apply to Windows 10. Instead use WINAPI_PARTITION_FAMILY like on other places, this covers Windows Phone 8.1 as well as Windows 10. To find windows.phone.ui.input.h at build time the Mobile Extension directory needs to be added to the include paths inside qmake. On runtime we need to check whether we have hardware buttons or not. In case they exist, register the handlers, otherwise skip registration. Skipping also helps to keep WACK succeeding. Task-number: QTBUG-50427 Change-Id: Ibeae15dbde12553cebd2b73b1a40b754c014f426 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* Replace QStringLiteral with QLatin1String in QFileSelectorAndré Klitzing2016-01-131-2/+2
| | | | | Change-Id: I5c109d26bf5252947ae016465db5675e38cd68c9 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QtConcurrent: Avoid an allocation in ExceptionHolder if there is no ↵Volker Krause2016-01-131-1/+3
| | | | | | | | | exception to store. Qt3D hits this several times per frame. Change-Id: Iaadcfbe79f146bd73b36f01325580dc24a10225c Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QtWidgets: Don't show window of native widget with WA_OutsideWSRangeBłażej Szczygieł2016-01-131-4/+9
| | | | | | | | | | | | | | | | This patch prevents visibility of native widgets which for some reasons has width or height of 0. Due to async expose event in Qt5 we must force "hide_sys()" during resizing for widgets with WA_OutsideWSRange flag. This avoid problems for non-native and visible widgets which are converted to native and then resized: child->winId(); child->resize(0, 0); Task-number: QTBUG-49445 Change-Id: Ied62a4f253f89447941b2dc03316db8c168f4bb5 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
* xcb: Don't duplicate expose eventsBłażej Szczygieł2016-01-132-21/+18
| | | | | | | | | Use ExposeCompressor for mapping the window to prevent duplicating expose event when window is mapped. Remove sending expose event from configure notivy event. Change-Id: I6836c06047ffebd65775aa8aca90750afba6efe8 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* unbreak propagation of dependencies on private modulesOswald Buddenhagen2016-01-131-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | most module project files define two logical modules: a public one and the corresponding private one. these are really separate modules as far as qmake is concerned (even though the private one contains just headers), and consequently have separate dependencies - QT and QT_FOR_PRIVATE. as public modules cannot depend on private ones, all private dependencies would have to go to QT_FOR_PRIVATE, and a dependency on the respective public module would have to be added to QT. this would be a bit tedious, so we have a convenience feature which allows putting private dependencies into QT, but automatically "downgrades" them to their public counterpart when creating the public module's .pri file. however, we failed to put verbatim versions of these private dependencies into the private modules, which meant that these dependencies were not pulled in transitively by the private modules' users. note that this entirely unrelated to QT_PRIVATE - this one defines the private (non-propagated) dependencies of the module's implementation, i.e., the libraries (and headers) that are not part of the link interface. there is no QT_PRIVATE_FOR_PRIVATE, because there is obviously no point in assigning the dependencies to a particular logical submodule when neither one inherits them as far as the qt module system is concerned. Change-Id: Ib056b47dde3341ef9a52ffff13efaf8ef8e6817b Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* make module .pri files more flexibleOswald Buddenhagen2016-01-132-46/+62
| | | | | | | | | | | | save the actual library/framework name and framework paths in the .pri file instead of computing them again at use time in qt.prf. qt_no_framework_direct_includes inherently requires a use-time decision, so this ugliness remains. Change-Id: I09b2775e7d8e1d52e3af0d663e1babde10ae4814 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Correct floordiv() to cope with implementation-defined division.Edward Welbourne2016-01-131-2/+13
| | | | | | | | | | | | Irrelevant once we get to C++11 (so we can revert this in 5.7), but division's rounding direction is implementation defined when either operand is negative [0]. The prior code assumed C++11's truncation (a.k.a. round towards zero), but rounding may be downwards instead. [0] http://en.cppreference.com/w/cpp/language/operator_arithmetic#Multiplicative_operators Change-Id: I2b6b27e1cf629def48b25433e81b9ed8230d8795 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* eglfs: Round value returned from pixelDensity()Morten Johan Sørvig2016-01-131-1/+1
| | | | | | | | | Avoid returning fractional scale factors, which we do not support. This matches the pixelDensity() implementation for the Xcb and Windows platform plugins. Change-Id: I79156e802a0a436b9344f12d35d1f4861e20e7fa Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* [Android]: Java uses some deprecated locale codes so account for theseAndy Shaw2016-01-132-1/+9
| | | | | | | | | | There are three deprecated language codes that Java still uses for the locale so we need to account for these inside QLocale by mapping them to the right language. Task-number: QTBUG-49632 Change-Id: Ib66b3f2763e085f7384228f2490b048bb56be259 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Add Qt6 TODO to remove copy-assign operator and copy-ctorSérgio Martins2016-01-121-1/+1
| | | | | Change-Id: I5d80b272f31ada58d4eb7c19051fe447d6241633 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Fix shortcut modifiers not being propagated after c7e5e1d9eTor Arne Vestbø2016-01-121-1/+3
| | | | | | | | | | | The code-path used by non-OSX platforms were not passing on the native scan-code, virtual key, and modifiers, breaking QKeyMapper::possibleKeys in the process. Task-number: QTBUG-50360 Change-Id: Idc36380a234f0a37d016dbeaca594aeb82c496d2 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
* Fix reentrancy regression in QShortcutMap after c7e5e1d9eTor Arne Vestbø2016-01-122-4/+27
| | | | | | | | | | | When closing a popup dialog using a shortcut, when the popup was originally opened using a shortcut, the closing-shortcut would interfere with the state of the first shortcut, and we ended up sending a key event for the original shortcut. Task-number: QTBUG-50360 Change-Id: I62e5ddb9ca43b28519ede629775bc0d7598dccc4 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Fix GCC 6 warning about placement-new operator on too little spaceThiago Macieira2016-01-121-18/+37
| | | | | | | | | | | | | | | | | | GCC 6 is able to detect when you use a placement new of an object in a space that is too small to contain it. qvariant_p.h: In instantiation of ‘void v_construct(QVariant::Private*, const T&) [with T = QRectF]’: qvariant_p.h:142:9: error: placement new constructing an object of type ‘QRectF’ and size ‘32’ in a region of type ‘void*’ and size ‘8’ [-Werror=placement-new] new (&x->data.ptr) T(t); ^~~~~~~~~~~~~~~~~~~~~~~ This happens even for the false branch of a constant expression (the enum). So split the v_construct function in two pairs, one pair for being able to use the internal space and one pair not so. Change-Id: Ibc83b9f7e3bc4962ae35ffff1425ed898f279dea Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* QVariant: use v_construct instead of duplicating logicThiago Macieira2016-01-121-31/+4
| | | | | | | | | v_construct does what we want, so use it. This is required for the next commit, which solves a GCC 6 warning issue. Change-Id: Ibc83b9f7e3bc4962ae35ffff1425ed5f035f631a Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* QVariant: make sure to default-initialize in v_constructThiago Macieira2016-01-121-1/+1
| | | | | | | | | | Otherwise it's possible to get garbage for primitive types (trivially constructible) under some conditions. Change-Id: I408dcb81ba654c929f25ffff142885fc62395948 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>