diff --git a/src/libs/utils/detailswidget.cpp b/src/libs/utils/detailswidget.cpp index ff03150af4d..e0e4139f1d1 100644 --- a/src/libs/utils/detailswidget.cpp +++ b/src/libs/utils/detailswidget.cpp @@ -189,9 +189,9 @@ void DetailsWidgetPrivate::changeHoverState(bool hovered) if (!m_toolWidget) return; if (HostOsInfo::isMacHost()) - m_toolWidget->setOpacity(hovered ? 1.0 : 0); + m_toolWidget->setOpacity(hovered ? .999 : 0); else - m_toolWidget->fadeTo(hovered ? 1.0 : 0); + m_toolWidget->fadeTo(hovered ? .999 : 0); 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); if (HostOsInfo::isMacHost()) - d->m_toolWidget->setOpacity(1.0); + d->m_toolWidget->setOpacity(.999); d->changeHoverState(d->m_hovered); } diff --git a/src/plugins/coreplugin/progressmanager/progressmanager.cpp b/src/plugins/coreplugin/progressmanager/progressmanager.cpp index 62ba9c5f9cf..f24f3d3f1b9 100644 --- a/src/plugins/coreplugin/progressmanager/progressmanager.cpp +++ b/src/plugins/coreplugin/progressmanager/progressmanager.cpp @@ -273,7 +273,7 @@ ProgressManagerPrivate::ProgressManagerPrivate() m_progressViewPinned(false), m_hovered(false) { - m_opacityEffect->setOpacity(1); + m_opacityEffect->setOpacity(.999); m_instance = this; m_progressView = new ProgressView; // withDelay, so the statusBarWidget has the chance to get the enter event @@ -544,7 +544,7 @@ void ProgressManagerPrivate::stopFadeOfSummaryProgress() { if (m_opacityAnimation) { m_opacityAnimation->stop(); - m_opacityEffect->setOpacity(1.); + m_opacityEffect->setOpacity(.999); delete m_opacityAnimation; } } @@ -690,7 +690,7 @@ void ProgressManagerPrivate::updateStatusDetailsWidget() void ProgressManagerPrivate::summaryProgressFinishedFading() { m_summaryProgressWidget->setVisible(false); - m_opacityEffect->setOpacity(1.); + m_opacityEffect->setOpacity(.999); } void ProgressManagerPrivate::progressDetailsToggled(bool checked) diff --git a/src/plugins/debugger/debuggeritem.h b/src/plugins/debugger/debuggeritem.h index 5526c52130a..7dbdf5949dd 100644 --- a/src/plugins/debugger/debuggeritem.h +++ b/src/plugins/debugger/debuggeritem.h @@ -88,7 +88,7 @@ public: void setAbis(const QList &abis); 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; QStringList abiNames() const; diff --git a/src/plugins/debugger/debuggerkitinformation.cpp b/src/plugins/debugger/debuggerkitinformation.cpp index 5bdd0272d45..bc37572a3d3 100644 --- a/src/plugins/debugger/debuggerkitinformation.cpp +++ b/src/plugins/debugger/debuggerkitinformation.cpp @@ -103,13 +103,20 @@ void DebuggerKitInformation::setup(Kit *k) DebuggerItem bestItem; DebuggerItem::MatchLevel bestLevel = DebuggerItem::DoesNotMatch; - + const Environment systemEnvironment = Environment::systemEnvironment(); foreach (const DebuggerItem &item, DebuggerItemManager::debuggers()) { DebuggerItem::MatchLevel level = DebuggerItem::DoesNotMatch; if (rawId.isNull()) { // Initial setup of a kit. 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) { // New structure. if (item.id() == rawId) { diff --git a/src/plugins/projectexplorer/buildstepspage.cpp b/src/plugins/projectexplorer/buildstepspage.cpp index 3e05c09b310..70eecbec888 100644 --- a/src/plugins/projectexplorer/buildstepspage.cpp +++ b/src/plugins/projectexplorer/buildstepspage.cpp @@ -136,9 +136,9 @@ void ToolWidget::setBuildStepEnabled(bool b) m_firstWidget->fadeTo(m_targetOpacity); } else { if (HostOsInfo::isMacHost()) - m_firstWidget->setOpacity(1.0); + m_firstWidget->setOpacity(.999); else - m_firstWidget->fadeTo(1.0); + m_firstWidget->fadeTo(.999); } m_disableButton->setChecked(!b); } diff --git a/src/plugins/qmakeprojectmanager/qmakekitinformation.cpp b/src/plugins/qmakeprojectmanager/qmakekitinformation.cpp index 4946c2e8ed4..8573bbc7a16 100644 --- a/src/plugins/qmakeprojectmanager/qmakekitinformation.cpp +++ b/src/plugins/qmakeprojectmanager/qmakekitinformation.cpp @@ -93,11 +93,23 @@ void QmakeKitInformation::setup(Kit *k) && version->qtAbis().contains(t->targetAbi()); }); if (!possibleTcs.isEmpty()) { - ToolChain *possibleTc - = Utils::findOr(possibleTcs, possibleTcs.last(), - [&spec](const ToolChain *t) { return t->suggestedMkspecList().contains(spec); }); - if (possibleTc) - ToolChainKitInformation::setAllToolChainsToMatch(k, possibleTc); + const QList goodTcs = Utils::filtered(possibleTcs, + [&spec](const ToolChain *t) { + return t->suggestedMkspecList().contains(spec); + }); + // 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); } } }