Merge remote-tracking branch 'origin/14.0'

Conflicts:
	src/libs/utils/hostosinfo.cpp
	src/plugins/android/androidrunnerworker.cpp
	src/plugins/android/androidrunnerworker.h

Change-Id: I9c8fd1fe176019ef12b6adf5adf3af1b8007a083
This commit is contained in:
Eike Ziller
2024-08-27 08:39:11 +02:00
28 changed files with 258 additions and 313 deletions

View File

@@ -55,6 +55,7 @@ excludedirs += ../../qtcreator/examples/accelbubble \
../../qtcreator/src/python \ ../../qtcreator/src/python \
../../qtcreator/src/qnx \ ../../qtcreator/src/qnx \
../../qtcreator/src/qtquick/creator-only \ ../../qtcreator/src/qtquick/creator-only \
../../qtcreator/src/reference \
../../qtcreator/src/user-interface/creator-only \ ../../qtcreator/src/user-interface/creator-only \
../../qtcreator/src/vcs/creator-only \ ../../qtcreator/src/vcs/creator-only \
../../qtcreator/src/widgets \ ../../qtcreator/src/widgets \

View File

@@ -3,7 +3,7 @@
"supportedProjectTypes": [ "CMakeProjectManager.CMakeProject" ], "supportedProjectTypes": [ "CMakeProjectManager.CMakeProject" ],
"id": "U.QtQuickApplicationEmpty", "id": "U.QtQuickApplicationEmpty",
"category": "D.ApplicationQt", "category": "D.ApplicationQt",
"trDescription": "Creates a Qt Quick application that can have both QML and C++ code. You can build the application and deploy it to desktop, embedded, and mobile target platforms.\n\nYou can select an option to create a project that you can open in Qt Design Studio, which has a visual editor for Qt Quick UIs.", "trDescription": "Creates a Qt Quick application that can have both QML and C++ code. You can build the application and deploy it to desktop, embedded, and mobile target platforms.",
"trDisplayName": "Qt Quick Application", "trDisplayName": "Qt Quick Application",
"trDisplayCategory": "Application (Qt)", "trDisplayCategory": "Application (Qt)",
"icon": "icon.png", "icon": "icon.png",
@@ -21,23 +21,7 @@
{ "key": "HasFailureSignal", "value": "%{JS: value('MinimumSupportedQtVersion') > '6.3' }"}, { "key": "HasFailureSignal", "value": "%{JS: value('MinimumSupportedQtVersion') > '6.3' }"},
{ "key": "UsesAutoResourcePrefix", "value": "%{JS: value('MinimumSupportedQtVersion') > '6.4' }"}, { "key": "UsesAutoResourcePrefix", "value": "%{JS: value('MinimumSupportedQtVersion') > '6.4' }"},
{ "key": "HasLoadFromModule", "value": "%{JS: value('MinimumSupportedQtVersion') > '6.4' && value('UsesAutoResourcePrefix') }"}, { "key": "HasLoadFromModule", "value": "%{JS: value('MinimumSupportedQtVersion') > '6.4' && value('UsesAutoResourcePrefix') }"},
{ "key": "FeatureQt", "value": "QtSupport.Wizards.FeatureQt.%{MinimumSupportedQtVersion}"}, { "key": "FeatureQt", "value": "QtSupport.Wizards.FeatureQt.%{MinimumSupportedQtVersion}"}
{ "key": "QdsWizardPath", "value": "%{IDE:ResourcePath}/qmldesigner/studio_templates/projects" },
{ "key": "NoQdsProjectStyle", "value": "%{JS: !%{QdsProjectStyle} }" },
{ "key": "ImportModuleName", "value": "%{ProjectName}" },
{ "key": "ImportModuleVersion", "value": "" },
{ "key": "IsQt6Project", "value": true },
{ "key": "ProjectPluginClassName", "value": "%{ProjectName}Plugin" },
{ "key": "ProjectPluginName", "value": "%{ProjectName}plugin" },
{ "key": "QmlProjectFileName", "value": "%{JS: Util.fileName('%{ProjectName}', 'qmlproject')}" },
{ "key": "QtQuickControlsStyle", "value": "Material" },
{ "key": "QtQuickControlsStyleTheme", "value": "Light" },
{ "key": "QtQuickVersion", "value": "6.2" },
{ "key": "ScreenHeight", "value": 1080 },
{ "key": "ScreenWidth", "value": 1920 },
{ "key": "UIClassName", "value": "Screen01" },
{ "key": "UIClassFileName", "value": "%{JS: Util.fileName('%{UIClassName}', 'ui.qml')}" }
], ],
"pages": "pages":
@@ -53,18 +37,6 @@
"typeId": "Fields", "typeId": "Fields",
"data": "data":
[ [
{
"name": "QdsProjectStyle",
"trDisplayName": "Creates a project that you can open in Qt Design Studio",
"trToolTip": "Creates a project with a structure that is compatible both with Qt Design Studio (via .qmlproject) and with Qt Creator (via CMakeLists.txt). It contains a .ui.qml form that you can visually edit in Qt Design Studio.",
"type": "CheckBox",
"span": true,
"persistenceKey": "QtQuick.QdsProjectStyle",
"data":
{
"checked": false
}
},
{ {
"name": "UseVirtualKeyboard", "name": "UseVirtualKeyboard",
"trDisplayName": "Use Qt Virtual Keyboard", "trDisplayName": "Use Qt Virtual Keyboard",
@@ -115,151 +87,21 @@
[ [
{ {
"source": "CMakeLists.txt", "source": "CMakeLists.txt",
"openAsProject": true, "openAsProject": true
"condition": "%{NoQdsProjectStyle}"
}, },
{ {
"source": "main.cpp", "source": "main.cpp",
"target": "%{MainCppFileName}", "target": "%{MainCppFileName}"
"condition": "%{NoQdsProjectStyle}"
}, },
{ {
"source": "Main.qml.tpl", "source": "Main.qml.tpl",
"target": "Main.qml", "target": "Main.qml",
"openInEditor": true, "openInEditor": true
"condition": "%{NoQdsProjectStyle}"
}, },
{ {
"source": "../git.ignore", "source": "../git.ignore",
"target": ".gitignore", "target": ".gitignore",
"condition": "%{JS: %{NoQdsProjectStyle} && !value('IsSubproject') && value('VersionControl') === 'G.Git' }" "condition": "%{JS: !value('IsSubproject') && value('VersionControl') === 'G.Git' }"
}
]
},
{
"typeId": "File",
"data":
[
{
"source": "%{QdsWizardPath}/common/app.qmlproject.tpl",
"target": "%{ProjectDirectory}/%{QmlProjectFileName}",
"condition": "%{QdsProjectStyle}"
},
{
"source": "%{QdsWizardPath}/common/CMakeLists.main.txt.tpl",
"target": "%{ProjectDirectory}/CMakeLists.txt",
"openAsProject": true,
"condition": "%{QdsProjectStyle}"
},
{
"source": "%{QdsWizardPath}/common/qmlmodules.tpl",
"target": "%{ProjectDirectory}/qmlmodules",
"condition": "%{QdsProjectStyle}"
},
{
"source": "%{QdsWizardPath}/common/qmlcomponents.tpl",
"target": "%{ProjectDirectory}/qmlcomponents",
"condition": "%{QdsProjectStyle}"
},
{
"source": "%{QdsWizardPath}/common/insight.tpl",
"target": "%{ProjectDirectory}/insight",
"condition": "%{QdsProjectStyle}"
},
{
"source": "%{QdsWizardPath}/common/main.qml",
"target": "%{ProjectDirectory}/main.qml",
"condition": "%{QdsProjectStyle}"
},
{
"source": "%{QdsWizardPath}/common/qtquickcontrols2.conf.tpl",
"target": "%{ProjectDirectory}/qtquickcontrols2.conf",
"condition": "%{QdsProjectStyle}"
},
{
"source": "%{QdsWizardPath}/common/main.cpp.tpl",
"target": "%{ProjectDirectory}/src/main.cpp",
"condition": "%{QdsProjectStyle}"
},
{
"source": "%{QdsWizardPath}/common/app_environment.h.tpl",
"target": "%{ProjectDirectory}/src/app_environment.h",
"condition": "%{QdsProjectStyle}"
},
{
"source": "%{QdsWizardPath}/common/import_qml_plugins.h.tpl",
"target": "%{ProjectDirectory}/src/import_qml_plugins.h",
"condition": "%{QdsProjectStyle}"
},
{
"source": "%{QdsWizardPath}/common/import_qml_components_plugins.h.tpl",
"target": "%{ProjectDirectory}/src/import_qml_components_plugins.h",
"condition": "%{QdsProjectStyle}"
},
{
"source": "%{QdsWizardPath}/common/CMakeLists.content.txt.tpl",
"target": "%{ProjectDirectory}/content/CMakeLists.txt",
"condition": "%{QdsProjectStyle}"
},
{
"source": "%{QdsWizardPath}/common/App.qml.tpl",
"target": "%{ProjectDirectory}/content/App.qml",
"condition": "%{QdsProjectStyle}"
},
{
"source": "%{QdsWizardPath}/application/Screen01.ui.qml.tpl",
"target": "%{ProjectDirectory}/content/Screen01.ui.qml",
"condition": "%{QdsProjectStyle}"
},
{
"source": "%{QdsWizardPath}/common/fonts.txt",
"target": "%{ProjectDirectory}/content/fonts/fonts.txt",
"condition": "%{QdsProjectStyle}"
},
{
"source": "%{QdsWizardPath}/common/asset_imports.txt",
"target": "%{ProjectDirectory}/asset_imports/asset_imports.txt",
"condition": "%{QdsProjectStyle}"
},
{
"source": "%{QdsWizardPath}/common/CMakeLists.imports.txt.tpl",
"target": "%{ProjectDirectory}/imports/CMakeLists.txt",
"condition": "%{QdsProjectStyle}"
},
{
"source": "%{QdsWizardPath}/shared-plugin/name/CMakeLists.importmodule.txt.tpl",
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/CMakeLists.txt",
"condition": "%{QdsProjectStyle}"
},
{
"source": "%{QdsWizardPath}/shared-plugin/name/importmodule.qmldir.tpl",
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/qmldir",
"condition": "%{QdsProjectStyle}"
},
{
"source": "%{QdsWizardPath}/shared-plugin/name/Constants.qml.tpl",
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/Constants.qml",
"condition": "%{QdsProjectStyle}"
},
{
"source": "%{QdsWizardPath}/shared-plugin/name/DirectoryFontLoader.qml.tpl",
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/DirectoryFontLoader.qml",
"condition": "%{QdsProjectStyle}"
},
{
"source": "%{QdsWizardPath}/shared-plugin/name/EventListModel.qml.tpl",
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/EventListModel.qml",
"condition": "%{QdsProjectStyle}"
},
{
"source": "%{QdsWizardPath}/shared-plugin/name/EventListSimulator.qml.tpl",
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/EventListSimulator.qml",
"condition": "%{QdsProjectStyle}"
},
{
"source": "%{QdsWizardPath}/shared-plugin/name/designer/plugin.metainfo",
"target": "%{ProjectDirectory}/imports/%{ImportModuleName}/designer/plugin.metainfo",
"condition": "%{QdsProjectStyle}"
} }
] ]
} }

View File

@@ -13,14 +13,55 @@ if (NOT QT_CREATOR_API_DEFINED)
include(QtCreatorIDEBranding) include(QtCreatorIDEBranding)
include(QtCreatorAPI) include(QtCreatorAPI)
qtc_handle_compiler_cache_support() qtc_handle_compiler_cache_support()
# Compile for x86, x64 and arm64
if (NOT ${PROJECT_NAME}-MultiBuild AND NOT MINGW)
include(ExternalProject)
set(generator "Visual Studio 16 2019")
if(CMAKE_CXX_COMPILER MATCHES "Microsoft Visual Studio/2022/")
set(generator "Visual Studio 17 2022")
endif()
macro (setup_library arch)
ExternalProject_Add(${arch}-bld
SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}"
CMAKE_GENERATOR "${generator}"
CMAKE_GENERATOR_PLATFORM "${arch}"
CMAKE_ARGS
-D${PROJECT_NAME}-MultiBuild=ON
BUILD_COMMAND
${CMAKE_COMMAND} --build . --config ${CMAKE_BUILD_TYPE}
INSTALL_COMMAND
${CMAKE_COMMAND} --install . --config ${CMAKE_BUILD_TYPE}
--prefix "${CMAKE_BINARY_DIR}" --component qtcreatorcdbext
)
endmacro()
if (NOT QTCREATORCDBEXT_BUILD_ARCHS)
set(QTCREATORCDBEXT_BUILD_ARCHS arm64 win32 x64)
endif()
foreach(arch IN LISTS QTCREATORCDBEXT_BUILD_ARCHS)
setup_library(${arch})
endforeach()
list(LENGTH QTCREATORCDBEXT_BUILD_ARCHS build_archs_length)
if (build_archs_length GREATER 0)
install(
DIRECTORY "${CMAKE_BINARY_DIR}/lib"
DESTINATION .
COMPONENT qtcreatorcdbext
)
endif()
return()
endif()
endif() endif()
if (NOT WIN32 OR NOT MSVC) if (NOT WIN32 OR NOT MSVC)
return() return()
endif() endif()
find_library(DbgEngLib dbgeng)
set(ArchSuffix "32") set(ArchSuffix "32")
if (CMAKE_SIZEOF_VOID_P EQUAL 8) if (CMAKE_SIZEOF_VOID_P EQUAL 8)
set(ArchSuffix "64") set(ArchSuffix "64")
@@ -30,9 +71,13 @@ if (MSVC_CXX_ARCHITECTURE_ID MATCHES "^ARM")
set(ArchSuffix "arm${ArchSuffix}") set(ArchSuffix "arm${ArchSuffix}")
endif() endif()
if (NOT EXISTS "${CMAKE_BINARY_DIR}/lib/qtcreatorcdbext${ArchSuffix}")
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/lib/qtcreatorcdbext${ArchSuffix}")
endif()
add_qtc_library(qtcreatorcdbext SHARED add_qtc_library(qtcreatorcdbext SHARED
COMPONENT qtcreatorcdbext COMPONENT qtcreatorcdbext
DEPENDS ${DbgEngLib} DEPENDS dbgeng
DESTINATION lib/qtcreatorcdbext${ArchSuffix}/ DESTINATION lib/qtcreatorcdbext${ArchSuffix}/
SOURCES SOURCES
common.cpp common.h common.cpp common.h
@@ -95,18 +140,32 @@ if (_library_enabled)
endif() endif()
# Support for cross-compilation for arm64 on a x64 system # Support for cross-compilation for arm64 on a x64 system
if (MSVC_CXX_ARCHITECTURE_ID MATCHES "^ARM" AND CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "^AMD") if (MSVC_CXX_ARCHITECTURE_ID STREQUAL "ARM64" AND CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "ARM64")
set(arm64_on_arm64 ON)
endif()
if (MSVC_CXX_ARCHITECTURE_ID STREQUAL "x64" AND CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "AMD64")
set(x64_on_x64 ON)
endif()
if (NOT arm64_on_arm64 AND NOT x64_on_x64)
find_program(dumpbin_executable dumpbin) find_program(dumpbin_executable dumpbin)
find_program(lib_executable lib) find_program(lib_executable lib)
string(TOLOWER ${MSVC_CXX_ARCHITECTURE_ID} lower_arch_name) string(TOLOWER ${MSVC_CXX_ARCHITECTURE_ID} lower_arch_name)
if (lower_arch_name STREQUAL "arm64")
set(python_suffix "arm64")
elseif (lower_arch_name STREQUAL "x64")
set(python_suffix "amd64")
else()
set(python_suffix "win32")
endif()
if (NOT dumpbin_executable OR NOT lib_executable) if (NOT dumpbin_executable OR NOT lib_executable)
message(WARNING "Couldn't locate dumpbin.exe or lib.exe executables") message(WARNING "Couldn't locate dumpbin.exe or lib.exe executables")
return() return()
endif() endif()
if (Python3_VERSION VERSION_LESS "3.11.0") if (Python3_VERSION VERSION_LESS "3.11.0" AND lower_arch_name STREQUAL "arm64")
message(WARNING "Python 3.11.0 needs to be installed. This version is the first version that has arm64 Windows support") message(WARNING "Python 3.11.0 needs to be installed. This version is the first version that has arm64 Windows support")
return() return()
endif() endif()
@@ -129,7 +188,7 @@ if (_library_enabled)
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${PythonNameWithVersion}.def "${pythondef}") file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${PythonNameWithVersion}.def "${pythondef}")
execute_process( execute_process(
COMMAND ${lib_executable} COMMAND "${lib_executable}"
/def:${CMAKE_CURRENT_BINARY_DIR}/${PythonNameWithVersion}.def /def:${CMAKE_CURRENT_BINARY_DIR}/${PythonNameWithVersion}.def
/out:${CMAKE_CURRENT_BINARY_DIR}/${PythonNameWithVersion}.lib /machine:${lower_arch_name} /nologo) /out:${CMAKE_CURRENT_BINARY_DIR}/${PythonNameWithVersion}.lib /machine:${lower_arch_name} /nologo)
set(Python3_LIBRARIES "${CMAKE_CURRENT_BINARY_DIR}/${PythonNameWithVersion}.lib") set(Python3_LIBRARIES "${CMAKE_CURRENT_BINARY_DIR}/${PythonNameWithVersion}.lib")
@@ -139,7 +198,7 @@ if (_library_enabled)
endif() endif()
if (NOT PythonTargetArchDll) if (NOT PythonTargetArchDll)
set(python_embed_url "https://www.python.org/ftp/python/${Python3_VERSION}/python-${Python3_VERSION}-embed-${lower_arch_name}.zip") set(python_embed_url "https://www.python.org/ftp/python/${Python3_VERSION}/python-${Python3_VERSION}-embed-${python_suffix}.zip")
message(STATUS "Downloading ${python_embed_url}") message(STATUS "Downloading ${python_embed_url}")
foreach(retry RANGE 10) foreach(retry RANGE 10)

View File

@@ -31,8 +31,24 @@ bool HostOsInfo::m_useOverrideFileNameCaseSensitivity = false;
OsArch HostOsInfo::hostArchitecture() OsArch HostOsInfo::hostArchitecture()
{ {
#ifdef Q_OS_WIN
// Workaround for Creator running in x86 emulation mode on ARM machines
static const OsArch arch = []() {
const HANDLE procHandle = GetCurrentProcess();
ushort processMachine;
ushort nativeMachine;
if (IsWow64Process2(procHandle, &processMachine, &nativeMachine)
&& nativeMachine == IMAGE_FILE_MACHINE_ARM64) {
return OsArchArm64;
}
return osArchFromString(QSysInfo::currentCpuArchitecture()).value_or(OsArchUnknown);
}();
#else
static const OsArch arch static const OsArch arch
= osArchFromString(QSysInfo::currentCpuArchitecture()).value_or(OsArchUnknown); = osArchFromString(QSysInfo::currentCpuArchitecture()).value_or(OsArchUnknown);
#endif
return arch; return arch;
} }

View File

@@ -669,7 +669,7 @@ void IssuesWidget::updateBasicProjectInfo(const std::optional<Dto::ProjectInfoDt
const std::vector<Dto::AnalysisVersionDto> &versions = info->versions; const std::vector<Dto::AnalysisVersionDto> &versions = info->versions;
for (auto it = versions.crbegin(); it != versions.crend(); ++it) { for (auto it = versions.crbegin(); it != versions.crend(); ++it) {
const Dto::AnalysisVersionDto &version = *it; const Dto::AnalysisVersionDto &version = *it;
versionLabels.append(version.label.value_or(version.name)); versionLabels.append(version.name);
m_versionDates.append(version.date); m_versionDates.append(version.date);
} }
m_signalBlocker.lock(); m_signalBlocker.lock();

View File

@@ -92,7 +92,7 @@ private:
void initPreview(TextEditor::ICodeStylePreferences *codeStyle); void initPreview(TextEditor::ICodeStylePreferences *codeStyle);
void initEditor(TextEditor::ICodeStylePreferences *codeStyle); void initEditor(TextEditor::ICodeStylePreferences *codeStyle);
void reopenClangFormatDocument(); void reopenClangFormatDocument(bool readOnly);
void updatePreview(); void updatePreview();
void slotCodeStyleChanged(TextEditor::ICodeStylePreferences *currentPreferences); void slotCodeStyleChanged(TextEditor::ICodeStylePreferences *currentPreferences);
@@ -120,9 +120,13 @@ bool ClangFormatConfigWidget::eventFilter(QObject *object, QEvent *event)
return QWidget::eventFilter(object, event); return QWidget::eventFilter(object, event);
} }
ClangFormatConfigWidget::ClangFormatConfigWidget(TextEditor::ICodeStylePreferences *codeStyle, static bool isReadOnlyCodeStyle(TextEditor::ICodeStylePreferences *style)
Project *project, {
QWidget *parent) return style->isReadOnly() || style->isTemporarilyReadOnly() || !style->isAdditionalTabVisible();
}
ClangFormatConfigWidget::ClangFormatConfigWidget(
TextEditor::ICodeStylePreferences *codeStyle, Project *project, QWidget *parent)
: CodeStyleEditorWidget(parent) : CodeStyleEditorWidget(parent)
{ {
m_project = project; m_project = project;
@@ -152,7 +156,7 @@ ClangFormatConfigWidget::ClangFormatConfigWidget(TextEditor::ICodeStylePreferenc
slotCodeStyleChanged(codeStyle->currentPreferences()); slotCodeStyleChanged(codeStyle->currentPreferences());
reopenClangFormatDocument(); reopenClangFormatDocument(isReadOnlyCodeStyle(codeStyle));
updatePreview(); updatePreview();
} }
@@ -163,10 +167,7 @@ void ClangFormatConfigWidget::slotCodeStyleChanged(TextEditor::ICodeStylePrefere
m_config.reset(new ClangFormatFile(codeStyle)); m_config.reset(new ClangFormatFile(codeStyle));
m_config->setIsReadOnly(codeStyle->isReadOnly()); m_config->setIsReadOnly(codeStyle->isReadOnly());
m_editorWidget->setEnabled(!codeStyle->isReadOnly() && !codeStyle->isTemporarilyReadOnly() reopenClangFormatDocument(isReadOnlyCodeStyle(codeStyle));
&& codeStyle->isAdditionalTabVisible());
reopenClangFormatDocument();
updatePreview(); updatePreview();
} }
@@ -188,8 +189,6 @@ void ClangFormatConfigWidget::initEditor(TextEditor::ICodeStylePreferences *code
Q_ARG(Core::IEditor *, m_editor.get())); Q_ARG(Core::IEditor *, m_editor.get()));
m_editorWidget = m_editor->widget(); m_editorWidget = m_editor->widget();
m_editorWidget->setEnabled(!codeStyle->isReadOnly() && !codeStyle->isTemporarilyReadOnly()
&& codeStyle->isAdditionalTabVisible());
m_editorScrollArea->setWidget(m_editor->widget()); m_editorScrollArea->setWidget(m_editor->widget());
m_editorScrollArea->setWidgetResizable(true); m_editorScrollArea->setWidgetResizable(true);
@@ -309,7 +308,7 @@ void ClangFormatConfigWidget::updatePreview()
m_preview->textDocument()->autoFormatOrIndent(cursor); m_preview->textDocument()->autoFormatOrIndent(cursor);
} }
void ClangFormatConfigWidget::reopenClangFormatDocument() void ClangFormatConfigWidget::reopenClangFormatDocument(bool readOnly)
{ {
GuardLocker locker(m_ignoreChanges); GuardLocker locker(m_ignoreChanges);
@@ -319,6 +318,10 @@ void ClangFormatConfigWidget::reopenClangFormatDocument()
invokeMethodForLanguageClientManager("documentOpened", invokeMethodForLanguageClientManager("documentOpened",
Q_ARG(Core::IDocument *, m_editor->document())); Q_ARG(Core::IDocument *, m_editor->document()));
} }
auto textEditorWidget = qobject_cast<TextEditor::TextEditorWidget *>(m_editorWidget);
QTC_ASSERT(textEditorWidget, m_editorWidget->setEnabled(!readOnly); return;);
textEditorWidget->setReadOnly(readOnly);
} }
void ClangFormatConfigWidget::apply() void ClangFormatConfigWidget::apply()

View File

@@ -70,7 +70,11 @@ clang::format::FormatStyle calculateQtcStyle()
style.AlwaysBreakTemplateDeclarations = FormatStyle::BTDS_Yes; style.AlwaysBreakTemplateDeclarations = FormatStyle::BTDS_Yes;
#endif #endif
style.BinPackArguments = false; style.BinPackArguments = false;
#if LLVM_VERSION_MAJOR >= 20
style.BinPackParameters = FormatStyle::BPPS_OnePerLine;
#else
style.BinPackParameters = false; style.BinPackParameters = false;
#endif
style.BraceWrapping.AfterClass = true; style.BraceWrapping.AfterClass = true;
style.BraceWrapping.AfterControlStatement = FormatStyle::BWACS_Never; style.BraceWrapping.AfterControlStatement = FormatStyle::BWACS_Never;
style.BraceWrapping.AfterEnum = false; style.BraceWrapping.AfterEnum = false;

View File

@@ -101,7 +101,9 @@ static QString expandMacroEnv(const QString &macroPrefix,
do { do {
done = true; done = true;
for (qsizetype pos = 0; int len = findMacro(result, &pos, &macroName);) { for (qsizetype pos = 0; int len = findMacro(result, &pos, &macroName);) {
result.replace(pos, len, op(macroName)); const QString replacement = op(macroName);
// Prevent recursion by not allowing the same value to be reused
result.replace(pos, len, replacement != value ? replacement : "");
pos += macroName.length(); pos += macroName.length();
done = false; done = false;
} }
@@ -129,80 +131,58 @@ static Environment getEnvCombined(const std::optional<Environment> &optPresetEnv
template<class PresetType> template<class PresetType>
void expand(const PresetType &preset, Environment &env, const FilePath &sourceDirectory) void expand(const PresetType &preset, Environment &env, const FilePath &sourceDirectory)
{ {
const Environment presetEnv = getEnvCombined(preset.environment, env); if (!preset.environment)
presetEnv.forEachEntry([&](const QString &key, const QString &value_, bool enabled) { return;
const Environment combinedEnv = getEnvCombined(preset.environment, env);
const Environment parentEnv = env;
preset.environment->forEachEntry([&](const QString &key, QString value, bool enabled) {
if (!enabled) if (!enabled)
return; return;
QString value = value_;
expandAllButEnv(preset, sourceDirectory, value); expandAllButEnv(preset, sourceDirectory, value);
value = expandMacroEnv("env", value, [presetEnv](const QString &macroName) { value = expandMacroEnv("env", value, [&combinedEnv](const QString &macroName) {
return presetEnv.value(macroName); return combinedEnv.value(macroName);
}); });
enum Operation { set, appendOrSet, prependOrSet }; value = expandMacroEnv("penv", value, [&parentEnv](const QString &macroName) {
Operation op = set; return parentEnv.value(macroName);
if (key.compare("PATH", Qt::CaseInsensitive) == 0) {
op = appendOrSet;
const int index = value.indexOf("$penv{PATH}", 0, Qt::CaseInsensitive);
if (index != 0)
op = prependOrSet;
value.replace("$penv{PATH}", "", Qt::CaseInsensitive);
}
value = expandMacroEnv("penv", value, [env](const QString &macroName) {
return env.value(macroName);
}); });
// Make sure to expand the CMake macros also for environment variables // Make sure to expand the CMake macros also for environment variables
expandAllButEnv(preset, sourceDirectory, value); expandAllButEnv(preset, sourceDirectory, value);
switch (op) { env.set(key, value);
case set:
env.set(key, value);
break;
case appendOrSet:
env.appendOrSet(key, value);
break;
case prependOrSet:
env.prependOrSet(key, value);
break;
}
}); });
} }
template<class PresetType> template<class PresetType>
void expand(const PresetType &preset, EnvironmentItems &envItems, const FilePath &sourceDirectory) void expand(const PresetType &preset, EnvironmentItems &envItems, const FilePath &sourceDirectory)
{ {
const Environment presetEnv = preset.environment ? *preset.environment : Environment(); if (!preset.environment)
presetEnv.forEachEntry([&](const QString &key, const QString &value_, bool enabled) { return;
if (!enabled)
return; preset.environment->forEachEntry(
QString value = value_; [&preset,
expandAllButEnv(preset, sourceDirectory, value); &sourceDirectory,
value = expandMacroEnv("env", value, [presetEnv](const QString &macroName) { &envItems](const QString &key, QString value, bool enabled) {
if (presetEnv.hasKey(macroName)) if (!enabled)
return presetEnv.value(macroName); return;
return QString("${%1}").arg(macroName); expandAllButEnv(preset, sourceDirectory, value);
value = expandMacroEnv("env", value, [&preset](const QString &macroName) {
if (preset.environment->hasKey(macroName))
return preset.environment->value(macroName);
return QString("${%1}").arg(macroName);
});
value = expandMacroEnv("penv", value, [](const QString &macroName) {
return QString("${%1}").arg(macroName);
});
// Make sure to expand the CMake macros also for environment variables
expandAllButEnv(preset, sourceDirectory, value);
envItems.emplace_back(Utils::EnvironmentItem(key, value));
}); });
auto operation = EnvironmentItem::Operation::SetEnabled;
if (key.compare("PATH", Qt::CaseInsensitive) == 0) {
operation = EnvironmentItem::Operation::Append;
const int index = value.indexOf("$penv{PATH}", 0, Qt::CaseInsensitive);
if (index != 0)
operation = EnvironmentItem::Operation::Prepend;
value.replace("$penv{PATH}", "", Qt::CaseInsensitive);
}
value = expandMacroEnv("penv", value, [](const QString &macroName) {
return QString("${%1}").arg(macroName);
});
// Make sure to expand the CMake macros also for environment variables
expandAllButEnv(preset, sourceDirectory, value);
envItems.emplace_back(Utils::EnvironmentItem(key, value, operation));
});
} }
template<class PresetType> template<class PresetType>

View File

@@ -434,11 +434,8 @@ static DebuggerItem::MatchLevel matchSingle(const Abi &debuggerAbi, const Abi &t
return matchOnMultiarch; return matchOnMultiarch;
} }
if (debuggerAbi.wordWidth() == 64 && targetAbi.wordWidth() == 32) { if (debuggerAbi.wordWidth() == 64 && targetAbi.wordWidth() == 32)
return HostOsInfo::isWindowsHost() && engineType == CdbEngineType return DebuggerItem::MatchesSomewhat;
? DebuggerItem::MatchesPerfectly
: DebuggerItem::MatchesSomewhat;
}
if (debuggerAbi.wordWidth() != 0 && debuggerAbi.wordWidth() != targetAbi.wordWidth()) if (debuggerAbi.wordWidth() != 0 && debuggerAbi.wordWidth() != targetAbi.wordWidth())
return matchOnMultiarch; return matchOnMultiarch;

View File

@@ -549,7 +549,7 @@ void DebuggerItemModel::autoDetectCdbDebuggers()
for (const QFileInfo &kitFolderFi : kitFolders) { for (const QFileInfo &kitFolderFi : kitFolders) {
const QString path = kitFolderFi.absoluteFilePath(); const QString path = kitFolderFi.absoluteFilePath();
QStringList abis = {"x64"}; QStringList abis = {"x86", "x64"};
if (HostOsInfo::hostArchitecture() == Utils::OsArchArm64) if (HostOsInfo::hostArchitecture() == Utils::OsArchArm64)
abis << "arm64"; abis << "arm64";
for (const QString &abi: abis) { for (const QString &abi: abis) {
@@ -783,12 +783,6 @@ void DebuggerItemModel::readDebuggers(const FilePath &fileName, bool isSystem)
.arg(item.command().toUserOutput(), item.id().toString(), fileName.toUserOutput()); .arg(item.command().toUserOutput(), item.id().toString(), fileName.toUserOutput());
continue; continue;
} }
if (item.engineType() == CdbEngineType
&& Abi::abisOfBinary(item.command()).value(0).wordWidth() == 32) {
qWarning() << QString("32 bit CDB \"%1\" (%2) read from \"%3\" dropped since it is not supported anymore.")
.arg(item.command().toUserOutput(), item.id().toString(), fileName.toUserOutput());
continue;
}
// FIXME: During startup, devices are not yet available, so we cannot check if the file still exists. // FIXME: During startup, devices are not yet available, so we cannot check if the file still exists.
if (!item.command().needsDevice() && !item.command().isExecutableFile()) { if (!item.command().needsDevice() && !item.command().isExecutableFile()) {
qWarning() << QString("DebuggerItem \"%1\" (%2) read from \"%3\" dropped since the command is not executable.") qWarning() << QString("DebuggerItem \"%1\" (%2) read from \"%3\" dropped since the command is not executable.")

View File

@@ -391,10 +391,21 @@ public:
void fix(Kit *k) override void fix(Kit *k) override
{ {
const QVariant id = k->value(DebuggerKitAspect::id()); const QVariant id = k->value(DebuggerKitAspect::id());
if (Utils::anyOf(DebuggerItemManager::debuggers(), Utils::equal(&DebuggerItem::id, id))) const DebuggerItem debugger = Utils::findOrDefault(
return; DebuggerItemManager::debuggers(), Utils::equal(&DebuggerItem::id, id));
k->removeKeySilently(DebuggerKitAspect::id()); if (debugger.isValid() && debugger.engineType() == CdbEngineType) {
setup(k); const int tcWordWidth = ToolchainKitAspect::targetAbi(k).wordWidth();
if (Utils::anyOf(debugger.abis(), Utils::equal(&Abi::wordWidth, tcWordWidth)))
return;
for (const DebuggerItem &item : DebuggerItemManager::debuggers()) {
if (item.engineType() == CdbEngineType
&& Utils::anyOf(item.abis(), Utils::equal(&Abi::wordWidth, tcWordWidth))) {
k->setValue(DebuggerKitAspect::id(), item.id());
return;
}
}
}
} }
KitAspect *createKitAspect(Kit *k) const override KitAspect *createKitAspect(Kit *k) const override

View File

@@ -1683,6 +1683,11 @@ void Client::setLogTarget(LogTarget target)
} }
void Client::start() void Client::start()
{
startImpl();
}
void Client::startImpl()
{ {
d->m_shutdownTimer.stop(); d->m_shutdownTimer.stop();
LanguageClientManager::addClient(this); LanguageClientManager::addClient(this);

View File

@@ -224,6 +224,7 @@ protected:
void handleMessage(const LanguageServerProtocol::JsonRpcMessage &message); void handleMessage(const LanguageServerProtocol::JsonRpcMessage &message);
virtual void handleDiagnostics(const LanguageServerProtocol::PublishDiagnosticsParams &params); virtual void handleDiagnostics(const LanguageServerProtocol::PublishDiagnosticsParams &params);
virtual DiagnosticManager *createDiagnosticManager(); virtual DiagnosticManager *createDiagnosticManager();
virtual void startImpl();
private: private:
friend class ClientPrivate; friend class ClientPrivate;

View File

@@ -227,7 +227,7 @@ std::optional<Task> DiagnosticManager::createTask(
return Task(taskType, return Task(taskType,
taskText(diagnostic), taskText(diagnostic),
doc->filePath(), doc->filePath(),
diagnostic.range().start().line(), diagnostic.range().start().line() + 1,
d->m_taskCategory, d->m_taskCategory,
icon, icon,
Task::NoOptions); Task::NoOptions);

View File

@@ -270,6 +270,7 @@ EnvironmentWidget::EnvironmentWidget(QWidget *parent, Type type, QWidget *additi
vbox->addWidget(d->m_detailsContainer); vbox->addWidget(d->m_detailsContainer);
updateButtons();
connect(d->m_model, &QAbstractItemModel::dataChanged, connect(d->m_model, &QAbstractItemModel::dataChanged,
this, &EnvironmentWidget::updateButtons); this, &EnvironmentWidget::updateButtons);

View File

@@ -282,7 +282,8 @@ ProjectWizardPage::ProjectWizardPage(QWidget *parent)
m_addToVersionControlComboBox = new QComboBox; m_addToVersionControlComboBox = new QComboBox;
m_addToVersionControlComboBox->setObjectName("addToVersionControlComboBox"); m_addToVersionControlComboBox->setObjectName("addToVersionControlComboBox");
m_vcsManageButton = new QPushButton(ICore::msgShowOptionsDialog()); m_vcsManageButton = new QPushButton(ICore::msgShowOptionsDialog());
m_vcsManageButton->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred); m_vcsManageButton
->setSizePolicy(QSizePolicy::Maximum, m_vcsManageButton->sizePolicy().verticalPolicy());
m_filesLabel = new QLabel; m_filesLabel = new QLabel;
m_filesLabel->setObjectName("filesLabel"); m_filesLabel->setObjectName("filesLabel");
m_filesLabel->setAlignment(Qt::AlignBottom); m_filesLabel->setAlignment(Qt::AlignBottom);

View File

@@ -745,8 +745,10 @@ void QmakeBuildSystem::asyncUpdate()
void QmakeBuildSystem::buildFinished(bool success) void QmakeBuildSystem::buildFinished(bool success)
{ {
if (success) if (success) {
m_invalidateQmakeVfsContents = true; m_invalidateQmakeVfsContents = true;
updateQmlJSCodeModel();
}
} }
Tasks QmakeProject::projectIssues(const Kit *k) const Tasks QmakeProject::projectIssues(const Kit *k) const

View File

@@ -3,11 +3,14 @@
#include "qmllsclient.h" #include "qmllsclient.h"
#include "qmljseditorconstants.h"
#include "qmljseditortr.h" #include "qmljseditortr.h"
#include <languageclient/languageclientinterface.h> #include <languageclient/languageclientinterface.h>
#include <languageclient/languageclientmanager.h> #include <languageclient/languageclientmanager.h>
#include <projectexplorer/buildmanager.h>
#include <texteditor/textdocument.h> #include <texteditor/textdocument.h>
#include <texteditor/texteditor.h> #include <texteditor/texteditor.h>
@@ -66,10 +69,13 @@ QmllsClient *QmllsClient::clientForQmlls(const FilePath &qmlls)
QmllsClient::QmllsClient(StdIOClientInterface *interface) QmllsClient::QmllsClient(StdIOClientInterface *interface)
: Client(interface) : Client(interface)
{ {
LanguageServerProtocol::Unregistration unregister; setSnippetsGroup(QmlJSEditor::Constants::QML_SNIPPETS_GROUP_ID);
unregister.setMethod("textDocument/semanticTokens");
unregister.setId({}); connect(
dynamicCapabilities().unregisterCapability({unregister}); ProjectExplorer::BuildManager::instance(),
&ProjectExplorer::BuildManager::buildQueueFinished,
this,
[this]() { LanguageClientManager::restartClient(this); });
} }
QmllsClient::~QmllsClient() QmllsClient::~QmllsClient()
@@ -77,4 +83,14 @@ QmllsClient::~QmllsClient()
qmllsClients().remove(qmllsClients().key(this)); qmllsClients().remove(qmllsClients().key(this));
} }
void QmllsClient::startImpl()
{
LanguageServerProtocol::Unregistration unregister;
unregister.setMethod("textDocument/semanticTokens");
unregister.setId({});
dynamicCapabilities().unregisterCapability({unregister});
Client::startImpl();
}
} // namespace QmlJSEditor } // namespace QmlJSEditor

View File

@@ -19,6 +19,7 @@ public:
explicit QmllsClient(LanguageClient::StdIOClientInterface *interface); explicit QmllsClient(LanguageClient::StdIOClientInterface *interface);
~QmllsClient(); ~QmllsClient();
void startImpl() override;
static QmllsClient *clientForQmlls(const Utils::FilePath &qmlls); static QmllsClient *clientForQmlls(const Utils::FilePath &qmlls);
}; };

View File

@@ -62,8 +62,9 @@ static FormatOutput format(const FormatInput &input)
switch (input.command.processing()) { switch (input.command.processing()) {
case Command::FileProcessing: { case Command::FileProcessing: {
// Save text to temporary file // Save text to temporary file
Utils::TempFileSaver sourceFile(Utils::TemporaryDirectory::masterDirectoryPath() Utils::TempFileSaver sourceFile(
+ "/qtc_beautifier_XXXXXXXX." + input.filePath.suffix()); input.filePath.parentDir()
/ (input.filePath.fileName() + "_format_XXXXXXXX." + input.filePath.suffix()));
sourceFile.setAutoRemove(true); sourceFile.setAutoRemove(true);
sourceFile.write(input.sourceData.toUtf8()); sourceFile.write(input.sourceData.toUtf8());
if (!sourceFile.finalize()) { if (!sourceFile.finalize()) {

View File

@@ -173,10 +173,12 @@ bool IntroductionWidget::event(QEvent *e)
bool IntroductionWidget::eventFilter(QObject *obj, QEvent *ev) bool IntroductionWidget::eventFilter(QObject *obj, QEvent *ev)
{ {
if (obj == parent() && ev->type() == QEvent::Resize) if (obj == parent() && ev->type() == QEvent::Resize) {
resizeToParent(); resizeToParent();
else if (obj == m_stepText && ev->type() == QEvent::MouseButtonRelease) } else if (obj == m_stepText && ev->type() == QEvent::MouseButtonRelease) {
step(); step();
return true;
}
return QWidget::eventFilter(obj, ev); return QWidget::eventFilter(obj, ev);
} }

View File

@@ -13,6 +13,49 @@ if (NOT QT_CREATOR_API_DEFINED)
include(QtCreatorIDEBranding) include(QtCreatorIDEBranding)
include(QtCreatorAPI) include(QtCreatorAPI)
qtc_handle_compiler_cache_support() qtc_handle_compiler_cache_support()
# Compile for x86, x64 and arm64
if (NOT ${PROJECT_NAME}-MultiBuild AND NOT MINGW)
include(ExternalProject)
set(generator "Visual Studio 16 2019")
if(CMAKE_CXX_COMPILER MATCHES "Microsoft Visual Studio/2022/")
set(generator "Visual Studio 17 2022")
endif()
macro (setup_executable arch)
ExternalProject_Add(${arch}-bld
SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}"
CMAKE_GENERATOR "${generator}"
CMAKE_GENERATOR_PLATFORM "${arch}"
CMAKE_ARGS
-D${PROJECT_NAME}-MultiBuild=ON
BUILD_COMMAND
${CMAKE_COMMAND} --build . --config ${CMAKE_BUILD_TYPE}
INSTALL_COMMAND
${CMAKE_COMMAND} --install . --config ${CMAKE_BUILD_TYPE}
--prefix "${CMAKE_BINARY_DIR}" --component wininterrupt
)
endmacro()
if (NOT WININTERRUPT_BUILD_ARCHS)
set(WININTERRUPT_BUILD_ARCHS arm64 win32 x64)
endif()
foreach(arch IN LISTS WININTERRUPT_BUILD_ARCHS)
setup_executable(${arch})
endforeach()
list(LENGTH WININTERRUPT_BUILD_ARCHS build_archs_length)
if (build_archs_length GREATER 0)
install(
DIRECTORY "${CMAKE_BINARY_DIR}/bin"
DESTINATION .
COMPONENT wininterrupt
)
endif()
return()
endif()
endif() endif()
if (NOT WIN32) if (NOT WIN32)

View File

@@ -18,7 +18,6 @@ Qt version for the respective toolchain with the components (if available):
The exact versions and toolchains are: The exact versions and toolchains are:
Linux: Linux:
Qt 5.4.1 (gcc)
Qt 5.10.1 (gcc) Qt 5.10.1 (gcc)
Qt 5.14.1 (gcc) Qt 5.14.1 (gcc)
Qt 6.2.4 (gcc) Qt 6.2.4 (gcc)

View File

@@ -4,30 +4,6 @@
<qtcreator> <qtcreator>
<data> <data>
<variable>Profile.0</variable> <variable>Profile.0</variable>
<valuemap type="QVariantMap">
<value type="bool" key="PE.Profile.AutoDetected">false</value>
<value type="QString" key="PE.Profile.AutoDetectionSource"></value>
<valuemap type="QVariantMap" key="PE.Profile.Data">
<value type="QString" key="Android.GdbServer.Information"></value>
<value type="QString" key="Debugger.Information">{70e26273-2c0b-4534-bbc0-eb6ca670821a}</value>
<value type="QString" key="PE.Profile.Device">Desktop Device</value>
<value type="QByteArray" key="PE.Profile.DeviceType">Desktop</value>
<valuelist type="QVariantList" key="PE.Profile.Environment"/>
<value type="QString" key="PE.Profile.SysRoot"></value>
<value type="QString" key="PE.Profile.ToolChain">ProjectExplorer.ToolChain.Gcc:{c3f59b87-6997-4bd8-8067-ee04dc536371}</value>
<value type="QString" key="QtPM4.mkSpecInformation"></value>
<value type="int" key="QtSupport.QtInformation">13</value>
</valuemap>
<value type="QString" key="PE.Profile.Icon">:///DESKTOP///</value>
<value type="QString" key="PE.Profile.Id">{8ca91e21-c12e-4876-85b3-4b2141708acb}</value>
<valuelist type="QVariantList" key="PE.Profile.MutableInfo"/>
<value type="QString" key="PE.Profile.Name">Desktop 5.4.1 GCC</value>
<value type="bool" key="PE.Profile.SDK">false</value>
<valuelist type="QVariantList" key="PE.Profile.StickyInfo"/>
</valuemap>
</data>
<data>
<variable>Profile.1</variable>
<valuemap type="QVariantMap"> <valuemap type="QVariantMap">
<value type="bool" key="PE.Profile.AutoDetected">false</value> <value type="bool" key="PE.Profile.AutoDetected">false</value>
<value type="QString" key="PE.Profile.AutoDetectionSource"></value> <value type="QString" key="PE.Profile.AutoDetectionSource"></value>
@@ -51,7 +27,7 @@
</valuemap> </valuemap>
</data> </data>
<data> <data>
<variable>Profile.2</variable> <variable>Profile.1</variable>
<valuemap type="QVariantMap"> <valuemap type="QVariantMap">
<value type="bool" key="PE.Profile.AutoDetected">false</value> <value type="bool" key="PE.Profile.AutoDetected">false</value>
<value type="QString" key="PE.Profile.AutoDetectionSource"></value> <value type="QString" key="PE.Profile.AutoDetectionSource"></value>
@@ -79,7 +55,7 @@
</valuemap> </valuemap>
</data> </data>
<data> <data>
<variable>Profile.3</variable> <variable>Profile.2</variable>
<valuemap type="QVariantMap"> <valuemap type="QVariantMap">
<value type="bool" key="PE.Profile.AutoDetected">false</value> <value type="bool" key="PE.Profile.AutoDetected">false</value>
<value type="QString" key="PE.Profile.AutoDetectionSource"></value> <value type="QString" key="PE.Profile.AutoDetectionSource"></value>
@@ -104,7 +80,7 @@
</data> </data>
<data> <data>
<variable>Profile.Count</variable> <variable>Profile.Count</variable>
<value type="int">4</value> <value type="int">3</value>
</data> </data>
<data> <data>
<variable>Profile.Default</variable> <variable>Profile.Default</variable>

View File

@@ -4,16 +4,6 @@
<qtcreator> <qtcreator>
<data> <data>
<variable>QtVersion.0</variable> <variable>QtVersion.0</variable>
<valuemap type="QVariantMap">
<value type="int" key="Id">13</value>
<value type="QString" key="Name">Qt %{Qt:Version} (SQUISH_DEFAULT_COMPILER)</value>
<value type="QString" key="QMakePath">~/Qt5.4.1/5.4/SQUISH_DEFAULT_COMPILER/bin/qmake</value>
<value type="QString" key="QtVersion.Type">Qt4ProjectManager.QtVersion.Desktop</value>
<value type="bool" key="isAutodetected">false</value>
</valuemap>
</data>
<data>
<variable>QtVersion.1</variable>
<valuemap type="QVariantMap"> <valuemap type="QVariantMap">
<value type="int" key="Id">15</value> <value type="int" key="Id">15</value>
<value type="QString" key="Name">Qt %{Qt:Version} (SQUISH_DEFAULT_COMPILER)</value> <value type="QString" key="Name">Qt %{Qt:Version} (SQUISH_DEFAULT_COMPILER)</value>
@@ -23,7 +13,7 @@
</valuemap> </valuemap>
</data> </data>
<data> <data>
<variable>QtVersion.2</variable> <variable>QtVersion.1</variable>
<valuemap type="QVariantMap"> <valuemap type="QVariantMap">
<value type="int" key="Id">17</value> <value type="int" key="Id">17</value>
<value type="QString" key="Name">Qt %{Qt:Version} (SQUISH_DEFAULT_COMPILER)</value> <value type="QString" key="Name">Qt %{Qt:Version} (SQUISH_DEFAULT_COMPILER)</value>
@@ -33,7 +23,7 @@
</valuemap> </valuemap>
</data> </data>
<data> <data>
<variable>QtVersion.3</variable> <variable>QtVersion.2</variable>
<valuemap type="QVariantMap"> <valuemap type="QVariantMap">
<value type="int" key="Id">18</value> <value type="int" key="Id">18</value>
<value type="QString" key="Name">Qt %{Qt:Version} (SQUISH_DEFAULT_COMPILER)</value> <value type="QString" key="Name">Qt %{Qt:Version} (SQUISH_DEFAULT_COMPILER)</value>

View File

@@ -25,7 +25,7 @@ class Targets:
@staticmethod @staticmethod
def availableTargetClasses(ignoreValidity=False): def availableTargetClasses(ignoreValidity=False):
availableTargets = set(Targets.ALL_TARGETS) availableTargets = set(Targets.ALL_TARGETS)
if platform.system() == 'Darwin': if platform.system() not in ('Windows', 'Microsoft'):
availableTargets.remove(Targets.DESKTOP_5_4_1_GCC) availableTargets.remove(Targets.DESKTOP_5_4_1_GCC)
return availableTargets return availableTargets
@@ -84,7 +84,7 @@ class QtPath:
def getPaths(pathSpec): def getPaths(pathSpec):
qtTargets = [Targets.DESKTOP_5_10_1_DEFAULT, Targets.DESKTOP_5_14_1_DEFAULT, qtTargets = [Targets.DESKTOP_5_10_1_DEFAULT, Targets.DESKTOP_5_14_1_DEFAULT,
Targets.DESKTOP_6_2_4] Targets.DESKTOP_6_2_4]
if platform.system() != 'Darwin': if platform.system() in ('Windows', 'Microsoft'):
qtTargets.append(Targets.DESKTOP_5_4_1_GCC) qtTargets.append(Targets.DESKTOP_5_4_1_GCC)
if pathSpec == QtPath.DOCS: if pathSpec == QtPath.DOCS:
return map(lambda target: QtPath.docsPath(target), qtTargets) return map(lambda target: QtPath.docsPath(target), qtTargets)

View File

@@ -533,7 +533,7 @@ def __getSupportedPlatforms__(text, templateName, getAsStrings=False, ignoreVali
result = result.union(set([Targets.DESKTOP_5_10_1_DEFAULT, result = result.union(set([Targets.DESKTOP_5_10_1_DEFAULT,
Targets.DESKTOP_5_14_1_DEFAULT, Targets.DESKTOP_5_14_1_DEFAULT,
Targets.DESKTOP_6_2_4])) Targets.DESKTOP_6_2_4]))
if platform.system() != 'Darwin': if platform.system() in ('Windows', 'Microsoft'):
result.add(Targets.DESKTOP_5_4_1_GCC) result.add(Targets.DESKTOP_5_4_1_GCC)
elif 'Platform independent' in text: elif 'Platform independent' in text:
result = Targets.desktopTargetClasses() result = Targets.desktopTargetClasses()