forked from qt-creator/qt-creator
Add default implementation for IDocument::fallbackSaveAs(Path|FileName)
The methods are only relevant for documents without a filePath, and there was a mix of different irrelevant implementations present in subclasses. Change-Id: I4f57d306e5ddd913974cfe6ed0b4db062eb907a1 Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This commit is contained in:
@@ -165,8 +165,6 @@ class ProFileDocument : public TextDocument
|
||||
{
|
||||
public:
|
||||
ProFileDocument();
|
||||
QString fallbackSaveAsPath() const override;
|
||||
QString fallbackSaveAsFileName() const override;
|
||||
|
||||
// qmake project files doesn't support UTF8-BOM
|
||||
// If the BOM would be added qmake would fail and QtCreator couldn't parse the project file
|
||||
@@ -179,16 +177,6 @@ ProFileDocument::ProFileDocument()
|
||||
setMimeType(QLatin1String(Constants::PROFILE_MIMETYPE));
|
||||
}
|
||||
|
||||
QString ProFileDocument::fallbackSaveAsPath() const
|
||||
{
|
||||
return filePath().toFileInfo().absolutePath();
|
||||
}
|
||||
|
||||
QString ProFileDocument::fallbackSaveAsFileName() const
|
||||
{
|
||||
return filePath().fileName();
|
||||
}
|
||||
|
||||
//
|
||||
// ProFileEditorFactory
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user