Remove createAndroidTemplates from AndroidManager::openXmlFile()

The default value is false, and all the callers that pass in a 4th
parameter, pass in false.

Change-Id: Ifff6fb138b4cdd1d249c25246c623335dd96dcc5
Reviewed-by: BogDan Vatra <bog_dan_ro@yahoo.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Daniel Teske
2012-11-06 16:19:47 +01:00
parent 3e9f2d688c
commit e0c9d9dd51
2 changed files with 4 additions and 7 deletions

View File

@@ -403,11 +403,11 @@ bool AndroidManager::createAndroidTemplatesIfNecessary(ProjectExplorer::Target *
QDomDocument srcVersionDoc;
Utils::FileName srcVersionPath = javaSrcPath;
srcVersionPath.appendPath(QLatin1String("version.xml"));
if (openXmlFile(target, srcVersionDoc, srcVersionPath, false)) {
if (openXmlFile(target, srcVersionDoc, srcVersionPath)) {
QDomDocument dstVersionDoc;
Utils::FileName dstVersionPath=androidPath;
dstVersionPath.appendPath(QLatin1String("version.xml"));
if (openXmlFile(target, dstVersionDoc, dstVersionPath, false))
if (openXmlFile(target, dstVersionDoc, dstVersionPath))
forceUpdate = (srcVersionDoc.documentElement().attribute(QLatin1String("value")).toDouble()
> dstVersionDoc.documentElement().attribute(QLatin1String("value")).toDouble());
else
@@ -734,11 +734,8 @@ QString AndroidManager::loadLocal(ProjectExplorer::Target *target, int apiLevel,
}
bool AndroidManager::openXmlFile(ProjectExplorer::Target *target, QDomDocument &doc,
const Utils::FileName &fileName, bool createAndroidTemplates)
const Utils::FileName &fileName)
{
if (createAndroidTemplates && !createAndroidTemplatesIfNecessary(target))
return false;
QFile f(fileName.toString());
if (!f.open(QIODevice::ReadOnly))
return false;

View File

@@ -114,7 +114,7 @@ public:
private:
static void raiseError(const QString &reason);
static bool openXmlFile(ProjectExplorer::Target *target, QDomDocument &doc,
const Utils::FileName &fileName, bool createAndroidTemplates = false);
const Utils::FileName &fileName);
static bool saveXmlFile(ProjectExplorer::Target *target, QDomDocument &doc, const Utils::FileName &fileName);
static bool openManifest(ProjectExplorer::Target *target, QDomDocument &doc);
static bool saveManifest(ProjectExplorer::Target *target, QDomDocument &doc);