Connection syntax migration (#637)
This commit is contained in:
@@ -57,10 +57,9 @@ OSDBase::OSDBase(SystemTrayIcon *tray_icon, Application *app, QObject *parent)
|
||||
custom_text2_(QString()),
|
||||
force_show_next_(false),
|
||||
ignore_next_stopped_(false),
|
||||
playing_(false)
|
||||
{
|
||||
playing_(false) {
|
||||
|
||||
connect(app_->current_albumcover_loader(), SIGNAL(ThumbnailLoaded(Song, QUrl, QImage)), SLOT(AlbumCoverLoaded(Song, QUrl, QImage)));
|
||||
QObject::connect(app_->current_albumcover_loader(), &CurrentAlbumCoverLoader::ThumbnailLoaded, this, &OSDBase::AlbumCoverLoaded);
|
||||
|
||||
app_name_[0] = app_name_[0].toUpper();
|
||||
|
||||
|
||||
@@ -168,7 +168,7 @@ void OSDDBus::ShowMessageNative(const QString &summary, const QString &message,
|
||||
|
||||
QDBusPendingReply<uint> reply = interface_->Notify(app_name(), id, icon, summary_stripped, message, QStringList(), hints, timeout_msec());
|
||||
QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(reply, this);
|
||||
connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)), SLOT(CallFinished(QDBusPendingCallWatcher*)));
|
||||
QObject::connect(watcher, &QDBusPendingCallWatcher::finished, this, &OSDDBus::CallFinished);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -124,13 +124,13 @@ OSDPretty::OSDPretty(Mode mode, QWidget *parent)
|
||||
// Timeout
|
||||
timeout_->setSingleShot(true);
|
||||
timeout_->setInterval(5000);
|
||||
connect(timeout_, SIGNAL(timeout()), SLOT(hide()));
|
||||
QObject::connect(timeout_, &QTimer::timeout, this, &OSDPretty::hide);
|
||||
|
||||
ui_->icon->setMaximumSize(kMaxIconSize, kMaxIconSize);
|
||||
|
||||
// Fader
|
||||
connect(fader_, SIGNAL(valueChanged(qreal)), SLOT(FaderValueChanged(qreal)));
|
||||
connect(fader_, SIGNAL(finished()), SLOT(FaderFinished()));
|
||||
QObject::connect(fader_, &QTimeLine::valueChanged, this, &OSDPretty::FaderValueChanged);
|
||||
QObject::connect(fader_, &QTimeLine::finished, this, &OSDPretty::FaderFinished);
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
set_fading_enabled(true);
|
||||
@@ -155,8 +155,8 @@ OSDPretty::OSDPretty(Mode mode, QWidget *parent)
|
||||
margin.setRight(margin.right() + kDropShadowSize);
|
||||
l->setContentsMargins(margin);
|
||||
|
||||
connect(qApp, SIGNAL(screenAdded(QScreen*)), this, SLOT(ScreenAdded(QScreen*)));
|
||||
connect(qApp, SIGNAL(screenRemoved(QScreen*)), this, SLOT(ScreenRemoved(QScreen*)));
|
||||
QObject::connect(qApp, &QApplication::screenAdded, this, &OSDPretty::ScreenAdded);
|
||||
QObject::connect(qApp, &QApplication::screenRemoved, this, &OSDPretty::ScreenRemoved);
|
||||
|
||||
}
|
||||
|
||||
@@ -410,7 +410,7 @@ void OSDPretty::FaderFinished() {
|
||||
|
||||
}
|
||||
|
||||
void OSDPretty::FaderValueChanged(qreal value) {
|
||||
void OSDPretty::FaderValueChanged(const qreal value) {
|
||||
setWindowOpacity(value);
|
||||
}
|
||||
|
||||
|
||||
@@ -134,7 +134,7 @@ class OSDPretty : public QWidget {
|
||||
QRect BoxBorder() const;
|
||||
|
||||
private slots:
|
||||
void FaderValueChanged(qreal value);
|
||||
void FaderValueChanged(const qreal value);
|
||||
void FaderFinished();
|
||||
void ScreenAdded(QScreen *screen);
|
||||
void ScreenRemoved(QScreen *screen);
|
||||
|
||||
Reference in New Issue
Block a user