forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/12.0'
Change-Id: I70bcac4195095a7646dcdc31532d8f61b643d869
This commit is contained in:
@@ -391,10 +391,13 @@ QString TerminalView::textFromSelection() const
|
||||
if (!d->m_selection)
|
||||
return {};
|
||||
|
||||
if (d->m_selection->start == d->m_selection->end)
|
||||
return {};
|
||||
|
||||
CellIterator it = d->m_surface->iteratorAt(d->m_selection->start);
|
||||
CellIterator end = d->m_surface->iteratorAt(d->m_selection->end);
|
||||
|
||||
if (it.position() >= end.position()) {
|
||||
if (it.position() > end.position()) {
|
||||
qCWarning(selectionLog) << "Invalid selection: start >= end";
|
||||
return {};
|
||||
}
|
||||
@@ -1075,7 +1078,7 @@ void TerminalView::mousePressEvent(QMouseEvent *event)
|
||||
}
|
||||
|
||||
if (event->button() == Qt::LeftButton) {
|
||||
if (std::chrono::system_clock::now() - d->m_lastDoubleClick < 500ms) {
|
||||
if (d->m_selection && std::chrono::system_clock::now() - d->m_lastDoubleClick < 500ms) {
|
||||
d->m_selectLineMode = true;
|
||||
const Selection newSelection{d->m_surface->gridToPos(
|
||||
{0,
|
||||
|
||||
@@ -127,10 +127,8 @@ void AndroidPlugin::kitsRestored()
|
||||
return v->targetDeviceTypes().contains(Android::Constants::ANDROID_DEVICE_TYPE);
|
||||
}).isEmpty();
|
||||
|
||||
if (!AndroidConfigurations::currentConfig().sdkFullyConfigured() && qtForAndroidInstalled) {
|
||||
connect(Core::ICore::instance(), &Core::ICore::coreOpened, this,
|
||||
&AndroidPlugin::askUserAboutAndroidSetup, Qt::QueuedConnection);
|
||||
}
|
||||
if (!AndroidConfigurations::currentConfig().sdkFullyConfigured() && qtForAndroidInstalled)
|
||||
askUserAboutAndroidSetup();
|
||||
|
||||
AndroidConfigurations::registerNewToolchains();
|
||||
AndroidConfigurations::updateAutomaticKitList();
|
||||
|
||||
@@ -214,7 +214,8 @@ void CMakeBuildSystem::requestDebugging()
|
||||
|
||||
bool CMakeBuildSystem::supportsAction(Node *context, ProjectAction action, const Node *node) const
|
||||
{
|
||||
if (dynamic_cast<CMakeTargetNode *>(context))
|
||||
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;
|
||||
|
||||
@@ -795,10 +795,24 @@ ListModel *SectionedGridView::addSection(const Section §ion, const QList<Lis
|
||||
vbox->insertWidget(position, sectionLabel);
|
||||
vbox->insertWidget(position + 1, gridView);
|
||||
|
||||
struct ItemHash
|
||||
{
|
||||
std::size_t operator()(ListItem *item) const { return std::hash<QString>{}(item->name); }
|
||||
};
|
||||
struct ItemEqual
|
||||
{
|
||||
bool operator()(ListItem *lhs, ListItem *rhs) const
|
||||
{
|
||||
return lhs->name == rhs->name && lhs->description == rhs->description;
|
||||
}
|
||||
};
|
||||
|
||||
// add the items also to the all products model to be able to search correctly
|
||||
const QSet<ListItem *> allItems = toSet(m_allItemsModel->items());
|
||||
const QList<ListItem *> newItems = filtered(items, [&allItems](ListItem *item) {
|
||||
return !allItems.contains(item);
|
||||
const QList<ListItem *> allItems = m_allItemsModel->items();
|
||||
const std::unordered_set<ListItem *, ItemHash, ItemEqual> uniqueItems{allItems.constBegin(),
|
||||
allItems.constEnd()};
|
||||
const QList<ListItem *> newItems = filtered(items, [&uniqueItems](ListItem *item) {
|
||||
return uniqueItems.find(item) == uniqueItems.end();
|
||||
});
|
||||
m_allItemsModel->appendItems(newItems);
|
||||
|
||||
|
||||
@@ -4408,6 +4408,13 @@ void GdbEngine::setupInferior()
|
||||
if (rp.breakOnMain)
|
||||
runCommand({"tbreak " + mainFunction()});
|
||||
|
||||
if (!rp.solibSearchPath.isEmpty()) {
|
||||
DebuggerCommand cmd("appendSolibSearchPath");
|
||||
cmd.arg("path", transform(rp.solibSearchPath, &FilePath::path));
|
||||
cmd.arg("separator", HostOsInfo::pathListSeparator());
|
||||
runCommand(cmd);
|
||||
}
|
||||
|
||||
if (rp.startMode == AttachToRemoteProcess) {
|
||||
|
||||
handleInferiorPrepared();
|
||||
@@ -4430,13 +4437,6 @@ void GdbEngine::setupInferior()
|
||||
|
||||
// if (!remoteArch.isEmpty())
|
||||
// postCommand("set architecture " + remoteArch);
|
||||
if (!rp.solibSearchPath.isEmpty()) {
|
||||
DebuggerCommand cmd("appendSolibSearchPath");
|
||||
for (const FilePath &filePath : rp.solibSearchPath)
|
||||
cmd.arg("path", filePath.path());
|
||||
cmd.arg("separator", HostOsInfo::pathListSeparator());
|
||||
runCommand(cmd);
|
||||
}
|
||||
|
||||
if (!args.isEmpty())
|
||||
runCommand({"-exec-arguments " + args});
|
||||
|
||||
@@ -363,7 +363,8 @@ void ExamplesViewController::updateExamples()
|
||||
|
||||
const QStringList sources = m_exampleSetModel->exampleSources(&examplesInstallPath,
|
||||
&demosInstallPath,
|
||||
&qtVersion);
|
||||
&qtVersion,
|
||||
m_isExamples);
|
||||
QStringList categoryOrder;
|
||||
QList<ExampleItem *> items;
|
||||
for (const QString &exampleSource : sources) {
|
||||
@@ -493,12 +494,15 @@ QtVersion *ExampleSetModel::findHighestQtVersion(const QtVersions &versions) con
|
||||
|
||||
QStringList ExampleSetModel::exampleSources(QString *examplesInstallPath,
|
||||
QString *demosInstallPath,
|
||||
QVersionNumber *qtVersion)
|
||||
QVersionNumber *qtVersion,
|
||||
bool isExamples)
|
||||
{
|
||||
QStringList sources;
|
||||
|
||||
// Qt Creator shipped tutorials
|
||||
sources << ":/qtsupport/qtcreator_tutorials.xml";
|
||||
if (!isExamples) {
|
||||
// Qt Creator shipped tutorials
|
||||
sources << ":/qtsupport/qtcreator_tutorials.xml";
|
||||
}
|
||||
|
||||
QString examplesPath;
|
||||
QString demosPath;
|
||||
|
||||
@@ -41,7 +41,8 @@ public:
|
||||
bool selectExampleSet(int index);
|
||||
QStringList exampleSources(QString *examplesInstallPath,
|
||||
QString *demosInstallPath,
|
||||
QVersionNumber *qtVersion);
|
||||
QVersionNumber *qtVersion,
|
||||
bool isExamples);
|
||||
bool selectedQtSupports(const Utils::Id &target) const;
|
||||
|
||||
signals:
|
||||
|
||||
@@ -32,10 +32,11 @@ macro(qtc_auto_setup_compiler_standard toolchainFile)
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
||||
foreach(osx_var CMAKE_SYSROOT CMAKE_OSX_SYSROOT CMAKE_OSX_ARCHITECTURES)
|
||||
if (${osx_var})
|
||||
# Forward important CMake variables to the package manager in the toolchain file
|
||||
foreach(fwd_var CMAKE_MSVC_RUNTIME_LIBRARY CMAKE_SYSROOT CMAKE_OSX_SYSROOT CMAKE_OSX_ARCHITECTURES)
|
||||
if (${fwd_var})
|
||||
file(APPEND "${toolchainFile}"
|
||||
"set(${osx_var} ${${osx_var}})\n")
|
||||
"set(${fwd_var} ${${fwd_var}})\n")
|
||||
endif()
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
@@ -210,7 +210,8 @@ def __getExpectedCompilers__():
|
||||
for c in ('clang++', 'clang', 'afl-clang',
|
||||
'clang-[0-9]', 'clang-[0-9].[0-9]', 'clang-1[0-9]', 'clang-1[0-9].[0-9]',
|
||||
'*g++*', '*gcc*'):
|
||||
compilers.extend(findAllFilesInPATH(c))
|
||||
filesInPath = set(findAllFilesInPATH(c))
|
||||
compilers.extend(filesInPath | set(map(os.path.realpath, filesInPath)))
|
||||
if platform.system() == 'Darwin':
|
||||
for compilerExe in ('clang++', 'clang'):
|
||||
xcodeClang = getOutputFromCmdline(["xcrun", "--find", compilerExe]).strip("\n")
|
||||
|
||||
Reference in New Issue
Block a user