Commit 29a65750 authored by Friedemann Kleint's avatar Friedemann Kleint Committed by Daniel Teske

Fix tr() error in Android plugin, use QT_NO_CAST_FROM_ASCII.

Change-Id: I7ccc55c914b4d5447ad238acfb2ff76cc28d6b23
Reviewed-by: default avatarDaniel Teske <daniel.teske@nokia.com>
parent 2cdfad55
......@@ -76,5 +76,5 @@ FORMS += \
androidcreatekeystorecertificate.ui
RESOURCES = android.qrc
DEFINES += QT_NO_CAST_TO_ASCII
DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII
DEFINES += ANDROID_LIBRARY
......@@ -233,7 +233,7 @@ QStringList AndroidConfigurations::sdkTargets(int minApiLevel) const
return targets;
}
while (proc.canReadLine()) {
QString line = proc.readLine().trimmed();
const QString line = QString::fromLocal8Bit(proc.readLine().trimmed());
int index = line.indexOf(QLatin1String("\"android-"));
if (index == -1)
continue;
......
......@@ -143,7 +143,7 @@ QList<Core::Id> AndroidDeployConfigurationFactory::availableCreationIds(ProjectE
QString AndroidDeployConfigurationFactory::displayNameForId(const Core::Id id) const
{
if (id.toString().startsWith(ANDROID_DC_PREFIX))
if (id.toString().startsWith(QLatin1String(ANDROID_DC_PREFIX)))
return tr("Deploy on Android");
return QString();
}
......
......@@ -40,6 +40,7 @@ namespace Internal {
class AndroidDeviceFactory : public ProjectExplorer::IDeviceFactory
{
Q_OBJECT
public:
AndroidDeviceFactory();
......
......@@ -95,7 +95,7 @@ bool AndroidManager::supportsAndroid(ProjectExplorer::Target *target)
if (!qobject_cast<Qt4ProjectManager::Qt4Project *>(target->project()))
return false;
QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(target->profile());
return version && version->platformName() == QtSupport::Constants::ANDROID_PLATFORM;
return version && version->platformName() == QLatin1String(QtSupport::Constants::ANDROID_PLATFORM);
}
QString AndroidManager::packageName(ProjectExplorer::Target *target)
......@@ -389,7 +389,7 @@ QString AndroidManager::targetApplicationPath(ProjectExplorer::Target *target)
&& proFile->targetInformation().target.endsWith(QLatin1String(".so"))) {
if (proFile->targetInformation().target.mid(3, proFile->targetInformation().target.lastIndexOf(QLatin1Char('.')) - 3)
== selectedApp)
return proFile->targetInformation().buildDir + QLatin1String("/") + proFile->targetInformation().target;
return proFile->targetInformation().buildDir + QLatin1Char('/') + proFile->targetInformation().target;
} else {
if (proFile->targetInformation().target == selectedApp)
return proFile->targetInformation().buildDir + QLatin1String("/lib") + proFile->targetInformation().target + QLatin1String(".so");
......@@ -437,9 +437,9 @@ bool AndroidManager::createAndroidTemplatesIfNecessary(ProjectExplorer::Target *
}
Utils::FileName src = androidPath;
src.appendPath("src");
src.appendPath(QLatin1String("src"));
Utils::FileName res = androidPath;
res.appendPath("res");
res.appendPath(QLatin1String("res"));
if (!forceUpdate && androidPath.toFileInfo().exists()
&& manifestPath(target).toFileInfo().exists()
......
......@@ -85,7 +85,7 @@ public:
QPair<QString, QString> item;
while (from > -1) {
from += 11;// strlen(AliasString);
const int eol = rowCertificates.indexOf(QLatin1String("\n"), from);
const int eol = rowCertificates.indexOf(QLatin1Char('\n'), from);
item.first = rowCertificates.mid(from, eol - from).trimmed();
const int eoc = rowCertificates.indexOf(CertificateSeparator, eol);
item.second = rowCertificates.mid(eol + 1, eoc - eol - 2).trimmed();
......@@ -433,7 +433,7 @@ bool AndroidPackageCreationStep::createPackage()
return false;
}
keyPass += "\n";
keyPass += '\n';
buildProc->write(keyPass);
buildProc->waitForBytesWritten();
buildProc->waitForFinished();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment