Merge "Merge remote-tracking branch 'origin/5.0'"
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2018 The Qt Company Ltd.
|
||||
** Copyright (C) 2021 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the Qt Creator documentation.
|
||||
@@ -58,9 +58,11 @@
|
||||
Furthermore, features such as widget promotion and custom plugins
|
||||
allow you to use your own widgets with \QD.
|
||||
|
||||
\li \l{Best Practices}
|
||||
\li \l{Optimizing Applications for Mobile Devices}
|
||||
|
||||
Apply the best practices to ensure that the UIs you create work
|
||||
efficiently on the intended platforms, such as mobile devices.
|
||||
Before starting application development, analyze and define the
|
||||
requirements, scope, and functionality of the application to ensure
|
||||
efficient functionality and a smooth user experience on mobile
|
||||
devices.
|
||||
\endlist
|
||||
*/
|
||||
|
BIN
doc/qtdesignstudio/images/icons/visibility-off.png
Normal file
After Width: | Height: | Size: 341 B |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 7.4 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 8.9 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 11 KiB |
BIN
doc/qtdesignstudio/images/studio-flow-view-create.png
Normal file
After Width: | Height: | Size: 7.5 KiB |
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 5.0 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 9.6 KiB |
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 57 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 11 KiB |
@@ -96,8 +96,14 @@
|
||||
\uicontrol {Qt Quick Files} > \uicontrol {Flow View}
|
||||
and follow the instructions of the wizard.
|
||||
|
||||
You only need to select the \uicontrol {Use event simulator} check box if
|
||||
you want to add an event simulator to the flow view.
|
||||
\image studio-flow-view-create.png "Create Flow View wizard template"
|
||||
|
||||
You only need to select the \uicontrol {Use Event Simulator} check box if
|
||||
you want to add an event simulator to the flow view. The event simulator
|
||||
needs the project to be imported to the flow view, so you also need
|
||||
to select the \uicontrol {Use Application Import} check box. You need the
|
||||
import also for access to the project \c Constants.qml file that contains
|
||||
global settings for the project.
|
||||
|
||||
The flow view properties enable you to adjust the appearance of all
|
||||
the items in the flow: action areas, transition lines, decisions, and
|
||||
@@ -114,8 +120,9 @@
|
||||
\section1 Flow View Properties
|
||||
|
||||
You can specify basic properties for a \uicontrol {Flow View} component
|
||||
in the \l {Type}{Component}, \l {2D Geometry}{Geometry}, and
|
||||
\l Visibility groups.
|
||||
in the \l {Type}{Component}, \l {2D Geometry}{Geometry - 2D}, and
|
||||
\l Visibility sections in the \l Properties view. Specify flow view
|
||||
properties in the \uicontrol {Flow View} section.
|
||||
|
||||
\image studio-flow-view-properties.png "Flow View component properties"
|
||||
|
||||
@@ -199,14 +206,14 @@
|
||||
\li Drag-and-drop components from \uicontrol Library to a flow
|
||||
item in \l {Form Editor} or \l Navigator.
|
||||
\li Drag a screen from \uicontrol Library > \uicontrol Components
|
||||
\uicontrol {My Components} to a flow item in
|
||||
> \uicontrol {My Components} to a flow item in
|
||||
\uicontrol {Form Editor} or \uicontrol Navigator.
|
||||
\endlist
|
||||
\li In \l Properties, edit the properties of each flow item.
|
||||
\endlist
|
||||
|
||||
You can now drag the flow items from \uicontrol Library > \uicontrol Components
|
||||
\uicontrol {My Components} to the flow view in \uicontrol {Form Editor}
|
||||
> \uicontrol {My Components} to the flow view in \uicontrol {Form Editor}
|
||||
or \uicontrol Navigator. When you have all the flow items in place, you can
|
||||
\l{Adding Action Areas and Transitions}{add action areas} to them to create
|
||||
transitions between them.
|
||||
@@ -214,8 +221,9 @@
|
||||
\section1 Flow Item Properties
|
||||
|
||||
You can specify basic properties for a \uicontrol {Flow Item} component
|
||||
in the \l {Type}{Component}, \l {2D Geometry}{Geometry}, and
|
||||
\l Visibility groups.
|
||||
in the \l {Type}{Component}, \l {2D Geometry}{Geometry - 2D}, and
|
||||
\l Visibility sections in the \uicontrol Properties view. Specify flow item
|
||||
properties in the \uicontrol {Flow Item} section.
|
||||
|
||||
\image studio-flow-item-properties.png "Flow Item properties"
|
||||
|
||||
@@ -226,9 +234,16 @@
|
||||
To include another flow view into a flow view, select the UI file (.ui.qml)
|
||||
that specifies the flow view in the \uicontrol {Loader source} field.
|
||||
|
||||
Usually, a flow item is inactive and invisible when it is not currently
|
||||
selected in the flow. Especially, all events from the flow item are ignored.
|
||||
To make a flow item always active, so that another flow item within it
|
||||
can respond to events and trigger the opening of a dialog, for example,
|
||||
select the \uicontrol {Force active} check box.
|
||||
|
||||
By default, transitions are drawn from action areas to the target flow item.
|
||||
To draw the transitions from the edges of flow items instead, select the
|
||||
\uicontrol {Join lines} check box.
|
||||
\uicontrol {Join lines} check box in the \uicontrol {Transition Lines}
|
||||
section.
|
||||
|
||||
In the \uicontrol Layout tab, you can use \l{Setting Anchors and Margins}
|
||||
{anchors} to position the component.
|
||||
@@ -297,10 +312,8 @@
|
||||
|
||||
You can specify basic properties for \uicontrol {Flow Action Area}
|
||||
and \uicontrol {Flow Transition} components in the \l {Type}{Component},
|
||||
\l {2D Geometry}{Geometry}, and \l Visibility groups.
|
||||
|
||||
You can use the \l{Picking Colors}{color picker} to set line and fill
|
||||
color.
|
||||
\l {2D Geometry}{Geometry - 2D}, and \l Visibility sections in the
|
||||
\uicontrol Properties view.
|
||||
|
||||
In the \uicontrol Layout tab, you can use \l{Setting Anchors and Margins}
|
||||
{anchors} to position the component.
|
||||
@@ -310,9 +323,13 @@
|
||||
|
||||
\section1 Flow Action Area Properties
|
||||
|
||||
In the \uicontrol {Flow Action Area} section, you can use the
|
||||
\l{Picking Colors}{color picker} to set line and fill color.
|
||||
|
||||
\image studio-flow-action-area-properties.png "Flow Action Area properties"
|
||||
|
||||
You can specify some additional properties for action areas:
|
||||
In the \uicontrol {Flow Action} and \uicontrol {Action Area} sections,
|
||||
specify additional properties for action areas:
|
||||
|
||||
\list
|
||||
\li Select the \uicontrol {Go back} check box to specify that the
|
||||
@@ -331,8 +348,8 @@
|
||||
|
||||
\section1 Flow Transition Properties
|
||||
|
||||
You can specify some additional properties for transitions between
|
||||
\l{Adding Flow Items}{flow items}:
|
||||
In the \uicontrol Transition section, specify additional properties for
|
||||
transitions between \l{Adding Flow Items}{flow items}:
|
||||
|
||||
\image studio-flow-transition-properties.png "Flow Transition properties"
|
||||
|
||||
@@ -361,8 +378,8 @@
|
||||
\list
|
||||
\li In the \uicontrol {Line width} field, set the width of the
|
||||
transition line.
|
||||
\li In the \uicontrol {In-offset}, \uicontrol {Out-offset}, and
|
||||
\uicontrol {Break-offset} fields, set the start or end point of a
|
||||
\li In the \uicontrol {Offset} and \uicontrol {Break offset} fields, set
|
||||
the start point (\uicontrol Out) or end point (\uicontrol In) of a
|
||||
transition line or a break to the specified offset. This enables
|
||||
you to move them up and down or left and right.
|
||||
\li Select the \uicontrol {Dashed line} check box to draw a dashed line.
|
||||
@@ -429,7 +446,8 @@
|
||||
\section1 Flow Effect Properties
|
||||
|
||||
You can specify basic properties for a \uicontrol {Flow Effect}
|
||||
component in the \l Type and \l ID fields.
|
||||
component in the \l Type and \l ID fields in the \uicontrol Component
|
||||
section in the \uicontrol Properties view.
|
||||
|
||||
\image studio-flow-effect-properties.png "Flow Effect properties"
|
||||
|
||||
@@ -567,7 +585,7 @@
|
||||
\li Select the flow decision, and then select \uicontrol Connect in the
|
||||
context menu to create connections to the flow items that will open
|
||||
depending on whether the condition is met.
|
||||
\li In \uicontrol Properties, \uicontrol {Dialog title} field, enter a
|
||||
\li In the \l Properties view, \uicontrol {Dialog title} field, enter a
|
||||
title for the selection dialog that opens when the condition is
|
||||
triggered.
|
||||
\li Select a transition line in \uicontrol Navigator or
|
||||
@@ -587,8 +605,10 @@
|
||||
|
||||
\section1 Flow Decision Properties
|
||||
|
||||
You can specify basic properties for a \uicontrol {Flow Decision}
|
||||
component in the \l Type and \l ID fields.
|
||||
You can specify basic properties for a \uicontrol {Flow Decision} component
|
||||
in the \l Type and \l ID fields in the \uicontrol Component section in the
|
||||
\uicontrol Properties view. Specify properties for flow decisions in the
|
||||
\uicontrol {Flow Decision} section.
|
||||
|
||||
\image studio-flow-decision-properties.png "Flow Decision properties"
|
||||
|
||||
@@ -600,8 +620,9 @@
|
||||
:
|
||||
|
||||
\list
|
||||
\li Select the \uicontrol {Show label} check box to display the ID
|
||||
of the \uicontrol {Flow Decision} component in \l {Form Editor}.
|
||||
\li Select \inlineimage icons/visibility-off.png
|
||||
to display the ID of the \uicontrol {Flow Decision}
|
||||
component in \l {Form Editor}.
|
||||
\li In the \uicontrol {Label position} field, select the corner of
|
||||
the flow decision icon to place the label in.
|
||||
\li In the \uicontrol Size field, specify the size of the flow
|
||||
@@ -683,17 +704,22 @@
|
||||
|
||||
\section1 Flow Wildcard Properties
|
||||
|
||||
You can specify basic properties for a \uicontrol {Flow Wildcard}
|
||||
component in the \l Type and \l ID fields.
|
||||
You can specify basic properties for a \uicontrol {Flow Wildcard} component
|
||||
in the \l Type and \l ID fields in the \uicontrol Component section in the
|
||||
\uicontrol Properties view. Specify properties for flow wildcards in the
|
||||
\uicontrol {Flow Wildcard} section.
|
||||
|
||||
\image studio-flow-wildcard-properties.png "Flow Wildcard properties"
|
||||
|
||||
In the \uicontrol {Event IDs} field, specify the IDs of the events to
|
||||
connect to, such as mouse, touch or keyboard events.
|
||||
|
||||
Select the \uicontrol {Global wildcard} check box to enable triggering
|
||||
the wildcard from several flows.
|
||||
|
||||
To give flow items high priority, select them in the
|
||||
\uicontrol {Positive list} field. To block flow items,
|
||||
select them in the \uicontrol {Negative list} field.
|
||||
\uicontrol {Allow list} field. To block flow items,
|
||||
select them in the \uicontrol {Block list} field.
|
||||
|
||||
You can specify the following properties to change the appearance of the
|
||||
wildcard icon \inlineimage icons/flow-wildcard-icon.png
|
||||
|
@@ -1533,4 +1533,9 @@ void NodeInstanceServer::registerFonts(const QUrl &resourceUrl) const
|
||||
QFontDatabase::addApplicationFont(it.next());
|
||||
}
|
||||
|
||||
bool NodeInstanceServer::isInformationServer() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace QmlDesigner
|
||||
|
@@ -216,6 +216,8 @@ public:
|
||||
virtual QImage grabWindow() = 0;
|
||||
virtual QImage grabItem(QQuickItem *item) = 0;
|
||||
|
||||
virtual bool isInformationServer() const;
|
||||
|
||||
public slots:
|
||||
void refreshLocalFileProperty(const QString &path);
|
||||
void refreshDummyData(const QString &path);
|
||||
|
@@ -2085,6 +2085,11 @@ void Qt5InformationNodeInstanceServer::handleInstanceHidden(const ServerNodeInst
|
||||
#endif
|
||||
}
|
||||
|
||||
bool Qt5InformationNodeInstanceServer::isInformationServer() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// update 3D view size when it changes in creator side
|
||||
void Qt5InformationNodeInstanceServer::update3DViewState(const Update3dViewStateCommand &command)
|
||||
{
|
||||
|
@@ -75,6 +75,8 @@ public:
|
||||
void handleInstanceLocked(const ServerNodeInstance &instance, bool enable, bool checkAncestors) override;
|
||||
void handleInstanceHidden(const ServerNodeInstance &instance, bool enable, bool checkAncestors) override;
|
||||
|
||||
bool isInformationServer() const override;
|
||||
|
||||
private slots:
|
||||
void handleSelectionChanged(const QVariant &objs);
|
||||
void handleObjectPropertyCommit(const QVariant &objects, const QVariant &propNames);
|
||||
|
@@ -58,18 +58,15 @@ Qt5NodeInstanceClientProxy::Qt5NodeInstanceClientProxy(QObject *parent) :
|
||||
NodeInstanceClientProxy(parent)
|
||||
{
|
||||
prioritizeDown();
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
const bool qt6 = false;
|
||||
#else
|
||||
const bool qt6 = true;
|
||||
#endif
|
||||
|
||||
const bool unifiedRenderPath = qEnvironmentVariableIsSet("QMLPUPPET_UNIFIED_RENDER_PATH");
|
||||
|
||||
if (unifiedRenderPath)
|
||||
Internal::QuickItemNodeInstance::enableUnifiedRenderPath(true);
|
||||
else if (!qt6)
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
else
|
||||
DesignerSupport::activateDesignerWindowManager();
|
||||
#endif
|
||||
|
||||
if (QCoreApplication::arguments().at(1) == QLatin1String("--readcapturedstream")) {
|
||||
qputenv("DESIGNER_DONT_USE_SHARED_MEMORY", "1");
|
||||
|
@@ -295,6 +295,27 @@ bool QuickItemNodeInstance::unifiedRenderPathOrQt6()
|
||||
#endif
|
||||
}
|
||||
|
||||
void QuickItemNodeInstance::setHiddenInEditor(bool hide)
|
||||
{
|
||||
ObjectNodeInstance::setHiddenInEditor(hide);
|
||||
if (s_unifiedRenderPath && !nodeInstanceServer()->isInformationServer()) {
|
||||
QQmlProperty property(object(), "visible", context());
|
||||
|
||||
if (!property.isValid())
|
||||
return;
|
||||
|
||||
bool visible = property.read().toBool();
|
||||
|
||||
if (hide && visible) {
|
||||
setPropertyVariant("visible", false);
|
||||
m_hidden = true;
|
||||
} else if (!hide && !visible && m_hidden) {
|
||||
setPropertyVariant("visible", true);
|
||||
m_hidden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
QRectF QuickItemNodeInstance::contentItemBoundingBox() const
|
||||
{
|
||||
if (contentItem()) {
|
||||
|
@@ -106,6 +106,8 @@ public:
|
||||
static bool unifiedRenderPath();
|
||||
static bool unifiedRenderPathOrQt6();
|
||||
|
||||
void setHiddenInEditor(bool b) override;
|
||||
|
||||
protected:
|
||||
explicit QuickItemNodeInstance(QQuickItem*);
|
||||
QQuickItem *quickItem() const;
|
||||
@@ -139,6 +141,7 @@ private: //variables
|
||||
double m_y;
|
||||
double m_width;
|
||||
double m_height;
|
||||
bool m_hidden = false;
|
||||
static bool s_createEffectItem;
|
||||
static bool s_unifiedRenderPath;
|
||||
};
|
||||
|
@@ -1134,46 +1134,6 @@ void AndroidConfigurations::registerNewToolChains()
|
||||
registerCustomToolChainsAndDebuggers();
|
||||
}
|
||||
|
||||
void AndroidConfigurations::registerCustomToolChainsAndDebuggers()
|
||||
{
|
||||
const QList<ToolChain *> existingAndroidToolChains = ToolChainManager::toolChains(
|
||||
Utils::equal(&ToolChain::typeId, Id(Constants::ANDROID_TOOLCHAIN_TYPEID)));
|
||||
QList<FilePath> customNdks = Utils::transform(currentConfig().getCustomNdkList(),
|
||||
FilePath::fromString);
|
||||
QList<ToolChain *> customToolchains
|
||||
= AndroidToolChainFactory::autodetectToolChainsFromNdks(existingAndroidToolChains,
|
||||
customNdks,
|
||||
true);
|
||||
for (ToolChain *tc : customToolchains) {
|
||||
ToolChainManager::registerToolChain(tc);
|
||||
|
||||
const FilePath ndk = static_cast<AndroidToolChain *>(tc)->ndkLocation();
|
||||
const FilePath command = AndroidConfigurations::currentConfig()
|
||||
.gdbPathFromNdk(tc->targetAbi(), ndk);
|
||||
|
||||
const Debugger::DebuggerItem *existing = Debugger::DebuggerItemManager::findByCommand(
|
||||
command);
|
||||
QString abiStr
|
||||
= static_cast<AndroidToolChain *>(tc)->platformLinkerFlags().at(1).split('-').first();
|
||||
Abi abi = Abi::abiFromTargetTriplet(abiStr);
|
||||
if (existing && existing->abis().contains(abi))
|
||||
continue;
|
||||
|
||||
Debugger::DebuggerItem debugger;
|
||||
debugger.setCommand(command);
|
||||
debugger.setEngineType(Debugger::GdbEngineType);
|
||||
debugger.setUnexpandedDisplayName(
|
||||
AndroidConfigurations::tr("Custom Android Debugger (%1, NDK %2)")
|
||||
.arg(abiStr,
|
||||
AndroidConfigurations::currentConfig().ndkVersion(ndk).toString()));
|
||||
debugger.setAutoDetected(true);
|
||||
debugger.setAbi(abi);
|
||||
debugger.reinitializeFromFile();
|
||||
|
||||
Debugger::DebuggerItemManager::registerDebugger(debugger);
|
||||
}
|
||||
}
|
||||
|
||||
void AndroidConfigurations::removeOldToolChains()
|
||||
{
|
||||
const auto tcs = ToolChainManager::toolChains(Utils::equal(&ToolChain::typeId,
|
||||
@@ -1186,19 +1146,18 @@ void AndroidConfigurations::removeOldToolChains()
|
||||
|
||||
void AndroidConfigurations::removeUnusedDebuggers()
|
||||
{
|
||||
QVector<FilePath> uniqueNdks;
|
||||
const QList<BaseQtVersion *> qtVersions
|
||||
= QtVersionManager::versions([](const BaseQtVersion *v) {
|
||||
return v->type() == Constants::ANDROIDQT;
|
||||
});
|
||||
|
||||
QVector<FilePath> uniqueNdks;
|
||||
for (const BaseQtVersion *qt : qtVersions) {
|
||||
FilePath ndkLocation = currentConfig().ndkLocation(qt);
|
||||
if (!uniqueNdks.contains(ndkLocation))
|
||||
uniqueNdks.append(ndkLocation);
|
||||
}
|
||||
|
||||
|
||||
uniqueNdks.append(Utils::transform(currentConfig().getCustomNdkList(),
|
||||
FilePath::fromString).toVector());
|
||||
|
||||
@@ -1215,19 +1174,27 @@ void AndroidConfigurations::removeUnusedDebuggers()
|
||||
}
|
||||
}
|
||||
|
||||
if (!isChildOfNdk && debugger.isAutoDetected())
|
||||
const bool isMultiAbiNdkGdb = debugger.command().fileName().startsWith("gdb");
|
||||
const bool hasMultiAbiName = debugger.displayName().contains("Multi-Abi");
|
||||
|
||||
if (debugger.isAutoDetected() && (!isChildOfNdk || (isMultiAbiNdkGdb && !hasMultiAbiName)))
|
||||
Debugger::DebuggerItemManager::deregisterDebugger(debugger.id());
|
||||
}
|
||||
}
|
||||
|
||||
static bool containsAllAbis(const QStringList &abis)
|
||||
static QStringList allSupportedAbis()
|
||||
{
|
||||
QStringList supportedAbis{
|
||||
return QStringList{
|
||||
ProjectExplorer::Constants::ANDROID_ABI_ARMEABI_V7A,
|
||||
ProjectExplorer::Constants::ANDROID_ABI_ARM64_V8A,
|
||||
ProjectExplorer::Constants::ANDROID_ABI_X86,
|
||||
ProjectExplorer::Constants::ANDROID_ABI_X86_64,
|
||||
};
|
||||
}
|
||||
|
||||
static bool containsAllAbis(const QStringList &abis)
|
||||
{
|
||||
QStringList supportedAbis{allSupportedAbis()};
|
||||
for (const QString &abi : abis)
|
||||
if (supportedAbis.contains(abi))
|
||||
supportedAbis.removeOne(abi);
|
||||
@@ -1235,28 +1202,25 @@ static bool containsAllAbis(const QStringList &abis)
|
||||
return supportedAbis.isEmpty();
|
||||
}
|
||||
|
||||
static QString getMultiOrSingleAbiString(const QStringList &abis)
|
||||
{
|
||||
return containsAllAbis(abis) ? "Multi-Abi" : abis.join(",");
|
||||
}
|
||||
|
||||
static QVariant findOrRegisterDebugger(ToolChain *tc,
|
||||
const QStringList &abisList,
|
||||
const BaseQtVersion *qtVersion)
|
||||
bool customDebugger = false)
|
||||
{
|
||||
const FilePath command = AndroidConfigurations::currentConfig().gdbPath(tc->targetAbi(),
|
||||
qtVersion);
|
||||
const auto ¤tConfig = AndroidConfigurations::currentConfig();
|
||||
const FilePath ndk = static_cast<AndroidToolChain *>(tc)->ndkLocation();
|
||||
const FilePath command = currentConfig.gdbPathFromNdk(tc->targetAbi(), ndk);
|
||||
|
||||
// check if the debugger is already registered, but ignoring the display name
|
||||
const Debugger::DebuggerItem *existing = Debugger::DebuggerItemManager::findByCommand(command);
|
||||
|
||||
QList<Abi> abis = Utils::transform(abisList, Abi::abiFromTargetTriplet);
|
||||
|
||||
auto containsAbis = [abis](const Abis &secondAbis) {
|
||||
for (const Abi &abi : secondAbis) {
|
||||
if (!abis.contains(abi))
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
if (existing && existing->engineType() == Debugger::GdbEngineType && existing->isAutoDetected()
|
||||
&& containsAbis(existing->abis())) {
|
||||
// update debugger info with new
|
||||
// Return existing debugger with same command
|
||||
if (existing && existing->engineType() == Debugger::GdbEngineType
|
||||
&& existing->isAutoDetected()) {
|
||||
return existing->id();
|
||||
}
|
||||
|
||||
@@ -1264,16 +1228,39 @@ static QVariant findOrRegisterDebugger(ToolChain *tc,
|
||||
Debugger::DebuggerItem debugger;
|
||||
debugger.setCommand(command);
|
||||
debugger.setEngineType(Debugger::GdbEngineType);
|
||||
debugger.setUnexpandedDisplayName(
|
||||
AndroidConfigurations::tr("Android Debugger (%1, NDK %2)")
|
||||
.arg(containsAllAbis(abisList) ? "Multi-Abi" : abisList.join(","))
|
||||
.arg(AndroidConfigurations::currentConfig().ndkVersion(qtVersion).toString()));
|
||||
|
||||
// NDK 10 and older have multiple gdb versions per ABI, so check for that.
|
||||
const bool oldNdkVersion = currentConfig.ndkVersion(ndk) <= QVersionNumber{11};
|
||||
QString mainName = AndroidConfigurations::tr("Android Debugger (%1, NDK %2)");
|
||||
if (customDebugger)
|
||||
mainName.prepend("Custom ");
|
||||
debugger.setUnexpandedDisplayName(mainName
|
||||
.arg(getMultiOrSingleAbiString(oldNdkVersion ? abisList : allSupportedAbis()))
|
||||
.arg(AndroidConfigurations::currentConfig().ndkVersion(ndk).toString()));
|
||||
debugger.setAutoDetected(true);
|
||||
debugger.setAbis(abis.toVector());
|
||||
debugger.reinitializeFromFile();
|
||||
return Debugger::DebuggerItemManager::registerDebugger(debugger);
|
||||
}
|
||||
|
||||
void AndroidConfigurations::registerCustomToolChainsAndDebuggers()
|
||||
{
|
||||
const QList<ToolChain *> existingAndroidToolChains = ToolChainManager::toolChains(
|
||||
Utils::equal(&ToolChain::typeId, Utils::Id(Constants::ANDROID_TOOLCHAIN_TYPEID)));
|
||||
QList<FilePath> customNdks = Utils::transform(currentConfig().getCustomNdkList(),
|
||||
FilePath::fromString);
|
||||
QList<ToolChain *> customToolchains
|
||||
= AndroidToolChainFactory::autodetectToolChainsFromNdks(existingAndroidToolChains,
|
||||
customNdks,
|
||||
true);
|
||||
for (ToolChain *tc : customToolchains) {
|
||||
ToolChainManager::registerToolChain(tc);
|
||||
const auto androidToolChain = static_cast<AndroidToolChain *>(tc);
|
||||
QString abiStr;
|
||||
if (androidToolChain)
|
||||
abiStr = androidToolChain->platformLinkerFlags().at(1).split('-').first();
|
||||
findOrRegisterDebugger(tc, {abiStr}, true);
|
||||
}
|
||||
}
|
||||
void AndroidConfigurations::updateAutomaticKitList()
|
||||
{
|
||||
for (Kit *k : KitManager::kits()) {
|
||||
@@ -1362,7 +1349,7 @@ void AndroidConfigurations::updateAutomaticKitList()
|
||||
QtKitAspect::setQtVersion(k, qt);
|
||||
DeviceKitAspect::setDevice(k, device);
|
||||
QStringList abis = static_cast<const AndroidQtVersion *>(qt)->androidAbis();
|
||||
Debugger::DebuggerKitAspect::setDebugger(k, findOrRegisterDebugger(tc, abis, QtKitAspect::qtVersion(k)));
|
||||
Debugger::DebuggerKitAspect::setDebugger(k, findOrRegisterDebugger(tc, abis));
|
||||
|
||||
k->setSticky(ToolChainKitAspect::id(), true);
|
||||
k->setSticky(QtKitAspect::id(), true);
|
||||
@@ -1374,7 +1361,7 @@ void AndroidConfigurations::updateAutomaticKitList()
|
||||
versionStr = QString("%1").arg(qt->displayName());
|
||||
k->setUnexpandedDisplayName(tr("Android %1 Clang %2")
|
||||
.arg(versionStr)
|
||||
.arg(containsAllAbis(abis) ? "Multi-Abi" : abis.join(",")));
|
||||
.arg(getMultiOrSingleAbiString(abis)));
|
||||
k->setValueSilently(Constants::ANDROID_KIT_NDK, currentConfig().ndkLocation(qt).toString());
|
||||
k->setValueSilently(Constants::ANDROID_KIT_SDK, currentConfig().sdkLocation().toString());
|
||||
};
|
||||
|
@@ -57,7 +57,7 @@ endif ()
|
||||
option(BUILD_HELPVIEWERBACKEND_QTWEBENGINE "Build QtWebEngine based help viewer backend." ${BUILD_HELPVIEWERBACKEND_QTWEBENGINE_DEFAULT})
|
||||
find_package(Qt5 COMPONENTS WebEngineWidgets QUIET)
|
||||
extend_qtc_plugin(Help
|
||||
CONDITION BUILD_HELVIEWERBACKEND_QTWEBENGINE AND TARGET Qt5::WebEngineWidgets
|
||||
CONDITION BUILD_HELPVIEWERBACKEND_QTWEBENGINE AND TARGET Qt5::WebEngineWidgets
|
||||
FEATURE_INFO "QtWebEngine help viewer"
|
||||
DEPENDS Qt5::WebEngineWidgets
|
||||
DEFINES QTC_WEBENGINE_HELPVIEWER
|
||||
|
@@ -74,6 +74,7 @@ public:
|
||||
quint64 hash() const override;
|
||||
|
||||
const QString &sortText() const;
|
||||
bool hasSortText() const;
|
||||
|
||||
bool operator <(const LanguageClientCompletionItem &other) const;
|
||||
|
||||
@@ -216,6 +217,11 @@ const QString &LanguageClientCompletionItem::sortText() const
|
||||
return m_sortText;
|
||||
}
|
||||
|
||||
bool LanguageClientCompletionItem::hasSortText() const
|
||||
{
|
||||
return m_item.sortText().has_value();
|
||||
}
|
||||
|
||||
QString LanguageClientCompletionItem::filterText() const
|
||||
{
|
||||
if (m_filterText.isEmpty()) {
|
||||
@@ -257,13 +263,21 @@ class LanguageClientCompletionModel : public GenericProposalModel
|
||||
public:
|
||||
// GenericProposalModel interface
|
||||
bool containsDuplicates() const override { return false; }
|
||||
bool isSortable(const QString &/*prefix*/) const override { return true; }
|
||||
bool isSortable(const QString &/*prefix*/) const override;
|
||||
void sort(const QString &/*prefix*/) override;
|
||||
bool supportsPrefixExpansion() const override { return false; }
|
||||
|
||||
QList<AssistProposalItemInterface *> items() const { return m_currentItems; }
|
||||
};
|
||||
|
||||
bool LanguageClientCompletionModel::isSortable(const QString &) const
|
||||
{
|
||||
return Utils::anyOf(items(), [](AssistProposalItemInterface *i) {
|
||||
auto item = dynamic_cast<LanguageClientCompletionItem *>(i);
|
||||
return !item || item->hasSortText();
|
||||
});
|
||||
}
|
||||
|
||||
void LanguageClientCompletionModel::sort(const QString &/*prefix*/)
|
||||
{
|
||||
std::sort(m_currentItems.begin(), m_currentItems.end(),
|
||||
|
@@ -172,9 +172,8 @@ Client *LanguageClientManager::startClient(BaseSettings *setting, ProjectExplore
|
||||
QTC_ASSERT(managerInstance, return nullptr);
|
||||
QTC_ASSERT(setting, return nullptr);
|
||||
QTC_ASSERT(setting->isValid(), return nullptr);
|
||||
Client *client = setting->createClient();
|
||||
Client *client = setting->createClient(project);
|
||||
QTC_ASSERT(client, return nullptr);
|
||||
client->setCurrentProject(project);
|
||||
client->start();
|
||||
managerInstance->m_clientsForSetting[setting->m_id].append(client);
|
||||
return client;
|
||||
|
@@ -557,16 +557,22 @@ bool BaseSettings::isValid() const
|
||||
}
|
||||
|
||||
Client *BaseSettings::createClient()
|
||||
{
|
||||
return createClient(nullptr);
|
||||
}
|
||||
|
||||
Client *BaseSettings::createClient(ProjectExplorer::Project *project)
|
||||
{
|
||||
if (!isValid() || !m_enabled)
|
||||
return nullptr;
|
||||
BaseClientInterface *interface = createInterface();
|
||||
BaseClientInterface *interface = createInterfaceWithProject(project);
|
||||
QTC_ASSERT(interface, return nullptr);
|
||||
auto *client = createClient(interface);
|
||||
client->setName(Utils::globalMacroExpander()->expand(m_name));
|
||||
client->setSupportedLanguage(m_languageFilter);
|
||||
client->setInitializationOptions(initializationOptions());
|
||||
client->setActivateDocumentAutomatically(true);
|
||||
client->setCurrentProject(project);
|
||||
return client;
|
||||
}
|
||||
|
||||
@@ -733,10 +739,12 @@ Utils::CommandLine StdIOSettings::command() const
|
||||
Utils::CommandLine::Raw);
|
||||
}
|
||||
|
||||
BaseClientInterface *StdIOSettings::createInterface() const
|
||||
BaseClientInterface *StdIOSettings::createInterfaceWithProject(ProjectExplorer::Project *project) const
|
||||
{
|
||||
auto interface = new StdIOClientInterface;
|
||||
interface->setCommandLine(command());
|
||||
if (project)
|
||||
interface->setWorkingDirectory(project->projectDirectory().toString());
|
||||
return interface;
|
||||
}
|
||||
|
||||
|
@@ -96,12 +96,18 @@ public:
|
||||
virtual BaseSettings *copy() const { return new BaseSettings(*this); }
|
||||
virtual bool isValid() const;
|
||||
Client *createClient();
|
||||
Client *createClient(ProjectExplorer::Project *project);
|
||||
virtual QVariantMap toMap() const;
|
||||
virtual void fromMap(const QVariantMap &map);
|
||||
|
||||
protected:
|
||||
// TODO: remove in Qt Creator 6 and rename createInterfaceWithProject back to it
|
||||
virtual BaseClientInterface *createInterface() const { return nullptr; }
|
||||
virtual Client *createClient(BaseClientInterface *interface) const;
|
||||
virtual BaseClientInterface *createInterfaceWithProject(ProjectExplorer::Project *) const
|
||||
{
|
||||
return createInterface();
|
||||
}
|
||||
|
||||
BaseSettings(const BaseSettings &other) = default;
|
||||
BaseSettings(BaseSettings &&other) = default;
|
||||
@@ -131,7 +137,7 @@ public:
|
||||
Utils::CommandLine command() const;
|
||||
|
||||
protected:
|
||||
BaseClientInterface *createInterface() const override;
|
||||
BaseClientInterface *createInterfaceWithProject(ProjectExplorer::Project *project) const override;
|
||||
|
||||
StdIOSettings(const StdIOSettings &other) = default;
|
||||
StdIOSettings(StdIOSettings &&other) = default;
|
||||
|
@@ -76,7 +76,11 @@ PerfProfilerTraceView::PerfProfilerTraceView(QWidget *parent, PerfProfilerTool *
|
||||
|
||||
bool PerfProfilerTraceView::isUsable() const
|
||||
{
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
return quickWindow()->rendererInterface()->graphicsApi() == QSGRendererInterface::OpenGL;
|
||||
#else
|
||||
return QSGRendererInterface::isApiRhiBased(quickWindow()->rendererInterface()->graphicsApi());
|
||||
#endif
|
||||
}
|
||||
|
||||
void PerfProfilerTraceView::selectByTypeId(int typeId)
|
||||
|
@@ -35,7 +35,7 @@
|
||||
using namespace Utils;
|
||||
|
||||
// As of MSVC 2015: "foo.cpp(42) :" -> "foo.cpp(42):"
|
||||
static const char FILE_POS_PATTERN[] = "^(?:\\d+>)?(cl|LINK|.+[^ ]) ?: ";
|
||||
static const char FILE_POS_PATTERN[] = "^(?:\\d+>)?(cl|LINK|.+?[^ ]) ?: ";
|
||||
|
||||
static QPair<FilePath, int> parseFileName(const QString &input)
|
||||
{
|
||||
@@ -398,6 +398,24 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data()
|
||||
FilePath::fromUserInput("x:\\src\\plugins\\projectexplorer\\msvcparser.cpp"), 69))
|
||||
<< "";
|
||||
|
||||
QTest::newRow("labeled chained warning")
|
||||
<< "x:\\src\\libs\\narf\\stringutils.cpp(155): warning C4996: "
|
||||
"'std::wstring_convert<std::codecvt_utf8_utf16<wchar_t,1114111,(std::codecvt_mode)0>"
|
||||
",wchar_t,std::allocator<wchar_t>,std::allocator<char>>::from_bytes': "
|
||||
"warning STL4017: std::wbuffer_convert, std::wstring_convert, and the <codecvt> "
|
||||
"header (containing std::codecvt_mode, std::codecvt_utf8, std::codecvt_utf16, and "
|
||||
"std::codecvt_utf8_utf16) are deprecated in C++17. more blabla"
|
||||
<< OutputParserTester::STDOUT
|
||||
<< "" << ""
|
||||
<< (Tasks()
|
||||
<< CompileTask(Task::Warning,
|
||||
"STL4017: std::wbuffer_convert, std::wstring_convert, and the "
|
||||
"<codecvt> header (containing std::codecvt_mode, std::codecvt_utf8, "
|
||||
"std::codecvt_utf16, and std::codecvt_utf8_utf16) are deprecated in "
|
||||
"C++17. more blabla",
|
||||
FilePath::fromUserInput("x:\\src\\libs\\narf\\stringutils.cpp"), 155))
|
||||
<< "";
|
||||
|
||||
QTest::newRow("additional information")
|
||||
<< "x:\\src\\plugins\\texteditor\\icompletioncollector.h(50) : warning C4099: 'TextEditor::CompletionItem' : type name first seen using 'struct' now seen using 'class'\n"
|
||||
" x:\\src\\plugins\\texteditor\\completionsupport.h(39) : see declaration of 'TextEditor::CompletionItem'"
|
||||
|
@@ -850,7 +850,9 @@ static void getExpandedCompilerFlags(QStringList &cFlags, QStringList &cxxFlags,
|
||||
cxxFlags << "/TP";
|
||||
if (!enableRtti.isUndefined())
|
||||
cxxFlags << QLatin1String(enableRtti.toBool() ? "/GR" : "/GR-");
|
||||
if (getCppProp("cxxLanguageVersion").toArray().contains("c++17"))
|
||||
if (getCppProp("cxxLanguageVersion").toArray().contains("c++20"))
|
||||
cxxFlags << "/std:c++20";
|
||||
else if (getCppProp("cxxLanguageVersion").toArray().contains("c++17"))
|
||||
cxxFlags << "/std:c++17";
|
||||
}
|
||||
}
|
||||
|
@@ -226,6 +226,7 @@ public:
|
||||
qint32 internalId() const;
|
||||
|
||||
void setNodeSource(const QString&);
|
||||
void setNodeSource(const QString &newNodeSource, NodeSourceType type);
|
||||
QString nodeSource() const;
|
||||
|
||||
QString convertTypeToImportAlias() const;
|
||||
|
@@ -642,6 +642,9 @@ void NodeInstanceView::nodeSourceChanged(const ModelNode &node, const QString &
|
||||
NodeInstance instance = instanceForModelNode(node);
|
||||
ChangeNodeSourceCommand changeNodeSourceCommand(instance.instanceId(), newNodeSource);
|
||||
m_nodeInstanceServer->changeNodeSource(changeNodeSourceCommand);
|
||||
|
||||
// Puppet doesn't deal with node source changes properly, so just reset the puppet for now
|
||||
delayedRestartProcess(); // TODO: Remove this once the issue is properly fixed (QDS-4955)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1809,22 +1812,24 @@ void NodeInstanceView::updateWatcher(const QString &path)
|
||||
QStringList newFiles;
|
||||
QStringList newDirs;
|
||||
|
||||
const QStringList files = m_fileSystemWatcher->files();
|
||||
const QStringList directories = m_fileSystemWatcher->directories();
|
||||
if (path.isEmpty()) {
|
||||
// Do full update
|
||||
rootPath = QFileInfo(model()->fileUrl().toLocalFile()).absolutePath();
|
||||
m_fileSystemWatcher->removePaths(m_fileSystemWatcher->directories());
|
||||
m_fileSystemWatcher->removePaths(m_fileSystemWatcher->files());
|
||||
if (!directories.isEmpty())
|
||||
m_fileSystemWatcher->removePaths(directories);
|
||||
if (!files.isEmpty())
|
||||
m_fileSystemWatcher->removePaths(files);
|
||||
} else {
|
||||
rootPath = path;
|
||||
const QStringList files = m_fileSystemWatcher->files();
|
||||
const QStringList dirs = m_fileSystemWatcher->directories();
|
||||
for (const auto &file : files) {
|
||||
if (file.startsWith(path))
|
||||
oldFiles.append(file);
|
||||
}
|
||||
for (const auto &dir : dirs) {
|
||||
if (dir.startsWith(path))
|
||||
oldDirs.append(dir);
|
||||
for (const auto &directory : directories) {
|
||||
if (directory.startsWith(path))
|
||||
oldDirs.append(directory);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1278,6 +1278,22 @@ void ModelNode::setNodeSource(const QString &newNodeSource)
|
||||
m_model.data()->d->setNodeSource(internalNode(), newNodeSource);
|
||||
}
|
||||
|
||||
void ModelNode::setNodeSource(const QString &newNodeSource, NodeSourceType type)
|
||||
{
|
||||
Internal::WriteLocker locker(m_model.data());
|
||||
|
||||
if (!isValid()) {
|
||||
Q_ASSERT_X(isValid(), Q_FUNC_INFO, "model node is invalid");
|
||||
throw InvalidModelNodeException(__LINE__, __FUNCTION__, __FILE__);
|
||||
}
|
||||
|
||||
if (internalNode()->nodeSourceType() == type && internalNode()->nodeSource() == newNodeSource)
|
||||
return;
|
||||
|
||||
internalNode()->setNodeSourceType(type); // Set type first as it doesn't trigger any notifies
|
||||
m_model.data()->d->setNodeSource(internalNode(), newNodeSource);
|
||||
}
|
||||
|
||||
QString ModelNode::nodeSource() const
|
||||
{
|
||||
if (!isValid())
|
||||
|
@@ -2086,7 +2086,7 @@ void TextToModelMerger::setupComponent(const ModelNode &node)
|
||||
return; //No object definition found
|
||||
|
||||
if (node.nodeSource() != result)
|
||||
ModelNode(node).setNodeSource(result);
|
||||
ModelNode(node).setNodeSource(result, ModelNode::NodeWithComponentSource);
|
||||
}
|
||||
|
||||
void TextToModelMerger::collectLinkErrors(QList<DocumentMessage> *errors, const ReadingContext &ctxt)
|
||||
@@ -2256,7 +2256,7 @@ void TextToModelMerger::setupCustomParserNode(const ModelNode &node)
|
||||
return;
|
||||
|
||||
if (node.nodeSource() != modelText)
|
||||
ModelNode(node).setNodeSource(modelText);
|
||||
ModelNode(node).setNodeSource(modelText, ModelNode::NodeWithCustomParserSource);
|
||||
|
||||
}
|
||||
|
||||
|
@@ -296,8 +296,12 @@ void QmlProfilerTraceView::showContextMenu(QPoint position)
|
||||
|
||||
bool QmlProfilerTraceView::isUsable() const
|
||||
{
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
return d->m_mainView->quickWindow()->rendererInterface()->graphicsApi()
|
||||
== QSGRendererInterface::OpenGL;
|
||||
#else
|
||||
return QSGRendererInterface::isApiRhiBased(d->m_mainView->quickWindow()->rendererInterface()->graphicsApi());
|
||||
#endif
|
||||
}
|
||||
|
||||
bool QmlProfilerTraceView::isSuspended() const
|
||||
|
@@ -15,6 +15,10 @@ else() # < Qt 6.2
|
||||
DEPENDS Tracing Qt5::QuickWidgets Qt5::Quick Utils
|
||||
)
|
||||
|
||||
if (NOT TARGET tst_tracing_flamegraphview) # qt_add_qml_module has no DEPENDS check
|
||||
return()
|
||||
endif()
|
||||
|
||||
qt_add_qml_module(tst_tracing_flamegraphview
|
||||
URI "QtCreator.TstTracingFlameGraphView"
|
||||
VERSION "1.0"
|
||||
|
@@ -93,7 +93,9 @@ QWidget *shrinkingCrumblePath()
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
#endif // Qt < 6
|
||||
|
||||
QApplication app(argc, argv);
|
||||
|
||||
|
@@ -39,7 +39,9 @@ using namespace Utils;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
#endif // Qt < 6
|
||||
|
||||
QApplication app(argc, argv);
|
||||
|
||||
|
@@ -123,8 +123,10 @@ static QWidget *centralWidget()
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||
#endif // Qt < 6
|
||||
|
||||
QApplication app(argc, argv);
|
||||
|
||||
|
@@ -162,8 +162,10 @@ public:
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||
#endif // Qt < 6
|
||||
|
||||
QApplication app(argc, argv);
|
||||
|
||||
|