summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * QCocoaMenus: Use mix-in pattern to implement menu hierarchyGabriel de Dietrich2016-03-225-18/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To solve menu item roles from their text, we need to find its depth in the menubar hierarchy. Unfortunately, there's no trivial way to access that hierarchy from the QPA side, so we need to come with an ad-hoc solution. Previously, we were using a dynamic proprety to keep track of the 'parent' object. However, as the life span of the different objects has changed since 09acf326dbc6b7b67f21a36, we need a way to keep track of the parent's existence. This is what we do in this patch by having both QCocoaMenu and QCocoaMenuItem also inherit QCocoaMenuObject. This class' sole role is to store the menu hierarchy's parent object and wrap it in a QPointer. Change-Id: Ia18d95171af76d26f6325eef04c77b40d99c4285 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com> Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
| * Docs of qSetMessagePattern missing relation to qCDebug and co.M. Moellney2016-03-211-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | The documentation of qSetMessagePattern was missing links to qInfo() and the category logging siblings: qCDebug, qCInfo, qCWarning, and qCCritical. This patch adds the links and adds a link to QLoggingCatergory class. Task-number: QTBUG-51943 Change-Id: I85c1a205bfcd555cb0516f8cbdd157d8f20185b4 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
| * fix bad initializer for -optimized-toolsOswald Buddenhagen2016-03-211-1/+1
| | | | | | | | | | | | Task-number: QTBUG-51967 Change-Id: I5b4a3f0ff6358149bc338c6ac2e0b57638bdff7f Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
| * Android: Fix inputItemRectangle when using EnableHighDpiScalingBogDan Vatra2016-03-211-4/+9
| | | | | | | | | | | | | | | | | | | | | | When EnableHighDpiScaling is enabled, qGuiApp->inputMethod()- >inputItemRectangle() returns the position divided by pixel density, therefore all the controls positions must by multiplied by pixel density to translate them into screen coordinates. Task-number: QTBUG-52001 Change-Id: Iea92a912cfbab03a9497fc8cddc24bebd0db2192 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
| * wince: Adjust configure defaultsAndreas Holzammer2016-03-211-9/+0
| | | | | | | | | | | | | | | | | | Remove outdated configure defaults to support features that get autodetected. Change-Id: Ia802ccd3fe9defa97e2667e81dff6e815a7b45b3 Reviewed-by: Kevin Funk <kevin.funk@kdab.com> Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
| * QNX has no libdl, but all the functions are in libcBogDan Vatra2016-03-211-1/+1
| | | | | | | | | | | | | | Change-Id: I3f4b32eb8bbc0a35e817399516daa02de358575d Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
| * Add auto-test for crash in QCocoaBackingStoreGabriel de Dietrich2016-03-211-0/+45
| | | | | | | | | | | | | | | | | | This issue has been solved some time between 5.6 and 5.6.0. We just make sure to protect against further regressions. Change-Id: Ic3fdad901ed5f36792ae04b3d65047da95eea668 Task-number: QTBUG-50561 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
| * Remove unused QButtonGroupPrivate::notifyChecked()Marc Mutz2016-03-201-1/+0
| | | | | | | | | | | | | | It wasn't even implemented. Change-Id: I7d4b97b176c90beeffc780c31848ec5b234ba509 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QApplication: remove unused static qt_tabletChokeMouseShawn Rutledge2016-03-221-3/+0
| | | | | | | | | | | | | | It was only set, never tested, not exported, and the name is awful. Change-Id: Ie6a783341984a11139b1481e94af09cb7d1bb9b8 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Mir: Call QPlatformIntegration::destroyScreen() as recommended.Christian Strømme2016-03-222-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | The QPA plugin was deleting the screen object manually, which is not needed or the recommended approach. The screen(s) are already maintained by QGuiApplication and destroying the screen object(s) should be done by calling QPlatformIntegration::destroyScreen(). This change removes the need to keep a reference to the screen(s) in the mir platform integration class, and removes the warning printed on exit. Change-Id: I61f37c25ebabf3e96e4cea458c4af454d025926a Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* | Do not use forkfd for INTEGRITY.Rolland Dudemaine2016-03-221-6/+8
| | | | | | | | | | | | | | | | unix is defined for the integrity target. Remove the general |integrity and only special-case forkfd. Change-Id: I8752e62659c28261b2309013fad6e8a82b9397d1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Do not use timezone at all for Q_OS_INTEGRITY.Rolland Dudemaine2016-03-221-0/+2
| | | | | | | | | | Change-Id: I3674b86b65a6ec47c89cc4f49e00361e9b87a7c3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add support for INTEGRITY with eglfs-viv.Rolland Dudemaine2016-03-222-0/+64
| | | | | | | | | | | | Change-Id: Ief53608d84d8c4a773b79cfe227c3ea425f677cf Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* | Add INTEGRITY Framebuffer-based plugin as a platform plugin.Rolland Dudemaine2016-03-2213-0/+942
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The plugin builds as a static plugin. It is based on the Linuxfb plugin. It uses the INTEGRITY FB API for framebuffer for display, and HID API for input (mouse, keyboard, touch). Because this is the only supported plugin and requires to be included as a static plugin, automatically add the platform to any application through qmake.conf. Change-Id: Ic228afb59cb39dd02c2d538de46caf6e6ea7d153 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* | mkspec: Correctly cleanup qhost.pri file.David Schulz2016-03-221-1/+3
| | | | | | | | | | Change-Id: Ieb430f5ae681713006987de9f915709e843cebca Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Allow the user to choose how much from Android theme is extractedBogDan Vatra2016-03-224-7/+34
| | | | | | | | | | | | | | | | | | | | | | | | This way Quick Controls 2 users will have a much faster start up and the extraction time is reduced x10. [ChangeLog][Android] Allow the user to choose how much from Android theme is extracted. Change-Id: I063086251880d50d7fdd72ee35536c4094b47f74 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | Add createMenu() method to QPlatformMenuBarDmitry Shachnev2016-03-217-31/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The D-Bus platform menus are only useful inside menu bars and system tray icons, and should not be created for other cases (like the context menus). This adds a new virtual createMenu() method to QPlatformMenuBar class, analogous to the already existing QPlatformSystemTrayIcon::createMenu() method, and adds support for it to QMenuBar. The D-Bus platform menus are now created from QDBusMenuBar class. As an additional benefit, we no longer have to check whether the AppMenu Registrar service is present for every created menu, and check it only once (this should speed things a bit up). Change-Id: Ic7d94e58a501ab9d2954aeb342ebd46ef8e62d49 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* | Fix build QtService.java: replace int with IntegerAnton Kudryavtsev2016-03-211-2/+2
| | | | | | | | | | | | | | | | ... and boolean with Boolean. Task-number: QTBUG-51897 Change-Id: I498ed0cce48e2566c6800344677111dee225d7d9 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* | Add support for building for INTEGRITY using GHS toolchain.Rolland Dudemaine2016-03-219-1/+278
| | | | | | | | | | | | | | | | | | Targets (xplatform) include integrity-armv7 and integrity-x86. [ChangeLog][Platform Specific Changes] Added support for INTEGRITY RTOS. Change-Id: If7827791e0a977ff198cb99e9dcc684a010bbb81 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Cocoa: Forward masked out mouse events.Morten Johan Sørvig2016-03-212-4/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Forward mouse events hitting the a masked out window area to the next responder by calling the superclass event handler. Implement "inverse mouse grabbing": Qt will not take dragged and up events if the mouseDown was in a masked out area. Change-Id: Ie86281245513cad515b77a468ac63f31ae41bfe0 Task-number: QTBUG-41839 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* | Cocoa: Forward rejected key events.Morten Johan Sørvig2016-03-212-6/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Forward rejected key events to the next responder by checking the return value from QWindowSystemInterface and calling the superclass event handler. This is useful when Qt is running as a plugin in a host application; the host can now react to key events even if Qt has focus. Qt will often not accept keyUp events, even if the corresponding keyDown was accepted, for example in the case of text controls. We don't want to forward 'bare' keyUps, so keep track of which keyDowns have been seen. Change-Id: I976448a5d305a657a0e91aeb271b158f8b598286 Task-number: QTBUG-45768 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* | Cocoa: Unify mouse handling logicMorten Johan Sørvig2016-03-212-66/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce the code duplication for the various button type handlers. Fan in: (example) rightMouseDown handleMouseDownEvent handleMouseEvent The primary mouseDown function is still separate with some duplicated logic. Remove the "invalid button tracking" warning. qWarnings are for application developers in case of improper use of API etc, not internal Qt errors. Change-Id: Idb1a311e37446399668c2a207831fccc84716ca1 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* | Cocoa: Move window logging to qt.qpa.cocoa.windowMorten Johan Sørvig2016-03-216-34/+48
| | | | | | | | | | | | | | | | | | | | | | | | Remove QT_COCOCA_ENABLE_WINDOW_DEBUG. Replace/Add logging for window state changes and drawing. The window identifier is now the QWindow (not the platform window) everywhere since this object provides more debug output. Change-Id: I4ae56626015241279ab1b44d2b81c9d462b532a0 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* | Merge "Merge remote-tracking branch 'origin/5.6' into 5.7" into refs/staging/5.7Liang Qi2016-03-21189-977/+2045
|\ \
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-21189-977/+2045
| |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/styles/qgtkstyle_p.cpp tests/auto/corelib/io/qtextstream/test/test.pro tests/auto/corelib/plugin/plugin.pro Change-Id: I512bc1b36acf3933ed2b96c00f476ee3819c1f4b
| | * 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
| | * | | 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>