forked from qt-creator/qt-creator
Designer: block non Utf8 codecs for FormWindowFile
Fixes: QTCREATORBUG-26028 Change-Id: Ia10804fef127f6caa9f9bd50ab3ff9946499e3c6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
@@ -247,6 +247,11 @@ QString FormWindowFile::fallbackSaveAsFileName() const
|
|||||||
return m_suggestedName;
|
return m_suggestedName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool FormWindowFile::supportsCodec(const QTextCodec *codec) const
|
||||||
|
{
|
||||||
|
return codec == QTextCodec::codecForName("UTF-8");
|
||||||
|
}
|
||||||
|
|
||||||
bool FormWindowFile::writeFile(const Utils::FilePath &filePath, QString *errorString) const
|
bool FormWindowFile::writeFile(const Utils::FilePath &filePath, QString *errorString) const
|
||||||
{
|
{
|
||||||
if (Designer::Constants::Internal::debug)
|
if (Designer::Constants::Internal::debug)
|
||||||
|
@@ -58,6 +58,7 @@ public:
|
|||||||
bool isSaveAsAllowed() const override;
|
bool isSaveAsAllowed() const override;
|
||||||
bool reload(QString *errorString, ReloadFlag flag, ChangeType type) override;
|
bool reload(QString *errorString, ReloadFlag flag, ChangeType type) override;
|
||||||
QString fallbackSaveAsFileName() const override;
|
QString fallbackSaveAsFileName() const override;
|
||||||
|
bool supportsCodec(const QTextCodec *codec) const override;
|
||||||
|
|
||||||
// Internal
|
// Internal
|
||||||
void setFallbackSaveAsFileName(const QString &fileName);
|
void setFallbackSaveAsFileName(const QString &fileName);
|
||||||
|
Reference in New Issue
Block a user