diff options
Diffstat (limited to 'src/panels/information')
| -rw-r--r-- | src/panels/information/informationpanel.cpp | 30 | ||||
| -rw-r--r-- | src/panels/information/informationpanelcontent.cpp | 20 | ||||
| -rw-r--r-- | src/panels/information/phononwidget.cpp | 12 | ||||
| -rw-r--r-- | src/panels/information/pixmapviewer.cpp | 4 |
4 files changed, 33 insertions, 33 deletions
diff --git a/src/panels/information/informationpanel.cpp b/src/panels/information/informationpanel.cpp index 3da076956..4ad1276a5 100644 --- a/src/panels/information/informationpanel.cpp +++ b/src/panels/information/informationpanel.cpp @@ -188,8 +188,8 @@ void InformationPanel::showItemInfo() if (m_folderStatJob->ui()) { KJobWidgets::setWindow(m_folderStatJob, this); } - connect(m_folderStatJob, SIGNAL(result(KJob*)), - this, SLOT(slotFolderStatFinished(KJob*))); + connect(m_folderStatJob, &KIO::Job::result, + this, &InformationPanel::slotFolderStatFinished); } else { m_content->showItem(item); } @@ -324,35 +324,35 @@ void InformationPanel::init() m_infoTimer = new QTimer(this); m_infoTimer->setInterval(300); m_infoTimer->setSingleShot(true); - connect(m_infoTimer, SIGNAL(timeout()), - this, SLOT(slotInfoTimeout())); + connect(m_infoTimer, &QTimer::timeout, + this, &InformationPanel::slotInfoTimeout); m_urlChangedTimer = new QTimer(this); m_urlChangedTimer->setInterval(200); m_urlChangedTimer->setSingleShot(true); - connect(m_urlChangedTimer, SIGNAL(timeout()), - this, SLOT(showItemInfo())); + connect(m_urlChangedTimer, &QTimer::timeout, + this, &InformationPanel::showItemInfo); m_resetUrlTimer = new QTimer(this); m_resetUrlTimer->setInterval(1000); m_resetUrlTimer->setSingleShot(true); - connect(m_resetUrlTimer, SIGNAL(timeout()), - this, SLOT(reset())); + connect(m_resetUrlTimer, &QTimer::timeout, + this, &InformationPanel::reset); Q_ASSERT(m_urlChangedTimer->interval() < m_infoTimer->interval()); Q_ASSERT(m_urlChangedTimer->interval() < m_resetUrlTimer->interval()); org::kde::KDirNotify* dirNotify = new org::kde::KDirNotify(QString(), QString(), QDBusConnection::sessionBus(), this); - connect(dirNotify, SIGNAL(FileRenamed(QString,QString)), SLOT(slotFileRenamed(QString,QString))); - connect(dirNotify, SIGNAL(FilesAdded(QString)), SLOT(slotFilesAdded(QString))); - connect(dirNotify, SIGNAL(FilesChanged(QStringList)), SLOT(slotFilesChanged(QStringList))); - connect(dirNotify, SIGNAL(FilesRemoved(QStringList)), SLOT(slotFilesRemoved(QStringList))); - connect(dirNotify, SIGNAL(enteredDirectory(QString)), SLOT(slotEnteredDirectory(QString))); - connect(dirNotify, SIGNAL(leftDirectory(QString)), SLOT(slotLeftDirectory(QString))); + connect(dirNotify, &OrgKdeKDirNotifyInterface::FileRenamed, this, &InformationPanel::slotFileRenamed); + connect(dirNotify, &OrgKdeKDirNotifyInterface::FilesAdded, this, &InformationPanel::slotFilesAdded); + connect(dirNotify, &OrgKdeKDirNotifyInterface::FilesChanged, this, &InformationPanel::slotFilesChanged); + connect(dirNotify, &OrgKdeKDirNotifyInterface::FilesRemoved, this, &InformationPanel::slotFilesRemoved); + connect(dirNotify, &OrgKdeKDirNotifyInterface::enteredDirectory, this, &InformationPanel::slotEnteredDirectory); + connect(dirNotify, &OrgKdeKDirNotifyInterface::leftDirectory, this, &InformationPanel::slotLeftDirectory); m_content = new InformationPanelContent(this); - connect(m_content, SIGNAL(urlActivated(KUrl)), this, SIGNAL(urlActivated(KUrl))); + connect(m_content, &InformationPanelContent::urlActivated, this, &InformationPanel::urlActivated); QVBoxLayout* layout = new QVBoxLayout(this); layout->setContentsMargins(0, 0, 0, 0); diff --git a/src/panels/information/informationpanelcontent.cpp b/src/panels/information/informationpanelcontent.cpp index ee5e350af..74f0ae935 100644 --- a/src/panels/information/informationpanelcontent.cpp +++ b/src/panels/information/informationpanelcontent.cpp @@ -83,8 +83,8 @@ InformationPanelContent::InformationPanelContent(QWidget* parent) : m_outdatedPreviewTimer = new QTimer(this); m_outdatedPreviewTimer->setInterval(300); m_outdatedPreviewTimer->setSingleShot(true); - connect(m_outdatedPreviewTimer, SIGNAL(timeout()), - this, SLOT(markOutdatedPreview())); + connect(m_outdatedPreviewTimer, &QTimer::timeout, + this, &InformationPanelContent::markOutdatedPreview); QVBoxLayout* layout = new QVBoxLayout(this); layout->setSpacing(KDialog::spacingHint()); @@ -99,8 +99,8 @@ InformationPanelContent::InformationPanelContent(QWidget* parent) : m_phononWidget = new PhononWidget(parent); m_phononWidget->hide(); m_phononWidget->setMinimumWidth(minPreviewWidth); - connect(m_phononWidget, SIGNAL(hasVideoChanged(bool)), - this, SLOT(slotHasVideoChanged(bool))); + connect(m_phononWidget, &PhononWidget::hasVideoChanged, + this, &InformationPanelContent::slotHasVideoChanged); // name m_nameLabel = new QLabel(parent); @@ -121,7 +121,7 @@ InformationPanelContent::InformationPanelContent(QWidget* parent) : #endif m_metaDataWidget->setFont(KGlobalSettings::smallestReadableFont()); m_metaDataWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum); - connect(m_metaDataWidget, SIGNAL(urlActivated(KUrl)), this, SIGNAL(urlActivated(KUrl))); + connect(m_metaDataWidget, &KFileMetaDataWidget::urlActivated, this, &InformationPanelContent::urlActivated); // Encapsulate the MetaDataWidget inside a container that has a dummy widget // at the bottom. This prevents that the meta data widget gets vertically stretched @@ -198,10 +198,10 @@ void InformationPanelContent::showItem(const KFileItem& item) KJobWidgets::setWindow(m_previewJob, this); } - connect(m_previewJob, SIGNAL(gotPreview(KFileItem,QPixmap)), - this, SLOT(showPreview(KFileItem,QPixmap))); - connect(m_previewJob, SIGNAL(failed(KFileItem)), - this, SLOT(showIcon(KFileItem))); + connect(m_previewJob.data(), &KIO::PreviewJob::gotPreview, + this, &InformationPanelContent::showPreview); + connect(m_previewJob.data(), &KIO::PreviewJob::failed, + this, &InformationPanelContent::showIcon); } } @@ -317,7 +317,7 @@ void InformationPanelContent::configureSettings(const QList<QAction*>& customCon dialog->show(); dialog->raise(); dialog->activateWindow(); - connect(dialog, SIGNAL(destroyed()), this, SLOT(refreshMetaData())); + connect(dialog, &FileMetaDataConfigurationDialog::destroyed, this, &InformationPanelContent::refreshMetaData); } } diff --git a/src/panels/information/phononwidget.cpp b/src/panels/information/phononwidget.cpp index 092b5dd5b..4b2cc28c5 100644 --- a/src/panels/information/phononwidget.cpp +++ b/src/panels/information/phononwidget.cpp @@ -131,14 +131,14 @@ void PhononWidget::showEvent(QShowEvent *event) m_playButton->setIconSize(buttonSize); m_playButton->setIcon(KIcon("media-playback-start")); m_playButton->setAutoRaise(true); - connect(m_playButton, SIGNAL(clicked()), this, SLOT(play())); + connect(m_playButton, &QToolButton::clicked, this, &PhononWidget::play); m_stopButton->setToolTip(i18n("stop")); m_stopButton->setIconSize(buttonSize); m_stopButton->setIcon(KIcon("media-playback-stop")); m_stopButton->setAutoRaise(true); m_stopButton->hide(); - connect(m_stopButton, SIGNAL(clicked()), this, SLOT(stop())); + connect(m_stopButton, &QToolButton::clicked, this, &PhononWidget::stop); m_seekSlider->setIconVisible(false); @@ -178,10 +178,10 @@ void PhononWidget::play() { if (!m_media) { m_media = new Phonon::MediaObject(this); - connect(m_media, SIGNAL(stateChanged(Phonon::State,Phonon::State)), - this, SLOT(stateChanged(Phonon::State))); - connect(m_media, SIGNAL(hasVideoChanged(bool)), - this, SLOT(slotHasVideoChanged(bool))); + connect(m_media, &Phonon::MediaObject::stateChanged, + this, &PhononWidget::stateChanged); + connect(m_media, &Phonon::MediaObject::hasVideoChanged, + this, &PhononWidget::slotHasVideoChanged); m_seekSlider->setMediaObject(m_media); } diff --git a/src/panels/information/pixmapviewer.cpp b/src/panels/information/pixmapviewer.cpp index 8a752c587..db3a63331 100644 --- a/src/panels/information/pixmapviewer.cpp +++ b/src/panels/information/pixmapviewer.cpp @@ -39,8 +39,8 @@ PixmapViewer::PixmapViewer(QWidget* parent, Transition transition) : m_animation.setCurveShape(QTimeLine::LinearCurve); if (m_transition != NoTransition) { - connect(&m_animation, SIGNAL(valueChanged(qreal)), this, SLOT(update())); - connect(&m_animation, SIGNAL(finished()), this, SLOT(checkPendingPixmaps())); + connect(&m_animation, &QTimeLine::valueChanged, this, static_cast<void(PixmapViewer::*)()>(&PixmapViewer::update)); + connect(&m_animation, &QTimeLine::finished, this, &PixmapViewer::checkPendingPixmaps); } } |
