This implies that using tools like windeployqt and macdeployqt will not
generate a working standalone application.
Change-Id: I002cf6e527e479ccbee2f18df8766648196d6232
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Previously extra mouse buttons apart from left, right and middle
buttons, were mapped incorrectly with an offset of -1. This resulted in
the first extra button being recognized as the middle button, the
second extra button as the first extra button, etc.
Fix consists in using a binary shift with proper offset to create
the corresponding Qt::MouseButton value.
[ChangeLog][macOS] Fixed extra mouse buttons to be mapped to
correct Qt::MouseButton values.
Change-Id: I9e6084586cd4737a172b7706a805211f0edff749
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Gcc defines neither _MIPS_ARCH_MIPS32 nor __mips32 on MIPS32
architectures, instead __mips is defined to 32.
This fix exposed bit-rot in qdrawhelper where qt_memfill32 was set as
a function pointer despite not being one since Qt4.
Change-Id: I87461823e54fa3166223ebf97175fd05d2f2fd16
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Update the addressbook tutorial to use the new QRegularExpression class
in place of the deprecated QRegExp.
Change-Id: Ibea9252ab8fe1d12e6fc862fa70229ca6efe0804
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
This is based on revision 360 of lp:qtubuntu.
Main features/bugs fixed:
- fix QQuickWidget-based app rendering
- wire up Qt window types to Mir to enable desktop-based applications
to function with a window manager
- use QEGLPlatformContext and QEGLPBuffer instead of custom code
- correctly populate and update list of QScreens
- support for switching keyboard layouts
- improve window resizing to fix visual glitching
Change-Id: If816a858eb10b6356275d4b80c89a72562b3c29f
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Matti Paaso <matti.paaso@qt.io>
The regression was introduced in d8857f21ac. The original change was
meant to fix support for SVG icons, but failed to take into account
a valid QIcon with no sizes, but which is also unable to create
a pixmap for the requested size.
Task-number: QTBUG-58344
Change-Id: I7ac1dbfaf6e3dab8581fe4b33c814e2517fcdba8
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
QString::fromRawData code sample still shows the use of QRegExp. This
patch updates it for QRegularExpression and cleans the code.
Change-Id: Iff0f736cdbdd7d35c65fde1496ce9f838a8f5c6d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Update the network-chat example to use the new QRegularExpression class
in place of the deprecated QRegExp.
Change-Id: Idcd3dc5b3e9b520b2eeef9565d50195cc8dffd06
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
The documentation of QStringList is missing some mention of
QRegularExpression as well as still using QRegExp in some sample code.
This patch fixes that.
Change-Id: I4a7c9fe8e5ae7c73497192bb71d1fa66ee864bd2
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Very large 1080p TVs or any display which is running at an abnormally
low resolution can have a DPI lower than 48, which means that
qRound(dpi/96) will result in a 0 pixel density, causing critical
issues for applications using Qt::AA_EnableHighDpiScaling.
Make sure that we always have a pixel density of at least 1 to allow
applications not having to worry about such displays.
Task-number: QTBUG-56140
Change-Id: I1dafbf7794a99ae6f872984c0337d8ff0d1fc1c0
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Also removes reference to Carbon and the old dual backend.
Change-Id: I01292caa7efcbe85526cd7602ec8ac678fd78eab
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
The license headers here were accidentally copied from Qt 5.6, since
the files were targeted for that branch originally. This updates them
to the proper LGPLv3 + GPLv2 + commercial.
Change-Id: I0623bdbf8fd4475405500b2687ef8dce2f1dbb6b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
When using foreign window integrations such as MFC/winmigrate,
it is possible that a child window is found which can cause issues
with modality. Loop up to top level.
Task-number: QTSOLBUG-71
Task-number: QTBUG-57159
Change-Id: Ib36e0f8f4f6b1e22ba1240013871facef2c0c1ab
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Rewrite tcpSocketNonBlockingTest() and downloadBigFile() to use lambdas for
the slots. This allows for removing the related member variables and slots
of the test class and ensures no leaks of sockets or inconsistent values.
Add an error handler printing the error message to the flaky downloadBigFile()
test.
Change-Id: Ieb64063c41e045a1a50a6d074bef01753ee319ef
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
There should be no blank lines in \value content, otherwise qdoc
ends the list and starts a new one.
Change-Id: Idddc7992317894487445aea36397136df40b9691
Reviewed-by: Martin Smith <martin.smith@qt.io>
Change 333f641622 modified
QGuiApplication::topLevelWindows() to no longer include embedded windows.
This causes the blocked handling in Active Qt to no longer be triggered.
Fix this by iterating over the list using the same condition as before,
avoiding the construction of a temporary list as a side effect.
Task-number: QTBUG-18099
Change-Id: I06a1a4e324fea9f543ceb5274bb064734f8d56af
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
waitForWrite can emit a signal outside QLocalSocket and pipeWriter
could be deleted there.
Change-Id: Ic35ec6455bd05402fd38fb3e1b219aa4534a0ff6
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This change allows painting via QPainter onto a QOpenGLWindow, QOpenGLWidget
or QOpenGLFramebufferObject when an core profile context is in use. This is
important on macOS in particular, where compatibility profiles are not
available, and so the only way to use modern OpenGL is via a core profile
context.
Added core profile compatible shaders with moder GLSL keywords.
The paint engine binds a VAO and two VBOs from now on, whenever VAOs are
supported. Note that this changes behavior also for OpenGL 2.x context that
have VAO support via extensions.
The Lancelot test suite gains support for core profile contexts. This can
be triggered via -coreglbuffer in place of -glbuffer when manually inspecting
via 'lance', while tst_lancelot will automatically run core context-based tests
whenever supported.
Task-number: QTBUG-33535
Change-Id: I6323a7ea2aaa9e111651ebbffd3e40259c8e7a9c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
QOpenGLContext pointer was dereferenced before checking if it valid.
Coverity-Id: 11370
Change-Id: I87d83a87d88ad7c055f3ed32096bfda036224ca9
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Without this, building a project with qmake -Wall will
always produce the following warning:
mkspecs/features/resources.prf:22: Unescaped backslashes are deprecated
Change-Id: I0aeedbf470958ab458651a263e3f804ea2d1a0f0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Non-static class member "domainIndex" was not initialized in the
constructor nor in any functions that it calls.
Change-Id: Ie72d997a1f0cf2f3499aac6f7714c7a9d3c7d525
Coverity-Id: 174997
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
INTEGRITY doesn't support self-extending stack. The default stack
size for a pthread on INTEGRITY is too small so we have to increase
the default size.
Change-Id: I0787d14938cf5e7e96c35df204212c8e83aa8893
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Nikola Velinov <nvelinov@ghs.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The following is safe:
QOpenGLVertexArrayObject *vao = ...
vao->create();
switch the current context
delete vao;
because the QOpenGLVAO dtor recognizes that the wrong context
is current, and will temporarily restore the VAO's associated
one in order to safely destroy the vao object.
However, the following has been problematic:
vao.create();
switch the current context
vao.destroy();
simply because all the logic was in the dtor and destroy()
blindly deleted the vao object in whatever context was current.
This can lead to releasing a completely unrelated vao object
that happens to have the same name in another context.
The expectation is for context-dependent wrappers is that a
ctor-create-dtor-ctor-create-dtor-... sequence is equivalent to
create-destroy-create-destroy-..., so move the safe cleanup logic
from the dtor to destroy().
Change-Id: Ie3bddbf4bfeb8629948c4783cc88422c9df03e65
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Use QTRY_COMPARE with a timeout to check for the stopped state
unless BAD_TIMER_RESOLUTION is defined.
This speeds up the test by 1s and prints diagnostic information
should an interval be too short (as seems to be the case on macOS,
currently).
Change-Id: I8f884cd66ad33314124d3130d9f49606e6dfe9f3
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
The regression was introduced during refactoring by 820e69d6c and the
initial change that added this logic is adc3ef97d.
This condition had become redundant and wrong after refactoring because
m_sendUpAsRightButton flag is set in the proper way in
QNSView::mouseDown() which later calls QNSView::handleMouseEvent()
anyway.
Task-number: QTBUG-58219
Change-Id: I1951cf4067af6f0c1837c1c15b8a09dfe7939493
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Pavol Markovic
QQuickWidget did not receive mouse release events after drag and drop
because the logic was so:
1) QWidgetWindow::handleMouseEvent() was called on press and
qt_button_down was set to the corresponding QQuickWidget;
2) After drag started, qt_button_down was set to 0 in
QApplicationPrivate::notifyDragStarted();
3) On mouse release QWidgetWindow::handleMouseEvent() was called again,
but because qt_button_down was 0
QApplicationPrivate::pickMouseReceiver() returned 0 and as a result
QWidgetWindow ignored the event and did not propagate it to QQuickWidget
for further processing.
The step 2 is a widgets-specific fix for QTBUG-26145 that does not work
for QQuickWidget (QtQuick has its own focus system).
Note that because Widgets and QtQuick do not share the sources, there is
no possibility to cast the pointer to check whether qt_button_down is
a QQuickWidget or some other QWidget-derived class object, so we have to
use QObject::inherits() method to check that.
Task-number: QTBUG-56713
Change-Id: I599b843e903c64329e6178752e0dc49f674bb890
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
don't ignore detected features for host tools when we're not actually
cross-building.
Change-Id: Id62a3c1c6b7ae422b14efb4fbea0892b05a047cc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: René J.V. Bertin <rjvbertin@gmail.com>
This was missed in dd9ec1564, leading to errors for example when building
with separate_debug_info.
Change-Id: Ibeb8020abe32690bcc691c1ca139508775c91db2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
prelink was not supported at all for ar.
postlink was done for most cases, but missing in one particular ar
invocation.
Task-number: QTBUG-57276
Change-Id: Ic72c42a9502c97d7111b3f3941b387024d46a27d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Renaming these specs should cause less trouble than usual since
most people are likely using the rasp-pi2 spec even for RPi3.
[ChangeLog][Platform Specific Changes][Linux] The Raspberry Pi 3
device specs have been renamed from linux-rpi3-* to linux-rasp-pi3-*
in order to follow the pattern of the RPi 1 and 2 specs.
Change-Id: I7d1ed6a4665078af9a4cbbe4c38b5fac760d03f9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
there isn't a point to determining the values separately if they are
actually the same things.
Change-Id: I74cd2bf39e96d559630709559602c234c38b0c47
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
note that in principle this leaves room for a race condition, as the
first project to determine the host config is not going to be the
top-level one.
in qtbase and qtdeclarative, this is naturally serialized via the common
bootstrapped libraries (bootstrap resp. qmldevtools). activeqt, qt3d,
qtscxml, and qtwayland all build only one bootstrapped tool each.
qtwebengine makes a fake host build to create files for gyp/gn; the
convert_dict tool is declared a host tool, but isn't actually built when
x-building anyway, and even if, it's serialized on the former. qttools
needs explicit serialization, though. no other host builds exist within
qt as of now.
Task-number: QTBUG-58126
Change-Id: I81a02a2d98f2bfe5d6aaa51119d5e7919549f119
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
in cross-builds, toolchain.prf was loaded before CROSS_COMPILE was set
up, leading to caching of possibly nonsensical values.
this change also necessitated that msvc-version.conf is loaded only when
toolchain.prf is, which is best done by loading the former from within
the latter. that seems quite appropriate in the first place.
Change-Id: I62577e827a75e335e03df016bd1aa1932643fd6c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
HTTP Strict Transport Security (HSTS) is a web security policy that
allows a web server to declare that user agents should only interact
with it using secure HTTPS connections. HSTS is described by RFC6797.
This patch introduces a new API in Network Access Manager to enable
this policy or disable it (default - STS is disabled).
We also implement QHstsCache which caches known HTTS hosts, does
host name lookup and domain name matching; QHstsHeaderParser to
parse HSTS headers with HSTS policies.
A new autotest added to test the caching, host name matching
and headers parsing.
[ChangeLog][QtNetwork] Added HTTP Strict Transport Security to QNAM
Task-number: QTPM-238
Change-Id: Iabb5920344bf204a0d3036284f0d60675c29315c
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
[ChangeLog][QtCore][QFileSelector] Removed the requirement for an unused
default base file in case you want to load only a variant.
When the base file (e.g. /image.jpg) was missing, no selectors were
considered and it was not possible to load variants of this file (e.g.
/+android/image.jpg, /+android/+tablet/image.jpg) without specifying the
directory as well.
As a work around, one previously had to place a default file in
the base location, which is undesirable in some cases because:
1. The extra file consumes unnecessary space.
2. It is impossible to encapsulate platform-specific implementation
details by hiding files in a subdirectory.
Task-number: QTBUG-51230
Change-Id: I4c7f9ec952bff6e5b7738d8cabe3c762c208a38e
Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
The Carbon port has been removed since 5.0, so there's
only one framework against which we can build Qt.
Change-Id: I38ce410f50cd4eda7abcc50ac4c4c7a23b3e1f45
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
instead of forcing an early load and discarding its contents again
before they could cause harm, trick qmake into not loading it at all.
Change-Id: I672ca9de362b1f23bf5cfea007053570c8534fc6
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
move the code before the linking of qt modules - dependency resolution
would re-order them anyway (or static linking would fail).
on the way, fix up the coding style and rename some variables.
the code to de-duplicate/normalize QTPLUGIN is pulled ahead, which means
that the automatic plugin importing wouldn't make a mess of it any more.
but this is mostly legacy anyway.
Change-Id: Id135470d027f5d84b7f30531425a65efa230f278
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
it has a dependency on zlib, which needs to be explicitly linked when
linking statically.
Task-number: QTBUG-56163
Change-Id: I4564844e8a35686db48c429b259e78558d312819
Reviewed-by: Tim Blechmann <tim@klingt.org>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
freetype has no dependency on gui, so it needs to pull in gui's
configuration manually, as that's where the system libpng is found.
Task-number: QTBUG-58038
Change-Id: I881495f7d2a8f7c1a45d7d4c9e7698ff1d30f2a9
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Joni Poikelin <joni.poikelin@qt.io>