forked from qt-creator/qt-creator
ProjectExplorer/Kit: making toHtml() const
Change-Id: I8a9be3cda84f5d00d29a8f5e101c004ea2bbc6ba Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
@@ -280,7 +280,7 @@ QString DebuggerKitInformation::userOutput(const DebuggerItem &item)
|
|||||||
return binary.isEmpty() ? tr("%1 <None>").arg(name) : tr("%1 using \"%2\"").arg(name, binary);
|
return binary.isEmpty() ? tr("%1 <None>").arg(name) : tr("%1 using \"%2\"").arg(name, binary);
|
||||||
}
|
}
|
||||||
|
|
||||||
KitInformation::ItemList DebuggerKitInformation::toUserOutput(Kit *k) const
|
KitInformation::ItemList DebuggerKitInformation::toUserOutput(const Kit *k) const
|
||||||
{
|
{
|
||||||
return ItemList() << qMakePair(tr("Debugger"), DebuggerKitInformation::userOutput(DebuggerKitInformation::debuggerItem(k)));
|
return ItemList() << qMakePair(tr("Debugger"), DebuggerKitInformation::userOutput(DebuggerKitInformation::debuggerItem(k)));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ public:
|
|||||||
|
|
||||||
ProjectExplorer::KitConfigWidget *createConfigWidget(ProjectExplorer::Kit *k) const;
|
ProjectExplorer::KitConfigWidget *createConfigWidget(ProjectExplorer::Kit *k) const;
|
||||||
|
|
||||||
ItemList toUserOutput(ProjectExplorer::Kit *k) const;
|
ItemList toUserOutput(const ProjectExplorer::Kit *k) const;
|
||||||
static QString userOutput(const DebuggerItem &item);
|
static QString userOutput(const DebuggerItem &item);
|
||||||
|
|
||||||
static DebuggerItem debuggerItem(const ProjectExplorer::Kit *k);
|
static DebuggerItem debuggerItem(const ProjectExplorer::Kit *k);
|
||||||
|
|||||||
@@ -403,7 +403,7 @@ IOutputParser *Kit::createOutputParser() const
|
|||||||
return first;
|
return first;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString Kit::toHtml()
|
QString Kit::toHtml() const
|
||||||
{
|
{
|
||||||
QString rc;
|
QString rc;
|
||||||
QTextStream str(&rc);
|
QTextStream str(&rc);
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ public:
|
|||||||
void addToEnvironment(Utils::Environment &env) const;
|
void addToEnvironment(Utils::Environment &env) const;
|
||||||
IOutputParser *createOutputParser() const;
|
IOutputParser *createOutputParser() const;
|
||||||
|
|
||||||
QString toHtml();
|
QString toHtml() const;
|
||||||
Kit *clone(bool keepName = false) const;
|
Kit *clone(bool keepName = false) const;
|
||||||
void copyFrom(const Kit *k);
|
void copyFrom(const Kit *k);
|
||||||
|
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ KitConfigWidget *SysRootKitInformation::createConfigWidget(Kit *k) const
|
|||||||
return new Internal::SysRootInformationConfigWidget(k);
|
return new Internal::SysRootInformationConfigWidget(k);
|
||||||
}
|
}
|
||||||
|
|
||||||
KitInformation::ItemList SysRootKitInformation::toUserOutput(Kit *k) const
|
KitInformation::ItemList SysRootKitInformation::toUserOutput(const Kit *k) const
|
||||||
{
|
{
|
||||||
return ItemList() << qMakePair(tr("Sys Root"), sysRoot(k).toUserOutput());
|
return ItemList() << qMakePair(tr("Sys Root"), sysRoot(k).toUserOutput());
|
||||||
}
|
}
|
||||||
@@ -209,7 +209,7 @@ QString ToolChainKitInformation::displayNamePostfix(const Kit *k) const
|
|||||||
return tc ? tc->displayName() : QString();
|
return tc ? tc->displayName() : QString();
|
||||||
}
|
}
|
||||||
|
|
||||||
KitInformation::ItemList ToolChainKitInformation::toUserOutput(Kit *k) const
|
KitInformation::ItemList ToolChainKitInformation::toUserOutput(const Kit *k) const
|
||||||
{
|
{
|
||||||
ToolChain *tc = toolChain(k);
|
ToolChain *tc = toolChain(k);
|
||||||
return ItemList() << qMakePair(tr("Compiler"), tc ? tc->displayName() : tr("None"));
|
return ItemList() << qMakePair(tr("Compiler"), tc ? tc->displayName() : tr("None"));
|
||||||
@@ -294,7 +294,7 @@ KitConfigWidget *DeviceTypeKitInformation::createConfigWidget(Kit *k) const
|
|||||||
return new Internal::DeviceTypeInformationConfigWidget(k);
|
return new Internal::DeviceTypeInformationConfigWidget(k);
|
||||||
}
|
}
|
||||||
|
|
||||||
KitInformation::ItemList DeviceTypeKitInformation::toUserOutput(Kit *k) const
|
KitInformation::ItemList DeviceTypeKitInformation::toUserOutput(const Kit *k) const
|
||||||
{
|
{
|
||||||
Core::Id type = deviceTypeId(k);
|
Core::Id type = deviceTypeId(k);
|
||||||
QString typeDisplayName = tr("Unknown device type");
|
QString typeDisplayName = tr("Unknown device type");
|
||||||
@@ -392,7 +392,7 @@ QString DeviceKitInformation::displayNamePostfix(const Kit *k) const
|
|||||||
return dev.isNull() ? QString() : dev->displayName();
|
return dev.isNull() ? QString() : dev->displayName();
|
||||||
}
|
}
|
||||||
|
|
||||||
KitInformation::ItemList DeviceKitInformation::toUserOutput(Kit *k) const
|
KitInformation::ItemList DeviceKitInformation::toUserOutput(const Kit *k) const
|
||||||
{
|
{
|
||||||
IDevice::ConstPtr dev = device(k);
|
IDevice::ConstPtr dev = device(k);
|
||||||
return ItemList() << qMakePair(tr("Device"), dev.isNull() ? tr("Unconfigured") : dev->displayName());
|
return ItemList() << qMakePair(tr("Device"), dev.isNull() ? tr("Unconfigured") : dev->displayName());
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ public:
|
|||||||
|
|
||||||
KitConfigWidget *createConfigWidget(Kit *k) const;
|
KitConfigWidget *createConfigWidget(Kit *k) const;
|
||||||
|
|
||||||
ItemList toUserOutput(Kit *k) const;
|
ItemList toUserOutput(const Kit *k) const;
|
||||||
|
|
||||||
static bool hasSysRoot(const Kit *k);
|
static bool hasSysRoot(const Kit *k);
|
||||||
static Utils::FileName sysRoot(const Kit *k);
|
static Utils::FileName sysRoot(const Kit *k);
|
||||||
@@ -110,7 +110,7 @@ public:
|
|||||||
|
|
||||||
QString displayNamePostfix(const Kit *k) const;
|
QString displayNamePostfix(const Kit *k) const;
|
||||||
|
|
||||||
ItemList toUserOutput(Kit *k) const;
|
ItemList toUserOutput(const Kit *k) const;
|
||||||
|
|
||||||
void addToEnvironment(const Kit *k, Utils::Environment &env) const;
|
void addToEnvironment(const Kit *k, Utils::Environment &env) const;
|
||||||
IOutputParser *createOutputParser(const Kit *k) const;
|
IOutputParser *createOutputParser(const Kit *k) const;
|
||||||
@@ -158,7 +158,7 @@ public:
|
|||||||
|
|
||||||
KitConfigWidget *createConfigWidget(Kit *k) const;
|
KitConfigWidget *createConfigWidget(Kit *k) const;
|
||||||
|
|
||||||
ItemList toUserOutput(Kit *k) const;
|
ItemList toUserOutput(const Kit *k) const;
|
||||||
|
|
||||||
static const Core::Id deviceTypeId(const Kit *k);
|
static const Core::Id deviceTypeId(const Kit *k);
|
||||||
static void setDeviceTypeId(Kit *k, Core::Id type);
|
static void setDeviceTypeId(Kit *k, Core::Id type);
|
||||||
@@ -205,7 +205,7 @@ public:
|
|||||||
|
|
||||||
QString displayNamePostfix(const Kit *k) const;
|
QString displayNamePostfix(const Kit *k) const;
|
||||||
|
|
||||||
ItemList toUserOutput(Kit *k) const;
|
ItemList toUserOutput(const Kit *k) const;
|
||||||
|
|
||||||
static IDevice::ConstPtr device(const Kit *k);
|
static IDevice::ConstPtr device(const Kit *k);
|
||||||
static Core::Id deviceId(const Kit *k);
|
static Core::Id deviceId(const Kit *k);
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ public:
|
|||||||
// called on initial setup of a kit.
|
// called on initial setup of a kit.
|
||||||
virtual void setup(Kit *) { return; }
|
virtual void setup(Kit *) { return; }
|
||||||
|
|
||||||
virtual ItemList toUserOutput(Kit *) const = 0;
|
virtual ItemList toUserOutput(const Kit *) const = 0;
|
||||||
|
|
||||||
virtual KitConfigWidget *createConfigWidget(Kit *) const = 0;
|
virtual KitConfigWidget *createConfigWidget(Kit *) const = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ QmakeKitInformation::createConfigWidget(ProjectExplorer::Kit *k) const
|
|||||||
return new Internal::QmakeKitConfigWidget(k);
|
return new Internal::QmakeKitConfigWidget(k);
|
||||||
}
|
}
|
||||||
|
|
||||||
ProjectExplorer::KitInformation::ItemList QmakeKitInformation::toUserOutput(ProjectExplorer::Kit *k) const
|
ProjectExplorer::KitInformation::ItemList QmakeKitInformation::toUserOutput(const ProjectExplorer::Kit *k) const
|
||||||
{
|
{
|
||||||
return ItemList() << qMakePair(tr("mkspec"), mkspec(k).toUserOutput());
|
return ItemList() << qMakePair(tr("mkspec"), mkspec(k).toUserOutput());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ public:
|
|||||||
|
|
||||||
ProjectExplorer::KitConfigWidget *createConfigWidget(ProjectExplorer::Kit *k) const;
|
ProjectExplorer::KitConfigWidget *createConfigWidget(ProjectExplorer::Kit *k) const;
|
||||||
|
|
||||||
ItemList toUserOutput(ProjectExplorer::Kit *k) const;
|
ItemList toUserOutput(const ProjectExplorer::Kit *k) const;
|
||||||
|
|
||||||
static void setMkspec(ProjectExplorer::Kit *k, const Utils::FileName &fn);
|
static void setMkspec(ProjectExplorer::Kit *k, const Utils::FileName &fn);
|
||||||
static Utils::FileName mkspec(const ProjectExplorer::Kit *k);
|
static Utils::FileName mkspec(const ProjectExplorer::Kit *k);
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ QString QtKitInformation::displayNamePostfix(const ProjectExplorer::Kit *k) cons
|
|||||||
}
|
}
|
||||||
|
|
||||||
ProjectExplorer::KitInformation::ItemList
|
ProjectExplorer::KitInformation::ItemList
|
||||||
QtKitInformation::toUserOutput(ProjectExplorer::Kit *k) const
|
QtKitInformation::toUserOutput(const ProjectExplorer::Kit *k) const
|
||||||
{
|
{
|
||||||
BaseQtVersion *version = qtVersion(k);
|
BaseQtVersion *version = qtVersion(k);
|
||||||
return ItemList() << qMakePair(tr("Qt version"), version ? version->displayName() : tr("None"));
|
return ItemList() << qMakePair(tr("Qt version"), version ? version->displayName() : tr("None"));
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ public:
|
|||||||
|
|
||||||
QString displayNamePostfix(const ProjectExplorer::Kit *k) const;
|
QString displayNamePostfix(const ProjectExplorer::Kit *k) const;
|
||||||
|
|
||||||
ItemList toUserOutput(ProjectExplorer::Kit *k) const;
|
ItemList toUserOutput(const ProjectExplorer::Kit *k) const;
|
||||||
|
|
||||||
void addToEnvironment(const ProjectExplorer::Kit *k, Utils::Environment &env) const;
|
void addToEnvironment(const ProjectExplorer::Kit *k, Utils::Environment &env) const;
|
||||||
ProjectExplorer::IOutputParser *createOutputParser(const ProjectExplorer::Kit *k) const;
|
ProjectExplorer::IOutputParser *createOutputParser(const ProjectExplorer::Kit *k) const;
|
||||||
|
|||||||
Reference in New Issue
Block a user