Merge remote-tracking branch 'origin/11.0'

Change-Id: I2e0e8dd5f9b42533c665255f8539e837938846de
This commit is contained in:
Eike Ziller
2023-07-13 08:28:42 +02:00
39 changed files with 157 additions and 109 deletions

View File

@@ -26,7 +26,7 @@ What's new?
You can open markdown (.md) files for editing or select `File > New File >
General > Markdown File` to create a new file.
([Documentation](https://doc-snapshots.qt.io/qtcreator-11.0/creator-markdown-editor.html))
([Documentation](https://docs.qt.io/qtcreator/creator-markdown-editor.html))
### Terminal
@@ -38,7 +38,7 @@ shells, colors, and fonts.
To use an external terminal, deselect the `Use internal terminal` check box in
`Preferences > Terminal`.
([Documentation](https://doc-snapshots.qt.io/qtcreator-11.0/creator-output-panes.html#terminal))
([Documentation](https://docs.qt.io/qtcreator/creator-reference-terminal-view.html))
### Copilot
@@ -48,7 +48,7 @@ suggest code in the `Edit` mode.
To set Copilot preferences, select `Preferences > Copilot`.
([Documentation](https://doc-snapshots.qt.io/qtcreator-11.0/creator-copilot.html))
([Documentation](https://docs.qt.io/qtcreator/creator-copilot.html))
### vcpkg
@@ -64,7 +64,7 @@ project.
Edit manifest files in the manifest editor. To search for packages to add to the
file, select the `Search Package` button on the manifest editor toolbar.
([Documentation](https://doc-snapshots.qt.io/qtcreator-11.0/creator-vcpkg.html))
([Documentation](https://docs.qt.io/qtcreator/creator-vcpkg.html))
### Axivion
@@ -73,7 +73,7 @@ and link a project to an Axivion project in the project settings, Qt Creator
shows annotations of the latest run in the editors and allows you to view some
details on the issues.
([Documentation](https://doc-snapshots.qt.io/qtcreator-11.0/creator-axivion.html))
([Documentation](https://docs.qt.io/qtcreator/creator-axivion.html))
General
-------
@@ -161,7 +161,7 @@ Editing
* Fixed that too many progress indicators could be created
([QTCREATORBUG-29224](https://bugreports.qt.io/browse/QTCREATORBUG-29224))
([Documentation](https://doc-snapshots.qt.io/qtcreator-11.0/creator-python-development.html))
([Documentation](https://docs.qt.io/qtcreator/creator-python-development.html))
Projects
--------
@@ -189,7 +189,7 @@ Projects
([Documentation](https://doc.qt.io/qtcreator/creator-project-cmake.html))
* Added `Build > Reload CMake Presets` to reload CMake presets after making
changes to them
([Documentation](https://doc-snapshots.qt.io/qtcreator-11.0/creator-build-settings-cmake-presets.html))
([Documentation](https://docs.qt.io/qtcreator/creator-build-settings-cmake-presets.html))
* Added support for the `block()` and `endblock()` CMake commands
([CMake documentation](https://cmake.org/cmake/help/latest/command/block.html#command:block))
* Fixed that CMake Presets were not visible in the `Projects` view

View File

@@ -101,7 +101,8 @@
<ul>
<li><a href="creator-help.html">Using the Help Mode</a></li>
<li><a href="creator-faq.html">FAQ</a></li>
<li><a href="creator-how-tos.html">How-tos</a></li>
<li><a href="creator-how-tos.html">How-to</a></li>
<li><a href="creator-reference.html">Reference</a></li>
<li><a href="creator-known-issues.html">Known Issues</a></li>
<li><a href="creator-glossary.html">Glossary</a></li>
<li><a href="technical-support.html">Technical Support</a></li>

View File

@@ -5,7 +5,7 @@
\page creator-how-to-macos.html
\if defined(qtcreator)
\previouspage creator-how-tos.html
\nextpage creator-known-issues.html
\endif
\ingroup creator-how-to-ui
\ingroup studio-how-to

View File

@@ -5,7 +5,7 @@
\page creator-how-to-set-high-dpi-scaling.html
\if defined(qtcreator)
\previouspage creator-how-tos.html
\nextpage creator-known-issues.html
\endif
\ingroup creator-how-to-ui
\ingroup studio-how-to

View File

@@ -5,7 +5,7 @@
\page creator-how-to-switch-ui-themes.html
\if defined(qtcreator)
\previouspage creator-how-tos.html
\nextpage creator-known-issues.html
\endif
\ingroup creator-how-to-ui
\ingroup studio-how-to

View File

@@ -5,7 +5,7 @@
\page creator-how-to-view-images.html
\if defined(qtcreator)
\previouspage creator-how-tos.html
\nextpage creator-known-issues.html
\endif
\ingroup creator-how-to-design
\ingroup studio-how-to-image-viewer
@@ -47,7 +47,7 @@
\page creator-how-to-export-svg-images.html
\if defined(qtcreator)
\previouspage creator-how-tos.html
\nextpage creator-known-issues.html
\endif
\ingroup creator-how-to-design
\ingroup studio-how-to-image-viewer

View File

@@ -344,25 +344,7 @@
\row
\li Visualize whitespace
\li Ctrl+E, Ctrl+V
\row
\li Adjust size
\li Ctrl+J
\row
\li Lay out in a grid
\li Ctrl+G
\row
\li Lay out horizontally
\li Ctrl+H
\row
\li Lay out vertically
\li Ctrl+L
\row
\li Preview
\li Alt+Shift+R
\if defined(qtcreator)
\row
\li Edit signals and slots
\li F4
\row
\li Toggle bookmark
\li Ctrl+M
@@ -498,6 +480,32 @@
\li Yank
\endlist
\section1 \QD Shortcuts
\table
\header
\li Action
\li Keyboard shortcut
\row
\li Adjust size
\li Ctrl+J
\row
\li Lay out in a grid
\li Ctrl+G
\row
\li Lay out horizontally
\li Ctrl+H
\row
\li Lay out vertically
\li Ctrl+L
\row
\li Preview
\li Alt+Shift+R
\row
\li Edit signals and slots
\li F4
\endtable
\section1 Image Viewer Shortcuts
\table
@@ -793,7 +801,7 @@
\nextpage studio-projects.html
\else
\previouspage creator-how-tos.html
\nextpage creator-known-issues.html
\endif
\ingroup creator-how-to-ui
@@ -854,7 +862,7 @@
\nextpage studio-projects.html
\else
\previouspage creator-how-tos.html
\nextpage creator-known-issues.html
\endif
\ingroup creator-how-to-ui
@@ -888,7 +896,7 @@
\nextpage studio-projects.html
\else
\previouspage creator-how-tos.html
\nextpage creator-known-issues.html
\endif
\title Import and export keyboard shortcuts

View File

@@ -4,7 +4,7 @@
/*!
\page creator-how-to-enable-plugins.html
\previouspage creator-how-tos.html
\nextpage creator-known-issues.html
\ingroup creator-how-to-use
\title Enable and disable plugins

View File

@@ -4,7 +4,7 @@
/*!
\page creator-how-to-find-settings-files.html
\previouspage creator-how-tos.html
\nextpage creator-known-issues.html
\ingroup creator-how-to-use
\title Find settings files

View File

@@ -4,7 +4,7 @@
/*!
\page creator-how-to-install-plugins.html
\previouspage creator-how-tos.html
\nextpage creator-known-issues.html
\ingroup creator-how-to-use
\title Install plugins

View File

@@ -10,7 +10,7 @@
/*!
\previouspage creator-faq.html
\page creator-how-tos.html
\nextpage creator-known-issues.html
\nextpage creator-reference.html
\title How-to
@@ -76,7 +76,7 @@
/*!
\page creator-how-to-move-between-open-files.html
\previouspage creator-how-tos.html
\nextpage creator-known-issues.html
\ingroup creator-how-to-edit
\title Move between open files
@@ -96,7 +96,7 @@
/*!
\page creator-how-to-switch-to-edit-mode.html
\previouspage creator-how-tos.html
\nextpage creator-known-issues.html
\ingroup creator-how-to-edit
\title Switch to Edit mode
@@ -118,7 +118,7 @@
/*!
\page creator-how-to-find-preferences.html
\previouspage creator-how-tos.html
\nextpage creator-known-issues.html
\ingroup creator-how-to-ui
\title Find a particular preference
@@ -132,7 +132,7 @@
/*!
\page creator-how-to-run-from-cli.html
\previouspage creator-how-tos.html
\nextpage creator-known-issues.html
\ingroup creator-how-to-use
\title Run \QC from the command line
@@ -150,7 +150,7 @@
/*!
\page creator-how-to-move-to-symbols.html
\previouspage creator-how-tos.html
\nextpage creator-known-issues.html
\ingroup creator-how-to-edit
\title Move to symbols
@@ -173,7 +173,7 @@
/*!
\page creator-how-to-locate-files-using-keyboard.html
\previouspage creator-how-tos.html
\nextpage creator-known-issues.html
\ingroup creator-how-to-edit
\title Locate files using the keyboard
@@ -198,7 +198,7 @@
/*!
\page creator-how-to-perform-calculations.html
\previouspage creator-how-to-move-between-open-files.html
\nextpage creator-known-issues.html
\ingroup creator-how-to-edit
\title Perform calculations
@@ -215,7 +215,7 @@
/*!
\page creator-how-to-jump-to-functions-in-qml-code.html
\previouspage creator-how-tos.html
\nextpage creator-known-issues.html
\ingroup creator-how-to-edit
\title Jump to a function in QML code
@@ -227,7 +227,7 @@
/*!
\page creator-how-to-add-license-header-templates.html
\previouspage creator-how-tos.html
\nextpage creator-known-issues.html
\ingroup creator-how-to-projects
\title Add a license header template for C++ code
@@ -258,7 +258,7 @@
/*!
\page creator-how-to-paste-text-from-clipboard-history.html
\previouspage creator-how-tos.html
\nextpage creator-known-issues.html
\ingroup creator-how-to-edit
\title Paste text from clipboard history
@@ -271,7 +271,7 @@
/*!
\page creator-how-to-sort-lines-alphabetically.html
\previouspage creator-how-tos.html
\nextpage creator-known-issues.html
\ingroup creator-how-to-edit
\title Sort lines alphabetically
@@ -284,7 +284,7 @@
/*!
\page creator-enclose-code-in-characters.html
\previouspage creator-how-tos.html
\nextpage creator-known-issues.html
\ingroup creator-how-to-edit
\title Enclose selected code in curly braces, parentheses, or double quotes
@@ -309,7 +309,7 @@
/*!
\page creator-how-to-select-enclosing-block.html
\previouspage creator-how-tos.html
\nextpage creator-known-issues.html
\ingroup creator-how-to-edit
\title Select the enclosing block in C++
@@ -320,7 +320,7 @@
/*!
\page creator-how-to-add-code-snippets.html
\previouspage creator-how-tos.html
\nextpage creator-known-issues.html
\ingroup creator-how-to-edit
\title Add code snippets to the auto-complete menu
@@ -337,7 +337,7 @@
/*!
\page creator-how-to-write-notes.html
\previouspage creator-how-tos.html
\nextpage creator-known-issues.html
\ingroup creator-how-to-edit
\title Write down notes
@@ -366,7 +366,7 @@
/*!
\page creator-how-to-set-recent-files.html
\previouspage creator-how-tos.html
\nextpage creator-known-issues.html
\ingroup creator-how-to-ui
\title Set the number of recent files shown
@@ -386,7 +386,7 @@
/*!
\page creator-how-to-search-and-replace-using-regexp.html
\previouspage creator-how-to-move-between-open-files.html
\nextpage creator-known-issues.html
\ingroup creator-how-to-edit
\title Search and replace across files using a regular expression

View File

@@ -0,0 +1,22 @@
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\page creator-reference.html
\previouspage creator-how-tos.html
\nextpage creator-known-issues.html
\title Reference
The following topics describe the different parts of the UI in detail.
\section1 Sidebar Views
\annotatedlist creator-reference-sidebar-views
\section1 Output Views
\annotatedlist creator-reference-output-views
\sa {User Interface}, {Show and hide sidebars}, {View output}
*/

View File

@@ -239,6 +239,7 @@
\li \l{Using the Help Mode}
\li \l{FAQ}
\li \l{How-to}
\li \l{Reference}
\li \l{Known Issues}
\li \l{Glossary}
\li \l{Technical Support}

View File

@@ -104,6 +104,7 @@
\li \l{Using the Help Mode}
\li \l{FAQ}
\li \l{How-to}
\li \l{Reference}
\li \l{Known Issues}
\li \l{Glossary}
\endlist

View File

@@ -7,7 +7,7 @@
\previouspage creator-projects-view.html
\nextpage creator-open-documents-view.html
\else
\previouspage creator-how-to-show-and-hide-sidebars.html
\previouspage creator-reference.html
\endif
\ingroup creator-reference-sidebar-views

View File

@@ -73,13 +73,13 @@
Some output views do not support finding and filtering.
\if defined(qtcreator)
\sa {Output Views}
\else
\section1 Output views
The following views show output:
\if defined(qtcreator)
\annotatedlist creator-reference-output-views
\else
\annotatedlist studio-reference-output-views
\endif
*/

View File

@@ -4,7 +4,7 @@
/*!
\page creator-how-to-show-and-hide-sidebars.html
\previouspage creator-how-tos.html
\nextpage creator-known-issues.html
\ingroup creator-how-to-ui
\title Show and hide sidebars
@@ -32,12 +32,8 @@
(\uicontrol {Close}).
\endlist
\section1 Sidebar views
Manage projects and files in the following views:
\annotatedlist creator-reference-sidebar-views
In some views, right-clicking opens a context menu that has functions
for managing the objects listed in the view.
\sa {Sidebar Views}
*/

View File

@@ -4,7 +4,7 @@
/*!
\page creator-how-to-switch-between-modes.html
\previouspage creator-how-tos.html
\nextpage creator-known-issues.html
\ingroup creator-how-to-ui
\title Switch between modes

View File

@@ -3,7 +3,7 @@
/*!
\page creator-outline-view.html
\previouspage creator-how-to-show-and-hide-sidebars.html
\previouspage creator-reference.html
\ingroup creator-reference-sidebar-views
\title Outline
@@ -31,7 +31,7 @@
/*!
\page creator-class-view.html
\previouspage creator-how-to-show-and-hide-sidebars.html
\previouspage creator-reference.html
\ingroup creator-reference-sidebar-views
\title Class View
@@ -51,7 +51,7 @@
/*!
\page creator-call-hierarchy-view.html
\previouspage creator-how-to-show-and-hide-sidebars.html
\previouspage creator-reference.html
\ingroup creator-reference-sidebar-views
\title Call Hierarchy
@@ -73,7 +73,7 @@
/*!
\page creator-type-hierarchy.html
\previouspage creator-how-to-show-and-hide-sidebars.html
\previouspage creator-reference.html
\ingroup creator-reference-sidebar-views
\title Type Hierarchy
@@ -105,7 +105,7 @@
/*!
\page creator-include-hierarchy-view.html
\previouspage creator-how-to-show-and-hide-sidebars.html
\previouspage creator-reference.html
\ingroup creator-reference-sidebar-views
\title Include Hierarchy

View File

@@ -3,7 +3,7 @@
/*!
\page creator-reference-terminal-view.html
\previouspage creator-how-to-view-output.html
\previouspage creator-reference.html
\ingroup creator-reference-output-views

View File

@@ -3,7 +3,7 @@
/*!
\page creator-reference-to-do-entries-view.html
\previouspage creator-how-to-view-output.html
\previouspage creator-reference.html
\ingroup creator-reference-output-views

View File

@@ -8,7 +8,7 @@
\previouspage creator-file-system-view.html
\nextpage studio-content-library.html
\else
\previouspage creator-how-to-show-and-hide-sidebars.html
\previouspage creator-reference.html
\endif
\ingroup creator-reference-sidebar-views

View File

@@ -7,7 +7,7 @@
\previouspage qtquick-curve-editor.html
\nextpage creator-file-system-view.html
\else
\previouspage creator-how-to-show-and-hide-sidebars.html
\previouspage creator-reference.html
\endif
\ingroup creator-reference-sidebar-views

View File

@@ -9,7 +9,7 @@
/*!
\page creator-reference-issues-view.html
\previouspage creator-how-to-view-output.html
\previouspage creator-reference.html
\ingroup creator-reference-output-views
\ingroup studio-reference-output-views
@@ -117,7 +117,7 @@
/*!
\page creator-reference-search-results-view.html
\previouspage creator-how-to-view-output.html
\previouspage creator-reference.html
\ingroup creator-reference-output-views
\ingroup studio-reference-output-views
@@ -143,7 +143,7 @@
/*!
\page creator-reference-application-output-view.html
\previouspage creator-how-to-view-output.html
\previouspage creator-reference.html
\ingroup creator-reference-output-views
\ingroup studio-reference-output-views
@@ -185,7 +185,7 @@
/*!
\page creator-reference-compile-output-view.html
\previouspage creator-how-to-view-output.html
\previouspage creator-reference.html
\ingroup creator-reference-output-views
\ingroup studio-reference-output-views

View File

@@ -76,7 +76,7 @@
For information about new features and bug fixes in each \QC release,
select \uicontrol Help > \uicontrol {Change Log}.
\sa {Use the UI}{How-to: Use the UI}
\sa {Use the UI}{How-to: Use the UI}, {Reference}
\else

View File

@@ -1545,7 +1545,7 @@ CheckableDecider BoolAspect::askAgainCheckableDecider()
{
return CheckableDecider(
[this] { return value(); },
[this] { setValue(true); }
[this] { setValue(false); }
);
}

View File

@@ -34,7 +34,7 @@ public:
private:
CppEditor::SymbolFinder m_symbolFinder;
QString m_className;
const CPlusPlus::Snapshot &m_snapshot;
CPlusPlus::Snapshot m_snapshot;
QMap<QString, QtTestCodeLocationAndType> m_privSlots;
bool m_valid = false;
bool m_inherited = false;

View File

@@ -93,7 +93,7 @@ void TestCodeParser::syncTestFrameworks(const QList<ITestParser *> &parsers)
{
if (m_parserState != Idle) {
// there's a running parse
m_postponedUpdateType = UpdateType::NoUpdate;
m_postponedUpdateType = UpdateType::FullUpdate;
m_postponedFiles.clear();
ProgressManager::cancelTasks(Constants::TASK_PARSE);
}

View File

@@ -4,7 +4,9 @@
#include "testprojectsettings.h"
#include "autotestconstants.h"
#include "testcodeparser.h"
#include "testframeworkmanager.h"
#include "testtreemodel.h"
#include <projectexplorer/project.h>
#include <projectexplorer/projectmanager.h>
@@ -49,7 +51,9 @@ void TestProjectSettings::activateFramework(const Id &id, bool activate)
{
ITestFramework *framework = TestFrameworkManager::frameworkForId(id);
m_activeTestFrameworks[framework] = activate;
if (!activate)
if (TestTreeModel::instance()->parser()->isParsing())
framework->rootNode()->markForRemoval(!activate);
else if (!activate)
framework->resetRootNode();
}

View File

@@ -214,11 +214,15 @@ bool TestTreeItem::modifyLineAndColumn(const TestParseResult *result)
void TestTreeItem::markForRemoval(bool mark)
{
if (type() == Root)
m_status = mark ? ForcedRootRemoval : NewlyAdded;
else
m_status = mark ? MarkedForRemoval : Cleared;
}
void TestTreeItem::markForRemovalRecursively(bool mark)
{
if (type() != Root)
markForRemoval(mark);
for (int row = 0, count = childCount(); row < count; ++row)
childItem(row)->markForRemovalRecursively(mark);
@@ -231,6 +235,7 @@ void TestTreeItem::markForRemovalRecursively(const QSet<FilePath> &filePaths)
child->markForRemovalRecursively(filePaths);
mark &= child->markedForRemoval();
});
if (type() != Root)
markForRemoval(mark);
}

View File

@@ -167,6 +167,7 @@ private:
{
NewlyAdded,
MarkedForRemoval,
ForcedRootRemoval, // only valid on rootNode
Cleared
};

View File

@@ -485,6 +485,10 @@ void TestTreeModel::markForRemoval(const QSet<Utils::FilePath> &filePaths)
void TestTreeModel::sweep()
{
for (TestTreeItem *frameworkRoot : frameworkRootNodes()) {
if (frameworkRoot->m_status == TestTreeItem::ForcedRootRemoval) {
frameworkRoot->framework()->resetRootNode();
continue;
}
sweepChildren(frameworkRoot);
revalidateCheckState(frameworkRoot);
}

View File

@@ -143,6 +143,7 @@ const char G_HELP[] = "QtCreator.Group.Help";
// File menu groups
const char G_FILE_NEW[] = "QtCreator.Group.File.New";
const char G_FILE_OPEN[] = "QtCreator.Group.File.Open";
const char G_FILE_SESSION[] = "QtCreator.Group.File.Recent";
const char G_FILE_PROJECT[] = "QtCreator.Group.File.Project";
const char G_FILE_SAVE[] = "QtCreator.Group.File.Save";
const char G_FILE_EXPORT[] = "QtCreator.Group.File.Export";

View File

@@ -473,6 +473,7 @@ void MainWindow::registerDefaultContainers()
filemenu->menu()->setTitle(Tr::tr("&File"));
filemenu->appendGroup(Constants::G_FILE_NEW);
filemenu->appendGroup(Constants::G_FILE_OPEN);
filemenu->appendGroup(Constants::G_FILE_SESSION);
filemenu->appendGroup(Constants::G_FILE_PROJECT);
filemenu->appendGroup(Constants::G_FILE_SAVE);
filemenu->appendGroup(Constants::G_FILE_EXPORT);

View File

@@ -100,7 +100,7 @@ SessionManager::SessionManager()
ActionContainer *msession = ActionManager::createMenu(M_SESSION);
msession->menu()->setTitle(PE::Tr::tr("S&essions"));
msession->setOnAllDisabledBehavior(ActionContainer::Show);
mfile->addMenu(msession, Core::Constants::G_FILE_OPEN);
mfile->addMenu(msession, Core::Constants::G_FILE_SESSION);
sb_d->m_sessionMenu = msession->menu();
connect(mfile->menu(), &QMenu::aboutToShow, this, [] { sb_d->updateSessionMenu(); });

View File

@@ -89,9 +89,7 @@ void updateMCUProjectTree(ProjectExplorer::Project *p)
auto qmlProjectNode = std::make_unique<McuQmlProjectNode>(FilePath(node->filePath()),
inputsJsonFile);
auto qmlProjectNodePtr = qmlProjectNode.get();
const_cast<ProjectNode *>(node)->addNode(std::move(qmlProjectNode));
ProjectExplorer::ProjectTree::emitSubtreeChanged(qmlProjectNodePtr);
const_cast<ProjectNode *>(node)->replaceSubtree(nullptr, std::move(qmlProjectNode));
});
};

View File

@@ -183,7 +183,7 @@ QList<ProjectExplorer::BuildTargetInfo> MesonProjectParser::appsTargets() const
if (target.type == Target::Type::executable) {
ProjectExplorer::BuildTargetInfo bti;
bti.displayName = target.name;
bti.buildKey = Target::fullName(m_srcDir, target);
bti.buildKey = Target::fullName(m_buildDir, target);
bti.displayNameUniquifier = bti.buildKey;
bti.targetFilePath = Utils::FilePath::fromString(target.fileName.first());
bti.workingDirectory = Utils::FilePath::fromString(target.fileName.first()).absolutePath();
@@ -237,7 +237,7 @@ void MesonProjectParser::update(const QFuture<MesonProjectParser::ParserData *>
m_rootNode = std::move(parserData->rootNode);
m_targetsNames.clear();
for (const Target &target : m_parserResult.targets) {
m_targetsNames.push_back(Target::fullName(m_srcDir, target));
m_targetsNames.push_back(Target::fullName(m_buildDir, target));
}
addMissingTargets(m_targetsNames);
m_targetsNames.sort();
@@ -253,7 +253,7 @@ ProjectExplorer::RawProjectPart MesonProjectParser::buildRawPart(
{
ProjectExplorer::RawProjectPart part;
part.setDisplayName(target.name);
part.setBuildSystemTarget(Target::fullName(m_srcDir, target));
part.setBuildSystemTarget(Target::fullName(m_buildDir, target));
part.setFiles(sources.sources + sources.generatedSources);
auto flags = splitArgs(sources.parameters);
part.setMacros(flags.macros);

View File

@@ -60,15 +60,17 @@ struct Target
const std::optional<QString> subproject;
const SourceGroupList sources;
static inline QString fullName(const Utils::FilePath &srcDir, const Target &target)
static inline QString fullName(const Utils::FilePath &buildDir, const Target &target)
{
using namespace Utils;
if (FilePath::fromString((target.fileName.first())).isAbsolutePath()) {
const auto fname = target.fileName.first().split('/').last();
QString definedIn = FilePath::fromString(target.definedIn).absolutePath().toString();
return definedIn.remove(srcDir.toString()) + '/' + fname;
auto fname = target.fileName.first();
if (FilePath::fromString(fname).isAbsolutePath()) {
fname.remove(buildDir.toString());
if (fname.startsWith('/'))
fname.remove(0, 1);
return fname;
} else {
return target.fileName.first();
return fname;
}
}

View File

@@ -48,9 +48,13 @@ def main():
earlyExit("Could not find expected Inspector tree inside Locals and Expressions.")
return
# reduce items to outer Rectangle object
items = items.getChild("QQmlApplicationEngine")
items = items.getChild("QQuickView")
if items == None:
earlyExit("Could not find expected QQmlApplicationEngine tree inside Locals and Expressions.")
earlyExit("Could not find expected QQuickView tree inside Locals and Expressions.")
return
items = items.getChild("QQuickRootItem")
if items == None:
earlyExit("Could not find expected QQuickRootItem tree inside Locals and Expressions.")
return
items = items.getChild("Rectangle")
if items == None:
@@ -72,14 +76,13 @@ def main():
invokeMenuItem("File", "Exit")
def __unfoldTree__():
view = waitForObject(':Locals and Expressions_Debugger::Internal::WatchTreeView')
# TODO inspect the qmlengine as well?
rootIndex = getQModelIndexStr("text='QQmlApplicationEngine'",
rootIndex = getQModelIndexStr("text='QQuickView'",
':Locals and Expressions_Debugger::Internal::WatchTreeView')
if not test.verify(view.isExpanded(waitForObject(rootIndex)),
"QQmlApplicationEngine should be expanded already."):
unfoldQModelIndex(rootIndex, False)
mainRect = getQModelIndexStr("text='Rectangle'", rootIndex)
quickRootItem = getQModelIndexStr("text='QQuickRootItem'", rootIndex)
unfoldQModelIndex(quickRootItem, False)
mainRect = getQModelIndexStr("text='Rectangle'", quickRootItem)
unfoldQModelIndex(mainRect)
subItems = ["text='Rectangle'", "text='Rectangle' occurrence='2'", "text='Text'"]
for item in subItems: