forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/5.0'
Conflicts: qbs/modules/qtc/qtc.qbs src/plugins/android/androidconfigurations.cpp Change-Id: If8dc2cdf131811e08ca147c6f58dbb3ed3bf7227
This commit is contained in:
@@ -44,6 +44,7 @@
|
||||
#include <utils/pointeralgorithm.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/stringutils.h>
|
||||
#include <utils/utilsicons.h>
|
||||
|
||||
#include <QDir>
|
||||
#include <QFileInfo>
|
||||
@@ -252,6 +253,35 @@ bool Node::isEnabled() const
|
||||
return parent ? parent->isEnabled() : true;
|
||||
}
|
||||
|
||||
QIcon FileNode::icon() const
|
||||
{
|
||||
if (hasError())
|
||||
return Utils::Icons::WARNING.icon();
|
||||
if (m_icon.isNull())
|
||||
m_icon = Core::FileIconProvider::icon(filePath());
|
||||
return m_icon;
|
||||
}
|
||||
|
||||
void FileNode::setIcon(const QIcon icon)
|
||||
{
|
||||
m_icon = icon;
|
||||
}
|
||||
|
||||
bool FileNode::hasError() const
|
||||
{
|
||||
return m_hasError;
|
||||
}
|
||||
|
||||
void FileNode::setHasError(bool error)
|
||||
{
|
||||
m_hasError = error;
|
||||
}
|
||||
|
||||
void FileNode::setHasError(bool error) const
|
||||
{
|
||||
m_hasError = error;
|
||||
}
|
||||
|
||||
/*!
|
||||
Returns \c true if the file is automatically generated by a compile step.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user