Merge remote-tracking branch 'origin/13.0'

Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	src/libs/utils/fsengine/fileiteratordevicesappender.h

Change-Id: Ia61fa12d14a4f862549509bd980cf9f66905c17f
This commit is contained in:
Eike Ziller
2024-04-08 11:08:05 +02:00
6 changed files with 64 additions and 40 deletions

View File

@@ -36,22 +36,25 @@
\list 1 \list 1
\li Create custom components and place all the \c .qml files in a \li Create custom components and place all the \c .qml files in a
directory dedicated to your module. For example: directory dedicated to your module. For example,
\c {imports\asset_imports}. \c {imports\asset_imports}.
\li For Qt Quick UI Prototype projects (.qmlproject), specify the path to \if defined(qtcreator)
\li For Qt Quick UI Prototype projects (.qmlproject), specify the path to
the directory that has the module in the .qmlproject file the directory that has the module in the .qmlproject file
of the application where you want to use the module of the application where you want to use the module
as a value of the \c importPaths variable. For example as a value of the \c importPaths variable. For example,
\c{importPaths: [ "imports", "asset_imports" ]}. \c{importPaths: [ "imports", "asset_imports" ]}.
\else
\li Specify the path to the directory that has the module in the
.qmlproject file of the application where you want to use the module
as a value of the \c importPaths variable. For example,
\c{importPaths: [ "imports", "asset_imports" ]}.
\endif
\li Create a \c qmldir file for your module and place it \li Create a \c qmldir file for your module and place it
in the module directory. For more information, see in the module directory. For more information, see
\l {Module Definition qmldir Files}. \l {Module Definition qmldir Files}.
\li Create a \c qmltypes file, as instructed in
\l {Generating Type Description Files}.
\li Create a directory named \c designer in your module directory. \li Create a directory named \c designer in your module directory.
\li Create a \c .metainfo file for your module and place it in the \li Create a \c .metainfo file for your module and place it in the
@@ -66,23 +69,29 @@
\if defined(qtcreator) \if defined(qtcreator)
\li Import the module into the project, as instructed in \li Import the module into the project, as instructed in
\l {Importing QML Modules}. \l {Importing QML Modules}.
\endlist
\note If \QC cannot find the new QML module, build the project
and then go to \uicontrol {Tools} > \uicontrol {QML/JS} >
\uicontrol {Reset Code Model} to reset the code model.
\else \else
\li Build your module using the same Qt version and compiler as \QDS. \li Build your module using the same Qt version and compiler as \QDS.
For more information, see \l {Running QML Modules in Design Mode}.
Your module and components should now appear in \uicontrol Components.
\endif
\endlist \endlist
Your module should now appear in \uicontrol Components. Your components \note If \QC cannot find the new QML module, build the project
should appear in a subsection of \uicontrol Components if a valid and then go to \uicontrol {Tools} > \uicontrol {QML/JS} >
\c .metainfo file is in place. \uicontrol {Reset Code Model} to reset the code model.
\if defined(qtdesignstudio)
For more information about how to show the \uicontrol {Tools} menu, see
\l{Customizing the Menu}.
\endif \endif
\section1 Generating Type Description Files \if defined(qtcreator)
\section1 Developing with Qt 6.1 or Earlier
Since Qt 6.2, CMake generates the \c qmltypes and \c qmldir files
automatically.
\section2 Generating Type Description Files
When \l{Defining QML Types from C++}{registering QML types}, make sure that When \l{Defining QML Types from C++}{registering QML types}, make sure that
the QML module has a \c{plugins.qmltypes} file. Ideally, it should be located the QML module has a \c{plugins.qmltypes} file. Ideally, it should be located
@@ -115,6 +124,7 @@
\endcode \endcode
The import path affects all the targets built by the CMake project. The import path affects all the targets built by the CMake project.
\endif
\if defined(qtdesignstudio) \if defined(qtdesignstudio)
\section1 Running QML Modules in Design Mode \section1 Running QML Modules in Design Mode

View File

@@ -39335,7 +39335,7 @@ Bitte versuchen Sie es erneut.</translation>
</message> </message>
<message> <message>
<source>Expand</source> <source>Expand</source>
<translation>Erweitern</translation> <translation>Aufklappen</translation>
</message> </message>
<message> <message>
<source>Ctrl+T</source> <source>Ctrl+T</source>

View File

@@ -22,6 +22,7 @@
#include <QFormLayout> #include <QFormLayout>
#include <QGroupBox> #include <QGroupBox>
#include <QLabel> #include <QLabel>
#include <QLibraryInfo>
#include <QLineEdit> #include <QLineEdit>
#include <QMenuBar> #include <QMenuBar>
#include <QPainter> #include <QPainter>
@@ -480,21 +481,36 @@ static void drawPrimitiveTweakedForDarkTheme(QStyle::PrimitiveElement element,
break; break;
} }
case QStyle::PE_FrameGroupBox: { case QStyle::PE_FrameGroupBox: {
// Snippet from QFusionStyle::drawPrimitive - BEGIN QRect groupBoxFrame = option->rect;
static const int groupBoxTopMargin = 3;
int topMargin = 0; int topMargin = 0;
auto control = dynamic_cast<const QGroupBox *>(widget); if (widget) {
if (control && !control->isCheckable() && control->title().isEmpty()) { // Before Qt 6.6.3, QStyle::subControlRect() returned wrong QRect for SC_GroupBoxFrame
// Shrinking the topMargin if Not checkable AND title is empty static const bool validSCRect = QLibraryInfo::version() >= QVersionNumber(6, 6, 3);
topMargin = groupBoxTopMargin; if (validSCRect) {
} else { QStyleOptionGroupBox opt;
const int exclusiveIndicatorHeight = widget ? widget->style()->pixelMetric(QStyle::PM_ExclusiveIndicatorHeight) : 0; opt.initFrom(widget);
topMargin = qMax(exclusiveIndicatorHeight, const QStyle *style = widget->style();
option->fontMetrics.height()) + groupBoxTopMargin; groupBoxFrame = style->subControlRect(QStyle::CC_GroupBox, &opt,
QStyle::SC_GroupBoxFrame, widget);
topMargin = 1; // Tweak to resemble the pre-6.6.3 frame
} else {
// Snippet from pre-6.6.3 FusionStyle::drawPrimitive - BEGIN
static const int groupBoxTopMargin = 3;
auto control = dynamic_cast<const QGroupBox *>(widget);
if (!control->isCheckable() && control->title().isEmpty()) {
// Shrinking the topMargin if Not checkable AND title is empty
topMargin = groupBoxTopMargin;
} else {
const int exclusiveIndicatorHeight =
widget->style()->pixelMetric(QStyle::PM_ExclusiveIndicatorHeight);
topMargin = qMax(exclusiveIndicatorHeight,
option->fontMetrics.height()) + groupBoxTopMargin;
}
// Snippet from pre-6.6.3 QFusionStyle::drawPrimitive - END
}
} }
// Snippet from QFusionStyle::drawPrimitive - END
const QRectF frameRectF = QRectF(option->rect).adjusted(0.5, topMargin + 0.5, -0.5, -0.5); const QRectF frameRectF = QRectF(groupBoxFrame).adjusted(0.5, topMargin + 0.5, -0.5, -0.5);
painter->setPen(framePen); painter->setPen(framePen);
if (isEnabled) if (isEnabled)
painter->setOpacity(0.5); painter->setOpacity(0.5);

View File

@@ -373,9 +373,9 @@ QList<std::pair<Core::Section, QList<ExampleItem *>>> getCategories(const QList<
// order "known" categories as wanted, others come afterwards // order "known" categories as wanted, others come afterwards
const int defaultIndex = defaultOrder.indexOf(it->first); const int defaultIndex = defaultOrder.indexOf(it->first);
const int priority = defaultIndex >= 0 ? defaultIndex : (index + defaultOrderSize); const int priority = defaultIndex >= 0 ? defaultIndex : (index + defaultOrderSize);
const std::optional<int> maxRows = restrictRows const std::optional<int> maxRows = restrictRows ? std::make_optional<int>(
? std::make_optional<int>(index == 0 ? 2 : 1) defaultIndex == 0 ? 2 : 1)
: std::nullopt; : std::nullopt;
categories.append({{it->first, priority, maxRows}, it->second}); categories.append({{it->first, priority, maxRows}, it->second});
++index; ++index;
} }

View File

@@ -8,8 +8,6 @@
#include <texteditor/texteditorconstants.h> #include <texteditor/texteditorconstants.h>
#include <texteditor/textdocumentlayout.h> #include <texteditor/textdocumentlayout.h>
#include <KSyntaxHighlighting/Definition>
#include <QObject> #include <QObject>
#include <QTextLayout> #include <QTextLayout>

View File

@@ -4,11 +4,11 @@
source("../../shared/qtcreator.py") source("../../shared/qtcreator.py")
if platform.system() == 'Darwin': if platform.system() == 'Darwin':
keysToType = '<Command+Alt+a>' keysToType = '<Command+Alt+v>'
expectedKeys = 'Cmd+Opt+A' expectedKeys = 'Cmd+Opt+V'
else: else:
keysToType = '<Ctrl+Alt+a>' keysToType = '<Ctrl+Alt+v>'
expectedKeys = 'Ctrl+Alt+A' expectedKeys = 'Ctrl+Alt+V'
# test Qt Creator version information from file and dialog # test Qt Creator version information from file and dialog