make failure to apply -redo fatal
like it already is on unix. Change-Id: Id55f8743ae0879fabe13c19ea214da74a35e43a6 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
parent
1183e59dd9
commit
c92f0d2049
@ -201,7 +201,10 @@ void Configure::parseCmdLine()
|
||||
if (configCmdLine.at(k) == "-redo") {
|
||||
dictionary["REDO"] = "yes";
|
||||
configCmdLine.removeAt(k);
|
||||
reloadCmdLine(k);
|
||||
if (!reloadCmdLine(k)) {
|
||||
dictionary["DONE"] = "error";
|
||||
return;
|
||||
}
|
||||
argCount = configCmdLine.size();
|
||||
break;
|
||||
}
|
||||
@ -1175,20 +1178,23 @@ void Configure::readLicense()
|
||||
}
|
||||
}
|
||||
|
||||
void Configure::reloadCmdLine(int idx)
|
||||
bool Configure::reloadCmdLine(int idx)
|
||||
{
|
||||
QFile inFile(buildPathMangled + "/config.opt");
|
||||
if (!inFile.open(QFile::ReadOnly)) {
|
||||
inFile.setFileName(buildPath + "/config.opt");
|
||||
if (!inFile.open(QFile::ReadOnly)) {
|
||||
inFile.setFileName(buildPath + "/configure.cache");
|
||||
if (!inFile.open(QFile::ReadOnly))
|
||||
return;
|
||||
if (!inFile.open(QFile::ReadOnly)) {
|
||||
cout << "No config.opt present - cannot redo configuration." << endl;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
QTextStream inStream(&inFile);
|
||||
while (!inStream.atEnd())
|
||||
configCmdLine.insert(idx++, inStream.readLine().trimmed());
|
||||
return true;
|
||||
}
|
||||
|
||||
void Configure::saveCmdLine()
|
||||
|
@ -85,7 +85,7 @@ private:
|
||||
void addConfStr(int group, const QString &val);
|
||||
QString formatPath(const QString &path);
|
||||
|
||||
void reloadCmdLine(int idx);
|
||||
bool reloadCmdLine(int idx);
|
||||
void saveCmdLine();
|
||||
|
||||
void applySpecSpecifics();
|
||||
|
Loading…
Reference in New Issue
Block a user