Remove the qWait() and introduce a QTRY_COMPARE()
checking for the end value first.
Task-number: QTBUG-58402
Change-Id: I2d3758178de5f67881008f28c406076ad27c4a90
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
Avoid the "marked ‘override’, but does not override" compile error.
Change-Id: I4b125f1951614045781f3059fbc5cb65dd26775c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Include the file defining the feature before testing whether
the feature exists. Also use the new feature macro to make
sure this bug doesn't happen again.
Change-Id: I204836fee59b143a7ce7d256a7aed223c4d0ceb1
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Update the classwizard example to use the new QRegularExpression class
in place of the deprecated QRegExp.
Change-Id: I125664549e249c4156f8c664fac7648f1c41f9d5
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Update the licensewizard example to use the new QRegularExpression class
in place of the deprecated QRegExp.
Change-Id: Ib6e0ee9ec802e83540b1c37846b99378395fe0ec
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
The example has already been ported to QRegularExpression however part
of the documentation still referred to the QRegExp class. This patch
updates the documentation to match the new version of the code.
Change-Id: Id433d0b28deae0c4f702c0c54d2704174f8c7689
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
This patch replaces QRegExp by QString search and replace.
Change-Id: I11165afa45f8f9a856e6fb9b64929e4bdacb913d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Switch from ctx->shareGroup() to ctx. The original intention to use the
same cache instance for sharing GL contexts is reasonable, but can only
work when there are only shareable resources involved. The FBO used by
QOpenGLTextureGlyphCache is not one of these.
Text rendering in Qt Quick already uses the same approach and uses
per-context glyph caches.
Change-Id: Ie7e521769f28b4902ca714eb029acfbf52814309
Task-number: QTBUG-58276
Reviewed-by: Joni Poikelin <joni.poikelin@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
while compiling class template member function 'QVarLengthArray<T,Prealloc>::QVarLengthArray(std::initializer_list<T>)'
Change-Id: I36f5ef65ec1f511eac7f3ad1a4717d18f7dc9ce4
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
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>
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>
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>
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>
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>