forked from qt-creator/qt-creator
ScxmlEditor: block non Utf8 codecs
Change-Id: I7d44dc0ddb17ab543e9e578d4480a090cc6835f1 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -147,6 +147,11 @@ bool ScxmlEditorDocument::reload(QString *errorString, ReloadFlag flag, ChangeTy
|
||||
return success;
|
||||
}
|
||||
|
||||
bool ScxmlEditorDocument::supportsCodec(const QTextCodec *codec) const
|
||||
{
|
||||
return codec == QTextCodec::codecForName("UTF-8");
|
||||
}
|
||||
|
||||
QString ScxmlEditorDocument::designWidgetContents() const
|
||||
{
|
||||
return m_designWidget->contents();
|
||||
|
@@ -57,6 +57,7 @@ public:
|
||||
bool isSaveAsAllowed() const override;
|
||||
bool isModified() const override;
|
||||
bool reload(QString *errorString, ReloadFlag flag, ChangeType type) override;
|
||||
bool supportsCodec(const QTextCodec *codec) const override;
|
||||
|
||||
// Internal
|
||||
Common::MainWidget *designWidget() const;
|
||||
|
Reference in New Issue
Block a user