Commit Graph

30415 Commits

Author SHA1 Message Date
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
Liang Qi
90c425642d Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
	mkspecs/common/linux-android.conf
	src/gui/opengl/qopengl.h
	src/network/socket/qnativesocketengine_winrt.cpp
	src/network/socket/qnativesocketengine_winrt_p.h
	src/plugins/platforms/cocoa/qcocoawindow.mm
	src/plugins/platforms/eglfs/api/qeglfsintegration.cpp
	src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp
	sync.profile

Change-Id: If70aaf2c49df91157b864cf0d7d9513546c9bec4
2016-11-16 12:35:36 +01:00
Kai Koehne
a6fbfea24a Doc: Mention qtmain library in Qt Core overview
The documentation for the qtmain license is right now pretty hidden.
The library is added by qmake independent of the Qt module that are
linked to, but it seems safe to assume people at least link against
Qt Core.

Change-Id: Id474990edde45feab6727bada2bc6a28946216cd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2016-11-16 11:32:10 +00:00
Jesus Fernandez
7e393280e4 OpenGLES20 direct function call removed
Usage of custom OpenGL functions is allowed in OpenGL ES 2. It allows
custom platform plugins to define their OpenGL functions.

Change-Id: I611b6987dc35deb4cf147684456f25b29f136560
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2016-11-16 11:28:13 +00:00
Laszlo Agocs
57685105d7 Add a device spec for the Renesas R-Car H2
Pretty useful when working on Qt itself or just having to deploy
a proper hand-crafted latest greatest to the Yocto-built image.

[ChangeLog][Platform Specific Changes] Added support for
cross-compilation targeting Renesas R-Car H2 (Lager) systems.

Change-Id: Ie359956046b0752a6053f85b81d32550b91ce453
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2016-11-16 10:44:19 +00:00
Laszlo Agocs
d92e984cb7 fb platforms: migrate to fbconvenience changes
Task-number: QTBUG-56306
Change-Id: Ia0f48e139ba2c1f8f2167afa145d808093cd3e83
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2016-11-16 10:44:13 +00:00
Laszlo Agocs
e6dd52f836 Clean up QFbCursor
Task-number: QTBUG-56306
Change-Id: If0cccbf20d4956c19622651864f42f854247b54b
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2016-11-16 10:44:07 +00:00
Laszlo Agocs
daf5d3cf13 Remove dead code from QFbWindow and Screen
The "rect cache" has been #if 0'd out for ever. Do not waste time on
maintaining a vector for nothing.

Change the screen image to be a normal member variable. There is no need
for extra heap allocations.

Task-number: QTBUG-56306
Change-Id: Ib88aa57896bf1a616b8cedbec7490f0a4bf0ba5f
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2016-11-16 10:44:03 +00:00
Laszlo Agocs
2e70a86900 Move DRM/KMS code from eglfs into kmsconvenience
The generic DRM code, not involving any GBM or EGLDevice stuff, can
now be reused in components outside eglfs, for example linuxfb in
order to get support for DRM dumb buffers.

Task-number: QTBUG-56306
Change-Id: If7dffdb2415489dbc6470782fa76efcaeccf01c7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2016-11-16 10:43:53 +00:00
Maurice Kalinowski
78e33de8e5 winrt: Check for sanity of variables in debug build
Identified as potential issues by analyze mode.

Change-Id: I3f7c63a2349f29cc3de7baa78157fec157b9e561
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-11-16 08:13:12 +00:00
Gabriel de Dietrich
27aeeac6ee Cocoa Dialog Helpers: Refactor OK-Cancel buttons view
Since virtually all the logic is shared between QNSColorPanelDelegate
and QNSFontPanelDelegate, we extract the added buttons and
layouting logic and move it into its own class. This requires
the two afore mentioned Objective C classes to satisfy the
QNSPanelDelegate protocol.

Change-Id: Ie26e758f5db71920896d930a4f3644b51a1ce3fa
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2016-11-16 05:19:44 +00:00
Oswald Buddenhagen
1a43199fce configure: turn qtConfOutputPostProcess_*() callbacks into replace functions
now the callbacks don't need to re-export the designated file contents,
which improves the abstraction and removes some boilerplate.

Change-Id: Ifa50313155fc96762025e2610b810ebb71daa373
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-15 22:44:41 +00:00
Oswald Buddenhagen
4d90bd55a5 re-arrange QLibraryInfo::rawLocation() for comprehensibility
swap the branches for (not) reading from qt.conf, and use a state
variable instead of an 'else' for mutual exclusion. this is somewhat
more self-documenting, and allows for a saner handling of the mkspec
fallbacks (which really should have been in a separate [QMake] section
along with Host* and Sysroot, but changing that now is way too much
hassle downstream).

Change-Id: I80a73294022fd1e8d84fe501b737c4fc7758662f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-15 22:44:36 +00:00
Oswald Buddenhagen
c16593fd0b build qmake.exe directly in bin/
so far, qmake.exe was built in qmake/ and then copied to bin/, with
possible errors in the second step ignored. this made no sense.

this unifies the nmake makefile with the unix one; compare 46e51ce1d.

Change-Id: Ieb9c7cd46f0be0501d17e297808ac1cdad1b3c4a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-15 22:44:31 +00:00
Oswald Buddenhagen
c05f0a83fd qmake: make discard_from() patch up QMAKE_INTERNAL_INCLUDED_FILES as well
when the file's effects are discarded, the mention of the file should be
as well.

Change-Id: I894b7e2b887dd34d18533b197bfa9d0d84d647e7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-15 22:44:27 +00:00
Oswald Buddenhagen
965e861e61 qmake: let discard_from() discard function definitions as well
for completeness.

Change-Id: I3ffc14e041408c773e277442828170e3df04ec8d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-15 22:44:23 +00:00
Oswald Buddenhagen
cff05b398c qmake: add "undecorated" mode to $$prompt()
the normal mode forces the prompt into a pattern which may be
undesirable.

Change-Id: I01689c7a6573415801862348b32bafc6a609ed4a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-15 22:44:18 +00:00
Oswald Buddenhagen
712a041eb8 qmake: don't look for qrc-based qt.conf
we know there is none.

Change-Id: I75bc39f8b900525e7db29664f7dd2117d2bd33d2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-15 22:44:14 +00:00
Oswald Buddenhagen
4e96c4c533 qmake: fix file name treatment in emission of extra targets
that is, adjust path separators and don't quote them. we already did
that to some degree, but totally inconsistently, so it just didn't work
for any targets with "fancy" file names.

note that we don't bother doing that for recursive targets, as these are
assumed to be identifiers.

Change-Id: Ic75f003b71abc6fed03a4121b903ad5ee8253ed2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-15 22:44:09 +00:00
Oswald Buddenhagen
71fd040318 qmake: fix /dev properties with -external-hostbindir
if the externally provided qmake had a different on-device install tree
layout, things would go wrong. of course, that's a rather unlikely case,
so nobody noticed ...

Change-Id: I59f9976a769ccb6099b7237ef42555f0549615aa
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-15 22:44:05 +00:00
Oswald Buddenhagen
2b6bcd5ff3 make use of $$QMAKE_QMAKE
there is no need to reconstruct it from scratch.

Change-Id: Ied6f88634f1875b4aa47a39af0d0d89a7ad4a654
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-15 22:44:00 +00:00
Oswald Buddenhagen
d442a9a4e6 ensure that QMAKE_QMAKE always ends in .exe on windows
Change-Id: I72d5eda83250a0c33af505005732c3f370a04c57
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-15 22:43:56 +00:00
Oswald Buddenhagen
b5464f4237 bump qmake version
there are plenty new functions, let's do this symbolic act.

Change-Id: Iaeb88afa5e33cacd81dc0ea26e380a16af06a739
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-11-15 22:43:51 +00:00
Oswald Buddenhagen
6cd358db7e mark up output of called commands in configure log
otherwise it's sometimes quite hard to tell it apart from configure's
own messages.

Change-Id: I2f4908344367a9a3ce38e032bf76486fc4552ffd
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-15 22:43:46 +00:00