forked from qt-creator/qt-creator
Merge "Merge remote-tracking branch 'origin/9.0' into qds/dev" into qds/dev
This commit is contained in:
@@ -433,7 +433,7 @@ QList<LookupItem> LookupContext::lookup(const Name *name, Scope *scope) const
|
||||
{
|
||||
QList<LookupItem> candidates;
|
||||
|
||||
if (! name)
|
||||
if (!name)
|
||||
return candidates;
|
||||
|
||||
for (; scope; scope = scope->enclosingScope()) {
|
||||
|
||||
@@ -415,10 +415,10 @@ Toolchains IarToolChainFactory::autoDetect(const ToolchainDetector &detector) co
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
|
||||
QStringList registryNodes;
|
||||
registryNodes << "HKEY_LOCAL_MACHINE\\SOFTWARE\\IAR Systems\\Embedded Workbench";
|
||||
#ifdef Q_OS_WIN64
|
||||
static const char kRegistryNode[] = "HKEY_LOCAL_MACHINE\\SOFTWARE\\WOW6432Node\\IAR Systems\\Embedded Workbench";
|
||||
#else
|
||||
static const char kRegistryNode[] = "HKEY_LOCAL_MACHINE\\SOFTWARE\\IAR Systems\\Embedded Workbench";
|
||||
registryNodes << "HKEY_LOCAL_MACHINE\\SOFTWARE\\WOW6432Node\\IAR Systems\\Embedded Workbench";
|
||||
#endif
|
||||
|
||||
// Dictionary for know toolchains.
|
||||
@@ -446,33 +446,35 @@ Toolchains IarToolChainFactory::autoDetect(const ToolchainDetector &detector) co
|
||||
{{"EWCR16C"}, {"/cr16c/bin/icccr16c.exe"}},
|
||||
};
|
||||
|
||||
QSettings registry(kRegistryNode, QSettings::NativeFormat);
|
||||
const auto oneLevelGroups = registry.childGroups();
|
||||
for (const QString &oneLevelKey : oneLevelGroups) {
|
||||
registry.beginGroup(oneLevelKey);
|
||||
const auto twoLevelGroups = registry.childGroups();
|
||||
for (const Entry &entry : knowToolchains) {
|
||||
if (twoLevelGroups.contains(entry.registryKey)) {
|
||||
registry.beginGroup(entry.registryKey);
|
||||
const auto threeLevelGroups = registry.childGroups();
|
||||
for (const QString &threeLevelKey : threeLevelGroups) {
|
||||
registry.beginGroup(threeLevelKey);
|
||||
QString compilerPath = registry.value("InstallPath").toString();
|
||||
if (!compilerPath.isEmpty()) {
|
||||
// Build full compiler path.
|
||||
compilerPath += entry.subExePath;
|
||||
const FilePath fn = FilePath::fromString(compilerPath);
|
||||
if (compilerExists(fn)) {
|
||||
// Note: threeLevelKey is a guessed toolchain version.
|
||||
candidates.push_back({fn, threeLevelKey});
|
||||
for (const QString ®istryNode : registryNodes) {
|
||||
QSettings registry(registryNode, QSettings::NativeFormat);
|
||||
const auto oneLevelGroups = registry.childGroups();
|
||||
for (const QString &oneLevelKey : oneLevelGroups) {
|
||||
registry.beginGroup(oneLevelKey);
|
||||
const auto twoLevelGroups = registry.childGroups();
|
||||
for (const Entry &entry : knowToolchains) {
|
||||
if (twoLevelGroups.contains(entry.registryKey)) {
|
||||
registry.beginGroup(entry.registryKey);
|
||||
const auto threeLevelGroups = registry.childGroups();
|
||||
for (const QString &threeLevelKey : threeLevelGroups) {
|
||||
registry.beginGroup(threeLevelKey);
|
||||
QString compilerPath = registry.value("InstallPath").toString();
|
||||
if (!compilerPath.isEmpty()) {
|
||||
// Build full compiler path.
|
||||
compilerPath += entry.subExePath;
|
||||
const FilePath fn = FilePath::fromString(compilerPath);
|
||||
if (compilerExists(fn)) {
|
||||
// Note: threeLevelKey is a guessed toolchain version.
|
||||
candidates.push_back({fn, threeLevelKey});
|
||||
}
|
||||
}
|
||||
registry.endGroup();
|
||||
}
|
||||
registry.endGroup();
|
||||
}
|
||||
registry.endGroup();
|
||||
}
|
||||
registry.endGroup();
|
||||
}
|
||||
registry.endGroup();
|
||||
}
|
||||
|
||||
#endif // Q_OS_WIN
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <utils/layoutbuilder.h>
|
||||
#include <utils/pathchooser.h>
|
||||
|
||||
#include <QButtonGroup>
|
||||
#include <QComboBox>
|
||||
#include <QGroupBox>
|
||||
#include <QLabel>
|
||||
@@ -47,8 +48,10 @@ ClangFormatOptionsPageWidget::ClangFormatOptionsPageWidget(ClangFormatSettings *
|
||||
auto options = new QGroupBox(tr("Options"));
|
||||
options->setEnabled(false);
|
||||
|
||||
auto styleButtonGroup = new QButtonGroup(this);
|
||||
|
||||
auto useCustomizedStyle = new QRadioButton(tr("Use customized style:"));
|
||||
useCustomizedStyle->setAutoExclusive(true);
|
||||
styleButtonGroup->addButton(useCustomizedStyle);
|
||||
|
||||
m_configurations = new ConfigurationPanel;
|
||||
m_configurations->setSettings(m_settings);
|
||||
@@ -57,7 +60,7 @@ ClangFormatOptionsPageWidget::ClangFormatOptionsPageWidget(ClangFormatSettings *
|
||||
m_usePredefinedStyle = new QRadioButton(tr("Use predefined style:"));
|
||||
|
||||
m_usePredefinedStyle->setChecked(true);
|
||||
m_usePredefinedStyle->setAutoExclusive(true);
|
||||
styleButtonGroup->addButton(m_usePredefinedStyle);
|
||||
|
||||
m_predefinedStyle = new QComboBox;
|
||||
m_predefinedStyle->addItems(m_settings->predefinedStyles());
|
||||
|
||||
@@ -394,7 +394,12 @@ ClangdClient::ClangdClient(Project *project, const Utils::FilePath &jsonDbDir)
|
||||
project ? tr("Indexing %1 with clangd").arg(project->displayName())
|
||||
: tr("Indexing session with clangd"));
|
||||
setClickHandlerForToken(indexingToken(), [] {
|
||||
ICore::showOptionsDialog(CppEditor::Constants::CPP_CLANGD_SETTINGS_ID);
|
||||
// don't directly open modal dialog from click handler, because that would mess
|
||||
// up the stack
|
||||
QMetaObject::invokeMethod(
|
||||
ICore::instance(),
|
||||
[] { ICore::showOptionsDialog(CppEditor::Constants::CPP_CLANGD_SETTINGS_ID); },
|
||||
Qt::QueuedConnection);
|
||||
});
|
||||
setCurrentProject(project);
|
||||
setDocumentChangeUpdateThreshold(d->settings.documentUpdateThreshold);
|
||||
|
||||
@@ -55,7 +55,6 @@ SaveItemsDialog::SaveItemsDialog(QWidget *parent, const QList<IDocument *> &item
|
||||
}
|
||||
m_buttonBox->setStandardButtons(QDialogButtonBox::Cancel | QDialogButtonBox::Save);
|
||||
QPushButton *discardButton = m_buttonBox->addButton(tr("Do &Not Save"), discardButtonRole);
|
||||
m_buttonBox->button(QDialogButtonBox::Save)->setDefault(true);
|
||||
m_treeWidget->setFocus();
|
||||
|
||||
m_saveBeforeBuildCheckBox->setVisible(false);
|
||||
@@ -103,6 +102,8 @@ SaveItemsDialog::SaveItemsDialog(QWidget *parent, const QList<IDocument *> &item
|
||||
&SaveItemsDialog::collectItemsToSave);
|
||||
connect(discardButton, &QAbstractButton::clicked, this, &SaveItemsDialog::discardAll);
|
||||
connect(m_treeWidget, &QTreeWidget::itemSelectionChanged, this, &SaveItemsDialog::updateButtons);
|
||||
|
||||
m_buttonBox->button(QDialogButtonBox::Save)->setDefault(true);
|
||||
}
|
||||
|
||||
void SaveItemsDialog::setMessage(const QString &msg)
|
||||
|
||||
@@ -253,11 +253,6 @@ void CppCodeStylePreferencesWidget::slotCodeStyleSettingsChanged()
|
||||
if (m_blockUpdates)
|
||||
return;
|
||||
|
||||
if (m_preferences) {
|
||||
auto current = qobject_cast<CppCodeStylePreferences *>(m_preferences->currentPreferences());
|
||||
if (current)
|
||||
current->setCodeStyleSettings(cppCodeStyleSettings());
|
||||
}
|
||||
emit codeStyleSettingsChanged(cppCodeStyleSettings());
|
||||
updatePreview();
|
||||
}
|
||||
@@ -267,12 +262,6 @@ void CppCodeStylePreferencesWidget::slotTabSettingsChanged(const TabSettings &se
|
||||
if (m_blockUpdates)
|
||||
return;
|
||||
|
||||
if (m_preferences) {
|
||||
auto current = qobject_cast<CppCodeStylePreferences *>(m_preferences->currentPreferences());
|
||||
if (current)
|
||||
current->setTabSettings(settings);
|
||||
}
|
||||
|
||||
emit tabSettingsChanged(settings);
|
||||
updatePreview();
|
||||
}
|
||||
@@ -355,6 +344,14 @@ void CppCodeStylePreferencesWidget::addTab(CppCodeStyleWidget *page, QString tab
|
||||
|
||||
void CppCodeStylePreferencesWidget::apply()
|
||||
{
|
||||
if (m_preferences) {
|
||||
auto current = qobject_cast<CppCodeStylePreferences *>(m_preferences->currentPreferences());
|
||||
if (current) {
|
||||
current->setTabSettings(tabSettings());
|
||||
current->setCodeStyleSettings(cppCodeStyleSettings());
|
||||
}
|
||||
}
|
||||
|
||||
emit applyEmitted();
|
||||
}
|
||||
|
||||
|
||||
@@ -94,8 +94,7 @@ public:
|
||||
// CppDeclarableElement
|
||||
CppDeclarableElement::CppDeclarableElement(Symbol *declaration)
|
||||
: CppElement()
|
||||
, declaration(declaration)
|
||||
, icon(Icons::iconForSymbol(declaration))
|
||||
, iconType(Icons::iconTypeForSymbol(declaration))
|
||||
{
|
||||
Overview overview;
|
||||
overview.showArgumentNames = true;
|
||||
@@ -135,11 +134,6 @@ CppClass::CppClass(Symbol *declaration) : CppDeclarableElement(declaration)
|
||||
tooltip = qualifiedName;
|
||||
}
|
||||
|
||||
bool CppClass::operator==(const CppClass &other)
|
||||
{
|
||||
return this->declaration == other.declaration;
|
||||
}
|
||||
|
||||
CppClass *CppClass::toCppClass()
|
||||
{
|
||||
return this;
|
||||
@@ -148,32 +142,30 @@ CppClass *CppClass::toCppClass()
|
||||
void CppClass::lookupBases(QFutureInterfaceBase &futureInterface,
|
||||
Symbol *declaration, const LookupContext &context)
|
||||
{
|
||||
using Data = QPair<ClassOrNamespace*, CppClass*>;
|
||||
ClassOrNamespace *hierarchy = context.lookupType(declaration);
|
||||
if (!hierarchy)
|
||||
return;
|
||||
QSet<ClassOrNamespace *> visited;
|
||||
addBaseHierarchy(futureInterface, context, hierarchy, &visited);
|
||||
}
|
||||
|
||||
if (ClassOrNamespace *clazz = context.lookupType(declaration)) {
|
||||
QSet<ClassOrNamespace *> visited;
|
||||
|
||||
QQueue<Data> q;
|
||||
q.enqueue({clazz, this});
|
||||
while (!q.isEmpty()) {
|
||||
if (futureInterface.isCanceled())
|
||||
return;
|
||||
Data current = q.dequeue();
|
||||
clazz = current.first;
|
||||
visited.insert(clazz);
|
||||
const QList<ClassOrNamespace *> &bases = clazz->usings();
|
||||
for (ClassOrNamespace *baseClass : bases) {
|
||||
const QList<Symbol *> &symbols = baseClass->symbols();
|
||||
for (Symbol *symbol : symbols) {
|
||||
if (symbol->asClass() && (
|
||||
clazz = context.lookupType(symbol)) &&
|
||||
!visited.contains(clazz)) {
|
||||
CppClass baseCppClass(symbol);
|
||||
CppClass *cppClass = current.second;
|
||||
cppClass->bases.append(baseCppClass);
|
||||
q.enqueue({clazz, &cppClass->bases.last()});
|
||||
}
|
||||
}
|
||||
void CppClass::addBaseHierarchy(QFutureInterfaceBase &futureInterface, const LookupContext &context,
|
||||
ClassOrNamespace *hierarchy, QSet<ClassOrNamespace *> *visited)
|
||||
{
|
||||
if (futureInterface.isCanceled())
|
||||
return;
|
||||
visited->insert(hierarchy);
|
||||
const QList<ClassOrNamespace *> &baseClasses = hierarchy->usings();
|
||||
for (ClassOrNamespace *baseClass : baseClasses) {
|
||||
const QList<Symbol *> &symbols = baseClass->symbols();
|
||||
for (Symbol *symbol : symbols) {
|
||||
if (!symbol->asClass())
|
||||
continue;
|
||||
ClassOrNamespace *baseHierarchy = context.lookupType(symbol);
|
||||
if (baseHierarchy && !visited->contains(baseHierarchy)) {
|
||||
CppClass classSymbol(symbol);
|
||||
classSymbol.addBaseHierarchy(futureInterface, context, baseHierarchy, visited);
|
||||
bases.append(classSymbol);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -182,27 +174,20 @@ void CppClass::lookupBases(QFutureInterfaceBase &futureInterface,
|
||||
void CppClass::lookupDerived(QFutureInterfaceBase &futureInterface,
|
||||
Symbol *declaration, const Snapshot &snapshot)
|
||||
{
|
||||
using Data = QPair<CppClass*, TypeHierarchy>;
|
||||
|
||||
snapshot.updateDependencyTable(futureInterface);
|
||||
if (futureInterface.isCanceled())
|
||||
return;
|
||||
const TypeHierarchy &completeHierarchy
|
||||
= TypeHierarchyBuilder::buildDerivedTypeHierarchy(futureInterface, declaration, snapshot);
|
||||
addDerivedHierarchy(TypeHierarchyBuilder::buildDerivedTypeHierarchy(
|
||||
futureInterface, declaration, snapshot));
|
||||
}
|
||||
|
||||
QQueue<Data> q;
|
||||
q.enqueue({this, completeHierarchy});
|
||||
while (!q.isEmpty()) {
|
||||
if (futureInterface.isCanceled())
|
||||
return;
|
||||
const Data ¤t = q.dequeue();
|
||||
CppClass *clazz = current.first;
|
||||
const TypeHierarchy &classHierarchy = current.second;
|
||||
const QList<TypeHierarchy> hierarchy = classHierarchy.hierarchy();
|
||||
for (const TypeHierarchy &derivedHierarchy : hierarchy) {
|
||||
clazz->derived.append(CppClass(derivedHierarchy.symbol()));
|
||||
q.enqueue({&clazz->derived.last(), derivedHierarchy});
|
||||
}
|
||||
void CppClass::addDerivedHierarchy(const TypeHierarchy &hierarchy)
|
||||
{
|
||||
const QList<TypeHierarchy> derivedHierarchies = hierarchy.hierarchy();
|
||||
for (const TypeHierarchy &derivedHierarchy : derivedHierarchies) {
|
||||
CppClass classSymbol(derivedHierarchy.symbol());
|
||||
classSymbol.addDerivedHierarchy(derivedHierarchy);
|
||||
derived.append(classSymbol);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,13 +3,14 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <coreplugin/helpitem.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
#include "typehierarchybuilder.h"
|
||||
|
||||
#include <coreplugin/helpitem.h>
|
||||
#include <cplusplus/CppDocument.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
#include <utils/utilsicons.h>
|
||||
|
||||
#include <QFuture>
|
||||
#include <QIcon>
|
||||
#include <QSharedPointer>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
@@ -18,6 +19,7 @@
|
||||
#include <functional>
|
||||
|
||||
namespace CPlusPlus {
|
||||
class ClassOrNamespace;
|
||||
class LookupItem;
|
||||
class LookupContext;
|
||||
}
|
||||
@@ -76,11 +78,10 @@ public:
|
||||
explicit CppDeclarableElement(CPlusPlus::Symbol *declaration);
|
||||
|
||||
public:
|
||||
CPlusPlus::Symbol *declaration;
|
||||
Utils::CodeModelIcon::Type iconType;
|
||||
QString name;
|
||||
QString qualifiedName;
|
||||
QString type;
|
||||
QIcon icon;
|
||||
};
|
||||
|
||||
class CppClass : public CppDeclarableElement
|
||||
@@ -89,8 +90,6 @@ public:
|
||||
CppClass();
|
||||
explicit CppClass(CPlusPlus::Symbol *declaration);
|
||||
|
||||
bool operator==(const CppClass &other);
|
||||
|
||||
CppClass *toCppClass() final;
|
||||
|
||||
void lookupBases(QFutureInterfaceBase &futureInterface,
|
||||
@@ -98,9 +97,15 @@ public:
|
||||
void lookupDerived(QFutureInterfaceBase &futureInterface,
|
||||
CPlusPlus::Symbol *declaration, const CPlusPlus::Snapshot &snapshot);
|
||||
|
||||
public:
|
||||
QList<CppClass> bases;
|
||||
QList<CppClass> derived;
|
||||
|
||||
private:
|
||||
void addBaseHierarchy(QFutureInterfaceBase &futureInterface,
|
||||
const CPlusPlus::LookupContext &context,
|
||||
CPlusPlus::ClassOrNamespace *hierarchy,
|
||||
QSet<CPlusPlus::ClassOrNamespace *> *visited);
|
||||
void addDerivedHierarchy(const TypeHierarchy &hierarchy);
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
@@ -4310,6 +4310,8 @@ void GenerateGetterSetter::match(const CppQuickFixInterface &interface, QuickFix
|
||||
return;
|
||||
declarator = path.at(n - i++)->asDeclarator();
|
||||
}
|
||||
if (!declarator)
|
||||
return;
|
||||
}
|
||||
const auto variableDecl = path.at(n - i++)->asSimpleDeclaration();
|
||||
const auto classSpecifier = path.at(n - i++)->asClassSpecifier();
|
||||
|
||||
@@ -44,7 +44,7 @@ QStandardItem *itemForClass(const CppClass &cppClass)
|
||||
item->setData(cppClass.name, Qt::DisplayRole);
|
||||
if (cppClass.name != cppClass.qualifiedName)
|
||||
item->setData(cppClass.qualifiedName, AnnotationRole);
|
||||
item->setData(cppClass.icon, Qt::DecorationRole);
|
||||
item->setData(iconForType(cppClass.iconType), Qt::DecorationRole);
|
||||
QVariant link;
|
||||
link.setValue(Link(cppClass.link));
|
||||
item->setData(link, LinkRole);
|
||||
|
||||
@@ -111,10 +111,12 @@ void McuSdkRepository::expandVariablesAndWildcards()
|
||||
continue;
|
||||
}
|
||||
// drop empty_split_entry(linux)|root(windows)
|
||||
pathComponents.pop_front();
|
||||
QString root = pathComponents.takeFirst();
|
||||
if (root.isEmpty()) // Linux
|
||||
root = "/";
|
||||
|
||||
package->setPath(
|
||||
expandWildcards(FilePath::fromString(QDir::rootPath()),
|
||||
expandWildcards(FilePath::fromString(root),
|
||||
{pathComponents.constBegin(), pathComponents.constEnd()})
|
||||
.first);
|
||||
}
|
||||
|
||||
@@ -2098,7 +2098,9 @@ std::optional<QString> MsvcToolChain::generateEnvironmentSettings(const Utils::E
|
||||
saver.write("set CLINK_NOAUTORUN=1\r\n");
|
||||
saver.write("setlocal enableextensions\r\n");
|
||||
saver.write("if defined VCINSTALLDIR (\r\n");
|
||||
saver.write(" call \"%VCINSTALLDIR%/Auxiliary/Build/vcvarsall.bat\" /clean_env\r\n");
|
||||
saver.write(" if not defined QTC_NO_MSVC_CLEAN_ENV (\r\n");
|
||||
saver.write(" call \"%VCINSTALLDIR%/Auxiliary/Build/vcvarsall.bat\" /clean_env\r\n");
|
||||
saver.write(" )\r\n");
|
||||
saver.write(")\r\n");
|
||||
saver.write(call + "\r\n");
|
||||
saver.write("@echo " + marker.toLocal8Bit() + "\r\n");
|
||||
|
||||
@@ -1320,7 +1320,11 @@ void SimpleTargetRunnerPrivate::stop()
|
||||
switch (m_state) {
|
||||
case Run:
|
||||
m_process.stop();
|
||||
m_process.waitForFinished();
|
||||
if (!m_process.waitForFinished(2000)) { // TODO: it may freeze on some devices
|
||||
QTC_CHECK(false); // Shouldn't happen, just emergency handling
|
||||
m_process.close();
|
||||
forwardDone();
|
||||
}
|
||||
break;
|
||||
case Inactive:
|
||||
break;
|
||||
|
||||
@@ -192,6 +192,8 @@ public:
|
||||
}
|
||||
}
|
||||
m_addButton->setMenu(addMenu);
|
||||
if (HostOsInfo::isMacHost())
|
||||
m_addButton->setStyleSheet("text-align:center;");
|
||||
|
||||
m_cloneButton = new QPushButton(ToolChainOptionsPage::tr("Clone"), this);
|
||||
connect(m_cloneButton, &QAbstractButton::clicked, [this] { cloneToolChain(); });
|
||||
|
||||
@@ -295,20 +295,17 @@ QString PluginGenerator::processTemplate(const QString &tmpl,
|
||||
{
|
||||
Utils::FileReader reader;
|
||||
if (!reader.fetch(Utils::FilePath::fromString(tmpl), errorMessage))
|
||||
return QString();
|
||||
|
||||
return {};
|
||||
|
||||
QString cont = QString::fromUtf8(reader.data());
|
||||
|
||||
// Expander needed to handle extra variable "Cpp:PragmaOnce"
|
||||
Utils::MacroExpander *expander = Utils::globalMacroExpander();
|
||||
QString errMsg;
|
||||
cont = Utils::TemplateEngine::processText(expander, cont, &errMsg);
|
||||
if (!errMsg.isEmpty()) {
|
||||
cont = Utils::TemplateEngine::processText(expander, cont, errorMessage);
|
||||
if (!errorMessage->isEmpty()) {
|
||||
qWarning("Error processing custom plugin file: %s\nFile:\n%s",
|
||||
qPrintable(errMsg), qPrintable(cont));
|
||||
errorMessage = &errMsg;
|
||||
return QString();
|
||||
qPrintable(*errorMessage), qPrintable(cont));
|
||||
return {};
|
||||
}
|
||||
|
||||
const QChar atChar = QLatin1Char('@');
|
||||
|
||||
@@ -490,8 +490,10 @@ bool SshProcessInterface::runInShell(const CommandLine &command, const QByteArra
|
||||
process.setCommand(cmd);
|
||||
process.setWriteData(data);
|
||||
process.start();
|
||||
QTC_CHECK(process.waitForFinished()); // otherwise we may start producing killers for killers
|
||||
return process.exitCode() == 0;
|
||||
bool isFinished = process.waitForFinished(2000); // TODO: it may freeze on some devices
|
||||
// otherwise we may start producing killers for killers
|
||||
QTC_CHECK(isFinished);
|
||||
return isFinished;
|
||||
}
|
||||
|
||||
void SshProcessInterface::start()
|
||||
|
||||
@@ -1021,7 +1021,7 @@ Utils::Links SquishTools::setBreakpoints()
|
||||
continue;
|
||||
const Utils::FilePath filePath = Utils::FilePath::fromString(
|
||||
gb->data(BreakpointFileColumn, Qt::DisplayRole).toString());
|
||||
auto fileName = filePath.toUserOutput();
|
||||
auto fileName = filePath.canonicalPath().toUserOutput();
|
||||
if (fileName.isEmpty())
|
||||
continue;
|
||||
if (!fileName.endsWith(extension))
|
||||
|
||||
@@ -2696,7 +2696,8 @@ void TextEditorWidget::keyPressEvent(QKeyEvent *e)
|
||||
}
|
||||
break;
|
||||
case Qt::Key_Delete:
|
||||
if (hasMultipleCursors && !ro && e->modifiers() == Qt::NoModifier) {
|
||||
if (hasMultipleCursors && !ro
|
||||
&& (e->modifiers() == Qt::NoModifier || e->modifiers() == Qt::KeypadModifier)) {
|
||||
if (cursor.hasSelection()) {
|
||||
cursor.removeSelectedText();
|
||||
} else {
|
||||
@@ -7848,7 +7849,7 @@ struct MappedText
|
||||
|
||||
void TextEditorWidget::insertFromMimeData(const QMimeData *source)
|
||||
{
|
||||
if (isReadOnly())
|
||||
if (!source || isReadOnly())
|
||||
return;
|
||||
|
||||
QString text = source->text();
|
||||
@@ -7858,7 +7859,6 @@ void TextEditorWidget::insertFromMimeData(const QMimeData *source)
|
||||
if (d->m_codeAssistant.hasContext())
|
||||
d->m_codeAssistant.destroyContext();
|
||||
|
||||
|
||||
if (d->m_snippetOverlay->isVisible() && (text.contains('\n') || text.contains('\t')))
|
||||
d->m_snippetOverlay->accept();
|
||||
|
||||
|
||||
@@ -437,7 +437,7 @@ void VcsBaseClient::revertAll(const FilePath &workingDir,
|
||||
if (cmd->result() == ProcessResult::FinishedWithSuccess)
|
||||
emit changed(files);
|
||||
}, Qt::QueuedConnection);
|
||||
enqueueJob(createCommand(workingDir), args);
|
||||
enqueueJob(cmd, args);
|
||||
}
|
||||
|
||||
void VcsBaseClient::status(const FilePath &workingDir,
|
||||
|
||||
Reference in New Issue
Block a user