Commit ea859787 authored by Eike Ziller's avatar Eike Ziller
Browse files

AndroidManifestEditor: Fix handling of external changes

The editor was not updating the UI part if that is active when external
changes happen. Switching to XML Source would then overwrite the
external change.

Change-Id: Ib63257e75e065d151cb2a078443dc2afc8392ab8
Reviewed-by: default avatarDaniel Teske <>
parent ff30cf72
......@@ -122,6 +122,8 @@ AndroidManifestEditorWidget::AndroidManifestEditorWidget()
connect(m_textEditorWidget->document(), SIGNAL(contentsChanged()),
this, SLOT(startParseCheck()));
connect(m_textEditorWidget->textDocument(), &TextEditor::TextDocument::reloadFinished,
this, &AndroidManifestEditorWidget::updateAfterFileLoad);
void AndroidManifestEditorWidget::initializePage()
......@@ -501,11 +503,15 @@ void AndroidManifestEditorWidget::updateTargetComboBox()
bool AndroidManifestEditorWidget::open(QString *errorString, const QString &fileName, const QString &realFileName)
bool result = m_textEditorWidget->open(errorString, fileName, realFileName);
return result;
if (!result)
return result;
void AndroidManifestEditorWidget::updateAfterFileLoad(bool success)
if (!success)
QString error;
int errorLine;
......@@ -515,13 +521,12 @@ bool AndroidManifestEditorWidget::open(QString *errorString, const QString &file
if (checkDocument(doc, &error, &errorLine, &errorColumn)) {
if (activePage() != Source)
return true;
// some error occurred
updateInfoBar(error, errorLine, errorColumn);
return true;
void AndroidManifestEditorWidget::setDirty(bool dirty)
......@@ -135,6 +135,7 @@ private:
bool syncToWidgets();
void syncToWidgets(const QDomDocument &doc);
void syncToEditor();
void updateAfterFileLoad(bool success);
bool checkDocument(const QDomDocument &doc, QString *errorMessage,
int *errorLine, int *errorColumn);
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