summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix QtDBus deadlock inside kded/kiodThiago Macieira2016-03-192-10/+33
| | | | | | | | | | | | | | | | | | | Whenever a message spy was installed, we failed to actually process looped-back messages by queueing them for processing by the spy. That had as a consequence that the caller got an error reply. Worse, since the message had been queued, QtDBus would attempt to deliver it later. Since that message had isLocal==true, bad things happened inside the manager thread. The correct solution is not to queue the message for the filter. If the message is local, then simply deliver directly, as we're still in the user's thread. This used to be the behavior in Qt 5.5. Task-number: QTBUG-51676 Change-Id: I1dc112894cde7121e8ce302ae51b438ade1ff612 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Dmitry Shachnev <mitya57@gmail.com> Reviewed-by: Jan Kundrát <jkt@kde.org>
* Fix QFINDTESTDATA when using cmake ninja generatorStephen Kelly2016-03-196-0/+94
| | | | | | | | | | | | | | | The Qt CI does not have ninja, but the autotest can be used for manual regression finding. cd qtbase/tests/auto/cmake qmake make check cd build cmake . -DHAVE_NINJA=ON ctest -R FINDTESTDATA Change-Id: Ic3f3748f6ab04e37fa5287c59486e5cd46dcabb4 Reviewed-by: Stephen Kelly <steveire@gmail.com>
* QtWidgets: Change QTLWExtra::window from QWidgetWindow to QWindow.Friedemann Kleint2016-03-191-2/+1
| | | | | | | | None of QWidgetWindow's API is used in the code. Task-number: QTBUG-33079 Change-Id: Iecb1e174645eff687ee0d8b29417c30a2c508311 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Move QButtonGroup implementation from qabstractbutton.cpp to qbuttongroup.cppMarc Mutz2016-03-185-148/+198
| | | | | | | | | | | | | Because it's the right thing to do. Needed to introduce qbuttongroup_p.h because QAbstractButton likes to poke around in QButtonGroup's private parts. Fixed includes of qabstractbutton_p.h so it compiles on it's own. Change-Id: Ic7725277d2419754de273b2abd4790476edd0eb4 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QtWidgets: includemocsMarc Mutz2016-03-1880-1/+151
| | | | | | | | A very simple way to save ~3KiB in test size and 440b in data size on GCC 5.3 Linux AMD64 release builds. Change-Id: I6619148cc497116b9772a00e1bc30d573a2b2534 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* xcb: Merge _NET_WM_STATE hints instead of overwritingDavid Rosca2016-03-181-8/+24
| | | | | | | | | | | This makes possible to set custom _NET_WM_STATE hints before showing the window. Change-Id: I86ad3863f7a8b3bb610a31b9af4b02c9d38eb111 Task-number: QTBUG-26978 Reviewed-by: Ilya Kotov Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com> Reviewed-by: Uli Schlachter <psychon@znc.in>
* Merge "Merge remote-tracking branch 'origin/5.6.0' into 5.6" into ↵Frederik Gladhorn2016-03-1814-29/+631
|\ | | | | | | refs/staging/5.6
| * Merge remote-tracking branch 'origin/5.6.0' into 5.6Frederik Gladhorn2016-03-1714-29/+631
| |\ | | | | | | | | | Change-Id: Iac8ff05cd76cbacf859138a73e8e2ed0a979c75a
| | * DirectFB: Fix build in C++98 modev5.6.0Thiago Macieira2016-03-032-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many DirectFB types have constructors in C++, so we can't initialize them with = {...}, like we would be able to if they had been regular POD types. Change-Id: Ic747cc2ab45e4dc6bb70ffff143840e5780ac2bc Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
| | * fix non-git non-prefix shadow buildsOswald Buddenhagen2016-03-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | turns out we need forwarding .pris in this case: without them, QT_MODULE_INCLUDE_BASE points into the build dir, so we fail to find the pre-generated headers. an alternative would be writing primary module .pris which already take that into account, but that would just add even more arcane code paths. Task-number: QTBUG-51521 Change-Id: I59f2a0d3f2095c9dfa0a8d1cabfc007a30bd2d23 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| | * Add changelog for 5.6.0Frederik Gladhorn2016-03-011-0/+519
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ib3177028cf1cbd124ebf1449d5e00039f38b1a92 Reviewed-by: Tuukka Turunen <tuukka.turunen@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
| | * Fix syncqt.pl not respecting #pragma qt_no_master_include in files with ↵Simon Hausmann2016-02-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Windows line endings We need to do the same chop trick that we do further down the file. Change-Id: If4f832f375a11473e66adfcfa76a3b4504b3d406 Task-number: QTBUG-51324 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| | * Fix crash when a standard bus isn't availableThiago Macieira2016-02-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 1f6fa1f37a14742ddf53c753ce52d9dc048cd1dc added a way of suspending delivery of messages to standard buses when they connect and resuming delivery when the main loop starts. As a side-effect, we caused an attempt to do dispatching even after the connection failed. The D-Bus library doesn't like that. Task-number: QTBUG-51299 Change-Id: I0c94a5c2846b48c8aea7ffff143564f7fcede890 Reviewed-by: David Faure <david.faure@kdab.com>
| | * Doc: Simple CSS style: Convert font-sizes from px to ptTopi Reinio2016-02-231-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unlike other rendering backends, QTextBrowser treats px unit in stylesheets as physical pixels when printing, resulting in too small to read font sizes. Work around this by converting font-size px units to pt. Change-Id: I70c71d8bda0996f793bf1c4558775384fe6ec297 Task-number: QTBUG-51083 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Robert Loehning <robert.loehning@theqtcompany.com>
| | * Fix builds without session management.v5.6.0-rc1Andreas Hartmetz2016-02-181-0/+4
| | | | | | | | | | | | | | | | | | | | | My previous change broke it. Change-Id: I3c3a9a65775032a95eebf3526c1bbf2c50773230 Reviewed-by: Samuli Piippo <samuli.piippo@theqtcompany.com>
| | * Add option to disable "session management by closing windows".Andreas Hartmetz2016-02-157-12/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That feature is a poor man's session management for applications that do not implement any specific session management features. It badly interferes with proper session management support, so applications must be able to disable it. This enables fixing applications with QGuiApplication::quitOnLastWindowClosed() true - the default - dying too early, before they are enumerated for the list of applications to restart on session restore, thus preventing them from being restored. See https://bugs.kde.org/show_bug.cgi?id=354724 [ChangeLog][QtGui] Qt asking to close windows on session exit as a fallback session management mechanism has been made optional. Disabling it fixes session management for applications that implement full session management. See QGuiApplication::isFallbackSessionManagementEnabled(). Task-number: QTBUG-49667 Change-Id: Ib22e58c9c64351dea8b7e2a74db91d26dd7ab7aa Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: David Faure <david.faure@kdab.com>
* | | QToolBarExtension: remove unused member 'orientation'Marc Mutz2016-03-181-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The orientation is implicitly stored by which icon is used. Found by Clang: qtoolbarextension_p.h:57:21: error: private field 'orientation' is not used [-Werror,-Wunused-private-field] Change-Id: I82f8b8009b48d41fd2beb95d6107e505f9d4e835 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | QWindows(XP)Style: fix build with Clang after includemocs runMarc Mutz2016-03-182-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clang doesn't like the unused member variable: qwindowsstyle_p.h:100:11: error: private field 'reserved' is not used [-Werror,-Wunused-private-field] Remove. It's private API. Triggered by Clang seeing all methods of the classes in one TU by the following includemocs commit. Change-Id: I84e92d63af573c090ef89c1d8ee19af30f90b171 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | QMacStyle: Ensure proper focus ring clippingGabriel de Dietrich2016-03-172-22/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By rendering the focus ring directly on the backing NSView, we would ignore the painter's clipping information. It would also require creating a custom CGContext and attached NSGraphicsContext every time. The first step is to render the focus ring on a pixmap and then use the painter to render that pixamp. This ensures the clipping is done properly. The second step is to cache said pixmap and render it as a nine-patch image. Change-Id: I1df1baf7dc490023319f025a16306d4f04e5264c Task-number: QTBUG-50645 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* | | QTypeInfoQuery: Add public inheritance specifiersGabriel de Dietrich2016-03-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Their absence offends PySide's shiboken. Change-Id: I137d17e280276f7ffadba6d16b7c230a6880cf05 Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | | Make QWindowsPipeWriter thread-free.Joerg Bornemann2016-03-175-142/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Re-work QWindowsPipeWriter to not use a thread anymore but the WriteFileEx API, similar to QWindowsPipeReader. This saves us a lot of thread synchronization code and enables us to directly write data without yet another buffering layer. Also, this fixes the dreaded deadlocks in the QWindowsPipeWriter destructor that could occur when the reading end was closed before the write was finished. Task-number: QTBUG-23378 Task-number: QTBUG-38185 Change-Id: If0ae96dcd756f716ddf6fa38016080095bf3bd4e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | | Rework QWindowsPipeReaderJoerg Bornemann2016-03-172-67/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The use of QWinOverlappedIoNotifier in QWindowsPipeReader restricts us in the following ways: - The handle that gets assigned to QWinOverlappedIoNotifier is forever tied to an I/O completion port. - Other notification mechanisms like I/O completion routines of WriteFileEx do not work with such a handle. - No other QWinOverlappedIoNotifier can be registered for this handle. To achieve the ultimate goal of making QWindowsPipeWriter thread-free (to fix QTBUG-23378 and QTBUG-38185) we remove the usage of QWinOverlappedIoNotifier from QWindowsPipeReader and use the ReadFileEx API instead. This has the additional advantage of removing the need for any thread synchronization, as the I/O completion routine runs in the thread that ReadFileEx was called on, leading to simpler and faster code. Change-Id: I05c983e1f1e49d7dd27e3b77a47f87cae9c3f4c6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | | Android: Fix compilation with NDK r11BogDan Vatra2016-03-171-0/+5
|/ / | | | | | | | | | | Task-number: QTBUG-51859 Change-Id: Id8bbcc9f0503ab2742e8da7f3b5de03fd46714b2 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | Fix QAbstractItemView dragged item pixmaps to be HighDPI aware.Alexandru Croitor2016-03-171-1/+14
| | | | | | | | | | | | | | | | | | | | When an item is rendered into a QPixmap sent to the QDrag implementation, make sure it's size is scaled with the current window's devicePixelRatio, so it does not appear blurry on high-dpi screens. Change-Id: Idf38c0993e8529aff7107ff1ac412de9cf10f311 Task-number: QTBUG-46068 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* | Introduce separate mapping of QStandardPaths's CLSIDs for Windows CE.Friedemann Kleint2016-03-171-0/+22
| | | | | | | | | | | | | | | | | | | | CSIDL_APPDATA should be used instead of CSIDL_LOCAL_APPDATA on Windows CE. Amends 910f719bd111813f37278b67d07f9d12cb03a4ff . Task-number: QTBUG-50570 Change-Id: I0cc310ef5fe3fbaefae9c84dd9db8cf48ff48499 Reviewed-by: Tobias Koenig <tobias.koenig@kdab.com> Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
* | QCocoaMenu: Decouple NSMenuItem from NSMenuGabriel de Dietrich2016-03-166-121/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While Cocoa requires an NSMenu to be coupled to an NSMenuItem (just as Qt requires a QMenu to be coupled to a QAction), making that a hard coupling comes with some limitations. This is because Cocoa won't allow the NSMenu object to be simultaneously coupled to more than one NSMenuItem and, similarly, an NSMenuItem can only be added to a single parent NSMenu. Therefore, it becomes difficult to share one QMenu between two different QMenuBars in different windows, or to use a QMenu as context menu while being accessible from the menu bar. Previous solutions to circumvent those limitations were less than ideal (see 119882714f87ffeb6945fdb2d02997ae125ff50c for the QMenuBar shared QMenu issue). Other workarounds that relied on that hard coupling, like 996054f5e65bc676aaea0743c2eacec51918e4aa, also added gratuitous complexity. In this patch, we break that hard NSMenuItem-NSMenu coupling, and we replace it with a temporary, looser coupling. As a consequence, * QCocoaMenu only contains and manages a NSMenu instance, removing the previously used NSMenuItem. It gets a temporarily attached NSMenuItem instead. * QCocoaMenuItem gains a safe pointer to its QCocoaMenu property removing the necessity containingMenuItem() in QCocoaMenu. * QCocoaMenuBar manages its own NSMenuItems. With this setup, we bind the NSMenu to its parent NSMenuItem at the last moment. In QCocoaMenuBar, when we call updateMenuBarImmediately(). In QCocoaMenu, we use the delegate's -[QCocoaMenuDelegate menu: updateItem:atIndex:shouldCancel:] method which is called when Cocoa is about to display the NSMenu. Note: There's still one use case we don't support, which is sharing a toplevel QMenuBar menu. This is because Cocoa's menu bar requires each of its menu items to have a submenu assigned, and therefore we can't rely on that last moment assignment. Task-number: QTBUG-34160 Task-number: QTBUG-31342 Task-number: QTBUG-41587 Change-Id: I92bdb444c680789c78e43fe0b585dc6661770281 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* | Reimplement QShapedPixmapWindow using QRasterWindow.Friedemann Kleint2016-03-162-49/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | The current implementation makes the window too big when a QPixmap with a DPR != 1 is set. Circumvent the problem by using a QRasterWindow. Task-number: QTBUG-46068 Task-number: QTBUG-50938 Change-Id: I0fca91f571937250c740f1400bd60286330fb595 Reviewed-by: Błażej Szczygieł <spaz16@wp.pl> Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* | de-duplicate condition for default install targetOswald Buddenhagen2016-03-161-5/+2
| | | | | | | | | | | | | | | | | | we can rely on the super class to get it right. as a "side effect", we won't try to install .pdb files for aux projects anymore - the duplicated conditional was incomplete. Change-Id: I9b66f32ab50ed2a1d4e6e03a9d205686a4b4a981 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | support relative paths in configure -ROswald Buddenhagen2016-03-163-15/+24
| | | | | | | | | | | | | | | | | | [ChangeLog][configure][Unix] configure -R now supports paths relative to -libdir. Change-Id: Ie56264a6dedcbaf5577c7ef44b056c8a7870ef48 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | make -D/-I/-L/-l/-R not affect bootstrapped toolsOswald Buddenhagen2016-03-161-0/+4
| | | | | | | | | | | | | | | | | | it's likely that these will be wrong, and the bootstrapped tools usually don't need them anyway. should they turn out necessary after all, we need to add -H* variants of the flags. Change-Id: I15c54c5e25d20ebd474073a530f00254842f515d Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | delay application of configure -D/-I/-L/-l/-R flagsOswald Buddenhagen2016-03-163-4/+34
| | | | | | | | | | | | | | | | | | | | | | | | it is important that the flags coming from the current qt build appear first, as otherwise a pre-existing qt installation may interfere with the build. the windows configure does not have any of this magic to start with. Task-number: QTBUG-6351 Change-Id: Iacc1d9b5aa9eed9a5f0513baef9f6c6ffcef0735 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | don't force our runpath upon user projects anymoreOswald Buddenhagen2016-03-161-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | now that we rely on consistently sane runpath semantics everywhere (--enable-new-dtags on linux; the default elsewhere), there is no use in forcing our runpath downstream: our libraries will find their dependencies due to their embedded runpath. this does not affect qt.prf adding qt's own library path to the user projects' runpath. this effectively reverts 42a7eb8df6, and some more. Change-Id: If7af7be7b7a894bebb9b146ccb0035452223c7ac Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | build with explicitlib after allOswald Buddenhagen2016-03-161-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | unlike speculated in 2fe363514, this is not a workaround at all: it causes that libraries' public link interfaces (LIBS) are exported in the first place. unlike with staticlib, this does not export LIBS_PRIVATE, so it wouldn't even be a particularly effective workaround for rpath brokenness anyway. the problem was pretty well hidden by the qt module system, which at the level of libraries is pretty redundant with the .prl file handling, which shows just how stupid the whole "design" is. unlike before, we now enable explicitlib for all libraries, not just qt modules - we enable create_prl for all of them as well, after all. an immediate effect of this change is that it fixes linking on RaspPI: the qtcore headers make the user code require linking libatomic, so we must add it to our public link interface. Task-number: QTBUG-51621 Change-Id: I5742c88694db8e8a9b79d17222dc6df2b38e5ab2 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | winrt: enable cross-platform high DPI scalingJochen Seemann2016-03-162-0/+7
| | | | | | | | | | | | | | Task-number: QTBUG-46615 Change-Id: I7f75bc7da35b9330753130338a06feb49533061c Reviewed-by: Andrew Knight <andrew.knight@intopalo.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
* | Manual High DPI test: Create Dnd pixmap with device pixel ratio.Friedemann Kleint2016-03-161-1/+5
| | | | | | | | | | | | | | | | | | Apply the device pixel ratio from the widget unless Shift is pressed. Task-number: QTBUG-46068 Task-number: QTBUG-50938 Change-Id: Ib806b7e545fa228043566800d22d1002728732bf Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* | Update bundled libpng to version 1.6.20Eirik Aavitsland2016-03-1618-134/+146
| | | | | | | | | | | | | | | | Merged in the upstream version. The remaining diff to clean 1.6.20 is archived in the qtpatches.diff file. Change-Id: I56f557bfe04ac1aa0e2c090826bbb144ae93cbb7 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | Fix link to sched_setscheduler in QThread documentationMitch Curtis2016-03-161-2/+3
| | | | | | | | | | Change-Id: I38412a119d2a91685b3fd2e4a459d33a60b154b0 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* | Correct qt_defaultDpi X/Y with just a QCoreApplicationAllan Sandfeld Jensen2016-03-161-2/+2
| | | | | | | | | | | | | | | | | | Makes the 96DPI attribute check avoid undefined behavior by using QCoreApplication::instance() directly, instead of calling through qApp, which performs an invalid cast to QGuiApplication. Change-Id: Ib86e7d2461b462a2d623f1364414f7d4d2293f22 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | WinRT: Fix QTimeZone transitions by switching backendMaurice Kalinowski2016-03-164-6/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously WinRT was using the UTC backend which fails on all platforms for some QDateTime autotests related to timezone items. Hence switch to the Windows implementation for WinRT as well. However, the windows backend does query the registry heavily, which is not supported on WinRT. Instead use the API version provided by the SDK. Long-term we might want to switch to this version on desktop windows as well, as direct registry access would not be required and we could harmonize the codepaths for both platforms. Change-Id: I620b614e9994aa77b531e5c34c9be1da7e272a30 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* | winrt: process all triggered timers in processEventsOliver Wolff2016-03-161-5/+5
| | | | | | | | | | | | | | | | | | | | | | If only one timer is processed in there it is possible that a reoccuring timer which has a very low timeout blocks all the other timers from being triggered. This high frequency timer might be the only one to be triggered in every processEvents call. Task-number: QTBUG-51888 Change-Id: I8a0026d1e8519171ab60d1b47c494a15d30328b3 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
* | Manual High DPI test: Add test for window masks.Friedemann Kleint2016-03-161-1/+22
| | | | | | | | | | | | | | | | Add a toggle for setting a triangular mask on the main window. Task-number: QTBUG-50938 Change-Id: Id4a3ee0b80e170f4ee1d195e60ce7bfa8e524359 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* | tst_QXmlStream::writerHangs(): Create file in temporary directoryMaurice Kalinowski2016-03-161-1/+2
| | | | | | | | | | | | | | A test should not write to its directory. Change-Id: I34dfc36387cf5a637b325be29c8a19ff51d9b9c3 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* | QTextStream test: Change current directoryMaurice Kalinowski2016-03-162-0/+20
| | | | | | | | | | | | | | | | For platforms with builtin testdata/sandboxed platforms we need to change the current directory to be able to create files. Change-Id: I440205c95dd6df1308c6bf24b1b0f67fd697feab Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* | tst_qtabbar sizeHints fixMilla Pohjanheimo2016-03-161-16/+10
| | | | | | | | | | | | | | | | | | | | tst_qtabbar uses fixed values to check the minimumSizeHint and it fails with screens that have a higher resolution. The test still uses the default values, but now in the beginning it creates enough tabs so that it goes over the default. Change-Id: I3f891d2661288d7fad50ad522d73f634b3e91958 Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
* | Remove handle duplication code from QWindowsPipeWriterJoerg Bornemann2016-03-151-4/+1
| | | | | | | | | | | | | | There is no apparent reason why the handle should be duplicated. Change-Id: I8ff2cde2f050934ed0dd9ab2d39a1b1efa327a17 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | xcb: Initialize all xcb_client_message_event_t members before useShawn Rutledge2016-03-154-1/+13
| | | | | | | | | | Change-Id: I01e4b69b138fd19fc7e67751d93adebc1326b2f9 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* | QRect: fix UB (int overflow) in center()Marc Mutz2016-03-152-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QRect::center() should be defined for any QRect(x1,y1,x2,x2), INT_MIN <= x1, x2, y1, y2 <= INT_MAX because the average of two signed integers is always representable as a signed integer. But not when it's calculated as (x1+x2)/2, since that expression overflows when x1 > INT_MAX - x2. Instead of playing games with Hacker's Delight-style expressions, or use Google's patented algorithm, which requires two divisions, take advantage of the fact that int is not intmax_t and perform the calculation in the qint64 domain. The cast back to int is always well- defined since, as mentioned, the result is always representable in an int. Fix a test-case that expected a nonsensical result due to overflow. [ChangeLog][QtCore][QRect] Fixed integer overflow in center(). This fixes the result for some corner-cases like a 1x1 rectangle at (INT_MIN, INT_MIN), for which the previous implementation could return anything (due to invoking undefined behavior), but commonly returned (0, 0). Change-Id: I1a885ca6dff770327dd31655c3eb473fcfeb8878 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Compile with -no-openglMorten Johan Sørvig2016-03-151-0/+4
| | | | | | | | | | | | | | | | | | | | QCocoaBackingstore::toImage() can only be Q_DECL_OVERRIDE if QPlatformBackingStore::toImage() is present, which it isn’t for NO_OPENGL builds. Change-Id: Ib116f40fd26defb29a8d520d3e3fb104d8da8d57 Task-number: QTBUG-51694 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* | tst_QRect: drop a test that depends on int overflowMarc Mutz2016-03-151-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The compiler can statically check that this is undefined behavior: tst_qrect.cpp:3173:52: warning: integer overflow in expression [-Woverflow] << QRect(QPoint(0,0), QPoint(INT_MAX+(0-INT_MIN),INT_MAX+(0-INT_MIN))); ~^~ tst_qrect.cpp:3173:72: warning: integer overflow in expression [-Woverflow] << QRect(QPoint(0,0), QPoint(INT_MAX+(0-INT_MIN),INT_MAX+(0-INT_MIN))); ~^~ Fix by skipping the test (like most of the others are in the block). Change-Id: I359a5e16db6c660c9f11d7dd8fbb40730bd63887 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Revert "Handle the QWidgetPrivate::mapper structure"Marc Mutz2016-03-151-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 90de48493be283b9afb249f6a0fd8dbd8958517d. The call isn't necessary, but invokes undefined behavior. It invokes undefined behavior because deleteTLSysExtra() is called from deleteExtra(), which is called from ~QWidgetPrivate(), which is called from ~QObject(). Thus, by the time we call q->windowType() within setWinId(), q is no longer a QWidget, but only a QObject, and calling a QWidget member function then is UB. UBSan confirms: qwidget_p.h:300:5: runtime error: downcast of address 0x2afdd4053620 which does not point to an object of type 'QWidget' (the Q_Q macro) 0x2afdd4053620: note: object is of type 'QObject' qwidget.cpp:1712:93: runtime error: member call on address 0x2afdd4053620 which does not point to an object of type 'QWidget' 0x2afdd4053620: note: object is of type 'QObject' It is also unnecessary: deleteTLSysExtra() is called from two places: QWidget::destroy() and deleteExtra(). deleteExtra() is only called from ~QWidgetPrivate() which is only called from ~QObject() called by ~QWidget(), which, however, already calls QWidget::destroy(). QWidget::destroy(), in turn, unconditionally (for non-desktop widgets, at least) calls setWinId(0) itself. So fix the UB by removing the call without replacement. Conflicts: src/gui/kernel/qwidget_qpa.cpp Change-Id: Ib3a8cc9d28a096183f1d3dfd1941ea5fdc6a4aac Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>