summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2009-08-06 11:36:06 (GMT)
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2009-08-06 11:36:06 (GMT)
commit31f4e677256487e7d167517ffd5dd4bef6bb4dd4 (patch)
tree3db0e9ee6f4a2d065ffd14f8bea32e5c4e797158 /qmake
parent3c0d46e59c3c1de863c695a40dcd9c42aaa29787 (diff)
downloadQt-31f4e677256487e7d167517ffd5dd4bef6bb4dd4.zip
Qt-31f4e677256487e7d167517ffd5dd4bef6bb4dd4.tar.gz
Qt-31f4e677256487e7d167517ffd5dd4bef6bb4dd4.tar.bz2
Code style fixes to qmake
Diffstat (limited to 'qmake')
-rw-r--r--qmake/generators/metamakefile.cpp77
-rw-r--r--qmake/generators/symbian/initprojectdeploy_symbian.cpp55
-rw-r--r--qmake/generators/symbian/symmake.cpp282
-rw-r--r--qmake/generators/symbian/symmake_abld.cpp31
-rw-r--r--qmake/generators/symbian/symmake_sbsv2.cpp29
-rw-r--r--qmake/project.cpp28
-rw-r--r--qmake/qpopen.cpp32
7 files changed, 264 insertions, 270 deletions
diff --git a/qmake/generators/metamakefile.cpp b/qmake/generators/metamakefile.cpp
index a5fe373..e22710d 100644
--- a/qmake/generators/metamakefile.cpp
+++ b/qmake/generators/metamakefile.cpp
@@ -452,18 +452,17 @@ QStringList SymbianSubdirsMetaMakefileGenerator::getDependencyList(QString mmpFi
QStringList list;
QList<QString> values = mmpDependency.values(mmpFilename);
- if(recursionDepth < 0) {
+ if (recursionDepth < 0) {
// special case; just first dependency level
list = values;
return list;
}
- if(values.size() == 0) {
+ if (values.size() == 0) {
//reached recursion END condition
- if(recursionDepth == 0) {
+ if (recursionDepth == 0) {
--recursionDepth;
return list; // empty list // no dependencies / return
- }
- else {
+ } else {
list.append(mmpFilename);
recursionDepth--;
return list; // leaf // return
@@ -473,13 +472,13 @@ QStringList SymbianSubdirsMetaMakefileGenerator::getDependencyList(QString mmpFi
for (int i = 0; i < values.size(); ++i) {
QString current = values.at(i);
QStringList tailList = getDependencyList(current, recursionDepth);
- for(int j = 0; j < tailList.size(); ++j) {
- QString path = tailList.at(j);
- list.append(path);
+ for (int j = 0; j < tailList.size(); ++j) {
+ QString path = tailList.at(j);
+ list.append(path);
}
}
- if(recursionDepth > 0) {
+ if (recursionDepth > 0) {
//for mmp somewhere in middle
list.append(mmpFilename);
}
@@ -510,7 +509,7 @@ QString SymbianSubdirsMetaMakefileGenerator::cleanFromSpecialCharacters(QString&
bool SymbianSubdirsMetaMakefileGenerator::init()
{
- if(init_flag)
+ if (init_flag)
return false;
init_flag = true;
@@ -519,15 +518,15 @@ bool SymbianSubdirsMetaMakefileGenerator::init()
Option::recursive = true;
- if(Option::recursive) {
+ if (Option::recursive) {
QString old_output_dir = QDir::cleanPath(Option::output_dir);
- if(!old_output_dir.endsWith('/'))
- old_output_dir += '/';
- QString old_output = Option::output.fileName();
+ if (!old_output_dir.endsWith('/'))
+ old_output_dir += '/';
+ QString old_output = Option::output.fileName();
QString oldpwd = QDir::cleanPath(qmake_getpwd());
- if(!oldpwd.endsWith('/'))
- oldpwd += '/';
+ if (!oldpwd.endsWith('/'))
+ oldpwd += '/';
// find the parent mmp filename
int end = oldpwd.size() - 1;
@@ -540,29 +539,28 @@ bool SymbianSubdirsMetaMakefileGenerator::init()
const QStringList &subdirs = project->values("SUBDIRS");
static int recurseDepth = -1;
++recurseDepth;
- for(int i = 0; i < subdirs.size(); ++i) {
+ for (int i = 0; i < subdirs.size(); ++i) {
Subdir *sub = new Subdir;
sub->indent = recurseDepth;
QFileInfo subdir(subdirs.at(i));
// childMmpFielname should be derived from subdirName
QString subdirName = subdirs.at(i);
- if(!project->isEmpty(subdirs.at(i) + ".file"))
+ if (!project->isEmpty(subdirs.at(i) + ".file"))
subdir = project->first(subdirs.at(i) + ".file");
- else if(!project->isEmpty(subdirs.at(i) + ".subdir"))
+ else if (!project->isEmpty(subdirs.at(i) + ".subdir"))
subdir = project->first(subdirs.at(i) + ".subdir");
QString sub_name;
QString childMmpFilename;
- if(subdir.isDir()) {
+ if (subdir.isDir()) {
subdir = QFileInfo(subdir.filePath() + "/" + subdir.fileName() + Option::pro_ext);
childMmpFilename = subdir.fileName();
childMmpFilename = subdir.absoluteFilePath();
childMmpFilename.replace(Option::pro_ext, QString(""));
childMmpFilename.append(Option::mmp_ext);
- }
- else {
+ } else {
childMmpFilename = subdir.absoluteFilePath();
childMmpFilename.replace(Option::pro_ext, Option::mmp_ext);
sub_name = childMmpFilename;
@@ -576,7 +574,7 @@ bool SymbianSubdirsMetaMakefileGenerator::init()
for (int ind = 0; ind < sub->indent; ++ind)
printf(" ");
sub->input_dir = subdir.absolutePath();
- if(subdir.isRelative() && old_output_dir != oldpwd) {
+ if (subdir.isRelative() && old_output_dir != oldpwd) {
sub->output_dir = old_output_dir + "/" + subdir.path();
printf("Reading %s [%s]\n", subdir.absoluteFilePath().toLatin1().constData(), sub->output_dir.toLatin1().constData());
} else {
@@ -590,10 +588,10 @@ bool SymbianSubdirsMetaMakefileGenerator::init()
QString newpwd = qmake_getpwd();
Option::output_dir = sub->output_dir;
- if(Option::output_dir.at(Option::output_dir.length()-1) != QLatin1Char('/'))
+ if (Option::output_dir.at(Option::output_dir.length() - 1) != QLatin1Char('/'))
Option::output_dir += QLatin1Char('/');
sub_proj->read(subdir.fileName());
- if(!sub_proj->variables()["QMAKE_FAILED_REQUIREMENTS"].isEmpty()) {
+ if (!sub_proj->variables()["QMAKE_FAILED_REQUIREMENTS"].isEmpty()) {
fprintf(stderr, "Project file(%s) not recursed because all requirements not met:\n\t%s\n",
subdir.fileName().toLatin1().constData(),
sub_proj->values("QMAKE_FAILED_REQUIREMENTS").join(" ").toLatin1().constData());
@@ -608,7 +606,7 @@ bool SymbianSubdirsMetaMakefileGenerator::init()
mmpDependency.insert(parentMmpFilename, childMmpFilename);
sub->makefile = MetaMakefileGenerator::createMetaGenerator(sub_proj, sub_name);
- if(0 && sub->makefile->type() == SUBDIRSMETATYPE) {
+ if (0 && sub->makefile->type() == SUBDIRSMETATYPE) {
subs.append(sub);
} else {
const QString output_name = Option::output.fileName();
@@ -626,7 +624,7 @@ bool SymbianSubdirsMetaMakefileGenerator::init()
}
--recurseDepth;
- Option::output.setFileName(old_output);
+ Option::output.setFileName(old_output);
Option::output_dir = old_output_dir;
qmake_setpwd(oldpwd);
}
@@ -637,7 +635,7 @@ bool SymbianSubdirsMetaMakefileGenerator::init()
// To fully expand find all dependencies:
// Do as recursion, then insert result as subdirs data in project
QString newpwd = qmake_getpwd();
- if(!newpwd.endsWith('/'))
+ if (!newpwd.endsWith('/'))
newpwd += '/';
int end = newpwd.size() - 1;
int start = newpwd.lastIndexOf("/", end - 2);
@@ -649,15 +647,15 @@ bool SymbianSubdirsMetaMakefileGenerator::init()
mmpPaths.insert(mmpFilename, newpwd);
QStringList directDependencyList = getDependencyList(mmpFilename, -1);
- for(int i = 0; i < directDependencyList.size(); ++i) {
+ for (int i = 0; i < directDependencyList.size(); ++i) {
project->values("MMPFILES_DIRECT_DEPENDS").append(directDependencyList.at(i));
}
QStringList dependencyList = getDependencyList(mmpFilename, 0);
self->output_dir = Option::output_dir;
- if(!Option::recursive || (!Option::output.fileName().endsWith(Option::dir_sep) && !QFileInfo(Option::output).isDir()))
- self->output_file = Option::output.fileName();
+ if (!Option::recursive || (!Option::output.fileName().endsWith(Option::dir_sep) && !QFileInfo(Option::output).isDir()))
+ self->output_file = Option::output.fileName();
self->makefile = new BuildsMetaMakefileGenerator(project, name, false);
self->makefile->init();
subs.append(self);
@@ -665,17 +663,18 @@ bool SymbianSubdirsMetaMakefileGenerator::init()
return true;
}
-QStringList SymbianSubdirsMetaMakefileGenerator::calculateRelativePaths(QString mmpParent, QStringList mmpChildren) {
+QStringList SymbianSubdirsMetaMakefileGenerator::calculateRelativePaths(QString mmpParent, QStringList mmpChildren)
+{
QStringList mmpRelativePaths;
QString parentDir = mmpPaths.value(mmpParent);
QDir directory(parentDir);
- for(int i = 0; i < mmpChildren.size(); ++i) {
+ for (int i = 0; i < mmpChildren.size(); ++i) {
QString childDir = mmpPaths.value(mmpChildren.at(i));
- if(mmpChildren.at(i) == mmpParent)
+ if (mmpChildren.at(i) == mmpParent)
mmpRelativePaths.append(mmpChildren.at(i));
else {
QString relativePath = directory.relativeFilePath(childDir);
- if(relativePath.startsWith(".."))
+ if (relativePath.startsWith(".."))
mmpRelativePaths.append(childDir);
else
directory.relativeFilePath(relativePath);
@@ -750,15 +749,15 @@ MetaMakefileGenerator *
MetaMakefileGenerator::createMetaGenerator(QMakeProject *proj, const QString &name, bool op)
{
MetaMakefileGenerator *ret = 0;
- if((Option::qmake_mode == Option::QMAKE_GENERATE_MAKEFILE ||
- Option::qmake_mode == Option::QMAKE_GENERATE_PRL)) {
- if(proj->first("MAKEFILE_GENERATOR").startsWith("SYMBIAN") && proj->values("TEMPLATE").contains("subdirs")) {
+ if ((Option::qmake_mode == Option::QMAKE_GENERATE_MAKEFILE ||
+ Option::qmake_mode == Option::QMAKE_GENERATE_PRL)) {
+ if (proj->first("MAKEFILE_GENERATOR").startsWith("SYMBIAN") && proj->values("TEMPLATE").contains("subdirs")) {
// new metamakefilegenerator type to support subdirs for symbian related projects
ret = new SymbianSubdirsMetaMakefileGenerator(proj, name, op);
} else if (proj->first("TEMPLATE").endsWith("subdirs"))
ret = new SubdirsMetaMakefileGenerator(proj, name, op);
}
- if(!ret)
+ if (!ret)
ret = new BuildsMetaMakefileGenerator(proj, name, op);
ret->init();
return ret;
diff --git a/qmake/generators/symbian/initprojectdeploy_symbian.cpp b/qmake/generators/symbian/initprojectdeploy_symbian.cpp
index 352c3cc..1dc75de 100644
--- a/qmake/generators/symbian/initprojectdeploy_symbian.cpp
+++ b/qmake/generators/symbian/initprojectdeploy_symbian.cpp
@@ -56,9 +56,9 @@ static bool isPlugin(const QFileInfo& info, const QString& devicePath)
// Libraries are plugins if deployment path is something else than
// SYSBIN_DIR with or without drive letter
if (0 == info.suffix().compare(QLatin1String(SUFFIX_DLL), Qt::CaseInsensitive) &&
- (devicePath.size() < 8 ||
- (0 != devicePath.compare(QLatin1String(SYSBIN_DIR), Qt::CaseInsensitive) &&
- 0 != devicePath.mid(1).compare(QLatin1String(":" SYSBIN_DIR), Qt::CaseInsensitive)))) {
+ (devicePath.size() < 8 ||
+ (0 != devicePath.compare(QLatin1String(SYSBIN_DIR), Qt::CaseInsensitive) &&
+ 0 != devicePath.mid(1).compare(QLatin1String(":" SYSBIN_DIR), Qt::CaseInsensitive)))) {
return true;
} else {
return false;
@@ -68,7 +68,7 @@ static bool isPlugin(const QFileInfo& info, const QString& devicePath)
static bool isBinary(const QFileInfo& info)
{
if (0 == info.suffix().compare(QLatin1String(SUFFIX_DLL), Qt::CaseInsensitive) ||
- 0 == info.suffix().compare(QLatin1String(SUFFIX_EXE), Qt::CaseInsensitive)) {
+ 0 == info.suffix().compare(QLatin1String(SUFFIX_EXE), Qt::CaseInsensitive)) {
return true;
} else {
return false;
@@ -79,14 +79,15 @@ static void createPluginStub(const QFileInfo& info,
const QString& devicePath,
DeploymentList &deploymentList,
QStringList& generatedDirs,
- QStringList& generatedFiles) {
+ QStringList& generatedFiles)
+{
QDir().mkpath(QLatin1String(PLUGIN_STUB_DIR "\\"));
if (!generatedDirs.contains(PLUGIN_STUB_DIR))
generatedDirs << PLUGIN_STUB_DIR;
// Plugin stubs must have different name from the actual plugins, because
// the toolchain for creating ROM images cannot handle non-binary .dll files properly.
QFile stubFile(QLatin1String(PLUGIN_STUB_DIR "\\") + info.completeBaseName() + "." SUFFIX_QTPLUGIN);
- if(stubFile.open(QIODevice::WriteOnly)) {
+ if (stubFile.open(QIODevice::WriteOnly)) {
if (!generatedFiles.contains(stubFile.fileName()))
generatedFiles << stubFile.fileName();
QTextStream t(&stubFile);
@@ -99,7 +100,7 @@ static void createPluginStub(const QFileInfo& info,
}
QFileInfo stubInfo(stubFile);
deploymentList.append(CopyItem(Option::fixPathToLocalOS(stubInfo.absoluteFilePath()),
- Option::fixPathToLocalOS(devicePath + "\\" + stubInfo.fileName())));
+ Option::fixPathToLocalOS(devicePath + "\\" + stubInfo.fileName())));
}
void initProjectDeploySymbian(QMakeProject* project,
@@ -115,7 +116,7 @@ void initProjectDeploySymbian(QMakeProject* project,
if (targetPath.isEmpty())
targetPath = testPath;
if (targetPath.endsWith("/") || targetPath.endsWith("\\"))
- targetPath = targetPath.mid(0,targetPath.size()-1);
+ targetPath = targetPath.mid(0, targetPath.size() - 1);
bool targetPathHasDriveLetter = false;
if (targetPath.size() > 1) {
@@ -126,9 +127,9 @@ void initProjectDeploySymbian(QMakeProject* project,
foreach(QString item, project->values("DEPLOYMENT")) {
QString devicePath = project->first(item + ".path");
if (!deployBinaries
- && !devicePath.isEmpty()
- && (0 == devicePath.compare(project->values("APP_RESOURCE_DIR").join(""), Qt::CaseInsensitive)
- || 0 == devicePath.compare(project->values("REG_RESOURCE_IMPORT_DIR").join(""), Qt::CaseInsensitive))) {
+ && !devicePath.isEmpty()
+ && (0 == devicePath.compare(project->values("APP_RESOURCE_DIR").join(""), Qt::CaseInsensitive)
+ || 0 == devicePath.compare(project->values("REG_RESOURCE_IMPORT_DIR").join(""), Qt::CaseInsensitive))) {
// Do not deploy resources in emulator builds, as that seems to cause conflicts
// If there is ever a real need to deploy pre-built resources for emulator,
// BLD_INF_RULES.prj_exports can be used as a workaround.
@@ -145,14 +146,14 @@ void initProjectDeploySymbian(QMakeProject* project,
}
// check if item.path is relative (! either / or \)
else if (!(devicePath.at(0) == QLatin1Char('/')
- || devicePath.at(0) == QLatin1Char('\\')
- || devicePathHasDriveLetter)) {
+ || devicePath.at(0) == QLatin1Char('\\')
+ || devicePathHasDriveLetter)) {
// create output path
devicePath = Option::fixPathToLocalOS(QDir::cleanPath(targetPath + QLatin1Char('\\') + devicePath));
} else {
if (0 == platform.compare(QLatin1String("winscw"), Qt::CaseInsensitive)) {
if (devicePathHasDriveLetter) {
- devicePath = epocRoot() + "epoc32\\winscw\\" + devicePath.remove(1,1);
+ devicePath = epocRoot() + "epoc32\\winscw\\" + devicePath.remove(1, 1);
} else {
devicePath = epocRoot() + "epoc32\\winscw\\c" + devicePath;
}
@@ -167,13 +168,13 @@ void initProjectDeploySymbian(QMakeProject* project,
devicePath.replace(QLatin1String("/"), QLatin1String("\\"));
if (!deployBinaries &&
- 0 == devicePath.right(8).compare(QLatin1String(SYSBIN_DIR), Qt::CaseInsensitive)) {
- // Skip deploying to SYSBIN_DIR for anything but binary deployments
- // Note: Deploying pre-built binaries also follow this rule, so emulator builds
- // will not get those deployed. Since there is no way to differentiate currently
- // between pre-built binaries for emulator and HW anyway, this is not a major issue.
- continue;
- }
+ 0 == devicePath.right(8).compare(QLatin1String(SYSBIN_DIR), Qt::CaseInsensitive)) {
+ // Skip deploying to SYSBIN_DIR for anything but binary deployments
+ // Note: Deploying pre-built binaries also follow this rule, so emulator builds
+ // will not get those deployed. Since there is no way to differentiate currently
+ // between pre-built binaries for emulator and HW anyway, this is not a major issue.
+ continue;
+ }
foreach(QString source, project->values(item + ".sources")) {
source = Option::fixPathToLocalOS(source);
@@ -198,7 +199,7 @@ void initProjectDeploySymbian(QMakeProject* project,
// Executables and libraries are deployed to \sys\bin
QFileInfo releasePath(epocRoot() + "epoc32\\release\\" + platform + "\\" + build + "\\");
deploymentList.append(CopyItem(Option::fixPathToLocalOS(releasePath.absolutePath() + "\\" + info.fileName()),
- Option::fixPathToLocalOS(deploymentDrive + QLatin1String(SYSBIN_DIR "\\") + info.fileName())));
+ Option::fixPathToLocalOS(deploymentDrive + QLatin1String(SYSBIN_DIR "\\") + info.fileName())));
}
if (isPlugin(info, devicePath)) {
createPluginStub(info, devicePath, deploymentList, generatedDirs, generatedFiles);
@@ -208,7 +209,7 @@ void initProjectDeploySymbian(QMakeProject* project,
// Generate deployment even if file doesn't exist, as this may be the case
// when generating .pkg files.
deploymentList.append(CopyItem(Option::fixPathToLocalOS(info.absoluteFilePath()),
- Option::fixPathToLocalOS(devicePath + "\\" + info.fileName())));
+ Option::fixPathToLocalOS(devicePath + "\\" + info.fileName())));
continue;
}
}
@@ -217,9 +218,9 @@ void initProjectDeploySymbian(QMakeProject* project,
int pathSize = info.absolutePath().size();
QDirIterator iterator(searchPath, QStringList() << nameFilter
, QDir::Files | QDir::NoDotAndDotDot | QDir::NoSymLinks
- , dirSearch ? QDirIterator::Subdirectories : QDirIterator::NoIteratorFlags );
+ , dirSearch ? QDirIterator::Subdirectories : QDirIterator::NoIteratorFlags);
- while(iterator.hasNext()) {
+ while (iterator.hasNext()) {
iterator.next();
QFileInfo iteratorInfo(iterator.filePath());
QString absoluteItemPath = Option::fixPathToLocalOS(iteratorInfo.absolutePath());
@@ -231,13 +232,13 @@ void initProjectDeploySymbian(QMakeProject* project,
// as they have SYSBIN_DIR target path.
if (deployBinaries) {
deploymentList.append(CopyItem(Option::fixPathToLocalOS(absoluteItemPath + "\\" + iterator.fileName()),
- Option::fixPathToLocalOS(deploymentDrive + QLatin1String(SYSBIN_DIR "\\") + iterator.fileName())));
+ Option::fixPathToLocalOS(deploymentDrive + QLatin1String(SYSBIN_DIR "\\") + iterator.fileName())));
}
createPluginStub(info, devicePath + "\\" + absoluteItemPath.right(diffSize), deploymentList, generatedDirs, generatedFiles);
continue;
} else {
deploymentList.append(CopyItem(Option::fixPathToLocalOS(absoluteItemPath + "\\" + iterator.fileName()),
- Option::fixPathToLocalOS(devicePath + "\\" + absoluteItemPath.right(diffSize) + "\\" + iterator.fileName())));
+ Option::fixPathToLocalOS(devicePath + "\\" + absoluteItemPath.right(diffSize) + "\\" + iterator.fileName())));
}
}
}
diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp
index 889ad6f..cc35857 100644
--- a/qmake/generators/symbian/symmake.cpp
+++ b/qmake/generators/symbian/symmake.cpp
@@ -122,7 +122,7 @@ QString SymbianMakefileGenerator::canonizePath(const QString& origPath)
resultPath = QDir::fromNativeSeparators(epocRoot()) + resultPath.mid(1);
QFileInfo fi(fileInfo(resultPath));
- if(fi.isDir()) {
+ if (fi.isDir()) {
resultPath = fi.canonicalFilePath();
} else {
resultPath = fi.canonicalPath();
@@ -196,7 +196,7 @@ bool SymbianMakefileGenerator::writeMakefile(QTextStream &t)
if (generatePkg) {
QStringList platformList = project->values("SYMBIAN_PLATFORMS");
foreach(QString platform, platformList) {
- if(platform.compare("WINSCW", Qt::CaseInsensitive)) {
+ if (platform.compare("WINSCW", Qt::CaseInsensitive)) {
generatePkgFile(platform.toLower(), "udeb", iconFile);
generatePkgFile(platform.toLower(), "urel", iconFile);
}
@@ -216,7 +216,7 @@ bool SymbianMakefileGenerator::writeMakefile(QTextStream &t)
}
QFile wrapperMakefile(wrapperFileName);
- if(wrapperMakefile.open(QIODevice::WriteOnly)) {
+ if (wrapperMakefile.open(QIODevice::WriteOnly)) {
generatedFiles << wrapperFileName;
} else {
PRINT_FILE_CREATE_ERROR(wrapperFileName);
@@ -224,13 +224,13 @@ bool SymbianMakefileGenerator::writeMakefile(QTextStream &t)
}
if (targetType == TypeSubdirs) {
- // If we have something to deploy, generate extension makefile for just that, since
- // normal extension makefile is not getting generated and we need emulator deployment to be done.
- if (generatePkg)
- writeMkFile(wrapperFileName, true);
- writeWrapperMakefile(wrapperMakefile, isPrimaryMakefile);
- return true;
- }
+ // If we have something to deploy, generate extension makefile for just that, since
+ // normal extension makefile is not getting generated and we need emulator deployment to be done.
+ if (generatePkg)
+ writeMkFile(wrapperFileName, true);
+ writeWrapperMakefile(wrapperMakefile, isPrimaryMakefile);
+ return true;
+ }
writeMkFile(wrapperFileName, false);
@@ -260,7 +260,7 @@ bool SymbianMakefileGenerator::writeMakefile(QTextStream &t)
void SymbianMakefileGenerator::generatePkgFile(const QString &compiler, const QString &config, const QString &iconFile)
{
- QString build = ( config == "udeb" ) ? "debug" : "release";
+ QString build = (config == "udeb") ? "debug" : "release";
QString pkgFilename = QString("%1_%2-%3.%4")
.arg(fileInfo(project->projectFile()).completeBaseName())
.arg(build)
@@ -287,7 +287,7 @@ void SymbianMakefileGenerator::generatePkgFile(const QString &compiler, const QS
QStringList pkgrulesValue = project->values(pkgrulesItem);
// If there is no stringlist defined for a rule, use rule name directly
// This is convenience for defining single line mmp statements
- if (pkgrulesValue.isEmpty()){
+ if (pkgrulesValue.isEmpty()) {
rawPkgPreRules << pkgrulesItem;
} else {
foreach(QString pkgrule, pkgrulesValue) {
@@ -299,38 +299,38 @@ void SymbianMakefileGenerator::generatePkgFile(const QString &compiler, const QS
// Apply some defaults if specific data does not exist in PKG pre-rules
- if(!containsStartWithItem('&', rawPkgPreRules)) {
+ if (!containsStartWithItem('&', rawPkgPreRules)) {
// language, (*** hardcoded to english atm, should be parsed from TRANSLATIONS)
t << "; Language" << endl;
t << "&EN" << endl << endl;
} else {
// In case user defines langs, he must take care also about SIS header
- if(!containsStartWithItem('#', rawPkgPreRules))
+ if (!containsStartWithItem('#', rawPkgPreRules))
fprintf(stderr, "Warning: If language is defined with DEPLOYMENT pkg_prerules, also the SIS header must be defined\n");
}
// name of application, UID and version
QString applicationVersion = project->first("VERSION").isEmpty() ? "1,0,0" : project->first("VERSION").replace('.', ',');
- if(!containsStartWithItem('#', rawPkgPreRules)) {
+ if (!containsStartWithItem('#', rawPkgPreRules)) {
t << "; SIS header: name, uid, version" << endl;
t << QString("#{\"%1\"},(%2),%3").arg(fixedTarget).arg(uid3).arg(applicationVersion) << endl << endl;
}
// Localized vendor name
- if(!containsStartWithItem('%', rawPkgPreRules)) {
+ if (!containsStartWithItem('%', rawPkgPreRules)) {
t << "; Localised Vendor name" << endl;
t << "%{\"Vendor\"}" << endl << endl;
}
// Unique vendor name
- if(!containsStartWithItem(':', rawPkgPreRules)) {
+ if (!containsStartWithItem(':', rawPkgPreRules)) {
t << "; Unique Vendor name" << endl;
t << ":\"Vendor\"" << endl << endl;
}
// PKG pre-rules - these are added before actual file installations i.e. SISX package body
- if(rawPkgPreRules.size()) {
+ if (rawPkgPreRules.size()) {
t << "; Manual PKG pre-rules from PRO files" << endl;
foreach(QString item, rawPkgPreRules) {
t << item << endl;
@@ -379,9 +379,9 @@ void SymbianMakefileGenerator::generatePkgFile(const QString &compiler, const QS
if (!iconFile.isEmpty()) {
t << QString("\"%1epoc32/data/z%2\" - \"!:%3\"")
- .arg(epocRoot())
- .arg(QString(myIconFile).replace('\\','/'))
- .arg(myIconFile) << endl << endl;
+ .arg(epocRoot())
+ .arg(QString(myIconFile).replace('\\','/'))
+ .arg(myIconFile) << endl << endl;
}
}
}
@@ -391,10 +391,10 @@ void SymbianMakefileGenerator::generatePkgFile(const QString &compiler, const QS
QString remoteTestPath;
remoteTestPath = QString("!:\\private\\%1").arg(privateDirUid);
- initProjectDeploySymbian( project, depList, remoteTestPath, true, compiler, config, generatedDirs, generatedFiles );
+ initProjectDeploySymbian(project, depList, remoteTestPath, true, compiler, config, generatedDirs, generatedFiles);
if (depList.size())
t << "; DEPLOYMENT" << endl;
- for (int i=0; i<depList.size(); ++i) {
+ for (int i = 0; i < depList.size(); ++i) {
t << QString("\"%1\" - \"%2\"")
.arg(QString(depList.at(i).from).replace('\\','/'))
.arg(depList.at(i).to) << endl;
@@ -408,7 +408,7 @@ void SymbianMakefileGenerator::generatePkgFile(const QString &compiler, const QS
QStringList pkgrulesValue = project->values(pkgrulesItem);
// If there is no stringlist defined for a rule, use rule name directly
// This is convenience for defining single line statements
- if (pkgrulesValue.isEmpty()){
+ if (pkgrulesValue.isEmpty()) {
t << pkgrulesItem << endl;
} else {
foreach(QString pkgrule, pkgrulesValue) {
@@ -422,23 +422,23 @@ void SymbianMakefileGenerator::generatePkgFile(const QString &compiler, const QS
bool SymbianMakefileGenerator::containsStartWithItem(const QChar &c, const QStringList& src)
{
- bool result = false;
- foreach (QString str, src) {
- if (str.startsWith(c)) {
- result = true;
- break;
+ bool result = false;
+ foreach(QString str, src) {
+ if (str.startsWith(c)) {
+ result = true;
+ break;
}
- }
- return result;
+ }
+ return result;
}
void SymbianMakefileGenerator::writeCustomDefFile()
{
- if(targetType == TypePlugin && !project->values("CONFIG").contains("stdbinary", Qt::CaseInsensitive)) {
+ if (targetType == TypePlugin && !project->values("CONFIG").contains("stdbinary", Qt::CaseInsensitive)) {
// Create custom def file for plugin
QFile ft(QLatin1String(PLUGIN_COMMON_DEF_FILE_ACTUAL));
- if(ft.open(QIODevice::WriteOnly)) {
+ if (ft.open(QIODevice::WriteOnly)) {
generatedFiles << ft.fileName();
QTextStream t(&ft);
@@ -472,10 +472,10 @@ void SymbianMakefileGenerator::init()
fixedTarget = escapeFilePath(fileFixify(project->first("TARGET")));
fixedTarget = removePathSeparators(fixedTarget);
- if(0 != project->values("QMAKE_PLATFORM").size())
+ if (0 != project->values("QMAKE_PLATFORM").size())
platform = varGlue("QMAKE_PLATFORM", "", " ", "");
- if(0 == project->values("QMAKESPEC").size())
+ if (0 == project->values("QMAKESPEC").size())
project->values("QMAKESPEC").append(qgetenv("QMAKESPEC"));
project->values("QMAKE_LIBS") += escapeFilePaths(project->values("LIBS"));
@@ -487,40 +487,40 @@ void SymbianMakefileGenerator::init()
initMmpVariables();
// Check TARGET.UID2 and TARGET.UID3 presence
- if(0 != project->values("TARGET.UID3").size()) {
+ if (0 != project->values("TARGET.UID3").size()) {
uid3 = project->first("TARGET.UID3");
} else {
uid3 = generateUID3();
}
- if((project->values("TEMPLATE")).contains("app"))
+ if ((project->values("TEMPLATE")).contains("app"))
targetType = TypeExe;
- else if((project->values("TEMPLATE")).contains("lib")) {
+ else if ((project->values("TEMPLATE")).contains("lib")) {
// Check CONFIG to see if we are to build staticlib or dll
- if(project->values("CONFIG").contains("staticlib") || project->values("CONFIG").contains("static"))
+ if (project->values("CONFIG").contains("staticlib") || project->values("CONFIG").contains("static"))
targetType = TypeLib;
else if (project->values("CONFIG").contains("plugin"))
targetType = TypePlugin;
else
targetType = TypeDll;
- }
- else
+ } else {
targetType = TypeSubdirs;
+ }
- if(0 != project->values("TARGET.UID2").size()) {
+ if (0 != project->values("TARGET.UID2").size()) {
uid2 = project->first("TARGET.UID2");
} else if (project->values("CONFIG").contains("stdbinary", Qt::CaseInsensitive)) {
uid2 = "0x20004C45";
} else {
- if(targetType == TypeExe) {
- if(project->values("QT").contains("gui", Qt::CaseInsensitive)) {
+ if (targetType == TypeExe) {
+ if (project->values("QT").contains("gui", Qt::CaseInsensitive)) {
// exe and gui -> uid2 needed
uid2 = "0x100039CE";
} else {
// exe but not gui: uid2 is ignored anyway -> set it to 0
uid2 = "0";
}
- } else if(targetType == TypeDll || targetType == TypeLib || targetType == TypePlugin) {
+ } else if (targetType == TypeDll || targetType == TypeLib || targetType == TypePlugin) {
uid2 = "0x1000008d";
}
}
@@ -538,14 +538,14 @@ void SymbianMakefileGenerator::init()
} else {
privateDirUid.setNum(uidNum, 16);
while (privateDirUid.length() < 8)
- privateDirUid.insert(0,QLatin1Char('0'));
+ privateDirUid.insert(0, QLatin1Char('0'));
}
}
QString SymbianMakefileGenerator::getTargetExtension()
{
QString ret;
- if(targetType == TypeExe) {
+ if (targetType == TypeExe) {
ret.append("exe");
} else if (targetType == TypeLib) {
ret.append("lib");
@@ -582,12 +582,12 @@ void SymbianMakefileGenerator::initMmpVariables()
QDir current = QDir::current();
QString canonizedCurrent = canonizePath(".");
- for(int j = 0; j < srcpaths.size(); ++j) {
+ for (int j = 0; j < srcpaths.size(); ++j) {
QFileInfo fi(fileInfo(srcpaths.at(j)));
// Sometimes sources have other than *.c* files (e.g. *.moc); prune them.
if (fi.suffix().startsWith("c")) {
- if(fi.filePath().length() > fi.fileName().length() ) {
- appendIfnotExist(srcincpaths, fi.path() );
+ if (fi.filePath().length() > fi.fileName().length()) {
+ appendIfnotExist(srcincpaths, fi.path());
sources[canonizePath(fi.path())] += fi.fileName();
} else {
sources[canonizedCurrent] += fi.fileName();
@@ -605,7 +605,7 @@ void SymbianMakefileGenerator::initMmpVariables()
incpaths << project->values("UI_DIR");
QString epocPath("epoc32");
- for(int j = 0; j < incpaths.size(); ++j) {
+ for (int j = 0; j < incpaths.size(); ++j) {
QString includepath = canonizePath(incpaths.at(j));
appendIfnotExist(sysincspaths, includepath);
// As a workaround for Symbian toolchain insistence to treat include
@@ -621,18 +621,18 @@ void SymbianMakefileGenerator::initMmpVariables()
// Remove duplicate include path entries
QStringList temporary;
- for(int i = 0; i < sysincspaths.size(); ++i) {
+ for (int i = 0; i < sysincspaths.size(); ++i) {
QString origPath = sysincspaths.at(i);
QFileInfo origPathInfo(fileInfo(origPath));
bool bFound = false;
- for(int j = 0; j < temporary.size(); ++j) {
+ for (int j = 0; j < temporary.size(); ++j) {
QString tmpPath = temporary.at(j);
QFileInfo tmpPathInfo(fileInfo(tmpPath));
- if(origPathInfo.absoluteFilePath() == tmpPathInfo.absoluteFilePath()) {
+ if (origPathInfo.absoluteFilePath() == tmpPathInfo.absoluteFilePath()) {
bFound = true;
- if(!tmpPathInfo.isRelative() && origPathInfo.isRelative()) {
+ if (!tmpPathInfo.isRelative() && origPathInfo.isRelative()) {
// We keep the relative notation
temporary.removeOne(tmpPath);
temporary << origPath;
@@ -640,7 +640,7 @@ void SymbianMakefileGenerator::initMmpVariables()
}
}
- if(!bFound)
+ if (!bFound)
temporary << origPath;
}
@@ -655,9 +655,9 @@ bool SymbianMakefileGenerator::removeDuplicatedStrings(QStringList& stringList)
{
QStringList tmpStringList;
- for(int i = 0; i < stringList.size(); ++i) {
+ for (int i = 0; i < stringList.size(); ++i) {
QString string = stringList.at(i);
- if(tmpStringList.contains(string))
+ if (tmpStringList.contains(string))
continue;
else
tmpStringList.append(string);
@@ -675,14 +675,14 @@ void SymbianMakefileGenerator::writeMmpFileHeader(QTextStream &t)
t << QDateTime::currentDateTime().toString(Qt::ISODate) << endl;
t << "// This file is generated by qmake and should not be modified by the" << endl;
t << "// user." << endl;
- t << "// Name : " << escapeFilePath(fileFixify(project->projectFile().remove(project->projectFile().length()-4,4))) << Option::mmp_ext << endl;
+ t << "// Name : " << escapeFilePath(fileFixify(project->projectFile().remove(project->projectFile().length() - 4, 4))) << Option::mmp_ext << endl;
t << "// ==============================================================================" << endl << endl;
}
void SymbianMakefileGenerator::writeMmpFile(QString &filename, QStringList &symbianLangCodes)
{
QFile ft(filename);
- if(ft.open(QIODevice::WriteOnly)) {
+ if (ft.open(QIODevice::WriteOnly)) {
generatedFiles << ft.fileName();
QTextStream t(&ft);
@@ -699,7 +699,7 @@ void SymbianMakefileGenerator::writeMmpFile(QString &filename, QStringList &symb
QDir current = QDir::current();
- for(QMap<QString, QStringList>::iterator it = sources.begin(); it != sources.end(); ++it) {
+ for (QMap<QString, QStringList>::iterator it = sources.begin(); it != sources.end(); ++it) {
QStringList values = it.value();
QString currentSourcePath = it.key();
@@ -737,7 +737,7 @@ void SymbianMakefileGenerator::writeMmpFileMacrosPart(QTextStream& t)
QStringList &defines = project->values("DEFINES");
if (defines.size())
t << "// Qt Macros" << endl;
- for(int i = 0; i < defines.size(); ++i) {
+ for (int i = 0; i < defines.size(); ++i) {
QString def = defines.at(i);
addMacro(t, def);
}
@@ -746,7 +746,7 @@ void SymbianMakefileGenerator::writeMmpFileMacrosPart(QTextStream& t)
QStringList &exp_defines = project->values("PRL_EXPORT_DEFINES");
if (exp_defines.size())
t << endl << "// Qt Export Defines" << endl;
- for(int i = 0; i < exp_defines.size(); ++i) {
+ for (int i = 0; i < exp_defines.size(); ++i) {
QString def = exp_defines.at(i);
addMacro(t, def);
}
@@ -756,25 +756,25 @@ void SymbianMakefileGenerator::writeMmpFileMacrosPart(QTextStream& t)
void SymbianMakefileGenerator::addMacro(QTextStream& t, const QString& value)
{
- t << "MACRO" << "\t\t" << value << endl;
+ t << "MACRO" << "\t\t" << value << endl;
}
void SymbianMakefileGenerator::writeMmpFileTargetPart(QTextStream& t)
{
- if(targetType == TypeExe) {
+ if (targetType == TypeExe) {
t << MMP_TARGET << "\t\t" << fixedTarget.append(".exe") << "\n";
if (project->values("CONFIG").contains("stdbinary", Qt::CaseInsensitive))
t << MMP_TARGETTYPE << "\t\t" << "STDEXE" << endl;
else
t << MMP_TARGETTYPE << "\t\t" << "EXE" << endl;
- } else if (targetType == TypeDll || targetType == TypePlugin){
+ } else if (targetType == TypeDll || targetType == TypePlugin) {
t << MMP_TARGET << "\t\t" << fixedTarget.append(".dll") << "\n";
if (project->values("CONFIG").contains("stdbinary", Qt::CaseInsensitive))
t << MMP_TARGETTYPE << "\t\t" << "STDDLL" << endl;
else
t << MMP_TARGETTYPE << "\t\t" << "DLL" << endl;
- } else if (targetType == TypeLib){
+ } else if (targetType == TypeLib) {
t << MMP_TARGET << "\t\t" << fixedTarget.append(".lib") << "\n";
if (project->values("CONFIG").contains("stdbinary", Qt::CaseInsensitive))
t << MMP_TARGETTYPE << "\t\t" << "STDLIB" << endl;
@@ -788,30 +788,30 @@ void SymbianMakefileGenerator::writeMmpFileTargetPart(QTextStream& t)
t << "UID" << "\t\t" << uid2 << " " << uid3 << endl;
- if(0 != project->values("TARGET.SID").size()) {
+ if (0 != project->values("TARGET.SID").size()) {
t << MMP_SECUREID << "\t\t" << project->values("TARGET.SID").join(" ") << endl;
} else {
- if(0 == uid3.size())
+ if (0 == uid3.size())
t << MMP_SECUREID << "\t\t" << "0" << endl;
else
t << MMP_SECUREID << "\t\t" << uid3 << endl;
}
// default value used from mkspecs is 0
- if(0 != project->values("TARGET.VID").size()) {
+ if (0 != project->values("TARGET.VID").size()) {
t << "VENDORID" << "\t\t" << project->values("TARGET.VID").join(" ") << endl;
}
t << endl;
- if(0 != project->first("TARGET.EPOCSTACKSIZE").size())
+ if (0 != project->first("TARGET.EPOCSTACKSIZE").size())
t << "EPOCSTACKSIZE" << "\t\t" << project->first("TARGET.EPOCSTACKSIZE") << endl;
- if(0 != project->values("TARGET.EPOCHEAPSIZE").size())
+ if (0 != project->values("TARGET.EPOCHEAPSIZE").size())
t << "EPOCHEAPSIZE" << "\t\t" << project->values("TARGET.EPOCHEAPSIZE").join(" ") << endl;
- if(0 != project->values("TARGET.EPOCALLOWDLLDATA").size())
+ if (0 != project->values("TARGET.EPOCALLOWDLLDATA").size())
t << "EPOCALLOWDLLDATA" << endl;
- if(targetType == TypePlugin && !project->values("CONFIG").contains("stdbinary", Qt::CaseInsensitive)) {
+ if (targetType == TypePlugin && !project->values("CONFIG").contains("stdbinary", Qt::CaseInsensitive)) {
// Use custom def file for Qt plugins
t << "DEFFILE " PLUGIN_COMMON_DEF_FILE_FOR_MMP << endl;
}
@@ -826,8 +826,8 @@ void SymbianMakefileGenerator::writeMmpFileTargetPart(QTextStream& t)
*/
void SymbianMakefileGenerator::writeMmpFileResourcePart(QTextStream& t, QStringList &symbianLangCodes)
{
- if((targetType == TypeExe) &&
- !project->values("CONFIG").contains("no_icon", Qt::CaseInsensitive)) {
+ if ((targetType == TypeExe) &&
+ !project->values("CONFIG").contains("no_icon", Qt::CaseInsensitive)) {
QString locTarget = fixedTarget;
locTarget.append(".rss");
@@ -840,7 +840,7 @@ void SymbianMakefileGenerator::writeMmpFileResourcePart(QTextStream& t, QStringL
t << endl;
t << "START RESOURCE\t\t" << locTarget << endl;
t << "HEADER" << endl;
- t << "TARGETPATH\t\t\t" RESOURCE_DIRECTORY_MMP<< endl;
+ t << "TARGETPATH\t\t\t" RESOURCE_DIRECTORY_MMP << endl;
t << "END" << endl << endl;
QString regTarget = fixedTarget;
@@ -852,14 +852,14 @@ void SymbianMakefileGenerator::writeMmpFileResourcePart(QTextStream& t, QStringL
t << "DEPENDS " << fixedTarget << ".rsg" << endl;
t << "TARGETPATH\t\t" REGISTRATION_RESOURCE_DIRECTORY_HW << endl;
t << "END" << endl << endl;
- }
+ }
}
void SymbianMakefileGenerator::writeMmpFileSystemIncludePart(QTextStream& t)
{
QDir current = QDir::current();
- for(QMap<QString, QStringList>::iterator it = systeminclude.begin(); it != systeminclude.end(); ++it) {
+ for (QMap<QString, QStringList>::iterator it = systeminclude.begin(); it != systeminclude.end(); ++it) {
QStringList values = it.value();
for (int i = 0; i < values.size(); ++i) {
QString handledPath = values.at(i);
@@ -882,11 +882,11 @@ void SymbianMakefileGenerator::writeMmpFileLibraryPart(QTextStream& t)
removeDuplicatedStrings(libs);
- for(int i = 0; i < libs.size(); ++i) {
+ for (int i = 0; i < libs.size(); ++i) {
QString lib = libs.at(i);
// The -L flag is uninteresting, since all symbian libraries exist in the same directory.
- if(lib.startsWith("-l")) {
- lib.remove(0,2);
+ if (lib.startsWith("-l")) {
+ lib.remove(0, 2);
QString mmpStatement;
if (lib.endsWith(".dll")) {
lib.chop(4);
@@ -917,16 +917,15 @@ void SymbianMakefileGenerator::writeMmpFileLibraryPart(QTextStream& t)
void SymbianMakefileGenerator::writeMmpFileCapabilityPart(QTextStream& t)
{
- if(0 != project->first("TARGET.CAPABILITY").size()) {
+ if (0 != project->first("TARGET.CAPABILITY").size()) {
QStringList &capabilities = project->values("TARGET.CAPABILITY");
t << "CAPABILITY" << "\t\t";
- for(int i = 0; i < capabilities.size(); ++i) {
+ for (int i = 0; i < capabilities.size(); ++i) {
QString cap = capabilities.at(i);
t << cap << " ";
}
- }
- else {
+ } else {
t << "CAPABILITY" << "\t\t" << "None";
}
t << endl << endl;
@@ -936,34 +935,34 @@ void SymbianMakefileGenerator::writeMmpFileCompilerOptionPart(QTextStream& t)
{
QString cw, armcc;
- if(0 != project->values("QMAKE_CXXFLAGS.CW").size()) {
+ if (0 != project->values("QMAKE_CXXFLAGS.CW").size()) {
cw.append(project->values("QMAKE_CXXFLAGS.CW").join(" "));
cw.append(" ");
}
- if(0 != project->values("QMAKE_CXXFLAGS.ARMCC").size()) {
+ if (0 != project->values("QMAKE_CXXFLAGS.ARMCC").size()) {
armcc.append(project->values("QMAKE_CXXFLAGS.ARMCC").join(" "));
armcc.append(" ");
}
- if(0 != project->values("QMAKE_CFLAGS.CW").size()) {
+ if (0 != project->values("QMAKE_CFLAGS.CW").size()) {
cw.append(project->values("QMAKE_CFLAGS.CW").join(" "));
cw.append(" ");
}
- if(0 != project->values("QMAKE_CFLAGS.ARMCC").size()) {
+ if (0 != project->values("QMAKE_CFLAGS.ARMCC").size()) {
armcc.append(project->values("QMAKE_CFLAGS.ARMCC").join(" "));
armcc.append(" ");
}
- if(0 != project->values("QMAKE_CXXFLAGS").size()) {
+ if (0 != project->values("QMAKE_CXXFLAGS").size()) {
cw.append(project->values("QMAKE_CXXFLAGS").join(" "));
cw.append(" ");
armcc.append(project->values("QMAKE_CXXFLAGS").join(" "));
armcc.append(" ");
}
- if(0 != project->values("QMAKE_CFLAGS").size()) {
+ if (0 != project->values("QMAKE_CFLAGS").size()) {
cw.append(project->values("QMAKE_CFLAGS").join(" "));
cw.append(" ");
armcc.append(project->values("QMAKE_CFLAGS").join(" "));
@@ -978,7 +977,7 @@ void SymbianMakefileGenerator::writeMmpFileCompilerOptionPart(QTextStream& t)
if (!cw.isEmpty())
t << "OPTION" << '\t' << " CW " << cw << endl;
if (!armcc.isEmpty())
- t << "OPTION" << '\t' << " ARMCC "<< armcc << endl;
+ t << "OPTION" << '\t' << " ARMCC " << armcc << endl;
t << endl;
}
@@ -1039,9 +1038,9 @@ void SymbianMakefileGenerator::writeBldInfContent(QTextStream &t, bool addDeploy
{
// Read user defined bld inf rules
QMap<QString, QStringList> userBldInfRules;
- for(QMap<QString, QStringList>::iterator it = project->variables().begin(); it != project->variables().end(); ++it) {
+ for (QMap<QString, QStringList>::iterator it = project->variables().begin(); it != project->variables().end(); ++it) {
if (it.key().startsWith(BLD_INF_RULES_BASE)) {
- QString newKey = it.key().mid(sizeof(BLD_INF_RULES_BASE)-1);
+ QString newKey = it.key().mid(sizeof(BLD_INF_RULES_BASE) - 1);
if (newKey.isEmpty()) {
fprintf(stderr, "Warning: Empty BLD_INF_RULES key encountered\n");
continue;
@@ -1069,7 +1068,7 @@ void SymbianMakefileGenerator::writeBldInfContent(QTextStream &t, bool addDeploy
mmpfilename = mmpfilename.replace(mmpfilename.lastIndexOf("."), 4, Option::mmp_ext);
QString currentPath = qmake_getpwd();
- if(!currentPath.endsWith(QString("/")))
+ if (!currentPath.endsWith(QString("/")))
currentPath.append("/");
QStringList mmpProjects = project->values("MMPFILES_DIRECT_DEPENDS");
@@ -1081,7 +1080,7 @@ void SymbianMakefileGenerator::writeBldInfContent(QTextStream &t, bool addDeploy
// Go in reverse order as that is the way how we build the list
QListIterator<QString> iT(mmpProjects);
iT.toBack();
- while(iT.hasPrevious()) {
+ while (iT.hasPrevious()) {
QString fullMmpName = iT.previous();
QString relativePath;
QString bldinfFilename;
@@ -1094,13 +1093,13 @@ void SymbianMakefileGenerator::writeBldInfContent(QTextStream &t, bool addDeploy
cleanMmpName.replace(Option::pro_ext, QString(""));
cleanMmpName.replace(0, cleanMmpName.lastIndexOf("/") + 1, QString(""));
- if(shadowProjects.contains(BLD_INF_FILENAME "." + cleanMmpName)) { // shadow project
+ if (shadowProjects.contains(BLD_INF_FILENAME "." + cleanMmpName)) { // shadow project
QDir directory(currentPath);
relativePath = directory.relativeFilePath(fullProFilename);
bldinfFilename = BLD_INF_FILENAME "." + cleanMmpName;
- if(relativePath.contains("/")) {
+ if (relativePath.contains("/")) {
// Shadow .pro not in same directory as parent .pro
- if(relativePath.startsWith("..")) {
+ if (relativePath.startsWith("..")) {
// Shadow .pro out of parent .pro
relativePath.replace(relativePath.lastIndexOf("/"), relativePath.length(), QString(""));
bldinfFilename.prepend("/").prepend(relativePath);
@@ -1131,7 +1130,7 @@ void SymbianMakefileGenerator::writeBldInfContent(QTextStream &t, bool addDeploy
// Add supported project platforms
t << endl << BLD_INF_TAG_PLATFORMS << endl << endl;
- if(0 != project->values("SYMBIAN_PLATFORMS").size())
+ if (0 != project->values("SYMBIAN_PLATFORMS").size())
t << project->values("SYMBIAN_PLATFORMS").join(" ") << endl;
QStringList userItems = userBldInfRules.value(BLD_INF_TAG_PLATFORMS);
@@ -1179,7 +1178,7 @@ void SymbianMakefileGenerator::writeBldInfContent(QTextStream &t, bool addDeploy
// Add rest of the user defined content
- for(QMap<QString, QStringList>::iterator it = userBldInfRules.begin(); it != userBldInfRules.end(); ++it) {
+ for (QMap<QString, QStringList>::iterator it = userBldInfRules.begin(); it != userBldInfRules.end(); ++it) {
t << endl << endl << it.key() << endl << endl;
userItems = it.value();
foreach(QString item, userItems)
@@ -1192,7 +1191,7 @@ void SymbianMakefileGenerator::writeRegRssFile(QString &appName, QStringList &us
QString filename(appName);
filename.append("_reg.rss");
QFile ft(filename);
- if(ft.open(QIODevice::WriteOnly)) {
+ if (ft.open(QIODevice::WriteOnly)) {
generatedFiles << ft.fileName();
QTextStream t(&ft);
t << "// ============================================================================" << endl;
@@ -1227,7 +1226,7 @@ void SymbianMakefileGenerator::writeRssFile(QString &appName, QString &numberOfI
QString filename(appName);
filename.append(".rss");
QFile ft(filename);
- if(ft.open(QIODevice::WriteOnly)) {
+ if (ft.open(QIODevice::WriteOnly)) {
generatedFiles << ft.fileName();
QTextStream t(&ft);
t << "// ============================================================================" << endl;
@@ -1248,12 +1247,11 @@ void SymbianMakefileGenerator::writeRssFile(QString &appName, QString &numberOfI
t << "\t\t{" << endl;
t << "\t\tcaption = STRING_r_caption;" << endl;
- if(numberOfIcons.isEmpty() || iconFile.isEmpty() ) {
+ if (numberOfIcons.isEmpty() || iconFile.isEmpty()) {
// There can be maximum one item in this tag, validated when parsed
t << "\t\tnumber_of_icons = 0;" << endl;
t << "\t\ticon_file = \"\";" << endl;
- }
- else {
+ } else {
// There can be maximum one item in this tag, validated when parsed
t << "\t\tnumber_of_icons = " << numberOfIcons << ";" << endl;
t << "\t\ticon_file = \"" << iconFile << "\";" << endl;
@@ -1271,7 +1269,7 @@ void SymbianMakefileGenerator::writeLocFile(QString &appName, QStringList &symbi
QString filename(appName);
filename.append(".loc");
QFile ft(filename);
- if(ft.open(QIODevice::WriteOnly)) {
+ if (ft.open(QIODevice::WriteOnly)) {
generatedFiles << ft.fileName();
QTextStream t(&ft);
t << "// ============================================================================" << endl;
@@ -1302,9 +1300,9 @@ void SymbianMakefileGenerator::writeLocFile(QString &appName, QStringList &symbi
void SymbianMakefileGenerator::readRssRules(QString &numberOfIcons, QString &iconFile, QStringList &userRssRules)
{
- for(QMap<QString, QStringList>::iterator it = project->variables().begin(); it != project->variables().end(); ++it) {
+ for (QMap<QString, QStringList>::iterator it = project->variables().begin(); it != project->variables().end(); ++it) {
if (it.key().startsWith(RSS_RULES_BASE)) {
- QString newKey = it.key().mid(sizeof(RSS_RULES_BASE)-1);
+ QString newKey = it.key().mid(sizeof(RSS_RULES_BASE) - 1);
if (newKey.isEmpty()) {
fprintf(stderr, "Warning: Empty RSS_RULES_BASE key encountered\n");
continue;
@@ -1328,7 +1326,7 @@ void SymbianMakefileGenerator::readRssRules(QString &numberOfIcons, QString &ico
numberOfIcons = newValues[0];
} else {
fprintf(stderr, "Warning: There must be exactly one value in '%s%s'\n",
- RSS_RULES_BASE, RSS_TAG_NBROFICONS);
+ RSS_RULES_BASE, RSS_TAG_NBROFICONS);
continue;
}
// Verify thet there is exactly one value in RSS_TAG_ICONFILE
@@ -1337,12 +1335,12 @@ void SymbianMakefileGenerator::readRssRules(QString &numberOfIcons, QString &ico
iconFile = newValues[0];
} else {
fprintf(stderr, "Warning: There must be exactly one value in '%s%s'\n",
- RSS_RULES_BASE, RSS_TAG_ICONFILE);
+ RSS_RULES_BASE, RSS_TAG_ICONFILE);
continue;
}
} else {
fprintf(stderr, "Warning: Unsupported key:'%s%s'\n",
- RSS_RULES_BASE, newKey.toLatin1().constData());
+ RSS_RULES_BASE, newKey.toLatin1().constData());
continue;
}
}
@@ -1360,16 +1358,16 @@ void SymbianMakefileGenerator::readRssRules(QString &numberOfIcons, QString &ico
// Validate that either both RSS_TAG_NBROFICONS and RSS_TAG_ICONFILE keys exist
// or neither of them exist
- if ( !((numberOfIcons.isEmpty() && iconFile.isEmpty()) ||
- (!numberOfIcons.isEmpty() && !iconFile.isEmpty())) ) {
+ if (!((numberOfIcons.isEmpty() && iconFile.isEmpty()) ||
+ (!numberOfIcons.isEmpty() && !iconFile.isEmpty()))) {
numberOfIcons.clear();
iconFile.clear();
fprintf(stderr, "Warning: Both or neither of '%s%s' and '%s%s' keys must exist.\n",
- RSS_RULES_BASE, RSS_TAG_NBROFICONS, RSS_RULES_BASE, RSS_TAG_ICONFILE );
+ RSS_RULES_BASE, RSS_TAG_NBROFICONS, RSS_RULES_BASE, RSS_TAG_ICONFILE);
}
// Validate that RSS_TAG_NBROFICONS contains only numbers
- if( !numberOfIcons.isEmpty() ) {
+ if (!numberOfIcons.isEmpty()) {
bool ok;
numberOfIcons = numberOfIcons.simplified();
int tmp = numberOfIcons.toInt(&ok);
@@ -1377,7 +1375,7 @@ void SymbianMakefileGenerator::readRssRules(QString &numberOfIcons, QString &ico
numberOfIcons.clear();
iconFile.clear();
fprintf(stderr, "Warning: '%s%s' must be integer in decimal format.\n",
- RSS_RULES_BASE, RSS_TAG_NBROFICONS );
+ RSS_RULES_BASE, RSS_TAG_NBROFICONS);
}
}
}
@@ -1394,10 +1392,10 @@ QStringList SymbianMakefileGenerator::symbianLangCodesFromTsFiles()
int extIndex = file.lastIndexOf(".");
int langIndex = file.lastIndexOf("_", (extIndex - file.length()));
langIndex += 1;
- QString qtlang = file.mid(langIndex, extIndex - langIndex );
+ QString qtlang = file.mid(langIndex, extIndex - langIndex);
QString s60lang = qt2S60LangMapTable.value(qtlang, QString("SC"));
- if( !symbianLangCodes.contains(s60lang) && s60lang != "SC" )
+ if (!symbianLangCodes.contains(s60lang) && s60lang != "SC")
symbianLangCodes += s60lang;
}
@@ -1409,8 +1407,8 @@ void SymbianMakefileGenerator::fillQt2S60LangMapTable()
qt2S60LangMapTable.reserve(170); // 165 items at time of writing.
qt2S60LangMapTable.insert("ab", "SC"); //Abkhazian //
qt2S60LangMapTable.insert("om", "SC"); //Afan //
- qt2S60LangMapTable.insert("aa", "SC"); //Afar //
- qt2S60LangMapTable.insert("af", "34"); //Afrikaans //Afrikaans
+ qt2S60LangMapTable.insert("aa", "SC"); //Afar //
+ qt2S60LangMapTable.insert("af", "34"); //Afrikaans //Afrikaans
qt2S60LangMapTable.insert("sq", "35"); //Albanian //Albanian
qt2S60LangMapTable.insert("am", "36"); //Amharic //Amharic
qt2S60LangMapTable.insert("ar", "37"); //Arabic //Arabic
@@ -1564,18 +1562,18 @@ void SymbianMakefileGenerator::fillQt2S60LangMapTable()
qt2S60LangMapTable.insert("cch", "SC"); //Atsam //
qt2S60LangMapTable.insert("tig", "SC"); //Tigre //
qt2S60LangMapTable.insert("kaj", "SC"); //Jju //
- qt2S60LangMapTable.insert("fur", "SC"); //Friulian //
- qt2S60LangMapTable.insert("ve", "SC"); //Venda //
- qt2S60LangMapTable.insert("ee", "SC"); //Ewe //
- qt2S60LangMapTable.insert("wa", "SC"); //Walamo //
- qt2S60LangMapTable.insert("haw", "SC"); //Hawaiian //
- qt2S60LangMapTable.insert("kcg", "SC"); //Tyap //
- qt2S60LangMapTable.insert("ny", "SC"); //Chewa //
+ qt2S60LangMapTable.insert("fur", "SC"); //Friulian //
+ qt2S60LangMapTable.insert("ve", "SC"); //Venda //
+ qt2S60LangMapTable.insert("ee", "SC"); //Ewe //
+ qt2S60LangMapTable.insert("wa", "SC"); //Walamo //
+ qt2S60LangMapTable.insert("haw", "SC"); //Hawaiian //
+ qt2S60LangMapTable.insert("kcg", "SC"); //Tyap //
+ qt2S60LangMapTable.insert("ny", "SC"); //Chewa //
}
void SymbianMakefileGenerator::appendIfnotExist(QStringList &list, QString value)
{
- if(!list.contains(value))
+ if (!list.contains(value))
list += value;
}
@@ -1588,8 +1586,8 @@ void SymbianMakefileGenerator::appendIfnotExist(QStringList &list, QStringList v
QString SymbianMakefileGenerator::removePathSeparators(QString &file)
{
QString ret = file;
- while(ret.indexOf(QDir::separator()) > 0) {
- ret.remove(0, ret.indexOf(QDir::separator())+1);
+ while (ret.indexOf(QDir::separator()) > 0) {
+ ret.remove(0, ret.indexOf(QDir::separator()) + 1);
}
return ret;
@@ -1599,19 +1597,19 @@ QString SymbianMakefileGenerator::removePathSeparators(QString &file)
QString SymbianMakefileGenerator::removeTrailingPathSeparators(QString &file)
{
QString ret = file;
- if(ret.endsWith(QDir::separator())) {
- ret.remove(ret.length()-1,1);
+ if (ret.endsWith(QDir::separator())) {
+ ret.remove(ret.length() - 1, 1);
}
return ret;
}
void SymbianMakefileGenerator::generateCleanCommands(QTextStream& t,
- const QStringList& toClean,
- const QString& cmd,
- const QString& cmdOptions,
- const QString& itemPrefix,
- const QString& itemSuffix)
+ const QStringList& toClean,
+ const QString& cmd,
+ const QString& cmdOptions,
+ const QString& itemPrefix,
+ const QString& itemSuffix)
{
for (int i = 0; i < toClean.size(); ++i) {
QString item = toClean.at(i);
@@ -1642,10 +1640,10 @@ void SymbianMakefileGenerator::generateDistcleanTargets(QTextStream& t)
foreach(QString item, project->values("SUBDIRS")) {
bool fromFile = false;
QString fixedItem;
- if(!project->isEmpty(item + ".file")) {
+ if (!project->isEmpty(item + ".file")) {
fixedItem = project->first(item + ".file");
fromFile = true;
- } else if(!project->isEmpty(item + ".subdir")) {
+ } else if (!project->isEmpty(item + ".subdir")) {
fixedItem = project->first(item + ".subdir");
fromFile = false;
} else {
@@ -1659,7 +1657,7 @@ void SymbianMakefileGenerator::generateDistcleanTargets(QTextStream& t)
QString itemName = fi.fileName();
int extIndex = itemName.lastIndexOf(Option::pro_ext);
if (extIndex)
- fixedItem = fi.absolutePath() + "/" + QString("Makefile.") + itemName.mid(0,extIndex);
+ fixedItem = fi.absolutePath() + "/" + QString("Makefile.") + itemName.mid(0, extIndex);
t << "\t-$(MAKE) -f \"" << Option::fixPathToTargetOS(fixedItem) << "\" dodistclean" << endl;
}
diff --git a/qmake/generators/symbian/symmake_abld.cpp b/qmake/generators/symbian/symmake_abld.cpp
index 0c264fc..1a4aa35 100644
--- a/qmake/generators/symbian/symmake_abld.cpp
+++ b/qmake/generators/symbian/symmake_abld.cpp
@@ -69,7 +69,7 @@ void SymbianAbldMakefileGenerator::writeMkFile(const QString& wrapperFileName, b
gnuMakefileName.append(".mk");
QFile ft(gnuMakefileName);
- if(ft.open(QIODevice::WriteOnly)) {
+ if (ft.open(QIODevice::WriteOnly)) {
generatedFiles << ft.fileName();
QTextStream t(&ft);
@@ -103,7 +103,7 @@ void SymbianAbldMakefileGenerator::writeMkFile(const QString& wrapperFileName, b
if (deploymentOnly) {
buildDeps.append(DO_NOTHING_TARGET);
cleanDeps.append(DO_NOTHING_TARGET);
- cleanDepsWinscw.append( WINSCW_DEPLOYMENT_CLEAN_TARGET);
+ cleanDepsWinscw.append(WINSCW_DEPLOYMENT_CLEAN_TARGET);
finalDeps.append(DO_NOTHING_TARGET);
finalDepsWinscw.append(WINSCW_DEPLOYMENT_TARGET);
wrapperTargets << WINSCW_DEPLOYMENT_TARGET << WINSCW_DEPLOYMENT_CLEAN_TARGET;
@@ -180,8 +180,8 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool
t << "# ==============================================================================" << "\n" << endl;
t << endl;
QString ofile = Option::fixPathToTargetOS(Option::output.fileName());
- if(ofile.lastIndexOf(Option::dir_sep) != -1)
- ofile = ofile.right(ofile.length() - ofile.lastIndexOf(Option::dir_sep) -1);
+ if (ofile.lastIndexOf(Option::dir_sep) != -1)
+ ofile = ofile.right(ofile.length() - ofile.lastIndexOf(Option::dir_sep) - 1);
t << "MAKEFILE = " << ofile << endl;
t << "QMAKE = " << Option::fixPathToTargetOS(var("QMAKE_QMAKE")) << endl;
t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl;
@@ -205,7 +205,7 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool
t << "INCPATH" << '\t' << " = ";
- for(QMap<QString, QStringList>::iterator it = systeminclude.begin(); it != systeminclude.end(); ++it) {
+ for (QMap<QString, QStringList>::iterator it = systeminclude.begin(); it != systeminclude.end(); ++it) {
QStringList values = it.value();
for (int i = 0; i < values.size(); ++i) {
t << " -I\"" << values.at(i) << "\"";
@@ -289,7 +289,7 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool
// generate command lines like this ...
// -@ if NOT EXIST ".\somedir" mkdir ".\somedir"
QStringList dirsToClean;
- for(QMap<QString, QStringList>::iterator it = systeminclude.begin(); it != systeminclude.end(); ++it) {
+ for (QMap<QString, QStringList>::iterator it = systeminclude.begin(); it != systeminclude.end(); ++it) {
QStringList values = it.value();
for (int i = 0; i < values.size(); ++i) {
if (values.at(i).endsWith("/" QT_EXTRA_INCLUDE_DIR)) {
@@ -321,7 +321,7 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool
t << ALL_SOURCE_DEPS_TARGET ":";
QStringList allDeps;
- for(QMap<QString, QStringList>::iterator it = sources.begin(); it != sources.end(); ++it) {
+ for (QMap<QString, QStringList>::iterator it = sources.begin(); it != sources.end(); ++it) {
QString currentSourcePath = it.key();
QStringList values = it.value();
for (int i = 0; i < values.size(); ++i) {
@@ -339,15 +339,14 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool
// Post link operations
t << FINALIZE_TARGET ":" << endl;
- if(!project->isEmpty("QMAKE_POST_LINK")) {
+ if (!project->isEmpty("QMAKE_POST_LINK")) {
t << '\t' << var("QMAKE_POST_LINK");
t << endl;
}
t << endl;
- }
- else {
+ } else {
QList<MakefileGenerator::SubTarget*> subtargets = findSubDirsSubTargets();
- writeSubTargets(t, subtargets, SubTargetSkipDefaultVariables|SubTargetSkipDefaultTargets);
+ writeSubTargets(t, subtargets, SubTargetSkipDefaultVariables | SubTargetSkipDefaultTargets);
qDeleteAll(subtargets);
}
@@ -379,23 +378,23 @@ bool SymbianAbldMakefileGenerator::writeDeploymentTargets(QTextStream &t)
QString remoteTestPath = epocRoot() + QLatin1String("epoc32\\winscw\\c\\private\\") + privateDirUid; // default 4 OpenC; 4 all Symbian too
DeploymentList depList;
- initProjectDeploySymbian( project, depList, remoteTestPath, false, QLatin1String("winscw"), QLatin1String("udeb"), generatedDirs, generatedFiles );
+ initProjectDeploySymbian(project, depList, remoteTestPath, false, QLatin1String("winscw"), QLatin1String("udeb"), generatedDirs, generatedFiles);
if (depList.size())
t << "\t-echo Deploying changed files..." << endl;
- for (int i=0; i<depList.size(); ++i) {
+ for (int i = 0; i < depList.size(); ++i) {
// Xcopy prompts for selecting file or directory if target doesn't exist,
// and doesn't provide switch to force file selection. It does provide dir forcing, though,
// so strip the last part of the destination.
- t << "\t-$(XCOPY) \"" << depList.at(i).from << "\" \"" << depList.at(i).to.left(depList.at(i).to.lastIndexOf("\\")+1) << "\"" << endl;
+ t << "\t-$(XCOPY) \"" << depList.at(i).from << "\" \"" << depList.at(i).to.left(depList.at(i).to.lastIndexOf("\\") + 1) << "\"" << endl;
}
t << endl;
t << WINSCW_DEPLOYMENT_CLEAN_TARGET ":" << endl;
QStringList cleanList;
- for (int i=0; i<depList.size(); ++i) {
+ for (int i = 0; i < depList.size(); ++i) {
cleanList.append(depList.at(i).to);
}
generateCleanCommands(t, cleanList, "$(DEL_FILE)", "", "", "");
@@ -412,7 +411,7 @@ void SymbianAbldMakefileGenerator::writeBldInfMkFilePart(QTextStream& t, bool ad
{
// Normally emulator deployment gets done via regular makefile, but since subdirs
// do not get that, special deployment only makefile is generated for them if needed.
- if(targetType != TypeSubdirs || addDeploymentExtension) {
+ if (targetType != TypeSubdirs || addDeploymentExtension) {
QString gnuMakefileName = QLatin1String("Makefile_") + uid3;
removeSpecialCharacters(gnuMakefileName);
gnuMakefileName.append(".mk");
diff --git a/qmake/generators/symbian/symmake_sbsv2.cpp b/qmake/generators/symbian/symmake_sbsv2.cpp
index 7b8d3da..5eee8bf 100644
--- a/qmake/generators/symbian/symmake_sbsv2.cpp
+++ b/qmake/generators/symbian/symmake_sbsv2.cpp
@@ -79,8 +79,8 @@ void SymbianSbsv2MakefileGenerator::exportFlm()
generatedFiles << destInfo.absoluteFilePath();
else
fprintf(stderr, "Error: Could not copy '%s' -> '%s'\n",
- qPrintable(item.absoluteFilePath()),
- qPrintable(destInfo.absoluteFilePath()));
+ qPrintable(item.absoluteFilePath()),
+ qPrintable(destInfo.absoluteFilePath()));
}
}
flmExportDone = true;
@@ -124,8 +124,8 @@ void SymbianSbsv2MakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, boo
t << "# ==============================================================================" << "\n" << endl;
t << endl;
QString ofile = Option::fixPathToTargetOS(Option::output.fileName());
- if(ofile.lastIndexOf(Option::dir_sep) != -1)
- ofile = ofile.right(ofile.length() - ofile.lastIndexOf(Option::dir_sep) -1);
+ if (ofile.lastIndexOf(Option::dir_sep) != -1)
+ ofile = ofile.right(ofile.length() - ofile.lastIndexOf(Option::dir_sep) - 1);
t << "MAKEFILE = " << ofile << endl;
t << "QMAKE = " << Option::fixPathToTargetOS(var("QMAKE_QMAKE")) << endl;
t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl;
@@ -142,7 +142,7 @@ void SymbianSbsv2MakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, boo
t << "INCPATH" << '\t' << " = ";
- for(QMap<QString, QStringList>::iterator it = systeminclude.begin(); it != systeminclude.end(); ++it) {
+ for (QMap<QString, QStringList>::iterator it = systeminclude.begin(); it != systeminclude.end(); ++it) {
QStringList values = it.value();
for (int i = 0; i < values.size(); ++i) {
t << " -I\"" << values.at(i) << "\" ";
@@ -212,8 +212,7 @@ void SymbianSbsv2MakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, boo
if (targetType != TypeSubdirs) {
t << extraTargetsCache;
t << extraCompilersCache;
- }
- else {
+ } else {
QList<MakefileGenerator::SubTarget*> subtargets = findSubDirsSubTargets();
writeSubTargets(t, subtargets, SubTargetSkipDefaultVariables|SubTargetSkipDefaultTargets);
qDeleteAll(subtargets);
@@ -244,7 +243,7 @@ void SymbianSbsv2MakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t
defines << varGlue("PRL_EXPORT_DEFINES","-D"," -D"," ")
<< varGlue("QMAKE_COMPILER_DEFINES", "-D", "-D", " ")
<< varGlue("DEFINES","-D"," -D","");
- for(QMap<QString, QStringList>::iterator it = systeminclude.begin(); it != systeminclude.end(); ++it) {
+ for (QMap<QString, QStringList>::iterator it = systeminclude.begin(); it != systeminclude.end(); ++it) {
QStringList values = it.value();
for (int i = 0; i < values.size(); ++i) {
incPath << QLatin1String(" -I\"") + values.at(i) + "\"";
@@ -264,8 +263,8 @@ void SymbianSbsv2MakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t
foreach(QString item, project->values("PRE_TARGETDEPS")) {
// Predeps get mangled in windows, so fix them to more sbsv2 friendly format
#if defined(Q_OS_WIN)
- if (item.mid(1,1) == ":")
- item = item.mid(0,1).toUpper().append(item.mid(1)); // Fix drive to uppercase
+ if (item.mid(1, 1) == ":")
+ item = item.mid(0, 1).toUpper().append(item.mid(1)); // Fix drive to uppercase
#endif
item.replace("\\", "/");
allPreDeps << escapeDependencyPath(item);
@@ -275,7 +274,7 @@ void SymbianSbsv2MakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t
allPreDeps.append(fileInfo(item).absoluteFilePath());
}
- for(QMap<QString, QStringList>::iterator it = sources.begin(); it != sources.end(); ++it) {
+ for (QMap<QString, QStringList>::iterator it = sources.begin(); it != sources.end(); ++it) {
QString currentSourcePath = it.key();
QStringList values = it.value();
for (int i = 0; i < values.size(); ++i) {
@@ -333,10 +332,10 @@ void SymbianSbsv2MakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t
// Write winscw deployment rules
QString remoteTestPath = epocRoot() + QLatin1String("epoc32/winscw/c/private/") + privateDirUid;
DeploymentList depList;
- initProjectDeploySymbian( project, depList, remoteTestPath, false, QLatin1String("winscw"), QLatin1String("udeb"), generatedDirs, generatedFiles );
+ initProjectDeploySymbian(project, depList, remoteTestPath, false, QLatin1String("winscw"), QLatin1String("udeb"), generatedDirs, generatedFiles);
t << "#if defined(WINSCW)" << endl;
- for (int i=0; i<depList.size(); ++i) {
+ for (int i = 0; i < depList.size(); ++i) {
t << "START EXTENSION qt/qmake_emulator_deployment" << endl;
QString fromItem = depList.at(i).from;
QString toItem = depList.at(i).to;
@@ -354,7 +353,7 @@ void SymbianSbsv2MakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t
t << endl;
// Write post link rules
- if(!project->isEmpty("QMAKE_POST_LINK")) {
+ if (!project->isEmpty("QMAKE_POST_LINK")) {
t << "START EXTENSION qt/qmake_post_link" << endl;
t << "OPTION POST_LINK_CMD " << var("QMAKE_POST_LINK") << endl;
t << "OPTION LINK_TARGET " << removePathSeparators(escapeFilePath(fileFixify(project->first("TARGET"))).append(".").append(getTargetExtension())) << endl;
@@ -384,7 +383,7 @@ void SymbianSbsv2MakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t
// Generate temp dirs
QString tempDirs;
- for(QMap<QString, QStringList>::iterator it = systeminclude.begin(); it != systeminclude.end(); ++it) {
+ for (QMap<QString, QStringList>::iterator it = systeminclude.begin(); it != systeminclude.end(); ++it) {
QStringList values = it.value();
for (int i = 0; i < values.size(); ++i) {
QString value = values.at(i);
diff --git a/qmake/project.cpp b/qmake/project.cpp
index 87c6939..e118c6f 100644
--- a/qmake/project.cpp
+++ b/qmake/project.cpp
@@ -597,8 +597,7 @@ static void qmake_error_msg(const QString &msg)
msg.toLatin1().constData());
}
-enum isForSymbian_enum
-{
+enum isForSymbian_enum {
isForSymbian_NOT_SET = -1,
isForSymbian_FALSE = 0,
isForSymbian_ABLD = 1,
@@ -3342,7 +3341,7 @@ QStringList &QMakeProject::values(const QString &_var, QMap<QString, QStringList
QString generate_test_uid(const QString& target)
{
QString tmp = generate_uid(target);
- tmp.replace(0,1,"E");
+ tmp.replace(0, 1, "E");
tmp.prepend("0x");
return tmp;
@@ -3356,32 +3355,32 @@ QString generate_uid(const QString& target)
QString tmp = targetToUid[target];
- if(!tmp.isEmpty()) {
+ if (!tmp.isEmpty()) {
return tmp;
}
unsigned long hash = 5381;
int c;
- for(int i = 0; i < target.size(); ++i) {
+ for (int i = 0; i < target.size(); ++i) {
c = target.at(i).toAscii();
- hash ^= c + ((c-i) << i%20) + ((c+i) << (i+5)%20) + ((c-2*i) << (i+10)%20) + ((c+2*i) << (i+15)%20);
+ hash ^= c + ((c - i) << i % 20) + ((c + i) << (i + 5) % 20) + ((c - 2 * i) << (i + 10) % 20) + ((c + 2 * i) << (i + 15) % 20);
}
tmp.setNum(hash, 16);
- for(int i = tmp.size(); i < 8; ++i)
+ for (int i = tmp.size(); i < 8; ++i)
tmp.prepend("0");
#if 0
static QMap<QString, QString> uidConflictCheckList;
QString testStr = tmp;
- testStr.replace(0,1,"E"); // Simulate actual UID generation
+ testStr.replace(0, 1, "E"); // Simulate actual UID generation
if (uidConflictCheckList.contains(testStr)) {
printf("\n\n!!!! generated duplicate uid for %s is %s <-> %s !!!!\n\n\n",
- qPrintable(target),
- qPrintable(testStr),
- qPrintable(uidConflictCheckList.value(testStr)));
- }
+ qPrintable(target),
+ qPrintable(testStr),
+ qPrintable(uidConflictCheckList.value(testStr)));
+ }
uidConflictCheckList.insert(testStr, target);
printf("generate_uid for %s is %s \n", qPrintable(target), qPrintable(tmp));
#endif
@@ -3393,7 +3392,7 @@ QString generate_uid(const QString& target)
static void fixEpocRootStr(QString& path)
{
- path.replace("\\","/");
+ path.replace("\\", "/");
if (path.size() > 1 && path[1] == QChar(':')) {
path = path.mid(2);
@@ -3410,8 +3409,7 @@ static QString epocRootStr;
QString epocRoot()
{
- if (!epocRootStr.isEmpty())
- {
+ if (!epocRootStr.isEmpty()) {
return epocRootStr;
}
diff --git a/qmake/qpopen.cpp b/qmake/qpopen.cpp
index 7acff92..f45f128 100644
--- a/qmake/qpopen.cpp
+++ b/qmake/qpopen.cpp
@@ -59,7 +59,7 @@ bool QPopen::init(const char *command, const char* /* mode */)
}
// Ensure that the read handle to the child process's pipe for STDOUT is not inherited.
- SetHandleInformation( childStdOutR, HANDLE_FLAG_INHERIT, 0);
+ SetHandleInformation(childStdOutR, HANDLE_FLAG_INHERIT, 0);
// Create a pipe for the child process's STDIN.
if (! CreatePipe(&childStdInR, &childStdInW, &attributes, 0)) {
@@ -67,18 +67,18 @@ bool QPopen::init(const char *command, const char* /* mode */)
}
// Ensure that the write handle to the child process's pipe for STDIN is not inherited.
- SetHandleInformation( childStdInW, HANDLE_FLAG_INHERIT, 0);
+ SetHandleInformation(childStdInW, HANDLE_FLAG_INHERIT, 0);
TCHAR *szCmdLine = new TCHAR[strlen(command)+1];
strcpy(szCmdLine, command);
// Set up members of the PROCESS_INFORMATION structure.
- ZeroMemory( &processInfo, sizeof(PROCESS_INFORMATION) );
+ ZeroMemory(&processInfo, sizeof(PROCESS_INFORMATION));
// Set up members of the STARTUPINFO structure.
- ZeroMemory( &siStartInfo, sizeof(STARTUPINFO) );
+ ZeroMemory(&siStartInfo, sizeof(STARTUPINFO));
siStartInfo.cb = sizeof(STARTUPINFO);
siStartInfo.hStdError = childStdOutW;
siStartInfo.hStdOutput = childStdOutW;
@@ -88,15 +88,15 @@ bool QPopen::init(const char *command, const char* /* mode */)
// Create the child process.
bool success = CreateProcess(NULL,
- szCmdLine, // command line
- NULL, // process security attributes
- NULL, // primary thread security attributes
- TRUE, // handles are inherited
- 0, // creation flags
- NULL, // use parent's environment
- NULL, // use parent's current directory
- &siStartInfo, // STARTUPINFO pointer
- &processInfo); // receives PROCESS_INFORMATION
+ szCmdLine, // command line
+ NULL, // process security attributes
+ NULL, // primary thread security attributes
+ TRUE, // handles are inherited
+ 0, // creation flags
+ NULL, // use parent's environment
+ NULL, // use parent's current directory
+ &siStartInfo, // STARTUPINFO pointer
+ &processInfo); // receives PROCESS_INFORMATION
delete szCmdLine;
@@ -118,7 +118,7 @@ int QPopen::fwrite(char* buffer, int maxBytes)
DWORD bytesWritten;
bool success = WriteFile(childStdInW, buffer, maxBytes, &bytesWritten, NULL);
- if(success) {
+ if (success) {
return bytesWritten;
}
@@ -129,11 +129,11 @@ int QPopen::fread(char* buffer, int maxBytes)
{
DWORD bytesRead;
- if( !CloseHandle(childStdOutW) )
+ if (!CloseHandle(childStdOutW))
return 0;
bool success = ReadFile(childStdOutR, buffer, maxBytes, &bytesRead, NULL);
- if(success)
+ if (success)
return bytesRead;
return 0;