Merge "Merge remote-tracking branch 'origin/4.13' into master"
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 82 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 75 KiB |
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 20 KiB |
@@ -214,8 +214,8 @@
|
||||
\c y properties of \e icon to those of the rectangles.
|
||||
|
||||
\list 1
|
||||
\li In the \uicontrol States view, click the \inlineimage plus.png
|
||||
button three times to create \e State1, \e State2, and \e State3.
|
||||
\li In the \uicontrol States view, select \uicontrol {Create New State}
|
||||
three times to create \e State1, \e State2, and \e State3.
|
||||
\li Select \e State1 in \uicontrol States.
|
||||
\li Select \inlineimage icons/action-icon.png
|
||||
to open the \uicontrol Actions menu, and then select
|
||||
|
@@ -229,7 +229,7 @@
|
||||
\section1 Using States to Change Component Property Values
|
||||
|
||||
\list 1
|
||||
\li In the \uicontrol States view, select \inlineimage plus.png
|
||||
\li In the \uicontrol States view, select \uicontrol {Create New State}
|
||||
twice to create two new states.
|
||||
\image qmldesigner-borderimage-states.png "Active and inactive states"
|
||||
\li Select \uicontrol State1.
|
||||
|
@@ -68,9 +68,9 @@
|
||||
|
||||
\image qmldesigner-transitions.png "States view"
|
||||
|
||||
To add states, click the \inlineimage plus.png
|
||||
button. Click the new state to switch to it in \uicontrol {Form Editor},
|
||||
and then modify the properties of components in \uicontrol Properties.
|
||||
To add states, select \uicontrol {Create New State}. Click the new state to
|
||||
switch to it in \uicontrol {Form Editor}, and then modify the properties of
|
||||
components in \uicontrol Properties.
|
||||
|
||||
For example, to change the appearance of a button, you can hide the button
|
||||
image and show another image in its place. Or, to add movement to the view,
|
||||
|
@@ -101,7 +101,7 @@
|
||||
|
||||
We create the states for displaying the Trip, Standard, and Navigation
|
||||
screens by moving from viewport to viewport in \e Screen01.ui.qml and
|
||||
clicking \inlineimage plus.png "Add button" in the \uicontrol States view
|
||||
selecting \uicontrol {Create New State} in the \uicontrol States view
|
||||
when the appropriate screen is displayed in the viewport.
|
||||
|
||||
We then create states for animations that are run when moving between the
|
||||
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 127 KiB After Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 122 KiB After Width: | Height: | Size: 56 KiB |
Before Width: | Height: | Size: 110 KiB After Width: | Height: | Size: 61 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 167 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 10 KiB |
@@ -114,8 +114,7 @@
|
||||
components in the \uicontrol {Form Editor}:
|
||||
|
||||
\list 1
|
||||
\li In the \uicontrol States view, select the \inlineimage plus.png
|
||||
button.
|
||||
\li In the \uicontrol States view, select \uicontrol {Create New State}.
|
||||
\image loginui3-login-state.png "States view"
|
||||
\li Enter \e loginState as the state name.
|
||||
\li Select \e verifyPasswordField in the \uicontrol Navigator,
|
||||
|
@@ -257,10 +257,10 @@
|
||||
in \uicontrol Timeline:
|
||||
|
||||
\list 1
|
||||
\li In \uicontrol States, select the \inlineimage plus.png
|
||||
button twice to add two states called \e loginState and
|
||||
\e registerState. You don't need to make any property changes this
|
||||
time, because you'll bind the states to property animations.
|
||||
\li In \uicontrol States, select \uicontrol {Create New State} twice to
|
||||
add two states called \e loginState and \e registerState. You don't
|
||||
need to make any property changes this time, because you'll bind the
|
||||
states to property animations.
|
||||
\li In \uicontrol Timeline, select the \inlineimage animation.png
|
||||
(\uicontrol {Timeline Settings (S)}) button on the toolbar (or press
|
||||
\key S to open the \uicontrol {Timeline Settings} dialog.
|
||||
|
@@ -142,8 +142,8 @@
|
||||
another animation is run that closes the side menu. When the animation
|
||||
finishes, the side menu returns to the \e closed state.
|
||||
|
||||
We select the \inlineimage plus.png
|
||||
(\uicontrol Add) button in the \uicontrol States view to add the states:
|
||||
We select \uicontrol {Create New State} in the \uicontrol States view to add
|
||||
the states:
|
||||
|
||||
\image sidemenu-states.png "Side menu states"
|
||||
|
||||
|
@@ -216,6 +216,7 @@ public:
|
||||
PostPrintAction postPrintAction;
|
||||
bool boldFontEnabled = true;
|
||||
bool prependCarriageReturn = false;
|
||||
bool prependLineFeed = false;
|
||||
};
|
||||
|
||||
OutputFormatter::OutputFormatter() : d(new Private) { }
|
||||
@@ -436,6 +437,7 @@ void OutputFormatter::append(const QString &text, const QTextCharFormat &format)
|
||||
d->cursor.movePosition(QTextCursor::StartOfBlock, QTextCursor::KeepAnchor);
|
||||
startPos = crPos + 1;
|
||||
}
|
||||
flushTrailingNewline();
|
||||
if (startPos < text.count())
|
||||
d->cursor.insertText(text.mid(startPos), format);
|
||||
}
|
||||
@@ -495,6 +497,14 @@ void OutputFormatter::flushIncompleteLine()
|
||||
d->incompleteLine.first.clear();
|
||||
}
|
||||
|
||||
void Utils::OutputFormatter::flushTrailingNewline()
|
||||
{
|
||||
if (d->prependLineFeed) {
|
||||
d->cursor.insertText("\n");
|
||||
d->prependLineFeed = false;
|
||||
}
|
||||
}
|
||||
|
||||
void OutputFormatter::dumpIncompleteLine(const QString &line, OutputFormat format)
|
||||
{
|
||||
if (line.isEmpty())
|
||||
@@ -560,6 +570,7 @@ void OutputFormatter::flush()
|
||||
{
|
||||
if (!d->incompleteLine.first.isEmpty())
|
||||
flushIncompleteLine();
|
||||
flushTrailingNewline();
|
||||
d->escapeCodeHandler.endFormatScope();
|
||||
for (OutputLineParser * const p : qAsConst(d->lineParsers))
|
||||
p->flush();
|
||||
@@ -641,7 +652,8 @@ void OutputFormatter::appendMessage(const QString &text, OutputFormat format)
|
||||
dumpIncompleteLine(out.mid(startPos), format);
|
||||
break;
|
||||
}
|
||||
doAppendMessage(out.mid(startPos, eolPos - startPos + 1), format);
|
||||
doAppendMessage(out.mid(startPos, eolPos - startPos), format);
|
||||
d->prependLineFeed = true;
|
||||
startPos = eolPos + 1;
|
||||
}
|
||||
}
|
||||
|
@@ -83,8 +83,8 @@ public:
|
||||
void setDemoteErrorsToWarnings(bool demote);
|
||||
bool demoteErrorsToWarnings() const;
|
||||
|
||||
// line contains at most one line feed character, and if it does occur, it's the last character.
|
||||
// Either way, the input is to be considered "complete" for parsing purposes.
|
||||
// Represents a single line, without a trailing line feed character.
|
||||
// The input is to be considered "complete" for parsing purposes.
|
||||
virtual Result handleLine(const QString &line, OutputFormat format) = 0;
|
||||
|
||||
virtual bool handleLink(const QString &href) { Q_UNUSED(href); return false; }
|
||||
@@ -183,6 +183,7 @@ private:
|
||||
void append(const QString &text, const QTextCharFormat &format);
|
||||
void initFormats();
|
||||
void flushIncompleteLine();
|
||||
void flushTrailingNewline();
|
||||
void dumpIncompleteLine(const QString &line, OutputFormat format);
|
||||
void clearLastLine();
|
||||
QList<FormattedText> parseAnsi(const QString &text, const QTextCharFormat &format);
|
||||
|
@@ -396,6 +396,8 @@ bool CppHighlighter::highlightRawStringLiteral(const QStringView &_text, const T
|
||||
if (text.at(tk.utf16charsEnd() - 1) != '"')
|
||||
return false;
|
||||
const int endDelimiterOffset = tk.utf16charsEnd() - 1 - delimiter.length();
|
||||
if (endDelimiterOffset <= delimiterOffset)
|
||||
return false;
|
||||
if (text.mid(endDelimiterOffset, delimiter.length()) != delimiter)
|
||||
return false;
|
||||
if (text.at(endDelimiterOffset - 1) != ')')
|
||||
|
@@ -104,6 +104,11 @@ static TextEditor::TextStyle styleForFormat(int format)
|
||||
case Format_Squash: return C_ENUMERATION;
|
||||
case Format_Fixup: return C_NUMBER;
|
||||
case Format_Exec: return C_LABEL;
|
||||
case Format_Break: return C_PREPROCESSOR;
|
||||
case Format_Drop: return C_REMOVED_LINE;
|
||||
case Format_Label: return C_LABEL;
|
||||
case Format_Reset: return C_LABEL;
|
||||
case Format_Merge: return C_LABEL;
|
||||
case Format_Count:
|
||||
QTC_CHECK(false); // should never get here
|
||||
return C_TEXT;
|
||||
@@ -125,6 +130,11 @@ GitRebaseHighlighter::GitRebaseHighlighter(QTextDocument *parent) :
|
||||
m_actions << RebaseAction("^(s|squash)\\b", Format_Squash);
|
||||
m_actions << RebaseAction("^(f|fixup)\\b", Format_Fixup);
|
||||
m_actions << RebaseAction("^(x|exec)\\b", Format_Exec);
|
||||
m_actions << RebaseAction("^(b|break)\\b", Format_Break);
|
||||
m_actions << RebaseAction("^(d|drop)\\b", Format_Drop);
|
||||
m_actions << RebaseAction("^(l|label)\\b", Format_Label);
|
||||
m_actions << RebaseAction("^(t|reset)\\b", Format_Reset);
|
||||
m_actions << RebaseAction("^(m|merge)\\b", Format_Merge);
|
||||
}
|
||||
|
||||
void GitRebaseHighlighter::highlightBlock(const QString &text)
|
||||
|
@@ -42,6 +42,11 @@ enum Format {
|
||||
Format_Squash,
|
||||
Format_Fixup,
|
||||
Format_Exec,
|
||||
Format_Break,
|
||||
Format_Drop,
|
||||
Format_Label,
|
||||
Format_Reset,
|
||||
Format_Merge,
|
||||
Format_Count
|
||||
};
|
||||
|
||||
|
@@ -57,7 +57,7 @@ LinuxIccParser::LinuxIccParser() :
|
||||
|
||||
// ".pch/Qt5Core.pchi.cpp": creating precompiled header file ".pch/Qt5Core.pchi"
|
||||
// "animation/qabstractanimation.cpp": using precompiled header file ".pch/Qt5Core.pchi"
|
||||
m_pchInfoLine.setPattern(QLatin1String("^\".*?\": (creating|using) precompiled header file \".*?\"\n$"));
|
||||
m_pchInfoLine.setPattern(QLatin1String("^\".*?\": (creating|using) precompiled header file \".*?\"$"));
|
||||
QTC_CHECK(m_pchInfoLine.isValid());
|
||||
}
|
||||
|
||||
|
@@ -115,11 +115,10 @@ TestTerminator::TestTerminator(OutputParserTester *t) :
|
||||
|
||||
Utils::OutputLineParser::Result TestTerminator::handleLine(const QString &line, Utils::OutputFormat type)
|
||||
{
|
||||
QTC_CHECK(line.endsWith('\n'));
|
||||
if (type == Utils::StdOutFormat)
|
||||
m_tester->m_receivedStdOutChildLine.append(line);
|
||||
m_tester->m_receivedStdOutChildLine.append(line + '\n');
|
||||
else
|
||||
m_tester->m_receivedStdErrChildLine.append(line);
|
||||
m_tester->m_receivedStdErrChildLine.append(line + '\n');
|
||||
return Status::Done;
|
||||
}
|
||||
|
||||
|
@@ -67,7 +67,7 @@ Task::Task(TaskType type_, const QString &description,
|
||||
const QIcon &icon, Options options) :
|
||||
taskId(s_nextId), type(type_), options(options), summary(description),
|
||||
line(line_), movedLine(line_), category(category_),
|
||||
icon(icon.isNull() ? taskTypeIcon(type_) : icon)
|
||||
m_icon(icon)
|
||||
{
|
||||
++s_nextId;
|
||||
setFile(file_);
|
||||
@@ -108,7 +108,7 @@ void Task::clear()
|
||||
line = -1;
|
||||
movedLine = -1;
|
||||
category = Utils::Id();
|
||||
icon = QIcon();
|
||||
m_icon = QIcon();
|
||||
formats.clear();
|
||||
m_mark.clear();
|
||||
}
|
||||
@@ -133,6 +133,13 @@ QString Task::description() const
|
||||
return desc;
|
||||
}
|
||||
|
||||
QIcon Task::icon() const
|
||||
{
|
||||
if (m_icon.isNull())
|
||||
m_icon = taskTypeIcon(type);
|
||||
return m_icon;
|
||||
}
|
||||
|
||||
//
|
||||
// functions
|
||||
//
|
||||
|
@@ -74,6 +74,7 @@ public:
|
||||
void clear();
|
||||
void setFile(const Utils::FilePath &file);
|
||||
QString description() const;
|
||||
QIcon icon() const;
|
||||
|
||||
unsigned int taskId = 0;
|
||||
TaskType type = Unknown;
|
||||
@@ -85,7 +86,6 @@ public:
|
||||
int line = -1;
|
||||
int movedLine = -1; // contains a line number if the line was moved in the editor
|
||||
Utils::Id category;
|
||||
QIcon icon;
|
||||
|
||||
// Having a container of QTextLayout::FormatRange in Task isn't that great
|
||||
// It would be cleaner to split up the text into
|
||||
@@ -101,6 +101,7 @@ private:
|
||||
void setMark(TextEditor::TextMark *mark);
|
||||
|
||||
QSharedPointer<TextEditor::TextMark> m_mark;
|
||||
mutable QIcon m_icon;
|
||||
static unsigned int s_nextId;
|
||||
|
||||
friend class TaskHub;
|
||||
|
@@ -78,8 +78,8 @@ public:
|
||||
} else {
|
||||
setToolTip(task.description());
|
||||
}
|
||||
setIcon(task.icon);
|
||||
setVisible(!task.icon.isNull());
|
||||
setIcon(task.icon());
|
||||
setVisible(!task.icon().isNull());
|
||||
}
|
||||
|
||||
bool isClickable() const override;
|
||||
|
@@ -255,7 +255,7 @@ QVariant TaskModel::data(const QModelIndex &index, int role) const
|
||||
else if (role == TaskModel::Category)
|
||||
return m_tasks.at(index.row()).category.uniqueIdentifier();
|
||||
else if (role == TaskModel::Icon)
|
||||
return m_tasks.at(index.row()).icon;
|
||||
return m_tasks.at(index.row()).icon();
|
||||
else if (role == TaskModel::Task_t)
|
||||
return QVariant::fromValue(task(index));
|
||||
return QVariant();
|
||||
|
@@ -334,6 +334,8 @@ extend_qtc_plugin(QmlDesigner
|
||||
navigatortreeview.cpp navigatortreeview.h
|
||||
navigatorview.cpp navigatorview.h
|
||||
navigatorwidget.cpp navigatorwidget.h
|
||||
choosetexturepropertydialog.cpp choosetexturepropertydialog.h
|
||||
choosetexturepropertydialog.ui
|
||||
)
|
||||
|
||||
extend_qtc_plugin(QmlDesigner
|
||||
|
@@ -610,6 +610,9 @@ Project {
|
||||
"navigator/navigatorview.h",
|
||||
"navigator/navigatorwidget.cpp",
|
||||
"navigator/navigatorwidget.h",
|
||||
"navigator/choosetexturepropertydialog.cpp",
|
||||
"navigator/choosetexturepropertydialog.h",
|
||||
"navigator/choosetexturepropertydialog.ui",
|
||||
"propertyeditor/aligndistribute.cpp",
|
||||
"propertyeditor/aligndistribute.h",
|
||||
"propertyeditor/designerpropertymap.cpp",
|
||||
|
@@ -511,6 +511,7 @@ void QtSupportPlugin::testQtOutputFormatter_appendMixedAssertAndAnsi()
|
||||
"Blue\n";
|
||||
|
||||
formatter.appendMessage(inputText, StdOutFormat);
|
||||
formatter.flush();
|
||||
|
||||
QCOMPARE(edit.toPlainText(), outputText);
|
||||
|
||||
|