X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Finputwidget.cpp;fp=src%2Fqtui%2Finputwidget.cpp;h=f843eced573836b4bab992e04160f420053cadb4;hp=a83220764f0c454c6293653d405649531c55661e;hb=e2188dc438be6f3eb0d9cdf47d28821aefe9835e;hpb=c194ed5fb3d15e14b9364f9796d3521910dc72fe diff --git a/src/qtui/inputwidget.cpp b/src/qtui/inputwidget.cpp index a8322076..f843eced 100644 --- a/src/qtui/inputwidget.cpp +++ b/src/qtui/inputwidget.cpp @@ -144,7 +144,7 @@ InputWidget::InputWidget(QWidget *parent) ActionCollection *coll = QtUi::actionCollection(); - Action *activateInputline = coll->add("FocusInputLine"); + auto *activateInputline = coll->add("FocusInputLine"); connect(activateInputline, SIGNAL(triggered()), SLOT(setFocus())); activateInputline->setText(tr("Focus Input Line")); activateInputline->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_L)); @@ -232,10 +232,10 @@ bool InputWidget::eventFilter(QObject *watched, QEvent *event) if (event->type() != QEvent::KeyPress) return false; - QKeyEvent *keyEvent = static_cast(event); + auto *keyEvent = static_cast(event); // keys from BufferView should be sent to (and focus) the input line - BufferView *view = qobject_cast(watched); + auto *view = qobject_cast(watched); if (view) { if (keyEvent->text().length() == 1 && !(keyEvent->modifiers() & (Qt::ControlModifier ^ Qt::AltModifier))) { // normal key press QChar c = keyEvent->text().at(0); @@ -304,11 +304,11 @@ void InputWidget::dataChanged(const QModelIndex &topLeft, const QModelIndex &bot bool encrypted = false; - IrcChannel *chan = qobject_cast(Client::bufferModel()->data(selectionModel()->currentIndex(), NetworkModel::IrcChannelRole).value()); + auto *chan = qobject_cast(Client::bufferModel()->data(selectionModel()->currentIndex(), NetworkModel::IrcChannelRole).value()); if (chan) encrypted = chan->encrypted(); - IrcUser *user = qobject_cast(Client::bufferModel()->data(selectionModel()->currentIndex(), NetworkModel::IrcUserRole).value()); + auto *user = qobject_cast(Client::bufferModel()->data(selectionModel()->currentIndex(), NetworkModel::IrcUserRole).value()); if (user) encrypted = user->encrypted();