Merge remote-tracking branch 'origin/12.0' into qds/dev

Change-Id: Iefea658312bba6675eadce23fb8dc92f9207ea0e
This commit is contained in:
Tim Jenssen
2023-11-01 16:17:04 +01:00
3132 changed files with 89695 additions and 65436 deletions

View File

@@ -554,7 +554,7 @@ int main(int argc, char *argv[])
// Process files
const QStringList files = args;
for (const QString &fileName : files) {
if (! QFile::exists(fileName)) {
if (! QFileInfo::exists(fileName)) {
std::cerr << "Error: File \"" << qPrintable(fileName) << "\" does not exist."
<< std::endl;
exit(EXIT_FAILURE);

View File

@@ -76,7 +76,7 @@ SystemPreprocessor::SystemPreprocessor(bool verbose)
void SystemPreprocessor::check() const
{
QTextStream out(stderr);
if (!QFile::exists(QLatin1String(PATH_PREPROCESSOR_CONFIG))) {
if (!QFileInfo::exists(QLatin1String(PATH_PREPROCESSOR_CONFIG))) {
out << QString::fromLatin1("Error: File \"%1\" does not exist.")
.arg(QLatin1String(PATH_PREPROCESSOR_CONFIG))
<< Qt::endl;
@@ -94,7 +94,7 @@ void SystemPreprocessor::check() const
void SystemPreprocessor::preprocessFile(const QString &inputFile, const QString &outputFile) const
{
check();
if (!QFile::exists(inputFile)) {
if (!QFileInfo::exists(inputFile)) {
QTextStream out(stderr);
out << QString::fromLatin1("Error: File \"%1\" does not exist.").arg(inputFile) << Qt::endl;
exit(EXIT_FAILURE);

View File

@@ -126,7 +126,7 @@ static ASTNodes astNodes;
static QTextCursor createCursor(TranslationUnit *unit, AST *ast, QTextDocument *document)
{
int startLine, startColumn, endLine, endColumn;
unit->getTokenStartPosition(ast->firstToken(), &startLine, &startColumn);
unit->getTokenPosition(ast->firstToken(), &startLine, &startColumn);
unit->getTokenEndPosition(ast->lastToken() - 1, &endLine, &endColumn);
QTextCursor tc(document);
@@ -1058,7 +1058,7 @@ void generateAST_cpp(const Snapshot &snapshot, const QDir &cplusplusDir)
QTextCursor cursor(&cpp_document);
int line = 0, column = 0;
AST_cpp_document->translationUnit()->getTokenStartPosition(funDef->firstToken(), &line, &column);
AST_cpp_document->translationUnit()->getTokenPosition(funDef->firstToken(), &line, &column);
const int start = cpp_document.findBlockByNumber(line - 1).position() + column - 1;
cursor.setPosition(start);
int doxyStart = start;
@@ -1606,7 +1606,7 @@ int main(int argc, char *argv[])
}
QDir cplusplusDir(pathCppFrontend);
if (!QFile::exists(pathCppFrontend)) {
if (!QFileInfo::exists(pathCppFrontend)) {
std::cerr << "Error: Directory \"" << qPrintable(cplusplusDir.absolutePath())
<< "\" does not exist." << std::endl;
return EXIT_FAILURE;
@@ -1616,7 +1616,7 @@ int main(int argc, char *argv[])
<< "\"." << std::endl;
return EXIT_FAILURE;
}
if (!QFile::exists(pathDumpersFile)) {
if (!QFileInfo::exists(pathDumpersFile)) {
std::cerr << "Error: File \"" << qPrintable(pathDumpersFile)
<< "\" does not exist." << std::endl;
return EXIT_FAILURE;

View File

@@ -1200,6 +1200,27 @@
y="0"
x="0" />
</g>
<use
x="0"
y="0"
xlink:href="#src/libs/utils/images/progressindicator_big"
id="src/libs/solutions/spinner/icons/spinner_large"
transform="translate(97,-29)"
style="display:inline" />
<use
x="0"
y="0"
xlink:href="#src/libs/utils/images/progressindicator_medium"
id="src/libs/solutions/spinner/icons/spinner_medium"
transform="translate(98,-61)"
style="display:inline" />
<use
x="0"
y="0"
xlink:href="#src/libs/utils/images/progressindicator_small"
id="src/libs/solutions/spinner/icons/spinner_small"
transform="translate(243,-177)"
style="display:inline" />
<g
id="src/plugins/coreplugin/find/images/wrapindicator">
<rect
@@ -3145,15 +3166,18 @@
height="100%"
transform="translate(1090,64)"
style="display:inline;fill:none" />
<path
id="path4544-1"
style="fill:#000000"
d="m 1078,478.85 -8.5,16.15 h 17 z m 0.7724,8.61732 0.4208,4.69491 -4.1948,-1.62916 z" />
<path
id="path6034"
style="fill:none;stroke:#ffffff"
d="m 1078,478.85469 1.189,13.30208 m -4.1861,-1.62746 L 1086.5,495 m -17,0 9.272,-7.52758"
sodipodi:nodetypes="cccccc" />
<g
id="CMakeLogo">
<path
id="path4544-1"
style="fill:#000000"
d="m 1078,478.85 -8.5,16.15 h 17 z m 0.7724,8.61732 0.4208,4.69491 -4.1948,-1.62916 z" />
<path
id="path6034"
style="fill:none;stroke:#ffffff;stroke-width:1.2"
d="m 1078,478.85469 1.189,13.30208 m -4.1861,-1.62746 L 1086.5,495 m -17,0 9.272,-7.52758"
sodipodi:nodetypes="cccccc" />
</g>
</g>
<g
id="src/plugins/terminal/images/settingscategory_terminal">
@@ -3640,6 +3664,83 @@
inkscape:connector-curvature="0"
sodipodi:nodetypes="cczczcc" />
</g>
<g
id="src/plugins/projectexplorer/images/cmakeicon"
transform="translate(862,88.5)"
style="display:inline">
<use
style="display:inline"
transform="translate(1137,43.5)"
height="100%"
width="100%"
id="use1952-7-6"
xlink:href="#backgroundRect"
y="0"
x="0" />
<use
x="0"
y="0"
xlink:href="#CMakeLogo"
id="use2008"
style="display:inline"
transform="matrix(0.89482687,0,0,0.89482687,164.39232,51.559627)" />
</g>
<g
id="src/plugins/vcpkg/images/vcpkgicon">
<use
style="display:inline"
transform="translate(2016,132)"
height="100%"
width="100%"
id="use1952-7-6-1"
xlink:href="#backgroundRect"
y="0"
x="0" />
<g
id="g6088">
<path
style="fill:#4d4d4d"
d="m 2003.1348,577.71875 c 1.2848,0.24885 2.6819,-1.48291 2.4355,-3.76367 -0.7916,-0.0764 -1.3258,0.0765 -1.7637,0.36133 -0.6852,0.44589 -1.1449,1.30413 -1.7226,2.23047 0.1588,0.64898 0.5375,1.07247 1.0508,1.17187 z"
id="path2102"
sodipodi:nodetypes="scscs" />
<path
style="fill:#000000"
d="m 2006.0376,573.24147 c 1.8615,0.51984 1.6429,0.7072 2.8995,1.08292 1.2566,0.37573 2.3556,-0.12796 2.7719,-1.74627 0.3958,-1.53873 -1.3327,-2.57841 -3.4317,-2.56695 -2.0989,0.0114 -4.5685,1.07289 -5.6543,3.36578 -0.3182,0.67202 -0.5017,1.29842 -0.5781,1.85743 0.9246,-1.47431 2.1312,-2.51275 3.9927,-1.99291 z"
id="path5378"
sodipodi:nodetypes="zzssscz" />
</g>
<use
x="0"
y="0"
xlink:href="#g6088"
id="use6090"
transform="rotate(180,2008,576)" />
</g>
<g
id="src/libs/solutions/terminal/images/passwordlock"
transform="translate(-5,4)">
<use
x="0"
y="0"
xlink:href="#transparentBackgroundRect"
id="use1"
transform="matrix(2.5,0,0,4,586,-1405)" />
<path
style="opacity:0.75;fill:#ffffff"
d="m 582,423 v -5 c 0,-4 -4,-15 -16,-15 -12,-0.0312 -16,11 -16,15 0,4 0,5 0,5 h -4 v 36 h 40 v -36 z"
id="path167"
sodipodi:nodetypes="czzzcccccc" />
<path
style="display:inline;fill:#000000;fill-opacity:1;stroke-width:4"
inkscape:connector-curvature="0"
d="m 566,407 c -6.624,0 -12,5.372 -12,12 v 12 h 4 v -12 c 0,-4.412 3.584,-8 8,-8 4.412,0 8,3.588 8,8 v 12 h 4 v -12 c 0,-6.628 -5.372,-12 -12,-12 z"
id="lockbow-1" />
<path
style="display:inline;fill:#000000;fill-opacity:1"
inkscape:connector-curvature="0"
d="m 550,427 v 28 h 32 v -28 z m 18,15.388 V 447 h -4 v -4.612 c -1.172,-0.7 -2,-1.92 -2,-3.388 0,-2.212 1.792,-4 4,-4 2.208,0 4,1.788 4,4 0,1.464 -0.828,2.688 -2,3.388 z"
id="lockbody-1" />
</g>
</g>
<g
inkscape:groupmode="layer"
@@ -4525,7 +4626,7 @@
sodipodi:nodetypes="cc" />
</g>
<g
id="src/plugins/projectexplorer/images/debugger_overlay_small"
id="src/libs/utils/images/debugger_overlay_small"
transform="translate(16)">
<rect
style="fill:#ffffff;fill-opacity:1;stroke:none"
@@ -5262,7 +5363,7 @@
<g
style="display:inline"
transform="translate(144)"
id="src/plugins/projectexplorer/images/continue_1_small">
id="src/libs/utils/images/continue_1_small">
<rect
style="fill:#ffffff;fill-opacity:1;stroke:none"
x="265"
@@ -5282,7 +5383,7 @@
<g
style="display:inline"
transform="translate(160)"
id="src/plugins/projectexplorer/images/continue_2_small">
id="src/libs/utils/images/continue_2_small">
<rect
style="fill:#ffffff;fill-opacity:1;stroke:none"
x="265"

Before

Width:  |  Height:  |  Size: 362 KiB

After

Width:  |  Height:  |  Size: 366 KiB

View File

@@ -8,7 +8,6 @@ QtcTool {
Depends { name: "Qt.widgets" }
Depends { name: "Qt.xml" }
Depends { name: "Qt.network" }
Depends { name: "app_version_header" }
files: [
"cfutils.h",

View File

@@ -11,9 +11,7 @@ QtcTool {
Properties {
condition: qbs.targetOS.contains("windows")
cpp.dynamicLibraries: {
return qbs.toolchainType === "msvc" ? ["user32", "dbghelp"] : ["user32"];
}
cpp.dynamicLibraries: qbs.toolchain.contains("msvc") ? ["user32", "dbghelp"] : ["user32"]
}
files: [

View File

@@ -16,6 +16,7 @@ if (NOT QT_CREATOR_API_DEFINED)
set(DESTINATION DESTINATION .)
include(QtCreatorIDEBranding)
include(QtCreatorAPI)
qtc_handle_compiler_cache_support()
find_package(Qt6
COMPONENTS Concurrent Core Gui Network PrintSupport Qml Quick Sql Widgets Xml

View File

@@ -80,8 +80,6 @@ void GridGeometry::doUpdateGeometry()
setVertexData(vertexData);
int lastIndex = (vertexData.size() - 1) / int(sizeof(QVector3D));
// Set bounds based on main grid size instead of actual mesh size to make all parts of the
// grid have consistent bounds.
const float extent = float(m_lines) * m_step;

View File

@@ -704,12 +704,12 @@ QString ObjectNodeInstance::instanceType(const PropertyName &name) const
QList<ServerNodeInstance> ObjectNodeInstance::childItems() const
{
return QList<ServerNodeInstance>();
return {};
}
QList<QQuickItem *> ObjectNodeInstance::allItemsRecursive() const
{
return QList<QQuickItem *>();
return {};
}
QList<ServerNodeInstance> ObjectNodeInstance::stateInstances() const
@@ -724,7 +724,7 @@ QList<ServerNodeInstance> ObjectNodeInstance::stateInstances() const
return instanceList;
}
return QList<ServerNodeInstance>();
return {};
}
void ObjectNodeInstance::setNodeSource(const QString & /*source*/)

View File

@@ -185,7 +185,7 @@ const QList<QQuickItem*> Qt5NodeInstanceServer::allItems() const
if (rootNodeInstance().isValid())
return rootNodeInstance().allItemsRecursive();
return QList<QQuickItem*>();
return {};
}
bool Qt5NodeInstanceServer::rootIsRenderable3DObject() const

View File

@@ -105,14 +105,14 @@ void QmlPuppet::initQmlRunner()
if (m_argParser.isSet("readcapturedstream") && m_coreApp->arguments().count() > 2) {
QString fileName = m_argParser.value("readcapturedstream");
if (!QFile::exists(fileName)) {
if (!QFileInfo::exists(fileName)) {
qDebug() << "Input stream does not exist:" << fileName;
exit(-1);
}
if (m_coreApp->arguments().count() > 3) {
fileName = m_coreApp->arguments().at(3);
if (!QFile::exists(fileName)) {
if (!QFileInfo::exists(fileName)) {
qDebug() << "Output stream does not exist:" << fileName;
exit(-1);
}

View File

@@ -9,7 +9,7 @@
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QTimer::singleShot(0, [] {
QTimer::singleShot(0, &app, [] {
QInputDialog dlg;
const QStringList appArgs = qApp->arguments();
QString labelText = QCoreApplication::translate("qtc-askpass",
@@ -18,8 +18,10 @@ int main(int argc, char *argv[])
labelText.append('\n').append(appArgs.at(1));
dlg.setLabelText(labelText);
dlg.setTextEchoMode(QLineEdit::Password);
if (dlg.exec() == QDialog::Accepted)
const bool accepted = dlg.exec() == QDialog::Accepted;
if (accepted)
std::cout << qPrintable(dlg.textValue()) << std::endl;
qApp->exit(accepted ? 0 : 1);
});
return app.exec();
}

View File

@@ -10,6 +10,7 @@
#include <utils/checkablemessagebox.h>
#include <utils/layoutbuilder.h>
#include <utils/qtcsettings.h>
#include <utils/stringutils.h>
#include <QApplication>
@@ -205,10 +206,10 @@ CrashHandlerDialog::~CrashHandlerDialog()
bool CrashHandlerDialog::runDebuggerWhileBacktraceNotFinished()
{
// Check settings.
QSettings settings(QSettings::IniFormat,
QSettings::UserScope,
QLatin1String(Core::Constants::IDE_SETTINGSVARIANT_STR),
QLatin1String(SettingsApplication));
Utils::QtcSettings settings(QSettings::IniFormat,
QSettings::UserScope,
QLatin1String(Core::Constants::IDE_SETTINGSVARIANT_STR),
QLatin1String(SettingsApplication));
Utils::CheckableMessageBox::initialize(&settings);
// Ask user.
@@ -224,7 +225,7 @@ bool CrashHandlerDialog::runDebuggerWhileBacktraceNotFinished()
= Utils::CheckableMessageBox::question(this,
title,
message,
QString(SettingsKeySkipWarningAbortingBacktrace),
Utils::Key(SettingsKeySkipWarningAbortingBacktrace),
QMessageBox::Yes | QMessageBox::No,
QMessageBox::No);

View File

@@ -16,6 +16,7 @@ if (NOT QT_CREATOR_API_DEFINED)
set(DESTINATION DESTINATION .)
include(QtCreatorIDEBranding)
include(QtCreatorAPI)
qtc_handle_compiler_cache_support()
find_package(QT NAMES Qt6 Qt5
COMPONENTS Core

View File

@@ -58,6 +58,7 @@ QString AddDeviceOperation::argumentsHelpText() const
" --dockerRepo <STRING> Docker image repo.\n"
" --dockerTag <STRING> Docker image tag.\n"
" --dockerMappedPaths <STRING> Docker mapped paths (semi-colon separated).\n"
" --dockerClangdExecutable <STRING> Path to clangd inside the docker.\n"
" <KEY> <TYPE:VALUE> extra key value pairs\n");
}
@@ -219,6 +220,14 @@ bool AddDeviceOperation::setArguments(const QStringList &args)
continue;
}
if (current == QLatin1String("--dockerClangdExecutable")) {
if (next.isNull())
return false;
++i; // skip next;
m_clangdExecutable = next;
continue;
}
if (current == QLatin1String("--dockerRepo")) {
if (next.isNull())
return false;
@@ -292,14 +301,14 @@ void AddDeviceOperation::unittest()
devData.m_dockerMappedPaths = QStringList{"/opt", "/data"};
devData.m_dockerRepo = "repo";
devData.m_dockerTag = "tag";
devData.m_clangdExecutable = "clangdexe";
QVariantMap result = devData.addDevice(map);
QVariantMap data = result.value(QLatin1String(DEVICEMANAGER_ID)).toMap();
QVariantList devList = data.value(QLatin1String(DEVICE_LIST_ID)).toList();
QCOMPARE(devList.count(), 1);
QVariantMap dev = devList.at(0).toMap();
QCOMPARE(dev.count(), 20);
QCOMPARE(dev.count(), 21);
QCOMPARE(dev.value(QLatin1String("Authentication")).toInt(), 2);
QCOMPARE(dev.value(QLatin1String("DebugServerKey")).toString(), QLatin1String("debugServer"));
QCOMPARE(dev.value(QLatin1String("FreePortsSpec")).toString(), QLatin1String("ports"));
@@ -317,6 +326,7 @@ void AddDeviceOperation::unittest()
QCOMPARE(dev.value(QLatin1String("Version")).toInt(), 6);
QCOMPARE(dev.value(QLatin1String("DockerDeviceDataRepo")).toString(), "repo");
QCOMPARE(dev.value(QLatin1String("DockerDeviceDataTag")).toString(), "tag");
QCOMPARE(dev.value(QLatin1String("DockerDeviceClangDExecutable")).toString(), "clangdexe");
const QStringList paths = dev.value(QLatin1String("DockerDeviceMappedPaths")).toStringList();
QCOMPARE(paths, QStringList({"/opt", "/data"}));
@@ -353,6 +363,7 @@ QVariantMap AddDeviceData::addDevice(const QVariantMap &map) const
dev.append(KeyValuePair(QLatin1String("Uname"), QVariant(m_uname)));
dev.append(KeyValuePair(QLatin1String("Version"), QVariant(m_version)));
dev.append(KeyValuePair(QLatin1String("DockerDeviceMappedPaths"), QVariant(m_dockerMappedPaths)));
dev.append(KeyValuePair(QLatin1String("DockerDeviceClangDExecutable"), QVariant(m_clangdExecutable)));
dev.append(KeyValuePair(QLatin1String("DockerDeviceDataRepo"), QVariant(m_dockerRepo)));
dev.append(KeyValuePair(QLatin1String("DockerDeviceDataTag"), QVariant(m_dockerTag)));
dev.append(m_extra);

View File

@@ -43,6 +43,7 @@ public:
QStringList m_dockerMappedPaths;
QString m_dockerRepo;
QString m_dockerTag;
QString m_clangdExecutable;
KeyValuePairList m_extra;
};

View File

@@ -173,7 +173,7 @@ bool SdkSaveFile::commit()
if (!result) {
DWORD replaceErrorCode = GetLastError();
QString errorStr;
if (!QFile::exists(finalFileName)) {
if (!QFileInfo::exists(finalFileName)) {
// Replace failed because finalFileName does not exist, try rename.
if (!(result = rename(finalFileName)))
errorStr = errorString();
@@ -210,7 +210,7 @@ bool SdkSaveFile::commit()
// Back up current file.
// If it's opened by another application, the lock follows the move.
if (QFile::exists(finalFileName)) {
if (QFileInfo::exists(finalFileName)) {
// Kill old backup. Might be useful if creator crashed before removing backup.
QFile::remove(backupName);
QFile finalFile(finalFileName);

View File

@@ -1,11 +1,8 @@
import qbs 1.0
QtcTool {
name: "sdktool"
Depends { name: "Qt.core" }
Depends { name: "app_version_header" }
Depends { name: "Qt.testlib"; condition: project.withAutotests }
Depends { name: "sdktoolLib" }
cpp.defines: base.concat([

View File

@@ -1,5 +1,3 @@
import qbs 1.0
QtcLibrary {
name: "sdktoolLib"
@@ -7,7 +5,7 @@ QtcLibrary {
Depends { name: "Qt.core" }
Depends { name: "app_version_header" }
Depends { name: "Qt.testlib"; condition: project.withAutotests }
Depends { name: "Qt.testlib"; condition: qtc.withPluginTests }
property string libsDir: path + "/../../libs"
@@ -19,7 +17,7 @@ QtcLibrary {
? 'DATA_PATH="."'
: qbs.targetOS.contains("windows") ? 'DATA_PATH="../share/qtcreator"'
: 'DATA_PATH="../../share/qtcreator"');
if (project.withAutotests)
if (qtc.withPluginTests)
defines.push("WITH_TESTS");
return defines;
}
@@ -27,7 +25,7 @@ QtcLibrary {
var libs = [];
if (qbs.targetOS.contains("windows"))
libs.push("user32", "shell32");
if (qbs.toolchainType === "msvc")
if (qbs.toolchain.contains("msvc"))
libs.push("dbghelp");
return libs;
}

View File

@@ -12,6 +12,7 @@ if (NOT QT_CREATOR_API_DEFINED)
# standalone build
include(QtCreatorIDEBranding)
include(QtCreatorAPI)
qtc_handle_compiler_cache_support()
endif()
if (NOT WIN32)
@@ -23,6 +24,10 @@ if (CMAKE_SIZEOF_VOID_P EQUAL 8)
set(Arch 64)
endif()
if (MSVC_CXX_ARCHITECTURE_ID MATCHES "^ARM")
set(Arch "arm${Arch}")
endif()
add_qtc_executable(win${Arch}interrupt
COMPONENT wininterrupt
SOURCES wininterrupt.c

View File

@@ -11,6 +11,7 @@
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
/* To debug break a 64bit application under Windows, you must call
* DebugBreakProcess() from an 64bit apllication. Therefore: