Merge remote-tracking branch 'origin/4.5' into 4.6

Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri

Change-Id: I6a9838d60dd37d4762fa7a345febc3a59e9d8351
This commit is contained in:
Eike Ziller
2018-03-01 15:44:34 +01:00
6 changed files with 34 additions and 15 deletions

View File

@@ -189,9 +189,9 @@ void DetailsWidgetPrivate::changeHoverState(bool hovered)
if (!m_toolWidget) if (!m_toolWidget)
return; return;
if (HostOsInfo::isMacHost()) if (HostOsInfo::isMacHost())
m_toolWidget->setOpacity(hovered ? 1.0 : 0); m_toolWidget->setOpacity(hovered ? .999 : 0);
else else
m_toolWidget->fadeTo(hovered ? 1.0 : 0); m_toolWidget->fadeTo(hovered ? .999 : 0);
m_hovered = hovered; m_hovered = hovered;
} }
@@ -387,7 +387,7 @@ void DetailsWidget::setToolWidget(FadingPanel *widget)
d->m_grid->addWidget(d->m_toolWidget, 0, 1, 1, 1, Qt::AlignRight); d->m_grid->addWidget(d->m_toolWidget, 0, 1, 1, 1, Qt::AlignRight);
if (HostOsInfo::isMacHost()) if (HostOsInfo::isMacHost())
d->m_toolWidget->setOpacity(1.0); d->m_toolWidget->setOpacity(.999);
d->changeHoverState(d->m_hovered); d->changeHoverState(d->m_hovered);
} }

View File

@@ -273,7 +273,7 @@ ProgressManagerPrivate::ProgressManagerPrivate()
m_progressViewPinned(false), m_progressViewPinned(false),
m_hovered(false) m_hovered(false)
{ {
m_opacityEffect->setOpacity(1); m_opacityEffect->setOpacity(.999);
m_instance = this; m_instance = this;
m_progressView = new ProgressView; m_progressView = new ProgressView;
// withDelay, so the statusBarWidget has the chance to get the enter event // withDelay, so the statusBarWidget has the chance to get the enter event
@@ -544,7 +544,7 @@ void ProgressManagerPrivate::stopFadeOfSummaryProgress()
{ {
if (m_opacityAnimation) { if (m_opacityAnimation) {
m_opacityAnimation->stop(); m_opacityAnimation->stop();
m_opacityEffect->setOpacity(1.); m_opacityEffect->setOpacity(.999);
delete m_opacityAnimation; delete m_opacityAnimation;
} }
} }
@@ -690,7 +690,7 @@ void ProgressManagerPrivate::updateStatusDetailsWidget()
void ProgressManagerPrivate::summaryProgressFinishedFading() void ProgressManagerPrivate::summaryProgressFinishedFading()
{ {
m_summaryProgressWidget->setVisible(false); m_summaryProgressWidget->setVisible(false);
m_opacityEffect->setOpacity(1.); m_opacityEffect->setOpacity(.999);
} }
void ProgressManagerPrivate::progressDetailsToggled(bool checked) void ProgressManagerPrivate::progressDetailsToggled(bool checked)

View File

@@ -88,7 +88,7 @@ public:
void setAbis(const QList<ProjectExplorer::Abi> &abis); void setAbis(const QList<ProjectExplorer::Abi> &abis);
void setAbi(const ProjectExplorer::Abi &abi); void setAbi(const ProjectExplorer::Abi &abi);
enum MatchLevel { DoesNotMatch, MatchesSomewhat, MatchesWell, MatchesPerfectly }; enum MatchLevel { DoesNotMatch, MatchesSomewhat, MatchesWell, MatchesPerfectly, MatchesPerfectlyInPath };
MatchLevel matchTarget(const ProjectExplorer::Abi &targetAbi) const; MatchLevel matchTarget(const ProjectExplorer::Abi &targetAbi) const;
QStringList abiNames() const; QStringList abiNames() const;

View File

@@ -103,13 +103,20 @@ void DebuggerKitInformation::setup(Kit *k)
DebuggerItem bestItem; DebuggerItem bestItem;
DebuggerItem::MatchLevel bestLevel = DebuggerItem::DoesNotMatch; DebuggerItem::MatchLevel bestLevel = DebuggerItem::DoesNotMatch;
const Environment systemEnvironment = Environment::systemEnvironment();
foreach (const DebuggerItem &item, DebuggerItemManager::debuggers()) { foreach (const DebuggerItem &item, DebuggerItemManager::debuggers()) {
DebuggerItem::MatchLevel level = DebuggerItem::DoesNotMatch; DebuggerItem::MatchLevel level = DebuggerItem::DoesNotMatch;
if (rawId.isNull()) { if (rawId.isNull()) {
// Initial setup of a kit. // Initial setup of a kit.
level = item.matchTarget(tcAbi); level = item.matchTarget(tcAbi);
// Hack to prefer a debugger from PATH (e.g. autodetected) over other matches.
// This improves the situation a bit if a cross-compilation tool chain has the
// same ABI as the host.
if (level == DebuggerItem::MatchesPerfectly
&& systemEnvironment.path().contains(item.command().parentDir().toString())) {
level = DebuggerItem::MatchesPerfectlyInPath;
}
} else if (rawId.type() == QVariant::String) { } else if (rawId.type() == QVariant::String) {
// New structure. // New structure.
if (item.id() == rawId) { if (item.id() == rawId) {

View File

@@ -136,9 +136,9 @@ void ToolWidget::setBuildStepEnabled(bool b)
m_firstWidget->fadeTo(m_targetOpacity); m_firstWidget->fadeTo(m_targetOpacity);
} else { } else {
if (HostOsInfo::isMacHost()) if (HostOsInfo::isMacHost())
m_firstWidget->setOpacity(1.0); m_firstWidget->setOpacity(.999);
else else
m_firstWidget->fadeTo(1.0); m_firstWidget->fadeTo(.999);
} }
m_disableButton->setChecked(!b); m_disableButton->setChecked(!b);
} }

View File

@@ -93,11 +93,23 @@ void QmakeKitInformation::setup(Kit *k)
&& version->qtAbis().contains(t->targetAbi()); && version->qtAbis().contains(t->targetAbi());
}); });
if (!possibleTcs.isEmpty()) { if (!possibleTcs.isEmpty()) {
ToolChain *possibleTc const QList<ToolChain *> goodTcs = Utils::filtered(possibleTcs,
= Utils::findOr(possibleTcs, possibleTcs.last(), [&spec](const ToolChain *t) {
[&spec](const ToolChain *t) { return t->suggestedMkspecList().contains(spec); }); return t->suggestedMkspecList().contains(spec);
if (possibleTc) });
ToolChainKitInformation::setAllToolChainsToMatch(k, possibleTc); // Hack to prefer a tool chain from PATH (e.g. autodetected) over other matches.
// This improves the situation a bit if a cross-compilation tool chain has the
// same ABI as the host.
const Environment systemEnvironment = Environment::systemEnvironment();
ToolChain *bestTc = Utils::findOrDefault(goodTcs,
[&systemEnvironment](const ToolChain *t) {
return systemEnvironment.path().contains(t->compilerCommand().parentDir().toString());
});
if (!bestTc) {
bestTc = goodTcs.isEmpty() ? possibleTcs.last() : goodTcs.last();
}
if (bestTc)
ToolChainKitInformation::setAllToolChainsToMatch(k, bestTc);
} }
} }
} }