debugger: reduce line noise

Change-Id: Id4a99596c8e35b1d422ce21798f70796a16c3c57
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
hjk
2012-06-26 13:48:19 +02:00
parent 0db4c917f4
commit b7d926c389

View File

@@ -42,10 +42,11 @@
#include <QFileInfo> #include <QFileInfo>
#include <QDir> #include <QDir>
#include <QPair> #include <QPair>
#include <QtEvents> #include <QtEvents>
typedef QPair<ProjectExplorer::Abi, QString> AbiDebuggerCommandPair; using namespace ProjectExplorer;
typedef QPair<Abi, QString> AbiDebuggerCommandPair;
Q_DECLARE_METATYPE(AbiDebuggerCommandPair) Q_DECLARE_METATYPE(AbiDebuggerCommandPair)
@@ -59,15 +60,14 @@ DebuggerToolChainComboBox::DebuggerToolChainComboBox(QWidget *parent) :
void DebuggerToolChainComboBox::init(bool hostAbiOnly) void DebuggerToolChainComboBox::init(bool hostAbiOnly)
{ {
const ProjectExplorer::Abi hostAbi = ProjectExplorer::Abi::hostAbi(); const Abi hostAbi = Abi::hostAbi();
foreach (const ProjectExplorer::Profile *st, foreach (const Profile *st, ProfileManager::instance()->profiles()) {
ProjectExplorer::ProfileManager::instance()->profiles()) {
if (!st->isValid()) if (!st->isValid())
continue; continue;
ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(st); ToolChain *tc = ToolChainProfileInformation::toolChain(st);
if (!tc) if (!tc)
continue; continue;
const ProjectExplorer::Abi abi = tc->targetAbi(); const Abi abi = tc->targetAbi();
if (hostAbiOnly && hostAbi.os() != abi.os()) if (hostAbiOnly && hostAbi.os() != abi.os())
continue; continue;
@@ -83,7 +83,7 @@ void DebuggerToolChainComboBox::init(bool hostAbiOnly)
setEnabled(count() > 1); setEnabled(count() > 1);
} }
void DebuggerToolChainComboBox::setAbi(const ProjectExplorer::Abi &abi) void DebuggerToolChainComboBox::setAbi(const Abi &abi)
{ {
QTC_ASSERT(abi.isValid(), return); QTC_ASSERT(abi.isValid(), return);
const int c = count(); const int c = count();
@@ -95,7 +95,7 @@ void DebuggerToolChainComboBox::setAbi(const ProjectExplorer::Abi &abi)
} }
} }
ProjectExplorer::Abi DebuggerToolChainComboBox::abi() const Abi DebuggerToolChainComboBox::abi() const
{ {
return abiAt(currentIndex()); return abiAt(currentIndex());
} }
@@ -114,13 +114,13 @@ QString DebuggerToolChainComboBox::debuggerCommandAt(int index) const
return QString(); return QString();
} }
ProjectExplorer::Abi DebuggerToolChainComboBox::abiAt(int index) const Abi DebuggerToolChainComboBox::abiAt(int index) const
{ {
if (index >= 0 && index < count()) { if (index >= 0 && index < count()) {
const AbiDebuggerCommandPair abiCommandPair = qvariant_cast<AbiDebuggerCommandPair>(itemData(index)); const AbiDebuggerCommandPair abiCommandPair = qvariant_cast<AbiDebuggerCommandPair>(itemData(index));
return abiCommandPair.first; return abiCommandPair.first;
} }
return ProjectExplorer::Abi(); return Abi();
} }
static inline QString abiToolTip(const AbiDebuggerCommandPair &abiCommandPair) static inline QString abiToolTip(const AbiDebuggerCommandPair &abiCommandPair)