diff --git a/cmake/QtCreatorTranslations.cmake b/cmake/QtCreatorTranslations.cmake index 94f28663483..7379f1e60cc 100644 --- a/cmake/QtCreatorTranslations.cmake +++ b/cmake/QtCreatorTranslations.cmake @@ -33,12 +33,13 @@ function(_extract_ts_data_from_targets outprefix) # exclude various funny source files, and anything generated # like *metatypes.json.gen, moc_*.cpp, qrc_*.cpp, */qmlcache/*.cpp, # *qmltyperegistrations.cpp + string(REGEX REPLACE "(\\^|\\$|\\.|\\[|\\]|\\*|\\+|\\?|\\(|\\)|\\|)" "\\\\\\1" binary_dir_regex "${PROJECT_BINARY_DIR}") set(_exclude_patterns .*[.]json[.]in .*[.]svg .*[.]pro .*[.]css - "${PROJECT_BINARY_DIR}/.*" + "${binary_dir_regex}/.*" ) list(JOIN _exclude_patterns "|" _exclude_pattern) list(FILTER _source_files EXCLUDE REGEX "${_exclude_pattern}") diff --git a/qbs/imports/QtcProduct.qbs b/qbs/imports/QtcProduct.qbs index 9c2eb6be880..e5f341704df 100644 --- a/qbs/imports/QtcProduct.qbs +++ b/qbs/imports/QtcProduct.qbs @@ -13,6 +13,7 @@ Product { property string fileName: FileInfo.fileName(sourceDirectory) + ".qbs" property bool useNonGuiPchFile: false property bool useGuiPchFile: false + property bool useQt: true property string pathToSharedSources: FileInfo.joinPaths(path, FileInfo.relativePath(FileInfo.joinPaths('/', qtc.ide_qbs_imports_path), FileInfo.joinPaths('/', qtc.ide_shared_sources_path))) @@ -28,8 +29,12 @@ Product { enableFallback: false } } - Depends { name: "Qt.core"; versionAtLeast: "6.2.0" } - Depends { name: "Qt.core5compat" } + Depends { + name: "Qt" + condition: useQt + submodules: ["core", "core5compat"] + versionAtLeast: "6.2.0" + } // TODO: Should fall back to what came from Qt.core for Qt < 5.7, but we cannot express that // atm. Conditionally pulling in a module that sets the property is also not possible, @@ -75,7 +80,7 @@ Product { cpp.cxxLanguageVersion: "c++17" cpp.defines: qtc.generalDefines cpp.minimumWindowsVersion: "6.1" - cpp.useCxxPrecompiledHeader: useNonGuiPchFile || useGuiPchFile + cpp.useCxxPrecompiledHeader: useQt && (useNonGuiPchFile || useGuiPchFile) cpp.visibility: "minimal" Group { diff --git a/share/qtcreator/debugger/cdbbridge.py b/share/qtcreator/debugger/cdbbridge.py index f19d8dedf9b..a9d86e24ee1 100644 --- a/share/qtcreator/debugger/cdbbridge.py +++ b/share/qtcreator/debugger/cdbbridge.py @@ -147,11 +147,12 @@ class Dumper(DumperBase): code = nativeType.code() if code == TypeCode.Pointer: - if not nativeType.name().startswith(''): + if nativeType.name().startswith(''): + code = TypeCode.Function + elif nativeType.targetName() != nativeType.name(): targetType = self.lookupType(nativeType.targetName(), nativeType.moduleId()) - if targetType is not None: + if targetType is not None and targetType is not nativeType: return self.createPointerType(targetType) - code = TypeCode.Function if code == TypeCode.Array: # cdb reports virtual function tables as arrays those ar handled separetly by diff --git a/share/qtcreator/debugger/libcpp_stdtypes.py b/share/qtcreator/debugger/libcpp_stdtypes.py index 5a72629da75..1e0b852dc0b 100644 --- a/share/qtcreator/debugger/libcpp_stdtypes.py +++ b/share/qtcreator/debugger/libcpp_stdtypes.py @@ -163,7 +163,123 @@ def qdump__std____1__stack(d, value): d.putBetterType(value.type) -def std_1_string_dumper(d, value): +def GetChildMemberWithName(value: DumperBase.Value, name: str) -> DumperBase.Value: + members: list[DumperBase.Value] = value.members(True) + + for member in members: + if member.name == name: + return member + return None + + +def GetIndexOfChildWithName(value: DumperBase.Value, name: str) -> int: + members: list[DumperBase.Value] = value.members(True) + + for i, member in enumerate(members): + if member.name == name: + return i + return None + + +class StringLayout: + CSD = 0 + DSC = 1 + + +def std_1_string_dumper_v2(d, value): + charType = value['__l']['__data_'].dereference().type + + R = GetChildMemberWithName(value, "__r_") + if not R: + raise Exception("Could not find __r_") + + # __r_ is a compressed_pair of the actual data and the allocator. The data we + # want is in the first base class. + R_Base_SP = R[0] + + if not R_Base_SP: + raise Exception("Could not find R_Base_SP") + + Rep_Sp = GetChildMemberWithName(R_Base_SP, "__value_") + + if not Rep_Sp: + raise Exception("Could not find __value_") + + # Our layout seems a little different + Rep_Sp = Rep_Sp[0] + + if not Rep_Sp: + raise Exception("Could not find Rep_Sp") + + L = GetChildMemberWithName(Rep_Sp, "__l") + + if not L: + raise Exception("Could not find __l") + + layout = StringLayout.CSD + if GetIndexOfChildWithName(L, "__data_") == 0: + layout = StringLayout.DSC + + short_mode = False + using_bitmasks = True + size = 0 + size_mode_value = 0 + + Short_Sp = GetChildMemberWithName(Rep_Sp, "__s") + if not Short_Sp: + raise Exception("Could not find __s") + + Is_Long: DumperBase.Value = GetChildMemberWithName(Short_Sp, "__is_long_") + Size_Sp: DumperBase.Value = GetChildMemberWithName(Short_Sp, "__size_") + if not Size_Sp: + raise Exception("Could not find __size_") + + if Is_Long: + using_bitmasks = False + short_mode = Is_Long.integer() == 0 + size = Size_Sp.integer() + else: + size_mode_value = Size_Sp.integer() + mode_mask = 1 + if layout == StringLayout.DSC: + mode_mask = 0x80 + short_mode = (size_mode_value & mode_mask) == 0 + + if short_mode: + Location_Sp = GetChildMemberWithName(Short_Sp, "__data_") + + if using_bitmasks: + size = ((size_mode_value >> 1) % 256) + if layout == StringLayout.DSC: + size = size_mode_value + + # The string is most likely not initialized yet + if size > 100 or not Location_Sp: + raise Exception("Probably not initialized yet") + + d.putCharArrayHelper(d.extractPointer(Location_Sp), size, + charType, d.currentItemFormat()) + return + + Location_Sp = GetChildMemberWithName(L, "__data_") + Size_Vo = GetChildMemberWithName(L, "__size_") + Capacity_Vo = GetChildMemberWithName(L, "__cap_") + + if not Location_Sp or not Size_Vo or not Capacity_Vo: + raise Exception("Could not find Location_Sp, Size_Vo or Capacity_Vo") + + size = Size_Vo.integer() + capacity = Capacity_Vo.integer() + if not using_bitmasks and layout == StringLayout.CSD: + capacity *= 2 + if capacity < size: + raise Exception("Capacity is less than size") + + d.putCharArrayHelper(d.extractPointer(Location_Sp), size, + charType, d.currentItemFormat()) + + +def std_1_string_dumper_v1(d, value): charType = value['__l']['__data_'].dereference().type D = None @@ -245,13 +361,24 @@ def std_1_string_dumper(d, value): return - def qdump__std____1__string(d, value): - std_1_string_dumper(d, value) + try: + std_1_string_dumper_v2(d, value) + except Exception as eV2: + try: + std_1_string_dumper_v1(d, value) + except Exception as eV1: + d.putValue("Could not parse: %s, %s" % (eV1, eV2)) def qdump__std____1__wstring(d, value): - std_1_string_dumper(d, value) + try: + std_1_string_dumper_v2(d, value) + except Exception as eV2: + try: + std_1_string_dumper_v1(d, value) + except Exception as eV1: + d.putValue("Could not parse: %s, %s" % (eV1, eV2)) def qdump__std____1__basic_string(d, value): diff --git a/src/libs/3rdparty/winpty/winpty.qbs b/src/libs/3rdparty/winpty/winpty.qbs index 63d76113646..f6160fe9e62 100644 --- a/src/libs/3rdparty/winpty/winpty.qbs +++ b/src/libs/3rdparty/winpty/winpty.qbs @@ -56,8 +56,7 @@ Project { Depends { name: "winpty_genversion_header" } Depends { name: "cpp" } - useNonGuiPchFile: false - useGuiPchFile: false + useQt: false cpp.includePaths: base.concat([sourceDirectory + "/include", buildDirectory]) cpp.defines: base.concat(["WINPTY_AGENT_ASSERT", diff --git a/src/libs/advanceddockingsystem/dockmanager.cpp b/src/libs/advanceddockingsystem/dockmanager.cpp index 1b2a1c322a1..60a5aa35c8c 100644 --- a/src/libs/advanceddockingsystem/dockmanager.cpp +++ b/src/libs/advanceddockingsystem/dockmanager.cpp @@ -839,7 +839,7 @@ expected_str DockManager::reloadActiveWorkspace() if (!workspaces().contains(*wrk)) return make_unexpected( - Tr::tr("Cannot reload \"%1\", it is not contained in the list of workspaces") + Tr::tr("Cannot reload \"%1\". It is not in the list of workspaces.") .arg(wrk->filePath().toUserOutput())); const expected_str data = loadWorkspace(*wrk); @@ -903,7 +903,7 @@ expected_str DockManager::cloneWorkspace(const QString &originalFileNam const expected_str copyResult = originalPath.copyFile(clonePath); if (!copyResult) - return make_unexpected(Tr::tr("Could not clone '%1' due to: %2") + return make_unexpected(Tr::tr("Could not clone \"%1\" due to: %2") .arg(originalPath.toUserOutput(), copyResult.error())); writeDisplayName(clonePath, cloneName); @@ -1023,7 +1023,7 @@ expected_str DockManager::exportWorkspace(const QString &targetFilePath const FilePath workspaceFile = userDirectory().pathAppended(sourceFileName); if (!workspaceFile.exists()) return make_unexpected( - Tr::tr("Workspace does not exist '%1'").arg(workspaceFile.toUserOutput())); + Tr::tr("Workspace does not exist \"%1\"").arg(workspaceFile.toUserOutput())); // Finally copy the workspace to the target const expected_str copyResult = workspaceFile.copyFile(targetFile); diff --git a/src/libs/utils/commandline.cpp b/src/libs/utils/commandline.cpp index ba1cc4edc46..946f4aa1c41 100644 --- a/src/libs/utils/commandline.cpp +++ b/src/libs/utils/commandline.cpp @@ -514,6 +514,9 @@ QString ProcessArgs::quoteArgUnix(const QString &arg) QString ret(arg); if (hasSpecialCharsUnix(ret)) { + if (arg == "&&" || arg == "||" || arg == "&" || arg == ';') + return ret; + ret.replace(QLatin1Char('\''), QLatin1String("'\\''")); ret.prepend(QLatin1Char('\'')); ret.append(QLatin1Char('\'')); @@ -550,6 +553,9 @@ static QString quoteArgWin(const QString &arg) QString ret(arg); if (hasSpecialCharsWin(ret)) { + if (arg == "&&" || arg == "||" || arg == "&" || arg == ';') + return ret; + // Quotes are escaped and their preceding backslashes are doubled. // It's impossible to escape anything inside a quoted string on cmd // level, so the outer quoting must be "suspended". diff --git a/src/libs/utils/layoutbuilder.cpp b/src/libs/utils/layoutbuilder.cpp index 94aa80f02cc..3ab5939543b 100644 --- a/src/libs/utils/layoutbuilder.cpp +++ b/src/libs/utils/layoutbuilder.cpp @@ -346,9 +346,9 @@ void Slice::flush() formLayout->addRow(f0.widget, f1.widget); } else { if (f1.layout) - formLayout->addRow(f0.text, f1.layout); + formLayout->addRow(createLabel(f0.text), f1.layout); else if (f1.widget) - formLayout->addRow(f0.text, f1.widget); + formLayout->addRow(createLabel(f0.text), f1.widget); } } else { QTC_CHECK(false); @@ -962,6 +962,9 @@ void createItem(LayoutItem *item, const std::function &t) void createItem(LayoutItem *item, QWidget *t) { + if (auto l = qobject_cast(t)) + l->setTextInteractionFlags(l->textInteractionFlags() | Qt::TextSelectableByMouse); + item->onAdd = [t](LayoutBuilder &builder) { doAddWidget(builder, t); }; } diff --git a/src/libs/utils/process_ctrlc_stub.qbs b/src/libs/utils/process_ctrlc_stub.qbs index c92215df8e3..13359b7c9d7 100644 --- a/src/libs/utils/process_ctrlc_stub.qbs +++ b/src/libs/utils/process_ctrlc_stub.qbs @@ -4,7 +4,7 @@ QtcTool { name: "qtcreator_ctrlc_stub" consoleApplication: true condition: qbs.targetOS.contains("windows") - + useQt: false files: [ "process_ctrlc_stub.cpp" ] diff --git a/src/plugins/autotest/autotestplugin.cpp b/src/plugins/autotest/autotestplugin.cpp index d6bfc6f9a88..91c058cec77 100644 --- a/src/plugins/autotest/autotestplugin.cpp +++ b/src/plugins/autotest/autotestplugin.cpp @@ -195,7 +195,7 @@ void AutotestPluginPrivate::initializeMenuEntries() QAction *action = new QAction(Tr::tr("Run &All Tests"), this); action->setIcon(Utils::Icons::RUN_SMALL.icon()); - action->setToolTip(Tr::tr("Run all tests")); + action->setToolTip(Tr::tr("Run All Tests")); Command *command = ActionManager::registerAction(action, Constants::ACTION_RUN_ALL_ID); command->setDefaultKeySequence( QKeySequence(useMacShortcuts ? Tr::tr("Ctrl+Meta+T, Ctrl+Meta+A") : Tr::tr("Alt+Shift+T,Alt+A"))); @@ -206,7 +206,7 @@ void AutotestPluginPrivate::initializeMenuEntries() action = new QAction(Tr::tr("Run All Tests Without Deployment"), this); action->setIcon(Utils::Icons::RUN_SMALL.icon()); - action->setToolTip(Tr::tr("Run all tests without deployment")); + action->setToolTip(Tr::tr("Run All Tests Without Deployment")); command = ActionManager::registerAction(action, Constants::ACTION_RUN_ALL_NODEPLOY_ID); command->setDefaultKeySequence( QKeySequence(useMacShortcuts ? Tr::tr("Ctrl+Meta+T, Ctrl+Meta+E") : Tr::tr("Alt+Shift+T,Alt+E"))); @@ -217,7 +217,7 @@ void AutotestPluginPrivate::initializeMenuEntries() action = new QAction(Tr::tr("&Run Selected Tests"), this); action->setIcon(Utils::Icons::RUN_SELECTED.icon()); - action->setToolTip(Tr::tr("Run selected tests")); + action->setToolTip(Tr::tr("Run Selected Tests")); command = ActionManager::registerAction(action, Constants::ACTION_RUN_SELECTED_ID); command->setDefaultKeySequence( QKeySequence(useMacShortcuts ? Tr::tr("Ctrl+Meta+T, Ctrl+Meta+R") : Tr::tr("Alt+Shift+T,Alt+R"))); @@ -228,7 +228,7 @@ void AutotestPluginPrivate::initializeMenuEntries() action = new QAction(Tr::tr("&Run Selected Tests Without Deployment"), this); action->setIcon(Utils::Icons::RUN_SELECTED.icon()); - action->setToolTip(Tr::tr("Run selected tests")); + action->setToolTip(Tr::tr("Run Selected Tests Without Deployment")); command = ActionManager::registerAction(action, Constants::ACTION_RUN_SELECTED_NODEPLOY_ID); command->setDefaultKeySequence( QKeySequence(useMacShortcuts ? Tr::tr("Ctrl+Meta+T, Ctrl+Meta+W") : Tr::tr("Alt+Shift+T,Alt+W"))); @@ -239,7 +239,7 @@ void AutotestPluginPrivate::initializeMenuEntries() action = new QAction(Tr::tr("Run &Failed Tests"), this); action->setIcon(Icons::RUN_FAILED.icon()); - action->setToolTip(Tr::tr("Run failed tests")); + action->setToolTip(Tr::tr("Run Failed Tests")); command = ActionManager::registerAction(action, Constants::ACTION_RUN_FAILED_ID); command->setDefaultKeySequence( useMacShortcuts ? Tr::tr("Ctrl+Meta+T, Ctrl+Meta+F") : Tr::tr("Alt+Shift+T,Alt+F")); @@ -249,7 +249,7 @@ void AutotestPluginPrivate::initializeMenuEntries() action = new QAction(Tr::tr("Run Tests for &Current File"), this); action->setIcon(Utils::Icons::RUN_FILE.icon()); - action->setToolTip(Tr::tr("Run tests for current file")); + action->setToolTip(Tr::tr("Run Tests for Current File")); command = ActionManager::registerAction(action, Constants::ACTION_RUN_FILE_ID); command->setDefaultKeySequence( QKeySequence(useMacShortcuts ? Tr::tr("Ctrl+Meta+T, Ctrl+Meta+C") : Tr::tr("Alt+Shift+T,Alt+C"))); diff --git a/src/plugins/autotest/catch/catchoutputreader.cpp b/src/plugins/autotest/catch/catchoutputreader.cpp index 7a3aa277d4b..6c730c30455 100644 --- a/src/plugins/autotest/catch/catchoutputreader.cpp +++ b/src/plugins/autotest/catch/catchoutputreader.cpp @@ -240,17 +240,17 @@ void CatchOutputReader::sendResult(const ResultType result) catchResult.setResult(result); if (result == ResultType::TestStart && m_testCaseInfo.size() > 0) { - catchResult.setDescription(Tr::tr("Executing %1 \"%2\"") + catchResult.setDescription(Tr::tr("Executing %1 \"%2\"...") .arg(testOutputNodeToString().toLower(), catchResult.description())); } else if (result == ResultType::Pass || result == ResultType::UnexpectedPass) { if (result == ResultType::UnexpectedPass) ++m_xpassCount; if (m_currentExpression.isEmpty()) { - catchResult.setDescription(Tr::tr("%1 \"%2\" passed") + catchResult.setDescription(Tr::tr("%1 \"%2\" passed.") .arg(testOutputNodeToString(), catchResult.description())); } else { - catchResult.setDescription(Tr::tr("Expression passed") + catchResult.setDescription(Tr::tr("Expression passed.") .append('\n').append(m_currentExpression)); } m_reportedSectionResult = true; @@ -262,7 +262,7 @@ void CatchOutputReader::sendResult(const ResultType result) m_reportedSectionResult = true; m_reportedResult = true; } else if (result == ResultType::TestEnd) { - catchResult.setDescription(Tr::tr("Finished executing %1 \"%2\"") + catchResult.setDescription(Tr::tr("Finished executing %1 \"%2\".") .arg(testOutputNodeToString().toLower(), catchResult.description())); } else if (result == ResultType::Benchmark || result == ResultType::MessageFatal) { catchResult.setDescription(m_currentExpression); diff --git a/src/plugins/axivion/axivionoutputpane.cpp b/src/plugins/axivion/axivionoutputpane.cpp index ae3aed35488..6c9e97e4900 100644 --- a/src/plugins/axivion/axivionoutputpane.cpp +++ b/src/plugins/axivion/axivionoutputpane.cpp @@ -40,7 +40,7 @@ DashboardWidget::DashboardWidget(QWidget *parent) m_project = new QLabel(this); projectLayout->addRow(Tr::tr("Project:"), m_project); m_loc = new QLabel(this); - projectLayout->addRow(Tr::tr("Lines of Code:"), m_loc); + projectLayout->addRow(Tr::tr("Lines of code:"), m_loc); layout->addLayout(projectLayout); m_formLayout = new QFormLayout; layout->addLayout(m_formLayout); diff --git a/src/plugins/clangcodemodel/clangdsemantichighlighting.cpp b/src/plugins/clangcodemodel/clangdsemantichighlighting.cpp index f93d8302bd3..378e0f9346f 100644 --- a/src/plugins/clangcodemodel/clangdsemantichighlighting.cpp +++ b/src/plugins/clangcodemodel/clangdsemantichighlighting.cpp @@ -326,8 +326,10 @@ void doSemanticHighlighting( styles.mainStyle = C_PARAMETER; } else if (token.type == "macro") { styles.mainStyle = C_MACRO; - } else if (token.type == "type" || token.type == "concept") { + } else if (token.type == "type") { styles.mainStyle = C_TYPE; + } else if (token.type == "concept") { + styles.mainStyle = C_CONCEPT; } else if (token.type == "modifier") { styles.mainStyle = C_KEYWORD; } else if (token.type == "label") { diff --git a/src/plugins/clangcodemodel/test/clangdtests.cpp b/src/plugins/clangcodemodel/test/clangdtests.cpp index a102f1d3527..5a52a207853 100644 --- a/src/plugins/clangcodemodel/test/clangdtests.cpp +++ b/src/plugins/clangcodemodel/test/clangdtests.cpp @@ -1302,8 +1302,8 @@ void ClangdTestHighlighting::test_data() QTest::newRow("fake operator method call") << 1050 << 8 << 1050 << 22 << QList{C_FUNCTION} << 0; QTest::newRow("concept definition") << 1053 << 30 << 1053 << 42 - << QList{C_TYPE, C_DECLARATION} << 0; - QTest::newRow("concept use") << 1054 << 29 << 1054 << 41 << QList{C_TYPE} << 0; + << QList{C_CONCEPT, C_DECLARATION} << 0; + QTest::newRow("concept use") << 1054 << 29 << 1054 << 41 << QList{C_CONCEPT} << 0; QTest::newRow("label declaration") << 242 << 1 << 242 << 11 << QList{C_LABEL, C_DECLARATION} << 0; QTest::newRow("label use") << 244 << 10 << 244 << 20 << QList{C_LABEL} << 0; diff --git a/src/plugins/clangtools/clangtool.cpp b/src/plugins/clangtools/clangtool.cpp index 00da4bb880e..2ce4373b7f7 100644 --- a/src/plugins/clangtools/clangtool.cpp +++ b/src/plugins/clangtools/clangtool.cpp @@ -677,16 +677,6 @@ void ClangTool::startTool(ClangTool::FileSelection fileSelection, ProjectExplorerPlugin::startRunControl(m_runControl); } -Diagnostics ClangTool::read(const FilePath &logFilePath, - const QSet &projectFiles, - QString *errorMessage) const -{ - const auto acceptFromFilePath = [projectFiles](const FilePath &filePath) { - return projectFiles.contains(filePath); - }; - return readExportedDiagnostics(logFilePath, acceptFromFilePath, errorMessage); -} - FileInfos ClangTool::collectFileInfos(Project *project, FileSelection fileSelection) { FileSelectionType *selectionType = std::get_if(&fileSelection); @@ -763,21 +753,17 @@ void ClangTool::loadDiagnosticsFromFiles() // Load files Diagnostics diagnostics; - QString errors; + QStringList errors; for (const FilePath &filePath : filePaths) { - QString currentError; - diagnostics << readExportedDiagnostics(filePath, {}, ¤tError); - - if (!currentError.isEmpty()) { - if (!errors.isEmpty()) - errors.append("\n"); - errors.append(currentError); - } + if (expected_str expectedDiagnostics = readExportedDiagnostics(filePath)) + diagnostics << *expectedDiagnostics; + else + errors.append(expectedDiagnostics.error()); } // Show errors if (!errors.isEmpty()) { - AsynchronousMessageBox::critical(Tr::tr("Error Loading Diagnostics"), errors); + AsynchronousMessageBox::critical(Tr::tr("Error Loading Diagnostics"), errors.join('\n')); return; } diff --git a/src/plugins/clangtools/clangtool.h b/src/plugins/clangtools/clangtool.h index 98d219ac923..fad280a17f1 100644 --- a/src/plugins/clangtools/clangtool.h +++ b/src/plugins/clangtools/clangtool.h @@ -65,10 +65,6 @@ public: const RunSettings &runSettings, const CppEditor::ClangDiagnosticConfig &diagnosticConfig); - Diagnostics read(const Utils::FilePath &logFilePath, - const QSet &projectFiles, - QString *errorMessage) const; - FileInfos collectFileInfos(ProjectExplorer::Project *project, FileSelection fileSelection); diff --git a/src/plugins/clangtools/clangtoolruncontrol.cpp b/src/plugins/clangtools/clangtoolruncontrol.cpp index 39de004ac89..aaf20741a7f 100644 --- a/src/plugins/clangtools/clangtoolruncontrol.cpp +++ b/src/plugins/clangtools/clangtoolruncontrol.cpp @@ -242,26 +242,15 @@ void ClangToolRunWorker::onDone(const AnalyzeOutputData &output) qCDebug(LOG) << "onRunnerFinishedWithSuccess:" << output.outputFilePath; - QString errorMessage; - const Diagnostics diagnostics = m_tool->read(output.outputFilePath, m_projectFiles, - &errorMessage); + const Diagnostics diagnostics = output.diagnostics; - if (!errorMessage.isEmpty()) { - m_filesAnalyzed.remove(output.fileToAnalyze); - m_filesNotAnalyzed.insert(output.fileToAnalyze); - qCDebug(LOG) << "onRunnerFinishedWithSuccess: Error reading log file:" << errorMessage; - appendMessage(Tr::tr("Failed to analyze \"%1\": %2") - .arg(output.fileToAnalyze.toUserOutput(), errorMessage), - Utils::StdErrFormat); - } else { - if (!m_filesNotAnalyzed.contains(output.fileToAnalyze)) - m_filesAnalyzed.insert(output.fileToAnalyze); - if (!diagnostics.isEmpty()) { - // do not generate marks when we always analyze open files since marks from that - // analysis should be more up to date - const bool generateMarks = !m_runSettings.analyzeOpenFiles(); - m_tool->onNewDiagnosticsAvailable(diagnostics, generateMarks); - } + if (!m_filesNotAnalyzed.contains(output.fileToAnalyze)) + m_filesAnalyzed.insert(output.fileToAnalyze); + if (!diagnostics.isEmpty()) { + // do not generate marks when we always analyze open files since marks from that + // analysis should be more up to date + const bool generateMarks = !m_runSettings.analyzeOpenFiles(); + m_tool->onNewDiagnosticsAvailable(diagnostics, generateMarks); } } diff --git a/src/plugins/clangtools/clangtoolrunner.cpp b/src/plugins/clangtools/clangtoolrunner.cpp index 6681a9133dd..bfbc9b3957f 100644 --- a/src/plugins/clangtools/clangtoolrunner.cpp +++ b/src/plugins/clangtools/clangtoolrunner.cpp @@ -3,6 +3,7 @@ #include "clangtoolrunner.h" +#include "clangtoolslogfilereader.h" #include "clangtoolstr.h" #include "clangtoolsutils.h" @@ -11,6 +12,9 @@ #include #include +#include + +#include #include #include #include @@ -20,6 +24,7 @@ #include #include + static Q_LOGGING_CATEGORY(LOG, "qtc.clangtools.runner", QtWarningMsg) using namespace CppEditor; @@ -160,9 +165,6 @@ GroupItem clangToolTask(const AnalyzeInputData &input, }; const auto onProcessDone = [=](const Process &process) { qCDebug(LOG).noquote() << "Output:\n" << process.cleanedStdOut(); - if (!outputHandler) - return; - outputHandler({true, input.unit.file, storage->outputFilePath, input.tool}); }; const auto onProcessError = [=](const Process &process) { if (!outputHandler) @@ -179,15 +181,50 @@ GroupItem clangToolTask(const AnalyzeInputData &input, message = Tr::tr("%1 finished with exit code: %2.").arg(data.name).arg(process.exitCode()); else message = Tr::tr("%1 crashed.").arg(data.name); - outputHandler({false, input.unit.file, data.outputFilePath, input.tool, message, details}); + outputHandler( + {false, input.unit.file, data.outputFilePath, {}, input.tool, message, details}); + }; + + const auto onReadSetup = [=](Async> &data) { + data.setConcurrentCallData(&parseDiagnostics, + storage->outputFilePath, + input.diagnosticsFilter); + data.setFutureSynchronizer(ExtensionSystem::PluginManager::futureSynchronizer()); + }; + const auto onReadDone = [=](const Async> &data) { + if (!outputHandler) + return; + const expected_str result = data.result(); + const bool success = result.has_value(); + Diagnostics diagnostics; + QString error; + if (success) + diagnostics = *result; + else + error = result.error(); + outputHandler({success, + input.unit.file, + storage->outputFilePath, + diagnostics, + input.tool, + error}); + }; + const auto onReadError = [=](const Async> &data) { + if (!outputHandler) + return; + const expected_str result = data.result(); + outputHandler( + {false, input.unit.file, storage->outputFilePath, {}, input.tool, result.error()}); }; const Group group { Storage(storage), onGroupSetup(onSetup), Group { + sequential, finishAllAndDone, - ProcessTask(onProcessSetup, onProcessDone, onProcessError) + ProcessTask(onProcessSetup, onProcessDone, onProcessError), + AsyncTask>(onReadSetup, onReadDone, onReadError) } }; return group; diff --git a/src/plugins/clangtools/clangtoolrunner.h b/src/plugins/clangtools/clangtoolrunner.h index a8d1204c224..ab4039c92c8 100644 --- a/src/plugins/clangtools/clangtoolrunner.h +++ b/src/plugins/clangtools/clangtoolrunner.h @@ -4,6 +4,8 @@ #pragma once #include "clangfileinfo.h" +#include "clangtoolsdiagnostic.h" +#include "clangtoolslogfilereader.h" #include "clangtoolssettings.h" #include @@ -35,6 +37,7 @@ struct AnalyzeInputData Utils::Environment environment; AnalyzeUnit unit; QString overlayFilePath = {}; + AcceptDiagsFromFilePath diagnosticsFilter = {}; }; struct AnalyzeOutputData @@ -42,6 +45,7 @@ struct AnalyzeOutputData bool success = true; Utils::FilePath fileToAnalyze; Utils::FilePath outputFilePath; + Diagnostics diagnostics; CppEditor::ClangToolType toolType; QString errorMessage = {}; QString errorDetails = {}; diff --git a/src/plugins/clangtools/clangtoolslogfilereader.cpp b/src/plugins/clangtools/clangtoolslogfilereader.cpp index d7ccb5579ee..a68b3c4d82a 100644 --- a/src/plugins/clangtools/clangtoolslogfilereader.cpp +++ b/src/plugins/clangtools/clangtoolslogfilereader.cpp @@ -11,26 +11,13 @@ #include #include +#include + #include namespace ClangTools { namespace Internal { -static bool checkFilePath(const Utils::FilePath &filePath, QString *errorMessage) -{ - QFileInfo fi(filePath.toFileInfo()); - if (!fi.exists() || !fi.isReadable()) { - if (errorMessage) { - *errorMessage - = QString(QT_TRANSLATE_NOOP("QtC::ClangTools", - "File \"%1\" does not exist or is not readable.")) - .arg(filePath.toUserOutput()); - } - return false; - } - return true; -} - std::optional byteOffsetInUtf8TextToLineColumn(const char *text, int offset, int startLine) @@ -190,19 +177,25 @@ private: } // namespace -Diagnostics readExportedDiagnostics(const Utils::FilePath &logFilePath, - const AcceptDiagsFromFilePath &acceptFromFilePath, - QString *errorMessage) +void parseDiagnostics(QPromise> &promise, + const Utils::FilePath &logFilePath, + const AcceptDiagsFromFilePath &acceptFromFilePath) { - if (!checkFilePath(logFilePath, errorMessage)) - return {}; + const Utils::expected_str localFileContents = logFilePath.fileContents(); + if (!localFileContents.has_value()) { + promise.addResult(Utils::make_unexpected(localFileContents.error())); + promise.future().cancel(); + return; + } FileCache fileCache; Diagnostics diagnostics; try { - YAML::Node document = YAML::LoadFile(logFilePath.toString().toStdString()); + YAML::Node document = YAML::Load(*localFileContents); for (const auto &diagNode : document["Diagnostics"]) { + if (promise.isCanceled()) + return; // Since llvm/clang 9.0 the diagnostic items are wrapped in a "DiagnosticMessage" node. const auto msgNode = diagNode["DiagnosticMessage"]; const YAML::Node &node = msgNode ? msgNode : diagNode; @@ -252,16 +245,24 @@ Diagnostics readExportedDiagnostics(const Utils::FilePath &logFilePath, diagnostics.append(diag); } + promise.addResult(diagnostics); } catch (std::exception &e) { - if (errorMessage) { - *errorMessage = QString( - QT_TRANSLATE_NOOP("QtC::ClangTools", - "Error: Failed to parse YAML file \"%1\": %2.")) - .arg(logFilePath.toUserOutput(), QString::fromUtf8(e.what())); - } + const QString errorMessage + = QString(QT_TRANSLATE_NOOP("QtC::ClangTools", + "Error: Failed to parse YAML file \"%1\": %2.")) + .arg(logFilePath.toUserOutput(), QString::fromUtf8(e.what())); + promise.addResult(Utils::make_unexpected(errorMessage)); + promise.future().cancel(); } +} - return diagnostics; +Utils::expected_str readExportedDiagnostics( + const Utils::FilePath &logFilePath, const AcceptDiagsFromFilePath &acceptFromFilePath) +{ + QPromise> promise; + promise.start(); + parseDiagnostics(promise, logFilePath, acceptFromFilePath); + return promise.future().result(); } } // namespace Internal diff --git a/src/plugins/clangtools/clangtoolslogfilereader.h b/src/plugins/clangtools/clangtoolslogfilereader.h index 4b8f3edcc1e..09c2b79f021 100644 --- a/src/plugins/clangtools/clangtoolslogfilereader.h +++ b/src/plugins/clangtools/clangtoolslogfilereader.h @@ -6,6 +6,7 @@ #include "clangtoolsdiagnostic.h" +#include #include namespace Utils { class FilePath; } @@ -16,9 +17,13 @@ namespace Internal { using AcceptDiagsFromFilePath = std::function; // Reads diagnostics generated by "clang-tidy/clazy-standalone -export-fixes=path/to/file" -Diagnostics readExportedDiagnostics(const Utils::FilePath &logFilePath, - const AcceptDiagsFromFilePath &acceptFromFilePath, - QString *errorMessage = nullptr); +void parseDiagnostics(QPromise> &promise, + const Utils::FilePath &logFilePath, + const AcceptDiagsFromFilePath &acceptFromFilePath = {}); + +Utils::expected_str readExportedDiagnostics( + const Utils::FilePath &logFilePath, + const AcceptDiagsFromFilePath &acceptFromFilePath = {}); // Exposed for tests struct LineColumnInfo { diff --git a/src/plugins/clangtools/diagnosticmark.cpp b/src/plugins/clangtools/diagnosticmark.cpp index 4184ce35350..bc92e1d17e3 100644 --- a/src/plugins/clangtools/diagnosticmark.cpp +++ b/src/plugins/clangtools/diagnosticmark.cpp @@ -8,18 +8,21 @@ #include "clangtoolsutils.h" #include "diagnosticconfigswidget.h" +#include #include #include #include +using namespace TextEditor; + namespace ClangTools { namespace Internal { -DiagnosticMark::DiagnosticMark(const Diagnostic &diagnostic) - : TextEditor::TextMark(diagnostic.location.filePath, - diagnostic.location.line, - {Tr::tr("Clang Tools"), Utils::Id(Constants::DIAGNOSTIC_MARK_ID)}) +DiagnosticMark::DiagnosticMark(const Diagnostic &diagnostic, TextDocument *document) + : TextMark(document, + diagnostic.location.line, + {Tr::tr("Clang Tools"), Utils::Id(Constants::DIAGNOSTIC_MARK_ID)}) , m_diagnostic(diagnostic) { setSettingsPage(Constants::SETTINGS_PAGE_ID); @@ -57,6 +60,10 @@ DiagnosticMark::DiagnosticMark(const Diagnostic &diagnostic) }); } +DiagnosticMark::DiagnosticMark(const Diagnostic &diagnostic) + : DiagnosticMark(diagnostic, TextDocument::textDocumentForFilePath(diagnostic.location.filePath)) +{} + void DiagnosticMark::disable() { if (!m_enabled) diff --git a/src/plugins/clangtools/diagnosticmark.h b/src/plugins/clangtools/diagnosticmark.h index 7218d89ebd5..6d566739d42 100644 --- a/src/plugins/clangtools/diagnosticmark.h +++ b/src/plugins/clangtools/diagnosticmark.h @@ -14,6 +14,7 @@ namespace Internal { class DiagnosticMark : public TextEditor::TextMark { public: + DiagnosticMark(const Diagnostic &diagnostic, TextEditor::TextDocument *document); explicit DiagnosticMark(const Diagnostic &diagnostic); void disable(); diff --git a/src/plugins/clangtools/documentclangtoolrunner.cpp b/src/plugins/clangtools/documentclangtoolrunner.cpp index 5640411e7cf..28ea234f9ad 100644 --- a/src/plugins/clangtools/documentclangtoolrunner.cpp +++ b/src/plugins/clangtools/documentclangtoolrunner.cpp @@ -201,8 +201,16 @@ void DocumentClangToolRunner::run() if (includeDir.isEmpty() || clangVersion.isEmpty()) return; const AnalyzeUnit unit(m_fileInfo, includeDir, clangVersion); - const AnalyzeInputData input{tool, runSettings, config, m_temporaryDir.path(), env, unit, - vfso().overlayFilePath().toString()}; + auto diagnosticFilter = [mappedPath = vfso().autoSavedFilePath(m_document)]( + const FilePath &path) { return path == mappedPath; }; + const AnalyzeInputData input{tool, + runSettings, + config, + m_temporaryDir.path(), + env, + unit, + vfso().overlayFilePath().toString(), + diagnosticFilter}; const auto setupHandler = [this, executable] { return !m_document->isModified() || isVFSOverlaySupported(executable); }; @@ -234,11 +242,7 @@ void DocumentClangToolRunner::onDone(const AnalyzeOutputData &output) return; } - const FilePath mappedPath = vfso().autoSavedFilePath(m_document); - Diagnostics diagnostics = readExportedDiagnostics( - output.outputFilePath, - [&](const FilePath &path) { return path == mappedPath; }); - + Diagnostics diagnostics = output.diagnostics; for (Diagnostic &diag : diagnostics) { updateLocation(diag.location); for (ExplainingStep &explainingStep : diag.explainingSteps) { @@ -264,7 +268,7 @@ void DocumentClangToolRunner::onDone(const AnalyzeOutputData &output) if (isSuppressed(diagnostic)) continue; - auto mark = new DiagnosticMark(diagnostic); + auto mark = new DiagnosticMark(diagnostic, doc); mark->toolType = toolType; if (doc && Utils::anyOf(diagnostic.explainingSteps, &ExplainingStep::isFixIt)) { diff --git a/src/plugins/clangtools/readexporteddiagnosticstest.cpp b/src/plugins/clangtools/readexporteddiagnosticstest.cpp index 0b318b64d78..d839108451b 100644 --- a/src/plugins/clangtools/readexporteddiagnosticstest.cpp +++ b/src/plugins/clangtools/readexporteddiagnosticstest.cpp @@ -31,41 +31,40 @@ ReadExportedDiagnosticsTest::ReadExportedDiagnosticsTest() ReadExportedDiagnosticsTest::~ReadExportedDiagnosticsTest() { delete m_baseDir; } void ReadExportedDiagnosticsTest::initTestCase() { QVERIFY(m_baseDir->isValid()); } -void ReadExportedDiagnosticsTest::init() { m_message.clear(); } +void ReadExportedDiagnosticsTest::init() { } void ReadExportedDiagnosticsTest::testNonExistingFile() { - const Diagnostics diags = readExportedDiagnostics("nonExistingFile.yaml", {}, &m_message); - QVERIFY(diags.isEmpty()); - QVERIFY(!m_message.isEmpty()); + const expected_str diags = readExportedDiagnostics("nonExistingFile.yaml"); + QVERIFY(!diags.has_value()); + QVERIFY(!diags.error().isEmpty()); } void ReadExportedDiagnosticsTest::testEmptyFile() { - const Diagnostics diags = readExportedDiagnostics(filePath("empty.yaml"), {}, &m_message); - QVERIFY(diags.isEmpty()); - QVERIFY2(m_message.isEmpty(), qPrintable(m_message)); + const expected_str diags = readExportedDiagnostics(filePath("empty.yaml")); + QVERIFY(diags.has_value()); + QVERIFY(diags->isEmpty()); } void ReadExportedDiagnosticsTest::testUnexpectedFileContents() { - const Diagnostics diags = readExportedDiagnostics(filePath("tidy.modernize-use-nullptr.cpp"), - {}, &m_message); - QVERIFY(!m_message.isEmpty()); - QVERIFY(diags.isEmpty()); + const expected_str diags = readExportedDiagnostics( + filePath("tidy.modernize-use-nullptr.cpp")); + QVERIFY(!diags.has_value()); + QVERIFY(!diags.error().isEmpty()); } static QString appendYamlSuffix(const char *filePathFragment) { - const QString yamlSuffix = QLatin1String(Utils::HostOsInfo::isWindowsHost() - ? "_win.yaml" : ".yaml"); + const QString yamlSuffix = QLatin1String(HostOsInfo::isWindowsHost() ? "_win.yaml" : ".yaml"); return filePathFragment + yamlSuffix; } void ReadExportedDiagnosticsTest::testTidy() { const FilePath sourceFile = filePath("tidy.modernize-use-nullptr.cpp"); - const QString exportedFile = createFile( + const FilePath exportedFile = createFile( filePath(appendYamlSuffix("tidy.modernize-use-nullptr")).toString(), sourceFile.toString()); Diagnostic expectedDiag; @@ -79,32 +78,31 @@ void ReadExportedDiagnosticsTest::testTidy() expectedDiag.location, {expectedDiag.location, {sourceFile, 2, 26}}, true}}; - const Diagnostics diags = readExportedDiagnostics(Utils::FilePath::fromString(exportedFile), - {}, &m_message); + const expected_str diags = readExportedDiagnostics(exportedFile); - QVERIFY2(m_message.isEmpty(), qPrintable(m_message)); - QCOMPARE(diags, {expectedDiag}); + QVERIFY(diags.has_value()); + QCOMPARE(*diags, {expectedDiag}); } void ReadExportedDiagnosticsTest::testAcceptDiagsFromFilePaths_None() { const QString sourceFile = filePath("tidy.modernize-use-nullptr.cpp").toString(); - const QString exportedFile = createFile(filePath("tidy.modernize-use-nullptr.yaml").toString(), + const FilePath exportedFile = createFile(filePath("tidy.modernize-use-nullptr.yaml").toString(), sourceFile); - const auto acceptNone = [](const Utils::FilePath &) { return false; }; - const Diagnostics diags = readExportedDiagnostics(FilePath::fromString(exportedFile), - acceptNone, &m_message); - QVERIFY2(m_message.isEmpty(), qPrintable(m_message)); - QVERIFY(diags.isEmpty()); + const auto acceptNone = [](const FilePath &) { return false; }; + const expected_str diags + = readExportedDiagnostics(exportedFile, acceptNone); + QVERIFY(diags.has_value()); + QVERIFY(diags->isEmpty()); } // Diagnostics from clang (static) analyzer passed through via clang-tidy void ReadExportedDiagnosticsTest::testTidy_ClangAnalyzer() { const FilePath sourceFile = filePath("clang-analyzer.dividezero.cpp"); - const QString exportedFile = createFile( - filePath(appendYamlSuffix("clang-analyzer.dividezero")).toString(), - sourceFile.toString()); + const FilePath exportedFile + = createFile(filePath(appendYamlSuffix("clang-analyzer.dividezero")).toString(), + sourceFile.toString()); Diagnostic expectedDiag; expectedDiag.name = "clang-analyzer-core.DivideZero"; expectedDiag.location = {sourceFile, 4, 15}; @@ -128,16 +126,15 @@ void ReadExportedDiagnosticsTest::testTidy_ClangAnalyzer() false, }, }; - const Diagnostics diags = readExportedDiagnostics(Utils::FilePath::fromString(exportedFile), - {}, &m_message); - QVERIFY2(m_message.isEmpty(), qPrintable(m_message)); - QCOMPARE(diags, {expectedDiag}); + const expected_str diags = readExportedDiagnostics(exportedFile); + QVERIFY(diags.has_value()); + QCOMPARE(*diags, {expectedDiag}); } void ReadExportedDiagnosticsTest::testClazy() { const FilePath sourceFile = filePath("clazy.qgetenv.cpp"); - const QString exportedFile = createFile(filePath(appendYamlSuffix("clazy.qgetenv")).toString(), + const FilePath exportedFile = createFile(filePath(appendYamlSuffix("clazy.qgetenv")).toString(), sourceFile.toString()); Diagnostic expectedDiag; expectedDiag.name = "clazy-qgetenv"; @@ -156,10 +153,9 @@ void ReadExportedDiagnosticsTest::testClazy() {{sourceFile, 7, 18}, {sourceFile, 7, 29}}, true}, }; - const Diagnostics diags = readExportedDiagnostics(Utils::FilePath::fromString(exportedFile), - {}, &m_message); - QVERIFY2(m_message.isEmpty(), qPrintable(m_message)); - QCOMPARE(diags, {expectedDiag}); + const expected_str diags = readExportedDiagnostics(exportedFile); + QVERIFY(diags.has_value()); + QCOMPARE(*diags, {expectedDiag}); } void ReadExportedDiagnosticsTest::testOffsetInvalidText() @@ -263,25 +259,24 @@ void ReadExportedDiagnosticsTest::testOffsetMultiByteCodePoint2() } // Replace FILE_PATH with a real absolute file path in the *.yaml files. -QString ReadExportedDiagnosticsTest::createFile(const QString &yamlFilePath, - const QString &filePathToInject) const +FilePath ReadExportedDiagnosticsTest::createFile(const QString &yamlFilePath, + const QString &filePathToInject) const { - QTC_ASSERT(QDir::isAbsolutePath(filePathToInject), return QString()); - const Utils::FilePath newFileName = m_baseDir->absolutePath( - QFileInfo(yamlFilePath).fileName()); + QTC_ASSERT(QDir::isAbsolutePath(filePathToInject), return {}); + const FilePath newFileName = m_baseDir->absolutePath(QFileInfo(yamlFilePath).fileName()); - Utils::FileReader reader; - if (QTC_GUARD(reader.fetch(Utils::FilePath::fromString(yamlFilePath), + FileReader reader; + if (QTC_GUARD(reader.fetch(FilePath::fromString(yamlFilePath), QIODevice::ReadOnly | QIODevice::Text))) { QByteArray contents = reader.data(); contents.replace("FILE_PATH", filePathToInject.toLocal8Bit()); - Utils::FileSaver fileSaver(newFileName, QIODevice::WriteOnly | QIODevice::Text); + FileSaver fileSaver(newFileName, QIODevice::WriteOnly | QIODevice::Text); QTC_CHECK(fileSaver.write(contents)); QTC_CHECK(fileSaver.finalize()); } - return newFileName.toString(); + return newFileName; } FilePath ReadExportedDiagnosticsTest::filePath(const QString &fileName) const diff --git a/src/plugins/clangtools/readexporteddiagnosticstest.h b/src/plugins/clangtools/readexporteddiagnosticstest.h index ce290dedec6..54bde6b75c1 100644 --- a/src/plugins/clangtools/readexporteddiagnosticstest.h +++ b/src/plugins/clangtools/readexporteddiagnosticstest.h @@ -44,11 +44,10 @@ private slots: void testOffsetMultiByteCodePoint2(); private: - QString createFile(const QString &yamlFilePath, const QString &filePathToInject) const; + Utils::FilePath createFile(const QString &yamlFilePath, const QString &filePathToInject) const; Utils::FilePath filePath(const QString &fileName) const; CppEditor::Tests::TemporaryCopiedDir * const m_baseDir; - QString m_message; }; } // namespace ClangTools::Internal diff --git a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp index ed80137e4bf..56701f1413b 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp +++ b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp @@ -1462,10 +1462,18 @@ CMakeBuildConfiguration::CMakeBuildConfiguration(Target *target, Id id) // Android magic: if (DeviceTypeKitAspect::deviceTypeId(k) == Android::Constants::ANDROID_DEVICE_TYPE) { + auto addUniqueKeyToCmd = [&cmd] (const QString &prefix, const QString &value) -> bool { + const bool isUnique = + !Utils::contains(cmd.splitArguments(), [&prefix] (const QString &arg) { + return arg.startsWith(prefix); }); + if (isUnique) + cmd.addArg(prefix + value); + return isUnique; + }; buildSteps()->appendStep(Android::Constants::ANDROID_BUILD_APK_ID); const auto bs = buildSteps()->steps().constLast(); - cmd.addArg("-DANDROID_PLATFORM:STRING=" - + bs->data(Android::Constants::AndroidNdkPlatform).toString()); + addUniqueKeyToCmd("-DANDROID_PLATFORM:STRING=", + bs->data(Android::Constants::AndroidNdkPlatform).toString()); auto ndkLocation = bs->data(Android::Constants::NdkLocation).value(); cmd.addArg("-DANDROID_NDK:PATH=" + ndkLocation.path()); diff --git a/src/plugins/cmakeprojectmanager/cmakebuildstep.cpp b/src/plugins/cmakeprojectmanager/cmakebuildstep.cpp index 783468422dd..d8c51fcbd3d 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildstep.cpp +++ b/src/plugins/cmakeprojectmanager/cmakebuildstep.cpp @@ -159,7 +159,7 @@ Qt::ItemFlags CMakeTargetItem::flags(int) const // CMakeBuildStep -static QString initialStagingDir() +static QString initialStagingDir(Kit *kit) { // Avoid actual file accesses. auto rg = QRandomGenerator::global(); @@ -167,6 +167,9 @@ static QString initialStagingDir() char buf[sizeof(rand)]; memcpy(&buf, &rand, sizeof(rand)); const QByteArray ba = QByteArray(buf, sizeof(buf)).toHex(); + IDeviceConstPtr buildDevice = BuildDeviceKitAspect::device(kit); + if (buildDevice && buildDevice->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE) + return TemporaryDirectory::masterDirectoryPath() + "/staging-" + ba; return QString::fromUtf8("/tmp/Qt-Creator-staging-" + ba); } @@ -200,7 +203,7 @@ CMakeBuildStep::CMakeBuildStep(BuildStepList *bsl, Id id) : m_stagingDir = addAspect(); m_stagingDir->setSettingsKey(STAGING_DIR_KEY); m_stagingDir->setLabelText(Tr::tr("Staging directory:")); - m_stagingDir->setDefaultValue(initialStagingDir()); + m_stagingDir->setDefaultValue(initialStagingDir(kit())); Kit *kit = buildConfiguration()->kit(); if (CMakeBuildConfiguration::isIos(kit)) { diff --git a/src/plugins/copilot/authwidget.cpp b/src/plugins/copilot/authwidget.cpp index f29e3d3a150..5047657b4ca 100644 --- a/src/plugins/copilot/authwidget.cpp +++ b/src/plugins/copilot/authwidget.cpp @@ -24,7 +24,7 @@ AuthWidget::AuthWidget(QWidget *parent) { using namespace Layouting; - m_button = new QPushButton(Tr::tr("Sign in")); + m_button = new QPushButton(Tr::tr("Sign In")); m_button->setEnabled(false); m_progressIndicator = new Utils::ProgressIndicator(Utils::ProgressIndicatorSize::Small); m_progressIndicator->setVisible(false); @@ -91,13 +91,13 @@ void AuthWidget::updateClient(const Utils::FilePath &nodeJs, const Utils::FilePa { LanguageClientManager::shutdownClient(m_client); m_client = nullptr; - setState(Tr::tr("Sign in"), false); + setState(Tr::tr("Sign In"), false); m_button->setEnabled(false); if (!nodeJs.isExecutableFile() || !agent.exists()) { return; } - setState(Tr::tr("Sign in"), true); + setState(Tr::tr("Sign In"), true); m_client = new CopilotClient(nodeJs, agent); connect(m_client, &Client::initialized, this, &AuthWidget::checkStatus); @@ -117,7 +117,7 @@ void AuthWidget::signIn() QDesktopServices::openUrl(QUrl(response.result()->verificationUri())); - m_statusLabel->setText(Tr::tr("A browser window will open, enter the code %1 when " + m_statusLabel->setText(Tr::tr("A browser window will open. Enter the code %1 when " "asked.\nThe code has been copied to your clipboard.") .arg(response.result()->userCode())); m_statusLabel->setVisible(true); @@ -129,7 +129,7 @@ void AuthWidget::signIn() if (response.error()) { QMessageBox::critical(this, - Tr::tr("Login failed"), + Tr::tr("Login Failed"), Tr::tr( "The login request failed: ") + response.error()->message()); diff --git a/src/plugins/copilot/copilotoptionspage.cpp b/src/plugins/copilot/copilotoptionspage.cpp index 001db87834d..405b15990c8 100644 --- a/src/plugins/copilot/copilotoptionspage.cpp +++ b/src/plugins/copilot/copilotoptionspage.cpp @@ -13,6 +13,8 @@ #include #include +#include + using namespace Utils; using namespace LanguageClient; @@ -31,8 +33,12 @@ public: helpLabel->setTextFormat(Qt::MarkdownText); helpLabel->setWordWrap(true); helpLabel->setTextInteractionFlags(Qt::LinksAccessibleByMouse - | Qt::LinksAccessibleByKeyboard); + | Qt::LinksAccessibleByKeyboard + | Qt::TextSelectableByMouse); helpLabel->setOpenExternalLinks(true); + connect(helpLabel, &QLabel::linkHovered, [](const QString &link) { + QToolTip::showText(QCursor::pos(), link); + }); // clang-format off helpLabel->setText(Tr::tr(R"( diff --git a/src/plugins/cppeditor/cppcompletionassist.cpp b/src/plugins/cppeditor/cppcompletionassist.cpp index 5466f675eaf..4865f3dfedc 100644 --- a/src/plugins/cppeditor/cppcompletionassist.cpp +++ b/src/plugins/cppeditor/cppcompletionassist.cpp @@ -37,6 +37,8 @@ #include #include +#include + using namespace CPlusPlus; using namespace CppEditor; using namespace TextEditor; @@ -847,27 +849,27 @@ bool InternalCppCompletionAssistProcessor::accepts() const IAssistProposal *InternalCppCompletionAssistProcessor::createContentProposal() { // Duplicates are kept only if they are snippets. - QSet processed; - auto it = m_completions.begin(); - while (it != m_completions.end()) { - auto item = static_cast(*it); - if (!processed.contains(item->text()) || item->isSnippet()) { + std::set processed; + for (auto it = m_completions.begin(); it != m_completions.end();) { + if ((*it)->isSnippet()) { ++it; - if (!item->isSnippet()) { - processed.insert(item->text()); - if (!item->isOverloaded()) { - if (auto symbol = qvariant_cast(item->data())) { - if (Function *funTy = symbol->type()->asFunctionType()) { - if (funTy->hasArguments()) - item->markAsOverloaded(); - } - } - } - } - } else { + continue; + } + if (!processed.insert((*it)->text()).second) { delete *it; it = m_completions.erase(it); + continue; } + auto item = static_cast(*it); + if (!item->isOverloaded()) { + if (auto symbol = qvariant_cast(item->data())) { + if (Function *funTy = symbol->type()->asFunctionType()) { + if (funTy->hasArguments()) + item->markAsOverloaded(); + } + } + } + ++it; } m_model->loadContent(m_completions); diff --git a/src/plugins/docker/dockerdevice.cpp b/src/plugins/docker/dockerdevice.cpp index 2dd2a589f72..b4cd5d3ca53 100644 --- a/src/plugins/docker/dockerdevice.cpp +++ b/src/plugins/docker/dockerdevice.cpp @@ -749,7 +749,7 @@ bool DockerDevicePrivate::startContainer() DockerApi::recheckDockerDaemon(); MessageManager::writeFlashing(Tr::tr("Docker daemon appears to be not running. " "Verify daemon is up and running and reset the " - "docker daemon on the docker device settings page " + "Docker daemon in Docker device preferences " "or restart Qt Creator.")); }); diff --git a/src/plugins/docker/dockerdevicewidget.cpp b/src/plugins/docker/dockerdevicewidget.cpp index cd32fead6fb..259325274c0 100644 --- a/src/plugins/docker/dockerdevicewidget.cpp +++ b/src/plugins/docker/dockerdevicewidget.cpp @@ -80,9 +80,9 @@ DockerDeviceWidget::DockerDeviceWidget(const IDevice::Ptr &device) }); m_enableLldbFlags = new QCheckBox(Tr::tr("Enable flags needed for LLDB")); - m_enableLldbFlags->setToolTip(Tr::tr("Adds the following flags to the container: " - "--cap-add=SYS_PTRACE --security-opt seccomp=unconfined, " - "this is necessary to allow lldb to run")); + m_enableLldbFlags->setToolTip(Tr::tr("Adds the following flags to the container " + "to allow LLDB to run: " + "--cap-add=SYS_PTRACE --security-opt seccomp=unconfined")); m_enableLldbFlags->setChecked(m_data.enableLldbFlags); m_enableLldbFlags->setEnabled(true); @@ -159,7 +159,7 @@ DockerDeviceWidget::DockerDeviceWidget(const IDevice::Ptr &device) searchDirsLineEdit->setPlaceholderText(Tr::tr("Semicolon-separated list of directories")); searchDirsLineEdit->setToolTip( - Tr::tr("Select the paths in the docker image that should be scanned for kit entries.")); + Tr::tr("Select the paths in the Docker image that should be scanned for kit entries.")); searchDirsLineEdit->setHistoryCompleter("DockerMounts", true); auto searchPaths = [searchDirsComboBox, searchDirsLineEdit, dockerDevice] { @@ -195,7 +195,7 @@ DockerDeviceWidget::DockerDeviceWidget(const IDevice::Ptr &device) m_kitItemDetector.autoDetect(dockerDevice->id().toString(), searchPaths()); if (DockerApi::instance()->dockerDaemonAvailable().value_or(false) == false) - logView->append(Tr::tr("Docker daemon appears to be not running.")); + logView->append(Tr::tr("Docker daemon appears to be stopped.")); else logView->append(Tr::tr("Docker daemon appears to be running.")); diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp index 69cf636e72c..90f002e0994 100644 --- a/src/plugins/git/gitclient.cpp +++ b/src/plugins/git/gitclient.cpp @@ -2856,7 +2856,7 @@ bool GitClient::addAndCommit(const FilePath &repositoryDirectory, GitPlugin::updateCurrentBranch(); return true; } - VcsOutputWindow::appendError(Tr::tr("Cannot commit %n file(s)", nullptr, commitCount) + "\n"); + VcsOutputWindow::appendError(Tr::tr("Cannot commit %n file(s).", nullptr, commitCount) + "\n"); return false; } diff --git a/src/plugins/mcusupport/mcusupportoptionspage.cpp b/src/plugins/mcusupport/mcusupportoptionspage.cpp index b303a7acae9..1f63fa7c2ee 100644 --- a/src/plugins/mcusupport/mcusupportoptionspage.cpp +++ b/src/plugins/mcusupport/mcusupportoptionspage.cpp @@ -229,7 +229,7 @@ void McuSupportOptionsWidget::updateStatus() : Tr::tr("A kit for the selected target can be created.")); } else { m_kitCreationInfoLabel->setType(Utils::InfoLabel::NotOk); - m_kitCreationInfoLabel->setText(Tr::tr("Provide the package paths in order to create a kit " + m_kitCreationInfoLabel->setText(Tr::tr("Provide the package paths to create a kit " "for your target.")); } } @@ -243,7 +243,7 @@ void McuSupportOptionsWidget::updateStatus() if (m_statusInfoLabel->isVisible()) { m_statusInfoLabel->setType(Utils::InfoLabel::NotOk); m_statusInfoLabel->setText(Tr::tr("No CMake tool was detected. Add a CMake tool in the " - "CMake options and press Apply.")); + "CMake options and select Apply.")); } } } diff --git a/src/plugins/mcusupport/mcusupportplugin.cpp b/src/plugins/mcusupport/mcusupportplugin.cpp index f2ec2ef69aa..ecdf89ded78 100644 --- a/src/plugins/mcusupport/mcusupportplugin.cpp +++ b/src/plugins/mcusupport/mcusupportplugin.cpp @@ -168,7 +168,7 @@ void McuSupportPlugin::askUserAboutMcuSupportKitsUpgrade(const SettingsHandler:: return; Utils::InfoBarEntry info(upgradeMcuSupportKits, - Tr::tr("New version of Qt for MCUs detected. Upgrade existing Kits?"), + Tr::tr("New version of Qt for MCUs detected. Upgrade existing kits?"), Utils::InfoBarEntry::GlobalSuppression::Enabled); using McuKitManager::UpgradeOption; static UpgradeOption selectedOption = UpgradeOption::Keep; diff --git a/src/plugins/python/pythonwizardpage.cpp b/src/plugins/python/pythonwizardpage.cpp index 253422ed20c..2216dbfa574 100644 --- a/src/plugins/python/pythonwizardpage.cpp +++ b/src/plugins/python/pythonwizardpage.cpp @@ -64,7 +64,7 @@ bool PythonWizardPageFactory::validateData(Id typeId, const QVariant &data, QStr if (items.isEmpty()) { if (errorMessage) { - *errorMessage = Tr::tr("'data' of a Python wizard page expects a map with 'items' " + *errorMessage = Tr::tr("\"data\" of a Python wizard page expects a map with \"items\" " "containing a list of objects."); } return false; @@ -73,9 +73,9 @@ bool PythonWizardPageFactory::validateData(Id typeId, const QVariant &data, QStr if (!Utils::allOf(items, &validItem)) { if (errorMessage) { *errorMessage = Tr::tr( - "An item of Python wizard page data expects a 'trKey' field containing the ui " - "visible string for that python version and an field 'value' containing an object " - "with a 'PySideVersion' field used for import statements in the python files."); + "An item of Python wizard page data expects a \"trKey\" field containing the UI " + "visible string for that Python version and a \"value\" field containing an object " + "with a \"PySideVersion\" field used for import statements in the Python files."); } return false; } diff --git a/src/plugins/terminal/terminalpane.cpp b/src/plugins/terminal/terminalpane.cpp index 71e979282bc..d30d7f79357 100644 --- a/src/plugins/terminal/terminalpane.cpp +++ b/src/plugins/terminal/terminalpane.cpp @@ -79,10 +79,10 @@ TerminalPane::TerminalPane(QObject *parent) .toString(QKeySequence::NativeText); if (TerminalSettings::instance().sendEscapeToTerminal.value()) { m_escSettingButton->setText(escKey); - m_escSettingButton->setToolTip(Tr::tr("Sending Esc to terminal instead of Qt Creator")); + m_escSettingButton->setToolTip(Tr::tr("Sends Esc to terminal instead of Qt Creator.")); } else { m_escSettingButton->setText(shiftEsc); - m_escSettingButton->setToolTip(Tr::tr("Press %1 to send Esc to terminal").arg(shiftEsc)); + m_escSettingButton->setToolTip(Tr::tr("Press %1 to send Esc to terminal.").arg(shiftEsc)); } }; @@ -252,10 +252,10 @@ void TerminalPane::initActions() TerminalSettings::instance().lockKeyboard.setValue(locked); if (locked) { lockKeyboard.setIcon(LOCK_KEYBOARD_ICON.icon()); - lockKeyboard.setToolTip(Tr::tr("Keyboard shortcuts will be sent to the Terminal")); + lockKeyboard.setToolTip(Tr::tr("Sends keyboard shortcuts to Terminal.")); } else { lockKeyboard.setIcon(UNLOCK_KEYBOARD_ICON.icon()); - lockKeyboard.setToolTip(Tr::tr("Keyboard shortcuts will be sent to Qt Creator")); + lockKeyboard.setToolTip(Tr::tr("Sends keyboard shortcuts to Qt Creator.")); } }; diff --git a/src/plugins/terminal/terminalsettings.cpp b/src/plugins/terminal/terminalsettings.cpp index 06903c4d4c5..bb90e24bec8 100644 --- a/src/plugins/terminal/terminalsettings.cpp +++ b/src/plugins/terminal/terminalsettings.cpp @@ -110,7 +110,7 @@ static expected_str loadItermColors(const FilePath &path) QFile f(path.toFSPathString()); const bool opened = f.open(QIODevice::ReadOnly); if (!opened) - return make_unexpected(Tr::tr("Failed to open file")); + return make_unexpected(Tr::tr("Failed to open file.")); QXmlStreamReader reader(&f); while (!reader.atEnd() && reader.readNextStartElement()) { @@ -191,7 +191,7 @@ static expected_str loadVsCodeColors(const FilePath &path) const QJsonObject root = doc.object(); const auto itColors = root.find("colors"); if (itColors == root.end()) - return make_unexpected(Tr::tr("No colors found")); + return make_unexpected(Tr::tr("No colors found.")); const QJsonObject colors = itColors->toObject(); @@ -252,7 +252,7 @@ static expected_str loadKonsoleColorScheme(const FilePath &path) auto parseColor = [](const QStringList &parts) -> expected_str { if (parts.size() != 3 && parts.size() != 4) - return make_unexpected(Tr::tr("Invalid color format")); + return make_unexpected(Tr::tr("Invalid color format.")); int alpha = parts.size() == 4 ? parts[3].toInt() : 255; return QColor(parts[0].toInt(), parts[1].toInt(), parts[2].toInt(), alpha); }; @@ -351,7 +351,7 @@ static expected_str loadColorScheme(const FilePath &path) else if (path.suffix() == "theme" || path.completeSuffix() == "theme.txt") return loadXFCE4ColorScheme(path); - return make_unexpected(Tr::tr("Unknown color scheme format")); + return make_unexpected(Tr::tr("Unknown color scheme format.")); } static TerminalSettings *s_instance; @@ -375,7 +375,7 @@ TerminalSettings::TerminalSettings() enableTerminal.setSettingsKey("EnableTerminal"); enableTerminal.setLabelText(Tr::tr("Use internal terminal")); enableTerminal.setToolTip( - Tr::tr("If enabled, use the internal terminal when \"Run In Terminal\" is " + Tr::tr("Uses the internal terminal when \"Run In Terminal\" is " "enabled and for \"Open Terminal here\".")); enableTerminal.setDefaultValue(true); @@ -387,7 +387,7 @@ TerminalSettings::TerminalSettings() fontSize.setSettingsKey("FontSize"); fontSize.setLabelText(Tr::tr("Size:")); - fontSize.setToolTip(Tr::tr("The font size used in the terminal. (in points)")); + fontSize.setToolTip(Tr::tr("The font size used in the terminal (in points).")); fontSize.setDefaultValue(defaultFontSize()); fontSize.setRange(1, 100); @@ -414,13 +414,13 @@ TerminalSettings::TerminalSettings() sendEscapeToTerminal.setSettingsKey("SendEscapeToTerminal"); sendEscapeToTerminal.setLabelText(Tr::tr("Send escape key to terminal")); sendEscapeToTerminal.setToolTip( - Tr::tr("If enabled, pressing the escape key will send it to the terminal " + Tr::tr("Sends the escape key to the terminal when pressed" "instead of closing the terminal.")); sendEscapeToTerminal.setDefaultValue(false); audibleBell.setSettingsKey("AudibleBell"); audibleBell.setLabelText(Tr::tr("Audible bell")); - audibleBell.setToolTip(Tr::tr("If enabled, the terminal will beep when a bell " + audibleBell.setToolTip(Tr::tr("Makes the terminal beep when a bell " "character is received.")); audibleBell.setDefaultValue(true); diff --git a/src/plugins/texteditor/fontsettings.cpp b/src/plugins/texteditor/fontsettings.cpp index d5f2ddc6666..873be0ae78a 100644 --- a/src/plugins/texteditor/fontsettings.cpp +++ b/src/plugins/texteditor/fontsettings.cpp @@ -420,8 +420,8 @@ bool FontSettings::loadColorScheme(const Utils::FilePath &filePath, for (const FormatDescription &desc : descriptions) { const TextStyle id = desc.id(); if (!m_scheme.contains(id)) { - if (id == C_NAMESPACE && m_scheme.contains(C_TYPE)) { - m_scheme.setFormatFor(C_NAMESPACE, m_scheme.formatFor(C_TYPE)); + if ((id == C_NAMESPACE || id == C_CONCEPT) && m_scheme.contains(C_TYPE)) { + m_scheme.setFormatFor(id, m_scheme.formatFor(C_TYPE)); continue; } if (id == C_MACRO && m_scheme.contains(C_FUNCTION)) { diff --git a/src/plugins/texteditor/texteditorconstants.cpp b/src/plugins/texteditor/texteditorconstants.cpp index fbf248be009..e6d157adca9 100644 --- a/src/plugins/texteditor/texteditorconstants.cpp +++ b/src/plugins/texteditor/texteditorconstants.cpp @@ -33,6 +33,7 @@ const char *nameForStyle(TextStyle style) case C_NUMBER: return "Number"; case C_STRING: return "String"; case C_TYPE: return "Type"; + case C_CONCEPT: return "Concept"; case C_NAMESPACE: return "Namespace"; case C_LOCAL: return "Local"; case C_PARAMETER: return "Parameter"; diff --git a/src/plugins/texteditor/texteditorconstants.h b/src/plugins/texteditor/texteditorconstants.h index f422630f0d2..946b2b2f890 100644 --- a/src/plugins/texteditor/texteditorconstants.h +++ b/src/plugins/texteditor/texteditorconstants.h @@ -33,6 +33,7 @@ enum TextStyle : quint8 { C_NUMBER, C_STRING, C_TYPE, + C_CONCEPT, C_NAMESPACE, C_LOCAL, C_PARAMETER, diff --git a/src/plugins/texteditor/texteditorsettings.cpp b/src/plugins/texteditor/texteditorsettings.cpp index 8f6bab2c5f3..5e99fcf582f 100644 --- a/src/plugins/texteditor/texteditorsettings.cpp +++ b/src/plugins/texteditor/texteditorsettings.cpp @@ -141,6 +141,8 @@ FormatDescriptions TextEditorSettingsPrivate::initialFormats() Tr::tr("Name of a primitive data type."), Qt::darkYellow); formatDescr.emplace_back(C_TYPE, Tr::tr("Type"), Tr::tr("Name of a type."), Qt::darkMagenta); + formatDescr.emplace_back(C_CONCEPT, Tr::tr("Concept"), Tr::tr("Name of a concept."), + Qt::darkMagenta); formatDescr.emplace_back(C_NAMESPACE, Tr::tr("Namespace"), Tr::tr("Name of a namespace."), Qt::darkGreen); formatDescr.emplace_back(C_LOCAL, Tr::tr("Local"), diff --git a/src/plugins/valgrind/valgrindengine.cpp b/src/plugins/valgrind/valgrindengine.cpp index a228eb0e09a..61ef89c3041 100644 --- a/src/plugins/valgrind/valgrindengine.cpp +++ b/src/plugins/valgrind/valgrindengine.cpp @@ -61,7 +61,7 @@ void ValgrindToolRunner::start() if (!found.isExecutableFile()) { reportFailure(Tr::tr("Valgrind executable \"%1\" not found or not executable.\n" - "Check settings or ensure valgrind is installed and available in PATH.") + "Check settings or ensure Valgrind is installed and available in PATH.") .arg(valgrindExecutable.toUserOutput())); return; } diff --git a/src/tools/disclaim/disclaim.qbs b/src/tools/disclaim/disclaim.qbs index 14a5ce7fae6..d379387460b 100644 --- a/src/tools/disclaim/disclaim.qbs +++ b/src/tools/disclaim/disclaim.qbs @@ -3,6 +3,7 @@ import qbs 1.0 QtcTool { name: "disclaim" condition: qbs.targetOS.contains("macos") + useQt: false files: [ "disclaim.mm" diff --git a/src/tools/process_stub/process_stub.qbs b/src/tools/process_stub/process_stub.qbs index 1fa1bc32a3f..54047ce6759 100644 --- a/src/tools/process_stub/process_stub.qbs +++ b/src/tools/process_stub/process_stub.qbs @@ -4,7 +4,7 @@ QtcTool { name: "qtcreator_process_stub" consoleApplication: true - Depends { name: "Qt"; submodules: ["core", "network"]; } + Depends { name: "Qt.network" } - files: [ "main.cpp" ] + files: "main.cpp" } diff --git a/src/tools/qtpromaker/qtpromaker.qbs b/src/tools/qtpromaker/qtpromaker.qbs index 50c77f039d3..4e99e21e3f1 100644 --- a/src/tools/qtpromaker/qtpromaker.qbs +++ b/src/tools/qtpromaker/qtpromaker.qbs @@ -3,7 +3,5 @@ import qbs 1.0 QtcTool { name: "qtpromaker" - Depends { name: "Qt.core" } - - files: [ "main.cpp" ] + files: "main.cpp" } diff --git a/tests/auto/utils/commandline/tst_commandline.cpp b/tests/auto/utils/commandline/tst_commandline.cpp index 2691b1e84ad..aebf7075128 100644 --- a/tests/auto/utils/commandline/tst_commandline.cpp +++ b/tests/auto/utils/commandline/tst_commandline.cpp @@ -188,17 +188,95 @@ private slots: QCOMPARE(cmd.arguments(), "and args"); } + void testFromInputWithMacro_data() + { + QTest::addColumn("input"); + QTest::addColumn("expectedExecutable"); + QTest::addColumn("expectedArguments"); + + QTest::newRow("simple") << "command %{hello}" + << "command" + << (HostOsInfo::isWindowsHost() ? "\"hello world\"" + : "'hello world'"); + + QTest::newRow("simple-quoted") + << "command \"%{hello}\"" + << "command" << (HostOsInfo::isWindowsHost() ? "\"hello world\"" : "'hello world'"); + + QTest::newRow("quoted-with-extra") + << "command \"%{hello}, he said\"" + << "command" + << (HostOsInfo::isWindowsHost() ? "\"hello world, he said\"" : "'hello world, he said'"); + + QTest::newRow("convert-to-quote-win") + << "command 'this is a test'" + << "command" + << (HostOsInfo::isWindowsHost() ? "\"this is a test\"" : "'this is a test'"); + } + void testFromInputWithMacro() { + QFETCH(QString, input); + QFETCH(QString, expectedExecutable); + QFETCH(QString, expectedArguments); + MacroExpander expander; expander.registerVariable("hello", "world var", [] { return "hello world"; }); - CommandLine cmd = CommandLine::fromUserInput("command macroarg: %{hello}", &expander); - QCOMPARE(cmd.executable(), "command"); + CommandLine cmd = CommandLine::fromUserInput(input, &expander); + QCOMPARE(cmd.executable().toUserOutput(), expectedExecutable); + + // TODO: Fix (macro) escaping on windows if (HostOsInfo::isWindowsHost()) - QEXPECT_FAIL("", "Windows does not correctly quote macro arguments", Continue); + QEXPECT_FAIL("simple", "Windows does not correctly quote macro arguments", Continue); + if (HostOsInfo::isWindowsHost()) + QEXPECT_FAIL("simple-quoted", "Windows removes quotes from macro arguments", Continue); + if (HostOsInfo::isWindowsHost()) + QEXPECT_FAIL("convert-to-quote-win", + "Windows should convert single to double quotes", + Continue); - QCOMPARE(cmd.arguments(), "macroarg: 'hello world'"); + QCOMPARE(cmd.arguments(), expectedArguments); + } + + void testMultiCommand_data() + { + QTest::addColumn("input"); + QTest::addColumn("executable"); + QTest::addColumn("arguments"); + + QTest::newRow("command-and-command") << "command1 && command2" + << "command1" + << "&& command2"; + + QTest::newRow("command-and-command-nospace") << "command1&&command2" + << "command1" + << "&&command2"; + + QTest::newRow("command-semicolon-command") << "command1 ; command2" + << "command1" + << "; command2"; + + QTest::newRow("command-or-command") << "command1 || command2" + << "command1" + << "|| command2"; + } + + void testMultiCommand() + { + QFETCH(QString, input); + QFETCH(QString, executable); + QFETCH(QString, arguments); + + CommandLine cmdLine = CommandLine::fromUserInput(input); + + QEXPECT_FAIL( + "command-and-command-nospace", + "CommandLine::fromUserInput does not handle multi-command without space correctly", + Abort); + + QCOMPARE(cmdLine.executable().path(), executable); + QCOMPARE(cmdLine.arguments(), arguments); } }; diff --git a/tests/manual/qml/testprojects/uisplit/basiclayouts/MainForm.ui.qml b/tests/manual/qml/testprojects/uisplit/basiclayouts/MainForm.ui.qml deleted file mode 100644 index 48f40efc95d..00000000000 --- a/tests/manual/qml/testprojects/uisplit/basiclayouts/MainForm.ui.qml +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick 2.2 -import QtQuick.Controls 1.2 -import QtQuick.Layouts 1.0 - -ColumnLayout { - property alias rowBox_1: rowBox_1 - property alias rowLayout_1: rowLayout_1 - property alias textField_1: textField_1 - property alias button_1: button_1 - property alias gridBox_1: gridBox_1 - property alias gridLayout_1: gridLayout_1 - property alias label_1: label_1 - property alias label_2: label_2 - property alias label_3: label_3 - property alias textField_2: textField_2 - property alias textField_3: textField_3 - property alias textField_4: textField_4 - property alias textField_5: textField_5 - property alias textArea_1: textArea_1 - - anchors.fill: parent - - GroupBox { - id: rowBox_1 - title: "Row layout" - Layout.fillWidth: true - - RowLayout { - id: rowLayout_1 - anchors.fill: parent - TextField { - id: textField_1 - placeholderText: "This wants to grow horizontally" - Layout.fillWidth: true - } - Button { - id: button_1 - text: "Button" - } - } - } - - GroupBox { - id: gridBox_1 - title: "Grid layout" - Layout.fillWidth: true - - GridLayout { - id: gridLayout_1 - rows: 3 - flow: GridLayout.TopToBottom - anchors.fill: parent - - Label { id: label_1; text: "Line 1" } - Label { id: label_2; text: "Line 2" } - Label { id: label_3; text: "Line 3" } - - TextField { id: textField_2 } - TextField { id: textField_3 } - TextField { id: textField_4 } - - TextArea { - id: textField_5 - text: "This widget spans over three rows in the GridLayout.\n" - + "All items in the GridLayout are implicitly positioned from top to bottom." - Layout.rowSpan: 3 - Layout.fillHeight: true - Layout.fillWidth: true - } - } - } - TextArea { - id: textArea_1 - text: "This fills the whole cell" - Layout.minimumHeight: 30 - Layout.fillHeight: true - Layout.fillWidth: true - } -} diff --git a/tests/manual/qml/testprojects/uisplit/basiclayouts/basiclayouts.pro b/tests/manual/qml/testprojects/uisplit/basiclayouts/basiclayouts.pro deleted file mode 100644 index cc998cb6eef..00000000000 --- a/tests/manual/qml/testprojects/uisplit/basiclayouts/basiclayouts.pro +++ /dev/null @@ -1,13 +0,0 @@ -QT += qml quick -TARGET = basiclayouts -!no_desktop: QT += widgets - -include(src/src.pri) -include(../shared/shared.pri) - -OTHER_FILES += \ - main.qml \ - MainForm.qml \ - -RESOURCES += \ - resources.qrc diff --git a/tests/manual/qml/testprojects/uisplit/basiclayouts/basiclayouts.qmlproject b/tests/manual/qml/testprojects/uisplit/basiclayouts/basiclayouts.qmlproject deleted file mode 100644 index e5a8bf02ca7..00000000000 --- a/tests/manual/qml/testprojects/uisplit/basiclayouts/basiclayouts.qmlproject +++ /dev/null @@ -1,16 +0,0 @@ -import QmlProject 1.1 - -Project { - mainFile: "main.qml" - - /* Include .qml, .js, and image files from current directory and subdirectories */ - QmlFiles { - directory: "." - } - JavaScriptFiles { - directory: "." - } - ImageFiles { - directory: "." - } -} diff --git a/tests/manual/qml/testprojects/uisplit/basiclayouts/main.qml b/tests/manual/qml/testprojects/uisplit/basiclayouts/main.qml deleted file mode 100644 index 0a2295a0a0f..00000000000 --- a/tests/manual/qml/testprojects/uisplit/basiclayouts/main.qml +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick 2.2 -import QtQuick.Controls 1.2 -import QtQuick.Layouts 1.0 - -ApplicationWindow { - visible: true - title: "Basic layouts" - property int margin: 11 - width: mainForm.implicitWidth + 2 * margin - height: mainForm.implicitHeight + 2 * margin - minimumWidth: mainForm.Layout.minimumWidth + 2 * margin - minimumHeight: mainForm.Layout.minimumHeight + 2 * margin - - MainForm { - id: mainForm - anchors.margins: margin - } - -} diff --git a/tests/manual/qml/testprojects/uisplit/gallery/MainTabView.ui.qml b/tests/manual/qml/testprojects/uisplit/gallery/MainTabView.ui.qml deleted file mode 100644 index d6b6b92c735..00000000000 --- a/tests/manual/qml/testprojects/uisplit/gallery/MainTabView.ui.qml +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick 2.2 -import QtQuick.Controls 1.2 -import QtQuick.Layouts 1.0 -import QtQuick.Dialogs 1.0 -import "content" - -TabView { - - id: tabView - - tabPosition: controlPage.item ? controlPage.item.tabPosition : Qt.TopEdge - - width: 640 - height: 420 - - Tab { - id: controlPage - title: "Controls" - Controls { - anchors.fill: parent - enabled: tabView.enabled - } - } - Tab { - title: "Itemviews" - ModelView { - anchors.fill: parent - anchors.margins: Qt.platform.os === "osx" ? 12 : 6 - } - } - Tab { - title: "Styles" - Styles { - anchors.fill: parent - } - } - Tab { - title: "Layouts" - Layouts { - anchors.fill:parent - anchors.margins: 8 - } - } -} diff --git a/tests/manual/qml/testprojects/uisplit/gallery/content/AboutDialog.qml b/tests/manual/qml/testprojects/uisplit/gallery/content/AboutDialog.qml deleted file mode 100644 index a19c248a8ac..00000000000 --- a/tests/manual/qml/testprojects/uisplit/gallery/content/AboutDialog.qml +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick 2.2 -import QtQuick.Dialogs 1.1 - -MessageDialog { - icon: StandardIcon.Information - text: "QtQuick.Controls gallery example" - detailedText: "This example demonstrates most of the available Qt Quick Controls." - title: "About Gallery" -} diff --git a/tests/manual/qml/testprojects/uisplit/gallery/content/ChildWindow.qml b/tests/manual/qml/testprojects/uisplit/gallery/content/ChildWindow.qml deleted file mode 100644 index 9360a7db889..00000000000 --- a/tests/manual/qml/testprojects/uisplit/gallery/content/ChildWindow.qml +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick 2.2 -import QtQuick.Window 2.1 -import QtQuick.Controls 1.2 - -Window { - id: window1 - - width: 400 - height: 400 - - title: "child window" - flags: Qt.Dialog - - Rectangle { - color: syspal.window - anchors.fill: parent - - Label { - id: dimensionsText - anchors.horizontalCenter: parent.horizontalCenter - anchors.top: parent.top - width: parent.width - horizontalAlignment: Text.AlignHCenter - } - - Label { - id: availableDimensionsText - anchors.horizontalCenter: parent.horizontalCenter - anchors.top: dimensionsText.bottom - width: parent.width - horizontalAlignment: Text.AlignHCenter - } - - Label { - id: closeText - anchors.horizontalCenter: parent.horizontalCenter - anchors.top: availableDimensionsText.bottom - text: "This is a new Window, press the\nbutton below to close it again." - } - Button { - anchors.horizontalCenter: closeText.horizontalCenter - anchors.top: closeText.bottom - id: closeWindowButton - text:"Close" - width: 98 - tooltip:"Press me, to close this window again" - onClicked: window1.visible = false - } - Button { - anchors.horizontalCenter: closeText.horizontalCenter - anchors.top: closeWindowButton.bottom - id: maximizeWindowButton - text:"Maximize" - width: 98 - tooltip:"Press me, to maximize this window again" - onClicked: window1.visibility = Window.Maximized; - } - Button { - anchors.horizontalCenter: closeText.horizontalCenter - anchors.top: maximizeWindowButton.bottom - id: normalizeWindowButton - text:"Normalize" - width: 98 - tooltip:"Press me, to normalize this window again" - onClicked: window1.visibility = Window.Windowed; - } - Button { - anchors.horizontalCenter: closeText.horizontalCenter - anchors.top: normalizeWindowButton.bottom - id: minimizeWindowButton - text:"Minimize" - width: 98 - tooltip:"Press me, to minimize this window again" - onClicked: window1.visibility = Window.Minimized; - } - } -} - diff --git a/tests/manual/qml/testprojects/uisplit/gallery/content/Controls.qml b/tests/manual/qml/testprojects/uisplit/gallery/content/Controls.qml deleted file mode 100644 index 1d8759f69fa..00000000000 --- a/tests/manual/qml/testprojects/uisplit/gallery/content/Controls.qml +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick 2.2 -import QtQuick.Controls 1.2 -import QtQuick.Layouts 1.1 -import QtQuick.Controls.Styles 1.1 - -ControlsForm { - id: flickable - button2.menu: Menu { - MenuItem { text: "This Button" } - MenuItem { text: "Happens To Have" } - MenuItem { text: "A Menu Assigned" } - } - - editableCombo.onAccepted: { - if (editableCombo.find(currentText) === -1) { - choices.append({text: editText}) - currentIndex = editableCombo.find(editText) - } - } - - fontComboBox.model: Qt.fontFamilies() - - rowLayout1.data: [ ExclusiveGroup { id: tabPositionGroup } ] -} diff --git a/tests/manual/qml/testprojects/uisplit/gallery/content/ControlsForm.ui.qml b/tests/manual/qml/testprojects/uisplit/gallery/content/ControlsForm.ui.qml deleted file mode 100644 index fc610d6ece8..00000000000 --- a/tests/manual/qml/testprojects/uisplit/gallery/content/ControlsForm.ui.qml +++ /dev/null @@ -1,180 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick 2.2 -import QtQuick.Controls 1.2 -import QtQuick.Layouts 1.1 -import QtQuick.Controls.Styles 1.1 - -Item { - id: flickable - - width: 640 - height: 420 - property alias fontComboBox: fontComboBox - property alias rowLayout1: rowLayout1 - property alias button2: button2 - property alias editableCombo: editableCombo - - property int tabPosition: tabPositionGroup.current === r2 ? Qt.BottomEdge : Qt.TopEdge - - RowLayout { - id: contentRow - anchors.fill:parent - anchors.margins: 8 - spacing: 16 - ColumnLayout { - id: firstColumn - Layout.minimumWidth: implicitWidth - Layout.fillWidth: false - RowLayout { - id: buttonrow - - Button { - id: button1 - text: "Button 1" - tooltip:"This is an interesting tool tip" - Layout.fillWidth: true - } - - Button { - id:button2 - text:"Button 2" - Layout.fillWidth: true - - } - } - ComboBox { - id: combo - model: choices - currentIndex: 2 - Layout.fillWidth: true - } - ComboBox { - id: fontComboBox - Layout.fillWidth: true - currentIndex: 47 - } - ComboBox { - id: editableCombo - editable: true - model: choices - Layout.fillWidth: true - currentIndex: 2 - } - RowLayout { - SpinBox { - id: t1 - Layout.fillWidth: true - minimumValue: -50 - value: -20 - } - SpinBox { - id: t2 - Layout.fillWidth: true - } - } - TextField { - id: t3 - placeholderText: "This is a placeholder for a TextField" - Layout.fillWidth: true - } - ProgressBar { - // normalize value [0.0 .. 1.0] - value: (slider.value - slider.minimumValue) / (slider.maximumValue - slider.minimumValue) - Layout.fillWidth: true - } - ProgressBar { - indeterminate: true - Layout.fillWidth: true - } - Slider { - id: slider - value: 0.5 - Layout.fillWidth: true - tickmarksEnabled: tickmarkCheck.checked - stepSize: tickmarksEnabled ? 0.1 : 0 - } - MouseArea { - id: busyCheck - Layout.fillWidth: true - Layout.fillHeight: true - hoverEnabled:true - Layout.preferredHeight: busyIndicator.height - BusyIndicator { - id: busyIndicator - running: busyCheck.containsMouse - anchors.horizontalCenter: parent.horizontalCenter - } - } - } - ColumnLayout { - id: rightcol - Layout.fillWidth: true - anchors { - top: parent.top - bottom: parent.bottom - } - - GroupBox { - id: group1 - title: "CheckBox" - Layout.fillWidth: true - RowLayout { - Layout.fillWidth: true - CheckBox { - id: frameCheckbox - text: "Text frame" - checked: true - Layout.minimumWidth: 100 - } - CheckBox { - id: tickmarkCheck - text: "Tickmarks" - checked: false - Layout.minimumWidth: 100 - } - CheckBox { - id: wrapCheck - text: "Word wrap" - checked: true - Layout.minimumWidth: 100 - } - } - } - GroupBox { - id: group2 - title:"Tab Position" - Layout.fillWidth: true - RowLayout { - id: rowLayout1 - - RadioButton { - id: r1 - text: "Top" - checked: true - exclusiveGroup: tabPositionGroup - Layout.minimumWidth: 100 - } - RadioButton { - id: r2 - text: "Bottom" - exclusiveGroup: tabPositionGroup - Layout.minimumWidth: 100 - } - } - } - - TextArea { - id: area - frameVisible: frameCheckbox.checked - text: loremIpsum + loremIpsum - textFormat: Qt.RichText - wrapMode: wrapCheck.checked ? TextEdit.WordWrap : TextEdit.NoWrap - Layout.fillWidth: true - Layout.fillHeight: true - //menu: editmenu - } - } - } -} diff --git a/tests/manual/qml/testprojects/uisplit/gallery/content/DummyModel.qml b/tests/manual/qml/testprojects/uisplit/gallery/content/DummyModel.qml deleted file mode 100644 index f38a1ae1fb9..00000000000 --- a/tests/manual/qml/testprojects/uisplit/gallery/content/DummyModel.qml +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick 2.2 -import QtQuick.Controls 1.2 - -ListModel { - id: dummyModel - Component.onCompleted: { - for (var i = 0 ; i < 100 ; ++i) { - append({"index": i, "title": "A title " + i, "imagesource" :"http://someurl.com", "credit" : "N/A"}) - } - } -} diff --git a/tests/manual/qml/testprojects/uisplit/gallery/content/ImageViewer.qml b/tests/manual/qml/testprojects/uisplit/gallery/content/ImageViewer.qml deleted file mode 100644 index 7a9045f94b0..00000000000 --- a/tests/manual/qml/testprojects/uisplit/gallery/content/ImageViewer.qml +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick 2.2 -import QtQuick.Window 2.1 - -Window { - id: imageViewer - minimumWidth: viewerImage.width - minimumHeight: viewerImage.height - function open(source) { - viewerImage.source = source - width = viewerImage.implicitWidth + 20 - height = viewerImage.implicitHeight + 20 - title = source - visible = true - } - Image { - id: viewerImage - anchors.centerIn: parent - } -} diff --git a/tests/manual/qml/testprojects/uisplit/gallery/content/Layouts.ui.qml b/tests/manual/qml/testprojects/uisplit/gallery/content/Layouts.ui.qml deleted file mode 100644 index 2493160b028..00000000000 --- a/tests/manual/qml/testprojects/uisplit/gallery/content/Layouts.ui.qml +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick 2.2 -import QtQuick.Controls 1.2 -import QtQuick.Layouts 1.0 - -Item { - id:root - - width: 600 - height: 300 - - ColumnLayout { - id: mainLayout - anchors.fill: parent - spacing: 4 - GroupBox { - id: rowBox - title: "Row layout" - Layout.fillWidth: true - RowLayout { - id: rowLayout - anchors.fill: parent - TextField { - placeholderText: "This wants to grow horizontally" - Layout.fillWidth: true - } - Button { - text: "Button" - } - } - } - - GroupBox { - id: gridBox - title: "Grid layout" - Layout.fillWidth: true - - GridLayout { - id: gridLayout - anchors.fill: parent - rows: 3 - flow: GridLayout.TopToBottom - - Label { text: "Line 1" } - Label { text: "Line 2" } - Label { text: "Line 3" } - - TextField { } - TextField { } - TextField { } - - TextArea { - text: "This widget spans over three rows in the GridLayout.\n" - + "All items in the GridLayout are implicitly positioned from top to bottom." - Layout.rowSpan: 3 - Layout.fillHeight: true - Layout.fillWidth: true - } - } - } - TextArea { - id: t3 - text: "This fills the whole cell" - Layout.minimumHeight: 30 - Layout.fillHeight: true - Layout.fillWidth: true - } - } -} diff --git a/tests/manual/qml/testprojects/uisplit/gallery/content/ModelView.qml b/tests/manual/qml/testprojects/uisplit/gallery/content/ModelView.qml deleted file mode 100644 index 4441631c2b8..00000000000 --- a/tests/manual/qml/testprojects/uisplit/gallery/content/ModelView.qml +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick 2.2 -import QtQuick.Controls 1.2 -//import QtQuick.XmlListModel 2.1 - -Item { - id: root - - width: 600 - height: 300 - - // XmlListModel { - // id: flickerModel - // source: "http://api.flickr.com/services/feeds/photos_public.gne?format=rss2&tags=" + "Cat" - // query: "/rss/channel/item" - // namespaceDeclarations: "declare namespace media=\"http://search.yahoo.com/mrss/\";" - // XmlRole { name: "title"; query: "title/string()" } - // XmlRole { name: "imagesource"; query: "media:thumbnail/@url/string()" } - // XmlRole { name: "credit"; query: "media:credit/string()" } - // } - - TableView{ - model: DummyModel { - - } - - anchors.fill: parent - - TableViewColumn { - role: "index" - title: "#" - width: 36 - resizable: false - movable: false - } - TableViewColumn { - role: "title" - title: "Title" - width: 120 - } - TableViewColumn { - role: "credit" - title: "Credit" - width: 120 - } - TableViewColumn { - role: "imagesource" - title: "Image source" - width: 200 - visible: true - } - } -} diff --git a/tests/manual/qml/testprojects/uisplit/gallery/content/Styles.ui.qml b/tests/manual/qml/testprojects/uisplit/gallery/content/Styles.ui.qml deleted file mode 100644 index b0f4d1447e6..00000000000 --- a/tests/manual/qml/testprojects/uisplit/gallery/content/Styles.ui.qml +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick 2.2 -import QtQuick.Controls 1.2 -import QtQuick.Controls.Styles 1.1 -import QtQuick.Particles 2.0 -import QtQuick.Layouts 1.0 -import "styles" - -Item { - id: root - - width: 600 - height: 300 - - property int columnWidth: 120 - GridLayout { - rowSpacing: 12 - columnSpacing: 30 - anchors.top: parent.top - anchors.horizontalCenter: parent.horizontalCenter - anchors.margins: 30 - - Button { - text: "Push me" - style: ButtonStyle { } - implicitWidth: columnWidth - } - Button { - text: "Push me" - style: MyButtonStyle1 { - } - implicitWidth: columnWidth - } - Button { - text: "Push me" - style: MyButtonStyle2 { - - } - - implicitWidth: columnWidth - } - - TextField { - Layout.row: 1 - style: TextFieldStyle { } - implicitWidth: columnWidth - } - TextField { - style: MyTextFieldStyle1 { - } - implicitWidth: columnWidth - } - TextField { - style: MyTextFieldStyle2 { - } - implicitWidth: columnWidth - } - - Slider { - id: slider1 - Layout.row: 2 - value: 0.5 - implicitWidth: columnWidth - style: SliderStyle { } - } - Slider { - id: slider2 - value: 0.5 - implicitWidth: columnWidth - style: MySliderStyle1 { - } - } - Slider { - id: slider3 - value: 0.5 - implicitWidth: columnWidth - style: MySliderStyle2 { - - } - } - - ProgressBar { - Layout.row: 3 - value: slider1.value - implicitWidth: columnWidth - style: ProgressBarStyle { } - } - ProgressBar { - value: slider2.value - implicitWidth: columnWidth - style: MyProgressBarStyle1 { } - } - ProgressBar { - value: slider3.value - implicitWidth: columnWidth - style: MyProgressBarStyle2 { } - } - - CheckBox { - text: "CheckBox" - style: CheckBoxStyle{} - Layout.row: 4 - implicitWidth: columnWidth - } - RadioButton { - style: RadioButtonStyle{} - text: "RadioButton" - implicitWidth: columnWidth - } - - ComboBox { - model: ["Paris", "Oslo", "New York"] - style: ComboBoxStyle{} - implicitWidth: columnWidth - } - - TabView { - Layout.row: 5 - Layout.columnSpan: 3 - Layout.fillWidth: true - implicitHeight: 30 - Tab { title: "One" ; Item {}} - Tab { title: "Two" ; Item {}} - Tab { title: "Three" ; Item {}} - Tab { title: "Four" ; Item {}} - style: TabViewStyle {} - } - - TabView { - Layout.row: 6 - Layout.columnSpan: 3 - Layout.fillWidth: true - implicitHeight: 30 - Tab { title: "One" ; Item {}} - Tab { title: "Two" ; Item {}} - Tab { title: "Three" ; Item {}} - Tab { title: "Four" ; Item {}} - style: MyTabViewStyle { - - } - } - } -} - diff --git a/tests/manual/qml/testprojects/uisplit/gallery/content/styles/MyButtonStyle1.qml b/tests/manual/qml/testprojects/uisplit/gallery/content/styles/MyButtonStyle1.qml deleted file mode 100644 index ae1c87d54df..00000000000 --- a/tests/manual/qml/testprojects/uisplit/gallery/content/styles/MyButtonStyle1.qml +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick 2.2 -import QtQuick.Controls 1.2 -import QtQuick.Controls.Styles 1.1 - -ButtonStyle { - background: BorderImage { - source: control.pressed ? "../../images/button-pressed.png" : "../../images/button.png" - border.left: 4 ; border.right: 4 ; border.top: 4 ; border.bottom: 4 - } -} diff --git a/tests/manual/qml/testprojects/uisplit/gallery/content/styles/MyButtonStyle2.qml b/tests/manual/qml/testprojects/uisplit/gallery/content/styles/MyButtonStyle2.qml deleted file mode 100644 index f5161f83eb1..00000000000 --- a/tests/manual/qml/testprojects/uisplit/gallery/content/styles/MyButtonStyle2.qml +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick 2.2 -import QtQuick.Controls 1.2 -import QtQuick.Controls.Styles 1.1 - -ButtonStyle { - background: Rectangle { - implicitHeight: 22 - implicitWidth: columnWidth - color: control.pressed ? "darkGray" : control.activeFocus ? "#cdd" : "#ccc" - antialiasing: true - border.color: "gray" - radius: height/2 - Rectangle { - anchors.fill: parent - anchors.margins: 1 - color: "transparent" - antialiasing: true - visible: !control.pressed - border.color: "#aaffffff" - radius: height/2 - } - } -} diff --git a/tests/manual/qml/testprojects/uisplit/gallery/content/styles/MyProgressBarStyle1.qml b/tests/manual/qml/testprojects/uisplit/gallery/content/styles/MyProgressBarStyle1.qml deleted file mode 100644 index 71cba685857..00000000000 --- a/tests/manual/qml/testprojects/uisplit/gallery/content/styles/MyProgressBarStyle1.qml +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick 2.2 -import QtQuick.Controls 1.2 -import QtQuick.Controls.Styles 1.1 -import QtQuick.Particles 2.0 - -ProgressBarStyle { - background: BorderImage { - source: "../../images/progress-background.png" - border.left: 2 ; border.right: 2 ; border.top: 2 ; border.bottom: 2 - } - progress: Item { - clip: true - BorderImage { - anchors.fill: parent - anchors.rightMargin: (control.value < control.maximumValue) ? -4 : 0 - source: "../../images/progress-fill.png" - border.left: 10 ; border.right: 10 - Rectangle { - width: 1 - color: "#a70" - opacity: 0.8 - anchors.top: parent.top - anchors.bottom: parent.bottom - anchors.bottomMargin: 1 - anchors.right: parent.right - visible: control.value < control.maximumValue - anchors.rightMargin: -parent.anchors.rightMargin - } - } - ParticleSystem{ id: bubbles; running: visible } - ImageParticle{ - id: fireball - system: bubbles - source: "../../images/bubble.png" - opacity: 0.7 - } - Emitter{ - system: bubbles - anchors.bottom: parent.bottom - anchors.margins: 4 - anchors.bottomMargin: -4 - anchors.left: parent.left - anchors.right: parent.right - size: 4 - sizeVariation: 4 - acceleration: PointDirection{ y: -6; xVariation: 3 } - emitRate: 6 * control.value - lifeSpan: 3000 - } - } -} diff --git a/tests/manual/qml/testprojects/uisplit/gallery/content/styles/MyProgressBarStyle2.qml b/tests/manual/qml/testprojects/uisplit/gallery/content/styles/MyProgressBarStyle2.qml deleted file mode 100644 index edcb67c336c..00000000000 --- a/tests/manual/qml/testprojects/uisplit/gallery/content/styles/MyProgressBarStyle2.qml +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick 2.2 -import QtQuick.Controls 1.2 -import QtQuick.Controls.Styles 1.1 - -ProgressBarStyle { - background: Rectangle { - implicitWidth: columnWidth - implicitHeight: 24 - color: "#f0f0f0" - border.color: "gray" - } - progress: Rectangle { - color: "#ccc" - border.color: "gray" - Rectangle { - color: "transparent" - border.color: "#44ffffff" - anchors.fill: parent - anchors.margins: 1 - } - } -} diff --git a/tests/manual/qml/testprojects/uisplit/gallery/content/styles/MySliderStyle1.qml b/tests/manual/qml/testprojects/uisplit/gallery/content/styles/MySliderStyle1.qml deleted file mode 100644 index 43dbb0f0aa9..00000000000 --- a/tests/manual/qml/testprojects/uisplit/gallery/content/styles/MySliderStyle1.qml +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick 2.2 -import QtQuick.Controls 1.2 -import QtQuick.Controls.Styles 1.1 -import QtQuick.Particles 2.0 -import QtQuick.Layouts 1.0 - -SliderStyle { - groove: BorderImage { - height: 6 - border.top: 1 - border.bottom: 1 - source: "../../images/progress-background.png" - border.left: 6 - border.right: 6 - BorderImage { - anchors.verticalCenter: parent.verticalCenter - source: "../../images/progress-fill.png" - border.left: 5 ; border.top: 1 - border.right: 5 ; border.bottom: 1 - width: styleData.handlePosition - height: parent.height - } - } - handle: Item { - width: 13 - height: 13 - Image { - anchors.centerIn: parent - source: "../../images/slider-handle.png" - } - } -} diff --git a/tests/manual/qml/testprojects/uisplit/gallery/content/styles/MySliderStyle2.qml b/tests/manual/qml/testprojects/uisplit/gallery/content/styles/MySliderStyle2.qml deleted file mode 100644 index 767246d8688..00000000000 --- a/tests/manual/qml/testprojects/uisplit/gallery/content/styles/MySliderStyle2.qml +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick 2.2 -import QtQuick.Controls 1.2 -import QtQuick.Controls.Styles 1.1 - -SliderStyle { - handle: Rectangle { - width: 18 - height: 18 - color: control.pressed ? "darkGray" : "lightGray" - border.color: "gray" - antialiasing: true - radius: height/2 - Rectangle { - anchors.fill: parent - anchors.margins: 1 - color: "transparent" - antialiasing: true - border.color: "#eee" - radius: height/2 - } - } - - groove: Rectangle { - height: 8 - implicitWidth: columnWidth - implicitHeight: 22 - - antialiasing: true - color: "#ccc" - border.color: "#777" - radius: height/2 - Rectangle { - anchors.fill: parent - anchors.margins: 1 - color: "transparent" - antialiasing: true - border.color: "#66ffffff" - radius: height/2 - } - } -} diff --git a/tests/manual/qml/testprojects/uisplit/gallery/content/styles/MyTabViewStyle.qml b/tests/manual/qml/testprojects/uisplit/gallery/content/styles/MyTabViewStyle.qml deleted file mode 100644 index 1e48d22b4fd..00000000000 --- a/tests/manual/qml/testprojects/uisplit/gallery/content/styles/MyTabViewStyle.qml +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick 2.2 -import QtQuick.Controls 1.2 -import QtQuick.Controls.Styles 1.1 - -Component { -TabViewStyle { - tabOverlap: 16 - frameOverlap: 4 - tabsMovable: true - - frame: Rectangle { - gradient: Gradient{ - GradientStop { color: "#e5e5e5" ; position: 0 } - GradientStop { color: "#e0e0e0" ; position: 1 } - } - border.color: "#898989" - Rectangle { anchors.fill: parent ; anchors.margins: 1 ; border.color: "white" ; color: "transparent" } - } - tab: Item { - property int totalOverlap: tabOverlap * (control.count - 1) - implicitWidth: Math.min ((styleData.availableWidth + totalOverlap)/control.count - 4, image.sourceSize.width) - implicitHeight: image.sourceSize.height - BorderImage { - id: image - anchors.fill: parent - source: styleData.selected ? "../../images/tab_selected.png" : "../../images/tab.png" - border.left: 30 - smooth: false - border.right: 30 - } - Text { - text: styleData.title - anchors.centerIn: parent - } - } - leftCorner: Item { implicitWidth: 12 } -} -} diff --git a/tests/manual/qml/testprojects/uisplit/gallery/content/styles/MyTextFieldStyle1.qml b/tests/manual/qml/testprojects/uisplit/gallery/content/styles/MyTextFieldStyle1.qml deleted file mode 100644 index 5ec04e0f2fa..00000000000 --- a/tests/manual/qml/testprojects/uisplit/gallery/content/styles/MyTextFieldStyle1.qml +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick 2.2 -import QtQuick.Controls 1.2 -import QtQuick.Controls.Styles 1.1 - -TextFieldStyle { - background: BorderImage { - source: "../../images/textfield.png" - border.left: 4 ; border.right: 4 ; border.top: 4 ; border.bottom: 4 - } -} diff --git a/tests/manual/qml/testprojects/uisplit/gallery/content/styles/MyTextFieldStyle2.qml b/tests/manual/qml/testprojects/uisplit/gallery/content/styles/MyTextFieldStyle2.qml deleted file mode 100644 index 7ee03d5780c..00000000000 --- a/tests/manual/qml/testprojects/uisplit/gallery/content/styles/MyTextFieldStyle2.qml +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick 2.2 -import QtQuick.Controls 1.2 -import QtQuick.Controls.Styles 1.1 - -TextFieldStyle { - background: Rectangle { - implicitWidth: columnWidth - implicitHeight: 22 - color: "#f0f0f0" - antialiasing: true - border.color: "gray" - radius: height/2 - Rectangle { - anchors.fill: parent - anchors.margins: 1 - color: "transparent" - antialiasing: true - border.color: "#aaffffff" - radius: height/2 - } - } -} diff --git a/tests/manual/qml/testprojects/uisplit/gallery/gallery.qmlproject b/tests/manual/qml/testprojects/uisplit/gallery/gallery.qmlproject deleted file mode 100644 index 417aef1ee4a..00000000000 --- a/tests/manual/qml/testprojects/uisplit/gallery/gallery.qmlproject +++ /dev/null @@ -1,16 +0,0 @@ -import QmlProject 1.1 - -Project { - //mainFile: "main.qml" - - /* Include .qml, .js, and image files from current directory and subdirectories */ - QmlFiles { - directory: "." - } - JavaScriptFiles { - directory: "." - } - ImageFiles { - directory: "." - } -} diff --git a/tests/manual/qml/testprojects/uisplit/gallery/images/bubble.png b/tests/manual/qml/testprojects/uisplit/gallery/images/bubble.png deleted file mode 100644 index 62aa1efe54c..00000000000 Binary files a/tests/manual/qml/testprojects/uisplit/gallery/images/bubble.png and /dev/null differ diff --git a/tests/manual/qml/testprojects/uisplit/gallery/images/button-pressed.png b/tests/manual/qml/testprojects/uisplit/gallery/images/button-pressed.png deleted file mode 100644 index c51c9ddd60c..00000000000 Binary files a/tests/manual/qml/testprojects/uisplit/gallery/images/button-pressed.png and /dev/null differ diff --git a/tests/manual/qml/testprojects/uisplit/gallery/images/button.png b/tests/manual/qml/testprojects/uisplit/gallery/images/button.png deleted file mode 100644 index d4406d61d36..00000000000 Binary files a/tests/manual/qml/testprojects/uisplit/gallery/images/button.png and /dev/null differ diff --git a/tests/manual/qml/testprojects/uisplit/gallery/images/document-open.png b/tests/manual/qml/testprojects/uisplit/gallery/images/document-open.png deleted file mode 100644 index f35f2583540..00000000000 Binary files a/tests/manual/qml/testprojects/uisplit/gallery/images/document-open.png and /dev/null differ diff --git a/tests/manual/qml/testprojects/uisplit/gallery/images/document-open@2x.png b/tests/manual/qml/testprojects/uisplit/gallery/images/document-open@2x.png deleted file mode 100644 index 9fdbb665774..00000000000 Binary files a/tests/manual/qml/testprojects/uisplit/gallery/images/document-open@2x.png and /dev/null differ diff --git a/tests/manual/qml/testprojects/uisplit/gallery/images/document-save-as.png b/tests/manual/qml/testprojects/uisplit/gallery/images/document-save-as.png deleted file mode 100644 index 5c9f6b343bd..00000000000 Binary files a/tests/manual/qml/testprojects/uisplit/gallery/images/document-save-as.png and /dev/null differ diff --git a/tests/manual/qml/testprojects/uisplit/gallery/images/document-save-as@2x.png b/tests/manual/qml/testprojects/uisplit/gallery/images/document-save-as@2x.png deleted file mode 100644 index a15e34c924a..00000000000 Binary files a/tests/manual/qml/testprojects/uisplit/gallery/images/document-save-as@2x.png and /dev/null differ diff --git a/tests/manual/qml/testprojects/uisplit/gallery/images/folder_new.png b/tests/manual/qml/testprojects/uisplit/gallery/images/folder_new.png deleted file mode 100644 index 8d8bb9bd768..00000000000 Binary files a/tests/manual/qml/testprojects/uisplit/gallery/images/folder_new.png and /dev/null differ diff --git a/tests/manual/qml/testprojects/uisplit/gallery/images/go-next.png b/tests/manual/qml/testprojects/uisplit/gallery/images/go-next.png deleted file mode 100644 index a68e2db7753..00000000000 Binary files a/tests/manual/qml/testprojects/uisplit/gallery/images/go-next.png and /dev/null differ diff --git a/tests/manual/qml/testprojects/uisplit/gallery/images/go-previous.png b/tests/manual/qml/testprojects/uisplit/gallery/images/go-previous.png deleted file mode 100644 index c37bc0414c2..00000000000 Binary files a/tests/manual/qml/testprojects/uisplit/gallery/images/go-previous.png and /dev/null differ diff --git a/tests/manual/qml/testprojects/uisplit/gallery/images/preferences-system.png b/tests/manual/qml/testprojects/uisplit/gallery/images/preferences-system.png deleted file mode 100644 index 6e52db7cfd4..00000000000 Binary files a/tests/manual/qml/testprojects/uisplit/gallery/images/preferences-system.png and /dev/null differ diff --git a/tests/manual/qml/testprojects/uisplit/gallery/images/process-stop.png b/tests/manual/qml/testprojects/uisplit/gallery/images/process-stop.png deleted file mode 100644 index e7a8d1722f3..00000000000 Binary files a/tests/manual/qml/testprojects/uisplit/gallery/images/process-stop.png and /dev/null differ diff --git a/tests/manual/qml/testprojects/uisplit/gallery/images/progress-background.png b/tests/manual/qml/testprojects/uisplit/gallery/images/progress-background.png deleted file mode 100644 index 55a069dfce0..00000000000 Binary files a/tests/manual/qml/testprojects/uisplit/gallery/images/progress-background.png and /dev/null differ diff --git a/tests/manual/qml/testprojects/uisplit/gallery/images/progress-fill.png b/tests/manual/qml/testprojects/uisplit/gallery/images/progress-fill.png deleted file mode 100644 index b588c9586d9..00000000000 Binary files a/tests/manual/qml/testprojects/uisplit/gallery/images/progress-fill.png and /dev/null differ diff --git a/tests/manual/qml/testprojects/uisplit/gallery/images/slider-handle.png b/tests/manual/qml/testprojects/uisplit/gallery/images/slider-handle.png deleted file mode 100644 index 0a9053b17ca..00000000000 Binary files a/tests/manual/qml/testprojects/uisplit/gallery/images/slider-handle.png and /dev/null differ diff --git a/tests/manual/qml/testprojects/uisplit/gallery/images/tab.png b/tests/manual/qml/testprojects/uisplit/gallery/images/tab.png deleted file mode 100644 index 5cf87131cc7..00000000000 Binary files a/tests/manual/qml/testprojects/uisplit/gallery/images/tab.png and /dev/null differ diff --git a/tests/manual/qml/testprojects/uisplit/gallery/images/tab_selected.png b/tests/manual/qml/testprojects/uisplit/gallery/images/tab_selected.png deleted file mode 100644 index dd7e34f8c6d..00000000000 Binary files a/tests/manual/qml/testprojects/uisplit/gallery/images/tab_selected.png and /dev/null differ diff --git a/tests/manual/qml/testprojects/uisplit/gallery/images/textfield.png b/tests/manual/qml/testprojects/uisplit/gallery/images/textfield.png deleted file mode 100644 index c6ebfcfc212..00000000000 Binary files a/tests/manual/qml/testprojects/uisplit/gallery/images/textfield.png and /dev/null differ diff --git a/tests/manual/qml/testprojects/uisplit/gallery/images/toplevel_window.png b/tests/manual/qml/testprojects/uisplit/gallery/images/toplevel_window.png deleted file mode 100644 index f025b414416..00000000000 Binary files a/tests/manual/qml/testprojects/uisplit/gallery/images/toplevel_window.png and /dev/null differ diff --git a/tests/manual/qml/testprojects/uisplit/gallery/images/view-refresh.png b/tests/manual/qml/testprojects/uisplit/gallery/images/view-refresh.png deleted file mode 100644 index 606ea9eba46..00000000000 Binary files a/tests/manual/qml/testprojects/uisplit/gallery/images/view-refresh.png and /dev/null differ diff --git a/tests/manual/qml/testprojects/uisplit/gallery/images/window-new.png b/tests/manual/qml/testprojects/uisplit/gallery/images/window-new.png deleted file mode 100644 index e091702e33f..00000000000 Binary files a/tests/manual/qml/testprojects/uisplit/gallery/images/window-new.png and /dev/null differ diff --git a/tests/manual/qml/testprojects/uisplit/gallery/images/window-new@2x.png b/tests/manual/qml/testprojects/uisplit/gallery/images/window-new@2x.png deleted file mode 100644 index 36503018ef4..00000000000 Binary files a/tests/manual/qml/testprojects/uisplit/gallery/images/window-new@2x.png and /dev/null differ diff --git a/tests/manual/qml/testprojects/uisplit/gallery/main.qml b/tests/manual/qml/testprojects/uisplit/gallery/main.qml deleted file mode 100644 index c8549874edf..00000000000 --- a/tests/manual/qml/testprojects/uisplit/gallery/main.qml +++ /dev/null @@ -1,209 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick 2.3 -import QtQuick.Controls 1.3 -import QtQuick.Layouts 1.0 -import QtQuick.Dialogs 1.0 -import "content" - -ApplicationWindow { - visible: true - title: "Component Gallery" - - width: 640 - height: 420 - minimumHeight: 400 - minimumWidth: 600 - - property string loremIpsum: - "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor "+ - "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor "+ - "incididunt ut labore et dolore magna aliqua.\n Ut enim ad minim veniam, quis nostrud "+ - "exercitation ullamco laboris nisi ut aliquip ex ea commodo cosnsequat. "; - - ImageViewer { id: imageViewer } - - FileDialog { - id: fileDialog - nameFilters: [ "Image files (*.png *.jpg)" ] - onAccepted: imageViewer.open(fileUrl) - } - - AboutDialog { id: aboutDialog } - - Action { - id: openAction - text: "&Open" - shortcut: StandardKey.Open - iconSource: "images/document-open.png" - onTriggered: fileDialog.open() - tooltip: "Open an image" - } - - Action { - id: copyAction - text: "&Copy" - shortcut: StandardKey.Copy - iconName: "edit-copy" - enabled: (!!activeFocusItem && !!activeFocusItem["copy"]) - onTriggered: activeFocusItem.copy() - } - - Action { - id: cutAction - text: "Cu&t" - shortcut: StandardKey.Cut - iconName: "edit-cut" - enabled: (!!activeFocusItem && !!activeFocusItem["cut"]) - onTriggered: activeFocusItem.cut() - } - - Action { - id: pasteAction - text: "&Paste" - shortcut: StandardKey.Paste - iconName: "edit-paste" - enabled: (!!activeFocusItem && !!activeFocusItem["paste"]) - onTriggered: activeFocusItem.paste() - } - - Action { - id: aboutAction - text: "About" - onTriggered: aboutDialog.open() - } - - ExclusiveGroup { - id: textFormatGroup - - Action { - id: a1 - text: "Align &Left" - checkable: true - Component.onCompleted: checked = true - } - - Action { - id: a2 - text: "&Center" - checkable: true - } - - Action { - id: a3 - text: "Align &Right" - checkable: true - } - } - - ChildWindow { id: window1 } - - Component { - id: editmenu - Menu { - MenuItem { action: cutAction } - MenuItem { action: copyAction } - MenuItem { action: pasteAction } - MenuSeparator {} - Menu { - title: "Text &Format" - MenuItem { action: a1 } - MenuItem { action: a2 } - MenuItem { action: a3 } - MenuSeparator { } - MenuItem { text: "Allow &Hyphenation"; checkable: true } - } - Menu { - title: "Font &Style" - MenuItem { text: "&Bold"; checkable: true } - MenuItem { text: "&Italic"; checkable: true } - MenuItem { text: "&Underline"; checkable: true } - } - } - } - - toolBar: ToolBar { - id: toolbar - RowLayout { - id: toolbarLayout - spacing: 0 - anchors.fill: parent - ToolButton { - iconSource: "images/window-new.png" - onClicked: window1.visible = !window1.visible - Accessible.name: "New window" - tooltip: "Toggle visibility of the second window" - } - ToolButton { action: openAction } - ToolButton { - Accessible.name: "Save as" - iconSource: "images/document-save-as.png" - tooltip: "(Pretend to) Save as..." - } - Item { Layout.fillWidth: true } - CheckBox { - id: enabledCheck - text: "Enabled" - checked: true - } - } - } - - menuBar: MenuBar { - Menu { - title: "&File" - MenuItem { action: openAction } - MenuItem { - text: "Close" - shortcut: StandardKey.Quit - onTriggered: Qt.quit() - } - } - Menu { - title: "&Edit" - MenuItem { action: cutAction } - MenuItem { action: copyAction } - MenuItem { action: pasteAction } - MenuSeparator { } - MenuItem { - text: "Do Nothing" - shortcut: "Ctrl+E,Shift+Ctrl+X" - enabled: false - } - MenuItem { - text: "Not Even There" - shortcut: "Ctrl+E,Shift+Ctrl+Y" - visible: false - } - Menu { - title: "Me Neither" - visible: false - } - } - Menu { - title: "&Help" - MenuItem { action: aboutAction } - } - } - - - SystemPalette {id: syspal} - color: syspal.window - ListModel { - id: choices - ListElement { text: "Banana" } - ListElement { text: "Orange" } - ListElement { text: "Apple" } - ListElement { text: "Coconut" } - } - - MainTabView { - id: frame - - enabled: enabledCheck.checked - anchors.fill: parent - anchors.margins: Qt.platform.os === "osx" ? 12 : 2 - } -} - diff --git a/tests/manual/qml/testprojects/uisplit/splitview/MainForm.ui.qml b/tests/manual/qml/testprojects/uisplit/splitview/MainForm.ui.qml deleted file mode 100644 index b2472dc751c..00000000000 --- a/tests/manual/qml/testprojects/uisplit/splitview/MainForm.ui.qml +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick 2.2 -import QtQuick.Controls 1.2 -import QtQuick.Layouts 1.0 - -SplitView { - width: 600 - height: 400 - - Rectangle { - id: column - width: 200 - Layout.minimumWidth: 100 - Layout.maximumWidth: 300 - color: "lightsteelblue" - } - - SplitView { - orientation: Qt.Vertical - Layout.fillWidth: true - - Rectangle { - id: row1 - height: 200 - color: "lightblue" - Layout.minimumHeight: 1 - } - - Rectangle { - id: row2 - color: "lightgray" - } - } -} - - diff --git a/tests/manual/qml/testprojects/uisplit/splitview/main.qml b/tests/manual/qml/testprojects/uisplit/splitview/main.qml deleted file mode 100644 index aa6989d0cad..00000000000 --- a/tests/manual/qml/testprojects/uisplit/splitview/main.qml +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick 2.2 -import QtQuick.Controls 1.2 - -ApplicationWindow { - visible: true - width: 600 - height: 400 - - MainForm { - anchors.fill: parent - } - - -} diff --git a/tests/manual/qml/testprojects/uisplit/splitview/splitview.qmlproject b/tests/manual/qml/testprojects/uisplit/splitview/splitview.qmlproject deleted file mode 100644 index e5a8bf02ca7..00000000000 --- a/tests/manual/qml/testprojects/uisplit/splitview/splitview.qmlproject +++ /dev/null @@ -1,16 +0,0 @@ -import QmlProject 1.1 - -Project { - mainFile: "main.qml" - - /* Include .qml, .js, and image files from current directory and subdirectories */ - QmlFiles { - directory: "." - } - JavaScriptFiles { - directory: "." - } - ImageFiles { - directory: "." - } -} diff --git a/tests/manual/qml/testprojects/uisplit/tableview/MainForm.ui.qml b/tests/manual/qml/testprojects/uisplit/tableview/MainForm.ui.qml deleted file mode 100644 index 76136b33249..00000000000 --- a/tests/manual/qml/testprojects/uisplit/tableview/MainForm.ui.qml +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick 2.2 -import QtQuick.Window 2.1 -import QtQuick.Controls 1.2 - -Column { - - width: 540 - height: 360 - property alias frame: frame - - property int margins: Qt.platform.os === "osx" ? 16 : 0 - - MainTabView { - id: frame - - height: parent.height - 34 - anchors.right: parent.right - anchors.left: parent.left - anchors.margins: margins - - - genteratedTabFrameVisible: frameCheckbox.checked - genteratedTabHeaderVisible: headerCheckbox.checked - genteratedTabSortIndicatorVisible: sortableCheckbox.checked - genteratedTabAlternatingRowColors: alternateCheckbox.checked - } - - Row { - x: 12 - height: 34 - CheckBox{ - id: alternateCheckbox - checked: true - text: "Alternate" - anchors.verticalCenter: parent.verticalCenter - } - CheckBox{ - id: sortableCheckbox - checked: false - text: "Sort indicator" - anchors.verticalCenter: parent.verticalCenter - } - CheckBox{ - id: frameCheckbox - checked: true - text: "Frame" - anchors.verticalCenter: parent.verticalCenter - } - CheckBox{ - id: headerCheckbox - checked: true - text: "Headers" - anchors.verticalCenter: parent.verticalCenter - } - } -} diff --git a/tests/manual/qml/testprojects/uisplit/tableview/MainTabView.ui.qml b/tests/manual/qml/testprojects/uisplit/tableview/MainTabView.ui.qml deleted file mode 100644 index 5ecb2cb8a71..00000000000 --- a/tests/manual/qml/testprojects/uisplit/tableview/MainTabView.ui.qml +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick 2.2 -import QtQuick.Window 2.1 -import QtQuick.Controls 1.2 -import "tabs" - -TabView { - id:frame - focus:true - - width: 540 - height: 360 - - property bool genteratedTabFrameVisible: false - property bool genteratedTabHeaderVisible: false - property bool genteratedTabSortIndicatorVisible: false - property bool genteratedTabAlternatingRowColors: false - - Tab { - title: "XmlListModel" - - TabXmlListModel { - anchors.fill: parent - anchors.margins: 12 - - frameVisible: genteratedTabFrameVisible - headerVisible: genteratedTabHeaderVisible - sortIndicatorVisible: genteratedTabSortIndicatorVisible - alternatingRowColors: genteratedTabAlternatingRowColors - } - } - - Tab { - title: "Multivalue" - - TabMultivalue { - anchors.fill: parent - anchors.margins: 12 - - frameVisible: genteratedTabFrameVisible - headerVisible: genteratedTabHeaderVisible - sortIndicatorVisible: genteratedTabSortIndicatorVisible - alternatingRowColors: genteratedTabAlternatingRowColors - } - } - - Tab { - title: "Generated" - id: generatedTab - - TabGenerated { - anchors.margins: 12 - anchors.fill: parent - - frameVisible: genteratedTabFrameVisible - headerVisible: genteratedTabHeaderVisible - sortIndicatorVisible: genteratedTabSortIndicatorVisible - alternatingRowColors: genteratedTabAlternatingRowColors - } - } - - Tab { - title: "Delegates" - - TabDelegates { - } - } -} diff --git a/tests/manual/qml/testprojects/uisplit/tableview/delegates/Delegate1.qml b/tests/manual/qml/testprojects/uisplit/tableview/delegates/Delegate1.qml deleted file mode 100644 index 6995e35e5ed..00000000000 --- a/tests/manual/qml/testprojects/uisplit/tableview/delegates/Delegate1.qml +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick 2.2 -import QtQuick.Window 2.1 -import QtQuick.Controls 1.2 - -Component { - id: delegate1 - Item { - clip: true - Text { - width: parent.width - anchors.margins: 4 - anchors.left: parent.left - anchors.verticalCenter: parent.verticalCenter - elide: styleData.elideMode - text: styleData.value !== undefined ? styleData.value : "" - color: styleData.textColor - } - } -} diff --git a/tests/manual/qml/testprojects/uisplit/tableview/delegates/Delegate2.qml b/tests/manual/qml/testprojects/uisplit/tableview/delegates/Delegate2.qml deleted file mode 100644 index d06d5e5df7d..00000000000 --- a/tests/manual/qml/testprojects/uisplit/tableview/delegates/Delegate2.qml +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick 2.2 -import QtQuick.Window 2.1 -import QtQuick.Controls 1.2 - -Component { - id: delegate2 - Text { - width: parent.width - anchors.margins: 4 - anchors.left: parent.left - anchors.verticalCenter: parent.verticalCenter - elide: styleData.elideMode - text: styleData.value !== undefined ? styleData.value : "" - color: styleData.textColor - } -} diff --git a/tests/manual/qml/testprojects/uisplit/tableview/delegates/EditableDelegate.qml b/tests/manual/qml/testprojects/uisplit/tableview/delegates/EditableDelegate.qml deleted file mode 100644 index 2df6af5933a..00000000000 --- a/tests/manual/qml/testprojects/uisplit/tableview/delegates/EditableDelegate.qml +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick 2.2 -import QtQuick.Window 2.1 -import QtQuick.Controls 1.2 - -Component { - Item { - Text { - width: parent.width - anchors.margins: 4 - anchors.left: parent.left - anchors.verticalCenter: parent.verticalCenter - elide: styleData.elideMode - text: styleData.value !== undefined ? styleData.value : "" - color: styleData.textColor - visible: !styleData.selected - } - - Loader { // Initialize text editor lazily to improve performance - id: loaderEditor - anchors.fill: parent - anchors.margins: 4 - Connections { - target: loaderEditor.item - onAccepted: { - if (typeof styleData.value === 'number') - largeModel.setProperty(styleData.row, styleData.role, Number(parseFloat(loaderEditor.item.text).toFixed(0))) - else - largeModel.setProperty(styleData.row, styleData.role, loaderEditor.item.text) - } - } - sourceComponent: styleData.selected ? editor : null - Component { - id: editor - TextInput { - id: textinput - color: styleData.textColor - text: styleData.value - MouseArea { - id: mouseArea - anchors.fill: parent - hoverEnabled: true - onClicked: textinput.forceActiveFocus() - } - } - } - } - } -} diff --git a/tests/manual/qml/testprojects/uisplit/tableview/delegates/HeaderDelegate.qml b/tests/manual/qml/testprojects/uisplit/tableview/delegates/HeaderDelegate.qml deleted file mode 100644 index 9bd5d95b4ad..00000000000 --- a/tests/manual/qml/testprojects/uisplit/tableview/delegates/HeaderDelegate.qml +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick 2.2 -import QtQuick.Window 2.1 -import QtQuick.Controls 1.2 - -BorderImage{ - source: "../images/header.png" - border{left:2;right:2;top:2;bottom:2} - Text { - text: styleData.value - anchors.centerIn:parent - color:"#333" - } -} diff --git a/tests/manual/qml/testprojects/uisplit/tableview/delegates/MultiValueDelegate.qml b/tests/manual/qml/testprojects/uisplit/tableview/delegates/MultiValueDelegate.qml deleted file mode 100644 index 5dab9a497ab..00000000000 --- a/tests/manual/qml/testprojects/uisplit/tableview/delegates/MultiValueDelegate.qml +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick 2.2 -import QtQuick.Window 2.1 -import QtQuick.Controls 1.2 - -Item { - Rectangle{ - color: styleData.value.get(0).color - anchors.top:parent.top - anchors.right:parent.right - anchors.bottom:parent.bottom - anchors.margins: 4 - width:32 - border.color:"#666" - } - Text { - width: parent.width - anchors.margins: 4 - anchors.left: parent.left - anchors.verticalCenter: parent.verticalCenter - elide: styleData.elideMode - text: styleData.value.get(0).description - color: styleData.textColor - } -} diff --git a/tests/manual/qml/testprojects/uisplit/tableview/delegates/RowDelegate.qml b/tests/manual/qml/testprojects/uisplit/tableview/delegates/RowDelegate.qml deleted file mode 100644 index e465976e32f..00000000000 --- a/tests/manual/qml/testprojects/uisplit/tableview/delegates/RowDelegate.qml +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick 2.2 -import QtQuick.Window 2.1 -import QtQuick.Controls 1.2 - -Component { - Rectangle { - height: (delegateChooser.currentIndex == 1 && styleData.selected) ? 30 : 20 - Behavior on height{ NumberAnimation{} } - - color: styleData.selected ? "#448" : (styleData.alternate? "#eee" : "#fff") - BorderImage{ - id: selected - anchors.fill: parent - source: "../images/selectedrow.png" - visible: styleData.selected - border{left:2; right:2; top:2; bottom:2} - SequentialAnimation { - running: true; loops: Animation.Infinite - NumberAnimation { target:selected; property: "opacity"; to: 1.0; duration: 900} - NumberAnimation { target:selected; property: "opacity"; to: 0.5; duration: 900} - } - } - } -} diff --git a/tests/manual/qml/testprojects/uisplit/tableview/images/header.png b/tests/manual/qml/testprojects/uisplit/tableview/images/header.png deleted file mode 100644 index 40fcca28c1c..00000000000 Binary files a/tests/manual/qml/testprojects/uisplit/tableview/images/header.png and /dev/null differ diff --git a/tests/manual/qml/testprojects/uisplit/tableview/images/selectedrow.png b/tests/manual/qml/testprojects/uisplit/tableview/images/selectedrow.png deleted file mode 100644 index 45d46934867..00000000000 Binary files a/tests/manual/qml/testprojects/uisplit/tableview/images/selectedrow.png and /dev/null differ diff --git a/tests/manual/qml/testprojects/uisplit/tableview/main.qml b/tests/manual/qml/testprojects/uisplit/tableview/main.qml deleted file mode 100644 index 49ac7c54c29..00000000000 --- a/tests/manual/qml/testprojects/uisplit/tableview/main.qml +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick 2.2 -import QtQuick.Window 2.1 -import QtQuick.Controls 1.2 - -import "models" - -Window { - visible: true - width: 538 + form.margins * 2 - height: 360 + form.margins * 2 - - ToolBar { - id: toolbar - width: parent.width - - ListModel { - id: delegatemenu - ListElement { text: "Shiny delegate" } - ListElement { text: "Scale selected" } - ListElement { text: "Editable items" } - } - - ComboBox { - id: delegateChooser - enabled: form.frame.currentIndex === 3 ? 1 : 0 - model: delegatemenu - width: 150 - anchors.left: parent.left - anchors.leftMargin: 8 - anchors.verticalCenter: parent.verticalCenter - } - - CheckBox { - id: enabledCheck - text: "Enabled" - checked: true - anchors.right: parent.right - anchors.verticalCenter: parent.verticalCenter - } - } - - SystemPalette {id: syspal} - color: syspal.window - - LargeModel { - id: largeModel - } - - MainForm { - id: form - anchors.top: toolbar.bottom - anchors.right: parent.right - anchors.left: parent.left - anchors.bottom: parent.bottom - anchors.margins: 8 - frame.enabled: enabledCheck.checked - } -} diff --git a/tests/manual/qml/testprojects/uisplit/tableview/models/FlickerModel.qml b/tests/manual/qml/testprojects/uisplit/tableview/models/FlickerModel.qml deleted file mode 100644 index d7a5f7dee8c..00000000000 --- a/tests/manual/qml/testprojects/uisplit/tableview/models/FlickerModel.qml +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick 2.2 -import QtQuick.Window 2.1 -import QtQuick.Controls 1.2 -import QtQuick.XmlListModel 2.0 - -XmlListModel { - source: "http://api.flickr.com/services/feeds/photos_public.gne?format=rss2&tags=" + "Qt" - query: "/rss/channel/item" - namespaceDeclarations: "declare namespace media=\"http://search.yahoo.com/mrss/\";" - XmlRole { name: "title"; query: "title/string()" } - XmlRole { name: "imagesource"; query: "media:thumbnail/@url/string()" } - XmlRole { name: "credit"; query: "media:credit/string()" } -} diff --git a/tests/manual/qml/testprojects/uisplit/tableview/models/LargeModel.qml b/tests/manual/qml/testprojects/uisplit/tableview/models/LargeModel.qml deleted file mode 100644 index 863f54bdc8a..00000000000 --- a/tests/manual/qml/testprojects/uisplit/tableview/models/LargeModel.qml +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick 2.2 -import QtQuick.Window 2.1 -import QtQuick.Controls 1.2 - -ListModel { - id: largeModel - Component.onCompleted: { - for (var i=0 ; i< 500 ; ++i) - largeModel.append({"name":"Person "+i , "age": Math.round(Math.random()*100), "gender": Math.random()>0.5 ? "Male" : "Female"}) - } -} diff --git a/tests/manual/qml/testprojects/uisplit/tableview/models/NestedModel.qml b/tests/manual/qml/testprojects/uisplit/tableview/models/NestedModel.qml deleted file mode 100644 index 27b00ad91f5..00000000000 --- a/tests/manual/qml/testprojects/uisplit/tableview/models/NestedModel.qml +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick 2.2 -import QtQuick.Window 2.1 -import QtQuick.Controls 1.2 - -ListModel { - ListElement{content: ListElement { description: "Core" ; color:"#ffaacc"}} - ListElement{content: ListElement { description: "Second" ; color:"#ffccaa"}} - ListElement{content: ListElement { description: "Third" ; color:"#ffffaa"}} -} diff --git a/tests/manual/qml/testprojects/uisplit/tableview/tableview.qmlproject b/tests/manual/qml/testprojects/uisplit/tableview/tableview.qmlproject deleted file mode 100644 index e5a8bf02ca7..00000000000 --- a/tests/manual/qml/testprojects/uisplit/tableview/tableview.qmlproject +++ /dev/null @@ -1,16 +0,0 @@ -import QmlProject 1.1 - -Project { - mainFile: "main.qml" - - /* Include .qml, .js, and image files from current directory and subdirectories */ - QmlFiles { - directory: "." - } - JavaScriptFiles { - directory: "." - } - ImageFiles { - directory: "." - } -} diff --git a/tests/manual/qml/testprojects/uisplit/tableview/tabs/TabDelegates.qml b/tests/manual/qml/testprojects/uisplit/tableview/tabs/TabDelegates.qml deleted file mode 100644 index d929031d53b..00000000000 --- a/tests/manual/qml/testprojects/uisplit/tableview/tabs/TabDelegates.qml +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick 2.2 -import QtQuick.Window 2.1 -import QtQuick.Controls 1.2 - -import "../delegates" - -TabDelegatesForm { - anchors.fill: parent - - tableView.model: largeModel - tableView.frameVisible: frameCheckbox.checked - tableView.headerVisible: headerCheckbox.checked - tableView.sortIndicatorVisible: sortableCheckbox.checked - tableView.alternatingRowColors: alternateCheckbox.checked - - tableView.itemDelegate: { - if (delegateChooser.currentIndex == 2) - return editableDelegate; - else - return delegate1; - } - - EditableDelegate { - id: editableDelegate - } - - Delegate1 { - id: delegate1 - } - - Delegate2 { - id: delegate2 - } - -} diff --git a/tests/manual/qml/testprojects/uisplit/tableview/tabs/TabDelegatesForm.ui.qml b/tests/manual/qml/testprojects/uisplit/tableview/tabs/TabDelegatesForm.ui.qml deleted file mode 100644 index 4f3779378fa..00000000000 --- a/tests/manual/qml/testprojects/uisplit/tableview/tabs/TabDelegatesForm.ui.qml +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick 2.2 -import QtQuick.Window 2.1 -import QtQuick.Controls 1.2 - -import "../delegates" - -Item { - property alias tableView: tableView - - width: 540 - height: 360 - - TableView { - id: tableView - - anchors.margins: 12 - anchors.fill:parent - - TableViewColumn { - role: "name" - title: "Name" - width: 120 - } - TableViewColumn { - role: "age" - title: "Age" - width: 120 - } - TableViewColumn { - role: "gender" - title: "Gender" - width: 120 - } - - headerDelegate: HeaderDelegate { - } - - rowDelegate: RowDelegate { - } - - } -} diff --git a/tests/manual/qml/testprojects/uisplit/tableview/tabs/TabGenerated.ui.qml b/tests/manual/qml/testprojects/uisplit/tableview/tabs/TabGenerated.ui.qml deleted file mode 100644 index 51c3fa12c44..00000000000 --- a/tests/manual/qml/testprojects/uisplit/tableview/tabs/TabGenerated.ui.qml +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick 2.2 -import QtQuick.Window 2.1 -import QtQuick.Controls 1.2 - -TableView { - model: largeModel - - width: 540 - height: 360 - - TableViewColumn { - role: "name" - title: "Name" - width: 120 - } - TableViewColumn { - role: "age" - title: "Age" - width: 120 - } - TableViewColumn { - role: "gender" - title: "Gender" - width: 120 - } -} diff --git a/tests/manual/qml/testprojects/uisplit/tableview/tabs/TabMultivalue.ui.qml b/tests/manual/qml/testprojects/uisplit/tableview/tabs/TabMultivalue.ui.qml deleted file mode 100644 index 09dbe243137..00000000000 --- a/tests/manual/qml/testprojects/uisplit/tableview/tabs/TabMultivalue.ui.qml +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick 2.2 -import QtQuick.Window 2.1 -import QtQuick.Controls 1.2 - -import "../delegates" -import "../models" - -TableView { - model: NestedModel { - } - - width: 540 - height: 360 - - TableViewColumn { - role: "content" - title: "Text and Color" - width: 220 - } - - itemDelegate: MultiValueDelegate { - } - - frameVisible: frameCheckbox.checked - headerVisible: headerCheckbox.checked - sortIndicatorVisible: sortableCheckbox.checked - alternatingRowColors: alternateCheckbox.checked -} diff --git a/tests/manual/qml/testprojects/uisplit/tableview/tabs/TabXmlListModel.ui.qml b/tests/manual/qml/testprojects/uisplit/tableview/tabs/TabXmlListModel.ui.qml deleted file mode 100644 index d29e6f0e28d..00000000000 --- a/tests/manual/qml/testprojects/uisplit/tableview/tabs/TabXmlListModel.ui.qml +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -import QtQuick 2.2 -import QtQuick.Window 2.1 -import QtQuick.Controls 1.2 - -import "../models" - -TableView { - model: FlickerModel { - } - - width: 540 - height: 360 - - TableViewColumn { - role: "title" - title: "Title" - width: 120 - } - TableViewColumn { - role: "credit" - title: "Credit" - width: 120 - } - TableViewColumn { - role: "imagesource" - title: "Image source" - width: 200 - visible: true - } - - frameVisible: frameCheckbox.checked - headerVisible: headerCheckbox.checked - sortIndicatorVisible: sortableCheckbox.checked - alternatingRowColors: alternateCheckbox.checked -} -