Commit ad02e86e authored by ck's avatar ck
Browse files

Qt4Projectmanager: Constify some member functions.

Reviewed-by: dt
parent 7d7288cf
......@@ -888,21 +888,21 @@ QStringList Qt4PriFileNode::varNames(FileType type)
return vars;
}
Qt4ProFileNode *Qt4ProFileNode::findProFileFor(const QString &fileName)
const Qt4ProFileNode *Qt4ProFileNode::findProFileFor(const QString &fileName) const
{
if (fileName == path())
return this;
foreach (ProjectNode *pn, subProjectNodes())
if (Qt4ProFileNode *qt4ProFileNode = qobject_cast<Qt4ProFileNode *>(pn))
if (Qt4ProFileNode *result = qt4ProFileNode->findProFileFor(fileName))
if (const Qt4ProFileNode *result = qt4ProFileNode->findProFileFor(fileName))
return result;
return 0;
}
TargetInformation Qt4ProFileNode::targetInformation(const QString &fileName)
TargetInformation Qt4ProFileNode::targetInformation(const QString &fileName) const
{
TargetInformation result;
Qt4ProFileNode *qt4ProFileNode = findProFileFor(fileName);
const Qt4ProFileNode *qt4ProFileNode = findProFileFor(fileName);
if (!qt4ProFileNode)
return result;
......@@ -1596,7 +1596,7 @@ TargetInformation Qt4ProFileNode::targetInformation(ProFileReader *reader) const
return result;
}
TargetInformation Qt4ProFileNode::targetInformation()
TargetInformation Qt4ProFileNode::targetInformation() const
{
return m_qt4targetInformation;
}
......
......@@ -254,9 +254,9 @@ public:
QString uiDirectory() const;
static QString uiHeaderFile(const QString &uiDir, const QString &formFile);
Qt4ProFileNode *findProFileFor(const QString &string);
TargetInformation targetInformation(const QString &fileName);
TargetInformation targetInformation();
const Qt4ProFileNode *findProFileFor(const QString &string) const;
TargetInformation targetInformation(const QString &fileName) const;
TargetInformation targetInformation() const;
void update();
void scheduleUpdate();
......
......@@ -556,7 +556,7 @@ ProjectExplorer::Environment Qt4RunConfiguration::baseEnvironment() const
// On windows the user could be linking to a library found via a -L/some/dir switch
// to find those libraries while actually running we explicitly prepend those
// dirs to the path
Qt4ProFileNode *node = qt4Target()->qt4Project()->rootProjectNode()->findProFileFor(m_proFilePath);
const Qt4ProFileNode *node = qt4Target()->qt4Project()->rootProjectNode()->findProFileFor(m_proFilePath);
if (node)
foreach(const QString dir, node->variableValue(LibDirectoriesVar))
env.prependOrSetPath(dir);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment