modernize: Use auto where the type is clear from context
[quassel.git] / src / uisupport / multilineedit.cpp
index 2c9d594..ac92235 100644 (file)
 const int leftMargin = 3;
 
 MultiLineEdit::MultiLineEdit(QWidget *parent)
-    : MultiLineEditParent(parent),
-    _idx(0),
-    _mode(SingleLine),
-    _singleLine(true),
-    _minHeight(1),
-    _maxHeight(5),
-    _scrollBarsEnabled(true),
-    _pasteProtectionEnabled(true),
-    _emacsMode(false),
-    _completionSpace(0),
-    _lastDocumentHeight(-1)
+    : MultiLineEditParent(parent)
 {
     document()->setDocumentMargin(0);
 
@@ -83,10 +73,6 @@ MultiLineEdit::MultiLineEdit(QWidget *parent)
 }
 
 
-MultiLineEdit::~MultiLineEdit()
-{
-}
-
 #if defined HAVE_SONNET && !defined HAVE_KDE
 Sonnet::Highlighter *MultiLineEdit::highlighter() const
 {
@@ -227,7 +213,7 @@ void MultiLineEdit::updateSizeHint()
 QSize MultiLineEdit::sizeHint() const
 {
     if (!_sizeHint.isValid()) {
-        MultiLineEdit *that = const_cast<MultiLineEdit *>(this);
+        auto *that = const_cast<MultiLineEdit *>(this);
         that->updateSizeHint();
     }
     return _sizeHint;
@@ -312,7 +298,7 @@ bool MultiLineEdit::event(QEvent *e)
 {
     // We need to make sure that global shortcuts aren't eaten
     if (e->type() == QEvent::ShortcutOverride) {
-        QKeyEvent *event = static_cast<QKeyEvent *>(e);
+        auto *event = static_cast<QKeyEvent *>(e);
         QKeySequence key = QKeySequence(event->key() | event->modifiers());
         foreach(QAction *action, GraphicalUi::actionCollection()->actions()) {
             if (action->shortcuts().contains(key)) {