forked from qt-creator/qt-creator
Merge "Merge remote-tracking branch 'origin/12.0'"
This commit is contained in:
@@ -77,7 +77,8 @@
|
||||
\image qtcreator-copilot.gif {Receiving suggestions from Copilot in the editor}
|
||||
|
||||
To manually request a suggestion at the current editor's cursor position,
|
||||
select \uicontrol {Request Copilot Suggestion} in the context menu.
|
||||
enter \uicontrol {t} (\uicontrol {Request Copilot Suggestion}) in the
|
||||
\l{Searching with the Locator}{locator}.
|
||||
|
||||
Hover the mouse over a suggestion to show a toolbar with
|
||||
\inlineimage icons/prev.png
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "Literals.h"
|
||||
#include "DiagnosticClient.h"
|
||||
|
||||
#include "cppassert.h"
|
||||
#include <utils/textutils.h>
|
||||
|
||||
#include <stack>
|
||||
@@ -87,6 +88,7 @@ int TranslationUnit::sourceLength() const
|
||||
|
||||
void TranslationUnit::setSource(const char *source, int size)
|
||||
{
|
||||
CPP_CHECK(source);
|
||||
_firstSourceChar = source;
|
||||
_lastSourceChar = source + size;
|
||||
}
|
||||
|
||||
@@ -533,7 +533,7 @@ Document::Ptr Document::create(const FilePath &filePath)
|
||||
void Document::setUtf8Source(const QByteArray &source)
|
||||
{
|
||||
_source = source;
|
||||
_translationUnit->setSource(_source.constBegin(), _source.size());
|
||||
_translationUnit->setSource(_source.constData(), _source.size());
|
||||
}
|
||||
|
||||
LanguageFeatures Document::languageFeatures() const
|
||||
|
||||
@@ -93,6 +93,7 @@ class AutotoolsProjectPlugin final : public ExtensionSystem::IPlugin
|
||||
|
||||
void initialize() final
|
||||
{
|
||||
ProjectManager::registerProjectType<AutotoolsProject>(Utils::Constants::MAKEFILE_MIMETYPE);
|
||||
d = std::make_unique<AutotoolsProjectPluginPrivate>();
|
||||
}
|
||||
|
||||
|
||||
@@ -233,7 +233,7 @@ CMakeBuildStep::CMakeBuildStep(BuildStepList *bsl, Id id) :
|
||||
stagingDir.setExpectedKind(PathChooser::Kind::Directory);
|
||||
|
||||
Kit *kit = buildConfiguration()->kit();
|
||||
if (CMakeBuildConfiguration::isIos(kit)) {
|
||||
if (CMakeBuildConfiguration::isIos(kit) && CMakeGeneratorKitAspect::generator(kit) == "Xcode") {
|
||||
useiOSAutomaticProvisioningUpdates.setDefaultValue(true);
|
||||
useiOSAutomaticProvisioningUpdates.setSettingsKey(
|
||||
IOS_AUTOMATIC_PROVISIONG_UPDATES_ARGUMENTS_KEY);
|
||||
|
||||
@@ -215,10 +215,17 @@ void CMakeBuildSystem::requestDebugging()
|
||||
bool CMakeBuildSystem::supportsAction(Node *context, ProjectAction action, const Node *node) const
|
||||
{
|
||||
const auto cmakeTarget = dynamic_cast<CMakeTargetNode *>(context);
|
||||
if (cmakeTarget && cmakeTarget->productType() != ProductType::Other)
|
||||
return action == ProjectAction::AddNewFile || action == ProjectAction::AddExistingFile
|
||||
|| action == ProjectAction::AddExistingDirectory || action == ProjectAction::Rename
|
||||
|| action == ProjectAction::RemoveFile;
|
||||
if (cmakeTarget) {
|
||||
const auto buildTarget = Utils::findOrDefault(m_buildTargets,
|
||||
[cmakeTarget](const CMakeBuildTarget &bt) {
|
||||
return bt.title
|
||||
== cmakeTarget->buildKey();
|
||||
});
|
||||
if (buildTarget.targetType != UtilityType)
|
||||
return action == ProjectAction::AddNewFile || action == ProjectAction::AddExistingFile
|
||||
|| action == ProjectAction::AddExistingDirectory
|
||||
|| action == ProjectAction::Rename || action == ProjectAction::RemoveFile;
|
||||
}
|
||||
|
||||
return BuildSystem::supportsAction(context, action, node);
|
||||
}
|
||||
|
||||
@@ -788,7 +788,7 @@ void CMakeGeneratorKitAspectFactory::fix(Kit *k)
|
||||
dv.fromVariant(defaultValue(k));
|
||||
setGeneratorInfo(k, dv);
|
||||
} else {
|
||||
const GeneratorInfo dv(isIos(k) ? QString("Xcode") : info.generator,
|
||||
const GeneratorInfo dv(info.generator,
|
||||
it->supportsPlatform ? info.platform : QString(),
|
||||
it->supportsToolset ? info.toolset : QString());
|
||||
setGeneratorInfo(k, dv);
|
||||
|
||||
@@ -182,8 +182,7 @@ static QVector<FolderNode::LocationInfo> extractBacktraceInformation(
|
||||
|
||||
const size_t fileIndex = static_cast<size_t>(btNode.file);
|
||||
QTC_ASSERT(fileIndex < backtraces.files.size(), break);
|
||||
const FilePath path = sourceDir.pathAppended(backtraces.files[fileIndex]).absoluteFilePath();
|
||||
|
||||
const FilePath path = sourceDir.resolvePath(backtraces.files[fileIndex]);
|
||||
if (btNode.command < 0) {
|
||||
// No command, skip: The file itself is already covered:-)
|
||||
continue;
|
||||
|
||||
@@ -518,7 +518,7 @@ void CppFileSettingsForProject::loadSettings()
|
||||
if (!entry.isValid())
|
||||
return;
|
||||
|
||||
const QVariantMap data = entry.toMap();
|
||||
const QVariantMap data = mapEntryFromStoreEntry(entry).toMap();
|
||||
m_useGlobalSettings = data.value(useGlobalKeyC, true).toBool();
|
||||
m_customSettings.headerPrefixes = data.value(headerPrefixesKeyC,
|
||||
m_customSettings.headerPrefixes).toStringList();
|
||||
@@ -574,6 +574,8 @@ public:
|
||||
m_wasGlobal(settings.useGlobalSettings())
|
||||
{
|
||||
setGlobalSettingsId(Constants::CPP_FILE_SETTINGS_ID);
|
||||
setUseGlobalSettings(settings.useGlobalSettings());
|
||||
|
||||
const auto layout = new QVBoxLayout(this);
|
||||
layout->setContentsMargins(0, 0, 0, 0);
|
||||
layout->addWidget(&m_widget);
|
||||
|
||||
@@ -1092,7 +1092,7 @@ void FakeVimPlugin::initialize()
|
||||
INSTALL_HANDLER, Context(Core::Constants::C_GLOBAL), true);
|
||||
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? Tr::tr("Meta+Shift+Y,Meta+Shift+Y")
|
||||
: Tr::tr("Alt+Y,Alt+Y")));
|
||||
connect(cmd->action(), &QAction::triggered, [this] { settings().writeSettings(); });
|
||||
connect(cmd->action(), &QAction::triggered, [] { settings().writeSettings(); });
|
||||
|
||||
ActionContainer *advancedMenu =
|
||||
ActionManager::actionContainer(Core::Constants::M_EDIT_ADVANCED);
|
||||
|
||||
@@ -525,6 +525,7 @@ static QStringList filteredFlags(const QStringList &allFlags, bool considerSysro
|
||||
filtered << a << allFlags.at(i);
|
||||
} else if (a == "-Xclang") {
|
||||
filtered << a;
|
||||
continue;
|
||||
} else if ((considerSysroot && (a == "--sysroot" || a == "-isysroot"))
|
||||
|| a == "-D" || a == "-U"
|
||||
|| a == "-gcc-toolchain" || a == "-target" || a == "-mllvm" || a == "-isystem") {
|
||||
@@ -541,6 +542,8 @@ static QStringList filteredFlags(const QStringList &allFlags, bool considerSysro
|
||||
|| a == "-nostdinc" || a == "-nostdinc++") {
|
||||
filtered << a;
|
||||
}
|
||||
if (!filtered.isEmpty() && filtered.last() == "-Xclang")
|
||||
filtered.removeLast();
|
||||
}
|
||||
return filtered;
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include <projectexplorer/devicesupport/sshparameters.h>
|
||||
|
||||
#include <remotelinux/linuxdevice.h>
|
||||
#include <remotelinux/remotelinux_constants.h>
|
||||
#include <remotelinux/remotelinuxsignaloperation.h>
|
||||
#include <remotelinux/sshdevicewizard.h>
|
||||
|
||||
@@ -72,6 +73,7 @@ public:
|
||||
sshParams.timeout = 10;
|
||||
setSshParameters(sshParams);
|
||||
setFreePorts(PortList::fromString("10000-10100"));
|
||||
setExtraData(RemoteLinux::Constants::SourceProfile, true);
|
||||
|
||||
addDeviceAction({Tr::tr("Deploy Qt libraries..."), [](const IDevice::Ptr &device, QWidget *parent) {
|
||||
QnxDeployQtLibrariesDialog dialog(device, parent);
|
||||
|
||||
@@ -295,16 +295,44 @@ void GenericProposalModel::filter(const QString &prefix)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (text.startsWith(lowerPrefix, Qt::CaseInsensitive)) {
|
||||
m_currentItems.append(item);
|
||||
item->setProposalMatch(AssistProposalItemInterface::ProposalMatch::Prefix);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (checkInfix && text.contains(lowerPrefix, Qt::CaseInsensitive)) {
|
||||
m_currentItems.append(item);
|
||||
item->setProposalMatch(AssistProposalItemInterface::ProposalMatch::Infix);
|
||||
continue;
|
||||
switch (caseSensitivity) {
|
||||
case FuzzyMatcher::CaseSensitivity::CaseInsensitive:
|
||||
if (text.startsWith(lowerPrefix, Qt::CaseInsensitive)) {
|
||||
m_currentItems.append(item);
|
||||
item->setProposalMatch(AssistProposalItemInterface::ProposalMatch::Prefix);
|
||||
continue;
|
||||
}
|
||||
if (checkInfix && text.contains(lowerPrefix, Qt::CaseInsensitive)) {
|
||||
m_currentItems.append(item);
|
||||
item->setProposalMatch(AssistProposalItemInterface::ProposalMatch::Infix);
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
case FuzzyMatcher::CaseSensitivity::CaseSensitive:
|
||||
if (checkInfix && text.contains(prefix)) {
|
||||
m_currentItems.append(item);
|
||||
item->setProposalMatch(AssistProposalItemInterface::ProposalMatch::Infix);
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
case FuzzyMatcher::CaseSensitivity::FirstLetterCaseSensitive:
|
||||
if (text.startsWith(prefix.at(0))
|
||||
&& text.mid(1).startsWith(lowerPrefix.mid(1), Qt::CaseInsensitive)) {
|
||||
m_currentItems.append(item);
|
||||
item->setProposalMatch(AssistProposalItemInterface::ProposalMatch::Prefix);
|
||||
continue;
|
||||
}
|
||||
if (checkInfix) {
|
||||
for (auto index = text.indexOf(prefix.at(0)); index >= 0;
|
||||
index = text.indexOf(prefix.at(0), index + 1)) {
|
||||
if (text.mid(index + 1).startsWith(lowerPrefix.mid(1), Qt::CaseInsensitive)) {
|
||||
m_currentItems.append(item);
|
||||
item->setProposalMatch(AssistProposalItemInterface::ProposalMatch::Infix);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// Our fuzzy matcher can become unusably slow with certain inputs, so skip it
|
||||
|
||||
Submodule src/shared/qbs updated: aa044048f0...0d589c18b5
Reference in New Issue
Block a user