Commit 8593b8b2 authored by Oswald Buddenhagen's avatar Oswald Buddenhagen
Browse files

add a bunch of missing functions.

code mostly c&p-d from qmake (sync from qt).
parent adc58b04
This diff is collapsed.
......@@ -68,6 +68,7 @@ public:
virtual bool contains(const QString &variableName) const;
QStringList absFileNames(const QString &variableName);
QStringList absFileName(const QString &name);
void setOutputDir(const QString &dir); // Default is empty
void setVerbose(bool on);
bool queryProFile(ProFile *pro);
......
......@@ -85,6 +85,25 @@ struct Option
Option::qmakespec = QString::fromLatin1(qgetenv("QMAKESPEC").data());
Option::field_sep = QLatin1Char(' ');
}
enum StringFixFlags {
FixNone = 0x00,
FixEnvVars = 0x01,
FixPathCanonicalize = 0x02,
FixPathToLocalSeparators = 0x04,
FixPathToTargetSeparators = 0x08
};
static QString fixString(QString string, uchar flags);
inline static QString fixPathToLocalOS(const QString &in, bool fix_env = true, bool canonical = true)
{
uchar flags = FixPathToLocalSeparators;
if (fix_env)
flags |= FixEnvVars;
if (canonical)
flags |= FixPathCanonicalize;
return fixString(in, flags);
}
};
#if defined(Q_OS_WIN32)
Option::TARG_MODE Option::target_mode = Option::TARG_WIN_MODE;
......
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