Merge remote-tracking branch 'origin/4.10'

Change-Id: I7a7bc552e09de1fbee98402c97e3a35f0e2c952a
This commit is contained in:
Eike Ziller
2019-07-31 08:27:20 +02:00
28 changed files with 214 additions and 192 deletions

View File

@@ -25,9 +25,9 @@
import QtQuick 2.1
import QtQuick.Layouts 1.0
import QtQuick.Controls 1.0 as Controls
import StudioControls 1.0 as StudioControls
import StudioTheme 1.0 as StudioTheme
import QtQuickDesignerTheme 1.0
import QtQuick.Controls.Styles 1.1
Loader {
id: gradientDialogLoader
@@ -93,33 +93,12 @@ Loader {
text: qsTr("Gradient Properties")
}
Button {
StudioControls.AbstractButton {
width: 16
height: 16
style: ButtonStyle {
background: Item {
Image {
width: 16
height: 16
source: "image://icons/error"
opacity: {
if (control.pressed)
return 0.8
return 1.0
}
Rectangle {
z: -1
anchors.fill: parent
color: control.pressed
|| control.hovered ? Theme.qmlDesignerBackgroundColorDarker() : Theme.qmlDesignerButtonColor()
border.color: Theme.qmlDesignerBorderColor()
radius: 2
}
}
}
}
buttonIcon: StudioTheme.Constants.closeCross
onClicked: gradientDialogLoader.visible = false
backgroundRadius: 2
anchors.right: parent.right
anchors.top: parent.top
anchors.margins: 4

View File

@@ -25,7 +25,6 @@
import QtQuick 2.1
import QtQuick.Layouts 1.0
import QtQuick.Controls 1.0 as Controls
Image {
id: root

View File

@@ -25,6 +25,7 @@
import QtQuick 2.1
import QtQuickDesignerTheme 1.0
import StudioTheme 1.0 as StudioTheme
Item {
width: grid.width
@@ -41,10 +42,19 @@ Item {
readonly property color selectedColor: Theme.qmlDesignerBackgroundColorDarkAlternate()
readonly property color unselectedColor: Theme.qmlDesignerBackgroundColorDarker()
ExtendedFunctionButton {
ExtendedFunctionLogic {
id: extFuncLogic
backendValue: originControl.backendValue
visible: originControl.enabled
}
ActionIndicator {
anchors.left: grid.right
anchors.leftMargin: grid.spacing
visible: originControl.enabled
icon.color: extFuncLogic.color
icon.text: extFuncLogic.glyph
onClicked: extFuncLogic.show()
}
ColorLogic {
@@ -100,8 +110,8 @@ Item {
Rectangle {
property bool selected: false
id: topLeft
width: 15
height: 15
width: StudioTheme.Values.height
height: StudioTheme.Values.height
color: selected ? selectedColor : unselectedColor
border.width: selected ? 2 : 1
border.color: selected ? originControl.borderColorSelected : originControl.borderColor

View File

@@ -33,6 +33,7 @@ T.AbstractButton {
property alias buttonIcon: buttonIcon.text
property alias iconColor: buttonIcon.color
property alias backgroundVisible: buttonBackground.visible
property alias backgroundRadius: buttonBackground.radius
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
implicitContentWidth + leftPadding + rightPadding)

View File

@@ -60,7 +60,8 @@ Rectangle {
State {
name: "hovered"
when: actionIndicator.hover && !actionIndicator.pressed
&& !myControl.edit && !myControl.drag && myControl.enabled
&& (!myControl || (!myControl.edit && !myControl.drag))
&& actionIndicator.enabled
PropertyChanges {
target: actionIndicatorIcon
scale: 1.2
@@ -68,7 +69,7 @@ Rectangle {
},
State {
name: "disabled"
when: !myControl.enabled
when: !actionIndicator.enabled
PropertyChanges {
target: actionIndicatorIcon
color: StudioTheme.Values.themeTextColorDisabled

View File

@@ -24,20 +24,19 @@
****************************************************************************/
import QtQuick 2.12
import QtQuick.Controls 2.12 as Controls2
Menu {
id: contextMenu
property Item myTextEdit
Controls2.MenuItem {
MenuItem {
text: "Undo"
enabled: myTextEdit.canUndo
onTriggered: myTextEdit.undo()
/* shortcut: StandardKey.Undo Shortcuts in QQC2 seem to override global shortcuts */
}
Controls2.MenuItem {
MenuItem {
text: "Redo"
enabled: myTextEdit.canRedo
onTriggered: myTextEdit.redo()
@@ -47,32 +46,32 @@ Menu {
MenuSeparator {
}
Controls2.MenuItem {
MenuItem {
text: "Copy"
enabled: myTextEdit.selectedText !== ""
onTriggered: myTextEdit.copy()
/* shortcut: StandardKey.Copy Shortcuts in QQC2 seem to override global shortcuts */
}
Controls2.MenuItem {
MenuItem {
text: "Cut"
enabled: myTextEdit.selectedText !== "" && !myTextEdit.readOnly
onTriggered: myTextEdit.cut()
/* shortcut: StandardKey.Cut Shortcuts in QQC2 seem to override global shortcuts */
}
Controls2.MenuItem {
MenuItem {
text: "Paste"
enabled: myTextEdit.canPaste
onTriggered: myTextEdit.paste()
/* shortcut: StandardKey.Paste Shortcuts in QQC2 seem to override global shortcuts */
}
Controls2.MenuItem {
MenuItem {
text: "Delete"
enabled: myTextEdit.selectedText !== ""
onTriggered: myTextEdit.remove(myTextEdit.selectionStart,
myTextEdit.selectionEnd)
/* shortcut: StandardKey.Delete Shortcuts in QQC2 seem to override global shortcuts */
}
Controls2.MenuItem {
MenuItem {
text: "Clear"
enabled: myTextEdit.text !== ""
onTriggered: myTextEdit.clear()
@@ -82,7 +81,7 @@ Menu {
MenuSeparator {
}
Controls2.MenuItem {
MenuItem {
text: "Select All"
enabled: myTextEdit.text !== ""
&& myTextEdit.selectedText !== myTextEdit.text

View File

@@ -46,11 +46,6 @@ T.MenuItem {
action: Action {}
contentItem: Item {
id: menuItem
width: control.menu.width
height: StudioTheme.Values.height
Text {
id: textLabel
text: control.text
@@ -77,11 +72,11 @@ T.MenuItem {
background: Rectangle {
implicitWidth: textLabel.implicitWidth + control.labelSpacing + shortcutLabel.implicitWidth
+ control.leftPadding + control.rightPadding // TODO
+ control.leftPadding + control.rightPadding
implicitHeight: StudioTheme.Values.height
x: StudioTheme.Values.border
y: StudioTheme.Values.border
width: control.width - (StudioTheme.Values.border * 2)
width: control.menu.width - (StudioTheme.Values.border * 2)
height: control.height - (StudioTheme.Values.border * 2)
color: control.down ? control.palette.midlight : control.highlighted ? StudioTheme.Values.themeInteraction : "transparent"
}

View File

@@ -36,11 +36,10 @@ T.MenuSeparator {
implicitContentHeight + topPadding + bottomPadding)
padding: 0
verticalPadding: padding
contentItem: Rectangle {
implicitWidth: 10
implicitHeight: StudioTheme.Values.border
width: control.parent.width
height: StudioTheme.Values.border
color: StudioTheme.Values.themeControlOutline
}
}

View File

@@ -131,13 +131,13 @@ void AutoTestUnitTests::testCodeParser_data()
<< 1 << 0 << 0 << 0;
QTest::newRow("mixedAutoTestAndQuickTests")
<< QString(m_tmpDir->path() + "/mixed_atp/mixed_atp.pro")
<< 4 << 7 << 3 << 10;
<< 4 << 10 << 4 << 10;
QTest::newRow("plainAutoTestQbs")
<< QString(m_tmpDir->path() + "/plain/plain.qbs")
<< 1 << 0 << 0 << 0;
QTest::newRow("mixedAutoTestAndQuickTestsQbs")
<< QString(m_tmpDir->path() + "/mixed_atp/mixed_atp.qbs")
<< 4 << 7 << 3 << 10;
<< 4 << 10 << 4 << 10;
}
void AutoTestUnitTests::testCodeParserSwitchStartup()
@@ -183,8 +183,8 @@ void AutoTestUnitTests::testCodeParserSwitchStartup_data()
m_tmpDir->path() + "/mixed_atp/mixed_atp.qbs"});
QList<int> expectedAutoTests = QList<int>() << 1 << 4 << 1 << 4;
QList<int> expectedNamedQuickTests = QList<int>() << 0 << 7 << 0 << 7;
QList<int> expectedUnnamedQuickTests = QList<int>() << 0 << 3 << 0 << 3;
QList<int> expectedNamedQuickTests = QList<int>() << 0 << 10 << 0 << 10;
QList<int> expectedUnnamedQuickTests = QList<int>() << 0 << 4 << 0 << 4;
QList<int> expectedDataTagsCount = QList<int>() << 0 << 10 << 0 << 10;
QTest::newRow("loadMultipleProjects")

View File

@@ -190,35 +190,36 @@ static bool checkQmlDocumentForQuickTestCode(QFutureInterface<TestParseResultPtr
if (!qmlVisitor.isValid())
return false;
const QString testCaseName = qmlVisitor.testCaseName();
const TestCodeLocationAndType tcLocationAndType = qmlVisitor.testCaseLocation();
const QMap<QString, TestCodeLocationAndType> &testFunctions = qmlVisitor.testFunctions();
const QVector<QuickTestCaseSpec> &testCases = qmlVisitor.testCases();
QuickTestParseResult *parseResult = new QuickTestParseResult(id);
parseResult->proFile = proFile;
parseResult->itemType = TestTreeItem::TestCase;
QMap<QString, TestCodeLocationAndType>::ConstIterator it = testFunctions.begin();
const QMap<QString, TestCodeLocationAndType>::ConstIterator end = testFunctions.end();
for ( ; it != end; ++it) {
const TestCodeLocationAndType &loc = it.value();
QuickTestParseResult *funcResult = new QuickTestParseResult(id);
funcResult->name = it.key();
funcResult->displayName = it.key();
funcResult->itemType = loc.m_type;
funcResult->fileName = loc.m_name;
funcResult->line = loc.m_line;
funcResult->column = loc.m_column;
funcResult->proFile = proFile;
for (const QuickTestCaseSpec &testCase : testCases) {
const QString testCaseName = testCase.m_caseName;
parseResult->children.append(funcResult);
QuickTestParseResult *parseResult = new QuickTestParseResult(id);
parseResult->proFile = proFile;
parseResult->itemType = TestTreeItem::TestCase;
if (!testCaseName.isEmpty()) {
parseResult->fileName = testCase.m_locationAndType.m_name;
parseResult->name = testCaseName;
parseResult->line = testCase.m_locationAndType.m_line;
parseResult->column = testCase.m_locationAndType.m_column;
}
for (auto function : testCase.m_functions) {
QuickTestParseResult *funcResult = new QuickTestParseResult(id);
funcResult->name = function.m_functionName;
funcResult->displayName = function.m_functionName;
funcResult->itemType = function.m_locationAndType.m_type;
funcResult->fileName = function.m_locationAndType.m_name;
funcResult->line = function.m_locationAndType.m_line;
funcResult->column = function.m_locationAndType.m_column;
funcResult->proFile = proFile;
parseResult->children.append(funcResult);
}
futureInterface.reportResult(TestParseResultPtr(parseResult));
}
if (!testCaseName.isEmpty()) {
parseResult->fileName = tcLocationAndType.m_name;
parseResult->name = testCaseName;
parseResult->line = tcLocationAndType.m_line;
parseResult->column = tcLocationAndType.m_column;
}
futureInterface.reportResult(TestParseResultPtr(parseResult));
return true;
}

View File

@@ -323,11 +323,11 @@ TestTreeItem *QuickTestTreeItem::find(const TestParseResult *result)
TestTreeItem *group = findFirstLevelChild([path](TestTreeItem *group) {
return group->filePath() == path;
});
return group ? group->findChildByFile(result->fileName) : nullptr;
return group ? group->findChildByNameAndFile(result->name, result->fileName) : nullptr;
}
return findChildByFile(result->fileName);
return findChildByNameAndFile(result->name, result->fileName);
case GroupNode:
return findChildByFile(result->fileName);
return findChildByNameAndFile(result->name, result->fileName);
case TestCase:
return name().isEmpty() ? findChildByNameAndFile(result->name, result->fileName)
: findChildByName(result->name);
@@ -345,9 +345,9 @@ TestTreeItem *QuickTestTreeItem::findChild(const TestTreeItem *other)
case Root:
if (otherType == TestCase && other->name().isEmpty())
return unnamedQuickTests();
return findChildByFileAndType(other->filePath(), otherType);
return findChildByFileNameAndType(other->filePath(), other->name(), otherType);
case GroupNode:
return findChildByFileAndType(other->filePath(), otherType);
return findChildByFileNameAndType(other->filePath(), other->name(), otherType);
case TestCase:
if (otherType != TestFunction && otherType != TestDataFunction && otherType != TestSpecialFunction)
return nullptr;
@@ -444,6 +444,16 @@ void QuickTestTreeItem::markForRemovalRecursively(const QString &filePath)
}
}
TestTreeItem *QuickTestTreeItem::findChildByFileNameAndType(const QString &filePath,
const QString &name,
TestTreeItem::Type tType)
{
return findFirstLevelChild([filePath, name, tType](const TestTreeItem *other) {
return other->type() == tType && other->name() == name && other->filePath() == filePath;
});
}
TestTreeItem *QuickTestTreeItem::unnamedQuickTests() const
{
if (type() != Root)

View File

@@ -57,6 +57,8 @@ public:
QSet<QString> internalTargets() const override;
void markForRemovalRecursively(const QString &filePath) override;
private:
TestTreeItem *findChildByFileNameAndType(const QString &filePath, const QString &name,
Type tType);
TestTreeItem *unnamedQuickTests() const;
};

View File

@@ -31,6 +31,7 @@
#include <qmljs/qmljslink.h>
#include <qmljs/qmljsutils.h>
#include <utils/algorithm.h>
#include <utils/qtcassert.h>
namespace Autotest {
namespace Internal {
@@ -85,29 +86,29 @@ static bool isDerivedFromTestCase(QmlJS::AST::UiQualifiedId *id, const QmlJS::Do
bool TestQmlVisitor::visit(QmlJS::AST::UiObjectDefinition *ast)
{
const QStringRef name = ast->qualifiedTypeNameId->name;
m_objectStack.push(name.toString());
m_objectIsTestStack.push(false);
if (name != "TestCase") {
m_insideTestCase = false;
if (!isDerivedFromTestCase(ast->qualifiedTypeNameId, m_currentDoc, m_snapshot))
return true;
} else if (!documentImportsQtTest(m_currentDoc.data())) {
return true; // find nested TestCase items as well
}
m_typeIsTestCase = true;
m_insideTestCase = true;
m_currentTestCaseName.clear();
m_objectIsTestStack.top() = true;
const auto sourceLocation = ast->firstSourceLocation();
m_testCaseLocation.m_name = m_currentDoc->fileName();
m_testCaseLocation.m_line = sourceLocation.startLine;
m_testCaseLocation.m_column = sourceLocation.startColumn - 1;
m_testCaseLocation.m_type = TestTreeItem::TestCase;
QuickTestCaseSpec currentSpec;
currentSpec.m_locationAndType.m_name = m_currentDoc->fileName();
currentSpec.m_locationAndType.m_line = sourceLocation.startLine;
currentSpec.m_locationAndType.m_column = sourceLocation.startColumn - 1;
currentSpec.m_locationAndType.m_type = TestTreeItem::TestCase;
m_caseParseStack.push(currentSpec);
return true;
}
void TestQmlVisitor::endVisit(QmlJS::AST::UiObjectDefinition *)
{
m_insideTestCase = m_objectStack.pop() == "TestCase";
if (!m_objectIsTestStack.isEmpty() && m_objectIsTestStack.pop() && !m_caseParseStack.isEmpty())
m_testCases << m_caseParseStack.pop();
}
bool TestQmlVisitor::visit(QmlJS::AST::ExpressionStatement *ast)
@@ -118,7 +119,7 @@ bool TestQmlVisitor::visit(QmlJS::AST::ExpressionStatement *ast)
bool TestQmlVisitor::visit(QmlJS::AST::UiScriptBinding *ast)
{
if (m_insideTestCase)
if (m_objectIsTestStack.top())
m_expectTestCaseName = ast->qualifiedId->name == "name";
return m_expectTestCaseName;
}
@@ -131,6 +132,9 @@ void TestQmlVisitor::endVisit(QmlJS::AST::UiScriptBinding *)
bool TestQmlVisitor::visit(QmlJS::AST::FunctionDeclaration *ast)
{
if (m_caseParseStack.isEmpty())
return false;
const QStringRef name = ast->name;
if (name.startsWith("test_")
|| name.startsWith("benchmark_")
@@ -148,15 +152,17 @@ bool TestQmlVisitor::visit(QmlJS::AST::FunctionDeclaration *ast)
else
locationAndType.m_type = TestTreeItem::TestFunction;
m_testFunctions.insert(name.toString(), locationAndType);
m_caseParseStack.top().m_functions.append(
QuickTestFunctionSpec{name.toString(), locationAndType});
}
return false;
}
bool TestQmlVisitor::visit(QmlJS::AST::StringLiteral *ast)
{
if (m_expectTestCaseName && m_currentTestCaseName.isEmpty()) {
m_currentTestCaseName = ast->value.toString();
if (m_expectTestCaseName) {
QTC_ASSERT(!m_caseParseStack.isEmpty(), return false);
m_caseParseStack.top().m_caseName = ast->value.toString();
m_expectTestCaseName = false;
}
return false;

View File

@@ -37,6 +37,21 @@
namespace Autotest {
namespace Internal {
class QuickTestFunctionSpec
{
public:
QString m_functionName;
TestCodeLocationAndType m_locationAndType;
};
class QuickTestCaseSpec
{
public:
QString m_caseName;
TestCodeLocationAndType m_locationAndType;
QVector<QuickTestFunctionSpec> m_functions;
};
class TestQmlVisitor : public QmlJS::AST::Visitor
{
public:
@@ -50,20 +65,15 @@ public:
bool visit(QmlJS::AST::FunctionDeclaration *ast) override;
bool visit(QmlJS::AST::StringLiteral *ast) override;
QString testCaseName() const { return m_currentTestCaseName; }
TestCodeLocationAndType testCaseLocation() const { return m_testCaseLocation; }
QMap<QString, TestCodeLocationAndType> testFunctions() const { return m_testFunctions; }
bool isValid() const { return m_typeIsTestCase; }
QVector<QuickTestCaseSpec> testCases() const { return m_testCases; }
bool isValid() const { return !m_testCases.isEmpty(); }
private:
QmlJS::Document::Ptr m_currentDoc;
QmlJS::Snapshot m_snapshot;
QString m_currentTestCaseName;
TestCodeLocationAndType m_testCaseLocation;
QMap<QString, TestCodeLocationAndType> m_testFunctions;
QStack<QString> m_objectStack;
bool m_typeIsTestCase = false;
bool m_insideTestCase = false;
QStack<QuickTestCaseSpec> m_caseParseStack;
QVector<QuickTestCaseSpec> m_testCases;
QStack<bool> m_objectIsTestStack;
bool m_expectTestCaseName = false;
};

View File

@@ -34,21 +34,38 @@ TestCase {
verify(blubb == bla, "Comparing concat equality")
}
// nested TestCases actually fail
// TestCase {
// name: "boo"
TestCase {
name: "boo"
// function test_boo() {
// verify(true);
// }
function test_boo() {
verify(true);
}
// TestCase {
// name: "far"
TestCase {
name: "far"
// function test_far() {
// verify(true);
// }
// }
// }
function test_far() {
verify(true);
}
}
function test_boo2() { // should not get added to "far", but to "boo"
verify(false);
}
}
TestCase {
name: "secondBoo"
function test_bar() {
compare(1, 1);
}
}
TestCase { // unnamed
function test_func() {
verify(true);
}
}
}

View File

@@ -357,10 +357,15 @@ Utils::CommandLine CMakeBuildStep::cmakeCommand(CMakeRunConfiguration *rc) const
QString target;
if (isCurrentExecutableTarget(m_buildTarget)) {
if (rc)
target = rc->buildKey().section('\n', 0, 0);
else
if (rc) {
target = rc->buildKey();
const int pos = target.indexOf("///::///");
if (pos >= 0) {
target = target.mid(pos + 8);
}
} else {
target = "<i>&lt;" + tr(ADD_RUNCONFIGURATION_TEXT) + "&gt;</i>";
}
} else {
target = m_buildTarget;
}

View File

@@ -42,6 +42,7 @@ find_package(Qt5WebEngineWidgets QUIET)
extend_qtc_plugin(Help
CONDITION TARGET Qt5::WebEngineWidgets
DEPENDS Qt5::WebEngineWidgets
DEFINES QTC_WEBENGINE_HELPVIEWER
SOURCES
webenginehelpviewer.cpp
webenginehelpviewer.h

View File

@@ -109,38 +109,4 @@
</customwidget>
</customwidgets>
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>PerfLoadDialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>PerfLoadDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>

View File

@@ -162,6 +162,33 @@ QVariant FileResourcesModel::modelNodeBackend() const
return QVariant();
}
bool filterMetaIcons(const QString &fileName)
{
QFileInfo info(fileName);
if (info.dir().path().split("/").contains("designer")) {
QDir currentDir = info.dir();
int i = 0;
while (!currentDir.isRoot() && i < 3) {
if (currentDir.dirName() == "designer") {
if (!currentDir.entryList({"*.metainfo"}).isEmpty())
return false;
}
currentDir.cdUp();
++i;
}
if (info.dir().dirName() == "designer")
return false;
}
return true;
}
void FileResourcesModel::setupModel()
{
m_lock = true;
@@ -174,7 +201,8 @@ void FileResourcesModel::setupModel()
QDirIterator it(m_dirPath.absolutePath(), filterList, QDir::Files, QDirIterator::Subdirectories);
while (it.hasNext()) {
QString absolutePath = it.next();
m_model.append(m_dirPath.relativeFilePath(absolutePath));
if (filterMetaIcons(absolutePath))
m_model.append(m_dirPath.relativeFilePath(absolutePath));
}
m_lock = false;

View File

@@ -142,7 +142,7 @@ void ChangePropertyVisitor::replaceMemberValue(UiObjectMember *propertyMember, b
if (publicMember->semicolonToken.isValid())
endOffset = publicMember->semicolonToken.end();
else
endOffset = publicMember->statement->lastSourceLocation().offset;
endOffset = publicMember->statement->lastSourceLocation().end();
} else {
startOffset = publicMember->lastSourceLocation().end();
endOffset = startOffset;

View File

@@ -97,7 +97,8 @@ QStringList globalQtEnums()
QStringList knownEnumScopes()
{
static const QStringList list = {
"TextInput", "TextEdit", "Material", "Universal", "Font", "Shape", "ShapePath", "AbstractButton"
"TextInput", "TextEdit", "Material", "Universal", "Font", "Shape", "ShapePath",
"AbstractButton", "Text"
};
return list;
}

View File

@@ -611,6 +611,8 @@ void tst_TestCore::testRewriterDynamicProperties()
const QString inThere = testRewriterView1->rootModelNode().variantProperty("vv").value().value<QString>();
QCOMPARE(inThere, QString("Hello"));
rootModelNode.variantProperty("vv").setDynamicTypeNameAndValue("variant", "hallo2");
// test model2text
// QPlainTextEdit textEdit2;
// textEdit2.setPlainText("import QtQuick 1.1; Item{}");

View File

@@ -139,6 +139,7 @@ def main():
switchViewTo(ViewConstants.EDIT)
# start debugging
clickButton(fancyDebugButton)
progressBarWait()
waitForObject(":Locals and Expressions_Debugger::Internal::WatchTreeView")
rootIndex = getQModelIndexStr("text='QQmlEngine'",
":Locals and Expressions_Debugger::Internal::WatchTreeView")
@@ -147,7 +148,9 @@ def main():
doubleClick(waitForObject(mainRect))
if not object.exists(":DebugModeWidget_Debugger::Internal::ConsoleView"):
invokeMenuItem("Window", "Output Panes", "QML Debugger Console")
progressBarWait()
# Window might be too small to show Locals, so close what we don't need
for view in ("Stack", "Breakpoints", "Expressions"):
invokeMenuItem("Window", "Views", view)
# color and float values have additional ZERO WIDTH SPACE (\u200b), different usage of
# whitespaces inside expressions is part of the test
checks = [("color", u"#\u200b008000"), ("width", "50"),

View File

@@ -94,7 +94,7 @@ def __processSubItems__(treeObjStr, section, parModelIndexStr, doneItems,
itObj = "%s occurrence='%d'}" % (itObj[:-1], alreadyDone + 1)
currentSelectedTreeItem = waitForObject(itObj, 3000)
tree.scrollTo(it)
mouseClick(currentSelectedTreeItem)
mouseClick(currentSelectedTreeItem, 5, 5, 0, Qt.LeftButton)
additionalFunc(indexName, *additionalParameters)
currentSelectedTreeItem = None
if model.rowCount(it) > 0:
@@ -210,6 +210,7 @@ def __getExpectedCompilers__():
compilers = ["g++", "gcc"]
if platform.system() in ('Linux', 'Darwin'):
compilers.extend(["clang++", "clang", "afl-clang"])
compilers.extend(findAllFilesInPATH("clang-[0-9]"))
compilers.extend(findAllFilesInPATH("clang-[0-9].[0-9]"))
compilers.extend(findAllFilesInPATH("*g++*"))
compilers.extend(findAllFilesInPATH("*gcc*"))

View File

@@ -4873,9 +4873,7 @@
"zoomin_overlay@2x.png" "7"
"zoomout_overlay.png" "7"
"zoomout_overlay@2x.png" "7"
"tooltip" "6"
"images" "7"
"f1.png" "8"
"f1.png" "7"
"utils_global.h" "4"
"utilsicons.cpp" "4"
"utilsicons.h" "4"
@@ -7576,10 +7574,8 @@
"debugger.qbs:248" "5"
"debuggerunittests.qrc" "5"
"/" "6"
"unit-tests" "7"
"simple" "8"
"main.cpp" "9"
"simple.pro" "9"
"main.cpp" "8"
"simple.pro" "8"
"Debugger dev headers" "3"
"debugger.qbs:6" "4"
"Group 1" "4"
1 text nestinglevel
4873 zoomin_overlay@2x.png 7
4874 zoomout_overlay.png 7
4875 zoomout_overlay@2x.png 7
4876 tooltip f1.png 6 7
images 7
f1.png 8
4877 utils_global.h 4
4878 utilsicons.cpp 4
4879 utilsicons.h 4
7574 debugger.qbs:248 5
7575 debuggerunittests.qrc 5
7576 / 6
7577 unit-tests main.cpp 7 8
7578 simple simple.pro 8
main.cpp 9
simple.pro 9
7579 Debugger dev headers 3
7580 debugger.qbs:6 4
7581 Group 1 4

View File

@@ -62,12 +62,10 @@ def main():
if not test.verify(object.exists(":Qt Creator_Core::OutputWindow"),
"Did the General Messages view show up?"):
openGeneralMessages()
# Verify messages appear once, from using default kit before configuring
# Verify message appears once, written before a kit was selected for qtcreator.pro
generalMessages = str(waitForObject(":Qt Creator_Core::OutputWindow").plainText)
test.compare(generalMessages.count("Project MESSAGE: Cannot build Qt Creator with Qt version 5.6.1."), 1,
"Warning about outdated Qt shown?")
test.compare(generalMessages.count("Project ERROR: Use at least Qt 5.9.0."), 1,
"Minimum Qt version shown (once when parsing with default kit, once with selected)?")
test.compare(generalMessages.count('Cannot parse project "qtcreator": No kit selected.'), 1,
'Warning about missing kit selection shown?')
# Verify that qmljs.g is in the project even when we don't know where (QTCREATORBUG-17609)
selectFromLocator("p qmljs.g", "qmljs.g")

View File

@@ -4259,9 +4259,7 @@
"zoomin_overlay@2x.png" "8"
"zoomout_overlay.png" "8"
"zoomout_overlay@2x.png" "8"
"tooltip" "7"
"images" "8"
"f1.png" "9"
"f1.png" "8"
"Other files" "3"
"utils.qbs" "4"
"utils_dependencies" "2"
@@ -7292,10 +7290,8 @@
"tracepointoverlay@2x.png" "7"
"debuggerunittests.qrc" "4"
"/" "5"
"unit-tests" "6"
"simple" "7"
"main.cpp" "8"
"simple.pro" "8"
"main.cpp" "7"
"simple.pro" "7"
"Other files" "3"
"debugger.qbs" "4"
"debugger_dependencies" "2"
@@ -18043,9 +18039,7 @@
"zoomin_overlay@2x.png" "8"
"zoomout_overlay.png" "8"
"zoomout_overlay@2x.png" "8"
"tooltip" "7"
"images" "8"
"f1.png" "9"
"f1.png" "8"
"Headers" "3"
"echoclangcodemodelserver.h" "4"
"Sources" "3"
@@ -19279,9 +19273,7 @@
"zoomin_overlay@2x.png" "9"
"zoomout_overlay.png" "9"
"zoomout_overlay@2x.png" "9"
"tooltip" "8"
"images" "9"
"f1.png" "10"
"f1.png" "9"
"gmock_dependency" "3"
"gmock_dependency.pri" "4"
"Headers" "4"
1 text nestinglevel
4259 zoomin_overlay@2x.png 8
4260 zoomout_overlay.png 8
4261 zoomout_overlay@2x.png 8
4262 tooltip f1.png 7 8
images 8
f1.png 9
4263 Other files 3
4264 utils.qbs 4
4265 utils_dependencies 2
7290 tracepointoverlay@2x.png 7
7291 debuggerunittests.qrc 4
7292 / 5
7293 unit-tests main.cpp 6 7
7294 simple simple.pro 7
main.cpp 8
simple.pro 8
7295 Other files 3
7296 debugger.qbs 4
7297 debugger_dependencies 2
18039 zoomin_overlay@2x.png 8
18040 zoomout_overlay.png 8
18041 zoomout_overlay@2x.png 8
18042 tooltip f1.png 7 8
images 8
f1.png 9
18043 Headers 3
18044 echoclangcodemodelserver.h 4
18045 Sources 3
19273 zoomin_overlay@2x.png 9
19274 zoomout_overlay.png 9
19275 zoomout_overlay@2x.png 9
19276 tooltip f1.png 8 9
images 9
f1.png 10
19277 gmock_dependency 3
19278 gmock_dependency.pri 4
19279 Headers 4