summaryrefslogtreecommitdiff
path: root/src/plugins/texteditor
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@theqtcompany.com>2015-08-20 13:23:06 +0200
committerEike Ziller <eike.ziller@theqtcompany.com>2015-08-20 13:23:13 +0200
commit8eaaef96aa55c10f00b429c3e6ade8d8be568141 (patch)
tree33ff4239b1523d5f145d0ec5681716859f276e4c /src/plugins/texteditor
parent2f781ac28083bc06b549ce69335b4c7901cde61d (diff)
parent0173c638537e9a53a439ec4be5a9ab7b10a27a79 (diff)
downloadqt-creator-8eaaef96aa55c10f00b429c3e6ade8d8be568141.tar.gz
Merge remote-tracking branch 'origin/3.5'
Change-Id: I65968dd02ea6bdd15f304ae567dd0c02238e6949
Diffstat (limited to 'src/plugins/texteditor')
-rw-r--r--src/plugins/texteditor/codeassist/functionhintproposalwidget.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/plugins/texteditor/codeassist/functionhintproposalwidget.cpp b/src/plugins/texteditor/codeassist/functionhintproposalwidget.cpp
index e6f19ee6db..925881a451 100644
--- a/src/plugins/texteditor/codeassist/functionhintproposalwidget.cpp
+++ b/src/plugins/texteditor/codeassist/functionhintproposalwidget.cpp
@@ -34,6 +34,7 @@
#include <utils/faketooltip.h>
#include <utils/hostosinfo.h>
+#include <utils/qtcassert.h>
#include <QDebug>
#include <QApplication>
@@ -201,7 +202,8 @@ bool FunctionHintProposalWidget::eventFilter(QObject *obj, QEvent *e)
d->m_escapePressed = true;
e->accept();
}
- if (d->m_model->size() > 1) {
+ QTC_CHECK(d->m_model);
+ if (d->m_model && d->m_model->size() > 1) {
QKeyEvent *ke = static_cast<QKeyEvent*>(e);
if (ke->key() == Qt::Key_Up) {
previousPage();
@@ -220,10 +222,13 @@ bool FunctionHintProposalWidget::eventFilter(QObject *obj, QEvent *e)
emit explicitlyAborted();
return false;
} else if (ke->key() == Qt::Key_Up || ke->key() == Qt::Key_Down) {
- if (d->m_model->size() > 1)
+ QTC_CHECK(d->m_model);
+ if (d->m_model && d->m_model->size() > 1)
return false;
}
- d->m_assistant->notifyChange();
+ QTC_CHECK(d->m_assistant);
+ if (d->m_assistant)
+ d->m_assistant->notifyChange();
}
break;
case QEvent::WindowDeactivate: