qarraydataops.h(444): warning C4127: conditional expression is constant
qarraydataops.h(444): note: consider using 'if constexpr' statement instead
...
qabstractitemmodel.h(261): note: see reference to class template instantiation 'QList<int>' being compiled
qarraydataops.h(1209) : warning C4702: unreachable code
qarraydataops.h(1104): warning C4913: user defined binary operator ',' exists but no overload could convert all operands, default built-in binary operator ',' used
src/corelib/kernel/qobjectdefs_impl.h(96): note: could be 'void QtPrivate::operator ,<std::reverse_iterator<QTypedArrayData<T>::iterator>>(std::reverse_iterator<QTypedArrayData<T>::iterator>,const QtPrivate::ApplyReturnValue<void> &)'
with
[
T=QTextEdit::ExtraSelection
]
qarraydataops.h(1104): note: while trying to match the argument list '(std::reverse_iterator<QTypedArrayData<T>::iterator>, std::reverse_iterator<QTypedArrayData<T>::iterator>)'
with
[
T=QTextEdit::ExtraSelection
]
...
codeedit.cpp(84): note: see reference to class template instantiation 'QList<QTextEdit::ExtraSelection>' being compiled
Change-Id: I3c5007e40f709c28bc8b3b3bec5ea98ea5f34e5a
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Obsolete code that is unused/not referenced from
documentation - get rid of it.
Task-number: QTBUG-81486
Change-Id: I82ee65b6e827666f88fa8ecf6d87ae736c893cc3
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
The project file name is wrong, so the project won't become
part of the parent subdirs project. Rename the project file
to correct this.
Task-number: QTBUG-81486
Change-Id: I069004caa5e7bdeecc0550fafe78f8977fbf7a87
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Updated main QByteArray operations to support prepend-optimization path
There are still many things to consider especially algorithms that use
QByteArray::data() or do raw memory operations (e.g. memcpy) regardless
of the underlying memory layout, which was somewhat valid before but
will likely break now given free space > 0 at the beginning of the byte
array memory. Looked at existing cases in the scope of QByteArray, they
seem to be OK. Hopefully, CI would find missed violations if any
Task-number: QTBUG-84320
Change-Id: I7990cda165b8e77a397e41df4e145468e7a86be0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Added implicit space reservation for '\0' in allocation functions used by
containers. In current setting, this means sizeof(char16_t) bytes extra
memory is allocated each time and implicitly exists. The extra memory is
uninitialized by default
Task-number: QTBUG-84320
Change-Id: Ia3cc268183c00ea24ea9d326db3f392f71868d52
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The target devicePixelRatio can now be passed to the
pixmap() function, instead of a QWindow pointer.
This allows us to remove some usage of the QWidget pointer
in the styles, since the DPR is accessible from the passed
in painter. The QWidget pointer is still used in places where
we don't have a painter.
Task-number: QTBUG-85885
Change-Id: Ifecc669f5bad655e289a936d71bafe02605f21a4
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Add availableSizes() override function and move the
implementation out of virtual_hook().
Task-number: QTBUG-85885
Change-Id: Ida3575b25e9bca6167b5be97d6a8f0f624559602
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Add override functions and move the implementation
out of virtual_hook().
Task-number: QTBUG-85885
Change-Id: I35ed81a3483dd85d49474b78572d5302b0e5b608
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Port the high-dpi icon test to use the new pixmap()
API which takes the target devicePixelRatio as an argument.
This means we can run the fromTheme test at dpr = {1,2,3},
instead of at the current global devicePixelRatio only.
Task-number: QTBUG-85885
Change-Id: Iec7b21e04ed760e48964307d2048eaec1976ffe2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Used in only one place, declared in a private header with a comment
saying to remove it. All callers of the one function that had it as
default parameter value are passing a value for the parameter.
Task-number: QTBUG-85700
Change-Id: Ic72e4df730740a4023b0a43be6bf7acf33a3166b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
As requested in a ### Qt6 comment.
Task-number: QTBUG-85700
Change-Id: I28a02bf49f4a6455a21a6032179318ce2915b8ca
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
As requested by a ### Qt6 comment.
Task-number: QTBUG-85700
Change-Id: I7c2813c0d8fbc38bcd2f7229de3a9d8e1b8b1f03
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Correct one QString::lastIndexOf() whose return and parameter had been
changed, but body and comment hadn't.
Task-number: QTBUG-85700
Change-Id: Icbcd049f72346f0e696e6b22fe0893f6de5a2646
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
A ### comment said to use int in setRawData(), which took a uint; but
the underlying QArrayDataPointer::fromRawData() takes a qsizetype, so
propagate that all the way.
Change-Id: Iba1f8d020c509b33f5c202c22c6a9bf85b3bab7f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Also catch some stray ushort that should be char16_t by now, use
unicode character values for some constants and rename a UCS2 variable
to not claim it's UCS4.
Change-Id: I374b791947f5c965eaa22ad5b16060b475081c9d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
It's defective on Android, but no worse so than the fall-back we were
using; and we can't remember why we had that fall-back anyway.
Task-number: QTBUG-63518
Change-Id: I28e9b5c7cc64963c9e3941eb1bad85aced280a9b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Include what you use. In this case, the include needs to happen before
qpa/qplatformmenu.h, since that seems to pull in
src/gui/kernel/qwindowdefs.h, which confuses matters (somehow) with a
forward declaration.
Change-Id: Ic09ecb014563e8ebee86f338c7e98e470f82185b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Add Q_REQUIRED_RESULT to force callers to check the return; the
QTranslator object is unusable if load() fails.
Check the result in QTranslator's own test.
Task-number: QTBUG-85700
Change-Id: I07509c76470cc87626190670665cd3162bfb17e7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Make IntersectionType the enum and the obsolete IntersectType an
alias, with at least a comment to say it's deprecated.
Adjust the docs to match.
Task-number: QTBUG-85700
Change-Id: I0de9166b0d936f5b9a15fdd4f90cf7b01198e8d7
Reviewed-by: Konstantin Shegunov <kshegunov@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
A large slice of it has been deprecated since 5.2.
Reflowed a doc paragraph pointed out, in the deprecation commit, as
having been left ragged by its edits.
Note: qSwap() is documented as \deprecated but not marked, where it's
defined, as deprecated.
Change-Id: Iaff10ac0c4c38e5b85f10eca4eedeab861f09959
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Since 5.0 - WFlags
Since 5.6 - ItemIsTristate
Since 5.14 - WA_NoBackground, WA_MacNoClickThrough,
WA_MacBrushedMetal, WA_MacMetalStyle, WA_MSWindowsUseDirect3D
WA_MacFrameworkScaled, ImMicroFocus
Since 5.15 - MatchRegExp, MidButton (really since 5.7.0),
WA_ContentsPropagated (really since 4.5.1, as are the following),
WA_WState_DND, WA_ForceAcceptDrops.
Change-Id: Ib1db3d85bf28823c704b5f3857546764b158e1ed
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Deprecated in 5.15.1, removed in Qt 6. It is entirely redundant with
easingCurve, which has been there since 4.6.
Task-number: QTBUG-85520
Change-Id: Ib1daa322a17da390dd264ed8d48ac572138a5d84
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
With the ANDROID_GUI target property set on add_executable targets,
CMake will generate a lib<target>.so file, which is what Qt requires
from a target.
By setting CMAKE_RUNTIME_OUTPUT_DIRECTORY with the same value as
CMAKE_LIBRARY_OUTPUT_DIRECTORY the ANDROID_GUI case will work as
expected in Android multi-abi case.
Instead of the following CMake code:
if (ANDROID)
add_library(test-android SHARED
main.cpp
qml.qrc
)
else()
add_executable(test-android
main.cpp
qml.qrc
)
endif()
you can have:
set(CMAKE_ANDROID_GUI ON)
add_executable(test-android
main.cpp
qml.qrc
)
Change-Id: I3995d6ff731d0525ca86f7260fe61d9ecb7b01ac
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Since the load*Libraries functions might also be invoked when using an android service,
where no activity is present, we can't rely on the activity to get the metaData.
Pick-to: 5.15
Change-Id: I493c68591dbcfbe3063971cfd9ab384df71d03d7
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This was used for ANGLE, which was removed in 752497910b.
Change-Id: I29bad031b296fddc425145cd206a372baf650267
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This attribute is now on by default.
Change-Id: I7c9d2e3445d204d3450758673048d514bc9c850c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Relevant for Qt Quick 3D. As in many cases Quick3D will rely on runtime
generated shader code, the translated HLSL will be compiled via
D3DCompile() at run time. To make such shaders debuggable, the necessary
flag (D3DCOMPILE_DEBUG) should be requestable somehow.
Change-Id: I4d5c3b57bf58df8d46556eebb5cf6fb75e9d0afe
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
They currently cause an integer-overflow in variantHash().
Fixes: oss-fuzz-24702
Pick-to: 5.12 5.15
Change-Id: Ibee4413ca766c8ade9aeff2f2052b82cb9f7d213
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The original fix done in 4b2f5371d9
actually introduced another subtle issue which should in theory cause
additional overhead. Fixed the behavior to be in fact compatible to the
old one
Task-number: QTBUG-84320
Change-Id: I22b130076f9eedbcf7c5eeae78362adfd0eee9af
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
The functionality should be available via QWidget::winId(),
and QWidget::createWindowContainer() + QWindow::fromWinId().
Any bugs in this area should be fixed by improving the general
wrapping APIs.
Fixes: QTBUG-83254
Change-Id: I86584a4a8138d17d65a50da39efd58039f10da91
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Set HighDpiScaleFactorRoundingPolicy to PassThough
by default. This makes Qt track the system UI setting
accurately, and is overall the least confusing option.
Historically, Qt has rounded the scale factor (for example,
Windows 175% -> DPR 2) due to faulty handling of fractional
scale factors in Qt Widgets and with the native Windows
style.
Other areas of Qt such as Qt Quick have had few issues
with fractional scale factors and support this well.
Qt has never rounded the scale factor on the Android
platform.
Support for fractional scale factors in Qt Widgets and
the windows style has improved, which makes changing
the default for Qt 6 viable.
Task-number: QTBUG-83068
Change-Id: I38b60f621f95be8ebb6cb84a07d3370fec19ab92
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Enable high-DPI support for all platforms which use
QHighDpiScaling. This changes the default behavior
of Qt applications on X11, Windows, and Android.
Qt::AA_EnableHighDpiScaling is now effectively on by
default, and Qt 6 applications do not have to set
this application attribute. Opting out is possible by
setting the Qt::AA_DisableHighDpiScaling attribute.
Task-number: QTBUG-83068
Change-Id: Ia2bd3e6f490130afcacd3a951bc50dbb40a79d7f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Without an override for logicalDpi() the base class implementation
would use the geometry of the screen to figure out the DPI, and end
up with ~100, which combined with a 96DPI base logical DPI would
give a wrong scale factor.
Change-Id: I68aecce44d2ee672c7b707dfe5444af8f551e961
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>