Commit e5cb8b1c authored by Tobias Hunger's avatar Tobias Hunger

DiffEditor: Assert that document is passed in

Do not bother to check after that assert.

Change-Id: I4d8d8c8aa40420880824b7832005ab3f06df4aa7
Reviewed-by: default avatarJarek Kobus <jaroslaw.kobus@theqtcompany.com>
parent d4a32fd6
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
#include <texteditor/marginsettings.h> #include <texteditor/marginsettings.h>
#include <utils/fileutils.h> #include <utils/fileutils.h>
#include <utils/qtcassert.h>
#include <QStackedWidget> #include <QStackedWidget>
#include <QToolButton> #include <QToolButton>
...@@ -217,6 +218,8 @@ DiffEditor::DiffEditor(const QSharedPointer<DiffEditorDocument> &doc) ...@@ -217,6 +218,8 @@ DiffEditor::DiffEditor(const QSharedPointer<DiffEditorDocument> &doc)
, m_reloadAction(0) , m_reloadAction(0)
, m_diffEditorSwitcher(0) , m_diffEditorSwitcher(0)
{ {
QTC_ASSERT(m_document, return);
QSplitter *splitter = new Core::MiniSplitter(Qt::Vertical); QSplitter *splitter = new Core::MiniSplitter(Qt::Vertical);
m_descriptionWidget = new Internal::DescriptionEditorWidget(splitter); m_descriptionWidget = new Internal::DescriptionEditorWidget(splitter);
...@@ -276,10 +279,6 @@ bool DiffEditor::open(QString *errorString, ...@@ -276,10 +279,6 @@ bool DiffEditor::open(QString *errorString,
const QString &realFileName) const QString &realFileName)
{ {
Q_UNUSED(realFileName) Q_UNUSED(realFileName)
if (!m_document)
return false;
return m_document->open(errorString, fileName); return m_document->open(errorString, fileName);
} }
......
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