forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/11.0'
Conflicts: src/plugins/beautifier/clangformat/clangformatsettings.cpp src/shared/qbs Change-Id: Ie614f036ef9529a3cae6366a9313eded988d725c
This commit is contained in:
77
dist/changelog/changes-11.0.1.md
vendored
Normal file
77
dist/changelog/changes-11.0.1.md
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
Qt Creator 11.0.1
|
||||
=================
|
||||
|
||||
Qt Creator version 11.0.1 contains bug fixes.
|
||||
|
||||
The most important changes are listed in this document. For a complete list of
|
||||
changes, see the Git log for the Qt Creator sources that you can check out from
|
||||
the public Git repository. For example:
|
||||
|
||||
git clone git://code.qt.io/qt-creator/qt-creator.git
|
||||
git log --cherry-pick --pretty=oneline origin/v11.0.0..v11.0.1
|
||||
|
||||
General
|
||||
-------
|
||||
|
||||
* Fixed writing configuration files with `sdktool`
|
||||
* Fixed exporting keyboard shortcut schemes
|
||||
([QTCREATORBUG-29431](https://bugreports.qt.io/browse/QTCREATORBUG-29431))
|
||||
|
||||
Editing
|
||||
-------
|
||||
|
||||
### SCXML
|
||||
|
||||
* Fixed a crash when `onEntry`/`onExit` events and transitions where displayed
|
||||
together
|
||||
([QTCREATORBUG-29429](https://bugreports.qt.io/browse/QTCREATORBUG-29429))
|
||||
|
||||
### Beautifier
|
||||
|
||||
* Fixed setting a customized Clang Format style
|
||||
([QTCREATORBUG-28525](https://bugreports.qt.io/browse/QTCREATORBUG-28525))
|
||||
|
||||
Projects
|
||||
--------
|
||||
|
||||
* Fixed a crash when editing kits
|
||||
([QTCREATORBUG-29382](https://bugreports.qt.io/browse/QTCREATORBUG-29382),
|
||||
[QTCREATORBUG-29425](https://bugreports.qt.io/browse/QTCREATORBUG-29425))
|
||||
* Fixed a crash when manually re-detecting toolchains
|
||||
([QTCREATORBUG-29430](https://bugreports.qt.io/browse/QTCREATORBUG-29430))
|
||||
* Fixed the pasting of large texts in integrated terminal
|
||||
* Incredibuild
|
||||
* Fixed missing UI in the build steps
|
||||
|
||||
### CMake
|
||||
|
||||
* Fixed an issue with framework paths with CMake >= 3.27
|
||||
([QTCREATORBUG-29450](https://bugreports.qt.io/browse/QTCREATORBUG-29450))
|
||||
|
||||
Debugging
|
||||
---------
|
||||
|
||||
* Fixed the button state in the dialog for loading core files
|
||||
* Fixed debugging with debuggers that still use Python 2.7
|
||||
([QTCREATORBUG-29440](https://bugreports.qt.io/browse/QTCREATORBUG-29440))
|
||||
* GDB
|
||||
* Fixed `Use common locations for debug information`
|
||||
|
||||
Version Control Systems
|
||||
-----------------------
|
||||
|
||||
### Git
|
||||
|
||||
* Fixed a crash when tools are not found in `PATH`
|
||||
|
||||
Credits for these changes go to:
|
||||
--------------------------------
|
||||
Aleksei German
|
||||
André Pönitz
|
||||
Christian Kandeler
|
||||
Christian Stenger
|
||||
Cristian Adam
|
||||
Eike Ziller
|
||||
Leena Miettinen
|
||||
Marcus Tillmanns
|
||||
Robert Löhning
|
||||
@@ -34,7 +34,7 @@
|
||||
\if defined(qtcreator)
|
||||
\row
|
||||
\li View examples of what you can do with Qt
|
||||
\li \l{List of Qt Examples}
|
||||
\li \l{Qt Examples and Tutorials}
|
||||
|
||||
\row
|
||||
\li Develop Qt applications for desktop and \l{glossary-device}{devices}
|
||||
|
||||
@@ -297,7 +297,8 @@ public:
|
||||
connect(styleButtonGroup, &QButtonGroup::buttonClicked, this, updateEnabled);
|
||||
connect(&s.predefinedStyle, &SelectionAspect::volatileValueChanged, this, updateEnabled);
|
||||
|
||||
setOnApply([configurations] {
|
||||
setOnApply([configurations, customizedStyleButton] {
|
||||
settings().usePredefinedStyle.setValue(!customizedStyleButton->isChecked());
|
||||
settings().customStyle.setValue(configurations->currentConfiguration());
|
||||
settings().save();
|
||||
});
|
||||
|
||||
@@ -485,6 +485,26 @@ static std::vector<FileApiDetails::FragmentInfo> extractFragments(const QJsonObj
|
||||
});
|
||||
}
|
||||
|
||||
static void addIncludeInfo(std::vector<IncludeInfo> *includes,
|
||||
const QJsonObject &compileGroups,
|
||||
const QString §ion)
|
||||
{
|
||||
const std::vector<IncludeInfo> add
|
||||
= transform<std::vector>(compileGroups.value(section).toArray(), [](const QJsonValue &v) {
|
||||
const QJsonObject i = v.toObject();
|
||||
const QString path = i.value("path").toString();
|
||||
const bool isSystem = i.value("isSystem").toBool();
|
||||
const ProjectExplorer::HeaderPath hp(path,
|
||||
isSystem
|
||||
? ProjectExplorer::HeaderPathType::System
|
||||
: ProjectExplorer::HeaderPathType::User);
|
||||
|
||||
return IncludeInfo{ProjectExplorer::RawProjectPart::frameworkDetectionHeuristic(hp),
|
||||
i.value("backtrace").toInt(-1)};
|
||||
});
|
||||
std::copy(add.cbegin(), add.cend(), std::back_inserter(*includes));
|
||||
}
|
||||
|
||||
static TargetDetails extractTargetDetails(const QJsonObject &root, QString &errorMessage)
|
||||
{
|
||||
TargetDetails t;
|
||||
@@ -580,6 +600,10 @@ static TargetDetails extractTargetDetails(const QJsonObject &root, QString &erro
|
||||
const QJsonArray compileGroups = root.value("compileGroups").toArray();
|
||||
t.compileGroups = transform<std::vector>(compileGroups, [](const QJsonValue &v) {
|
||||
const QJsonObject o = v.toObject();
|
||||
std::vector<IncludeInfo> includes;
|
||||
addIncludeInfo(&includes, o, "includes");
|
||||
// new in CMake 3.27+:
|
||||
addIncludeInfo(&includes, o, "frameworks");
|
||||
return CompileInfo{
|
||||
transform<std::vector>(o.value("sourceIndexes").toArray(),
|
||||
[](const QJsonValue &v) { return v.toInt(-1); }),
|
||||
@@ -589,21 +613,7 @@ static TargetDetails extractTargetDetails(const QJsonObject &root, QString &erro
|
||||
const QJsonObject o = v.toObject();
|
||||
return o.value("fragment").toString();
|
||||
}),
|
||||
transform<std::vector>(
|
||||
o.value("includes").toArray(),
|
||||
[](const QJsonValue &v) {
|
||||
const QJsonObject i = v.toObject();
|
||||
const QString path = i.value("path").toString();
|
||||
const bool isSystem = i.value("isSystem").toBool();
|
||||
const ProjectExplorer::HeaderPath
|
||||
hp(path,
|
||||
isSystem ? ProjectExplorer::HeaderPathType::System
|
||||
: ProjectExplorer::HeaderPathType::User);
|
||||
|
||||
return IncludeInfo{
|
||||
ProjectExplorer::RawProjectPart::frameworkDetectionHeuristic(hp),
|
||||
i.value("backtrace").toInt(-1)};
|
||||
}),
|
||||
includes,
|
||||
transform<std::vector>(o.value("defines").toArray(),
|
||||
[](const QJsonValue &v) {
|
||||
const QJsonObject d = v.toObject();
|
||||
|
||||
@@ -64,6 +64,13 @@ static QString defineDirectiveToDefineOption(const Macro ¯o)
|
||||
return QString::fromUtf8(option);
|
||||
}
|
||||
|
||||
static QStringList cpuBlacklist()
|
||||
{
|
||||
QStringList blacklist = qtcEnvironmentVariable("QTC_CLANGD_CPU_BLACKLIST")
|
||||
.split(':', Qt::SkipEmptyParts);
|
||||
return blacklist << "cortex-a72.cortex-a53"; // See QTCREATORBUG-29304
|
||||
}
|
||||
|
||||
QStringList XclangArgs(const QStringList &args)
|
||||
{
|
||||
QStringList options;
|
||||
@@ -270,6 +277,7 @@ void CompilerOptionsBuilder::addPicIfCompilerFlagsContainsIt()
|
||||
void CompilerOptionsBuilder::addCompilerFlags()
|
||||
{
|
||||
add(m_compilerFlags.flags);
|
||||
removeUnsupportedCpuFlags();
|
||||
}
|
||||
|
||||
void CompilerOptionsBuilder::addMsvcExceptions()
|
||||
@@ -375,6 +383,17 @@ void CompilerOptionsBuilder::addIncludeFile(const QString &file)
|
||||
}
|
||||
}
|
||||
|
||||
void CompilerOptionsBuilder::removeUnsupportedCpuFlags()
|
||||
{
|
||||
const QStringList blacklist = cpuBlacklist();
|
||||
for (auto it = m_options.begin(); it != m_options.end();) {
|
||||
if (it->startsWith("-mcpu=") && blacklist.contains(it->mid(6)))
|
||||
it = m_options.erase(it);
|
||||
else
|
||||
++it;
|
||||
}
|
||||
}
|
||||
|
||||
void CompilerOptionsBuilder::addIncludedFiles(const QStringList &files)
|
||||
{
|
||||
for (const QString &file : files) {
|
||||
|
||||
@@ -87,6 +87,7 @@ private:
|
||||
QStringList wrappedMingwHeadersIncludePath() const;
|
||||
QByteArray msvcVersion() const;
|
||||
void addIncludeFile(const QString &file);
|
||||
void removeUnsupportedCpuFlags();
|
||||
|
||||
private:
|
||||
const ProjectPart &m_projectPart;
|
||||
|
||||
@@ -61,7 +61,8 @@ public:
|
||||
};
|
||||
|
||||
CommandBuilderAspect::CommandBuilderAspect(BuildStep *step)
|
||||
: d(new CommandBuilderAspectPrivate(step))
|
||||
: BaseAspect(step)
|
||||
, d(new CommandBuilderAspectPrivate(step))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -1376,6 +1376,17 @@ void BuildDeviceKitAspect::devicesChanged()
|
||||
// --------------------------------------------------------------------------
|
||||
// EnvironmentKitAspect:
|
||||
// --------------------------------------------------------------------------
|
||||
static EnvironmentItem forceMSVCEnglishItem()
|
||||
{
|
||||
static EnvironmentItem item("VSLANG", "1033");
|
||||
return item;
|
||||
}
|
||||
|
||||
static bool enforcesMSVCEnglish(const EnvironmentItems &changes)
|
||||
{
|
||||
return changes.contains(forceMSVCEnglishItem());
|
||||
}
|
||||
|
||||
namespace Internal {
|
||||
class EnvironmentKitAspectWidget final : public KitAspectWidget
|
||||
{
|
||||
@@ -1410,7 +1421,7 @@ private:
|
||||
|
||||
void refresh() override
|
||||
{
|
||||
const EnvironmentItems changes = currentEnvironment();
|
||||
const EnvironmentItems changes = envWithoutMSVCEnglishEnforcement();
|
||||
const QString shortSummary = EnvironmentItem::toStringList(changes).join("; ");
|
||||
m_summaryLabel->setText(shortSummary.isEmpty() ? Tr::tr("No changes to apply.") : shortSummary);
|
||||
}
|
||||
@@ -1422,32 +1433,29 @@ private:
|
||||
VariableChooser::addSupportForChildWidgets(w, expander);
|
||||
};
|
||||
auto changes = EnvironmentDialog::getEnvironmentItems(m_summaryLabel,
|
||||
currentEnvironment(),
|
||||
envWithoutMSVCEnglishEnforcement(),
|
||||
QString(),
|
||||
polisher);
|
||||
if (!changes)
|
||||
return;
|
||||
|
||||
if (HostOsInfo::isWindowsHost()) {
|
||||
const EnvironmentItem forceMSVCEnglishItem("VSLANG", "1033");
|
||||
if (m_vslangCheckbox->isChecked() && changes->indexOf(forceMSVCEnglishItem) < 0)
|
||||
changes->append(forceMSVCEnglishItem);
|
||||
// re-add what envWithoutMSVCEnglishEnforcement removed
|
||||
// or update vslang checkbox if user added it manually
|
||||
if (m_vslangCheckbox->isChecked() && !enforcesMSVCEnglish(*changes))
|
||||
changes->append(forceMSVCEnglishItem());
|
||||
else if (enforcesMSVCEnglish(*changes))
|
||||
m_vslangCheckbox->setChecked(true);
|
||||
}
|
||||
|
||||
EnvironmentKitAspect::setEnvironmentChanges(m_kit, *changes);
|
||||
}
|
||||
|
||||
EnvironmentItems currentEnvironment() const
|
||||
EnvironmentItems envWithoutMSVCEnglishEnforcement() const
|
||||
{
|
||||
EnvironmentItems changes = EnvironmentKitAspect::environmentChanges(m_kit);
|
||||
|
||||
if (HostOsInfo::isWindowsHost()) {
|
||||
const EnvironmentItem forceMSVCEnglishItem("VSLANG", "1033");
|
||||
if (changes.indexOf(forceMSVCEnglishItem) >= 0) {
|
||||
m_vslangCheckbox->setCheckState(Qt::Checked);
|
||||
changes.removeAll(forceMSVCEnglishItem);
|
||||
}
|
||||
}
|
||||
if (HostOsInfo::isWindowsHost())
|
||||
changes.removeAll(forceMSVCEnglishItem());
|
||||
|
||||
return sorted(std::move(changes), [](const EnvironmentItem &lhs, const EnvironmentItem &rhs)
|
||||
{ return QString::localeAwareCompare(lhs.name, rhs.name) < 0; });
|
||||
@@ -1460,13 +1468,14 @@ private:
|
||||
m_vslangCheckbox->setToolTip(Tr::tr("Either switches MSVC to English or keeps the language and "
|
||||
"just forces UTF-8 output (may vary depending on the used MSVC "
|
||||
"compiler)."));
|
||||
connect(m_vslangCheckbox, &QCheckBox::toggled, this, [this](bool checked) {
|
||||
if (enforcesMSVCEnglish(EnvironmentKitAspect::environmentChanges(m_kit)))
|
||||
m_vslangCheckbox->setChecked(true);
|
||||
connect(m_vslangCheckbox, &QCheckBox::clicked, this, [this](bool checked) {
|
||||
EnvironmentItems changes = EnvironmentKitAspect::environmentChanges(m_kit);
|
||||
const EnvironmentItem forceMSVCEnglishItem("VSLANG", "1033");
|
||||
if (!checked && changes.indexOf(forceMSVCEnglishItem) >= 0)
|
||||
changes.removeAll(forceMSVCEnglishItem);
|
||||
if (checked && changes.indexOf(forceMSVCEnglishItem) < 0)
|
||||
changes.append(forceMSVCEnglishItem);
|
||||
if (!checked && changes.indexOf(forceMSVCEnglishItem()) >= 0)
|
||||
changes.removeAll(forceMSVCEnglishItem());
|
||||
if (checked && changes.indexOf(forceMSVCEnglishItem()) < 0)
|
||||
changes.append(forceMSVCEnglishItem());
|
||||
EnvironmentKitAspect::setEnvironmentChanges(m_kit, changes);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ EventItem::EventItem(const QPointF &pos, BaseItem *parent)
|
||||
{
|
||||
m_eventNameItem = new TextItem(this);
|
||||
m_eventNameItem->setParentItem(this);
|
||||
QFont serifFont("Times", 13, QFont::Normal);
|
||||
QFont serifFont("Times", 10, QFont::Normal);
|
||||
m_eventNameItem->setFont(serifFont);
|
||||
|
||||
QString color = editorInfo("fontColor");
|
||||
@@ -49,7 +49,7 @@ OnEntryExitItem::OnEntryExitItem(BaseItem *parent)
|
||||
{
|
||||
m_eventNameItem = new TextItem(this);
|
||||
m_eventNameItem->setParentItem(this);
|
||||
QFont serifFont("Times", 13, QFont::Normal);
|
||||
QFont serifFont("Times", 10, QFont::Normal);
|
||||
m_eventNameItem->setFont(serifFont);
|
||||
m_eventNameItem->setDefaultTextColor(Qt::black);
|
||||
m_eventNameItem->setTextInteractionFlags(Qt::NoTextInteraction);
|
||||
|
||||
@@ -232,6 +232,9 @@ void StateItem::transitionsChanged()
|
||||
}
|
||||
|
||||
m_transitionRect = rectInternalTransitions;
|
||||
positionOnEntryItems();
|
||||
positionOnExitItems();
|
||||
|
||||
updateBoundingRect();
|
||||
}
|
||||
|
||||
@@ -437,8 +440,7 @@ void StateItem::updatePolygon()
|
||||
f.setPixelSize(m_titleRect.height() * 0.65);
|
||||
m_stateNameItem->setFont(f);
|
||||
|
||||
if (m_onEntryItem)
|
||||
m_onEntryItem->setPos(m_titleRect.x(), m_titleRect.bottom());
|
||||
positionOnEntryItems();
|
||||
positionOnExitItems();
|
||||
|
||||
updateTextPositions();
|
||||
@@ -552,7 +554,7 @@ void StateItem::addChild(ScxmlTag *child)
|
||||
item->setTag(child);
|
||||
item->finalizeCreation();
|
||||
item->updateAttributes();
|
||||
m_onEntryItem->setPos(m_titleRect.x(), m_titleRect.bottom());
|
||||
positionOnEntryItems();
|
||||
} else if (child->tagName() == "onexit") {
|
||||
OnEntryExitItem *item = new OnEntryExitItem(this);
|
||||
m_onExitItem = item;
|
||||
@@ -566,8 +568,18 @@ void StateItem::addChild(ScxmlTag *child)
|
||||
void StateItem::positionOnExitItems()
|
||||
{
|
||||
int offset = m_onEntryItem ? m_onEntryItem->boundingRect().height() : 0;
|
||||
if (m_onExitItem)
|
||||
m_onExitItem->setPos(m_titleRect.x(), m_titleRect.bottom() + offset);
|
||||
if (m_onExitItem) {
|
||||
auto x = m_transitionRect.isValid() ? m_transitionRect.right() : m_titleRect.x();
|
||||
m_onExitItem->setPos(x, m_titleRect.bottom() + offset);
|
||||
}
|
||||
}
|
||||
|
||||
void StateItem::positionOnEntryItems()
|
||||
{
|
||||
if (m_onEntryItem) {
|
||||
auto x = m_transitionRect.isValid() ? m_transitionRect.right() : m_titleRect.x();
|
||||
m_onEntryItem->setPos(x, m_titleRect.bottom());
|
||||
}
|
||||
}
|
||||
|
||||
QString StateItem::itemId() const
|
||||
|
||||
@@ -75,6 +75,7 @@ private:
|
||||
void checkParentBoundingRect();
|
||||
void checkWarningItems();
|
||||
void positionOnExitItems();
|
||||
void positionOnEntryItems();
|
||||
|
||||
TextItem *m_stateNameItem;
|
||||
StateWarningItem *m_stateWarningItem = nullptr;
|
||||
|
||||
Submodule src/shared/qbs updated: 2e6eb75c76...d8c97a5f0b
@@ -59,12 +59,15 @@ def main():
|
||||
type(editorWidget, "<Tab>")
|
||||
type(editorWidget, "Myname")
|
||||
result = re.search(pattern.replace("name", "Myname"), str(editorWidget.plainText))
|
||||
failMsg = ("Step 5: Seems that not all instances of variable had been renamed "
|
||||
"- Content of editor:\n%s" % editorWidget.plainText)
|
||||
if result:
|
||||
test.passes("Step 5: Verifying if: A value for a variable is inserted and all "
|
||||
"instances of the variable within the snippet are renamed.")
|
||||
elif JIRA.isBugStillOpen(29012):
|
||||
test.xfail(failMsg)
|
||||
else:
|
||||
test.fail("Step 5: Seems that not all instances of variable had been renamed "
|
||||
"- Content of editor:\n%s" % editorWidget.plainText)
|
||||
test.fail(failMsg)
|
||||
invokeMenuItem('File', 'Revert "main.cpp" to Saved')
|
||||
clickButton(waitForObject(":Revert to Saved.Proceed_QPushButton"))
|
||||
invokeMenuItem("File", "Exit")
|
||||
|
||||
Reference in New Issue
Block a user