Commit b8046e60 authored by jkobus's avatar jkobus Committed by Jarek Kobus

Don't register mimetype for diff editor

Task-number: QTCREATORBUG-11624

Change-Id: I9eeeeeb862e335c1a4d5cbd80d0908297ad6d1db
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
parent 4bf11c7d
......@@ -113,7 +113,7 @@ void DescriptionEditorWidget::setDisplaySettings(const DisplaySettings &ds)
DiffEditor::DiffEditor()
: IEditor(0)
, m_document(new DiffEditorDocument(QLatin1String(Constants::DIFF_EDITOR_MIMETYPE)))
, m_document(new DiffEditorDocument())
, m_descriptionWidget(0)
, m_diffWidget(0)
, m_controller(0)
......
......@@ -37,7 +37,6 @@ namespace Constants {
const char DIFF_EDITOR_ID[] = "Diff Editor";
const char DIFF_EDITOR_DISPLAY_NAME[] = QT_TRANSLATE_NOOP("DiffEditor", "Diff Editor");
const char DIFF_EDITOR_MIMETYPE[] = "text/x-patch";
const char G_TOOLS_DIFF[] = "QtCreator.Group.Tools.Options";
} // namespace Constants
......
......@@ -35,9 +35,8 @@
namespace DiffEditor {
DiffEditorDocument::DiffEditorDocument(const QString &mimeType) :
DiffEditorDocument::DiffEditorDocument() :
Core::IDocument(),
m_mimeType(mimeType),
m_diffEditorController(new DiffEditorController(this))
{
setDisplayName(QCoreApplication::translate("DiffEditor", Constants::DIFF_EDITOR_DISPLAY_NAME));
......@@ -69,7 +68,7 @@ bool DiffEditorDocument::save(QString *errorString, const QString &fileName, boo
QString DiffEditorDocument::mimeType() const
{
return m_mimeType;
return QString();
}
Core::IDocument::ReloadBehavior DiffEditorDocument::reloadBehavior(ChangeTrigger state, ChangeType type) const
......
......@@ -42,7 +42,7 @@ class DIFFEDITOR_EXPORT DiffEditorDocument : public Core::IDocument
{
Q_OBJECT
public:
explicit DiffEditorDocument(const QString &mimeType);
explicit DiffEditorDocument();
virtual ~DiffEditorDocument();
DiffEditorController *controller() const;
......@@ -59,7 +59,6 @@ public:
bool reload(QString *errorString, ReloadFlag flag, ChangeType type);
private:
const QString m_mimeType;
DiffEditorController *m_diffEditorController;
};
......
......@@ -43,7 +43,6 @@ DiffEditorFactory::DiffEditorFactory(QObject *parent)
{
setId(Constants::DIFF_EDITOR_ID);
setDisplayName(qApp->translate("DiffEditorFactory", Constants::DIFF_EDITOR_DISPLAY_NAME));
addMimeType(QLatin1String(Constants::DIFF_EDITOR_MIMETYPE));
}
Core::IEditor *DiffEditorFactory::createEditor()
......
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