Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
83a5aced
Commit
83a5aced
authored
Feb 10, 2010
by
Thorbjørn Lindeijer
Browse files
Some cleanup of GenericProject
Unused stuff.
parent
5ed4437e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/genericprojectmanager/genericproject.cpp
View file @
83a5aced
...
...
@@ -35,26 +35,16 @@
#include <projectexplorer/toolchain.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/persistentsettings.h>
#include <cpptools/cppmodelmanagerinterface.h>
#include <extensionsystem/pluginmanager.h>
#include <utils/pathchooser.h>
#include <utils/qtcassert.h>
#include <coreplugin/icore.h>
#include <QtCore/QtDebug>
#include <QtCore/QDir>
#include <QtCore/QSettings>
#include <QtCore/QProcess>
#include <QtCore/QCoreApplication>
#include <QtGui/QFormLayout>
#include <QtGui/QMainWindow>
#include <QtGui/QInputDialog>
#include <QtGui/QComboBox>
#include <QtGui/QStringListModel>
#include <QtGui/QListWidget>
#include <QtGui/QPushButton>
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 "<new>", 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"
,
"<new>"
);
}
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
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment