forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.13' into master
Change-Id: Iab93dc48b4a38fb4c698481bbf02a5a65e08206b
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user