PopupType::Default was meant as a way for a developer
to let Qt choose the best popup type, based on the
run-time (or build-time) environment.
But this could also be achieved by just setting the default value
of popupType already in the popup constructor (or when resetting
popupType) to either Item, Window, or Native, based on the same
information.
The difference is that the popupType cannot always be decided
before the popup is about to open. A menu, for example, can be
reparented at run-time into another menu, or into a native menubar.
And then the effective popup type needs to be the same as the parent.
But this will always be the case, even if the popupType is
explicitly set to something else than PopupType::Default.
So, at the end of the day, setting popupType to Window or Native
should be understood as a hint (or preference). And this might or might
not be respected, based on platform capabilities and the run-time state
of the application. And leaving it unspecified will give you
what is recommended on the platform by default, run-time considerations
aside. As a result, PopupType::Default can therefore be removed, since
it doesn't offer any extra logic on top of that.
Pick-to: 6.8
Change-Id: I174ba70b6553e7fb867d68aa4593eb6cc23aefd3
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
1) Implement & document that if an output file is not given, the tool
behaves as if the --view option was given.
2) If reading or parsing the input file fails, then avoid creating an
empty output file. Also, let the tool exit with an error code.
Pick-to: 6.8
Change-Id: Iaeb8cbb61c2c485cfa3ecba0d3193ba7cd4e5b87
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
When using the imperative registration API, one could first register all
types and then query the engine for their id via qmlTypeId. With the
declarative API, there is no such "safe point" (short of creating a QML
engine, and importing the module there).
We can't really avoid the creation of an engine (something has to import
the module before it becomes available), but we can hide it in the
implementation of qmlTypeId, so that the function "just works™".
This uses the same logic as QQmlComponent::loadFromModule behind the
scenes, but stops short of creating the object, as we only need the
QQmlType for its id.
Pick-to: 6.8 6.7 6.5
Fixes: QTBUG-118165
Change-Id: Iec456140c32c036ae91db62be5a598ffc8b34607
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
[ChangeLog][qmllint][Important Behavior Change] qmllint no longer exits
with an error code if there are warnings by default. Actual errors will
still cause the exit code to be set.
[ChangeLog][qmllint] qmllint now accepts a max-warning flag. When set,
it will set an error exit code if there are more warnings than
specified.
Pick-to: 6.8
Fixes: QTBUG-115856
Change-Id: I88810795a494ba249b0b39fd7f245229b1f0c959
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
We need Identifiers with a capital I (so that enum lookup works
properly). The identifiers file with the same content was most likely
just added by mistake; it is not used anywhere.
Fixes: QTBUG-126127
Change-Id: Ife5712bdb746e92b8206418eecaa614aa9410eab
Reviewed-by: Semih Yavuz <semih.yavuz@qt.io>
If an object is proxied, we can't use the optimized getters for the
lookup, as those would bypass the custom proxy logic.
Fix this by always using the fallback code path when encountering a
Proxy object.
Pick-to: 6.8 6.7 6.5
Fixes: QTBUG-112320
Change-Id: Idd8d4f2cd0134ada010448d470cfc68e765ef125
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
In contrast to a WeakMap/WeakSet, Map and Set also accept primitive
keys, from which we obviously won't be able to obtain a heapObject.
Pick-to: 6.8
Change-Id: I2ceeb54339ff3a3a14424c22b2f49d098cd635cd
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
The section drag handler used to drag column (and row) doesn't reset its
internal pointer state after dropping it. This stale internal pointer
state causes an issue for the next drag operation.
This patch resets the stale pointer state within the section drag
handler.
Fixes: QTBUG-126039
Pick-to: 6.8
Change-Id: I2b7dc1679caa3efe4a34334b99caa5a8966e2778
Reviewed-by: MohammadHossein Qanbari <mohammad.qanbari@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Either make them static or declare them in a header. We want them to be
static wherever possible, in order to reduce the number of visible
symbols. If they can't be static, however, they should at least be
declared in only one place.
Task-number: QTBUG-67692
Change-Id: I91fa641b46510ea8902b478d31dfd60d34b5f580
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Correct the right padding of the Material style Button when the display
is IconOnly and the left padding when the display is TextOnly.
The issue was due to the buttonLeftPadding() and buttonRightPadding()
functions not considering the display condition in the hasIcon and
hasText arguments. To fix this, the display condition is now included in
the arguments of these functions.
Additionally, comparing the leftPadding and rightPadding with the output
of buttonLeftPadding() and buttonRightPadding() has been added to the
test case.
Fixes: QTBUG-126124
Pick-to: 6.8 6.7 6.5
Change-Id: I2f1b60ebeae3d9854f96357bc5b0b5a77746aa17
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Popups are not QQuickItems so when updating the palette, we explicitly
called QQuickPopupPrivate::updateContentPalettes for all children of
type QQuickPopup of the application window.
However, this didn't always work for tooltips when they were created
via attached objects (QQuickToolTipAttached), which is a common way to
create them. When QQuickToolTipAttached created the tooltip instance,
the parent of it wouldn't be the parent item, but the QML engine. In
this case we wouldn't find the toolTip in the list of children of the
application window.
To fix, we explicitly search for children of type QQuickToolTipAttached
instead, whose parent is the parent item.
Pick-to: 6.8 6.7 6.5
Change-Id: I70425b731f998622c93421eed11067a36b39fd75
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
This commit corrects the code snippet provided for editing cells in
TableView.
Fixes: QTBUG-125157
Pick-to: 6.8 6.7 6.5
Change-Id: I639926d7a1b4316dad84f8fbff35e9088e19fa95
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Change Qml Embedding examples docs to reflect the new strong typing
changes in the qml_in_java_based_android_project.
Task-number: QTBUG-126050
Pick-to: 6.8
Change-Id: I855a0f5043d956b644602dc9feba0d568d464b14
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
QQuickTextEdit::setDocument() needs to do the same sort of init and
signal connections as initial construction. Some of that was in the
QQuickTextControl constructor; now, QQuickTextControl::setDocument()
gets called either way, to connect signals related to the new document
and its layout. Also ensure that text layout occurs, TextEdit is
re-rendered, and interactive editing continues to be possible.
Amends 4598939ee2
Fixes: QTBUG-126267
Task-number: QTBUG-35688
Pick-to: 6.7 6.8
Change-Id: I7714548fbc7d1fc2c9c28e2601a490e54302cc8b
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Changes the way QtQuickView is used in MainActivity.kt
Task-number: QTBUG-125099
Pick-to: 6.8
Change-Id: I9308fc08cd7ddbec8955baccf95fa0c05117e305
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
We don't need the type resolver for that. And since we always want the
"fancy" name, drop the extra argument.
Change-Id: I14278b5a297fc0e8101f03e5098a831a91deaf9e
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
We don't need the type resolver anymore to determine the contained type.
QQmlJSRegisterContent can do it by itself.
Change-Id: I395dc76cff751f6ac1afdfcd4ef7f80f05fcc36f
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Add a separate pass to populate the stored types and only run that after
we're done with all the type propagation and optimization.
Task-number: QTBUG-124670
Change-Id: I740063908b22684f5d2c72d6261fad98850d8636
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
We don't actually need the stored type until we hit the storage
generalizer. There are two cases where the stored type is the same as
the contained type: methods and import namespaces. Store the contained
type separately in those cases.
Task-number: QTBUG-124670
Change-Id: I395203ab204162b2754914438f56546e07453272
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
A primitive type can be a JavaScript number which we cannot store
directly. We define the generic type of the JavaScript number type to be
double.
Change-Id: Ib9083a8b1303a033bb8148ab4694adcf6e1047fa
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
QJniArray<jstring> has "[Ljava/lang/String;" as the signature type, and
is implicitly creatable from the Java String[] parameter we get from
JNI. We can then get the QStringList using QJniArray::toContainer().
This removes the last usage of Q_DECLARE_JNI_TYPE in this repo.
Pick-to: 6.8
Change-Id: I766e3eccc7fd7c9551f7c8303d99dbe44e6a8e06
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
To allow smooth working on the Java code from Android Studio.
Pick-to: 6.8
Change-Id: Ibf880ebffb7651e6e67fe07475efa902bf991e49
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
The tag is not expected to be mixed with text, but rather at
the end of the javadoc as a separate line.
Pick-to: 6.8
Change-Id: I452e8f86f12aeab86494295fc8fdf2e1d56ce50a
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
qtqml.qdocconf was referring to 'Qt QML' as the landing page, which
caused incorrect output for the navigation (breadcrumbs) and the
generated page <title>s.
Update the naming to Qt Qml/Qt Qml Core, and apply it to also C++
and QML module page titles.
Pick-to: 6.8 6.7
Fixes: QTBUG-126094
Change-Id: I822ddc080f37fae607296b2df0d14ca16ac0f8ab
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Fix a regression that 644ee4d234
introduced by moving focusReason to QQuickItemPrivate. The already
existing QQuickControl::focusReasonChanged signal was not being
emitted anymore when the focus would change. To fix, make
setLastFocusChangeReason virtual in QQuickItemPrivate so that the
subclasses can override and emit the relevant signals.
Fixes: QTBUG-125725
Pick-to: 6.7 6.8
Change-Id: I88d664ec4fa3cc9262ee2703d63e7e716cac68e9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
RhiItem::autoRenderTarget is not a property (the accessor functions are
protected), so link to the getter explicitly when referring to the
different behaviors that depend on it.
Pick-to: 6.8
Change-Id: I792399b4361993a3b2e7b6990c0c3de1cb3d311c
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
SVG fonts have some limited support in the Qt Svg QPainter
backend. This implements it in VectorImage by introducing
a font engine which serves the glyphs. (This solution could
be moved into Qt Svg at some point for a more complete
support, but the direct use of QRawFont is still limiting,
so it would require some more enablers in Qt Gui first.
It depends how much usage such a feature would get.)
Pick-to: 6.8
Fixes: QTBUG-122116
Change-Id: Ibc3de6e7c1536b3240e087c4b92f172156335b61
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Allow disabling the automatic newline functionality of the internal
stream() function, so that the code can add more to the same line.
This changes the functionality so that a newline is added immediately
by stream(), instead of when the returned temp object is destructed.
I.e. now calling stream() starts a new line, except if the SameLine
flag is passed.
This also allows simplification of the whole streaming code, with
fewer intermediate data copies and allocations.
Pick-to: 6.8
Change-Id: I567efd96bd2cb86e73212208d5e7f9328251afa3
Reviewed-by: Hatem ElKharashy <hatem.elkharashy@qt.io>
* One method for IDs only, since that seems to be common
* One method operating on QQmlJSRegisterContent all the way
* One method operating on QQmlJSScope::ConstPtr all the way
This way we can return a QQmlJSScope::ConstPtr where we are not
interested in register contents, and in a next step, link the register
contents together in case we are interested.
We need to store the function's QML scope as QQmlJSRegisterContent now.
Task-number: QTBUG-124670
Change-Id: I01699aaa5f645657d9faf23b12e270cf09679499
Reviewed-by: Alexei Cazacov <alexei.cazacov@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This is a leftover from when the type was used as a key to a hash.
Change-Id: If03218831580a58aaa58ce2647ca4995ca3129b2
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This allows qmltyperegistrar to see the types from Templates and avoid
duplicating them in Dialogs. The linkage was there anyway, but it was a
private linkage from QuickControls2Impl before.
This removes the last duplication of QPlatformDialogHelper as found in
the QML API review.
Pick-to: 6.8
Change-Id: Ia29355f934f0c54fe91b340104b3652a7e38a4e5
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
The optimization pass will not detect move opportunities when the Ret
instruction is in a different basic block than the instructions that
populate the register. That doesn't really matter, though. We can always
std::move on Ret.
Coverity-Id: 462593
Coverity-Id: 462595
Coverity-Id: 462598
Coverity-Id: 462608
Change-Id: I61cf015c43bd23f57674555845c8859d73a0a872
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
We may need to register deprecated enums. Those should not cause
warnings.
Amends commit 2f118a81f5
Pick-to: 6.8
Change-Id: Idff21cb5b187ee9e73d3002baa51b991aad20940
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Kaloyan Chehlarski <kaloyan.chehlarski@qt.io>
Things were moved around in the Qt namespace.
Pick-to: 6.8
Change-Id: I9771d3037636f7f5e96c49f637a162fba8d90846
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
The nativeGesturePinchOnFlickableWithParentTapHandler test function is
in tst_FlickableInterop.
Amends commit 87d61c4fe3.
Pick-to: 6.8 6.7
Task-number: QTBUG-118063
Change-Id: I16fa796af10061f580dbf355cd8eb928bf26d059
Reviewed-by: Liang Qi <liang.qi@qt.io>
Either make them static or declare them in a header. We want them to be
static wherever possible, in order to reduce the number of visible
symbols. If they can't be static, however, they should at least be
declared in only one place.
Task-number: QTBUG-67692
Change-Id: Ib61f08bda6a6fcfed9f7753da033a4c933405bc2
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Either make them static or declare them in a header. We want them to be
static wherever possible, in order to reduce the number of visible
symbols. If they can't be static, however, they should at least be
declared in only one place.
Task-number: QTBUG-67692
Change-Id: I1baa5620b350779c7fbd6fd03e9b795d42f58639
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
Either make them static or declare them in a header. We want them to be
static wherever possible, in order to reduce the number of visible
symbols. If they can't be static, however, they should at least be
declared in only one place.
Task-number: QTBUG-67692
Change-Id: Id754da0f3a63dc27984253a03be9b4acaf92f2b1
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
This might be faster and it might help the compiler figure out that the
array access is actually within the bounds of the array.
Pick-to: 6.8
Change-Id: Ib65c244844e36744b7f7bd7a98e97fba499ec17c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Either make them static or declare them in a header. We want them to be
static wherever possible, in order to reduce the number of visible
symbols. If they can't be static, however, they should at least be
declared in only one place.
Task-number: QTBUG-67692
Change-Id: I72c6ed00ce6e0d81ebb8e0dff93f410bd001342a
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>