add $$shadowed() function

follow suit with qmake ...

Change-Id: Ic97576eaf74dfd58e8d8cd2f8034dac3963b92c4
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This commit is contained in:
Oswald Buddenhagen
2012-07-25 19:10:07 +02:00
parent b475ae43de
commit 187751f967
5 changed files with 43 additions and 1 deletions

View File

@@ -148,6 +148,26 @@ void QMakeGlobals::setCommandLineArguments(const QStringList &args)
postcmds = _postcmds.join(fL1S("\n"));
}
void QMakeGlobals::setDirectories(const QString &input_dir, const QString &output_dir)
{
if (input_dir != output_dir && !output_dir.isEmpty()) {
QString srcpath = input_dir;
if (!srcpath.endsWith(QLatin1Char('/')))
srcpath += QLatin1Char('/');
QString dstpath = output_dir;
if (!dstpath.endsWith(QLatin1Char('/')))
dstpath += QLatin1Char('/');
int srcLen = srcpath.length();
int dstLen = dstpath.length();
int lastSl = -1;
while (++lastSl, srcpath.at(--srcLen) == dstpath.at(--dstLen))
if (srcpath.at(srcLen) == QLatin1Char('/'))
lastSl = 0;
source_root = srcpath.left(srcLen + lastSl);
build_root = dstpath.left(dstLen + lastSl);
}
}
QString QMakeGlobals::getEnv(const QString &var) const
{
#ifndef QT_BOOTSTRAPPED