Commit Graph

30438 Commits

Author SHA1 Message Date
Morten Johan Sørvig
9f2f3cb90b QPA style cleanup: no space after ampersand
QPointF & global ->  QPointF &global

Change-Id: I35e54ad190bb35662abde59e786a0327c83806b7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2016-12-02 11:28:06 +00:00
Morten Johan Sørvig
aa76c85b49 QPA: Consistent QWindow variable names
Use “window” everywhere instead of “w”.

Change-Id: I4d5d4348906528be0138a4116de38ffc544f3c7b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2016-12-02 11:28:01 +00:00
Morten Johan Sørvig
1c03984efc QPA: Consistent QWindow variable names
“tlw” suggests that the API accepts top-level QWindows
only, which is not the case. Use “window” instead.

Change-Id: I9f58c638c33b33c3333c52a3cf291f311d799fe2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2016-12-02 11:27:55 +00:00
Allan Sandfeld Jensen
d133bbf02a Optimized LCD text blending
Make a QRGba64 helper function for LCD blending following our standard
form.

Change-Id: Ib29cf8e780a042ed46554c55c67a698a0e3eddcd
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
2016-12-01 19:22:11 +00:00
Allan Sandfeld Jensen
5d35eea3e1 Optimize RGBA64 toArgb32
Adds NEON and SSE2 optimized toArgb32 functions.

Change-Id: Icfd280a353bfc2ac5d6983dc37aae5ed03e05ad5
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2016-12-01 15:05:04 +00:00
Gabriel de Dietrich
ce14439ecb QMenuBar tests: Ignore shortcut related test on Mac
Also remove references to WinCE in comments.

Change-Id: I175e0ba5f9597b09532c507497a51a55f9e0b5c0
Task-number: QTBUG-56853
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2016-11-30 22:05:59 +00:00
Friedemann Kleint
9ef93fa153 Windows QPA plugin: Use member initialization
Use C++ 11 member initialization in value-type structs.

Task-number: QTBUG-51673
Change-Id: I668389b4a0ad1d862a505b740d67357cb9c2a3dc
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2016-11-30 14:45:17 +00:00
Eric Lemanissier
39fc377bf1 MinGW: reuse gcc-base.conf and g++-base.conf
it allows using optimize_full, ltcg and sanitizers

Change-Id: I3ccf8257145c7d8800c2ebe98c5ac5adcec0dc9d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-11-29 16:23:58 +00:00
Friedemann Kleint
4499667799 QCommonStyle::sizeFromContents(): Increase height of CT_ItemViewItem
Prevent icons from overlapping by adding a small margin (as does
QWindowsVistaStyle) should the total height equal the icon size.

Task-number: QTBUG-52353
Change-Id: Iad0b7374a22129ee92ff3cc4479118c10db377aa
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-11-29 16:20:24 +00:00
Samuel Gaist
58e1465cb0 Add configurable connect timeout for QAbstractSocket
The aim of this patch is to allow the configuration of the connect
timeout used by QAbstractSocket that is currently hardcoded to 30
seconds.
Using QNetworkConfiguration for this allows to adapt the timeout per
network configuration (e.g. 2G vs wired lan)

[ChangeLog][QtNetwork] The connect timeout from QAbstractSocket
is now configurable through QNetworkConfiguration.

Change-Id: I1dc4051be2c74f925f7a9e0a9ccef332efc2e370
Reviewed-by: Lorn Potter <lorn.potter@canonical.com>
2016-11-29 14:01:47 +00:00
Friedemann Kleint
a0551ae610 qopenglprogrambinarycache_p.h: Add "We mean it" comment
Fix
QtGui: WARNING: qtbase/src/gui/opengl/qopenglprogrambinarycache_p.h does not have the "We mean it." warning

Amends change 85f868e73e.

Change-Id: Id2e8c3e7ac4fa732c0a3d99faab91f08121fba96
Task-number: QTBUG-55496
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2016-11-25 16:30:15 +00:00
Friedemann Kleint
e26c59e564 qnativesocketengine_win.cpp: Use QOperatingSystemVersion to detect OS
Fix warning:
socket\qnativesocketengine_win.cpp: In member function 'bool QNativeSocketEnginePrivate::createNewSocket(QAbstractSocket::SocketType, QAbstractSocket::NetworkLayerProtocol&)':
socket\qnativesocketengine_win.cpp:337:26: warning: 'WinVersion' is deprecated: Use QOperatingSystemVersion [-Wdeprecated-declarations]
     QSysInfo::WinVersion osver = QSysInfo::windowsVersion();
                          ^
In file included from ..\..\include/QtCore/qsysinfo.h:1:0,
                 from ..\..\include\QtCore/../../src/corelib/global/qglobal.h:1150,
                 from ..\..\include\QtCore/qglobal.h:1,
                 from ..\corelib\global\qt_pch.h:56:
     enum QT_DEPRECATED_X("Use QOperatingSystemVersion") WinVersion {

Change-Id: I9b060d886af3b627ac4b6eeb3321629734cc1e46
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2016-11-25 16:30:06 +00:00
Andy Nichols
26e2c6b74f eglfs: Add device integration for Qt Simulator for Embedded Linux
To support multiple displays in the emulator, it is necessary that an
additional EGLFS device integration be added to query information about
the available screens, and to help associate a window surface with a
screen.

Change-Id: I852c27bd66f5f32a92c4ff876838ac2f6fbde86a
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2016-11-25 16:26:13 +00:00
Laszlo Agocs
f0e60aefa4 Use QSaveFile for more robust shader disk cache
Task-number: QTBUG-55496
Change-Id: Ie9bd4390e7bb7bf22dbe597a6a01fecec7a6b404
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-11-25 16:25:57 +00:00
Friedemann Kleint
7cdc6c9942 qwindowsnativeinterface.cpp: Add missing enumeration OpenVGSurface
Fixes MinGW developer build:
qwindowsnativeinterface.cpp: In member function 'virtual void* QWindowsNativeInterface::nativeResourceForWindow(const QByteArray&, QWindow*)':
qwindowsnativeinterface.cpp💯12: error: enumeration value 'OpenVGSurface' not handled in switch [-Werror=switch]
     switch (window->surfaceType()) {            ^
cc1plus.exe: all warnings being treated as errors

Amends change dafd0955c6.

Change-Id: I43f7148281fcf47613958427e25a784f42920806
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2016-11-25 11:33:21 +00:00
Friedemann Kleint
fa4fb4ccf7 Platform support/Windows classes: Use member initialization
Use C++ 11 member initialization in value-type structs.

Task-number: QTBUG-51673
Change-Id: Ic45ab21c738ec7b7d526e30a1de2e19206da89ed
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-11-24 20:27:17 +00:00
Tor Arne Vestbø
5ea88ae239 Replace manual parent traversal in isWindowBlocked with use of isAncestorOf
Change-Id: I208d70a61e407069277339b3997c82921ab1b39b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-11-24 13:45:00 +00:00
Laszlo Agocs
1f81ba45ee linuxfb: add experimental support for DRM dumb buffers
Add a QFbScreen implementation that uses DRM dumb buffers and page
flipping, thus implementing a vsynced, double (triple) buffered plain
software platform plugin. Besides better supporting systems that by
now only do fbdev via (possibly buggy) emulation, this can also be an
enabler for implementing certain types of 2D accelerated compositors
e.g. for Wayland.

Enable with QT_QPA_FB_DRM=1. Right now there is no good way to
autodetect the support for dumb buffers early enough so the default is
always the traditional fbdev path.

Long-term this will also enable proper multi-display support like with
eglfs' DRM backends. Multiple QScreens are not yet reported currently
due to the single-screen limitations of fbconvenience.

The generic DRM code is shared with eglfs, meaning configuration
happens via the JSON file specified in QT_QPA_(EGLFS_)KMS_CONFIG. This
allows changing the screen resolution, disabling outputs, etc.

[ChangeLog][Platform Specific Changes][linuxfb] Added experimental
support for DRM dumb buffers. Enable by setting the environment
variable QT_QPA_FB_DRM to 1.

Task-number: QTBUG-56306
Change-Id: I4bdcf16fff67412183220dffa0c4ea235c5cad3d
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2016-11-24 12:08:21 +00:00
Shawn Rutledge
705e3f68df add TouchDoubleTapDistance platform theme hint
Double-tapping on a touchscreen typically requires a higher threshold
than double-clicking with a mouse, because it's harder to hit the
same point twice with your finger.  This is intended for use in
QtQuick's new TapHandler.

[ChangeLog][QtGui] environment variable QT_DBL_TAP_DIST customizes
the amount of movement allowed when detecting a double tap via touch.

Change-Id: I83a9be363f22c1086fd39580aa95055f2b3ff5c7
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2016-11-24 11:56:50 +00:00
Laszlo Agocs
85f868e73e Add an OpenGL program binary disk cache
Introduce a glProgramBinary-based disk cache in QOpenGLShaderProgram.

By switching the typical

program->addShaderFromSourceCode(QOpenGLShader::Vertex, ...)
program->addShaderFromSourceCode(QOpenGLShader::Fragment, ...)

invocations to

program->addCacheableShaderFromSourceCode(QOpenGLShader::Vertex, ...)
program->addCacheableShaderFromSourceCode(QOpenGLShader::Fragment, ...)

the compilation may be skipped via gl(Get)ProgramBinary and a disk
cache, when supported.  Such QOpenGLShaderProgram instances will have
no QOpenGLShader instances attached. Instead, the entire program
binary (which is driver-specific) is loaded as-is.

Support means OpenGL ES 3.0 or the presence of
GL_ARB_get_program_binary, in combination with >= 1 supported binary
formats. Note that some drivers claim program binary support but
expose no formats. This amounts to no support in practice.

When support is not present, calling the new functions is equivalent
to the non-cacheable variants. If the OpenGL driver changes (vendor,
renderer, version strings), recompilation and storage of the new,
potentially incompatible binary program will happen transparently.

The cache can always be disabled by setting
QT_DISABLE_SHADER_DISK_CACHE=1 or the new application attribute
Qt::AA_DisableShaderDiskCache.

Location-wise the primary choice is the shared cache
(GenericCacheLocation). If this is not available or is not writable,
the per-process one (CacheLocation) is used instead.

In addition to the new public APIs in QOpenGLShaderProgram, the main
shader users in QtGui are migrated as well. (OpenGL paint engine,
glyph cache, blitter, eglfs mouse cursor).  This means that any
application using QPainter on OpenGL or widgets with eglfs will
benefit from the improved startup times. Qt Quick will follow suit as
well.

[ChangeLog][QtGui][OpenGL] QOpenGLShaderProgram offers a built-in
program binary disk cache for systems with OpenGL ES 3.x or
GL_ARB_get_program_binary. This can lead to significant increases in
performance when it comes to application startup times for
example. Usage is opt-in for direct C++ users of the class, however
Qt's own main users of shaders, including Qt Quick and QPainter's
OpenGL engine, are migrated to use the new, cache-enabled APIs.
Opting out on application level is always possible via
Qt::AA_DisableShaderDiskCache.

Task-number: QTBUG-55496
Change-Id: I556f053d258bfa6887b1d5238c9f6396914c5421
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2016-11-24 10:27:16 +00:00
Allan Sandfeld Jensen
ffd316ebe3 Replace QDrawHelperGammaTables with QColorProfile
Turns the two set of tables in QDrawHelperGammaTables into two
QColorProfile classes that use similar structures and can be reused for
other gamma correction.

At the same time clean-up and improve the comma-correct blending code
to use the new profiles and QRgba64 precision.

Change-Id: I302bd87a5c836e1010fff6d633eeb56fd4ae2ff0
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-11-24 09:40:14 +00:00
Friedemann Kleint
38a446b69e qsslsocket_openssl_symbols.cpp: Fix signedness warning in DEFINEFUNC2
Fix warning:
qsslsocket_openssl_symbols.cpp157:78:warning: implicit conversion changes signedness: 'int' to 'unsigned long'
note: expanded from macro 'DEFINEFUNC2'

Amends change 2cf63c71eb

Change-Id: I694c5199d272d05f0070288af2e00b6fce42fc91
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2016-11-24 08:45:51 +00:00
Laszlo Agocs
5c38bd1d84 Add aliases for env vars common to eglfs and linuxfb
Now that the generic DRM code is shared between multiple platform
plugins, the QT_QPA_EGLFS prefix is not that ideal anymore. Introduce
aliases without EGLFS.

Task-number: QTBUG-56306
Change-Id: I0cf374f8c8d12aa0eab2f026ffa9201b3af35ce2
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2016-11-24 08:29:19 +00:00
Laszlo Agocs
c3bf358f69 Add a device spec for cross-compiling for the Qt Simulator
Change-Id: I6485beca158c0c81f5e33cf96d51bc88d323de2e
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2016-11-24 08:29:08 +00:00
Ulf Hermann
710414d4a2 Make sure we can compile QtCore without QT_CONFIG(translation)
Change-Id: I755834b77e50ff6f44bda561f007ec3306f3c1f9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-11-24 07:42:48 +00:00
Tor Arne Vestbø
a1c84af6f5 Refactor QGuiApplication::topLevelWindows()
Unifies the three conditions where we do not treat a window as a
top level window.

Uses QWindow::isTopLevel() instead of manually checking parent.

Updated the comment about embedded windows, which applies to all
embedded windows, not just QAxServers windows.

Change-Id: I7f9dbdf50044bf375ca21818ac29fbd3fe502166
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-11-23 22:40:58 +00:00
Tor Arne Vestbø
69d0eafa08 Move QWindowPrivate::globalPosition() definition out of header
Change-Id: Icaf68600a20d1845a5667a49306686948a20b42e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-11-23 22:40:55 +00:00
Tor Arne Vestbø
2a151bbe49 macOS: Remove unused method QCocoaWindow::parentCocoaWindow()
Last used in 2011, to determine QCocoaWindow::globalGeometry(),
which probably shouldn't have used transientParent in the first
place.

The parent is available through casting QPlatformWindow::parent().

Change-Id: I93fbcb41765944fbe0b79981ccf7d0062bb57719
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2016-11-23 22:40:52 +00:00
Friedemann Kleint
e8ecde99df Windows QPA: Use new EnableNonClientDpiScaling() for Windows decoration
Use newly introduced EnableNonClientDpiScaling() function to fix
the decoration having the wrong size in multimonitor setups with
per-monitor DPI awareness.

Task-number: QTBUG-53255
Change-Id: Ic6e2f2a92f790259107d2a0837b96177cf3adb5f
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-22 18:55:19 +00:00
Daniel Vrátil
babc7c5929 Introduce QWindow::setFlag and QWidget::setWindowFlag
Analogous to QWidget::setAttribute(), introduce an API to easily
enable/disable a single window flag without having to resort to
w.setFlags(w.flags() | Qt::NewFlag).

Change-Id: Ib0f7254a34c8d884cdec181c41b99e5ef035d954
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
2016-11-22 12:40:33 +00:00
Tor Arne Vestbø
a01f2112f4 macOS: Prevent stale references to NSScreen during screen removal
Task-number: QTBUG-57223
Change-Id: I7cdc075a4afee5ad8c23fd3c43a04f2a258b81f9
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2016-11-22 05:06:00 +00:00
Martin Smith
f062078e30 doc: clangqdoc must see SCTP classes
clangqdoc must parse the declarations for QSctpServer and
QSctpSocket, not just for Q_OS_WIN, so Q_CLANG_QDOC must be
tested as well.

Change-Id: I70f5a0542b654826d9d36fe68930752e68caf6b6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-11-19 18:56:24 +00:00
Martin Smith
693f913a99 doc: clangqdoc must see class QWinEventNotifier
clangqdoc must parse the declaration for QWinEventNotifier
for all platforms, not just for Q_OS_WIN, so Q_CLANG_QDOC
must be tested as well.

Plus the qdoc comment for an invisible static function is
converted to a non-qdoc comment in qvariant.cpp

Change-Id: Ic41731decca55b3be837f9c5f832310513773e60
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2016-11-19 18:55:47 +00:00
Edward Welbourne
982e17f52d QChar::Direction: more specific link to unicode standard
Giving the URL of unicode.org isn't much use; the standard is enormous
and the reader shall have trouble finding the specific table that
enumerates the direction types.  Found a more specific URL (that looks
like it should be stable) for this one link.

Change-Id: I8abcedf530baf692d7e0c7f146f3066df223951f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-11-18 15:40:42 +00:00
Friedemann Kleint
3035400f36 Windows QPA: Reimplement calculation of window frames
Instead of relying on AdjustWindowRectEx() and dirty-handling,
capture the rectangles before and after the processing of
WM_NCCALCSIZE and calculate the frame from that. This allows
for changing window frames by handling WM_NCCALCSIZE and
monitor-dependent window frames when using High DPI scaling.

Task-number: QTBUG-53255
Task-number: QTBUG-40578
Task-number: QTBUG-56591
Change-Id: If8364a5440a6324ea5d470bf5b74e68942285abe
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-11-18 14:04:08 +00:00
Liang Qi
3a0764d625 Merge "Merge remote-tracking branch 'origin/5.8' into dev" into refs/staging/dev 2016-11-18 08:01:52 +00:00
Andy Nichols
dafd0955c6 Enable support for OpenVG
This commit re-enables support for OpenVG in Qt, but not in the
same way as in Qt 4.8.  The first part is about adding a test
and using the new configure system to enable OpenVG.

There is still support code in Qt for setting up EGL to provide a
surface and context for rendering with the OpenVG API, this commit
enables a path to do so.

Normally to get access to an EGLContext from a QWindow you do so via
QOpenGLContext, but in setups without OpenGL but with EGL and OpenVG
this doesn't make sense (there would be no QOpenGLContext). So the
intended way is to use a QWindow to get an EGLSurface, then create
an EGLContext directly (without going through QPA).

Change-Id: I0f75aadbaa3cd006deb7e6fd12cfbb574870fba4
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2016-11-17 15:00:00 +00:00
Andy Nichols
1b905b3fa4 Enable building EGLFS and MinimalEGL with QT_NO_OPENGL
It is possible to have support for EGL without having support for OpenGL
for example with OpenVG. Unfortanately many features of EGLFS require
OpenGL (Cursor, MultiWindow, QEGLPlatformContext, QBackingStore), so the
plugins become pretty useless on their own.  This is necessary if you
still want to use Qt as a method to provide an EGL surface to render to
via QWindow.  This is the method by which Qt Quick uses OpenVG to render
its content when available.

Change-Id: I34973b21bf1932865950ce6a78b71b3a29360d65
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2016-11-17 14:59:47 +00:00
Liang Qi
e5ac4afbf9 Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
	mkspecs/features/mac/default_post.prf
	mkspecs/features/uikit/default_post.prf

Change-Id: I2a6f783451f2ac9eb4c1a050f605435d2dacf218
2016-11-17 14:43:26 +01:00
Tor Arne Vestbø
e3ed95dd44 QPA: Move (post|process)WindowSystemEvent into their templated counterparts
No need for the templates to just forward. Reduces the call stack during
event delivery.

Change-Id: I93f7eb5fa331cc7e86e5bdb5985bcad1eb8b2a4a
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-17 10:39:45 +00:00
Tor Arne Vestbø
2ca84c12e1 QPA: Group functions in qwindowsysteminterface.cpp by area of responsibility
No change to implementation.

Change-Id: I2a3e02ea52012f8424ef05b7b6e84897182d133e
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-11-17 10:39:35 +00:00
Lars Knoll
03c1a6ac71 Remove last traces of opengl es 1 support
Change-Id: I3f86d4892ec3235003d34fdcf3f093f1513c821f
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2016-11-16 22:00:46 +00:00
Friedemann Kleint
33573bf7ea Manual Dialog test: Fix compilation against Qt 4
Change-Id: I79a90cd252e99fb94c0429a3f03eb1ddacab1786
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-11-16 19:26:12 +00:00
Robin Burchell
094b64fb60 QRawFont: Add a qHash overload
This will be used in QtQuick to avoid costly string manipulation (which in turn
involves memory allocations).

Change-Id: I51a67a4cd97cc576f399483c9c0c13da1e1c6e72
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2016-11-16 18:13:41 +00:00
Gabriel de Dietrich
e8a41ed866 QCocoaMenu: Force NSMenuValidation when syncing items
When a menu item's enabled state changes after
-[QCocoaMenuDelegate menuWillOpen:] is invoked, i.e.,
during or after QMenu::aboutToShow() is emitted, that
state change may not be taken into account. This is
because the automatic menu validation, upon which Qt
relies, is not made aware of any such change.

By calling -[NSMenu update] when syncing the QPA menu
item, we induce Cocoa to invoke -[QCocoaMenuDelegate
validateMenuItem:] and ensure that previously synced
items, whose state may have changed, will be properly
updated. This, however, has a small side effect, namely
that menu-holding items will also go through the automatic
menu enabling path and may appear disabled since, until
now, they were not properly configured. In order to solve
this, we set the action on those items as well, and make
sure that both of QCocoaMenuDelegate's relevant methods,
validateMenuItem: and itemFired:, properly process
menu-holding items.

Menurama manual test updated accordingly.

Change-Id: I62f955538b8be09b8494ea0ce87fca7910148d38
Task-number: QTBUG-56850
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2016-11-16 14:23:49 +00:00
Maurice Kalinowski
3e5e2cd3bd winrt: Do not shadow variable
Change-Id: I70fc9254bfdfe42bf0e8d379537eb60b21be8275
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-11-16 13:06:21 +00:00
Maurice Kalinowski
7912ac5d67 winrt: move to range based loop
Change-Id: I0694adcff9b591eecf1025074e8b1c478484bd74
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-11-16 13:06:16 +00:00
Maurice Kalinowski
3e3b22adeb winrt: Fix ill-constructed loop
That loop could never have worked properly.
Identified by analyze compile switch.

Change-Id: I5e987dc9f5c57d3ffbcf054b7b417b506c02e7e1
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-11-16 13:06:11 +00:00
Liang Qi
b39adf8945 Merge "Merge remote-tracking branch 'origin/5.7' into 5.8" into refs/staging/5.8 2016-11-16 13:54:01 +00:00
Oswald Buddenhagen
38e935701c make QMAKE_USE obey QMAKE_LIBDIR_*
this is complementary to configure's makeSpec library source type.

this should be sufficient to make QMAKE_USE += {egl,opengl,opengl_es2}
actually work, obsoleting the need for opengl.prf and egl.prf (and the
currently dysfunct openvg.prf).

Change-Id: I2f7595ac89afa087ea7f0f25060e8e47e6148be9
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-16 12:05:26 +00:00