QDoc generates warnings for images that do not have an alternate-text
associated with it. Alt-text is required for to increase accessibilty
options.
This patch adds alt-text to images in the Qt Network
Fixes: QTBUG-135122
Pick-to: 6.8
Change-Id: I690f1d381ef5a9052e189dd1f3906243df557da0
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
(cherry picked from commit ae6ba06e55dbdae98eb05069e007044bf70f45da)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In one case, the code simply checked for isOpen afterwards; refactor
it to use QFile::open's result. In another case, a file was opened
from the resource system, so add a check.
Pick-to: 6.8
Change-Id: I5f4c22dd5ce678f15c9c1609c4228d50a2b32a1d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit eeead68995653ab38e43e9f1494feaaa679dfd07)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
To increase accessibility for the documentation, provide altenative
descriptions for the images.
Pick-to: 6.8
Fixes: QTBUG-135116
Change-Id: Id2d97251af9af0d4222f0dc15aa5b8e266ca36f4
Reviewed-by: Safiyyah Moosa <safiyyah.moosa@qt.io>
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
(cherry picked from commit 8e36dcf4c861033f4675e37383c847b2ae03d23d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QDoc generates warnings for images that do not have alt-text associated
with them. Alt-text is used to add context to images for users who use
screen-readers.
This patch applies alt-text to images in the Qt SQL module that do not
have any alt-text associated with them.
Fixes: QTBUG-135114
Pick-to: 6.8
Change-Id: Iead375852d30219db7dfed12bb1f383eb55713e6
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
(cherry picked from commit 7b66c906bf7a8c32650157fdd13221822ec1558e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The former is deprecated.
Change-Id: I94de7a6c6bbea61cd75820389e8039cb92c7ee6a
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit 600388ff2ad24408d64ed5ea8fc1b793f6398f28)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Show the color that is dragged in, both graphically and textually.
Revert to default palette for other data types. Prioritize colors
over text: if an application (such as kolourpaint) offers both x-color
and text, the color is probably the intention, and the text may be
just a hex string for placing into a color text field.
Pick-to: 6.8
Fixes: QTBUG-134313
Change-Id: I6c19f1220712881d2057bc9758bbc8cbd9247c81
Reviewed-by: Liang Qi <liang.qi@qt.io>
(cherry picked from commit 1750acc3921148b0ffc8f9f1421b87a2f5522a2e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
"Android" is trademarked and needs to be referenced in a certain way.
The following steps were taken:
-Created qdoc macro.
-Updated "Qt Android" and "Qt for Android" to use \Q4A in qdoc files.
The macro will need to be adopted in all documentation projects.
Task-number: QAA-2836
Pick-to: 6.8 6.5
Change-Id: I4b52247a4ed52047242a06404e6d3aa19de9c16c
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 9c6c6d7d388bee01ea4e5ea102d3b0ed359c3f00)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
childNumber() has been renamed to row() in the code, but not in
the documentation.
Correct it.
Pick-to: 6.8 6.5
Change-Id: Ibe6f1f27c0dd1982ff663dc680738babf2db87d7
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit d0cb3c0acdd4a482fd749684f282451bdd13557f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
- Use auto * when initializing with new
- Initialize variables
- Fix static invocations
- Use per-class includes
- Minor cleanups
Pick-to: 6.8
Change-Id: I137bc7dfad63bc55a1b1bbc3f42d758bbfdb86ba
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
(cherry picked from commit f388ca8841ad25cf79e5fdf8fa3e9d2f4de48ebc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
To avoid the following error:
The custom command generating
.rcc/qrc_editabletreemodel.cpp
is attached to multiple targets:
editabletreemodel
editabletreemodel_tester
but none of these is a common dependency of the other(s). This is
not allowed by the Xcode "new build system".
Pick-to: 6.8
Fixes: QTBUG-131631
Change-Id: I1c5d0702596a4f8f723d9080bc5304d6ad06853b
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 9f593791988da197dbe956669b8a4647dc50124a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
qdebug.h includes many Qt and STL headers, so if you include a Qt header
you get all those transitive includes, which may affect build time.
- Where appropriate use the printf-like syntax of qDebug() and co.,
these don't need the QDebug streaming operators
- qfloat16 is used in an inline member function, so include it
explicitly
[ChangeLog][Potentially Source Incompatible Changes] Various Qt public
headers don't include QDebug any more; if you need QDebug's streaming
you'll have to include it in your code.
Task-number: QTBUG-132439
Change-Id: I750587e17a3b38fa226cd3af8eaccc8da580f436
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 185cba6e95a006d2548f20599f84390e5a3ad653)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When a layout is used to arrange the children of a non-top-level
custom widget, the layout's contentsMargins need to be manually set to
zero to avoid extra empty space around the widgets, misaligning it
w.r.t. its siblings.
Add the necessary call.
Amends 2690822428deec4f0c08f4d118d69a7c6036369e, which, however,
inherited the missing margin adjustment from older code.
Pick-to: 6.8
Change-Id: Icd1945a4f2b1635f031e50758ec2f1ec9313ae27
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 15524d1623a1400e4de15e57408e37020d394986)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Examples should show idiomatic use of Qt and C++, so mark the custom
widget constructors in this example as explicit and their destructors
are override.
Amends 2690822428deec4f0c08f4d118d69a7c6036369e, which, however,
inherited the missing explicit from older code.
Pick-to: 6.8
Change-Id: I5b5b49f69330c6f139345bed7264c85a36c36e9b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit e0e9a5627376e04aba1b2ca2591554851d7de240)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The old code used manual memory mangement (raw new/delete) to
(de)allocate the Ui struct. This is so 80s.
Use an owning smart pointer to manage the memory. Ordinarily, this
would have been QScopedPointer, but seeing as that doesn't have a
create() method to hide the raw new, use std::unique_ptr and
std::make_unique() instead.
Amends 2690822428deec4f0c08f4d118d69a7c6036369e.
Pick-to: 6.8
Change-Id: Icabb9154eb38630855e14094b958af0214516f6b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 0da2c2c4ef2219967db87021eece2a60b6e207af)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The old code used a grid layout inside the QGroupBox, but the design
with labels in the first and edit-widgets in the second column lends
itself to a QFormLayout, which adapts the alignment of the widgets to
the platform style, so use that.
Amends 2690822428deec4f0c08f4d118d69a7c6036369e, which, however,
inherited all of the above from even older code.
Pick-to: 6.8
Change-Id: I528f0ce9d8cb7a997fbfabcdca887c059f571b38
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 9c099ef942216d01261c26b60e3727a2a467f12a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
- The old code used two QPushButtons in a QHBoxLayout to provide
Ok/Cancel buttons. This hard-codes the positions and text (and
icons) of these buttons, instead of adapting to the platform style.
The new code simply uses QDialogButtonBox, which is designed for
this purpose.
- Also, the old code connected the Ok button's clicked() signal to a
custom slot that then called QDialog::accept(). This means that the
code in the custom slot is not executed when the dialog is accepted
by other means (e.g. return press in one of the line edits
("auto-default"), though I'm not sure here).
The new code uses the idiomatic Qt way of overriding
QDialog::accept() instead, and connects the button-box's accepted()
signal to it. This is done in the .ui file, so it already works in
Designer preview.
- Finally, the old code made a manual connection from the Cancel
button to QDialog::reject().
The new code uses the Qt idiom of connecting in the .ui file
directly, using QDialogButtonBox::rejected() as the signal.
Amends 2690822428deec4f0c08f4d118d69a7c6036369e, which, however,
inherited all of the above from even older code.
Pick-to: 6.8
Change-Id: I83afd6156a0811e0c0f99f2480625ea6b69ff78b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 3419c299369ac1da94ba5710aaf5f5f65c38c33c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The old code connected to the wrong signal and therefore had to write
a custom slot to perform the disabling of the group-box.
The new code simply connects the QCheckBox::toggled(bool) signal to
the directly-compatible QWidget::setDisabled(bool) slot, removing the
need for a custom slot.
Also move the connection into the .ui file, so it works already when
checking the form in QtDesigner.
Amends 2690822428deec4f0c08f4d118d69a7c6036369e, which, however, only
inherited the issues from older code.
Pick-to: 6.8
Change-Id: Ia834f92de270bb7b18981273188f6e5b6cd457a2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 53826d1cde26f825d1983476c6697f72130e351f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Modified the mousePressEvent in DragWidget to
temporarily detach the dragged QLabel from its
parent using setParent(nullptr). This ensures the
dragged widget remains visible and above other
widgets during the drag operation. Re-parenting
logic was added to restore the QLabel to its o
riginal container if the drag action is not a
MoveAction. This change addresses visual issues
where dragged items could disappear behind
overlapping widgets, enhancing user experience
and maintaining consistent behavior.
Task-number: QTBUG-123777
Pick-to: 6.6.2
Change-Id: I3edce9c96815e32eb8f00b61f7eda1709de04b4d
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
The generic stylesheet rule (* { border: none; })
was overriding specific styles for
the menu-indicator, causing the dropdown arrow
to appear larger than intended. This rule was
removed to restore default or explicitly set
styles for the arrow, ensuring consistent
visual appearance
Task-number: QTBUG-120604
Pick-to: 6.8 6.5
Change-Id: If93de1e1595a2155e9a76644a3c615bd432bf53f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Is easier to read and more bool-trap safe. Old form header deprecated from 6.10
Fixes: QTBUG-129575
Change-Id: Id785b9ce159007ce745c04120b2112c8bb9b0802
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
To work around path length limiations, Qt Creator optionally uses junction
points to shorten the build directories. This however breaks examples
that require sources outside their 'root' directory.
QUIP 13 states that examples should be self-contained. Anyhow, fixing this
is a larger effort, so for now just disable junction points in Qt Creator
for these examples.
Task-number: QTBUG-128914
Pick-to: 6.8
Change-Id: Ifb5e6944d936c82b1dba9fe3b81bebc1c8320168
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This example is for the animation framework (graphics),
it isn't about multimedia. Use the correct category.
Pick-to: 6.8
Change-Id: I32f0ce13a5496c8fbc871d8f2454575c25684eba
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Allows customization and dynamic rendering of items
in the labels.
Task-number: QTBUG-126696
Change-Id: I6261131808aa303660f991e2f19248e547b14566
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Matthias Rauter <matthias.rauter@qt.io>
This commit makes visible in the TOC:
- both of the tutorials
- a set of examples for completer, undo framework, and regex'es
Fixes: QTBUG-129818
Change-Id: Id6636782789c4e5b11349af3c4fb33f75035f1a0
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
This commit updates the images used to illustrate Qt Widgets.
The commit also removes old unused images.
Task-number: QTBUG-69988
Pick-to: 6.8
Change-Id: I89e363c6c854c36bb0d763532d4cb359bdc85a38
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
http and rsslisting compile and can work, the rest are
don't build and are probably too low level.
Pick-to: 6.8
Change-Id: I031494178d0cace10951c3eb5495fbbf0f73d717
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
This commit updates the screenshots for the Qt Widget examples. It also
removes several unused screenshots and adds several minor edits.
Task-number: QTBUG-69988
Pick-to: 6.8
Change-Id: I23b90fd6c8b798169d158854609c09ef3f1c1a20
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Completely deleting a row in a QSqlTableModel needs a call to select()
afterwards, otherwise a blank column will stay according the
documentation of QSqlTableModel::removeRows()
Also add albumdetails.xml to the resource file to make sure it's found
during runtime.
Pick-to: 6.8
Task-number: QTBUG-128434
Change-Id: Ie5cc38edfa27984d186467e3372b05987f78d14c
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Instead of using raw timer IDs. QBasicTimer is a value class with
sizeof(int), so not much overhead, and easier to use API. Examples
should show best practices.
Change-Id: I5b9efe47ced69c0067eac891398185be7e87bd0e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The QDoc command `\tableofcontents` was rendered useless by a change
more than a decade ago. Remove the use of `\tableofcontents` as it
serves no purpose, and ensure that the surrounding context still makes
sense for the reader, by removing preceding text that refers to a
non-existing table of contents, such as `Contents:`.
Task-number: QTBUG-128173
Pick-to: 6.8
Change-Id: Ibb5a6af0e80f70fa487cdf6a7e38009a9ef60cbf
Reviewed-by: Safiyyah Moosa <safiyyah.moosa@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
If the filter gets changed and invalidated while there is no mapping
(perhaps because the model had been invalidated first), then we fail
to notice the change and don't emit rowsInserted/Removed. And as the
new filter is already in place by the time invalidateFilter gets
called, we cannot know what the size of the model was before the
change.
The only way to fix that is to introduce a beginFilterChange protected
function that makes sure that we have a mapping from the source model
with the old filter. That is a no-op if a mapping is already in place,
costing only the lookup in a hash table.
By calling this function, custom models with their own filtering logic
can make sure that their model emits the changed-signals as expected.
Add test coverage and documentation and fix the relevant examples
snippet to use that new protected function as recommended, and to
invalidate only the rows filter.
[ChangeLog][Core][QSortFilterProxyModel] Added a new protected
function beginFilterChange() that subclasses overriding
filterAcceptsRow or filterAcceptsColumn should call before the filter
parameter is changed. This makes sure that the signals informing
about rows or columns changing get correctly emitted.
Fixes: QTBUG-115717
Change-Id: Ib73a7119ac9dd9c4bcf220f1274d6b4ed093e7ff
Reviewed-by: David Faure <david.faure@kdab.com>
- The docs were restructured in v. 13.0 and 14.0, so most headings
changed, some topics were removed and lots of topics were added
- Use the macro \QC
- Fix the broken links in qtbase
Change-Id: Ic173a3e9a1c80322162c3feb277098de2a9f1cc6
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Before this change, installing the example with a multi-config
generator failed with
CMake Error at cmake_install.cmake:123 (include):
include could not find requested file:
<build_dir>/.qt/deploy_calendarPlugin_49e753a159-$<CONFIG>.cmake
When configuring the project, cmake mentions the following warning:
CMake Warning (dev) in CMakeLists.txt:
Policy CMP0087 is not set: Install CODE|SCRIPT allow the use of
generator expressions. Run "cmake --help-policy CMP0087" for policy
details.
This happens because the specified minimum cmake version of the project
was 3.5, so the above policy was not enabled, and the generator
expressions we use for the deployment api failed to be evaluated.
Fix the minimum version to be 3.16.
Clean up the project a bit to be in line with our other examples.
Use qt_internal_add_example, remove redundant find_package(Qt) calls,
remove redundant project() and cmake_minimum_required() calls, use
target_include_directories.
Amends f071d4ee8abf6fd0f1b6e187b4e99fa6fad7b642
Fixes: QTBUG-127616
Task-number: QTBUG-115200
Change-Id: I06ca1d38a8e5e7cb18ade205616a603db98a17be
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
This example demonstrates how to write a calendar backend plugin
using a low-level API for extending Qt applications.
Fixes: QTBUG-115200
Change-Id: If0b7f2552ba8c2203acdcbff238fb0ffa7cfca55
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>