forked from qt-creator/qt-creator
Rename: bool "uncommentNextLine" -> "commentOutNextLine"
This commit is contained in:
@@ -249,16 +249,16 @@ QByteArray AbstractMobileApp::generateProFile(QString *errorMessage) const
|
||||
QTextStream out(&proFileContent, QIODevice::WriteOnly);
|
||||
|
||||
QString valueOnNextLine;
|
||||
bool uncommentNextLine = false;
|
||||
bool commentOutNextLine = false;
|
||||
QString line;
|
||||
while (!(line = in.readLine()).isNull()) {
|
||||
if (line.contains(QLatin1String("# TARGETUID3"))) {
|
||||
valueOnNextLine = symbianTargetUid();
|
||||
} else if (line.contains(QLatin1String("# NETWORKACCESS"))
|
||||
&& !networkEnabled()) {
|
||||
uncommentNextLine = true;
|
||||
commentOutNextLine = true;
|
||||
} else {
|
||||
handleCurrentProFileTemplateLine(line, in, out, uncommentNextLine);
|
||||
handleCurrentProFileTemplateLine(line, in, out, commentOutNextLine);
|
||||
}
|
||||
|
||||
// Remove all marker comments
|
||||
@@ -273,9 +273,9 @@ QByteArray AbstractMobileApp::generateProFile(QString *errorMessage) const
|
||||
continue;
|
||||
}
|
||||
|
||||
if (uncommentNextLine) {
|
||||
if (commentOutNextLine) {
|
||||
out << comment << line << endl;
|
||||
uncommentNextLine = false;
|
||||
commentOutNextLine = false;
|
||||
continue;
|
||||
}
|
||||
out << line << endl;
|
||||
|
||||
@@ -161,7 +161,7 @@ private:
|
||||
virtual bool adaptCurrentMainCppTemplateLine(QString &line) const=0;
|
||||
virtual void handleCurrentProFileTemplateLine(const QString &line,
|
||||
QTextStream &proFileTemplate, QTextStream &proFile,
|
||||
bool &uncommentNextLine) const=0;
|
||||
bool &commentOutNextLine) const = 0;
|
||||
virtual QList<AbstractGeneratedFileInfo> updateableFiles(const QString &mainProFile) const = 0;
|
||||
|
||||
QString m_projectName;
|
||||
|
||||
@@ -121,8 +121,9 @@ bool Html5App::adaptCurrentMainCppTemplateLine(QString &line) const
|
||||
|
||||
void Html5App::handleCurrentProFileTemplateLine(const QString &line,
|
||||
QTextStream &proFileTemplate, QTextStream &proFile,
|
||||
bool &uncommentNextLine) const
|
||||
bool &commentOutNextLine) const
|
||||
{
|
||||
Q_UNUSED(commentOutNextLine)
|
||||
if (line.contains(QLatin1String("# DEPLOYMENTFOLDERS"))) {
|
||||
// Eat lines
|
||||
QString nextLine;
|
||||
|
||||
@@ -99,7 +99,7 @@ private:
|
||||
virtual bool adaptCurrentMainCppTemplateLine(QString &line) const;
|
||||
virtual void handleCurrentProFileTemplateLine(const QString &line,
|
||||
QTextStream &proFileTemplate, QTextStream &proFile,
|
||||
bool &uncommentNextLine) const;
|
||||
bool &commentOutNextLine) const;
|
||||
QList<AbstractGeneratedFileInfo> updateableFiles(const QString &mainProFile) const;
|
||||
|
||||
QFileInfo m_indexHtmlFile;
|
||||
|
||||
@@ -86,12 +86,12 @@ bool MobileApp::adaptCurrentMainCppTemplateLine(QString &line) const
|
||||
|
||||
void MobileApp::handleCurrentProFileTemplateLine(const QString &line,
|
||||
QTextStream &proFileTemplate, QTextStream &proFile,
|
||||
bool &uncommentNextLine) const
|
||||
bool &commentOutNextLine) const
|
||||
{
|
||||
Q_UNUSED(line);
|
||||
Q_UNUSED(proFileTemplate);
|
||||
Q_UNUSED(proFile);
|
||||
Q_UNUSED(uncommentNextLine);
|
||||
Q_UNUSED(commentOutNextLine);
|
||||
}
|
||||
|
||||
Core::GeneratedFiles MobileApp::generateFiles(QString *errorMessage) const
|
||||
|
||||
@@ -79,7 +79,7 @@ private:
|
||||
virtual bool adaptCurrentMainCppTemplateLine(QString &line) const;
|
||||
virtual void handleCurrentProFileTemplateLine(const QString &line,
|
||||
QTextStream &proFileTemplate, QTextStream &proFile,
|
||||
bool &uncommentNextLine) const;
|
||||
bool &commentOutNextLine) const;
|
||||
QList<AbstractGeneratedFileInfo> updateableFiles(const QString &mainProFile) const;
|
||||
};
|
||||
|
||||
|
||||
@@ -217,7 +217,7 @@ bool QtQuickApp::adaptCurrentMainCppTemplateLine(QString &line) const
|
||||
|
||||
void QtQuickApp::handleCurrentProFileTemplateLine(const QString &line,
|
||||
QTextStream &proFileTemplate, QTextStream &proFile,
|
||||
bool &uncommentNextLine) const
|
||||
bool &commentOutNextLine) const
|
||||
{
|
||||
if (line.contains(QLatin1String("# DEPLOYMENTFOLDERS"))) {
|
||||
// Eat lines
|
||||
@@ -245,8 +245,8 @@ void QtQuickApp::handleCurrentProFileTemplateLine(const QString &line,
|
||||
proFile << "DEPLOYMENTFOLDERS = " << folders.join(QLatin1String(" ")) << endl;
|
||||
} else if (line.contains(QLatin1String("# QMLJSDEBUGGER"))) {
|
||||
// ### disabled for now; figure out the private headers problem first.
|
||||
//uncommentNextLine = true;
|
||||
Q_UNUSED(uncommentNextLine);
|
||||
//commentOutNextLine = true;
|
||||
Q_UNUSED(commentOutNextLine)
|
||||
} else if (line.contains(QLatin1String("# QML_IMPORT_PATH"))) {
|
||||
QString nextLine = proFileTemplate.readLine(); // eats 'QML_IMPORT_PATH ='
|
||||
if (!nextLine.startsWith(QLatin1String("QML_IMPORT_PATH =")))
|
||||
|
||||
@@ -134,7 +134,7 @@ private:
|
||||
virtual bool adaptCurrentMainCppTemplateLine(QString &line) const;
|
||||
virtual void handleCurrentProFileTemplateLine(const QString &line,
|
||||
QTextStream &proFileTemplate, QTextStream &proFile,
|
||||
bool &uncommentNextLine) const;
|
||||
bool &commentOutNextLine) const;
|
||||
QList<AbstractGeneratedFileInfo> updateableFiles(const QString &mainProFile) const;
|
||||
|
||||
bool addExternalModule(const QString &uri, const QFileInfo &dir,
|
||||
|
||||
Reference in New Issue
Block a user