From 5a4f6b0a9fb6be586e855e17488602b64456d474 Mon Sep 17 00:00:00 2001 From: Montel Laurent Date: Mon, 29 Sep 2014 07:10:46 +0200 Subject: [PATCH] Port to new connect api --- dialog/archivefolderdialog.cpp | 9 +++------ dialog/kmknotify.cpp | 3 +-- editor/attachmentcontroller.cpp | 9 ++++----- 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/dialog/archivefolderdialog.cpp b/dialog/archivefolderdialog.cpp index d3d3a6ff2..2f05e609f 100644 --- a/dialog/archivefolderdialog.cpp +++ b/dialog/archivefolderdialog.cpp @@ -103,8 +103,7 @@ ArchiveFolderDialog::ArchiveFolderDialog( QWidget *parent ) mFormatComboBox->addItem( i18n( "BZ2-Compressed Tar Archive (.tar.bz2)" ) ); mFormatComboBox->addItem( i18n( "GZ-Compressed Tar Archive (.tar.gz)" ) ); mFormatComboBox->setCurrentIndex( 2 ); - connect( mFormatComboBox, SIGNAL(activated(int)), - this, SLOT(slotFixFileExtension()) ); + connect(mFormatComboBox, static_cast(&KComboBox::activated), this, &ArchiveFolderDialog::slotFixFileExtension); mainLayout->addWidget( mFormatComboBox, row, 1 ); row++; @@ -114,10 +113,8 @@ ArchiveFolderDialog::ArchiveFolderDialog( QWidget *parent ) mUrlRequester->setMode( KFile::LocalOnly | KFile::File ); mUrlRequester->setFilter( QLatin1String("*.tar *.zip *.tar.gz *.tar.bz2") ); fileNameLabel->setBuddy( mUrlRequester ); - connect( mUrlRequester, SIGNAL(urlSelected(QUrl)), - this, SLOT(slotFixFileExtension()) ); - connect( mUrlRequester, SIGNAL(textChanged(QString)), - this, SLOT(slotUrlChanged(QString)) ); + connect(mUrlRequester, &KUrlRequester::urlSelected, this, &ArchiveFolderDialog::slotFixFileExtension); + connect(mUrlRequester, &KUrlRequester::textChanged, this, &ArchiveFolderDialog::slotUrlChanged); mainLayout->addWidget( mUrlRequester, row, 1 ); row++; diff --git a/dialog/kmknotify.cpp b/dialog/kmknotify.cpp index b3ea3499d..7d403d449 100644 --- a/dialog/kmknotify.cpp +++ b/dialog/kmknotify.cpp @@ -78,8 +78,7 @@ KMKnotify::KMKnotify( QWidget * parent ) layout->addWidget(new KSeparator); mainLayout->addWidget(buttonBox); - connect( m_comboNotify, SIGNAL(activated(int)), - SLOT(slotComboChanged(int)) ); + connect(m_comboNotify, static_cast(&KComboBox::activated), this, &KMKnotify::slotComboChanged); connect(okButton, &QPushButton::clicked, this, &KMKnotify::slotOk); connect(m_notifyWidget, &KNotifyConfigWidget::changed, this , &KMKnotify::slotConfigChanged); initCombobox(); diff --git a/editor/attachmentcontroller.cpp b/editor/attachmentcontroller.cpp index fe7772530..c9790be6f 100644 --- a/editor/attachmentcontroller.cpp +++ b/editor/attachmentcontroller.cpp @@ -59,11 +59,10 @@ AttachmentController::AttachmentController( MessageComposer::AttachmentModel *mo connect( view, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(doubleClicked(QModelIndex)) ); - connect( this, SIGNAL(refreshSelection()), SLOT(selectionChanged())); + connect(this, &AttachmentController::refreshSelection, this, &AttachmentController::selectionChanged); - connect( this, SIGNAL(showAttachment(KMime::Content*,QByteArray)), - SLOT(onShowAttachment(KMime::Content*,QByteArray))); - connect( this, SIGNAL(selectedAllAttachment()), SLOT(slotSelectAllAttachment())); + connect(this, &AttachmentController::showAttachment, this, &AttachmentController::onShowAttachment); + connect(this, &AttachmentController::selectedAllAttachment, this, &AttachmentController::slotSelectAllAttachment); connect( model, SIGNAL(attachItemsRequester(Akonadi::Item::List)), this, SLOT(addAttachmentItems(Akonadi::Item::List)) ); } @@ -109,7 +108,7 @@ void AttachmentController::addAttachmentItems( const Akonadi::Item::List &items Akonadi::ItemFetchJob *itemFetchJob = new Akonadi::ItemFetchJob( items, this ); itemFetchJob->fetchScope().fetchFullPayload( true ); itemFetchJob->fetchScope().setAncestorRetrieval( Akonadi::ItemFetchScope::Parent ); - connect( itemFetchJob, SIGNAL(result(KJob*)), mComposer, SLOT(slotFetchJob(KJob*)) ); + connect(itemFetchJob, &Akonadi::ItemFetchJob::result, mComposer, &KMComposeWin::slotFetchJob); } void AttachmentController::selectionChanged()