#include <QHeaderView>
#include <QMessageBox>
#include <QTextCodec>
+#include <utility>
#include "networkssettingspage.h"
NetworksSettingsPage::NetworksSettingsPage(QWidget *parent)
: SettingsPage(tr("IRC"), tr("Networks"), parent)
-#ifdef HAVE_SSL
- , _cid(nullptr)
-#endif
{
ui.setupUi(this);
void NetworksSettingsPage::clientIdentityUpdated()
{
- const Identity *identity = qobject_cast<const Identity *>(sender());
+ const auto *identity = qobject_cast<const Identity *>(sender());
if (!identity) {
qWarning() << "NetworksSettingsPage: Invalid identity to update!";
return;
void NetworksSettingsPage::clientNetworkUpdated()
{
- const Network *net = qobject_cast<const Network *>(sender());
+ const auto *net = qobject_cast<const Network *>(sender());
if (!net) {
qWarning() << "Update request for unknown network received!";
return;
void NetworksSettingsPage::networkConnectionStateChanged(Network::ConnectionState state)
{
Q_UNUSED(state);
- const Network *net = qobject_cast<const Network *>(sender());
+ const auto *net = qobject_cast<const Network *>(sender());
if (!net) return;
/*
if(net->networkId() == currentId) {
void NetworksSettingsPage::clientNetworkCapsUpdated()
{
// Grab the updated network
- const Network *net = qobject_cast<const Network *>(sender());
+ const auto *net = qobject_cast<const Network *>(sender());
if (!net) {
qWarning() << "Update request for unknown network received!";
return;
* NetworkAddDlg
*************************************************************************/
-NetworkAddDlg::NetworkAddDlg(const QStringList &exist, QWidget *parent) : QDialog(parent), existing(exist)
+NetworkAddDlg::NetworkAddDlg(QStringList exist, QWidget *parent) : QDialog(parent), existing(std::move(exist))
{
ui.setupUi(this);
ui.useSSL->setIcon(icon::get("document-encrypt"));
* NetworkEditDlg
*************************************************************************/
-NetworkEditDlg::NetworkEditDlg(const QString &old, const QStringList &exist, QWidget *parent) : QDialog(parent), existing(exist)
+NetworkEditDlg::NetworkEditDlg(const QString &old, QStringList exist, QWidget *parent) : QDialog(parent), existing(std::move(exist))
{
ui.setupUi(this);