From 83a5aced2f5be19495e1ab5dfa7c07f83efd7c17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lindeijer?= Date: Wed, 10 Feb 2010 17:28:53 +0100 Subject: [PATCH] Some cleanup of GenericProject Unused stuff. --- .../genericprojectmanager/genericproject.cpp | 60 +------------------ 1 file changed, 2 insertions(+), 58 deletions(-) diff --git a/src/plugins/genericprojectmanager/genericproject.cpp b/src/plugins/genericprojectmanager/genericproject.cpp index b54c14c3b99..fe58e7271e4 100644 --- a/src/plugins/genericprojectmanager/genericproject.cpp +++ b/src/plugins/genericprojectmanager/genericproject.cpp @@ -35,26 +35,16 @@ #include #include -#include #include #include #include -#include #include -#include #include -#include -#include -#include #include #include -#include #include -#include -#include -#include using namespace GenericProjectManager; using namespace GenericProjectManager::Internal; @@ -62,52 +52,6 @@ using namespace ProjectExplorer; namespace { const char * const TOOLCHAIN_KEY("GenericProjectManager.GenericProject.Toolchain"); - -/** - * An editable string list model. New strings can be added by editing the entry - * called "", displayed at the end. - */ -class ListModel: public QStringListModel -{ -public: - ListModel(QObject *parent) - : QStringListModel(parent) {} - - virtual ~ListModel() {} - - virtual int rowCount(const QModelIndex &parent) const - { return 1 + QStringListModel::rowCount(parent); } - - virtual Qt::ItemFlags flags(const QModelIndex &index) const - { return QStringListModel::flags(index) | Qt::ItemIsEditable | Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled; } - - virtual QModelIndex index(int row, int column, const QModelIndex &parent) const - { - if (row == stringList().size()) - return createIndex(row, column); - - return QStringListModel::index(row, column, parent); - } - - virtual QVariant data(const QModelIndex &index, int role) const - { - if (role == Qt::DisplayRole || role == Qt::EditRole) { - if (index.row() == stringList().size()) - return QCoreApplication::translate("GenericProject", ""); - } - - return QStringListModel::data(index, role); - } - - virtual bool setData(const QModelIndex &index, const QVariant &value, int role) - { - if (role == Qt::EditRole && index.row() == stringList().size()) - insertRow(index.row(), QModelIndex()); - - return QStringListModel::setData(index, value, role); - } -}; - } // end of anonymous namespace //////////////////////////////////////////////////////////////////////////////////// @@ -232,8 +176,8 @@ void GenericProject::parseProject(RefreshOptions options) if (options & Configuration) { m_projectIncludePaths = convertToAbsoluteFiles(readLines(includesFileName())); - QSettings projectInfo(m_fileName, QSettings::IniFormat); - m_generated = convertToAbsoluteFiles(projectInfo.value(QLatin1String("generated")).toStringList()); + // TODO: Possibly load some configuration from the project file + //QSettings projectInfo(m_fileName, QSettings::IniFormat); m_defines.clear();