diff options
Diffstat (limited to 'src/plugins/texteditor/codeassist/genericproposalwidget.cpp')
-rw-r--r-- | src/plugins/texteditor/codeassist/genericproposalwidget.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/plugins/texteditor/codeassist/genericproposalwidget.cpp b/src/plugins/texteditor/codeassist/genericproposalwidget.cpp index cecaad9666..8f5d729148 100644 --- a/src/plugins/texteditor/codeassist/genericproposalwidget.cpp +++ b/src/plugins/texteditor/codeassist/genericproposalwidget.cpp @@ -64,8 +64,8 @@ class ModelAdapter : public QAbstractListModel public: ModelAdapter(GenericProposalModelPtr completionModel, QWidget *parent); - virtual int rowCount(const QModelIndex &) const; - virtual QVariant data(const QModelIndex &index, int role) const; + int rowCount(const QModelIndex &) const override; + QVariant data(const QModelIndex &index, int role) const override; private: GenericProposalModelPtr m_completionModel; @@ -102,10 +102,10 @@ QVariant ModelAdapter::data(const QModelIndex &index, int role) const class GenericProposalInfoFrame : public FakeToolTip { public: - GenericProposalInfoFrame(QWidget *parent = 0) + GenericProposalInfoFrame(QWidget *parent = nullptr) : FakeToolTip(parent), m_label(new QLabel(this)) { - QVBoxLayout *layout = new QVBoxLayout(this); + auto layout = new QVBoxLayout(this); layout->setMargin(0); layout->setSpacing(0); layout->addWidget(m_label); @@ -297,7 +297,7 @@ GenericProposalWidget::GenericProposalWidget() connect(d->m_completionListView->verticalScrollBar(), &QAbstractSlider::sliderReleased, this, &GenericProposalWidget::turnOnAutoWidth); - QVBoxLayout *layout = new QVBoxLayout(this); + auto layout = new QVBoxLayout(this); layout->setMargin(0); layout->addWidget(d->m_completionListView); @@ -501,7 +501,7 @@ bool GenericProposalWidget::eventFilter(QObject *o, QEvent *e) d->m_infoFrame->close(); return true; } else if (e->type() == QEvent::ShortcutOverride) { - QKeyEvent *ke = static_cast<QKeyEvent *>(e); + auto ke = static_cast<QKeyEvent *>(e); switch (ke->key()) { case Qt::Key_N: case Qt::Key_P: @@ -511,7 +511,7 @@ bool GenericProposalWidget::eventFilter(QObject *o, QEvent *e) } } } else if (e->type() == QEvent::KeyPress) { - QKeyEvent *ke = static_cast<QKeyEvent *>(e); + auto ke = static_cast<QKeyEvent *>(e); switch (ke->key()) { case Qt::Key_Escape: abort(); |