Convert more to signal/slot connect based on member function pointer

parent 132075e8
......@@ -28,7 +28,7 @@ AwayManager::AwayManager(QObject* parent) : QObject(parent)
m_connectionManager = Application::instance()->getConnectionManager();
connect(KIdleTime::instance(), &KIdleTime::resumingFromIdle, this, &AwayManager::resumeFromIdle);
connect(KIdleTime::instance(), SIGNAL(timeoutReached(int)), this, SLOT(idleTimeoutReached(int)));
connect(KIdleTime::instance(), QOverload<int>::of(&KIdleTime::timeoutReached), this, &AwayManager::idleTimeoutReached);
// Catch the first "resume event" (= user input) so we correctly catch the first
// resume event in case the user is already idle on startup).
......
......@@ -41,7 +41,7 @@ ConnectionBehavior_Config::ConnectionBehavior_Config(QWidget* parent)
kcfg_ReconnectDelay->setSuffix(ki18np(" second", " seconds"));
connect(m_ProxyPassword, SIGNAL(textChanged(QString)), this, SLOT(setPasswordChanged()));
connect(m_ProxyPassword, &KLineEdit::textChanged, this, [this]() { setPasswordChanged(); });
}
void ConnectionBehavior_Config::restorePageToDefaults()
......
......@@ -71,8 +71,8 @@ namespace Konversation
slotSelectedConnectionChanged(m_ui.networkNameCombo->findData(server->connectionId()));
connect(mOkButton, &QPushButton::clicked, this, &JoinChannelDialog::slotOk);
connect(Application::instance()->getConnectionManager(), SIGNAL(connectionListChanged()),
this, SLOT(slotConnectionListChanged()));
connect(Application::instance()->getConnectionManager(), &ConnectionManager::connectionListChanged,
this, &JoinChannelDialog::slotConnectionListChanged);
}
JoinChannelDialog::~JoinChannelDialog()
......
......@@ -388,8 +388,8 @@ void NicksOnline::updateServerOnlineList(Server* servr)
{
networkRoot->setExpanded(true);
// Connect server NickInfo updates.
connect (servr, SIGNAL(nickInfoChanged(Server*,NickInfoPtr)),
this, SLOT(slotNickInfoChanged(Server*,NickInfoPtr)));
connect (servr, QOverload<Server*, NickInfoPtr>::of(&Server::nickInfoChanged),
this, &NicksOnline::slotNickInfoChanged);
}
}
......
......@@ -68,7 +68,7 @@ namespace Konversation
m_mainWidget->m_downServerBtn->setIcon(QIcon::fromTheme(QStringLiteral("arrow-down")));
connect(m_mainWidget->m_addServerButton, &QPushButton::clicked, this, &ServerGroupDialog::addServer);
connect(m_mainWidget->m_changeServerButton, SIGNAL(clicked()), this, SLOT(editServer()));
connect(m_mainWidget->m_changeServerButton, &QPushButton::clicked, this, QOverload<>::of(&ServerGroupDialog::editServer));
connect(m_mainWidget->m_removeServerButton, &QToolButton::clicked, this, &ServerGroupDialog::deleteServer);
connect(m_mainWidget->m_serverLBox, &QListWidget::itemSelectionChanged, this, &ServerGroupDialog::updateServerArrows);
connect(m_mainWidget->m_upServerBtn, &QToolButton::clicked, this, &ServerGroupDialog::moveServerUp);
......
......@@ -22,8 +22,8 @@ ServerISON::ServerISON(Server* server) : m_server(server)
{
m_ISONList_invalid = true;
connect( m_server, SIGNAL(nickInfoChanged(Server*,NickInfoPtr)),
this, SLOT(nickInfoChanged(Server*,NickInfoPtr)));
connect( m_server, QOverload<Server*, NickInfoPtr>::of(&Server::nickInfoChanged),
this, &ServerISON::nickInfoChanged);
connect( m_server,
&Server::channelMembersChanged,
this,
......
......@@ -297,7 +297,7 @@ namespace Konversation
notification->setText(i18nc("%1 - filename","%1 File Transfer is complete", file));
//notification->setPixmap( QPixmap() );
notification->setActions(QStringList(i18nc("Opens the file from the finished dcc transfer", "Open")));
connect(notification, SIGNAL(activated(unsigned)), transfer, SLOT(runFile()));
connect(notification, QOverload<unsigned int>::of(&KNotification::activated), transfer, &DCC::Transfer::runFile);
notification->sendEvent();
}
}
......
......@@ -90,7 +90,7 @@ void QueueTuner::setServer(Server* newServer)
if (m_server)
{
connect(m_server, SIGNAL(destroyed(QObject*)), SLOT(serverDestroyed(QObject*)));
connect(m_server, &QObject::destroyed, this, &QueueTuner::serverDestroyed);
getRates();
}
......
......@@ -38,8 +38,11 @@ namespace Konversation
UPnPMCastSocket::UPnPMCastSocket() : QUdpSocket ()
{
QObject::connect(this, &UPnPMCastSocket::readyRead, this, &UPnPMCastSocket::onReadyRead);
QObject::connect(this, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(onError(QAbstractSocket::SocketError)));
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
QObject::connect(this, &UPnPMCastSocket::errorOccurred, this, &UPnPMCastSocket::onError);
#else
QObject::connect(this, QOverload<QAbstractSocket::SocketError>::of(&UPnPMCastSocket::error), this, &UPnPMCastSocket::onError);
#endif
for (quint32 i = 0;i < 10;i++)
{
if (!bind(1900 + i,QUdpSocket::ShareAddress))
......
......@@ -92,7 +92,7 @@ namespace Konversation
connect(this, &ChannelOptionsDialog::finished, m_ui.topicEdit, &TopicEdit::clear);
connect(m_channel, &Channel::modesChanged, this, &ChannelOptionsDialog::refreshModes);
connect(m_channel->getServer(), SIGNAL(channelNickChanged(QString)), this, SLOT(refreshEnableModes()));
connect(m_channel->getServer(), &Server::channelNickChanged, this, [this]() { refreshEnableModes(); });
connect(m_channel, &Channel::banAdded, this, &ChannelOptionsDialog::addBan);
connect(m_channel, &Channel::banRemoved, this, &ChannelOptionsDialog::removeBan);
......
......@@ -130,7 +130,7 @@ void IRCInput::hideEvent(QHideEvent* /* event */)
//TODO FIXME when we get to require 4.2 the above is possible with
//KTextEditSpellInterface and is actually quite easy to do.
disconnect(SIGNAL(checkSpellingChanged(bool)));
disconnect(this, &IRCInput::checkSpellingChanged, nullptr, nullptr);
m_disableSpellCheckTimer->setSingleShot(true);
m_disableSpellCheckTimer->start(5000);
}
......
......@@ -71,7 +71,7 @@ LogfileReader::LogfileReader(QWidget* parent, const QString& log, const QString&
updateAppearance();
connect(getTextView(), SIGNAL(gotFocus()), getTextView(), SLOT(setFocus()));
connect(getTextView(), &IRCView::gotFocus, getTextView(), QOverload<>::of(&IRCView::setFocus));
}
LogfileReader::~LogfileReader()
......
......@@ -18,7 +18,7 @@ QuickButton::QuickButton(const QString &label,const QString &newDefinition,QWidg
QPushButton(label,parent)
{
setDefinition(newDefinition);
connect(this,SIGNAL (clicked()),this,SLOT (wasClicked()) );
connect(this, &QAbstractButton::clicked, this, &QuickButton::wasClicked);
}
QuickButton::~QuickButton()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment