Merge "Merge remote-tracking branch 'origin/11.0'"

This commit is contained in:
The Qt Project
2023-07-04 12:07:11 +00:00
45 changed files with 14307 additions and 11147 deletions

View File

@@ -6,7 +6,7 @@ instructions:
- type: Group
instructions:
- type: ExecuteCommand
command: "curl --fail -L --retry 5 --retry-delay 5 -o {{.AgentWorkingDir}}/build/qt_temp/elfutils-release_0.175qt-linux-x86_64.7z http://master.qt.io/development_releases/prebuilt/elfutils/elfutils-release_0.175qt-linux-x86_64.7z"
command: "curl --fail -L --retry 5 --retry-delay 5 -o {{.AgentWorkingDir}}/build/qt_temp/elfutils-release_0.175qt-linux-x86_64.7z https://master.qt.io/development_releases/prebuilt/elfutils/elfutils-release_0.175qt-linux-x86_64.7z"
maxTimeInSeconds: 3600
maxTimeBetweenOutput: 360
userMessageOnFailure: "Failed to download elfutils package, check logs."
@@ -82,7 +82,7 @@ instructions:
- type: Group
instructions:
- type: ExecuteCommand
command: "curl --fail -L --retry 5 --retry-delay 5 -o {{.AgentWorkingDir}}\\build\\qt_temp\\elfutils-release_0.175qt-windows-x86_64.7z http://master.qt.io/development_releases/prebuilt/elfutils/elfutils-release_0.175qt-windows-x86_64.7z"
command: "curl --fail -L --retry 5 --retry-delay 5 -o {{.AgentWorkingDir}}\\build\\qt_temp\\elfutils-release_0.175qt-windows-x86_64.7z https://master.qt.io/development_releases/prebuilt/elfutils/elfutils-release_0.175qt-windows-x86_64.7z"
maxTimeInSeconds: 3600
maxTimeBetweenOutput: 360
userMessageOnFailure: "Failed to download elfutils package, check logs."
@@ -92,7 +92,7 @@ instructions:
maxTimeBetweenOutput: 360
userMessageOnFailure: "Failed to extract elfutils package, check logs."
- type: ExecuteCommand
command: "curl --fail -L --retry 5 --retry-delay 5 -o {{.AgentWorkingDir}}\\build\\qt_temp\\Python38-win-x64.7z http://master.qt.io/development_releases/prebuilt/python/Python38-win-x64.7z"
command: "curl --fail -L --retry 5 --retry-delay 5 -o {{.AgentWorkingDir}}\\build\\qt_temp\\Python38-win-x64.7z https://master.qt.io/development_releases/prebuilt/python/Python38-win-x64.7z"
maxTimeInSeconds: 3600
maxTimeBetweenOutput: 360
userMessageOnFailure: "Failed to download python package, check logs."
@@ -141,7 +141,7 @@ instructions:
maxTimeBetweenOutput: 360
userMessageOnFailure: "Failed to create folder qt_temp, check logs."
- type: ExecuteCommand
command: "curl --fail -L --retry 5 --retry-delay 5 -o {{.AgentWorkingDir}}\\build\\qt_temp\\Python38-win-x86.7z http://master.qt.io/development_releases/prebuilt/python/Python38-win-x86.7z"
command: "curl --fail -L --retry 5 --retry-delay 5 -o {{.AgentWorkingDir}}\\build\\qt_temp\\Python38-win-x86.7z https://master.qt.io/development_releases/prebuilt/python/Python38-win-x86.7z"
maxTimeInSeconds: 3600
maxTimeBetweenOutput: 360
userMessageOnFailure: "Failed to download python package, check logs."

View File

@@ -7,10 +7,10 @@ instructions:
variableValue: "RelWithDebInfo"
- type: EnvironmentVariable
variableName: LLVM_BASE_URL
variableValue: http://master.qt.io/development_releases/prebuilt/libclang/libclang-release_16.0.2-based
variableValue: https://master.qt.io/development_releases/prebuilt/libclang/libclang-release_16.0.2-based
- type: EnvironmentVariable
variableName: QTC_QT_BASE_URL
variableValue: "http://ci-files02-hki.intra.qt.io/packages/jenkins/archive/qt/6.5/6.5.1-released/Qt"
variableValue: "https://ci-files02-hki.ci.qt.io/packages/jenkins/archive/qt/6.5/6.5.1-released/Qt"
- type: EnvironmentVariable
variableName: QTC_QT_MODULES
variableValue: "qt5compat qtbase qtdeclarative qtimageformats qtquick3d qtquickcontrols2 qtquicktimeline qtserialport qtshadertools qtsvg qttools qttranslations qtwebengine"
@@ -22,7 +22,7 @@ instructions:
variableValue: 10.14
- type: EnvironmentVariable
variableName: QTC_SDKTOOL_QT_BASE_URL
variableValue: "http://ci-files02-hki.intra.qt.io/packages/jenkins/archive/qt/5.15/5.15.2-final-released/latest/src/submodules/qtbase-everywhere-src-5.15.2"
variableValue: "https://ci-files02-hki.ci.qt.io/packages/jenkins/archive/qt/5.15/5.15.2-final-released/latest/src/submodules/qtbase-everywhere-src-5.15.2"
- type: Group
instructions:
- type: EnvironmentVariable

View File

@@ -52,7 +52,7 @@ instructions:
- type: ChangeDirectory
directory: "{{.BuildDir}}/tqtc-qtsdk/packaging_tools"
- type: ExecuteCommand
command: "python3 -m pipenv run python -u install_qt.py --qt-path {{.BuildDir}}/qt_install_dir --base-url {{.Env.QTC_QT_BASE_URL}} --base-url-postfix={{.Env.QTC_QT_POSTFIX}} --icu7z http://master.qt.io/development_releases/prebuilt/icu/prebuilt/56.1/icu-linux-g++-Rhel7.2-x64.7z {{.Env.QTC_QT_MODULES}}"
command: "python3 -m pipenv run python -u install_qt.py --qt-path {{.BuildDir}}/qt_install_dir --base-url {{.Env.QTC_QT_BASE_URL}} --base-url-postfix={{.Env.QTC_QT_POSTFIX}} --icu7z https://master.qt.io/development_releases/prebuilt/icu/prebuilt/56.1/icu-linux-g++-Rhel7.2-x64.7z {{.Env.QTC_QT_MODULES}}"
executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution
maxTimeInSeconds: 3600
maxTimeBetweenOutput: 360
@@ -72,7 +72,7 @@ instructions:
property: host.os
equals_value: MacOS
- type: ExecuteCommand
command: "python -m pipenv run python -u install_qt.py --qt-path {{.BuildDir}}/qt_install_dir --base-url {{.Env.QTC_QT_BASE_URL}} --base-url-postfix={{.Env.QTC_QT_POSTFIX}} --opengl32sw7z http://master.qt.io/development_releases/prebuilt/llvmpipe/windows/opengl32sw-64.7z --d3dcompiler7z http://master.qt.io/development_releases/prebuilt/d3dcompiler/msvc2013/d3dcompiler_47-x64.7z --openssl7z http://ci-files02-hki.intra.qt.io/packages/jenkins/openssl/openssl_1.1.1d_prebuild_x64.7z {{.Env.QTC_QT_MODULES}}"
command: "python -m pipenv run python -u install_qt.py --qt-path {{.BuildDir}}/qt_install_dir --base-url {{.Env.QTC_QT_BASE_URL}} --base-url-postfix={{.Env.QTC_QT_POSTFIX}} --opengl32sw7z https://master.qt.io/development_releases/prebuilt/llvmpipe/windows/opengl32sw-64.7z --d3dcompiler7z https://master.qt.io/development_releases/prebuilt/d3dcompiler/msvc2013/d3dcompiler_47-x64.7z --openssl7z https://ci-files02-hki.ci.qt.io/packages/jenkins/openssl/openssl_1.1.1d_prebuild_x64.7z {{.Env.QTC_QT_MODULES}}"
executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution
maxTimeInSeconds: 3600
maxTimeBetweenOutput: 360

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

View File

@@ -12,6 +12,13 @@
\l{https://github.com/features/copilot}{GitHub Copilot} into \QC.
You can view suggestions from Copilot in the \uicontrol Edit mode.
\note If you enable the Copilot plugin, you must agree with and abide by
the GitHub terms of use. It is your responsibility to know and accept the
requirements and parameters of using Copilot, such as ensuring you have
the rights to grant it access to your code. Also, you must understand the
implications of using it and the suggestions it produces, such as code
copyright and accuracy.
\section1 Requirements
To use the Copilot plugin, you need:
@@ -42,11 +49,11 @@
\li Select \uicontrol Edit > \uicontrol Preferences >
\uicontrol Copilot.
\image qtcreator-preferences-copilot.webp {Copilot tab in Preferences}
\li Select the \uicontrol {Enable Copilot} check box to use Copilot.
\li Select \uicontrol {Sign In} to sign into your subscription, activate
your device, and authorize the GitHub Copilot plugin.
The button turns into a \uicontrol {Sign Out} button.
\li Select the \uicontrol {Enable Copilot} check box to use Copilot.
\li In the \uicontrol {Node.js path} field, enter the full path to the
Node.js executable.
\li In the \uicontrol {Path to agent.js} field, enter the path to
@@ -56,7 +63,7 @@
make changes.
\endlist
\section1 Pair-Programming with Copilot
\section1 Receiving Suggestions
When you write code in the \l {Working in Edit Mode}{Edit} mode and
\uicontrol {Request completions automatically} is enabled, Copilot
@@ -78,9 +85,11 @@
To apply a suggestion word-by-word, select \uicontrol {Apply Word}
or press \key {Alt+Right}.
\section1 Enabling and Disabling Copilot
To reject a suggestion, press \key Esc or the arrow keys.
You can enable and disable the Copilot plugin either globally for all
\section1 Enabling and Disabling Suggestions
You can enable and disable the Copilot suggestions either globally for all
projects or at project level for a particular project.
To enable or disable Copilot suggestions globally, select the

View File

@@ -645,6 +645,74 @@
executed code, and even then prefer Utils::HostInfo over #ifdefs.
\endlist
\section2 Plugin Dependencies
To keep Qt Creator scalable we aim at keeping hard run-time dependencies
between plugins and to external libraries as few as reasonably possible.
There are several techniques for that.
\section2 Extending Base Plugin Functionality by Callbacks
This pattern allows leaf plugins to provide additional functionality
to a central plugin by injecting a callback.
It is used for functionality that is helpful in some setups but not
applicable or considered intrusive (e.g. because of size or external
dependencies) in others, so that users may want to enable or disable
it without impacting the rest of their setup.
The leaf plugin can then for example depend on a large (or otherwise
inconvenient) external dependency without imposing this dependency on
the central plugin.
The overall pattern looks like:
\list
\li In \c centralplugin/somewhere.h
\code
std::function<void(...)> &fancyLeafCallback();
void possiblyFancyOperation();
\endcode
\li In \c centralplugin/somewhere.cpp
\code
std::function<void(...)> &fancyLeafCallback()
{
static std::function<void(...)> callback;
return callback;
}
...
void possiblyFancyOperation()
{
if (auto callback = fancyLeafCallback()) {
// can be used
callback();
} else {
// not present, use some plain fallback implementation
// or error out
}
}
\endcode
\li In \c leafplugin/leafplugin.cpp:
\code
void LeafPlugininitialize()
{
...
Central::fancyLeafCallback() = [this](...) { doSomething; };
...
}
\endcode
\endlist
\section2 Plugin Extension Points

View File

@@ -38,6 +38,7 @@ if (LINK_INSIGHT)
include(${CMAKE_CURRENT_SOURCE_DIR}/insight)
endif ()
include(GNUInstallDirs)
install(TARGETS %{ProjectName}App
BUNDLE DESTINATION .
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}

View File

@@ -24,6 +24,7 @@ endif()
target_link_libraries(%{ProjectName} PRIVATE Qt${QT_VERSION_MAJOR}::%{QtModule})
include(GNUInstallDirs)
install(TARGETS %{ProjectName}
@if %{MacOSBundle}
BUNDLE DESTINATION .

View File

@@ -35,6 +35,7 @@ else()
endif()
@endif
include(GNUInstallDirs)
install(TARGETS %{ProjectName}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}

View File

@@ -4,6 +4,7 @@ project(%{ProjectName} LANGUAGES C)
add_executable(%{ProjectName} %{CFileName})
include(GNUInstallDirs)
install(TARGETS %{ProjectName}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}

View File

@@ -7,6 +7,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_executable(%{ProjectName} %{CppFileName})
include(GNUInstallDirs)
install(TARGETS %{ProjectName}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}

View File

@@ -39,6 +39,7 @@ target_link_libraries(%{TargetName}
PRIVATE Qt6::Quick
)
include(GNUInstallDirs)
install(TARGETS %{TargetName}
BUNDLE DESTINATION .
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}

View File

@@ -28,6 +28,7 @@ set_target_properties(%{TargetName} PROPERTIES
target_link_libraries(%{TargetName}
PRIVATE Qt6::Quick)
include(GNUInstallDirs)
install(TARGETS %{TargetName}
BUNDLE DESTINATION .
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})

View File

@@ -69,6 +69,7 @@ set_target_properties(%{ProjectName} PROPERTIES
WIN32_EXECUTABLE TRUE
)
include(GNUInstallDirs)
install(TARGETS %{ProjectName}
BUNDLE DESTINATION .
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})

View File

@@ -72,6 +72,7 @@ set_target_properties(%{ProjectName} PROPERTIES
WIN32_EXECUTABLE TRUE
)
include(GNUInstallDirs)
install(TARGETS %{ProjectName}
BUNDLE DESTINATION .
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}

View File

@@ -62,7 +62,7 @@ static QString caseFromContent(const QString &content)
}
QString result = content.mid(index + 5);
static QRegularExpression functionName("\"(.+)\":.*");
static const QRegularExpression functionName("\"(.+)\":.*");
const QRegularExpressionMatch matcher = functionName.match(result);
if (!matcher.hasMatch()) {
qCDebug(orLog) << "got no match";
@@ -173,29 +173,29 @@ void BoostTestOutputReader::handleMessageMatch(const QRegularExpressionMatch &ma
void BoostTestOutputReader::processOutputLine(const QByteArray &outputLine)
{
static QRegularExpression newTestStart("^Running (\\d+) test cases?\\.\\.\\.$");
static QRegularExpression dependency("^Including test case (.+) as a dependency of "
"test case (.+)$");
static QRegularExpression messages("^(.+)\\((\\d+)\\): (info: (.+)|error: (.+)|"
"fatal error: (.+)|last checkpoint: (.+)"
"|Entering test (case|suite) \"(.+)\""
"|Leaving test (case|suite) \"(.+)\"; testing time: (\\d+.+)"
"|Test case \"(.+)\" is skipped because .+$)$");
static QRegularExpression moduleMssg("^(Entering test module \"(.+)\"|"
"Leaving test module \"(.+)\"; testing time: (\\d+.+))$");
static QRegularExpression noAssertion("^Test case (.*) did not check any assertions$");
static const QRegularExpression newTestStart("^Running (\\d+) test cases?\\.\\.\\.$");
static const QRegularExpression dependency("^Including test case (.+) as a dependency of "
"test case (.+)$");
static const QRegularExpression messages("^(.+)\\((\\d+)\\): (info: (.+)|error: (.+)|"
"fatal error: (.+)|last checkpoint: (.+)"
"|Entering test (case|suite) \"(.+)\""
"|Leaving test (case|suite) \"(.+)\"; testing time: (\\d+.+)"
"|Test case \"(.+)\" is skipped because .+$)$");
static const QRegularExpression moduleMssg("^(Entering test module \"(.+)\"|"
"Leaving test module \"(.+)\"; testing time: (\\d+.+))$");
static const QRegularExpression noAssertion("^Test case (.*) did not check any assertions$");
static QRegularExpression summaryPreamble("^\\s*Test (module|suite|case) \"(.*)\" has "
"(failed|passed)( with:)?$");
static QRegularExpression summarySkip("^\\s+Test case \"(.*)\" was skipped$");
static QRegularExpression summaryDetail("^\\s+(\\d+) test cases? out of (\\d+) "
"(failed|passed|skipped)$");
static QRegularExpression summaryAssertion("^\\s+(\\d+) assertions? out of (\\d+) "
"(failed|passed)$");
static const QRegularExpression summaryPreamble("^\\s*Test (module|suite|case) \"(.*)\" has "
"(failed|passed)( with:)?$");
static const QRegularExpression summarySkip("^\\s+Test case \"(.*)\" was skipped$");
static const QRegularExpression summaryDetail("^\\s+(\\d+) test cases? out of (\\d+) "
"(failed|passed|skipped)$");
static const QRegularExpression summaryAssertion("^\\s+(\\d+) assertions? out of (\\d+) "
"(failed|passed)$");
static QRegularExpression finish("^\\*{3} (\\d+) failure(s are| is) detected in the "
"test module \"(.*)\"$");
QString noErrors("*** No errors detected");
static const QRegularExpression finish("^\\*{3} (\\d+) failure(s are| is) detected in the "
"test module \"(.*)\"$");
const QString noErrors("*** No errors detected");
const QString line = removeCommandlineColors(QString::fromUtf8(outputLine));
if (line.trimmed().isEmpty())

View File

@@ -60,6 +60,7 @@ BoostTestSettings::BoostTestSettings(Id settingsId)
seed.setSettingsKey("Seed");
seed.setEnabled(false);
seed.setRange(0, INT_MAX); // UINT_MAX would be correct, but inner QSpinBox is limited to int
seed.setLabelText(Tr::tr("Seed:"));
seed.setToolTip(Tr::tr("A seed of 0 means no randomization. A value of 1 uses the current "
"time, any other value is used as random seed generator."));

View File

@@ -41,7 +41,7 @@ static QStringList parseTags(const QString &tagsString)
{
QStringList tagsList;
const QRegularExpression tagRegEx("\\[(.*?)\\]",QRegularExpression::CaseInsensitiveOption);
static const QRegularExpression tagRegEx("\\[(.*?)\\]", QRegularExpression::CaseInsensitiveOption);
int pos = 0;
QRegularExpressionMatch it = tagRegEx.match(tagsString, pos);
while (it.hasMatch()) {

View File

@@ -104,12 +104,12 @@ bool CatchTestParser::processDocument(QPromise<TestParseResultPtr> &promise,
const QByteArray &fileContent = getFileContent(fileName);
if (!hasCatchNames(doc)) {
const QRegularExpression regex("\\b(CATCH_)?"
"(SCENARIO|(TEMPLATE_(PRODUCT_)?)?TEST_CASE(_METHOD)?|"
"TEMPLATE_TEST_CASE(_METHOD)?_SIG|"
"TEMPLATE_PRODUCT_TEST_CASE(_METHOD)?_SIG|"
"TEMPLATE_LIST_TEST_CASE_METHOD|METHOD_AS_TEST_CASE|"
"REGISTER_TEST_CASE)");
static const QRegularExpression regex("\\b(CATCH_)?"
"(SCENARIO|(TEMPLATE_(PRODUCT_)?)?TEST_CASE(_METHOD)?|"
"TEMPLATE_TEST_CASE(_METHOD)?_SIG|"
"TEMPLATE_PRODUCT_TEST_CASE(_METHOD)?_SIG|"
"TEMPLATE_LIST_TEST_CASE_METHOD|METHOD_AS_TEST_CASE|"
"REGISTER_TEST_CASE)");
if (!regex.match(QString::fromUtf8(fileContent)).hasMatch())
return false;
}

View File

@@ -80,7 +80,7 @@ bool GTestParser::processDocument(QPromise<TestParseResultPtr> &promise,
const QByteArray &fileContent = getFileContent(fileName);
if (!hasGTestNames(doc)) {
const QRegularExpression regex("\\b(TEST(_[FP])?|TYPED_TEST(_P)?|(GTEST_TEST))");
static const QRegularExpression regex("\\b(TEST(_[FP])?|TYPED_TEST(_P)?|(GTEST_TEST))");
if (!regex.match(QString::fromUtf8(fileContent)).hasMatch())
return false;
}

View File

@@ -39,7 +39,7 @@ static ResultHooks::OutputStringHook outputStringHook(const QString &testCaseNam
static QString normalizeName(const QString &name)
{
static QRegularExpression parameterIndex("/\\d+");
static const QRegularExpression parameterIndex("/\\d+");
QString nameWithoutParameterIndices = name;
nameWithoutParameterIndices.remove(parameterIndex);

View File

@@ -43,6 +43,7 @@ GTestSettings::GTestSettings(Id settingsId)
seed.setSettingsKey("Seed");
seed.setSpecialValueText({});
seed.setRange(0, 99999);
seed.setEnabled(false);
seed.setLabelText(Tr::tr("Seed:"));
seed.setToolTip(Tr::tr("A seed of 0 generates a seed based on the current timestamp."));

View File

@@ -62,7 +62,7 @@ bool GTestVisitor::visit(CPlusPlus::FunctionDefinitionAST *ast)
testSuiteName = QString::fromUtf8(parameter1.spell());
testCaseName = QString::fromUtf8(parameter2.spell());
// test (suite) name needs to be a alpha numerical literal ( _ and $ allowed)
const QRegularExpression alnum("^[[:alnum:]_$]+$");
static const QRegularExpression alnum("^[[:alnum:]_$]+$");
// test suite must not start with a number, test case may
if (!alnum.match(testSuiteName).hasMatch()
|| (!testSuiteName.isEmpty() && testSuiteName.at(0).isNumber())) {

View File

@@ -112,8 +112,8 @@ TestCases QtTestParser::testCases(const CppEditor::CppModelManager *modelManager
return astVisitor.testCases();
TestCases result;
const QRegularExpression regex("\\b(QTEST_(APPLESS_|GUILESS_)?MAIN)"
"\\s*\\(\\s*([[:alnum:]]+)\\s*\\)");
static const QRegularExpression regex("\\b(QTEST_(APPLESS_|GUILESS_)?MAIN)"
"\\s*\\(\\s*([[:alnum:]]+)\\s*\\)");
QRegularExpressionMatchIterator it = regex.globalMatch(QString::fromUtf8(document->utf8Source()));
while (it.hasNext()) {
const QRegularExpressionMatch match = it.next();

View File

@@ -34,7 +34,7 @@ public:
private:
CppEditor::SymbolFinder m_symbolFinder;
QString m_className;
CPlusPlus::Snapshot m_snapshot;
const CPlusPlus::Snapshot &m_snapshot;
QMap<QString, QtTestCodeLocationAndType> m_privSlots;
bool m_valid = false;
bool m_inherited = false;
@@ -55,7 +55,7 @@ private:
QStringList m_classNames;
CPlusPlus::Scope *m_currentScope = nullptr;
CPlusPlus::Document::Ptr m_currentDoc;
CPlusPlus::Snapshot m_snapshot;
const CPlusPlus::Snapshot &m_snapshot;
};
class TestDataFunctionVisitor : public CPlusPlus::ASTVisitor

View File

@@ -146,7 +146,7 @@ QString QuickTestParser::quickTestName(const CPlusPlus::Document::Ptr &doc) cons
}
if (pchIncludes) {
const QRegularExpression regex("\\bQUICK_TEST_(MAIN|OPENGL_MAIN|MAIN_WITH_SETUP)");
static const QRegularExpression regex("\\bQUICK_TEST_(MAIN|OPENGL_MAIN|MAIN_WITH_SETUP)");
const QRegularExpressionMatch match = regex.match(QString::fromUtf8(fileContent));
if (match.hasMatch())
return match.captured(); // we do not care for the name, just return something non-empty
@@ -165,8 +165,6 @@ QList<Document::Ptr> QuickTestParser::scanDirectoryForQuickTestQmlFiles(const Fi
ModelManagerInterface::importScan(ModelManagerInterface::workingCopy(), paths, qmlJsMM,
false /*emitDocumentChanges*/, false /*onlyTheLib*/, true /*forceRescan*/ );
const Snapshot snapshot = QmlJSTools::Internal::ModelManager::instance()->snapshot();
QDirIterator it(srcDir.toString(),
QDir::Dirs | QDir::NoDotAndDotDot,
QDirIterator::Subdirectories);
@@ -184,7 +182,7 @@ QList<Document::Ptr> QuickTestParser::scanDirectoryForQuickTestQmlFiles(const Fi
QList<Document::Ptr> foundDocs;
for (const FilePath &path : std::as_const(dirs)) {
const QList<Document::Ptr> docs = snapshot.documentsInDirectory(path);
const QList<Document::Ptr> docs = m_qmlSnapshot.documentsInDirectory(path);
for (const Document::Ptr &doc : docs) {
const FilePath fi = doc->fileName();
//const QFileInfo fi(doc->fileName());

View File

@@ -45,7 +45,7 @@ public:
private:
QmlJS::Document::Ptr m_currentDoc;
QmlJS::Snapshot m_snapshot;
const QmlJS::Snapshot &m_snapshot;
QStack<QuickTestCaseSpec> m_caseParseStack;
QVector<QuickTestCaseSpec> m_testCases;
QStack<bool> m_objectIsTestStack;
@@ -64,7 +64,7 @@ public:
private:
QString m_testBaseName;
CPlusPlus::Document::Ptr m_currentDoc;
CPlusPlus::Snapshot m_snapshot;
const CPlusPlus::Snapshot &m_snapshot;
};
} // namespace Internal

View File

@@ -1115,7 +1115,23 @@ void ClangdClient::gatherHelpItemForTooltip(const HoverRequest::Response &hoverR
cleanString.remove('`');
const QStringList lines = cleanString.trimmed().split('\n');
for (const QString &line : lines) {
const auto markupFilePath = Utils::FilePath::fromUserInput(line.simplified());
const QString possibleFilePath = line.simplified();
const auto looksLikeFilePath = [&] {
if (possibleFilePath.length() < 3)
return false;
if (osType() == OsTypeWindows) {
if (possibleFilePath.startsWith(R"(\\)"))
return true;
return possibleFilePath.front().isLetter()
&& possibleFilePath.at(1) == ':'
&& possibleFilePath.at(2) == '\\';
}
return possibleFilePath.front() == '/'
&& possibleFilePath.at(1).isLetterOrNumber();
};
if (!looksLikeFilePath())
continue;
const auto markupFilePath = Utils::FilePath::fromUserInput(possibleFilePath);
if (markupFilePath.exists()) {
d->setHelpItemForTooltip(hoverResponse.id(),
filePath,

View File

@@ -2169,6 +2169,11 @@ DocumentUri Client::hostPathToServerUri(const Utils::FilePath &path) const
});
}
OsType Client::osType() const
{
return d->m_serverDeviceTemplate.osType();
}
void Client::registerCustomMethod(const QString &method, const CustomMethodHandler &handler)
{
d->m_customHandlers.insert(method, handler);

View File

@@ -168,6 +168,7 @@ public:
LanguageServerProtocol::DocumentUri::PathMapper hostPathMapper() const;
Utils::FilePath serverUriToHostPath(const LanguageServerProtocol::DocumentUri &uri) const;
LanguageServerProtocol::DocumentUri hostPathToServerUri(const Utils::FilePath &path) const;
Utils::OsType osType() const;
// custom methods
using CustomMethodHandler = std::function<void(

View File

@@ -141,7 +141,7 @@ public:
PortList freePorts;
FilePath debugServerPath;
FilePath debugDumperPath = Core::ICore::resourcePath("debugger/");
std::optional<FilePath> qmlRunCommand;
FilePath qmlRunCommand;
bool emptyCommandAllowed = false;
QList<Icon> deviceIcons;
@@ -475,8 +475,7 @@ void IDevice::fromMap(const QVariantMap &map)
d->debugServerPath = FilePath::fromSettings(map.value(QLatin1String(DebugServerKey)));
const FilePath qmlRunCmd = FilePath::fromSettings(map.value(QLatin1String(QmlRuntimeKey)));
if (!qmlRunCmd.isEmpty())
d->qmlRunCommand = qmlRunCmd;
d->qmlRunCommand = qmlRunCmd;
d->extraData = map.value(ExtraDataKey).toMap();
}
@@ -509,8 +508,7 @@ QVariantMap IDevice::toMap() const
map.insert(QLatin1String(VersionKey), d->version);
map.insert(QLatin1String(DebugServerKey), d->debugServerPath.toSettings());
map.insert(QLatin1String(QmlRuntimeKey),
d->qmlRunCommand ? d->qmlRunCommand->toSettings() : FilePath().toSettings());
map.insert(QLatin1String(QmlRuntimeKey), d->qmlRunCommand.toSettings());
map.insert(ExtraDataKey, d->extraData);
@@ -600,23 +598,12 @@ void IDevice::setDebugServerPath(const FilePath &path)
FilePath IDevice::qmlRunCommand() const
{
if (d->qmlRunCommand)
return *d->qmlRunCommand;
const FilePath newPath = searchExecutableInPath("qml");
if (newPath.isEmpty())
return {};
d->qmlRunCommand = newPath;
return *d->qmlRunCommand;
return d->qmlRunCommand;
}
void IDevice::setQmlRunCommand(const FilePath &path)
{
if (path.isEmpty())
d->qmlRunCommand.reset();
else
d->qmlRunCommand = path;
d->qmlRunCommand = path;
}
void IDevice::setExtraData(Id kind, const QVariant &data)

View File

@@ -205,15 +205,15 @@ FilePath QmlProjectRunConfiguration::qmlRuntimeFilePath() const
// We might not have a full Qt version for building, but the device
// might know what is good for running.
if (IDevice::ConstPtr dev = DeviceKitAspect::device(kit)) {
IDevice::ConstPtr dev = DeviceKitAspect::device(kit);
if (dev) {
const FilePath qmlRuntime = dev->qmlRunCommand();
if (!qmlRuntime.isEmpty())
return qmlRuntime;
}
// The Qt version might know. That's the "build" Qt version,
// i.e. not necessarily something the device can use, but the
// device had its chance above.
// The Qt version might know, but we need to make sure
// that the device can reach it.
if (QtVersion *version = QtKitAspect::qtVersion(kit)) {
// look for puppet as qmlruntime only in QtStudio Qt versions
if (version->features().contains("QtStudio") &&
@@ -227,13 +227,13 @@ FilePath QmlProjectRunConfiguration::qmlRuntimeFilePath() const
}
}
const FilePath qmlRuntime = version->qmlRuntimeFilePath();
if (!qmlRuntime.isEmpty())
if (!qmlRuntime.isEmpty() && (!dev || dev->ensureReachable(qmlRuntime)))
return qmlRuntime;
}
// If not given explicitly by run device, nor Qt, try to pick
// it from $PATH on the run device.
return "qml";
return dev ? dev->filePath("qml").searchInPath() : "qml";
}
void QmlProjectRunConfiguration::createQtVersionAspect()

View File

@@ -1612,7 +1612,7 @@ QSet<Id> QtVersion::features() const
void QtVersion::addToEnvironment(const Kit *k, Environment &env) const
{
Q_UNUSED(k)
env.set("QTDIR", hostDataPath().toUserOutput());
env.set("QTDIR", hostDataPath().nativePath());
}
// Some Qt versions may require environment settings for qmake to work

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

@@ -26,6 +26,23 @@
<tags>qt quick,controls,tumbler,help</tags>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/youtubehOx3dod5-1A.webp" difficulty="" projectPath="" name="Learning: Qt Creator - UI Tour and the Welcome screen" isVideo="true" videoUrl="https://www.youtube.com/watch?v=hOx3dod5-1A" videoLength="3:21">
<description><![CDATA[The parts of the Qt Creator UI and the Welcome mode.]]></description>
<tags>qt creator,learning,ui,welcome,2023</tags>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/youtubeFTSvDmcAgPI.webp" difficulty="" projectPath="" name="Learning: Qt Creator - Create a new project" isVideo="true" videoUrl="https://www.youtube.com/watch?v=FTSvDmcAgPI" videoLength="3:21">
<description><![CDATA[Creating a Qt Widgets application project.]]></description>
<tags>qt creator,learning,projects,qt widgets,2023</tags>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/youtubeLnVjI0I7cKs.webp" difficulty="" projectPath="" name="Learning: Qt Creator - Design and Edit Modes" isVideo="true" videoUrl="https://www.youtube.com/watch?v=LnVjI0I7cKs" videoLength="4:34">
<description><![CDATA[Developing a Qt Widgets application.]]></description>
<tags>qt creator,learning,qt designer,coding,2023</tags>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/youtubeEhJ1eV_6RH8.webp" difficulty="" projectPath="" name="Learning: Qt Creator - Debugging" isVideo="true" videoUrl="https://www.youtube.com/watch?v=EhJ1eV_6RH8" videoLength="3:22">
<description><![CDATA[Debugging a Qt Widgets application.]]></description>
<tags>qt creator,learning,debugging,2023</tags>
</tutorial>
<tutorial imageUrl=":qtsupport/images/icons/youtube1tSpq5OLkYI.webp" difficulty="" projectPath="" name="Online: How to set up and deploy an application using Qt for Device Creation" isVideo="true" videoUrl="https://youtu.be/1tSpq5OLkYI" videoLength="5:48">
<description><![CDATA[Using Qt Creator to deploy applications to an embedded device.]]></description>
<tags>qt creator,embedded,device creation,video,2021</tags>

View File

@@ -46,5 +46,9 @@
<file>images/icons/youtubev_ynSET9FHU.webp</file>
<file>images/icons/youtubexNIz78IPBu0.webp</file>
<file>images/icons/youtubezAqSiIGdj8M.webp</file>
<file>images/icons/youtubeEhJ1eV_6RH8.webp</file>
<file>images/icons/youtubehOx3dod5-1A.webp</file>
<file>images/icons/youtubeLnVjI0I7cKs.webp</file>
<file>images/icons/youtubeFTSvDmcAgPI.webp</file>
</qresource>
</RCC>

View File

@@ -5,6 +5,7 @@
#include "objectsmapeditor.h"
#include "squishfilehandler.h"
#include "squishmessages.h"
#include "squishnavigationwidget.h"
#include "squishoutputpane.h"
#include "squishresultmodel.h"
@@ -94,6 +95,15 @@ void SquishPluginPrivate::initializeMenuEntries()
Command *command = ActionManager::registerAction(action, "Squish.ServerSettings");
menu->addAction(command);
connect(action, &QAction::triggered, this, [] {
const SquishSettings *settings = SquishPlugin::squishSettings();
if (!settings->squishPath().exists()) {
SquishMessages::criticalMessage(Tr::tr("Invalid Squish settings. Configure Squish "
"installation path inside "
"Preferences... > Squish > General to use "
"this wizard."));
return;
}
SquishServerSettingsDialog dialog;
dialog.exec();
});

View File

@@ -36,8 +36,8 @@ Qt 6.2.4 (MSVC2019, 64bit)
Third - you'll have to provide some additional repositories.
These additional repositories are located inside ~/squish-data or C:\Users\<user>\squish-data (depending on the OS you're on).
You can also just provide them inside a different folder and specify the folder with the environment variable SYSTEST_SRCPATH.
This folder must contain a QtCreator repository (or source copy) of tag v4.7.0 named 'creator'
including the submodule src/shared/qbs
This folder must contain a QtCreator repository (or source copy) of tag v6.0.1 named 'creator'
without any submodules initialized.
Fourth - you'll have to make sure that some needed tools are available (no matter on which OS you're on).
* cmake 3.14 or newer

View File

@@ -24,7 +24,7 @@ def main():
waitFor("runButton.enabled", 30000)
# Starting before opening, because this is where Creator froze (QTCREATORBUG-10733)
startopening = datetime.utcnow()
openQmakeProject(pathCreator, [Targets.DESKTOP_5_10_1_DEFAULT])
openQmakeProject(pathCreator, [Targets.DESKTOP_5_14_1_DEFAULT])
# Wait for parsing to complete
startreading = datetime.utcnow()
waitFor("runButton.enabled", 300000)

File diff suppressed because it is too large Load Diff