forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.10'
Conflicts: src/libs/utils/consoleprocess_win.cpp Change-Id: Ibdc265eed2f7080726e11ff6f2931c8559943af2
This commit is contained in:
@@ -286,6 +286,14 @@ function(enable_pch target)
|
|||||||
endif()
|
endif()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
|
function(qtc_output_binary_dir varName)
|
||||||
|
if (QTC_MERGE_BINARY_DIR)
|
||||||
|
set(${varName} ${QtCreator_BINARY_DIR} PARENT_SCOPE)
|
||||||
|
else()
|
||||||
|
set(${varName} ${PROJECT_BINARY_DIR} PARENT_SCOPE)
|
||||||
|
endif()
|
||||||
|
endfunction()
|
||||||
|
|
||||||
#
|
#
|
||||||
# Public API functions
|
# Public API functions
|
||||||
#
|
#
|
||||||
@@ -354,6 +362,7 @@ function(add_qtc_library name)
|
|||||||
set_property(SOURCE ${file} PROPERTY SKIP_AUTOMOC ON)
|
set_property(SOURCE ${file} PROPERTY SKIP_AUTOMOC ON)
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
|
qtc_output_binary_dir(_output_binary_dir)
|
||||||
set_target_properties(${name} PROPERTIES
|
set_target_properties(${name} PROPERTIES
|
||||||
SOURCES_DIR "${CMAKE_CURRENT_SOURCE_DIR}"
|
SOURCES_DIR "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||||
VERSION "${IDE_VERSION}"
|
VERSION "${IDE_VERSION}"
|
||||||
@@ -361,9 +370,9 @@ function(add_qtc_library name)
|
|||||||
VISIBILITY_INLINES_HIDDEN ON
|
VISIBILITY_INLINES_HIDDEN ON
|
||||||
BUILD_RPATH "${_LIB_RPATH}"
|
BUILD_RPATH "${_LIB_RPATH}"
|
||||||
INSTALL_RPATH "${_LIB_RPATH}"
|
INSTALL_RPATH "${_LIB_RPATH}"
|
||||||
RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/${IDE_BIN_PATH}"
|
RUNTIME_OUTPUT_DIRECTORY "${_output_binary_dir}/${IDE_BIN_PATH}"
|
||||||
LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/${IDE_LIBRARY_PATH}"
|
LIBRARY_OUTPUT_DIRECTORY "${_output_binary_dir}/${IDE_LIBRARY_PATH}"
|
||||||
ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/${IDE_LIBRARY_PATH}"
|
ARCHIVE_OUTPUT_DIRECTORY "${_output_binary_dir}/${IDE_LIBRARY_PATH}"
|
||||||
${_arg_PROPERTIES}
|
${_arg_PROPERTIES}
|
||||||
)
|
)
|
||||||
enable_pch(${name})
|
enable_pch(${name})
|
||||||
@@ -557,6 +566,7 @@ function(add_qtc_plugin target_name)
|
|||||||
set(plugin_dir "${_arg_PLUGIN_PATH}")
|
set(plugin_dir "${_arg_PLUGIN_PATH}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
qtc_output_binary_dir(_output_binary_dir)
|
||||||
set_target_properties(${target_name} PROPERTIES
|
set_target_properties(${target_name} PROPERTIES
|
||||||
SOURCES_DIR "${CMAKE_CURRENT_SOURCE_DIR}"
|
SOURCES_DIR "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||||
CXX_VISIBILITY_PRESET hidden
|
CXX_VISIBILITY_PRESET hidden
|
||||||
@@ -565,9 +575,9 @@ function(add_qtc_plugin target_name)
|
|||||||
_arg_VERSION "${_arg_VERSION}"
|
_arg_VERSION "${_arg_VERSION}"
|
||||||
BUILD_RPATH "${_PLUGIN_RPATH}"
|
BUILD_RPATH "${_PLUGIN_RPATH}"
|
||||||
INSTALL_RPATH "${_PLUGIN_RPATH}"
|
INSTALL_RPATH "${_PLUGIN_RPATH}"
|
||||||
LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/${plugin_dir}"
|
LIBRARY_OUTPUT_DIRECTORY "${_output_binary_dir}/${plugin_dir}"
|
||||||
ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/${plugin_dir}"
|
ARCHIVE_OUTPUT_DIRECTORY "${_output_binary_dir}/${plugin_dir}"
|
||||||
RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/${plugin_dir}"
|
RUNTIME_OUTPUT_DIRECTORY "${_output_binary_dir}/${plugin_dir}"
|
||||||
OUTPUT_NAME "${name}"
|
OUTPUT_NAME "${name}"
|
||||||
${_arg_PROPERTIES}
|
${_arg_PROPERTIES}
|
||||||
)
|
)
|
||||||
@@ -703,10 +713,11 @@ function(add_qtc_executable name)
|
|||||||
target_include_directories("${name}" PRIVATE "${CMAKE_BINARY_DIR}/src" ${_arg_INCLUDES})
|
target_include_directories("${name}" PRIVATE "${CMAKE_BINARY_DIR}/src" ${_arg_INCLUDES})
|
||||||
target_compile_definitions("${name}" PRIVATE ${_arg_DEFINES} ${TEST_DEFINES} ${DEFAULT_DEFINES})
|
target_compile_definitions("${name}" PRIVATE ${_arg_DEFINES} ${TEST_DEFINES} ${DEFAULT_DEFINES})
|
||||||
target_link_libraries("${name}" PRIVATE ${_arg_DEPENDS} ${_TEST_DEPENDS})
|
target_link_libraries("${name}" PRIVATE ${_arg_DEPENDS} ${_TEST_DEPENDS})
|
||||||
|
qtc_output_binary_dir(_output_binary_dir)
|
||||||
set_target_properties("${name}" PROPERTIES
|
set_target_properties("${name}" PROPERTIES
|
||||||
BUILD_RPATH "${_RPATH_BASE}/${_RELATIVE_LIB_PATH}"
|
BUILD_RPATH "${_RPATH_BASE}/${_RELATIVE_LIB_PATH}"
|
||||||
INSTALL_RPATH "${_RPATH_BASE}/${_RELATIVE_LIB_PATH}"
|
INSTALL_RPATH "${_RPATH_BASE}/${_RELATIVE_LIB_PATH}"
|
||||||
RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/${_DESTINATION}"
|
RUNTIME_OUTPUT_DIRECTORY "${_output_binary_dir}/${_DESTINATION}"
|
||||||
${_arg_PROPERTIES}
|
${_arg_PROPERTIES}
|
||||||
)
|
)
|
||||||
enable_pch(${name})
|
enable_pch(${name})
|
||||||
|
@@ -671,24 +671,6 @@
|
|||||||
|
|
||||||
\endtable
|
\endtable
|
||||||
|
|
||||||
\section1 Checking JSON Data Structure
|
|
||||||
|
|
||||||
\QC validates instances of JSON entities against
|
|
||||||
\l{http://tools.ietf.org/html/draft-zyp-json-schema-03}
|
|
||||||
{A JSON Media Type for Describing the Structure and Meaning of JSON Documents}.
|
|
||||||
However, \QC does not understand the entire specification.
|
|
||||||
|
|
||||||
A JSON schema defines the structure of JSON data. It determines what JSON
|
|
||||||
data is required for an application and how to interact with it.
|
|
||||||
|
|
||||||
The specification does not define how to map JSON instances with JSON
|
|
||||||
schemas. \QC looks for a JSON schema file with a name that matches the
|
|
||||||
name of the JSON instance file in the user configuration folder. For
|
|
||||||
example, \c {~/config/QtProject/qtcreator/json} on Linux and \macos and
|
|
||||||
\c {C:\Users\username\AppData\Roaming\QtCreator\qtcreator\json} on
|
|
||||||
Windows. To check JSON data structure, copy the JSON schema file to the
|
|
||||||
above folder.
|
|
||||||
|
|
||||||
\section1 Resetting the Code Model
|
\section1 Resetting the Code Model
|
||||||
|
|
||||||
If you change the build and run kit when you have QML files open in the code
|
If you change the build and run kit when you have QML files open in the code
|
||||||
|
@@ -533,6 +533,14 @@ Column {
|
|||||||
visible: false
|
visible: false
|
||||||
|
|
||||||
function applyPreset() {
|
function applyPreset() {
|
||||||
|
if (!gradientLine.hasGradient)
|
||||||
|
{
|
||||||
|
if (colorEditor.shapeGradients)
|
||||||
|
gradientLine.gradientTypeName = "LinearGradient"
|
||||||
|
else
|
||||||
|
gradientLine.gradientTypeName = "Gradient"
|
||||||
|
}
|
||||||
|
|
||||||
if (presetList.gradientData.presetType == 0) {
|
if (presetList.gradientData.presetType == 0) {
|
||||||
gradientLine.setPresetByID(presetList.gradientData.presetID);
|
gradientLine.setPresetByID(presetList.gradientData.presetID);
|
||||||
}
|
}
|
||||||
|
@@ -62,9 +62,7 @@ StudioControls.ComboBox {
|
|||||||
ColorLogic {
|
ColorLogic {
|
||||||
id: colorLogic
|
id: colorLogic
|
||||||
backendValue: comboBox.backendValue
|
backendValue: comboBox.backendValue
|
||||||
onValueFromBackendChanged: {
|
onValueFromBackendChanged: invalidate()
|
||||||
invalidate();
|
|
||||||
}
|
|
||||||
|
|
||||||
function invalidate() {
|
function invalidate() {
|
||||||
|
|
||||||
@@ -74,9 +72,9 @@ StudioControls.ComboBox {
|
|||||||
block = true
|
block = true
|
||||||
|
|
||||||
if (manualMapping) {
|
if (manualMapping) {
|
||||||
valueFromBackendChanged();
|
comboBox.valueFromBackendChanged()
|
||||||
} else if (!comboBox.useInteger) {
|
} else if (!comboBox.useInteger) {
|
||||||
var enumString = comboBox.backendValue.enumeration;
|
var enumString = comboBox.backendValue.enumeration
|
||||||
|
|
||||||
if (enumString === "")
|
if (enumString === "")
|
||||||
enumString = comboBox.backendValue.value
|
enumString = comboBox.backendValue.value
|
||||||
@@ -100,24 +98,23 @@ StudioControls.ComboBox {
|
|||||||
|
|
||||||
onActivated: {
|
onActivated: {
|
||||||
if (!__isCompleted)
|
if (!__isCompleted)
|
||||||
return;
|
return
|
||||||
|
|
||||||
if (backendValue === undefined)
|
if (backendValue === undefined)
|
||||||
return;
|
return
|
||||||
|
|
||||||
if (manualMapping)
|
if (manualMapping)
|
||||||
return;
|
return
|
||||||
|
|
||||||
if (!comboBox.useInteger) {
|
if (!comboBox.useInteger) {
|
||||||
backendValue.setEnumeration(comboBox.scope, comboBox.currentText);
|
backendValue.setEnumeration(comboBox.scope, comboBox.currentText)
|
||||||
} else {
|
} else {
|
||||||
backendValue.value = comboBox.currentIndex;
|
backendValue.value = comboBox.currentIndex
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
colorLogic.invalidate()
|
colorLogic.invalidate()
|
||||||
__isCompleted = true;
|
__isCompleted = true
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -48,6 +48,7 @@ Dialog {
|
|||||||
property int stopsCount;
|
property int stopsCount;
|
||||||
property int presetID;
|
property int presetID;
|
||||||
property int presetType; //default(0) or custom(1)
|
property int presetType; //default(0) or custom(1)
|
||||||
|
property Item selectedItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
function addGradient(stopsPositions, stopsColors, stopsCount) {
|
function addGradient(stopsPositions, stopsColors, stopsCount) {
|
||||||
|
@@ -64,7 +64,6 @@ Rectangle {
|
|||||||
clip: true
|
clip: true
|
||||||
delegate: gradientDelegate
|
delegate: gradientDelegate
|
||||||
|
|
||||||
|
|
||||||
property int gridColumns: width / tabBackground.gridCellWidth;
|
property int gridColumns: width / tabBackground.gridCellWidth;
|
||||||
cellWidth: width / gridColumns
|
cellWidth: width / gridColumns
|
||||||
cellHeight: 180
|
cellHeight: 180
|
||||||
@@ -78,6 +77,8 @@ Rectangle {
|
|||||||
clip: false
|
clip: false
|
||||||
|
|
||||||
property real flexibleWidth: (gradientTable.width - gradientTable.cellWidth * gradientTable.gridColumns) / gradientTable.gridColumns
|
property real flexibleWidth: (gradientTable.width - gradientTable.cellWidth * gradientTable.gridColumns) / gradientTable.gridColumns
|
||||||
|
property bool isSelected: false
|
||||||
|
|
||||||
width: gradientTable.cellWidth + flexibleWidth - 8; height: tabBackground.delegateHeight
|
width: gradientTable.cellWidth + flexibleWidth - 8; height: tabBackground.delegateHeight
|
||||||
radius: 16
|
radius: 16
|
||||||
|
|
||||||
@@ -93,7 +94,11 @@ Rectangle {
|
|||||||
gradientData.presetID = presetID;
|
gradientData.presetID = presetID;
|
||||||
gradientData.presetType = presetTabView.currentIndex
|
gradientData.presetType = presetTabView.currentIndex
|
||||||
|
|
||||||
// console.log( "#" + preset + " " + presetName + " Stops: " + stopsPosList + " Colors: " + stopsColorList);
|
if (gradientData.selectedItem != null)
|
||||||
|
gradientData.selectedItem.isSelected = false
|
||||||
|
|
||||||
|
backgroundCard.isSelected = true
|
||||||
|
gradientData.selectedItem = backgroundCard
|
||||||
}
|
}
|
||||||
onEntered: {
|
onEntered: {
|
||||||
if (backgroundCard.state != "CLICKED") {
|
if (backgroundCard.state != "CLICKED") {
|
||||||
@@ -107,6 +112,13 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
} //mouseArea
|
} //mouseArea
|
||||||
|
|
||||||
|
onIsSelectedChanged: {
|
||||||
|
if (isSelected)
|
||||||
|
backgroundCard.state = "CLICKED"
|
||||||
|
else
|
||||||
|
backgroundCard.state = "USUAL"
|
||||||
|
}
|
||||||
|
|
||||||
states: [
|
states: [
|
||||||
State {
|
State {
|
||||||
name: "HOVER"
|
name: "HOVER"
|
||||||
@@ -119,6 +131,17 @@ Rectangle {
|
|||||||
border.color: "#029de0"
|
border.color: "#029de0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
State {
|
||||||
|
name: "CLICKED"
|
||||||
|
PropertyChanges {
|
||||||
|
target: backgroundCard
|
||||||
|
color:"#029de0"
|
||||||
|
z: 4
|
||||||
|
clip: true
|
||||||
|
border.width: 1
|
||||||
|
border.color: "#606060"
|
||||||
|
}
|
||||||
|
},
|
||||||
State {
|
State {
|
||||||
name: "USUAL"
|
name: "USUAL"
|
||||||
PropertyChanges
|
PropertyChanges
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -329,7 +329,7 @@ bool ConsoleProcess::startTerminalEmulator(QSettings *settings, const QString &w
|
|||||||
// cmdLine is assumed to be detached -
|
// cmdLine is assumed to be detached -
|
||||||
// https://blogs.msdn.microsoft.com/oldnewthing/20090601-00/?p=18083
|
// https://blogs.msdn.microsoft.com/oldnewthing/20090601-00/?p=18083
|
||||||
|
|
||||||
QString totalEnvironment = env.toStringList().join(QChar('\0')) + '\0';
|
QString totalEnvironment = env.toStringList().join(QChar(QChar::Null)) + QChar(QChar::Null);
|
||||||
LPVOID envPtr = (env != Environment::systemEnvironment())
|
LPVOID envPtr = (env != Environment::systemEnvironment())
|
||||||
? (WCHAR *)(totalEnvironment.utf16()) : nullptr;
|
? (WCHAR *)(totalEnvironment.utf16()) : nullptr;
|
||||||
|
|
||||||
|
@@ -131,13 +131,13 @@ void AutoTestUnitTests::testCodeParser_data()
|
|||||||
<< 1 << 0 << 0 << 0;
|
<< 1 << 0 << 0 << 0;
|
||||||
QTest::newRow("mixedAutoTestAndQuickTests")
|
QTest::newRow("mixedAutoTestAndQuickTests")
|
||||||
<< QString(m_tmpDir->path() + "/mixed_atp/mixed_atp.pro")
|
<< QString(m_tmpDir->path() + "/mixed_atp/mixed_atp.pro")
|
||||||
<< 4 << 10 << 4 << 10;
|
<< 4 << 10 << 5 << 10;
|
||||||
QTest::newRow("plainAutoTestQbs")
|
QTest::newRow("plainAutoTestQbs")
|
||||||
<< QString(m_tmpDir->path() + "/plain/plain.qbs")
|
<< QString(m_tmpDir->path() + "/plain/plain.qbs")
|
||||||
<< 1 << 0 << 0 << 0;
|
<< 1 << 0 << 0 << 0;
|
||||||
QTest::newRow("mixedAutoTestAndQuickTestsQbs")
|
QTest::newRow("mixedAutoTestAndQuickTestsQbs")
|
||||||
<< QString(m_tmpDir->path() + "/mixed_atp/mixed_atp.qbs")
|
<< QString(m_tmpDir->path() + "/mixed_atp/mixed_atp.qbs")
|
||||||
<< 4 << 10 << 4 << 10;
|
<< 4 << 10 << 5 << 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AutoTestUnitTests::testCodeParserSwitchStartup()
|
void AutoTestUnitTests::testCodeParserSwitchStartup()
|
||||||
@@ -184,7 +184,7 @@ void AutoTestUnitTests::testCodeParserSwitchStartup_data()
|
|||||||
|
|
||||||
QList<int> expectedAutoTests = QList<int>() << 1 << 4 << 1 << 4;
|
QList<int> expectedAutoTests = QList<int>() << 1 << 4 << 1 << 4;
|
||||||
QList<int> expectedNamedQuickTests = QList<int>() << 0 << 10 << 0 << 10;
|
QList<int> expectedNamedQuickTests = QList<int>() << 0 << 10 << 0 << 10;
|
||||||
QList<int> expectedUnnamedQuickTests = QList<int>() << 0 << 4 << 0 << 4;
|
QList<int> expectedUnnamedQuickTests = QList<int>() << 0 << 5 << 0 << 5;
|
||||||
QList<int> expectedDataTagsCount = QList<int>() << 0 << 10 << 0 << 10;
|
QList<int> expectedDataTagsCount = QList<int>() << 0 << 10 << 0 << 10;
|
||||||
|
|
||||||
QTest::newRow("loadMultipleProjects")
|
QTest::newRow("loadMultipleProjects")
|
||||||
|
@@ -95,7 +95,8 @@ bool QtTestResult::isDirectParentOf(const TestResult *other, bool *needsIntermed
|
|||||||
return qtOther->m_dataTag == m_dataTag;
|
return qtOther->m_dataTag == m_dataTag;
|
||||||
}
|
}
|
||||||
} else if (qtOther->isTestFunction()) {
|
} else if (qtOther->isTestFunction()) {
|
||||||
return isTestCase() || m_function == qtOther->m_function;
|
return isTestCase() || (m_function == qtOther->m_function
|
||||||
|
&& qtOther->result() != ResultType::TestStart);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@@ -329,7 +329,8 @@ TestTreeItem *QuickTestTreeItem::find(const TestParseResult *result)
|
|||||||
case GroupNode:
|
case GroupNode:
|
||||||
return findChildByNameAndFile(result->name, result->fileName);
|
return findChildByNameAndFile(result->name, result->fileName);
|
||||||
case TestCase:
|
case TestCase:
|
||||||
return name().isEmpty() ? findChildByNameAndFile(result->name, result->fileName)
|
return name().isEmpty() ? findChildByNameFileAndLine(result->name, result->fileName,
|
||||||
|
result->line)
|
||||||
: findChildByName(result->name);
|
: findChildByName(result->name);
|
||||||
default:
|
default:
|
||||||
return nullptr;
|
return nullptr;
|
||||||
@@ -351,7 +352,8 @@ TestTreeItem *QuickTestTreeItem::findChild(const TestTreeItem *other)
|
|||||||
case TestCase:
|
case TestCase:
|
||||||
if (otherType != TestFunction && otherType != TestDataFunction && otherType != TestSpecialFunction)
|
if (otherType != TestFunction && otherType != TestDataFunction && otherType != TestSpecialFunction)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
return name().isEmpty() ? findChildByNameAndFile(other->name(), other->filePath())
|
return name().isEmpty() ? findChildByNameFileAndLine(other->name(), other->filePath(),
|
||||||
|
other->line())
|
||||||
: findChildByName(other->name());
|
: findChildByName(other->name());
|
||||||
default:
|
default:
|
||||||
return nullptr;
|
return nullptr;
|
||||||
@@ -368,8 +370,7 @@ bool QuickTestTreeItem::modify(const TestParseResult *result)
|
|||||||
case TestFunction:
|
case TestFunction:
|
||||||
case TestDataFunction:
|
case TestDataFunction:
|
||||||
case TestSpecialFunction:
|
case TestSpecialFunction:
|
||||||
return name().isEmpty() ? modifyLineAndColumn(result)
|
return modifyTestFunctionContent(result);
|
||||||
: modifyTestFunctionContent(result);
|
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -454,6 +455,14 @@ TestTreeItem *QuickTestTreeItem::findChildByFileNameAndType(const QString &fileP
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TestTreeItem *QuickTestTreeItem::findChildByNameFileAndLine(const QString &name,
|
||||||
|
const QString &filePath, unsigned line)
|
||||||
|
{
|
||||||
|
return findFirstLevelChild([name, filePath, line](const TestTreeItem *other) {
|
||||||
|
return other->filePath() == filePath && other->line() == line && other->name() == name;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
TestTreeItem *QuickTestTreeItem::unnamedQuickTests() const
|
TestTreeItem *QuickTestTreeItem::unnamedQuickTests() const
|
||||||
{
|
{
|
||||||
if (type() != Root)
|
if (type() != Root)
|
||||||
|
@@ -59,6 +59,8 @@ public:
|
|||||||
private:
|
private:
|
||||||
TestTreeItem *findChildByFileNameAndType(const QString &filePath, const QString &name,
|
TestTreeItem *findChildByFileNameAndType(const QString &filePath, const QString &name,
|
||||||
Type tType);
|
Type tType);
|
||||||
|
TestTreeItem *findChildByNameFileAndLine(const QString &name, const QString &filePath,
|
||||||
|
unsigned line);
|
||||||
TestTreeItem *unnamedQuickTests() const;
|
TestTreeItem *unnamedQuickTests() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -152,8 +152,17 @@ bool TestQmlVisitor::visit(QmlJS::AST::FunctionDeclaration *ast)
|
|||||||
else
|
else
|
||||||
locationAndType.m_type = TestTreeItem::TestFunction;
|
locationAndType.m_type = TestTreeItem::TestFunction;
|
||||||
|
|
||||||
m_caseParseStack.top().m_functions.append(
|
const QString nameStr = name.toString();
|
||||||
QuickTestFunctionSpec{name.toString(), locationAndType});
|
// identical test functions inside the same file are not working - will fail at runtime
|
||||||
|
if (!Utils::anyOf(m_caseParseStack.top().m_functions,
|
||||||
|
[nameStr, locationAndType](const QuickTestFunctionSpec func) {
|
||||||
|
return func.m_locationAndType.m_type == locationAndType.m_type
|
||||||
|
&& func.m_functionName == nameStr
|
||||||
|
&& func.m_locationAndType.m_name == locationAndType.m_name;
|
||||||
|
})) {
|
||||||
|
m_caseParseStack.top().m_functions.append(
|
||||||
|
QuickTestFunctionSpec{nameStr, locationAndType});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -67,5 +67,11 @@ TestCase {
|
|||||||
verify(true);
|
verify(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TestCase { // 2nd unnamed with same function name - legal as long it's a different TestCase
|
||||||
|
function test_func() {
|
||||||
|
verify(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -440,7 +440,6 @@ void ILocatorFilter::setConfigurable(bool configurable)
|
|||||||
|
|
||||||
\sa prepareSearch()
|
\sa prepareSearch()
|
||||||
\sa caseSensitivity()
|
\sa caseSensitivity()
|
||||||
\sa containsWildcard()
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@@ -55,6 +55,11 @@ QString DiffEditorController::baseDirectory() const
|
|||||||
return m_document->baseDirectory();
|
return m_document->baseDirectory();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DiffEditorController::setBaseDirectory(const QString &directory)
|
||||||
|
{
|
||||||
|
m_document->setBaseDirectory(directory);
|
||||||
|
}
|
||||||
|
|
||||||
int DiffEditorController::contextLineCount() const
|
int DiffEditorController::contextLineCount() const
|
||||||
{
|
{
|
||||||
return m_document->contextLineCount();
|
return m_document->contextLineCount();
|
||||||
|
@@ -48,6 +48,7 @@ public:
|
|||||||
bool isReloading() const;
|
bool isReloading() const;
|
||||||
|
|
||||||
QString baseDirectory() const;
|
QString baseDirectory() const;
|
||||||
|
void setBaseDirectory(const QString &directory);
|
||||||
int contextLineCount() const;
|
int contextLineCount() const;
|
||||||
bool ignoreWhitespace() const;
|
bool ignoreWhitespace() const;
|
||||||
|
|
||||||
|
@@ -113,7 +113,8 @@ void DiffEditorDocument::setDiffFiles(const QList<FileData> &data, const QString
|
|||||||
const QString &startupFile)
|
const QString &startupFile)
|
||||||
{
|
{
|
||||||
m_diffFiles = data;
|
m_diffFiles = data;
|
||||||
m_baseDirectory = directory;
|
if (!directory.isEmpty())
|
||||||
|
m_baseDirectory = directory;
|
||||||
m_startupFile = startupFile;
|
m_startupFile = startupFile;
|
||||||
emit documentChanged();
|
emit documentChanged();
|
||||||
}
|
}
|
||||||
@@ -128,6 +129,11 @@ QString DiffEditorDocument::baseDirectory() const
|
|||||||
return m_baseDirectory;
|
return m_baseDirectory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DiffEditorDocument::setBaseDirectory(const QString &directory)
|
||||||
|
{
|
||||||
|
m_baseDirectory = directory;
|
||||||
|
}
|
||||||
|
|
||||||
QString DiffEditorDocument::startupFile() const
|
QString DiffEditorDocument::startupFile() const
|
||||||
{
|
{
|
||||||
return m_startupFile;
|
return m_startupFile;
|
||||||
|
@@ -60,6 +60,7 @@ public:
|
|||||||
const QString &startupFile = QString());
|
const QString &startupFile = QString());
|
||||||
QList<FileData> diffFiles() const;
|
QList<FileData> diffFiles() const;
|
||||||
QString baseDirectory() const;
|
QString baseDirectory() const;
|
||||||
|
void setBaseDirectory(const QString &directory);
|
||||||
QString startupFile() const;
|
QString startupFile() const;
|
||||||
|
|
||||||
void setDescription(const QString &description);
|
void setDescription(const QString &description);
|
||||||
|
@@ -183,11 +183,12 @@ void StatesEditorModel::renameState(int internalNodeId, const QString &newName)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (newName.isEmpty() ||! m_statesEditorView->validStateName(newName)) {
|
if (newName.isEmpty() ||! m_statesEditorView->validStateName(newName)) {
|
||||||
auto w = Core::AsynchronousMessageBox::warning(tr("Invalid state name"),
|
QTimer::singleShot(0, [newName]{
|
||||||
newName.isEmpty() ?
|
auto w = Core::AsynchronousMessageBox::warning(tr("Invalid state name"),
|
||||||
tr("The empty string as a name is reserved for the base state.") :
|
newName.isEmpty() ?
|
||||||
tr("Name already used in another state"));
|
tr("The empty string as a name is reserved for the base state.") :
|
||||||
w->setAttribute(Qt::WA_ShowModal, false);
|
tr("Name already used in another state"));
|
||||||
|
});
|
||||||
reset();
|
reset();
|
||||||
} else {
|
} else {
|
||||||
m_statesEditorView->renameState(internalNodeId, newName);
|
m_statesEditorView->renameState(internalNodeId, newName);
|
||||||
|
@@ -169,7 +169,6 @@ void TimelineGraphicsScene::setWidth(int width)
|
|||||||
void TimelineGraphicsScene::invalidateLayout()
|
void TimelineGraphicsScene::invalidateLayout()
|
||||||
{
|
{
|
||||||
m_layout->invalidate();
|
m_layout->invalidate();
|
||||||
toolBar()->setCurrentTimeline(currentTimeline());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TimelineGraphicsScene::setCurrenFrame(const QmlTimeline &timeline, qreal frame)
|
void TimelineGraphicsScene::setCurrenFrame(const QmlTimeline &timeline, qreal frame)
|
||||||
|
@@ -149,6 +149,11 @@ void TimelineView::nodeReparented(const ModelNode &node,
|
|||||||
newPropertyParent.parentModelNode())) {
|
newPropertyParent.parentModelNode())) {
|
||||||
QmlTimelineKeyframeGroup frames(newPropertyParent.parentModelNode());
|
QmlTimelineKeyframeGroup frames(newPropertyParent.parentModelNode());
|
||||||
m_timelineWidget->graphicsScene()->invalidateSectionForTarget(frames.target());
|
m_timelineWidget->graphicsScene()->invalidateSectionForTarget(frames.target());
|
||||||
|
|
||||||
|
QmlTimeline currentTimeline = m_timelineWidget->graphicsScene()->currentTimeline();
|
||||||
|
if (currentTimeline.isValid())
|
||||||
|
m_timelineWidget->toolBar()->setCurrentTimeline(currentTimeline);
|
||||||
|
|
||||||
} else if (QmlTimelineKeyframeGroup::checkKeyframesType(
|
} else if (QmlTimelineKeyframeGroup::checkKeyframesType(
|
||||||
node)) { /* During copy and paste type info might be incomplete */
|
node)) { /* During copy and paste type info might be incomplete */
|
||||||
QmlTimelineKeyframeGroup frames(node);
|
QmlTimelineKeyframeGroup frames(node);
|
||||||
|
@@ -236,6 +236,7 @@ VcsBaseDiffEditorController::VcsBaseDiffEditorController(IDocument *document,
|
|||||||
: DiffEditorController(document)
|
: DiffEditorController(document)
|
||||||
, d(new VcsBaseDiffEditorControllerPrivate(this, client, workingDirectory))
|
, d(new VcsBaseDiffEditorControllerPrivate(this, client, workingDirectory))
|
||||||
{
|
{
|
||||||
|
setBaseDirectory(workingDirectory);
|
||||||
}
|
}
|
||||||
|
|
||||||
VcsBaseDiffEditorController::~VcsBaseDiffEditorController()
|
VcsBaseDiffEditorController::~VcsBaseDiffEditorController()
|
||||||
|
@@ -17,7 +17,7 @@ add_qtc_executable(iostool
|
|||||||
|
|
||||||
if (TARGET iostool)
|
if (TARGET iostool)
|
||||||
if (CMAKE_VERSION VERSION_LESS 3.13)
|
if (CMAKE_VERSION VERSION_LESS 3.13)
|
||||||
target_link_libraries(iostool "-Wl,-sectcreate,__TEXT,__info_plist,${CMAKE_CURRENT_SOURCE_DIR}/Info.plist")
|
target_link_libraries(iostool PRIVATE "-Wl,-sectcreate,__TEXT,__info_plist,${CMAKE_CURRENT_SOURCE_DIR}/Info.plist")
|
||||||
else()
|
else()
|
||||||
target_link_options(iostool PRIVATE "-Wl,-sectcreate,__TEXT,__info_plist,${CMAKE_CURRENT_SOURCE_DIR}/Info.plist")
|
target_link_options(iostool PRIVATE "-Wl,-sectcreate,__TEXT,__info_plist,${CMAKE_CURRENT_SOURCE_DIR}/Info.plist")
|
||||||
endif()
|
endif()
|
||||||
|
Reference in New Issue
Block a user