Refactoring of signal/slots connection to new qt syntax

This commit is contained in:
Blue 2019-11-03 21:46:40 +03:00
parent 9d491e9e93
commit 0b57e6a77f
16 changed files with 81 additions and 83 deletions

View file

@ -42,7 +42,7 @@ Badge::Badge(const QString& p_id, const QString& p_text, const QIcon& icon, QWid
layout->setContentsMargins(2, 2, 2, 2);
connect(closeButton, SIGNAL(clicked()), this, SIGNAL(close()));
connect(closeButton, &QPushButton::clicked, this, &Badge::close);
}
Badge::~Badge()

View file

@ -125,7 +125,7 @@ void Message::addDownloadDialog()
fileComment->setText(tr("%1 is offering you to download a file").arg(sender->text()));
}
fileComment->show();
connect(downloadButton, SIGNAL(clicked()), this, SLOT(onDownload()));
connect(downloadButton, &QPushButton::clicked, this, &Message::onDownload);
bodyLayout->insertWidget(2, fileComment);
bodyLayout->insertWidget(3, downloadButton);
hasDownloadButton = true;

View file

@ -127,7 +127,7 @@ MessageLine::Position MessageLine::message(const Shared::Message& msg)
if (msg.hasOutOfBandUrl()) {\
emit requestLocalFile(msg.getId(), msg.getOutOfBandUrl());
connect(message, SIGNAL(downloadFile(const QString&, const QString&)), this, SIGNAL(downloadFile(const QString&, const QString&)));
connect(message, &Message::downloadFile, this, &MessageLine::downloadFile);
}
return res;