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