forked from qt-creator/qt-creator
CompilerExplorer: Add fallback document path
Fixes: QTCREATORBUG-30200 Change-Id: Iecbecf9f065a938881e2afa33ff6736bc3f2ee4a Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Robert Löhning <robert.loehning@qt.io>
This commit is contained in:
@@ -208,6 +208,11 @@ bool JsonSettingsDocument::setContents(const QByteArray &contents)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString JsonSettingsDocument::fallbackSaveAsFileName() const
|
||||||
|
{
|
||||||
|
return preferredDisplayName() + ".qtce";
|
||||||
|
}
|
||||||
|
|
||||||
SourceEditorWidget::SourceEditorWidget(const std::shared_ptr<SourceSettings> &settings,
|
SourceEditorWidget::SourceEditorWidget(const std::shared_ptr<SourceSettings> &settings,
|
||||||
QUndoStack *undoStack)
|
QUndoStack *undoStack)
|
||||||
: m_sourceSettings(settings)
|
: m_sourceSettings(settings)
|
||||||
|
|||||||
@@ -120,6 +120,8 @@ public:
|
|||||||
|
|
||||||
bool setContents(const QByteArray &contents) override;
|
bool setContents(const QByteArray &contents) override;
|
||||||
|
|
||||||
|
QString fallbackSaveAsFileName() const override;
|
||||||
|
|
||||||
bool shouldAutoSave() const override { return !filePath().isEmpty(); }
|
bool shouldAutoSave() const override { return !filePath().isEmpty(); }
|
||||||
bool isModified() const override;
|
bool isModified() const override;
|
||||||
bool isSaveAsAllowed() const override { return true; }
|
bool isSaveAsAllowed() const override { return true; }
|
||||||
|
|||||||
Reference in New Issue
Block a user