forked from qt-creator/qt-creator
Qnx: Fixing BarDescriptorEditor to prevent loosing syntax highlighting
Task-Number: QTCREATORBUG-10039 Change-Id: I8a6b80d18da1be0697bd8aaceb5d8670105a8f49 Reviewed-by: Mehdi Fekari <mfekari@blackberry.com> Reviewed-by: Tobias Hunger <tobias.hunger@digia.com> Reviewed-by: David Kaspar <dkaspar@blackberry.com>
This commit is contained in:
@@ -95,6 +95,7 @@ bool BarDescriptorDocument::open(QString *errorString, const QString &fileName)
|
||||
return false;
|
||||
|
||||
setFilePath(fileName);
|
||||
m_editorWidget->setFilePath(fileName);
|
||||
|
||||
bool result = loadContent(contents);
|
||||
|
||||
|
||||
@@ -204,6 +204,13 @@ BarDescriptorEditorAssetsWidget *BarDescriptorEditorWidget::assetsWidget() const
|
||||
return m_assetsWidget;
|
||||
}
|
||||
|
||||
void BarDescriptorEditorWidget::setFilePath(const QString &filePath)
|
||||
{
|
||||
Core::IDocument *doc = m_xmlSourceWidget->editorDocument();
|
||||
if (doc)
|
||||
doc->setFilePath(filePath);
|
||||
}
|
||||
|
||||
QString BarDescriptorEditorWidget::xmlSource() const
|
||||
{
|
||||
return m_xmlSourceWidget->toPlainText();
|
||||
|
||||
@@ -79,6 +79,7 @@ public:
|
||||
|
||||
BarDescriptorEditorAssetsWidget *assetsWidget() const;
|
||||
|
||||
void setFilePath(const QString &filePath);
|
||||
QString xmlSource() const;
|
||||
void setXmlSource(const QString &xmlSource);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user