For some reason mdls fails to resolve the kMDItemVersion for Qt
Creator in some cases, even if the Info.plist has the required
version keys, and the version shows up fine in Finder.
Work around it by manually reading the version from the Info.plist
Fixes: QTBUG-117204
Change-Id: I60d57fb728608e139a4540fabf1006fc2681d0a7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
If loading the lldbbrige fails, we'll continue on to the next
Qt Creator version if we find one. It makes more sense to report
that we're about to load from a given version, so that any error
messages from lldbbridge are output with that context in place.
Change-Id: Icbab6f7d39333ce76d729fd0769cfdb44f05a2f0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
When the raster window is resized, we need to resize the backingstore,
and make sure we repaint the entire window. We defer the backingstore
resize to beginPaint, in case multiple resize events come in before
we have a chance to paint, but we can't defer the invalidation of the
paint device window, because QPaintDeviceWindowPrivate::paint() has
already subtracted the paint region from its dirty region at this
point. Invalidating yet again will result in the dirty region of
window not clearing fully until after the final resize, and when
that happens we will also repaint the window with the wrong dirty
region, based on the window's original size.
My moving the window invalidation to the resize event, while keeping
the deferred backingstore resize we avoid this problem.
Pick-to: 6.5 6.6
Change-Id: I44662778f5b1bcd259b20ca86124e6487561ef4f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
If there is a reason to static_cast to `const QAIM*` then cast away the
const, I failed to see it. QObject::sender() returns a non-co.
Change-Id: Ibf8c8613c3de1584b426269c1ffba94db75d26d6
Reviewed-by: David Faure <david.faure@kdab.com>
Create QString at compile time using the literal operator""s instead of
using pointer to characters. This way, no conversion or allocation will
occur at runtime.
Task-number: QTBUG-117425
Pick-to: 6.6 6.5
Change-Id: I2a19d4fe1150aad7908d0c2a7215099bc0814e8d
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Create QString at compile time using the literal operator""s instead of
using pointer to characters. This way, no conversion or allocation will
occur at runtime.
Task-number: QTBUG-117422
Pick-to: 6.6 6.5
Change-Id: I92eed0a371bf6383ddb1e938646029f1c24242bf
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reorder the includes following the coding conventions.
Remove unneeded includes.
Add needed includes to avoid Transitive includes.
Task-number: QTBUG-117422
Pick-to: 6.6 6.5
Change-Id: Iaf2b939bc160312de8aa4035da03b648cf76f17d
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
The message processing may finish before watcherHelper is
setup. Use locking and an additional check for message
processing completion to avoid the race condition.
Move the code to new function inside QDBusPendingCallPrivate,
close to where the waiting without GUI is done.
Add assertions that check that watcherHelper is not overwritten.
Change-Id: I24e54598135edf293c41b3a80369b0a3b46f775c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
- Fix punctuation and link errors.
- Make wording more consistent.
Change-Id: I5954a5c3129fdaf524918b2f1c60cc510374c505
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Don't get a QModelIndex out of a temporary QPersistentModelIndex.
Pick-to: 6.6
Change-Id: Ida9e25f1a17130e19b75221e1189e6f2fccd3f27
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
- provide an asset catalog .json file for both Xcode 13 and 14
formats. Apps built against the Xcode 13 SDK are not validated
anymore by the App store, but it's still useful to see how things
were before.
- Xcode 13 required the following icon sizes for a universal iOS app:
60x60@2x, 76x76@2x\~ipad, 167x167, 1024x1024
- Xcode 14 only needs the 1024x1024 one
- icons need to be embedded into the asset catalog starting with iOS
11 according to Apple docs (not sure which Xcode version, but it's
needed for both Xcode 13 and Xcode 14), and they don't have to
manually be copied into the bundle anymore, Xcode takes care of
that when processing the asset catalog
- add an 167x167 icon image for the iPad pro for Xcode 13
- add an 1024x1024 icon image that is required for successful app store
submission and embed it into the asset catalogs
- for Xcode 13, we need to manually specify all the required icon
sizes
- for Xcode 14 we can rely on Xcode to generate the smaller icons from
the big one
- because the icons need to live in the asset catalog folder, remove
unnecessary icons in the appicons folder.
- for the cmake project, make sure the asset catalog compiler generates
the icons by setting the
XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_APPICON_NAME attribute
qmake does automatically already.
it would be nice if we can do that automatically in a future Qt
version
- remove unused icon references in Info.plist file with Xcode 13
- remove all icon references in Info.plist with Xcode 14, rely on Xcode
to add that info via its generated partial Info.plist file that gets
merged into the main one.
- don't include CMakeLists.txt as a text resource
Amends cf3535fdf2
Pick-to: 6.5 6.6
Task-number: QTBUG-104519
Task-number: QTBUG-110921
Task-number: QTBUG-116784
Change-Id: I0bc556e66647a66bc21402ea62db3374d0970e97
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
The value needs to be 'CustomLaunchScreen', not
'CustomLaunchScreen.storyboard', otherwise app store validation will
fail with the following error:
Asset validation failed
Invalid bundle. Because your app supports Multitasking on iPad, you
need to include the CustomLaunchScreen.storyboard launch storyboard
file in you bundle. Use UILaunchScreen instead if the app’s
MinimumOSVersion is 14 or higher and you prefer to configure the
launch screen without storyboards.
This brings the value in line with what we have for the qmake
Info.plist file.
Amends cf3535fdf2
Pick-to: 6.5 6.6
Task-number: QTBUG-104519
Task-number: QTBUG-110921
Task-number: QTBUG-116784
Change-Id: I4e9cc2ed685634544955e967f35fdc426dac0f0c
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
It is required for publishing an app to the app store. Otherwise during
app store validation phase, you get an error:
Asset validation failed
Missing Info.plist value. A value for the Info.plist key
'CFBundleIconName' is missing in the bundle 'foo'. Apps built with
iOS 11 or later SDK must supply app icons in an asset catalog and must
also provide a value for this Info.plist key.
For more information see
http://help.apple.com/xcode/mac/current/#/dev10510b1f7.
Note this is not needed when using Xcode 14.3+ and when one places the
icons into an asset catalog. When processing icons in the asset
catalog, Xcode generates a partial Info.plist file that will contain
the CFBundleIconName key and will merge into the final Info.plist
file.
Amends cf3535fdf2
Pick-to: 6.5 6.6
Task-number: QTBUG-104519
Task-number: QTBUG-110921
Task-number: QTBUG-116784
Change-Id: I53009097cf27b096c72ee9c4bad6aa4286272061
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
When declaring MimetypeModel class, use Q_DECLARE_TR_FUNCTIONS Macro
instead of Q_OBJECT as we only need to call tr() functions.
Task-number: QTBUG-117146
Pick-to: 6.6 6.5
Change-Id: Ic7afd4a806d57ba2a651ebe129f3a91f35764354
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Fix include order to respect the Coding Conventions.
Remove QT_{BEGIN,END}_NAMESPACE because these are private Qt macros that
should not be used in the examples.
Task-number: QTBUG-117146
Pick-to: 6.6 6.5
Change-Id: Iba7a4726180ec97d9654ed3b934baca8c1df0b5c
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Fix code lines that do not respect the 100 characters limit rule.
Task-number: QTBUG-117146
Pick-to: 6.6 6.5
Change-Id: I9833e9a25a09833b3e0384c95af8a422d5aa4582
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
In member function ‘virtual QDpi QXcbScreen::logicalBaseDpi() const’:
qxcbscreen.h:139:42: note: parameter passing for argument of type
‘std::pair<double, double>’ when C++17 is enabled changed to match C++14 in GCC 10.1
QDpi logicalBaseDpi() const override { return QDpi(96, 96); }
It's not possible to silence this warning/note using pragmas.
Pick-to: 6.6 6.5 6.2
Change-Id: I913a1753ce0c82ac17951faa58b0a88bf1daa4db
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Fix the use case where the application recreates the
QApplication object while reusing the html container
element. This would cause an error:
Uncaught DOMException: Failed to execute 'attachShadow' on
'Element': Shadow root cannot be created on a host which
already hosts a shadow tree
It looks like there is no way to remove a previously
attached shadow root, which means we can't return the
container element to its initial state if we attach
to the user-provided container element.
Fix this by introducing an intermediate element which
we can remove() in the QWasmScreen destructor.
Pick-to: 6.6 6.5
Change-Id: I929393a498b0440390a3e2c1774a3cac3a5a7e79
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
The snippets from the files were used in the QXmlDefaultHandler
documentation that got moved to qt5compat in Qt 6 (commit
79e0374143).
Change-Id: I11f19c8b2c5f693e203925bd2b19cff8d3380580
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
The files generated by syncqt should land not only in module include
directory, but also in framework directory. Before syncqt made two
copies of the generated files one in staging directory and the second
one in module framework directory. This commit moves all logic related
to framework header files to cmake scripts. This is done for both
consistency and simlifying the logic. The whole module .syncqt_staging
directory is copying to the framework library in cmake.
[ChangeLog][Tools][syncqt] '-framework' and '-frameworkIncludeDir'
arguments were removed. The related logic is moved to cmake scripts.
Task-number: QTBUG-116483
Pick-to: 6.6 6.5
Change-Id: If79c5470d2ab51eb7fc083bce6fb01858bed76ba
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
It seems to have fallen prey to the mass-deprecation of <QtAlgorithms>
in Qt 5.2. Since it didn't actually duplicate STL functionality, that
was uncalled-for: Unlike std::swap(), it's ADL-enabled, so the docs
were wrong to suggest replacing it with std::swap instead.
In fact, the tony-table that 5957f245c6
added to qalgorithms.qdoc didn't include qSwap(), yet, qSwap() was
marked as deprecated.
Un-deprecate and expand the discussion to more faithfully represent
its value, without going into the depths of teaching how to swap
correctly in C++ (link to boost.org and cppreference.com for that
instead).
Remove the example that used qSwap() on doubles, which is precisely
_not_ how you should use it.
Amends 5957f245c6c77c98d7e90d614c9fe2cdbfe7e8e6(!).
[ChangeLog][QtCore] Un-deprecated qSwap().
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: I4981005ba71b0d1824f2a46897145255fa66a7ea
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Features enable code coverage collecting using the gcov tool. The
resulting reports can then be post-processed by lcov or similar tools.
[ChangeLog][CMake][Coverage] Added the coverage configuration argument.
The only supported coverage tool at the moment is gcov. The argument
requires Qt is built in Debug otherwise setting the argument leads to
the configuration error. Typical usage:
<...>/configure -developer-build -coverage gcov
Task-number: QTBUG-86223
Change-Id: I39b2061f544997a7c4fe6f4d135c0ab447f15a17
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Both executables (subscription, bindablesubscription) are documented
as one project. Make sure that e.g. Qt Creator can also load this
project.
Fixes: QTBUG-117109
Pick-to: 6.5 6.6 6.6.0
Change-Id: I3912f2f76379940b02f3a57a7a55440a30366755
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
<QMessageBox> is not a (separately documented) header. QDoc
therefore puts the documentation on a separate proxy page:
https://doc.qt.io/qt-6/qmessagebox-proxy.html
Fix this by actually linking to the type.
This amends 95a3f85a2f, which moved the macro from
QtGlobal to QMessageBox.
Pick-to: 6.5 6.6
Change-Id: Ia2ed3d9fd786732c85d731634ff79afefe42333b
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Equivalent to get/setStaticField.
Add a test, and tighten up the surrounding test code a bit.
Change-Id: Ic0993c5d6223f4de271cb01baf727459b5167f94
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
Reviewed-by: Zoltan Gera <zoltan.gera@qt.io>
Template functions don't permit partial specialization, e.g. we cannot
specialize typeSignature() to return an array signature for any
std::vector or QList type. We need to do that for better array support,
so move those functions as static members into a template class, which
then can be specialized.
Since submodules are both calling and specializing typeSignature and
className as template functions, keep and use those until the porting is
complete.
Change-Id: I74ec957fc41f78046cd9d0f803d8cc9d1e56672b
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
Reviewed-by: Zoltan Gera <zoltan.gera@qt.io>
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
The type lives in the QtJniTypes namespace, which is where types end up
that are declared through the Q_DECLARE_JNI_CLASS/TYPE macros. Having a
String type in that namespace prevents us from declaring the Java String
class as a QtJniTypes type, which is silly.
Perhaps this type becomes obsolete at some point with std::string being
a constexpr type in C++23, but until then we need it. It has no ABI, so
renaming it us safe.
Until submodules are ported, leave a compatibility alias String type,
which also prevents us from declaring a String JNI class in tests until
the alias is removed in a later commit.
Change-Id: I489a40a9b9e94e6495cf54548238438e9220d5c1
Reviewed-by: Zoltan Gera <zoltan.gera@qt.io>
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
Amends 4f4a8e75ab, after which
QItemSelectionModel printed a warning when destroying the model.
We reset the selection model in response to the model getting destroyed,
and since the model is already set to be nullptr at this point the
select() function complains about changing the selection with no model
set being a no-op.
Fix this by not calling reset() when the model gets destroyed - the
stored selection and currentIndex are already reset at this point -
and instead only call reset() when a new model is set in initModel.
Fixes: QTBUG-117200
Pick-to: 6.6.0 6.6 6.5 6.2
Change-Id: I12fc6b3fb2f2ff2a34b46988d5f58151123f9976
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
If the QCommandLineOption doesn't have a valueName, the parser won't
read the argument, therefore returning an empty value. If the developers
are calling ::value on the option, they clearly think it's expected to
get a value but won't ever be getting one, so we better warn them about
it.
Change-Id: I434b94c0b817b5d9d137c17f32b92af363f93eb8
Reviewed-by: David Faure <david.faure@kdab.com>
It's been available since C++17, and since we compile the trait
anyway, using it will probably speed up instantiation of qSwap()
(didn't test, just guesstimating).
Change-Id: If77ca71a8021a73edf4864bdd9e5fce517dcabb1
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
The qSwap() function needs std::swap, so include <utility> manually
instead of relying on transitive includes.
Pick-to: 6.6 6.5
Change-Id: If1331e1eabb55542eac7477522a8e906efb5379f
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Just "QSWAP_H" is a bit meager to be unique. We don't really have a
monopoly on q-prefixed function and header names, there's the C std
function qsort(), e.g...
So use a somewhat more unique name as header guard.
Pick-to: 6.6 6.5
Change-Id: I554fa224afcb6858b752e8044ef3c03dfc69c084
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
It's now documented in qswap.qdoc.
Amends 9c706e2567.
Pick-to: 6.6 6.5
Change-Id: If6138df419dee165e9f1de4c0a0d68af1dcfaa42
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Use recursive descent to handle parentheses in config condition
expressions. This fixes cases like 'NOT (A AND B)'.
Fixes: QTBUG-117053
Change-Id: Iab1b6173abe00d763808bb972a9a5443ffa0938d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
By using a while loop instead of a foreach(RANGE), we can simplify the
code and remove the skipNext variable.
Also, we need to access the last used iteration index in a future
commit. This is not possible with a foreach loop without saving the
index in another variable.
Change-Id: I39306a0105fb31a6a8f39e9d4c47ee3424599a2b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
All of the continue() statements are not needed. There is no code after
the if-else chain.
Change-Id: I16188d14b4f05cb1e5f29bac4657149c4fce60a4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Rephrase hard-to-read sentence.
Replace 'integral type; with 'numeric type', as this seems
to be the terminology in the standard:
The type-specifier-seq of an enum-base shall name an integral type
Finally, no need to use \sa for a method that is mentioned right before.
Pick-to: 6.6
Change-Id: I543041e78cc09ccd58182db454880941592c74ae
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
Move the rsslisting example documentation to examples/network/doc,
as it is done for all the other examples.
Fixes: QTBUG-117215
Pick-to: 6.5 6.6
Change-Id: If83202825afe8c69cb7fda0f84ca4832cf3d60e7
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Added to the list of important links on the Android Platform home page.
Task-number: QTBUG-116780
Pick-to: 6.2 6.5 6.6 6.6.0
Change-Id: Id65a73d56bff0b288ebb1da098f6dbd8cbbe606e
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
- Macros provide possibility to use enums in QML via QtNetwork QML module
Task-number: QTBUG-115056
Change-Id: I1ed96a7eb4b12681d16137528307fec6db5b016c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Fix shared libraries build error:
undefined symbol: _ZN16QNativeInterface7Private14QWaylandWindowD0Ev
We are declaring QWaylandWindow for all Q_OS_UNIX in
qplatformwindow_p.h, and must include the definition
as well.
Change-Id: I630538af475524659e9a476171994e600f2ec668
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
[ChangeLog][QtWidgets][QDockWidget] A floating dockwidget that doesn't
have the DockWidgetClosable feature flag set can no longer be closed by
a call to QWidget::close or a corresponding keyboard shortcut (such as
Alt+F4).
Fixes: QTBUG-116752
Pick-to: 6.6 6.5
Change-Id: I7859a2eed11f0e4ee013f7f56611e282e9bcae9a
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
[ChangeLog][CMake] Added variable QT_I18N_NATIVE_LANGUAGE to specify the
native language that is used in the source code for translatable
strings.
[ChangeLog][CMake] Added keyword I18N_NATIVE_LANGUAGE to
qt_standard_project_setup to conveniently set QT_I18N_NATIVE_LANGUAGE.
Task-number: QTBUG-115845
Change-Id: I079256507685afe5eccda78beffff819292494bf
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>