Commit 7489007b authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Jarek Kobus

DiffEditorDocument: Assign mimetype

It helps when savingAs vcs diffs for the first time.

Change-Id: I53b1c2c89641ee6b8106fb574c050ead60aa8da4
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
parent ceea1d9f
......@@ -1858,6 +1858,8 @@ bool EditorManager::saveDocumentAs(IDocument *documentParam)
const QString filter = MimeDatabase::allFiltersString();
QString selectedFilter =
MimeDatabase::findByFile(QFileInfo(document->filePath())).filterString();
if (selectedFilter.isEmpty())
selectedFilter = MimeDatabase::findByType(document->mimeType()).filterString();
const QString &absoluteFilePath =
DocumentManager::getSaveAsFileName(document, filter, &selectedFilter);
......
......@@ -46,6 +46,7 @@ DiffEditorDocument::DiffEditorDocument() :
m_controller(new DiffEditorController(this))
{
setId(Constants::DIFF_EDITOR_ID);
setMimeType(QLatin1String(Constants::DIFF_EDITOR_MIMETYPE));
setTemporary(true);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment