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