Merge remote-tracking branch 'origin/6.0'

Change-Id: I2ae142f02ee184d756932bf594c25addd3c2676c
This commit is contained in:
Eike Ziller
2021-12-02 09:31:03 +01:00
32 changed files with 663 additions and 516 deletions

View File

@@ -32,7 +32,7 @@
/*! /*!
\page creator-quick-tour.html \page creator-quick-tour.html
\if defined(qtdesignstudio) \if defined(qtdesignstudio)
\previouspage {Your First UI} \previouspage {Tutorials}
\else \else
\previouspage creator-overview.html \previouspage creator-overview.html
\endif \endif

View File

@@ -25,7 +25,6 @@
/*! /*!
\example loginui1 \example loginui1
\ingroup studioexamples
\ingroup gstutorials \ingroup gstutorials
\nextpage {Log In UI - Positioning} \nextpage {Log In UI - Positioning}

View File

@@ -25,7 +25,6 @@
/*! /*!
\example loginui2 \example loginui2
\ingroup studioexamples
\ingroup gstutorials \ingroup gstutorials
\previouspage {Log In UI - Components} \previouspage {Log In UI - Components}
\nextpage {Log In UI - States} \nextpage {Log In UI - States}

View File

@@ -25,7 +25,6 @@
/*! /*!
\example loginui3 \example loginui3
\ingroup studioexamples
\ingroup gstutorials \ingroup gstutorials
\title Log In UI - States \title Log In UI - States

View File

@@ -25,7 +25,6 @@
/*! /*!
\example loginui4 \example loginui4
\ingroup studioexamples
\ingroup gstutorials \ingroup gstutorials
\title Log In UI - Timeline \title Log In UI - Timeline
@@ -324,5 +323,5 @@
\section1 Next Steps \section1 Next Steps
For more examples about using timelines, see \l{Examples and Tutorials}. For more examples about using timelines, see \l{Examples}.
*/ */

View File

@@ -26,7 +26,7 @@
/*! /*!
\page quick-uis.html \page quick-uis.html
\if defined(qtdesignstudio) \if defined(qtdesignstudio)
\previouspage {Examples and Tutorials} \previouspage {Examples}
\nextpage studio-app-flows.html \nextpage studio-app-flows.html
\else \else
\previouspage qtquick-text-editor.html \previouspage qtquick-text-editor.html

View File

@@ -27,43 +27,29 @@
\previouspage studio-terms.html \previouspage studio-terms.html
\group studioexamples \group studioexamples
\nextpage quick-uis.html \nextpage quick-uis.html
\title Examples and Tutorials \title Examples
In the \uicontrol Welcome mode, you can open examples and tutorials that \QDS comes with a set of example projects. To see these, select \uicontrol
illustrate how to use \QDS. Some examples are delivered together with Examples on the \uicontrol Welcome page when you run \QDS.
\QDS and have been documented, while you can download and install others
for previewing them on the desktop.
\section1 Video Tutorials
The \uicontrol Tutorials tab contains links to video tutorials that provide
more information about \QDS. To watch a tutorial on YouTube, select it in
the tab.
\include qtbridge-tutorial-links.qdocinc qtsketchbridge tutorials
\section1 Examples for Downloading
The \uicontrol Examples tab lists complex example applications for
downloading that demonstrate what you can accomplish with \QDS.
\image studio-examples-download.png "Examples for download in Welcome mode" \image studio-examples-download.png "Examples for download in Welcome mode"
To download the examples and open them in \QDS: To run an example project:
\list 1 \list 1
\li Select an example. \li Select the example.
\li Select \uicontrol {Start Download} to download the example source
files.
\li Select the folder where the source files will be installed.
\li Select \uicontrol Continue to install the files.
\li Select \uicontrol Open to open the example in \QDS.
\li Select the \inlineimage live_preview.png \li Select the \inlineimage live_preview.png
(\uicontrol {Show Live Preview}) button to preview the example. (\uicontrol {Show Live Preview}) button to preview the example.
\endlist \endlist
\section1 Documented Examples Some of the example projects require that you download them before you can run them, to do this:
\list 1
\li Select an example.
\li Select \uicontrol {Start Download}.
\li Select the folder where the source files will be installed.
\li Select \uicontrol Continue to install the files.
\li Select \uicontrol Open to open the example in \QDS.
\endlist
\section1 Example Documentation
The \uicontrol Examples tab lists documented examples of using \QDS. To
open an example in \QDS, select it in the tab.
*/ */

View File

@@ -34,7 +34,7 @@
grouped by categories. You might also find answers to your questions in the grouped by categories. You might also find answers to your questions in the
product documentation by searching or browsing the index in the product documentation by searching or browsing the index in the
\l{Using the Help Mode}{Help mode}. Many questions are also answered by the \l{Using the Help Mode}{Help mode}. Many questions are also answered by the
\l{Examples and Tutorials}{examples and video tutorials}. \l{Examples}{examples} and \l{Tutorials}{video tutorials}.
\list \list
\li \l {FAQ - \QB}{\QB} \li \l {FAQ - \QB}{\QB}

View File

@@ -47,10 +47,10 @@
\QDS is available either as a standalone installation package or \QDS is available either as a standalone installation package or
as an option in the Qt online installer. as an option in the Qt online installer.
\li \l {Your First UI} \li \l {Tutorials}
Follow a set of hands-on tutorials that build on each other to Follow a set of hands-on tutorials that illustrate how to use the
design your first animated UI using preset and custom components. features of \QDS.
\li \l {User Interface} \li \l {User Interface}
Describes the parts and basic features of \QDS. Describes the parts and basic features of \QDS.
@@ -71,7 +71,7 @@
\li \l{Concepts and Terms} \li \l{Concepts and Terms}
Describes main \QDS concepts and terms. Describes main \QDS concepts and terms.
\li \l{Examples and Tutorials} \li \l{Examples}
A set of examples available in the \uicontrol Welcome mode A set of examples available in the \uicontrol Welcome mode
illustrates how to use \QDS features such as the timeline. illustrates how to use \QDS features such as the timeline.

View File

@@ -26,7 +26,7 @@
/*! /*!
\page studio-installation.html \page studio-installation.html
\previouspage studio-getting-started.html \previouspage studio-getting-started.html
\nextpage {Your First UI} \nextpage {Tutorials}
\title Installation \title Installation
@@ -42,8 +42,8 @@
package \l{https://www.qt.io/product/ui-design-tools}{here}. package \l{https://www.qt.io/product/ui-design-tools}{here}.
After the installation, you can start exploring \QDS by following After the installation, you can start exploring \QDS by following
tutorials to \l{Your First UI}{create your first UI}, opening \l{Tutorials}{tutorials}, opening
\l{Examples and Tutorials}{examples}, watching videos, and reading \l{Examples}{examples}, watching videos, and reading
this manual. this manual.
\section1 Stand-Alone Installation \section1 Stand-Alone Installation

View File

@@ -26,7 +26,7 @@
/*! /*!
\page studio-terms.html \page studio-terms.html
\previouspage studio-use-cases.html \previouspage studio-use-cases.html
\nextpage {Examples and Tutorials} \nextpage {Examples}
\title Concepts and Terms \title Concepts and Terms

View File

@@ -31,7 +31,7 @@
\li \l{Getting Started} \li \l{Getting Started}
\list \list
\li \l{Installation} \li \l{Installation}
\li \l{Your First UI} \li \l{Tutorials}
\li \l{User Interface} \li \l{User Interface}
\list \list
\li \l{Selecting Modes} \li \l{Selecting Modes}
@@ -59,7 +59,7 @@
\li \l{Creating Projects} \li \l{Creating Projects}
\li \l{Use Cases} \li \l{Use Cases}
\li \l{Concepts and Terms} \li \l{Concepts and Terms}
\li \l{Examples and Tutorials} \li \l{Examples}
\endlist \endlist
\li \l{Wireframing} \li \l{Wireframing}
\list \list

View File

@@ -28,14 +28,22 @@
\previouspage studio-installation.html \previouspage studio-installation.html
\nextpage creator-quick-tour.html \nextpage creator-quick-tour.html
\title Your First UI \title Tutorials
\image loginui4.gif "Log In UI" \image loginui4.gif "Log In UI"
You can follow a set of hands-on tutorials that build on each other to \section1 Video Tutorials
When you run \QDS, the \uicontrol Tutorials tab in \uicontrol Welcome mode contains links
to video tutorials. To watch a tutorial on YouTube,
select it.
\section1 Written Tutorials
You can follow a set of hands-on tutorials that
illustrate how to use the features of \QDS. Even if you plan to export your illustrate how to use the features of \QDS. Even if you plan to export your
designs from a design tool, it is useful to first create a small UI from designs from a design tool, it is useful to go through tutorials to learn to
scratch to learn to use \QDS. In particular, \e {Log In UI - Components} use \QDS. In particular, \l {Log In UI - Components}
describes the terms and concepts that you will run into when exporting describes the terms and concepts that you will run into when exporting
designs with \QB. designs with \QB.
@@ -43,8 +51,8 @@
yourself with the parts of \QDS in general, and the \uicontrol Design yourself with the parts of \QDS in general, and the \uicontrol Design
mode in particular: \l{User Interface} and \l{Design Views}. mode in particular: \l{User Interface} and \l{Design Views}.
In addition to these entry-level tutorials, \QDS comes with examples In addition to these tutorials, \QDS comes with examples that you can open
and video tutorials that you can open from the \uicontrol Examples and from the \uicontrol Examples and tabs in the \uicontrol Welcome mode. For more
\uicontrol Tutorials tabs in the \uicontrol Welcome mode. For more information, see \l {Examples}.
information, see \l {Examples and Tutorials}.
*/ */

View File

@@ -48,12 +48,12 @@
\li \b {\l{Getting Started}} \li \b {\l{Getting Started}}
\list \list
\li \l{Installation} \li \l{Installation}
\li \l{Your First UI} \li \l{Tutorials}
\li \l{User Interface} \li \l{User Interface}
\li \l{Creating Projects} \li \l{Creating Projects}
\li \l{Use Cases} \li \l{Use Cases}
\li \l{Concepts and Terms} \li \l{Concepts and Terms}
\li \l{Examples and Tutorials} \li \l{Examples}
\endlist \endlist
\li \b {\l{Wireframing}} \li \b {\l{Wireframing}}
\list \list

View File

@@ -31,8 +31,6 @@ AnimationDriver::AnimationDriver(QObject *parent)
{ {
setProperty("allowNegativeDelta", true); setProperty("allowNegativeDelta", true);
install(); install();
connect(this, SIGNAL(started()), this, SLOT(startTimer()));
connect(this, SIGNAL(stopped()), this, SLOT(stopTimer()));
} }
AnimationDriver::~AnimationDriver() AnimationDriver::~AnimationDriver()
@@ -49,10 +47,13 @@ void AnimationDriver::timerEvent(QTimerEvent *e)
// Provide same time for all users // Provide same time for all users
if (m_seekerEnabled) { if (m_seekerEnabled) {
m_seekerElapsed += (m_seekerPos * 100) / 30; m_seekerElapsed += (m_seekerPos * 100) / 30;
if (m_seekerElapsed + m_elapsed < -100) // -100 to allow small negative value if (m_seekerElapsed + m_elapsed - m_pauseTime < -100) // -100 to allow small negative value
m_seekerElapsed = -m_elapsed - 100; m_seekerElapsed = -(m_elapsed - m_pauseTime) - 100;
} else { } else {
m_elapsed = QAnimationDriver::elapsed(); if (!m_elapsedTimer.isValid())
m_elapsedTimer.restart();
else
m_elapsed = m_elapsedTimer.elapsed();
} }
m_delta = elapsed() - old; m_delta = elapsed() - old;
advance(); advance();
@@ -75,7 +76,7 @@ void AnimationDriver::setSeekerPosition(int position)
return; return;
if (!m_timer.isActive()) if (!m_timer.isActive())
restart(); startTimer();
m_seekerPos = position; m_seekerPos = position;
} }

View File

@@ -27,6 +27,7 @@
#include <qabstractanimation.h> #include <qabstractanimation.h>
#include <QtCore/qbasictimer.h> #include <QtCore/qbasictimer.h>
#include <QtCore/qelapsedtimer.h>
#include <QtCore/qmath.h> #include <QtCore/qmath.h>
class AnimationDriver : public QAnimationDriver class AnimationDriver : public QAnimationDriver
@@ -46,17 +47,34 @@ public:
} }
void reset() void reset()
{ {
stop(); m_elapsedTimer.invalidate();
m_pauseBegin = 0;
m_pauseTime = 0;
m_elapsed = 0;
m_seekerElapsed = 0;
stopTimer(); stopTimer();
} }
void restart() void restart()
{ {
start(); m_pauseTime = 0;
m_elapsed = 0;
m_seekerElapsed = 0;
startTimer();
}
void pause()
{
m_pauseBegin = m_elapsedTimer.elapsed();
stopTimer();
}
void play()
{
if (m_elapsedTimer.isValid())
m_pauseTime += m_elapsedTimer.elapsed() - m_pauseBegin;
startTimer(); startTimer();
} }
qint64 elapsed() const override qint64 elapsed() const override
{ {
return m_elapsed + m_seekerElapsed; return m_elapsed + m_seekerElapsed - m_pauseTime;
} }
void setSeekerPosition(int position); void setSeekerPosition(int position);
void setSeekerEnabled(bool enable) void setSeekerEnabled(bool enable)
@@ -79,10 +97,13 @@ private:
Q_SLOT void stopTimer(); Q_SLOT void stopTimer();
QBasicTimer m_timer; QBasicTimer m_timer;
QElapsedTimer m_elapsedTimer;
int m_interval = 16; int m_interval = 16;
int m_seekerPos = 0; int m_seekerPos = 0;
bool m_seekerEnabled = false; bool m_seekerEnabled = false;
qint64 m_elapsed = 0; qint64 m_elapsed = 0;
qint64 m_seekerElapsed = 0; qint64 m_seekerElapsed = 0;
qint64 m_delta = 0; qint64 m_delta = 0;
qint64 m_pauseTime = 0;
qint64 m_pauseBegin = 0;
}; };

View File

@@ -2078,21 +2078,21 @@ void Qt5InformationNodeInstanceServer::view3DAction(const View3DActionCommand &c
m_particleAnimationPlaying = command.isEnabled(); m_particleAnimationPlaying = command.isEnabled();
updatedState.insert("particlePlay", command.isEnabled()); updatedState.insert("particlePlay", command.isEnabled());
if (m_particleAnimationPlaying) { if (m_particleAnimationPlaying) {
m_particleAnimationDriver->reset(); m_particleAnimationDriver->play();
m_particleAnimationDriver->restart();
m_particleAnimationDriver->setSeekerEnabled(false); m_particleAnimationDriver->setSeekerEnabled(false);
m_particleAnimationDriver->setSeekerPosition(0); m_particleAnimationDriver->setSeekerPosition(0);
} else { } else {
m_particleAnimationDriver->reset(); m_particleAnimationDriver->pause();
m_particleAnimationDriver->setSeekerEnabled(true); m_particleAnimationDriver->setSeekerEnabled(true);
} }
break; break;
case View3DActionCommand::ParticlesRestart: case View3DActionCommand::ParticlesRestart:
resetParticleSystem(); resetParticleSystem();
m_particleAnimationPlaying = true; if (m_particleAnimationPlaying) {
m_particleAnimationDriver->restart(); m_particleAnimationDriver->restart();
m_particleAnimationDriver->setSeekerEnabled(false); m_particleAnimationDriver->setSeekerEnabled(false);
m_particleAnimationDriver->setSeekerPosition(0); m_particleAnimationDriver->setSeekerPosition(0);
}
break; break;
case View3DActionCommand::ParticlesSeek: case View3DActionCommand::ParticlesSeek:
m_particleAnimationDriver->setSeekerPosition(static_cast<const View3DSeekActionCommand &>(command).position()); m_particleAnimationDriver->setSeekerPosition(static_cast<const View3DSeekActionCommand &>(command).position());

View File

@@ -61,6 +61,10 @@
#include <private/qqmlmetatype_p.h> #include <private/qqmlmetatype_p.h>
#include <private/qqmltimer_p.h> #include <private/qqmltimer_p.h>
#ifdef QUICK3D_MODULE
#include <private/qquick3dobject_p.h>
#endif
namespace QmlDesigner { namespace QmlDesigner {
namespace Internal { namespace Internal {
@@ -374,6 +378,11 @@ void doComponentCompleteRecursive(QObject *object, NodeInstanceServer *nodeInsta
if (item && DesignerSupport::isComponentComplete(item)) if (item && DesignerSupport::isComponentComplete(item))
return; return;
#ifdef QUICK3D_MODULE
auto obj3d = qobject_cast<QQuick3DObject *>(object);
if (obj3d && QQuick3DObjectPrivate::get(obj3d)->componentComplete)
return;
#endif
if (!nodeInstanceServer->hasInstanceForObject(item)) if (!nodeInstanceServer->hasInstanceForObject(item))
emitComponentComplete(object); emitComponentComplete(object);

View File

@@ -34,6 +34,7 @@ import StudioControls as SC
import NewProjectDialog import NewProjectDialog
Item { Item {
id: rootDialog
width: DialogValues.dialogWidth width: DialogValues.dialogWidth
height: DialogValues.dialogHeight height: DialogValues.dialogHeight
@@ -47,38 +48,53 @@ Item {
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
spacing: 0 spacing: 0
Item { width: parent.width; height: 20 } // spacer
Item { // Header Item Item { // Header Item
Layout.fillWidth: true Layout.fillWidth: true
implicitHeight: 218 implicitHeight: 164
Column { ColumnLayout {
anchors.fill: parent anchors.fill: parent
Item { width: parent.width; height: 74 } // spacer Item { width: parent.width; implicitHeight: 20 } // spacer
Row {
Text {
text: qsTr("Welcome to Qt Design Studio. Let's Create Something Wonderful!")
font.pixelSize: 32
width: parent.width width: parent.width
height: 47 height: DialogValues.dialogTitleTextHeight
lineHeight: 49 Layout.alignment: Qt.AlignHCenter
Text {
text: qsTr("Welcome to ")
font.pixelSize: DialogValues.dialogTitlePixelSize
font.family: "Titillium Web"
height: DialogValues.dialogTitleTextHeight
lineHeight: DialogValues.dialogTitleLineHeight
lineHeightMode: Text.FixedHeight lineHeightMode: Text.FixedHeight
color: DialogValues.textColor color: DialogValues.textColor
horizontalAlignment: Text.AlignHCenter
} }
Item { width: parent.width; height: 11 } // spacer Text {
text: qsTr("Qt Design Studio")
font.pixelSize: DialogValues.dialogTitlePixelSize
font.family: "Titillium Web"
height: DialogValues.dialogTitleTextHeight
lineHeight: DialogValues.dialogTitleLineHeight
lineHeightMode: Text.FixedHeight
color: DialogValues.textColorInteraction
}
}
Text { Text {
width: parent.width width: parent.width
text: qsTr("Get started by selecting from Presets or start from empty screen. You may also include your design file.") text: qsTr("Create new project by selecting a suitable Preset and then adjust details.")
color: DialogValues.textColor color: DialogValues.textColor
font.pixelSize: DialogValues.paneTitlePixelSize font.pixelSize: DialogValues.paneTitlePixelSize
lineHeight: DialogValues.paneTitleLineHeight lineHeight: DialogValues.paneTitleLineHeight
lineHeightMode: Text.FixedHeight lineHeightMode: Text.FixedHeight
horizontalAlignment: Text.AlignHCenter Layout.alignment: Qt.AlignHCenter
}
} }
Item { width: parent.width; Layout.fillHeight: true} // spacer
} // ColumnLayout
} // Header Item } // Header Item
Item { // Content Item Item { // Content Item
@@ -96,7 +112,7 @@ Item {
Layout.fillWidth: true Layout.fillWidth: true
Layout.fillHeight: true Layout.fillHeight: true
Layout.minimumWidth: 379 // figured out this number visually Layout.minimumWidth: 379 // figured out this number visually
Layout.minimumHeight: 326 // figured out this number visually Layout.minimumHeight: 261 // figured out this number visually
Column { Column {
x: DialogValues.defaultPadding // left padding x: DialogValues.defaultPadding // left padding
@@ -106,19 +122,86 @@ Item {
Text { Text {
text: qsTr("Presets") text: qsTr("Presets")
width: parent.width width: parent.width
height: 47
font.weight: Font.DemiBold font.weight: Font.DemiBold
font.pixelSize: DialogValues.paneTitlePixelSize font.pixelSize: DialogValues.paneTitlePixelSize
lineHeight: DialogValues.paneTitleLineHeight lineHeight: DialogValues.paneTitleLineHeight
lineHeightMode: Text.FixedHeight lineHeightMode: Text.FixedHeight
color: DialogValues.textColor color: DialogValues.textColor
verticalAlignment: Qt.AlignVCenter
} }
Rectangle { // TabBar
readonly property int animDur: 500
id: samTabRect
x: 10 // left padding
width: parent.width - 64 // right padding
height: DialogValues.projectViewHeaderHeight
color: DialogValues.lightPaneColor
Row {
id: tabBarRow
spacing: 20
property int currIndex: 0
Repeater {
model: categoryModel
Text {
text: name
font.weight: Font.DemiBold
font.pixelSize: DialogValues.viewHeaderPixelSize
verticalAlignment: Text.AlignVCenter
color: tabBarRow.currIndex === index ? DialogValues.textColorInteraction
: DialogValues.textColor
Behavior on color { ColorAnimation { duration: samTabRect.animDur } }
MouseArea {
anchors.fill: parent
onClicked: {
tabBarRow.currIndex = index
projectModel.setPage(index)
projectViewId.currentIndex = 0
projectViewId.currentIndexChanged()
strip.x = parent.x
strip.width = parent.width
}
}
} // Text
} // Repeater
} // tabBarRow
Rectangle {
id: strip
width: tabBarRow.children[0].width
height: 5
radius: 2
color: DialogValues.textColorInteraction
anchors.bottom: parent.bottom
Behavior on x { SmoothedAnimation { duration: samTabRect.animDur } }
Behavior on width { SmoothedAnimation { duration: strip.width === 0 ? 0 : samTabRect.animDur } } // do not animate initial width
}
} // Rectangle
NewProjectView { NewProjectView {
id: projectViewId id: projectViewId
x: 10 // left padding x: 10 // left padding
width: parent.width - 64 // right padding width: parent.width - 64 // right padding
height: DialogValues.projectViewHeight height: DialogValues.projectViewHeight
loader: projectDetailsLoader loader: projectDetailsLoader
Connections {
target: rootDialog
function onHeightChanged() {
if (rootDialog.height < 700) { // 700 = minimum height big dialog
projectViewId.height = DialogValues.projectViewHeight / 2
} else {
projectViewId.height = DialogValues.projectViewHeight
}
}
}
} }
Item { height: 5; width: parent.width } Item { height: 5; width: parent.width }
@@ -158,6 +241,15 @@ Item {
Item { Layout.fillWidth: true } Item { Layout.fillWidth: true }
Item { // Dialog Button Box
width: DialogValues.stylesPaneWidth
height: parent.height
RowLayout {
width: DialogValues.stylesPaneWidth
implicitWidth: DialogValues.stylesPaneWidth
implicitHeight: parent.height
SC.AbstractButton { SC.AbstractButton {
implicitWidth: DialogValues.dialogButtonWidth implicitWidth: DialogValues.dialogButtonWidth
width: DialogValues.dialogButtonWidth width: DialogValues.dialogButtonWidth
@@ -171,6 +263,8 @@ Item {
} }
} }
Item { Layout.fillWidth: true }
SC.AbstractButton { SC.AbstractButton {
implicitWidth: DialogValues.dialogButtonWidth implicitWidth: DialogValues.dialogButtonWidth
width: DialogValues.dialogButtonWidth width: DialogValues.dialogButtonWidth
@@ -184,6 +278,9 @@ Item {
dialogBox.accept(); dialogBox.accept();
} }
} }
} // RowLayout
} // Dialog Button Box
Item { implicitWidth: 35 - DialogValues.defaultPadding } Item { implicitWidth: 35 - DialogValues.defaultPadding }
} // RowLayout } // RowLayout
} // Footer } // Footer

View File

@@ -49,21 +49,68 @@ Item {
Item { Item {
x: DialogValues.detailsPanePadding // left padding x: DialogValues.detailsPanePadding // left padding
width: parent.width - DialogValues.detailsPanePadding * 2 // right padding width: parent.width - DialogValues.detailsPanePadding * 2 // right padding
height: parent.height
Column { Column {
anchors.fill: parent anchors.fill: parent
spacing: DialogValues.defaultPadding spacing: DialogValues.defaultPadding
Text { Text {
id: detailsHeading
text: qsTr("Details") text: qsTr("Details")
height: DialogValues.dialogTitleTextHeight
width: parent.width; width: parent.width;
font.weight: Font.DemiBold font.weight: Font.DemiBold
font.pixelSize: DialogValues.paneTitlePixelSize font.pixelSize: DialogValues.paneTitlePixelSize
lineHeight: DialogValues.paneTitleLineHeight lineHeight: DialogValues.paneTitleLineHeight
lineHeightMode: Text.FixedHeight lineHeightMode: Text.FixedHeight
color: DialogValues.textColor color: DialogValues.textColor
verticalAlignment: Qt.AlignVCenter
} }
Flickable {
width: parent.width
height: parent.height - detailsHeading.height - DialogValues.defaultPadding
contentWidth: parent.width
contentHeight: scrollContent.height
boundsBehavior: Flickable.StopAtBounds
clip: true
ScrollBar.vertical: ScrollBar {
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
implicitContentWidth + leftPadding + rightPadding)
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
implicitContentHeight + topPadding + bottomPadding)
property bool scrollBarVisible: parent.childrenRect.height > parent.height
minimumSize: orientation == Qt.Horizontal ? height / width : width / height
orientation: Qt.Vertical
policy: scrollBarVisible ? ScrollBar.AlwaysOn : ScrollBar.AlwaysOff
x: parent.width - width
y: 0
height: parent.availableHeight
- (parent.bothVisible ? parent.horizontalThickness : 0)
padding: 0
background: Rectangle {
color: StudioTheme.Values.themeScrollBarTrack
}
contentItem: Rectangle {
implicitWidth: StudioTheme.Values.scrollBarThickness
color: StudioTheme.Values.themeScrollBarHandle
}
} // ScrollBar
Column {
id: scrollContent
width: parent.width - DialogValues.detailsPanePadding
height: DialogValues.detailsScrollableContentHeight
spacing: DialogValues.defaultPadding
SC.TextField { SC.TextField {
id: projectNameTextField id: projectNameTextField
actionIndicatorVisible: false actionIndicatorVisible: false
@@ -77,7 +124,7 @@ Item {
text = text.charAt(0).toUpperCase() + text.slice(1) text = text.charAt(0).toUpperCase() + text.slice(1)
} }
font.pixelSize: DialogValues.paneTitlePixelSize font.pixelSize: DialogValues.defaultPixelSize
} }
Binding { Binding {
@@ -382,26 +429,6 @@ Item {
Rectangle { width: parent.width; height: 1; color: DialogValues.dividerlineColor } Rectangle { width: parent.width; height: 1; color: DialogValues.dividerlineColor }
SC.Section {
width: parent.width
caption: qsTr("Advanced")
captionPixelSize: DialogValues.defaultPixelSize
captionColor: DialogValues.darkPaneColor
captionTextColor: DialogValues.textColor
leftPadding: 0
expanded: true
visible: dialogBox.haveVirtualKeyboard || dialogBox.haveTargetQtVersion
Column {
spacing: DialogValues.defaultPadding
width: parent.width
/* We need a spacer of -10 in order to have actual 18px spacing between
* section bottom and the checkbox. Otherwise, with Column spacing set to
* 18, without a spacer, the default space to the first item would be 10,
* for some reason. */
Item { width: parent.width; height: -10 }
SC.CheckBox { SC.CheckBox {
id: useQtVirtualKeyboard id: useQtVirtualKeyboard
actionIndicatorVisible: false actionIndicatorVisible: false
@@ -440,22 +467,19 @@ Item {
} }
} }
width: parent.width
onActivated: (index) => { onActivated: (index) => {
dialogBox.setTargetQtVersion(index) dialogBox.setTargetQtVersion(index)
} }
} // Target Qt Version ComboBox } // Target Qt Version ComboBox
} // RowLayout } // RowLayout
} // Column
} // SC.Section
Binding { Binding {
target: dialogBox target: dialogBox
property: "useVirtualKeyboard" property: "useVirtualKeyboard"
value: useQtVirtualKeyboard.checked value: useQtVirtualKeyboard.checked
} }
} // ScrollContent Column
} // ScrollView
} // Column } // Column
} // Item } // Item

View File

@@ -30,12 +30,16 @@ import StudioTheme as StudioTheme
QtObject { QtObject {
readonly property int dialogWidth: 1522 readonly property int dialogWidth: 1522
readonly property int dialogHeight: 994 readonly property int dialogHeight: 940
readonly property int projectViewMinimumWidth: 600 readonly property int projectViewMinimumWidth: 600
readonly property int projectViewMinimumHeight: projectViewHeight readonly property int projectViewMinimumHeight: projectViewHeight
readonly property int dialogContentHeight: projectViewHeight + 300 // i.e. dialog without header and footer readonly property int dialogContentHeight: projectViewHeight + 300 // i.e. dialog without header and footer
readonly property int loadedPanesWidth: detailsPaneWidth + stylesPaneWidth readonly property int loadedPanesWidth: detailsPaneWidth + stylesPaneWidth
readonly property int detailsPaneWidth: 330 + detailsPanePadding * 2 readonly property int detailsPaneWidth: 330 + detailsPanePadding * 2// + 10 // 50
readonly property int dialogTitleTextHeight: 47
/* detailsScrollableContentHeight - the full height that may need to be scrolled to be fully
visible, if the dialog box is too small. */
readonly property int detailsScrollableContentHeight: 428
readonly property int stylesPaneWidth: styleImageWidth + stylesPanePadding * 2 + styleImageBorderWidth * 2 // i.e. 240px readonly property int stylesPaneWidth: styleImageWidth + stylesPanePadding * 2 + styleImageBorderWidth * 2 // i.e. 240px
readonly property int detailsPanePadding: 18 readonly property int detailsPanePadding: 18
readonly property int stylesPanePadding: 18 readonly property int stylesPanePadding: 18
@@ -44,9 +48,9 @@ QtObject {
readonly property int styleImageWidth: 200 readonly property int styleImageWidth: 200
readonly property int styleImageBorderWidth: 2 readonly property int styleImageBorderWidth: 2
readonly property int footerHeight: 73 readonly property int footerHeight: 73
readonly property int projectItemWidth: 144 readonly property int projectItemWidth: 90
readonly property int projectItemHeight: 144 readonly property int projectItemHeight: 144
readonly property int projectViewHeight: projectItemHeight * 2 + projectViewHeaderHeight readonly property int projectViewHeight: projectItemHeight * 2
readonly property int projectViewHeaderHeight: 38 readonly property int projectViewHeaderHeight: 38
readonly property int dialogButtonWidth: 100 readonly property int dialogButtonWidth: 100
@@ -69,6 +73,8 @@ QtObject {
readonly property real viewHeaderLineHeight: 24 readonly property real viewHeaderLineHeight: 24
readonly property real paneTitlePixelSize: 18 readonly property real paneTitlePixelSize: 18
readonly property real paneTitleLineHeight: 27 readonly property real paneTitleLineHeight: 27
readonly property int dialogTitlePixelSize: 32
readonly property int dialogTitleLineHeight: 49
// for a spacer item // for a spacer item
function narrowSpacing(value, layoutSpacing = DialogValues.defaultPadding) { function narrowSpacing(value, layoutSpacing = DialogValues.defaultPadding) {

View File

@@ -35,61 +35,9 @@ GridView {
required property Item loader required property Item loader
readonly property int animDur: 500
header: Rectangle {
width: parent.width
height: DialogValues.projectViewHeaderHeight
color: DialogValues.lightPaneColor
Row {
id: row
spacing: 20
property int currIndex: 0
Repeater {
model: categoryModel
Text {
text: name
font.weight: Font.DemiBold
font.pixelSize: DialogValues.viewHeaderPixelSize
verticalAlignment: Text.AlignVCenter
color: row.currIndex === index ? DialogValues.textColorInteraction
: DialogValues.textColor
Behavior on color { ColorAnimation { duration: animDur } }
MouseArea {
anchors.fill: parent
onClicked: {
row.currIndex = index
projectModel.setPage(index)
projectView.currentIndex = 0
projectView.currentIndexChanged()
strip.x = parent.x
strip.width = parent.width
}
}
} // Text
} // Repeater
} // Row
Rectangle {
id: strip
width: row.children[0].width
height: 5
radius: 2
color: DialogValues.textColorInteraction
anchors.bottom: parent.bottom
Behavior on x { SmoothedAnimation { duration: animDur } }
Behavior on width { SmoothedAnimation { duration: strip.width === 0 ? 0 : animDur } } // do not animate initial width
}
} // Rectangle
cellWidth: DialogValues.projectItemWidth cellWidth: DialogValues.projectItemWidth
cellHeight: DialogValues.projectItemHeight cellHeight: DialogValues.projectItemHeight
clip: true
boundsBehavior: Flickable.StopAtBounds boundsBehavior: Flickable.StopAtBounds

View File

@@ -65,12 +65,13 @@ Item {
Text { Text {
id: styleTitleText id: styleTitleText
text: qsTr("Style") text: qsTr("Style")
width: parent.width; Layout.minimumHeight: DialogValues.dialogTitleTextHeight
font.weight: Font.DemiBold font.weight: Font.DemiBold
font.pixelSize: DialogValues.paneTitlePixelSize font.pixelSize: DialogValues.paneTitlePixelSize
lineHeight: DialogValues.paneTitleLineHeight lineHeight: DialogValues.paneTitleLineHeight
lineHeightMode: Text.FixedHeight lineHeightMode: Text.FixedHeight
color: DialogValues.textColor color: DialogValues.textColor
verticalAlignment: Qt.AlignVCenter
function refresh() { function refresh() {
text = qsTr("Style") + " (" + styleModel.rowCount() + ")" text = qsTr("Style") + " (" + styleModel.rowCount() + ")"

View File

@@ -203,13 +203,15 @@ T.ComboBox {
| T.Popup.CloseOnReleaseOutsideParent | T.Popup.CloseOnReleaseOutsideParent
contentItem: ListView { contentItem: ListView {
id: listView
clip: true clip: true
implicitHeight: contentHeight implicitHeight: listView.contentHeight
model: myComboBox.popup.visible ? myComboBox.delegateModel : null model: myComboBox.popup.visible ? myComboBox.delegateModel : null
currentIndex: myComboBox.highlightedIndex currentIndex: myComboBox.highlightedIndex
boundsBehavior: Flickable.StopAtBounds boundsBehavior: Flickable.StopAtBounds
ScrollBar.vertical: ScrollBar { ScrollBar.vertical: ScrollBar {
id: comboBoxPopupScrollBar id: comboBoxPopupScrollBar
visible: listView.height < listView.contentHeight
} }
} }

View File

@@ -805,6 +805,13 @@ static bool isDocker(const Kit *k)
return DeviceTypeKitAspect::deviceTypeId(k) == Docker::Constants::DOCKER_DEVICE_TYPE; return DeviceTypeKitAspect::deviceTypeId(k) == Docker::Constants::DOCKER_DEVICE_TYPE;
} }
static bool isWindowsARM64(const Kit *k)
{
const auto targetAbi = ToolChainKitAspect::cxxToolChain(k)->targetAbi();
return targetAbi.os() == Abi::WindowsOS && targetAbi.architecture() == Abi::ArmArchitecture
&& targetAbi.wordWidth() == 64;
}
static QStringList defaultInitialCMakeArguments(const Kit *k, const QString buildType) static QStringList defaultInitialCMakeArguments(const Kit *k, const QString buildType)
{ {
// Generator: // Generator:
@@ -991,7 +998,7 @@ CMakeBuildConfiguration::CMakeBuildConfiguration(Target *target, Id id)
initialArgs.append("%{" + QLatin1String(CMAKE_OSX_ARCHITECTURES_FLAG) + "}"); initialArgs.append("%{" + QLatin1String(CMAKE_OSX_ARCHITECTURES_FLAG) + "}");
} }
if (isWebAssembly(k) || isQnx(k)) { if (isWebAssembly(k) || isQnx(k) || isWindowsARM64(k)) {
const QtSupport::BaseQtVersion *qt = QtSupport::QtKitAspect::qtVersion(k); const QtSupport::BaseQtVersion *qt = QtSupport::QtKitAspect::qtVersion(k);
if (qt && qt->qtVersion().majorVersion >= 6) if (qt && qt->qtVersion().majorVersion >= 6)
initialArgs.append(CMAKE_QT6_TOOLCHAIN_FILE_ARG); initialArgs.append(CMAKE_QT6_TOOLCHAIN_FILE_ARG);

View File

@@ -40,12 +40,15 @@ static const QHash<QString, QString> &envVarToCMakeVarMapping()
{"STM32Cube_FW_F4_SDK_PATH","QUL_BOARD_SDK_DIR"}, {"STM32Cube_FW_F4_SDK_PATH","QUL_BOARD_SDK_DIR"},
{"STM32Cube_FW_L4_SDK_PATH","QUL_BOARD_SDK_DIR"}, {"STM32Cube_FW_L4_SDK_PATH","QUL_BOARD_SDK_DIR"},
{"STM32Cube_FW_H7_SDK_PATH","QUL_BOARD_SDK_DIR"}, {"STM32Cube_FW_H7_SDK_PATH","QUL_BOARD_SDK_DIR"},
{"RGL_DIR", "QUL_BOARD_SDK_DIR"},
{"TVII_GRAPHICS_DRIVER_DIR", "QUL_BOARD_SDK_DIR"},
{"EK_RA6M3G_FSP_PATH", "QUL_BOARD_SDK_DIR"},
{"ARMGCC_DIR", "QUL_TARGET_TOOLCHAIN_DIR"}, {"ARMGCC_DIR", "QUL_TARGET_TOOLCHAIN_DIR"},
{"IAR_ARM_COMPILER_DIR", "QUL_TARGET_TOOLCHAIN_DIR"}, {"IAR_ARM_COMPILER_DIR", "QUL_TARGET_TOOLCHAIN_DIR"},
{"GHS_COMPILER_DIR", "QUL_TARGET_TOOLCHAIN_DIR"}, {"GHS_COMPILER_DIR", "QUL_TARGET_TOOLCHAIN_DIR"},
{"GHS_ARM_COMPILER_DIR", "QUL_TARGET_TOOLCHAIN_DIR"}, {"GHS_ARM_COMPILER_DIR", "QUL_TARGET_TOOLCHAIN_DIR"},
{"EVK_MIMXRT1170_FREERTOS_PATH","FREERTOS_DIR"}, {"EVK_MIMXRT1170_FREERTOS_PATH","FREERTOS_DIR"},
{"EVK_MIMXRT1170_FREERTOS_PATH","FREERTOS_DIR"}, {"IMXRT1050_FREERTOS_DIR","FREERTOS_DIR"},
{"IMXRT1064_FREERTOS_DIR","FREERTOS_DIR"}, {"IMXRT1064_FREERTOS_DIR","FREERTOS_DIR"},
{"IMXRT595_FREERTOS_DIR","FREERTOS_DIR"}, {"IMXRT595_FREERTOS_DIR","FREERTOS_DIR"},
{"STM32F7_FREERTOS_DIR", "FREERTOS_DIR"}, {"STM32F7_FREERTOS_DIR", "FREERTOS_DIR"},
@@ -53,10 +56,8 @@ static const QHash<QString, QString> &envVarToCMakeVarMapping()
{"RenesasFlashProgrammer_PATH", "RENESAS_FLASH_PROGRAMMER_PATH"}, {"RenesasFlashProgrammer_PATH", "RENESAS_FLASH_PROGRAMMER_PATH"},
{"MCUXpressoIDE_PATH", "MCUXPRESSO_IDE_PATH"}, {"MCUXpressoIDE_PATH", "MCUXPRESSO_IDE_PATH"},
{"JLINK_PATH", "JLINK_PATH"}, {"JLINK_PATH", "JLINK_PATH"},
{"TVII_GRAPHICS_DRIVER_DIR", "TVII_GRAPHICS_DRIVER_DIR"},
{"CYPRESS_AUTO_FLASH_UTILITY_DIR", "CYPRESS_AUTO_FLASH_UTILITY_DIR"}, {"CYPRESS_AUTO_FLASH_UTILITY_DIR", "CYPRESS_AUTO_FLASH_UTILITY_DIR"},
{"EK_RA6M3G_E2_PROJECT_PATH", "EK_RA6M3G_E2_PROJECT_PATH"}, {"EK_RA6M3G_E2_PROJECT_PATH", "EK_RA6M3G_E2_PROJECT_PATH"},
{"EK_RA6M3G_FSP_PATH", "EK_RA6M3G_FSP_PATH"},
}; };
return mapping; return mapping;
} }

View File

@@ -497,8 +497,27 @@ QVariant McuToolChainPackage::debuggerId() const
{ {
using namespace Debugger; using namespace Debugger;
QString sub = QString::fromLatin1(m_type == TypeArmGcc ? "bin/arm-none-eabi-gdb-py" QString sub, displayName;
: m_type == TypeIAR ? "../common/bin/CSpyBat" : "bar/foo-keil-gdb"); DebuggerEngineType engineType;
switch (m_type) {
case TypeArmGcc: {
sub = QString::fromLatin1("bin/arm-none-eabi-gdb-py");
displayName = McuPackage::tr("Arm GDB at %1");
engineType = Debugger::GdbEngineType;
break; }
case TypeIAR: {
sub = QString::fromLatin1("../common/bin/CSpyBat");
displayName = QLatin1String("CSpy");
engineType = Debugger::NoEngineType; // support for IAR missing
break; }
case TypeKEIL: {
sub = QString::fromLatin1("UV4/UV4");
displayName = QLatin1String("KEIL uVision Debugger");
engineType = Debugger::UvscEngineType;
break; }
default: return QVariant();
}
const FilePath command = path().pathAppended(sub).withExecutableSuffix(); const FilePath command = path().pathAppended(sub).withExecutableSuffix();
const DebuggerItem *debugger = DebuggerItemManager::findByCommand(command); const DebuggerItem *debugger = DebuggerItemManager::findByCommand(command);
@@ -506,11 +525,8 @@ QVariant McuToolChainPackage::debuggerId() const
if (!debugger) { if (!debugger) {
DebuggerItem newDebugger; DebuggerItem newDebugger;
newDebugger.setCommand(command); newDebugger.setCommand(command);
const QString displayName = m_type == TypeArmGcc
? McuPackage::tr("Arm GDB at %1")
: m_type == TypeIAR ? QLatin1String("CSpy")
: QLatin1String("/bar/foo-keil-gdb");
newDebugger.setUnexpandedDisplayName(displayName.arg(command.toUserOutput())); newDebugger.setUnexpandedDisplayName(displayName.arg(command.toUserOutput()));
newDebugger.setEngineType(engineType);
debuggerId = DebuggerItemManager::registerDebugger(newDebugger); debuggerId = DebuggerItemManager::registerDebugger(newDebugger);
} else { } else {
debuggerId = debugger->id(); debuggerId = debugger->id();
@@ -743,7 +759,9 @@ static void setKitDebugger(Kit *k, const McuToolChainPackage *tcPackage)
|| tcPackage->type() == McuToolChainPackage::TypeIAR) || tcPackage->type() == McuToolChainPackage::TypeIAR)
return; return;
Debugger::DebuggerKitAspect::setDebugger(k, tcPackage->debuggerId()); const QVariant debuggerId = tcPackage->debuggerId();
if (debuggerId.isValid())
Debugger::DebuggerKitAspect::setDebugger(k, debuggerId);
} }
static void setKitDevice(Kit *k, const McuTarget* mcuTarget) static void setKitDevice(Kit *k, const McuTarget* mcuTarget)

View File

@@ -305,12 +305,6 @@ void Edit3DView::createEdit3DActions()
resetPuppet(); resetPuppet();
}; };
SelectionContextOperation particlesRestartTrigger = [this](const SelectionContext &) {
m_particlesPlayAction->action()->setChecked(true);
if (m_seeker)
m_seeker->setEnabled(false);
};
SelectionContextOperation particlesPlayTrigger = [this](const SelectionContext &) { SelectionContextOperation particlesPlayTrigger = [this](const SelectionContext &) {
if (m_seeker) if (m_seeker)
m_seeker->setEnabled(!m_particlesPlayAction->action()->isChecked()); m_seeker->setEnabled(!m_particlesPlayAction->action()->isChecked());
@@ -334,7 +328,7 @@ void Edit3DView::createEdit3DActions()
QmlDesigner::Constants::EDIT3D_PARTICLES_RESTART, View3DActionCommand::ParticlesRestart, QmlDesigner::Constants::EDIT3D_PARTICLES_RESTART, View3DActionCommand::ParticlesRestart,
QCoreApplication::translate("ParticlesRestartAction", "Restart Particles"), QCoreApplication::translate("ParticlesRestartAction", "Restart Particles"),
QKeySequence(Qt::Key_E), false, false, Icons::EDIT3D_PARTICLE_RESTART.icon(), QKeySequence(Qt::Key_E), false, false, Icons::EDIT3D_PARTICLE_RESTART.icon(),
Icons::EDIT3D_PARTICLE_RESTART.icon(), particlesRestartTrigger); Icons::EDIT3D_PARTICLE_RESTART.icon());
m_particlesPlayAction->action()->setEnabled(particlemode); m_particlesPlayAction->action()->setEnabled(particlemode);
m_particlesRestartAction->action()->setEnabled(particlemode); m_particlesRestartAction->action()->setEnabled(particlemode);
m_resetAction m_resetAction

View File

@@ -84,6 +84,26 @@ QPixmap NewProjectDialogImageProvider::requestStylePixmap(const QString &id, QSi
return pixmap; return pixmap;
} }
QPixmap NewProjectDialogImageProvider::requestDefaultPixmap(const QString &id, QSize *size, const QSize &requestedSize)
{
QString realPath = Core::ICore::resourcePath("qmldesigner/newprojectdialog/image/" + id).toString();
QPixmap pixmap{realPath};
if (size) {
size->setWidth(pixmap.width());
size->setHeight(pixmap.height());
}
if (pixmap.isNull())
return QPixmap{};
if (requestedSize.isValid())
return pixmap.scaled(requestedSize);
return pixmap;
}
QPixmap NewProjectDialogImageProvider::requestPixmap(const QString &id, QSize *size, const QSize &requestedSize) QPixmap NewProjectDialogImageProvider::requestPixmap(const QString &id, QSize *size, const QSize &requestedSize)
{ {
if (id.startsWith("style-")) if (id.startsWith("style-"))
@@ -92,7 +112,7 @@ QPixmap NewProjectDialogImageProvider::requestPixmap(const QString &id, QSize *s
if (id.startsWith("status-")) if (id.startsWith("status-"))
return requestStatusPixmap(id, size, requestedSize); return requestStatusPixmap(id, size, requestedSize);
return QPixmap{}; return requestDefaultPixmap(id, size, requestedSize);
} }
} // namespace Internal } // namespace Internal

View File

@@ -41,6 +41,7 @@ public:
private: private:
QPixmap requestStatusPixmap(const QString &id, QSize *size, const QSize &requestedSize); QPixmap requestStatusPixmap(const QString &id, QSize *size, const QSize &requestedSize);
QPixmap requestStylePixmap(const QString &id, QSize *size, const QSize &requestedSize); QPixmap requestStylePixmap(const QString &id, QSize *size, const QSize &requestedSize);
QPixmap requestDefaultPixmap(const QString &id, QSize *size, const QSize &requestedSize);
static QPixmap invalidStyleIcon(); static QPixmap invalidStyleIcon();
}; };

View File

@@ -23,9 +23,6 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QQmlContext>
#include <QMessageBox>
#include "qdsnewdialog.h" #include "qdsnewdialog.h"
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
@@ -37,6 +34,10 @@
#include "wizardfactories.h" #include "wizardfactories.h"
#include "newprojectdialogimageprovider.h" #include "newprojectdialogimageprovider.h"
#include <QMessageBox>
#include <QQmlContext>
#include <QScreen>
using namespace StudioWelcome; using namespace StudioWelcome;
namespace { namespace {
@@ -93,7 +94,11 @@ QdsNewDialog::QdsNewDialog(QWidget *parent)
m_dialog->setWindowModality(Qt::ApplicationModal); m_dialog->setWindowModality(Qt::ApplicationModal);
m_dialog->setWindowFlags(Qt::Dialog); m_dialog->setWindowFlags(Qt::Dialog);
m_dialog->setAttribute(Qt::WA_DeleteOnClose); m_dialog->setAttribute(Qt::WA_DeleteOnClose);
m_dialog->setMinimumSize(1155, 804); m_dialog->setMinimumSize(1110, 554);
QSize screenSize = m_dialog->screen()->geometry().size();
if (screenSize.height() < 1080)
m_dialog->resize(parent->size());
QObject::connect(&m_wizard, &WizardHandler::deletingWizard, this, &QdsNewDialog::onDeletingWizard); QObject::connect(&m_wizard, &WizardHandler::deletingWizard, this, &QdsNewDialog::onDeletingWizard);
QObject::connect(&m_wizard, &WizardHandler::wizardCreated, this, &QdsNewDialog::onWizardCreated); QObject::connect(&m_wizard, &WizardHandler::wizardCreated, this, &QdsNewDialog::onWizardCreated);

View File

@@ -342,6 +342,7 @@ public:
void checkNext() void checkNext()
{ {
QTC_ASSERT(m_currentHandlerIndex >= 0, return);
QTC_ASSERT(m_currentHandlerIndex < m_handlers.size(), return); QTC_ASSERT(m_currentHandlerIndex < m_handlers.size(), return);
BaseHoverHandler *currentHandler = m_handlers[m_currentHandlerIndex]; BaseHoverHandler *currentHandler = m_handlers[m_currentHandlerIndex];
@@ -352,6 +353,7 @@ public:
void onHandlerFinished(int documentRevision, int position, int priority) void onHandlerFinished(int documentRevision, int position, int priority)
{ {
QTC_ASSERT(m_currentHandlerIndex >= 0, return);
QTC_ASSERT(m_currentHandlerIndex < m_handlers.size(), return); QTC_ASSERT(m_currentHandlerIndex < m_handlers.size(), return);
QTC_ASSERT(documentRevision == m_documentRevision, return); QTC_ASSERT(documentRevision == m_documentRevision, return);
QTC_ASSERT(position == m_position, return); QTC_ASSERT(position == m_position, return);