Currently QOpenGLWidget and QQuickWidget do not support having native
child widgets inside the same top-level window. In some cases this is
inevitable, f.ex. multimedia may require native windows when used from
widget apps. winId() calls made for various (valid or invalid) reasons
are also problematic.
There are no blockers for supporting this setup, however. By storing
multiple texture lists (one for each subtree where the root is a
native widget), adding the missing markDirtyOnScreen calls, letting
each native widget access the correct texture list (i.e. the one
corresponding to its children) when they are (separately) flushed, and
fixing composeAndFlush() to take the update region and the (native
child) offset into account, it can all be made functional.
The change also fixes the issue of keeping GL-based compositing
enabled even after all render-to-texture widgets in the window become
hidden. Due to the changes of how such widgets are gathered,
composeAndFlush() is not invoked anymore when no such widgets are
discovered for a given native parent. This is great since having
compositing enabled infinitely is an issue for applications like Qt
Creator that implement certain views with QQuickWidgets but cannot
afford the cost of texture uploads in other places (e.g. for the text
editor) on slower machines.
The openglwidget manual test is greatly enhanced to test various
situations (MDI, scroll areas, tab widgets, QOpenGLWidget as native
child, QOpenGLWidget with non-tlw native parent, etc.)
Task-number: QTBUG-48130
Task-number: QTBUG-49172
Change-Id: Iad098359c8bcf749f01c050da0853415e1550eda
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
This used to work by accident but now with the recent build system changes
the problem became apparent. Not listing the X11 libs is wrong anyway.
Change-Id: I6f75dafa81510d6d6a7571a9fe156cc7b968c8dc
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
The ppm decoder used a fixed size buffer to discard comment lines,
which would fail for comments longer than 100 characters.
Task-number: QTBUG-49414
Change-Id: I92e910e025cf7584a6ff1c0e5b0e8a4ab281d479
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
The QXmlStreamAttribute move operations expect QXmlStreamStringRef
to have move special member functions, but in fact the non-trivial
QXmlStreamStringRef dtor prevented them from being generated by the
compiler. We can't remove the dtor, because it's exported :(
So provide all the move special member functions by hand, and since
their presence in turn prevents the copy special member functions
from being generated, provide those too.
Change-Id: I494aea24981cdb661abe33a96976a363cfe7ef1b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Requires adding member swap. Member-swap is also
necessary to fix the deleted move-assignment operator
of this class, on which QXmlStreamAttribute heavily
relies for its own move assignment operator.
That's why it's not proposed for dev, but 5.6.
Change-Id: Id7d0823d44fc6e55ada7c096ae95444f6bb50963
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Faster, and, thanks to the new reverse_iterators, just as convenient.
Change-Id: Ibc6c64051a8ede4a47428e9271ffbeaa921fc255
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: David Faure <david.faure@kdab.com>
Call begin/endResetModel() in QSqlQueryModel and all
derived classes.
Task-number: QTBUG-49404
Change-Id: I11492d6386efb4c945c246a6379aaa6ca4502a25
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
statically linked qt does not compile, as versionKeyLiteral() is unused,
causing clang to complain:
error: unused function 'versionKeyLiteral' [-Werror,-Wunused-function]
Change-Id: I6a233081e7c58fce75ece82616f937f29a23a81b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Since the iPhone 6(S) Plus devices have a PPI of 401, we change the
logic from storing the unscaled PPI to storing the scaled PPI, and
applying that to a scaled geometry when computing the physical size.
Task-number: QTBUG-49467
Change-Id: I1741ff075749a301d2434cd35f642fcc9ea4b581
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Otherwise, we have unexpected channel close initiated by reply
destructor.
Change-Id: I15ad076ff20546e78787e19155544a2e5f8047a1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
Low-level input handling uses the native coordinate
system and the (device independent) coordinates from
QScreen needs to be converted.
Change-Id: I501dc77f5e51be01a42e533cd0609e069b8d228b
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
QPlatformScreen works in native pixels and the
(device independent) coordinates from QWindow
needs to be converted.
Change-Id: I85ff45d66dc501e8c3c1c7a18f87448c92d79b9d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
It's a QPlatform* class and works in the native (platform)
coordinate system.
Change-Id: Ibf36bc68d84ecd668b35e0c22e1fa35cfc456a5d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Support use of Qt::AA_EnableHighDpiScaling and
QT_AUTO_SCREEN_SCALE_FACTOR.
This makes the high-dpi scaling system use the screen
configuration set with QT_QPA_EGLFS_PHYSICAL_WIDTH and
QT_QPA_EGLFS_PHYSICAL_HEIGHT.
Implement QEglFSScreen::pixelDensity() and make it return
the scale factor for the display. The scale factor is computed
as the ratio of the logical DPI to the base DPI.
Change-Id: I14ed5da058024128479cb5508e056c39bd2f7563
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
For some reason add_ConnectionReceived has to be
called on the Xaml thread now. Otherwise the callback
function won't be called and thus listening on a TCP
socket won't work at all.
Task-number: QTBUG-49121
Change-Id: I11ce2f72b0c1d3bb20e9579de5a2ce5150ca966a
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Reviewed-by: Samuel Nevala <samuel.nevala@intopalo.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
Calling QWinRTScreen::onOrientationChanged in the class constructor
can lead to situation where QWinRTScreen is expected to be fully
constructed. Moving the onOrientationChanged call to
QWinRTScreen::initialize ensures that QWinRTScreen is fully
constructed when it is called.
Task-Id: QTBUG-49470
Change-Id: I52748f33a9011dec3a172c1a74023cad15aae38a
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
This brings MSVC 2015 support to almost C++11 feature completion.
Constexpr support still has one annoying bug, for which the fix is
promised for Update 2.
Change-Id: I92c2ee6638625c61e3a16690563434e32d853368
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
The ffsll function is missing with that SDK, but Clang and GCC support
it as the builtin.
Change-Id: I9f4d900898814b569c1affff140e15fb59fb45d8
Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch>
Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
When that happens, we need to detach (in-place conversion won't work),
so we recurse back into the same function, but the template version that
does detaching.
Task-number: QTBUG-49181
Change-Id: Idba8c29717f34c70a58fffff1412fea3acc95f98
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
frameworks are currently broken anyway, and we don't create .pc files
for the private part of public modules, so creating them for entirely
private modules is just inconsistent.
Change-Id: I98da8def73d72ac69b9b246687dce6b1fd150f61
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
the projects which use full mode with the named modules have them.
Change-Id: I3b9383d1cc2b43411c25690a5e35e7e84a55aa23
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
the check whether a module depends on itself should be done by the code
which *builds* modules, not which *uses* them.
the check whether a plugin tries to use itself seems kinda pointless in
the first place, so just remove it.
Change-Id: I89b357dae7d7979d131b6824f197e7088047272f
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
that way other modules can use the headers without hacks.
this required making the base directory for paths in headers.pri
configurable in syncqt.
Change-Id: Id35cfe05bcf4c576d3f2d0d8d09590a5e23d21d3
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
there is nothing to link with it anyway.
Change-Id: I2e942d24bb39855b3682f3e8d85cb6abca75cb61
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
instead of building host tools always in debug mode, follow the overall
build type, and provide an option to override it.
this supersedes the pre-existing -optimized-qmake option.
however, that option never existed in the windows configure, and this
legacy continues as far as qmake is concerned (msvc builds of qmake are
always somewhat optimized, but not mingw builds).
Change-Id: I42e7ef1a481840699a8dffff13fec2626af19cc6
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
This commit allows to avoid superfluous calls to the X server.
We don't request _NET_WORKAREA values when the screen geometry changes,
and we avoid RandR calls on each _NET_WORKAREA change.
Besides, update the available geometry of all screens with the
same root window, rather than only that one which corresponds
to Qt::Desktop window.
Change-Id: I5ec624717f5f261c986cd9aaf2425f22985e11c0
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
This makes the automatic center click feature of the mouse event methods
also work if the target window isn't positioned at 0,0.
Change-Id: I0d711e484620900ba2ffc4139f7e13346a7482d3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
The native position is given in device-independent pixels, so multiply
that by the window scale factor. If no cursor is present (e.g. on
Windows Phone), the native API returns SHRT_MIN as the coordinate values.
Catch that and pass Infinity instead in order to enable the cursorless
fall-back behavior in QQuickMenu::popup().
Change-Id: Ibe8ebcdbe257e8df25eea9873e8f4fa647ae1ab2
Task-Id: QTBUG-48265
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Extend the current BLACKLIST to cover all all Windows versions
and add watchFileAndItsDirectory:native backend-testfile.
Task-number: QTBUG-30943
Change-Id: Ic58c090f23d3584843bc1e74eba533d75c530ad3
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
That is the new name for gnome-icon-theme for more than 1.5 years. See [1]
for details.
Still keep “gnome” as the fallback icon theme, so this commit should not
break anything.
[1]: https://mail.gnome.org/archives/desktop-devel-list/2014-April/msg00086.html
Change-Id: Ifc2178827ad2cf6fdbc4e5248c83789ebc5b797e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Jens Bache-Wiig <jensbw@gmail.com>
QWinRTInputContext is created from the XAML Thread, which can cause
problems when handleVisibilityChange is invoked. Instead just query the
keyboardRect and skip the emit.
Task-number: QTBUG-49389
Change-Id: I158204a07b9e000adffdc308e68b0f1425ed7c62
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
QRect only deals with integers, and I had a window set on the corner and
without a size. When this screen was created, it was reported to be on the
wrong screen, thus created there wrong.
The reason for this is that ::center is not prepared for this use.
QRect(QPoint(500,500), QSize()).center() is QRect(499, 499)
Change-Id: I24e57182f84873306f180749e96368d6da1147a9
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Added that adding an item deletes an existing one
Task-number: QTBUG-42105
Change-Id: Ibcf08e6e2bf9c9239e7eca5aa48f2f30c8417fec
Reviewed-by: Martin Smith <martin.smith@digia.com>