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)
|
if (!d->m_selection)
|
||||||
return {};
|
return {};
|
||||||
|
|
||||||
|
if (d->m_selection->start == d->m_selection->end)
|
||||||
|
return {};
|
||||||
|
|
||||||
CellIterator it = d->m_surface->iteratorAt(d->m_selection->start);
|
CellIterator it = d->m_surface->iteratorAt(d->m_selection->start);
|
||||||
CellIterator end = d->m_surface->iteratorAt(d->m_selection->end);
|
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";
|
qCWarning(selectionLog) << "Invalid selection: start >= end";
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
@@ -1075,7 +1078,7 @@ void TerminalView::mousePressEvent(QMouseEvent *event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (event->button() == Qt::LeftButton) {
|
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;
|
d->m_selectLineMode = true;
|
||||||
const Selection newSelection{d->m_surface->gridToPos(
|
const Selection newSelection{d->m_surface->gridToPos(
|
||||||
{0,
|
{0,
|
||||||
|
|||||||
@@ -127,10 +127,8 @@ void AndroidPlugin::kitsRestored()
|
|||||||
return v->targetDeviceTypes().contains(Android::Constants::ANDROID_DEVICE_TYPE);
|
return v->targetDeviceTypes().contains(Android::Constants::ANDROID_DEVICE_TYPE);
|
||||||
}).isEmpty();
|
}).isEmpty();
|
||||||
|
|
||||||
if (!AndroidConfigurations::currentConfig().sdkFullyConfigured() && qtForAndroidInstalled) {
|
if (!AndroidConfigurations::currentConfig().sdkFullyConfigured() && qtForAndroidInstalled)
|
||||||
connect(Core::ICore::instance(), &Core::ICore::coreOpened, this,
|
askUserAboutAndroidSetup();
|
||||||
&AndroidPlugin::askUserAboutAndroidSetup, Qt::QueuedConnection);
|
|
||||||
}
|
|
||||||
|
|
||||||
AndroidConfigurations::registerNewToolchains();
|
AndroidConfigurations::registerNewToolchains();
|
||||||
AndroidConfigurations::updateAutomaticKitList();
|
AndroidConfigurations::updateAutomaticKitList();
|
||||||
|
|||||||
@@ -214,7 +214,8 @@ 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
|
||||||
{
|
{
|
||||||
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
|
return action == ProjectAction::AddNewFile || action == ProjectAction::AddExistingFile
|
||||||
|| action == ProjectAction::AddExistingDirectory || action == ProjectAction::Rename
|
|| action == ProjectAction::AddExistingDirectory || action == ProjectAction::Rename
|
||||||
|| action == ProjectAction::RemoveFile;
|
|| action == ProjectAction::RemoveFile;
|
||||||
|
|||||||
@@ -795,10 +795,24 @@ ListModel *SectionedGridView::addSection(const Section §ion, const QList<Lis
|
|||||||
vbox->insertWidget(position, sectionLabel);
|
vbox->insertWidget(position, sectionLabel);
|
||||||
vbox->insertWidget(position + 1, gridView);
|
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
|
// 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 *> allItems = m_allItemsModel->items();
|
||||||
const QList<ListItem *> newItems = filtered(items, [&allItems](ListItem *item) {
|
const std::unordered_set<ListItem *, ItemHash, ItemEqual> uniqueItems{allItems.constBegin(),
|
||||||
return !allItems.contains(item);
|
allItems.constEnd()};
|
||||||
|
const QList<ListItem *> newItems = filtered(items, [&uniqueItems](ListItem *item) {
|
||||||
|
return uniqueItems.find(item) == uniqueItems.end();
|
||||||
});
|
});
|
||||||
m_allItemsModel->appendItems(newItems);
|
m_allItemsModel->appendItems(newItems);
|
||||||
|
|
||||||
|
|||||||
@@ -4408,6 +4408,13 @@ void GdbEngine::setupInferior()
|
|||||||
if (rp.breakOnMain)
|
if (rp.breakOnMain)
|
||||||
runCommand({"tbreak " + mainFunction()});
|
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) {
|
if (rp.startMode == AttachToRemoteProcess) {
|
||||||
|
|
||||||
handleInferiorPrepared();
|
handleInferiorPrepared();
|
||||||
@@ -4430,13 +4437,6 @@ void GdbEngine::setupInferior()
|
|||||||
|
|
||||||
// if (!remoteArch.isEmpty())
|
// if (!remoteArch.isEmpty())
|
||||||
// postCommand("set architecture " + remoteArch);
|
// 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())
|
if (!args.isEmpty())
|
||||||
runCommand({"-exec-arguments " + args});
|
runCommand({"-exec-arguments " + args});
|
||||||
|
|||||||
@@ -363,7 +363,8 @@ void ExamplesViewController::updateExamples()
|
|||||||
|
|
||||||
const QStringList sources = m_exampleSetModel->exampleSources(&examplesInstallPath,
|
const QStringList sources = m_exampleSetModel->exampleSources(&examplesInstallPath,
|
||||||
&demosInstallPath,
|
&demosInstallPath,
|
||||||
&qtVersion);
|
&qtVersion,
|
||||||
|
m_isExamples);
|
||||||
QStringList categoryOrder;
|
QStringList categoryOrder;
|
||||||
QList<ExampleItem *> items;
|
QList<ExampleItem *> items;
|
||||||
for (const QString &exampleSource : sources) {
|
for (const QString &exampleSource : sources) {
|
||||||
@@ -493,12 +494,15 @@ QtVersion *ExampleSetModel::findHighestQtVersion(const QtVersions &versions) con
|
|||||||
|
|
||||||
QStringList ExampleSetModel::exampleSources(QString *examplesInstallPath,
|
QStringList ExampleSetModel::exampleSources(QString *examplesInstallPath,
|
||||||
QString *demosInstallPath,
|
QString *demosInstallPath,
|
||||||
QVersionNumber *qtVersion)
|
QVersionNumber *qtVersion,
|
||||||
|
bool isExamples)
|
||||||
{
|
{
|
||||||
QStringList sources;
|
QStringList sources;
|
||||||
|
|
||||||
|
if (!isExamples) {
|
||||||
// Qt Creator shipped tutorials
|
// Qt Creator shipped tutorials
|
||||||
sources << ":/qtsupport/qtcreator_tutorials.xml";
|
sources << ":/qtsupport/qtcreator_tutorials.xml";
|
||||||
|
}
|
||||||
|
|
||||||
QString examplesPath;
|
QString examplesPath;
|
||||||
QString demosPath;
|
QString demosPath;
|
||||||
|
|||||||
@@ -41,7 +41,8 @@ public:
|
|||||||
bool selectExampleSet(int index);
|
bool selectExampleSet(int index);
|
||||||
QStringList exampleSources(QString *examplesInstallPath,
|
QStringList exampleSources(QString *examplesInstallPath,
|
||||||
QString *demosInstallPath,
|
QString *demosInstallPath,
|
||||||
QVersionNumber *qtVersion);
|
QVersionNumber *qtVersion,
|
||||||
|
bool isExamples);
|
||||||
bool selectedQtSupports(const Utils::Id &target) const;
|
bool selectedQtSupports(const Utils::Id &target) const;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|||||||
@@ -32,10 +32,11 @@ macro(qtc_auto_setup_compiler_standard toolchainFile)
|
|||||||
endforeach()
|
endforeach()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
foreach(osx_var CMAKE_SYSROOT CMAKE_OSX_SYSROOT CMAKE_OSX_ARCHITECTURES)
|
# Forward important CMake variables to the package manager in the toolchain file
|
||||||
if (${osx_var})
|
foreach(fwd_var CMAKE_MSVC_RUNTIME_LIBRARY CMAKE_SYSROOT CMAKE_OSX_SYSROOT CMAKE_OSX_ARCHITECTURES)
|
||||||
|
if (${fwd_var})
|
||||||
file(APPEND "${toolchainFile}"
|
file(APPEND "${toolchainFile}"
|
||||||
"set(${osx_var} ${${osx_var}})\n")
|
"set(${fwd_var} ${${fwd_var}})\n")
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|||||||
@@ -210,7 +210,8 @@ def __getExpectedCompilers__():
|
|||||||
for c in ('clang++', 'clang', 'afl-clang',
|
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]',
|
'clang-[0-9]', 'clang-[0-9].[0-9]', 'clang-1[0-9]', 'clang-1[0-9].[0-9]',
|
||||||
'*g++*', '*gcc*'):
|
'*g++*', '*gcc*'):
|
||||||
compilers.extend(findAllFilesInPATH(c))
|
filesInPath = set(findAllFilesInPATH(c))
|
||||||
|
compilers.extend(filesInPath | set(map(os.path.realpath, filesInPath)))
|
||||||
if platform.system() == 'Darwin':
|
if platform.system() == 'Darwin':
|
||||||
for compilerExe in ('clang++', 'clang'):
|
for compilerExe in ('clang++', 'clang'):
|
||||||
xcodeClang = getOutputFromCmdline(["xcrun", "--find", compilerExe]).strip("\n")
|
xcodeClang = getOutputFromCmdline(["xcrun", "--find", compilerExe]).strip("\n")
|
||||||
|
|||||||
Reference in New Issue
Block a user