forked from qt-creator/qt-creator
Revert "Qbs: Add icons to Project-/Product- and GroupNodes"
This patch got applied in the wrong sequence. This reverts commit c5a0205a591f6b5ebdd51559d91e1faf7d4955f0 Change-Id: I37e77ae3a15890c73ea2821f6fa07b1fa100176d Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
@@ -31,15 +31,12 @@
|
|||||||
|
|
||||||
#include "qbsproject.h"
|
#include "qbsproject.h"
|
||||||
|
|
||||||
#include <coreplugin/fileiconprovider.h>
|
|
||||||
#include <qtsupport/qtsupportconstants.h>
|
|
||||||
#include <utils/hostosinfo.h>
|
#include <utils/hostosinfo.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
|
|
||||||
#include <qbs.h>
|
#include <qbs.h>
|
||||||
|
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QStyle>
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
// Helpers:
|
// Helpers:
|
||||||
@@ -48,24 +45,6 @@
|
|||||||
namespace QbsProjectManager {
|
namespace QbsProjectManager {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
QIcon generateIcon()
|
|
||||||
{
|
|
||||||
const QSize desiredSize = QSize(16, 16);
|
|
||||||
const QIcon projectBaseIcon(QString::fromLatin1(QtSupport::Constants::ICON_QT_PROJECT));
|
|
||||||
const QPixmap projectPixmap = Core::FileIconProvider::overlayIcon(QStyle::SP_DirIcon,
|
|
||||||
projectBaseIcon,
|
|
||||||
desiredSize);
|
|
||||||
|
|
||||||
QIcon result;
|
|
||||||
result.addPixmap(projectPixmap);
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
QIcon QbsProjectNode::m_projectIcon = generateIcon();
|
|
||||||
QIcon QbsProductNode::m_productIcon = generateIcon();
|
|
||||||
QIcon QbsGroupNode::m_groupIcon = generateIcon();
|
|
||||||
|
|
||||||
class FileTreeNode {
|
class FileTreeNode {
|
||||||
public:
|
public:
|
||||||
FileTreeNode(const QString &n, FileTreeNode *p = 0) :
|
FileTreeNode(const QString &n, FileTreeNode *p = 0) :
|
||||||
@@ -269,7 +248,6 @@ QbsGroupNode::QbsGroupNode(const qbs::GroupData *grp, const QString &productPath
|
|||||||
QbsBaseProjectNode(QString()),
|
QbsBaseProjectNode(QString()),
|
||||||
m_group(0)
|
m_group(0)
|
||||||
{
|
{
|
||||||
setIcon(m_groupIcon);
|
|
||||||
setGroup(grp, productPath);
|
setGroup(grp, productPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -390,7 +368,6 @@ QbsProductNode::QbsProductNode(const qbs::ProductData *prd) :
|
|||||||
QbsBaseProjectNode(prd->location().fileName),
|
QbsBaseProjectNode(prd->location().fileName),
|
||||||
m_product(0)
|
m_product(0)
|
||||||
{
|
{
|
||||||
setIcon(m_productIcon);
|
|
||||||
setProduct(prd);
|
setProduct(prd);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -460,7 +437,6 @@ QbsProjectNode::QbsProjectNode(const QString &projectFile) :
|
|||||||
QbsBaseProjectNode(projectFile),
|
QbsBaseProjectNode(projectFile),
|
||||||
m_project(0), m_projectData(0)
|
m_project(0), m_projectData(0)
|
||||||
{
|
{
|
||||||
setIcon(m_projectIcon);
|
|
||||||
addFileNodes(QList<ProjectExplorer::FileNode *>()
|
addFileNodes(QList<ProjectExplorer::FileNode *>()
|
||||||
<< new ProjectExplorer::FileNode(projectFile, ProjectExplorer::ProjectFileType, false), this);
|
<< new ProjectExplorer::FileNode(projectFile, ProjectExplorer::ProjectFileType, false), this);
|
||||||
}
|
}
|
||||||
|
@@ -34,8 +34,6 @@
|
|||||||
|
|
||||||
#include <api/projectdata.h>
|
#include <api/projectdata.h>
|
||||||
|
|
||||||
#include <QIcon>
|
|
||||||
|
|
||||||
namespace qbs { class Project; }
|
namespace qbs { class Project; }
|
||||||
|
|
||||||
namespace QbsProjectManager {
|
namespace QbsProjectManager {
|
||||||
@@ -124,8 +122,6 @@ private:
|
|||||||
|
|
||||||
const qbs::GroupData *m_group;
|
const qbs::GroupData *m_group;
|
||||||
QString m_productPath;
|
QString m_productPath;
|
||||||
|
|
||||||
static QIcon m_groupIcon;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
@@ -148,7 +144,6 @@ private:
|
|||||||
QbsGroupNode *findGroupNode(const QString &name);
|
QbsGroupNode *findGroupNode(const QString &name);
|
||||||
|
|
||||||
const qbs::ProductData *m_product;
|
const qbs::ProductData *m_product;
|
||||||
static QIcon m_productIcon;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
@@ -173,7 +168,6 @@ private:
|
|||||||
|
|
||||||
const qbs::Project *m_project;
|
const qbs::Project *m_project;
|
||||||
const qbs::ProjectData *m_projectData;
|
const qbs::ProjectData *m_projectData;
|
||||||
static QIcon m_projectIcon;
|
|
||||||
};
|
};
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace QbsProjectManager
|
} // namespace QbsProjectManager
|
||||||
|
Reference in New Issue
Block a user