Commit 3ef1bf0f authored by Oswald Buddenhagen's avatar Oswald Buddenhagen
Browse files

micro-optimizations & cleanups

parent ebb4e044
......@@ -89,7 +89,7 @@ QList<ProFile*> ProFileReader::includeFiles() const
QString ProFileReader::value(const QString &variable) const
{
QStringList vals = values(variable);
const QStringList &vals = values(variable);
if (!vals.isEmpty())
return vals.first();
......
......@@ -40,7 +40,6 @@ namespace Qt4ProjectManager {
class Qt4Project;
namespace Internal {
class ProFileReader;
class Qt4ProFileNode;
class Qt4TargetFactory;
class Qt4BuildConfigurationFactory;
......
......@@ -3574,7 +3574,8 @@ ProFileEvaluator::Private::VisitReturn ProFileEvaluator::Private::evaluateCondit
logMessage(format("include(file, into, silent) requires one, two or three arguments."));
return ReturnFalse;
}
QString fn = resolvePath(expandEnvVars(args.at(0).toQString()));
QString fn = resolvePath(expandEnvVars(args.at(0).toQString(m_tmp1)));
fn.detach();
bool ok;
if (parseInto.isEmpty()) {
ok = evaluateFile(fn);
......@@ -4147,7 +4148,7 @@ QStringList ProFileEvaluator::absoluteFileValues(
return result;
}
ProFileEvaluator::TemplateType ProFileEvaluator::templateType()
ProFileEvaluator::TemplateType ProFileEvaluator::templateType() const
{
const ProStringList &templ = d->values(statics.strTEMPLATE);
if (templ.count() >= 1) {
......
......@@ -74,7 +74,7 @@ public:
ProFileEvaluator(ProFileOption *option);
virtual ~ProFileEvaluator();
ProFileEvaluator::TemplateType templateType();
ProFileEvaluator::TemplateType templateType() const;
void setVerbose(bool on); // Default is false
void setCumulative(bool on); // Default is true!
void setOutputDir(const QString &dir); // Default is empty
......
......@@ -335,9 +335,8 @@ ProFile::ProFile(const QString &fileName)
m_fileName(fileName)
{
int nameOff = fileName.lastIndexOf(QLatin1Char('/'));
m_displayFileName = QString(fileName.constData() + nameOff + 1,
fileName.length() - nameOff - 1);
m_directoryName = QString(fileName.constData(), nameOff);
m_displayFileName = fileName.mid(nameOff + 1);
m_directoryName = fileName.left(nameOff);
}
ProFile::~ProFile()
......
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