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:
Eike Ziller
2016-01-14 15:01:05 +01:00
parent 24f5bc7d3f
commit fc485e6b86
36 changed files with 12 additions and 223 deletions

View File

@@ -241,9 +241,6 @@ class CMakeDocument : public TextDocument
{
public:
CMakeDocument();
QString fallbackSaveAsPath() const override;
QString fallbackSaveAsFileName() const override;
};
CMakeDocument::CMakeDocument()
@@ -252,16 +249,6 @@ CMakeDocument::CMakeDocument()
setMimeType(QLatin1String(Constants::CMAKEMIMETYPE));
}
QString CMakeDocument::fallbackSaveAsPath() const
{
return filePath().toFileInfo().absolutePath();
}
QString CMakeDocument::fallbackSaveAsFileName() const
{
return filePath().fileName();
}
//
// CMakeEditorFactory
//