forked from qt-creator/qt-creator
s/ProjectExpander/ProjectMacroExpander/g
The new name is a better description of what the class is all about, it matches the filename and it does not conflict show up when trying to expand "PE" to ProjectExplorer. Change-Id: Ie6a10b9a83dc8bc529e35e3381f733dbe25847a3 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
@@ -209,7 +209,7 @@ QString CMakeProject::shadowBuildDirectory(const QString &projectFilePath, const
|
|||||||
return info.absolutePath();
|
return info.absolutePath();
|
||||||
|
|
||||||
const QString projectName = QFileInfo(info.absolutePath()).fileName();
|
const QString projectName = QFileInfo(info.absolutePath()).fileName();
|
||||||
ProjectExplorer::ProjectExpander expander(projectFilePath, projectName, k, bcName);
|
ProjectExplorer::ProjectMacroExpander expander(projectFilePath, projectName, k, bcName);
|
||||||
QDir projectDir = QDir(projectDirectory(projectFilePath));
|
QDir projectDir = QDir(projectDirectory(projectFilePath));
|
||||||
QString buildPath = Utils::expandMacros(Core::DocumentManager::buildDirectory(), &expander);
|
QString buildPath = Utils::expandMacros(Core::DocumentManager::buildDirectory(), &expander);
|
||||||
return QDir::cleanPath(projectDir.absoluteFilePath(buildPath));
|
return QDir::cleanPath(projectDir.absoluteFilePath(buildPath));
|
||||||
|
|||||||
@@ -1178,7 +1178,7 @@ void ProjectExplorerPlugin::updateVariable(const QByteArray &variable)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ProjectExpander expander(projectFilePath, projectName, kit, buildConfigurationName);
|
ProjectMacroExpander expander(projectFilePath, projectName, kit, buildConfigurationName);
|
||||||
QString result;
|
QString result;
|
||||||
if (expander.resolveProjectMacro(QString::fromUtf8(variable), &result))
|
if (expander.resolveProjectMacro(QString::fromUtf8(variable), &result))
|
||||||
Core::VariableManager::insert(variable, result);
|
Core::VariableManager::insert(variable, result);
|
||||||
|
|||||||
@@ -35,12 +35,12 @@
|
|||||||
|
|
||||||
using namespace ProjectExplorer;
|
using namespace ProjectExplorer;
|
||||||
|
|
||||||
ProjectExpander::ProjectExpander(const QString &projectFilePath, const QString &projectName,
|
ProjectMacroExpander::ProjectMacroExpander(const QString &projectFilePath, const QString &projectName,
|
||||||
const Kit *k, const QString &bcName)
|
const Kit *k, const QString &bcName)
|
||||||
: m_projectFile(projectFilePath), m_projectName(projectName), m_kit(k), m_bcName(bcName)
|
: m_projectFile(projectFilePath), m_projectName(projectName), m_kit(k), m_bcName(bcName)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
bool ProjectExpander::resolveProjectMacro(const QString &name, QString *ret)
|
bool ProjectMacroExpander::resolveProjectMacro(const QString &name, QString *ret)
|
||||||
{
|
{
|
||||||
QString result;
|
QString result;
|
||||||
bool found = false;
|
bool found = false;
|
||||||
@@ -75,7 +75,7 @@ bool ProjectExpander::resolveProjectMacro(const QString &name, QString *ret)
|
|||||||
return found;
|
return found;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ProjectExpander::resolveMacro(const QString &name, QString *ret)
|
bool ProjectMacroExpander::resolveMacro(const QString &name, QString *ret)
|
||||||
{
|
{
|
||||||
bool found = resolveProjectMacro(name, ret);
|
bool found = resolveProjectMacro(name, ret);
|
||||||
if (!found) {
|
if (!found) {
|
||||||
|
|||||||
@@ -37,10 +37,10 @@
|
|||||||
namespace ProjectExplorer {
|
namespace ProjectExplorer {
|
||||||
class Kit;
|
class Kit;
|
||||||
|
|
||||||
class PROJECTEXPLORER_EXPORT ProjectExpander : public Utils::AbstractQtcMacroExpander
|
class PROJECTEXPLORER_EXPORT ProjectMacroExpander : public Utils::AbstractQtcMacroExpander
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ProjectExpander(const QString &projectFilePath, const QString &projectName, const Kit *k, const QString &bcName);
|
ProjectMacroExpander(const QString &projectFilePath, const QString &projectName, const Kit *k, const QString &bcName);
|
||||||
bool resolveProjectMacro(const QString &name, QString *ret);
|
bool resolveProjectMacro(const QString &name, QString *ret);
|
||||||
bool resolveMacro(const QString &name, QString *ret);
|
bool resolveMacro(const QString &name, QString *ret);
|
||||||
|
|
||||||
|
|||||||
@@ -1390,7 +1390,7 @@ QString Qt4Project::shadowBuildDirectory(const QString &proFilePath, const Kit *
|
|||||||
return info.absolutePath();
|
return info.absolutePath();
|
||||||
|
|
||||||
const QString projectName = QFileInfo(proFilePath).completeBaseName();
|
const QString projectName = QFileInfo(proFilePath).completeBaseName();
|
||||||
ProjectExplorer::ProjectExpander expander(proFilePath, projectName, k, suffix);
|
ProjectExplorer::ProjectMacroExpander expander(proFilePath, projectName, k, suffix);
|
||||||
QDir projectDir = QDir(projectDirectory(proFilePath));
|
QDir projectDir = QDir(projectDirectory(proFilePath));
|
||||||
QString buildPath = Utils::expandMacros(Core::DocumentManager::buildDirectory(), &expander);
|
QString buildPath = Utils::expandMacros(Core::DocumentManager::buildDirectory(), &expander);
|
||||||
return QDir::cleanPath(projectDir.absoluteFilePath(buildPath));
|
return QDir::cleanPath(projectDir.absoluteFilePath(buildPath));
|
||||||
|
|||||||
Reference in New Issue
Block a user