Commit e793e2d8 authored by Eike Ziller's avatar Eike Ziller

Android: Remove unneeded casts.

Change-Id: Ib3db0e830aeddbfbcf72d76f8f48eb8c7bb9933b
Reviewed-by: default avatarBogDan Vatra <bogdan@kde.org>
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent 18ac68ad
......@@ -470,7 +470,7 @@ bool AndroidManifestEditorWidget::eventFilter(QObject *obj, QEvent *event)
void AndroidManifestEditorWidget::updateTargetComboBox()
{
const QString docPath(static_cast<AndroidManifestDocument *>(editor()->document())->filePath());
const QString docPath(baseTextDocument()->filePath());
ProjectExplorer::Project *project = androidProject(docPath);
QStringList items;
if (project) {
......@@ -587,7 +587,7 @@ void AndroidManifestEditorWidget::preSave()
syncToEditor();
if (m_setAppName && m_appNameInStringsXml) {
QString baseDir = QFileInfo(static_cast<AndroidManifestDocument *>(editor()->document())->filePath()).absolutePath();
QString baseDir = QFileInfo(baseTextDocument()->filePath()).absolutePath();
QString fileName = baseDir + QLatin1String("/res/values/strings.xml");
QFile f(fileName);
if (f.open(QIODevice::ReadOnly)) {
......@@ -611,7 +611,7 @@ void AndroidManifestEditorWidget::preSave()
m_setAppName = false;
}
QString baseDir = QFileInfo(static_cast<AndroidManifestDocument *>(editor()->document())->filePath()).absolutePath();
QString baseDir = QFileInfo(baseTextDocument()->filePath()).absolutePath();
if (!m_lIconPath.isEmpty()) {
copyIcon(LowDPI, baseDir, m_lIconPath);
m_lIconPath.clear();
......@@ -695,7 +695,7 @@ void AndroidManifestEditorWidget::updateInfoBar()
void AndroidManifestEditorWidget::updateSdkVersions()
{
const QString docPath(static_cast<AndroidManifestDocument *>(editor()->document())->filePath());
const QString docPath(baseTextDocument()->filePath());
Project *project = androidProject(docPath);
QPair<int, int> apiLevels = AndroidManager::apiLevelRange(project ? project->activeTarget() : 0);
for (int i = apiLevels.first; i < apiLevels.second + 1; ++i)
......@@ -770,7 +770,7 @@ void AndroidManifestEditorWidget::syncToWidgets(const QDomDocument &doc)
setApiLevel(m_androidMinSdkVersion, usesSdkElement, QLatin1String("android:minSdkVersion"));
setApiLevel(m_androidTargetSdkVersion, usesSdkElement, QLatin1String("android:targetSdkVersion"));
QString baseDir = QFileInfo(static_cast<AndroidManifestDocument *>(editor()->document())->filePath()).absolutePath();
QString baseDir = QFileInfo(baseTextDocument()->filePath()).absolutePath();
QString fileName = baseDir + QLatin1String("/res/values/strings.xml");
QDomElement applicationElement = manifest.firstChildElement(QLatin1String("application"));
......
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