Rename: bool "uncommentNextLine" -> "commentOutNextLine"

This commit is contained in:
Alessandro Portale
2011-02-06 19:27:57 +01:00
parent 38edea5019
commit 661742711e
8 changed files with 16 additions and 15 deletions

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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

View File

@@ -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;
};

View File

@@ -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 =")))

View File

@@ -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,