Ensure that the second rcc pass is executed whenever the
object file changes.
Patch provided by Hongpeng Liu <lhpzwd@163.com>
Fixes: QTBUG-85186
Pick-to: 5.15
Change-Id: I6e52ec15048ab286efd85500ca535b2b8b01c270
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This removes the fully manual registration of comparison operators in
QMetaType and replaces it with an automatic registration through
Q_DECLARE_METATYPE().
[ChangeLog][QMetaType] The QMetaType::registerComparator() and
QMetaType::registerEqualsComparator() have been removed.
Q_DECLARE_METATYPE() now automatically registers any
operator==() and/or operator<() for a type visible where
it is used on that type, as part of declaring its meta-type.
Change-Id: I3df451b652b735c093533838bf32f3cc785439f8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This had already been in very few places, where we ran into issues with
this before. More generic constraints here will significantly reduce the
amount of error messages a user has to parse in case he tries to instantiate
an operator by accident (or with a lacking comparison operator for one of
it's template arguments).
Change-Id: I1521d19c55d99732d9742402bd534c390a8e4242
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Containers often define an operator==() or operator<() which is very useful
for generic code. But those operators can usually not be instantiated if
the template argument doesn't implement the operator.
This sometimes leads to the compiler trying all possible template expansions
and implicit conversions for the type, giving extremely long error
messages. The traits support can be used to safely constrain those
operators.
Being able to safely detect this will also allow us to fold the comparison
support that is currently a large cludge for user types directly into
QMetaType.
Change-Id: Ib84afb5348c3eb0be5161d6ba9d5fe237709c65f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Store a pointer to the TLS in the BingingEvaluationState. Like this,
we can save us one TLS lookup in the destructor. Shaves off a couple
of percent during binding evaluation.
Change-Id: Idc9dc5b0ea202aaeb68cdc063700b8e4968753dc
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Currently the configure arguments specified in qt5.git/coin are only
used when building qtbase itself. None of them are used when
configuring other repos like qtsvg.
While in principle passing all the configure arguments to other repos
is not a good thing, we need to do it to circumvent the lack of
support for specifying per-repo configure flags in Coin.
It's needed to disable detection / usage of certain strawberry perl
system libraries in qtimageformats on MinGW. Doing that prevents
crashes of the tst_qtiff test.
Supplements 4b4f0be08debcfde62caf4066222b348ce65dea1 from qt5.git.
Task-number: QTBUG-84886
Task-number: COIN-601
Change-Id: I59be8c62ebb10282db1b0a9da2d3e3e5595c925f
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Since MySQL 5.6 is currently the lowest version still supported on any
platform then we can safely assume this to be the lowest version that
we support now.
Fixes: QTBUG-683
Change-Id: I177bd87053e9aa6c302164ccb3a4aee444aa3701
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
If you pass "STORED false" the name is interpreted as function to be
invoked in order to access the property. This allows storage of a
property in a lazily allocated data type.
Change-Id: I4d3a9cac6985c6419ce687868cb74b91921595a6
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
In pre Qt 5.14, the assets folder used to have the file
"--Added-by-androiddeployqt--/debugger.command", that indicate debug
mode, however, in Qt 5.14+ the assets are compressed into one file, so
this current check is obsolete. Qt Creator uses extraappparams to pass
QML debugger args, without it the debugger won't start.
Pick-to: 5.15
Task-number: QTCREATORBUG-24155
Change-Id: Ib3037f4dc8c55af6932d598c6491a046efe13033
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Created a QByteArrayView in symmetry with QStringView.
Added the basic tests symmetrical to QStringView tests.
Moved the implementations of non-modifying methods of QByteArray to
namespace QtPrivate, to be reused inline from both QByteArray and
QByteArrayView. Changed QByteArray's counterparts of those methods to
take QByteArrayView as argument instead of QByteArray. Removed
QByteArray's operator QNoImplicitBoolCast(), because it was causing
ambiguity when calling those methods with QByteArray argument (it was
there to perevnt if(!ba)/if(ba) from compiling, but currently that would
be ambiguous and won't compile anyway).
[ChangeLog][QtCore][QByteArrayView] New class.
Task-number: QTBUG-84321
Change-Id: I05f92e654cf65c95f2bb31b9c9018746ac110426
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Created tst_QByteArrayApiSymmetry test for the common APIs of
QByteArray and QByteArrayView. Moved the tests for startsWith(),
endsWith(), indexOf(), lastIndexOf(), compare(), from tst_QByteArray
to tst_QByteArrayApiSymmetry and adapted them to check different
QByteArray/QByteArrayView combinations. Added tests for first(),
last(), sliced(), chopped(), chop(), truncate(), count(), contains()
(test inputs are taken from corresponding tst_QStringApiSymmetry
tests).
Task-number: QTBUG-84321
Change-Id: I4e712b1692e3c1271d51ddcda6c9eb8bb01e11d4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The reason for setting this variable was removed in commit 300bd7fff8.
Task-number: QTBUG-25078
Change-Id: Id06072c099481a258cb65b4603efe010e306b7b2
Reviewed-by: hjk <hjk@qt.io>
The modifier is passed to UCKeyTranslate, and we don't need to turn
e.g. Qt::ShiftModifier into both shiftKey and rightShiftKey. One is
enough to map the virtual key to a unicode character.
Change-Id: I33c46c016df03ecf17b5d87885d80a6d581767bc
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The semantics of the Cocoa API matches that of the Carbon API we are
replacing, in that it reflects the "state of devices combined with
synthesized events at the moment, independent of which events have
been delivered via the event stream.", which is the same semantics
as QGuiApplication::queryKeyboardModifiers() expects.
Change-Id: Ic00ccbb3e8ae571522245df30924952aa2cc71de
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Centralizes the logic for swapping the two modifiers. The debug logging
for modifier mapping has been removed as that level of granular logging
is overkill.
Change-Id: Ib4818c77f5b32ff20c9fe6df56528a120e5bd80e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
QDesktopWidget in particular doesn't use that code anymore.
Change-Id: I8eed752175c5478663b25872c7ffe78c814245d7
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This allows larger than 2G memory segments to be allocated.
Fixes: QTBUG-76995
Change-Id: I95309eeea511fadb28724c7592298c2fcc6f1d1a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The type was broken in that it pretends to be a value, but didn't
implement the necessary operators for save copy, move, or comparison.
Tabs are supposed to be managed by Tab instance, as the crazy
implementation of operator== demonstrated.
Refactor the code to use it as a pointer consistently, even though this
means additional allocations for each tab. This is however acceptable
since there are not millions of tabs, and there is only a single place
where tabs are removed from the list.
Also use ranged for where possible, and never access the tabList using
operator[] to avoid detaches.
Use a std::unique_ptr for the animation in the tab, which implicitly
protects against attempts to copy a Tab, and allows us to use the
compiler generated default destructor. Add Q_DISABLE_COPY_MOVE for good
measure, the compiler-generated move semantics would not work either
due to the back-pointer from animation to the tab.
Change-Id: I8e8c071472f8f1f401b0f4f1dde074d800842934
Fixes: QTBUG-85394
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Improves performance of binding evaluation by ~20% for
simple C++ bindings by simplifying and inlining the code
that clears the array of property observers.
Change-Id: I829ac1895f1673367d737944d950360015a5b435
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
As we require C++17 now. The configure-time test checking for
future/async is left in for the moment being.
Change-Id: Ifde39d420673f70a2277f5a645bfaad30935a381
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
As noted in discussion at https://dev.gnupg.org/T4982#135524, when
there is a mismatch between position-independence of the Qt library
and other compilations, the warning produced by Qt is confusing.
It should say explicitly that -fPIE should not be passed.
Change-Id: I66394f86230a6598ac383bfd7bb14ab8cbbf6245
Pick-to: 5.15
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
There doesn't seem to be any reason users will need to query tablet
devices by their IDs, because every event comes with a complete
instance already, and we have QInputDevice::devices() to list them all.
QPointingDevicePrivate::tabletDevice() can create a new instance if a
matching one is not found (and complains about that); it's intended
for use in QtGui, as a way to find the device if it was not part of the
QWSI event. Now it sets the parent of those auto-created instances
to QCoreApplication to avoid a memory leak.
On the other hand, queryTabletDevice() is intended for use in platform plugins
that need to check whether an instance exists; but they will take care
of creating new instances themselves, and thus have more control over the
parent and the details being stored. Now that the systemId can also be given,
the search is more likely to have a unique result, on window systems
that provide device IDs.
Rename id() to systemId() to clarify that it's a system-specific unique
device ID of some sort, not the same as the uniqueId that a stylus has.
However it seems that in practice, this will often be 0; so clarify that
if it's not unique, QInputDevicePrivate::fromId() and queryTabletDevice()
may not always find the right instance.
Clarify the function usage via comments.
Change-Id: I82bb8d1c26eeaf06f07c290828aa17ec4a31646b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This is required to remove the ; from the macro with Qt 6.
Task-number: QTBUG-82978
Change-Id: I3f0b6717956ca8fa486bed9817b89dfa19f5e0e1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Call QGuiApplication and QScreen APIs directly to get geometries, and
make use of QScreen::grabWindow grabbing the screen it's called on when
called with WId == 0.
This assumes that QGuiApplication::screen and QWidget::screen never
return nullptr, which is already assumed in other places.
In QSplashScreen, simplify the code to operate on the screen of the
QSplashScreen itself. Remove the case that handles a QDesktopWidget
parent - QSplashScreen doesn't have a constructor that takes a
QWidget* parent anymore.
In the QEffect implementation, we can rely on the widget pointer
not being nullptr (it's tested in the free functions client code
uses).
Includes a few drive-by changes to coding style and logic in
qtooltip.cpp, where the tip label placement now prefers the screen
of the widget the label is created for, and uses the position only
as a fallback.
What remains is the special handling of QDesktopWidget and the
Qt::Desktop type in QWidget and QApplication.
Change-Id: I30b67bab8ae82ddfcc7bbbec3c10f6e935b74f06
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
The functionality is now directly available in the QCocoaWindow platform
interface, instead of going through the indirection of the platform headers
and native interface.
Task-number: QTBUG-84220
Change-Id: Ifc48263c83806705b44364f7727d317847737ab4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
qtdeclarative as of 41864db3b61d9e81a9fe4906918d2cd3d6d32a0c always
retains the resources, so there's no manual facility for retaining
left. Remove the code.
Change-Id: If79b66683897b5f430844e13c0230e41a2cf061d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
If a file was part of a resource that has a non-empty base directory,
the script generated set_source_files_properties calls to the file
path without including the base dir, which means the command did
nothing.
The script should set the QT_SKIP_QUICKCOMPILER on the full file path
if a base dir is present, similar to how the alias handled.
Refactor the alias property writing code to write all properties
into the command that uses the full correct path.
Change-Id: Ic75d51ecf60eef3ada9bd6ca26882de3447896e9
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
As done in 939f5112a1 elsewhere, use %zd
and cast explicitly to size_t.
Change-Id: I2fc7607725829f80cc125568246503af341749f1
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>