UiSettings s("InputWidget");
-#ifdef HAVE_KDE4
- s.notify("EnableSpellCheck", this, SLOT(setEnableSpellCheck(QVariant)));
- setEnableSpellCheck(s.value("EnableSpellCheck", false));
-#endif
-
s.notify("EnableEmacsMode", this, SLOT(setEnableEmacsMode(QVariant)));
setEnableEmacsMode(s.value("EnableEmacsMode", false));
ActionCollection *coll = QtUi::actionCollection();
- Action *activateInputline = coll->add<Action>("FocusInputLine");
+ auto *activateInputline = coll->add<Action>("FocusInputLine");
connect(activateInputline, SIGNAL(triggered()), SLOT(setFocus()));
activateInputline->setText(tr("Focus Input Line"));
activateInputline->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_L));
}
-InputWidget::~InputWidget()
-{
-}
-
-
void InputWidget::setUseCustomFont(const QVariant &v)
{
if (v.toBool()) {
}
-void InputWidget::setEnableSpellCheck(const QVariant &v)
-{
- ui.inputEdit->setSpellCheckEnabled(v.toBool());
-}
-
-
void InputWidget::setEnableEmacsMode(const QVariant &v)
{
ui.inputEdit->setEmacsMode(v.toBool());
if (event->type() != QEvent::KeyPress)
return false;
- QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event);
+ auto *keyEvent = static_cast<QKeyEvent *>(event);
// keys from BufferView should be sent to (and focus) the input line
- BufferView *view = qobject_cast<BufferView *>(watched);
+ auto *view = qobject_cast<BufferView *>(watched);
if (view) {
if (keyEvent->text().length() == 1 && !(keyEvent->modifiers() & (Qt::ControlModifier ^ Qt::AltModifier))) { // normal key press
QChar c = keyEvent->text().at(0);
bool encrypted = false;
- IrcChannel *chan = qobject_cast<IrcChannel *>(Client::bufferModel()->data(selectionModel()->currentIndex(), NetworkModel::IrcChannelRole).value<QObject *>());
+ auto *chan = qobject_cast<IrcChannel *>(Client::bufferModel()->data(selectionModel()->currentIndex(), NetworkModel::IrcChannelRole).value<QObject *>());
if (chan)
encrypted = chan->encrypted();
- IrcUser *user = qobject_cast<IrcUser *>(Client::bufferModel()->data(selectionModel()->currentIndex(), NetworkModel::IrcUserRole).value<QObject *>());
+ auto *user = qobject_cast<IrcUser *>(Client::bufferModel()->data(selectionModel()->currentIndex(), NetworkModel::IrcUserRole).value<QObject *>());
if (user)
encrypted = user->encrypted();
BufferInfo InputWidget::currentBufferInfo() const
{
return selectionModel()->currentIndex().data(NetworkModel::BufferInfoRole).value<BufferInfo>();
-};
+}
void InputWidget::applyFormatActiveColor()
const Network *previousNet = Client::network(_networkId);
if (previousNet) {
- disconnect(previousNet, 0, this, 0);
+ disconnect(previousNet, nullptr, this, nullptr);
if (previousNet->me())
- disconnect(previousNet->me(), 0, this, 0);
+ disconnect(previousNet->me(), nullptr, this, nullptr);
}
_networkId = networkId;
const Identity *previousIdentity = Client::identity(_identityId);
if (previousIdentity)
- disconnect(previousIdentity, 0, this, 0);
+ disconnect(previousIdentity, nullptr, this, nullptr);
_identityId = identityId;