summaryrefslogtreecommitdiffstats
path: root/tools/configure/configureapp.cpp
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2016-08-23 20:03:50 +0200
committerOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2016-08-25 11:57:45 +0000
commit1967fc7f63b7b3884667f96507d159be1b23a825 (patch)
treefd3aa11bd0ca73d849371dfb464f06025806daaa /tools/configure/configureapp.cpp
parentd76a756b03840ef9339ecc30f16e8580c7f323ea (diff)
fix location of config.{opt,status} in top-level builds
write them to the top-level build dir, not the qtbase build dir. the old files will be still used for a smooth migration. Task-number: QTBUG-46974 Change-Id: I6eae678ffc7dfb921ecd9e9012e79e3b915ad3fa Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'tools/configure/configureapp.cpp')
-rw-r--r--tools/configure/configureapp.cpp23
1 files changed, 12 insertions, 11 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 650ede7474..467af0e021 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -184,9 +184,13 @@ QString Configure::formatPath(const QString &path)
void Configure::parseCmdLine()
{
+ sourcePathMangled = sourcePath;
+ buildPathMangled = buildPath;
if (configCmdLine.size() && configCmdLine.at(0) == "-top-level") {
dictionary[ "TOPLEVEL" ] = "yes";
configCmdLine.removeAt(0);
+ sourcePathMangled = QFileInfo(sourcePath).path();
+ buildPathMangled = QFileInfo(buildPath).path();
}
int argCount = configCmdLine.size();
@@ -1025,12 +1029,6 @@ void Configure::generateMakefiles()
{
QString pwd = QDir::currentPath();
{
- QString sourcePathMangled = sourcePath;
- QString buildPathMangled = buildPath;
- if (dictionary.contains("TOPLEVEL")) {
- sourcePathMangled = QFileInfo(sourcePath).path();
- buildPathMangled = QFileInfo(buildPath).path();
- }
QStringList args;
args << buildPath + "/bin/qmake" << sourcePathMangled;
@@ -1180,11 +1178,14 @@ void Configure::readLicense()
void Configure::reloadCmdLine(int idx)
{
if (dictionary[ "REDO" ] == "yes") {
- QFile inFile(buildPath + "/config.opt");
+ QFile inFile(buildPathMangled + "/config.opt");
if (!inFile.open(QFile::ReadOnly)) {
- inFile.setFileName(buildPath + "/configure.cache");
- if (!inFile.open(QFile::ReadOnly))
- return;
+ inFile.setFileName(buildPath + "/config.opt");
+ if (!inFile.open(QFile::ReadOnly)) {
+ inFile.setFileName(buildPath + "/configure.cache");
+ if (!inFile.open(QFile::ReadOnly))
+ return;
+ }
}
QTextStream inStream(&inFile);
while (!inStream.atEnd())
@@ -1195,7 +1196,7 @@ void Configure::reloadCmdLine(int idx)
void Configure::saveCmdLine()
{
if (dictionary[ "REDO" ] != "yes") {
- QFile outFile(buildPath + "/config.opt");
+ QFile outFile(buildPathMangled + "/config.opt");
if (outFile.open(QFile::WriteOnly | QFile::Text)) {
QTextStream outStream(&outFile);
for (QStringList::Iterator it = configCmdLine.begin(); it != configCmdLine.end(); ++it) {