[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kdepim] /: Port to new connect api
From:       Montel Laurent <montel () kde ! org>
Date:       2014-09-30 21:12:50
Message-ID: E1XZ4j4-0007h6-C7 () scm ! kde ! org
[Download RAW message or body]

Git commit 583e698500a120ad4c3aae0dbc79e2d8c3f0ddaf by Montel Laurent.
Committed on 30/09/2014 at 21:12.
Pushed by mlaurent into branch 'master'.

Port to new connect api

M  +2    -4    incidenceeditor-ng/incidencecategories.cpp
M  +13   -26   incidenceeditor-ng/incidencedatetime.cpp
M  +2    -4    incidenceeditor-ng/incidencedescription.cpp
M  +3    -6    incidenceeditor-ng/incidencedialog.cpp
M  +25   -41   incidenceeditor-ng/incidencerecurrence.cpp
M  +7    -12   incidenceeditor-ng/templatemanagementdialog.cpp
M  +1    -2    kmail/collectionpage/collectionshortcutpage.cpp
M  +3    -6    kmail/collectionpage/collectiontemplatespage.cpp
M  +4    -4    kmail/editor/kmcomposereditor.cpp
M  +4    -7    kmail/identity/newidentitydialog.cpp
M  +1    -1    kmail/job/addemailtoexistingcontactjob.cpp
M  +10   -20   kmail/kmkernel.cpp
M  +1    -2    kmail/kmreadermainwin.cpp
M  +2    -4    kmail/kmsystemtray.cpp
M  +3    -3    knotes/configdialog/knotecollectionconfigwidget.cpp
M  +15   -28   libkpgp/kpgpui.cpp

http://commits.kde.org/kdepim/583e698500a120ad4c3aae0dbc79e2d8c3f0ddaf

diff --git a/incidenceeditor-ng/incidencecategories.cpp \
b/incidenceeditor-ng/incidencecategories.cpp index 0962b20..625d2c8 100644
--- a/incidenceeditor-ng/incidencecategories.cpp
+++ b/incidenceeditor-ng/incidencecategories.cpp
@@ -45,11 +45,9 @@ IncidenceCategories::IncidenceCategories( Ui::EventOrTodoDesktop \
*ui )  setObjectName( "IncidenceCategories" );
 
 #ifdef KDEPIM_MOBILE_UI
-connect( mUi->mSelectCategoriesButton, SIGNAL(clicked()),
-          SLOT(selectCategories()) );
+connect(mUi->mSelectCategoriesButton, &QPushButton::clicked, this, \
&IncidenceCategories::selectCategories);  #else
-  connect( mUi->mTagWidget, SIGNAL(selectionChanged(QStringList)),
-          SLOT(onSelectionChanged(QStringList)) );
+  connect(mUi->mTagWidget, &KPIM::TagWidget::selectionChanged, this, \
&IncidenceCategories::onSelectionChanged);  #endif
 }
 
diff --git a/incidenceeditor-ng/incidencedatetime.cpp \
b/incidenceeditor-ng/incidencedatetime.cpp index c22a9b1..d70c945 100644
--- a/incidenceeditor-ng/incidencedatetime.cpp
+++ b/incidenceeditor-ng/incidencedatetime.cpp
@@ -104,8 +104,7 @@ IncidenceDateTime::IncidenceDateTime( Ui::EventOrTodoDesktop *ui \
)  mUi->mEndTimeEdit->installEventFilter( this );
 #else
   mUi->mTimeZoneLabel->setVisible( !mUi->mWholeDayCheck->isChecked() );
-  connect( mUi->mTimeZoneLabel, SIGNAL(linkActivated(QString)),
-           SLOT(toggleTimeZoneVisibility()) );
+  connect(mUi->mTimeZoneLabel, &QLabel::linkActivated, this, \
&IncidenceDateTime::toggleTimeZoneVisibility);  #endif
 
   QList<QLineEdit*> lineEdits;
@@ -581,25 +580,16 @@ void IncidenceDateTime::load( const KCalCore::Event::Ptr \
&event, bool isTemplate  SLOT(updateStartTime(QTime)) );
   connect( mUi->mStartTimeEdit, SIGNAL(timeEdited(QTime)), // When editing with any \
key except up/down  SLOT(updateStartTime(QTime)) );
-  connect( mUi->mStartDateEdit, SIGNAL(dateChanged(QDate)),
-           SLOT(updateStartDate(QDate)) );
-  connect( mUi->mTimeZoneComboStart, SIGNAL(currentIndexChanged(int)),
-           SLOT(updateStartSpec()) );
+  connect(mUi->mStartDateEdit, &KDateComboBox::dateChanged, this, \
&IncidenceDateTime::updateStartDate); +  connect(mUi->mTimeZoneComboStart, \
static_cast<void (IncidenceEditorNG::KTimeZoneComboBox::*)(int)>(&IncidenceEditorNG::KTimeZoneComboBox::currentIndexChanged), \
this, &IncidenceDateTime::updateStartSpec);  // End time
-  connect( mUi->mEndTimeEdit, SIGNAL(timeChanged(QTime)),
-           SLOT(checkDirtyStatus()) );
-  connect( mUi->mEndTimeEdit, SIGNAL(timeEdited(QTime)),
-           SLOT(checkDirtyStatus()) );
-  connect( mUi->mEndDateEdit, SIGNAL(dateChanged(QDate)),
-           SLOT(checkDirtyStatus()) );
-  connect( mUi->mEndTimeEdit, SIGNAL(timeChanged(QTime)),
-           SIGNAL(endTimeChanged(QTime)) );
-  connect( mUi->mEndTimeEdit, SIGNAL(timeEdited(QTime)),
-           SIGNAL(endTimeChanged(QTime)) );
-  connect( mUi->mEndDateEdit, SIGNAL(dateChanged(QDate)),
-           SIGNAL(endDateChanged(QDate)) );
-  connect( mUi->mTimeZoneComboEnd, SIGNAL(currentIndexChanged(int)),
-           SLOT(checkDirtyStatus()) );
+  connect(mUi->mEndTimeEdit, &KTimeComboBox::timeChanged, this, \
&IncidenceDateTime::checkDirtyStatus); +  connect(mUi->mEndTimeEdit, \
&KTimeComboBox::timeEdited, this, &IncidenceDateTime::checkDirtyStatus); +  \
connect(mUi->mEndDateEdit, &KDateComboBox::dateChanged, this, \
&IncidenceDateTime::checkDirtyStatus); +  connect(mUi->mEndTimeEdit, \
&KTimeComboBox::timeChanged, this, &IncidenceDateTime::endTimeChanged); +  \
connect(mUi->mEndTimeEdit, &KTimeComboBox::timeEdited, this, \
&IncidenceDateTime::endTimeChanged); +  connect(mUi->mEndDateEdit, \
&KDateComboBox::dateChanged, this, &IncidenceDateTime::endDateChanged); +  \
connect(mUi->mTimeZoneComboEnd, static_cast<void \
(IncidenceEditorNG::KTimeZoneComboBox::*)(int)>(&IncidenceEditorNG::KTimeZoneComboBox::currentIndexChanged), \
this, &IncidenceDateTime::checkDirtyStatus);  
   mUi->mWholeDayCheck->setChecked( event->allDay() );
   enableTimeEdits();
@@ -639,12 +629,9 @@ void IncidenceDateTime::load( const KCalCore::Journal::Ptr \
&journal, bool isTemp  mUi->mFreeBusyCheck->setVisible( false );
 
   // Start time
-  connect( mUi->mStartTimeEdit, SIGNAL(timeChanged(QTime)),
-           SLOT(updateStartTime(QTime)) );
-  connect( mUi->mStartDateEdit, SIGNAL(dateChanged(QDate)),
-           SLOT(updateStartDate(QDate)) );
-  connect( mUi->mTimeZoneComboStart, SIGNAL(currentIndexChanged(int)),
-           SLOT(updateStartSpec()) );
+  connect(mUi->mStartTimeEdit, &KTimeComboBox::timeChanged, this, \
&IncidenceDateTime::updateStartTime); +  connect(mUi->mStartDateEdit, \
&KDateComboBox::dateChanged, this, &IncidenceDateTime::updateStartDate); +  \
connect(mUi->mTimeZoneComboStart, static_cast<void \
(IncidenceEditorNG::KTimeZoneComboBox::*)(int)>(&IncidenceEditorNG::KTimeZoneComboBox::currentIndexChanged), \
this, &IncidenceDateTime::updateStartSpec);  
   mUi->mWholeDayCheck->setChecked( journal->allDay() );
   enableTimeEdits();
diff --git a/incidenceeditor-ng/incidencedescription.cpp \
b/incidenceeditor-ng/incidencedescription.cpp index 80c355e..d6868c2 100644
--- a/incidenceeditor-ng/incidencedescription.cpp
+++ b/incidenceeditor-ng/incidencedescription.cpp
@@ -67,11 +67,9 @@ IncidenceDescription::IncidenceDescription( Ui::EventOrTodoDesktop \
*ui )  mUi->mRichTextLabel->hide();
 #else
   setupToolBar();
-  connect( mUi->mRichTextLabel, SIGNAL(linkActivated(QString)),
-           this, SLOT(toggleRichTextDescription()) );
+  connect(mUi->mRichTextLabel, &QLabel::linkActivated, this, \
&IncidenceDescription::toggleRichTextDescription);  #endif
-  connect( mUi->mDescriptionEdit, SIGNAL(textChanged()),
-           this, SLOT(checkDirtyStatus()) );
+  connect(mUi->mDescriptionEdit, &KRichTextWidget::textChanged, this, \
&IncidenceDescription::checkDirtyStatus);  }
 
 IncidenceDescription::~IncidenceDescription()
diff --git a/incidenceeditor-ng/incidencedialog.cpp \
b/incidenceeditor-ng/incidencedialog.cpp index a0a4e6c..6f69f89 100644
--- a/incidenceeditor-ng/incidencedialog.cpp
+++ b/incidenceeditor-ng/incidencedialog.cpp
@@ -138,8 +138,7 @@ IncidenceDialogPrivate::IncidenceDialogPrivate( \
Akonadi::IncidenceChanger *chang  layout->addWidget( mCalSelector );
   mCalSelector->setAccessRightsFilter( Akonadi::Collection::CanCreateItem );
 
-  q->connect( mCalSelector, SIGNAL(currentChanged(Akonadi::Collection)),
-              SLOT(handleSelectedCollectionChange(Akonadi::Collection)) );
+  q->connect(mCalSelector, &Akonadi::CollectionComboBox::currentChanged, q, \
&IncidenceDialog::handleSelectedCollectionChange);  
   // Now instantiate the logic of the dialog. These editors update the ui, validate
   // fields and load/store incidences in the ui.
@@ -177,11 +176,9 @@ IncidenceDialogPrivate::IncidenceDialogPrivate( \
Akonadi::IncidenceChanger *chang  \
SLOT(showMessage(QString,KMessageWidget::MessageType)) );  q->connect( mEditor, \
SIGNAL(dirtyStatusChanged(bool)),  SLOT(updateButtonStatus(bool)) );
-  q->connect( mItemManager,
-              SIGNAL(itemSaveFinished(IncidenceEditorNG::EditorItemManager::SaveAction)),
 +  q->connect( mItemManager, \
                SIGNAL(itemSaveFinished(IncidenceEditorNG::EditorItemManager::SaveAction)),
                
               SLOT(handleItemSaveFinish(IncidenceEditorNG::EditorItemManager::SaveAction)));
                
-  q->connect( mItemManager,
-              SIGNAL(itemSaveFailed(IncidenceEditorNG::EditorItemManager::SaveAction,QString)),
 +  q->connect( mItemManager, \
                SIGNAL(itemSaveFailed(IncidenceEditorNG::EditorItemManager::SaveAction,QString)),
                
               SLOT(handleItemSaveFail(IncidenceEditorNG::EditorItemManager::SaveAction,QString)));
  q->connect( ieAlarm, SIGNAL(alarmCountChanged(int)),
               SLOT(handleAlarmCountChange(int)) );
diff --git a/incidenceeditor-ng/incidencerecurrence.cpp \
b/incidenceeditor-ng/incidencerecurrence.cpp index cc662e3..c0894a8 100644
--- a/incidenceeditor-ng/incidencerecurrence.cpp
+++ b/incidenceeditor-ng/incidencerecurrence.cpp
@@ -29,7 +29,6 @@
 #include <KCalendarSystem>
 
 #include <QDebug>
-
 #include <KLocalizedString>
 #include <QLocale>
 
@@ -101,48 +100,33 @@ IncidenceRecurrence::IncidenceRecurrence( IncidenceDateTime \
*dateTime, Ui::Event  }
 #endif
 
-  connect( mDateTime, SIGNAL(startDateTimeToggled(bool)),
-           SLOT(handleDateTimeToggle()) );
-
-  connect( mDateTime, SIGNAL(startDateChanged(QDate)),
-           SLOT(handleStartDateChange(QDate)) );
-
-  connect( mUi->mExceptionAddButton, SIGNAL(clicked()),
-           SLOT(addException()));
-  connect( mUi->mExceptionRemoveButton, SIGNAL(clicked()),
-           SLOT(removeExceptions()) );
-  connect( mUi->mExceptionDateEdit, SIGNAL(dateChanged(QDate)),
-           SLOT(handleExceptionDateChange(QDate)) );
-  connect( mUi->mExceptionList, SIGNAL(itemSelectionChanged()),
-           SLOT(updateRemoveExceptionButton()) );
-  connect( mUi->mRecurrenceTypeCombo, SIGNAL(currentIndexChanged(int)),
-           SLOT(handleRecurrenceTypeChange(int)));
-  connect( mUi->mEndDurationEdit, SIGNAL(valueChanged(int)),
-           SLOT(handleEndAfterOccurrencesChange(int)) );
-  connect( mUi->mFrequencyEdit, SIGNAL(valueChanged(int)),
-           SLOT(handleFrequencyChange()) );
+  connect(mDateTime, &IncidenceDateTime::startDateTimeToggled, this, \
&IncidenceRecurrence::handleDateTimeToggle); +
+  connect(mDateTime, &IncidenceDateTime::startDateChanged, this, \
&IncidenceRecurrence::handleStartDateChange); +
+  connect(mUi->mExceptionAddButton, &QPushButton::clicked, this, \
&IncidenceRecurrence::addException); +  connect(mUi->mExceptionRemoveButton, \
&QPushButton::clicked, this, &IncidenceRecurrence::removeExceptions); +#ifndef \
KDEPIM_MOBILE_UI +  connect(mUi->mExceptionDateEdit, &KDateComboBox::dateChanged, \
this, &IncidenceRecurrence::handleExceptionDateChange); +#endif
+  connect(mUi->mExceptionList, &QListWidget::itemSelectionChanged, this, \
&IncidenceRecurrence::updateRemoveExceptionButton); +  \
connect(mUi->mRecurrenceTypeCombo, static_cast<void \
(KComboBox::*)(int)>(&KComboBox::currentIndexChanged), this, \
&IncidenceRecurrence::handleRecurrenceTypeChange); +  connect(mUi->mEndDurationEdit, \
static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, \
&IncidenceRecurrence::handleEndAfterOccurrencesChange); +  \
connect(mUi->mFrequencyEdit, static_cast<void \
(QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, \
&IncidenceRecurrence::handleFrequencyChange);  
   // Check the dirty status when the user changes values.
-  connect( mUi->mRecurrenceTypeCombo, SIGNAL(currentIndexChanged(int)),
-           SLOT(checkDirtyStatus()) );
-  connect( mUi->mFrequencyEdit, SIGNAL(valueChanged(int)),
-           SLOT(checkDirtyStatus()) );
-  connect( mUi->mFrequencyEdit, SIGNAL(valueChanged(int)),
-           SLOT(checkDirtyStatus()) );
-  connect( mUi->mWeekDayCombo, SIGNAL(checkedItemsChanged(QStringList)),
-           SLOT(checkDirtyStatus()) );
-  connect( mUi->mMonthlyCombo, SIGNAL(currentIndexChanged(int)),
-           SLOT(checkDirtyStatus()) );
-  connect( mUi->mYearlyCombo, SIGNAL(currentIndexChanged(int)),
-           SLOT(checkDirtyStatus()) );
-  connect( mUi->mRecurrenceEndCombo, SIGNAL(currentIndexChanged(int)),
-           SLOT(checkDirtyStatus()) );
-  connect( mUi->mEndDurationEdit, SIGNAL(valueChanged(int)),
-           SLOT(checkDirtyStatus()) );
-  connect( mUi->mRecurrenceEndDate, SIGNAL(dateChanged(QDate)),
-           SLOT(checkDirtyStatus()) );
-  connect( mUi->mThisAndFutureCheck, SIGNAL(stateChanged(int)),
-           SLOT(checkDirtyStatus()) );
+  connect(mUi->mRecurrenceTypeCombo, static_cast<void \
(KComboBox::*)(int)>(&KComboBox::currentIndexChanged), this, \
&IncidenceRecurrence::checkDirtyStatus); +  connect(mUi->mFrequencyEdit, \
static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, \
&IncidenceRecurrence::checkDirtyStatus); +  connect(mUi->mFrequencyEdit, \
static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, \
&IncidenceRecurrence::checkDirtyStatus); +  connect(mUi->mWeekDayCombo, \
&KPIM::KWeekdayCheckCombo::checkedItemsChanged, this, \
&IncidenceRecurrence::checkDirtyStatus); +  connect(mUi->mMonthlyCombo, \
static_cast<void (KComboBox::*)(int)>(&KComboBox::currentIndexChanged), this, \
&IncidenceRecurrence::checkDirtyStatus); +  connect(mUi->mYearlyCombo, \
static_cast<void (KComboBox::*)(int)>(&KComboBox::currentIndexChanged), this, \
&IncidenceRecurrence::checkDirtyStatus); +  connect(mUi->mRecurrenceEndCombo, \
static_cast<void (KComboBox::*)(int)>(&KComboBox::currentIndexChanged), this, \
&IncidenceRecurrence::checkDirtyStatus); +  connect(mUi->mEndDurationEdit, \
static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, \
&IncidenceRecurrence::checkDirtyStatus); +#ifndef KDEPIM_MOBILE_UI
+  connect(mUi->mRecurrenceEndDate, &KDateComboBox::dateChanged, this, \
&IncidenceRecurrence::checkDirtyStatus); +#endif
+  connect(mUi->mThisAndFutureCheck, &QCheckBox::stateChanged, this, \
&IncidenceRecurrence::checkDirtyStatus);  }
 
 // this method must be at the top of this file in order to ensure
diff --git a/incidenceeditor-ng/templatemanagementdialog.cpp \
b/incidenceeditor-ng/templatemanagementdialog.cpp index bacd1a4..ac4359b 100644
--- a/incidenceeditor-ng/templatemanagementdialog.cpp
+++ b/incidenceeditor-ng/templatemanagementdialog.cpp
@@ -66,7 +66,7 @@ TemplateManagementDialog::TemplateManagementDialog(
   okButton->setShortcut(Qt::CTRL | Qt::Key_Return);
   connect(buttonBox, &QDialogButtonBox::rejected, this, \
&TemplateManagementDialog::reject);  setObjectName( "template_management_dialog" );
-  connect(buttonBox->button(QDialogButtonBox::Help), SIGNAL(clicked()), this, \
SLOT(slotHelp())); +  connect(buttonBox->button(QDialogButtonBox::Help), \
&QPushButton::clicked, this, &TemplateManagementDialog::slotHelp);  QWidget *widget = \
new QWidget( this );  mainLayout->addWidget(widget);
   mainLayout->addWidget(buttonBox);
@@ -77,17 +77,12 @@ TemplateManagementDialog::TemplateManagementDialog(
   m_base.m_listBox->addItems( m_templates );
   m_base.m_listBox->setSelectionMode( QAbstractItemView::SingleSelection );
 
-  connect( m_base.m_buttonAdd, SIGNAL(clicked()),
-           SLOT(slotAddTemplate()) );
-  connect( m_base.m_buttonRemove, SIGNAL(clicked()),
-           SLOT(slotRemoveTemplate()) );
-  connect( m_base.m_buttonApply, SIGNAL(clicked()),
-           SLOT(slotApplyTemplate()) );
-
-  connect( m_base.m_listBox, SIGNAL(itemSelectionChanged()),
-           SLOT(slotItemSelected()) );
-  connect( m_base.m_listBox, SIGNAL(itemDoubleClicked(QListWidgetItem*)),
-           SLOT(slotApplyTemplate()) );
+  connect(m_base.m_buttonAdd, &QPushButton::clicked, this, \
&TemplateManagementDialog::slotAddTemplate); +  connect(m_base.m_buttonRemove, \
&QPushButton::clicked, this, &TemplateManagementDialog::slotRemoveTemplate); +  \
connect(m_base.m_buttonApply, &QPushButton::clicked, this, \
&TemplateManagementDialog::slotApplyTemplate); +
+  connect(m_base.m_listBox, &QListWidget::itemSelectionChanged, this, \
&TemplateManagementDialog::slotItemSelected); +  connect(m_base.m_listBox, \
&QListWidget::itemDoubleClicked, this, &TemplateManagementDialog::slotApplyTemplate); \
connect(okButton, &QPushButton::clicked, this, &TemplateManagementDialog::slotOk);  
   m_base.m_buttonRemove->setEnabled( false );
diff --git a/kmail/collectionpage/collectionshortcutpage.cpp \
b/kmail/collectionpage/collectionshortcutpage.cpp index 063f520..3c20c9b 100644
--- a/kmail/collectionpage/collectionshortcutpage.cpp
+++ b/kmail/collectionpage/collectionshortcutpage.cpp
@@ -69,8 +69,7 @@ void CollectionShortcutPage::init(const Akonadi::Collection & col)
     mKeySeqWidget = new KKeySequenceWidget( hb );
     hbHBoxLayout->addWidget(mKeySeqWidget);
     mKeySeqWidget->setObjectName( QLatin1String("FolderShortcutSelector") );
-    connect( mKeySeqWidget, SIGNAL(keySequenceChanged(QKeySequence)),
-             SLOT(slotShortcutChanged()) );
+    connect(mKeySeqWidget, &KKeySequenceWidget::keySequenceChanged, this, \
&CollectionShortcutPage::slotShortcutChanged);  new QWidget(hb);
 
     topLayout->addItem( new QSpacerItem( 0, 10 ));
diff --git a/kmail/collectionpage/collectiontemplatespage.cpp \
b/kmail/collectionpage/collectiontemplatespage.cpp index 495190f..4addcec 100644
--- a/kmail/collectionpage/collectiontemplatespage.cpp
+++ b/kmail/collectionpage/collectiontemplatespage.cpp
@@ -83,13 +83,10 @@ void CollectionTemplatesPage::init()
     btns->addWidget( copyGlobal );
     topLayout->addLayout( btns );
 
-    connect( mCustom, SIGNAL(toggled(bool)),
-             mWidget, SLOT(setEnabled(bool)) );
-    connect( mCustom, SIGNAL(toggled(bool)),
-             copyGlobal, SLOT(setEnabled(bool)) );
+    connect(mCustom, &QCheckBox::toggled, mWidget, \
&TemplateParser::TemplatesConfiguration::setEnabled); +    connect(mCustom, \
&QCheckBox::toggled, copyGlobal, &QPushButton::setEnabled);  
-    connect( copyGlobal, SIGNAL(clicked()),
-             this, SLOT(slotCopyGlobal()) );
+    connect(copyGlobal, &QPushButton::clicked, this, \
&CollectionTemplatesPage::slotCopyGlobal);  }
 
 
diff --git a/kmail/editor/kmcomposereditor.cpp b/kmail/editor/kmcomposereditor.cpp
index 5417740..35dcbef 100644
--- a/kmail/editor/kmcomposereditor.cpp
+++ b/kmail/editor/kmcomposereditor.cpp
@@ -70,23 +70,23 @@ QList<QAction *> KMComposerEditor::createActions()
     QAction *pasteQuotation = new QAction( i18n("Pa&ste as Quotation"), this );
     pasteQuotation->setObjectName(QLatin1String("paste_quoted"));
     pasteQuotation->setShortcut(QKeySequence(Qt::CTRL+Qt::SHIFT+Qt::Key_O));
-    connect( pasteQuotation, SIGNAL(triggered(bool)), this, \
SLOT(slotPasteAsQuotation()) ); +    connect(pasteQuotation, &QAction::triggered, \
this, &KMComposerEditor::slotPasteAsQuotation);  lstAction.append(pasteQuotation);
 
     QAction *addQuoteChars = new QAction( i18n("Add &Quote Characters"), this );
     addQuoteChars->setObjectName(QLatin1String("tools_quote"));
-    connect( addQuoteChars, SIGNAL(triggered(bool)), this, SLOT(slotAddQuotes()) );
+    connect(addQuoteChars, &QAction::triggered, this, \
&KMComposerEditor::slotAddQuotes);  lstAction.append(addQuoteChars);
 
     QAction *remQuoteChars = new QAction( i18n("Re&move Quote Characters"), this );
     remQuoteChars->setObjectName(QLatin1String("tools_unquote"));
-    connect (remQuoteChars, SIGNAL(triggered(bool)), this, SLOT(slotRemoveQuotes()) \
); +    connect(remQuoteChars, &QAction::triggered, this, \
&KMComposerEditor::slotRemoveQuotes);  lstAction.append(remQuoteChars);
 
     QAction *pasteWithoutFormatting = new QAction( i18n("Paste Without Formatting"), \
                this );
     pasteWithoutFormatting->setObjectName(QLatin1String("paste_without_formatting"));
                
     pasteWithoutFormatting->setShortcut(QKeySequence(Qt::CTRL+Qt::SHIFT+Qt::Key_V));
-    connect (pasteWithoutFormatting, SIGNAL(triggered(bool)), this, \
SLOT(slotPasteWithoutFormatting()) ); +    connect(pasteWithoutFormatting, \
&QAction::triggered, this, &KMComposerEditor::slotPasteWithoutFormatting);  \
lstAction.append(pasteWithoutFormatting);  return lstAction;
 }
diff --git a/kmail/identity/newidentitydialog.cpp \
b/kmail/identity/newidentitydialog.cpp index 1c2f307..91ffd40 100644
--- a/kmail/identity/newidentitydialog.cpp
+++ b/kmail/identity/newidentitydialog.cpp
@@ -59,7 +59,7 @@ NewIdentityDialog::NewIdentityDialog( \
KIdentityManagement::IdentityManager* mana  mOkButton->setShortcut(Qt::CTRL | \
                Qt::Key_Return);
     connect(buttonBox, &QDialogButtonBox::accepted, this, \
                &NewIdentityDialog::accept);
     connect(buttonBox, &QDialogButtonBox::rejected, this, \
                &NewIdentityDialog::reject);
-    connect(buttonBox->button(QDialogButtonBox::Help), SIGNAL(clicked()), this, \
SLOT(slotHelp())); +    connect(buttonBox->button(QDialogButtonBox::Help), \
&QPushButton::clicked, this, &NewIdentityDialog::slotHelp);  
     QWidget *page = new QWidget( this );
     mainLayout->addWidget( page );
@@ -78,8 +78,7 @@ NewIdentityDialog::NewIdentityDialog( \
KIdentityManagement::IdentityManager* mana  l->setBuddy( mLineEdit );
     hlay->addWidget( l );
     hlay->addWidget( mLineEdit, 1 );
-    connect( mLineEdit, SIGNAL(textChanged(QString)),
-             this, SLOT(slotEnableOK(QString)) );
+    connect(mLineEdit, &KLineEdit::textChanged, this, \
&NewIdentityDialog::slotEnableOK);  
     mButtonGroup = new QButtonGroup( page );
 
@@ -117,10 +116,8 @@ NewIdentityDialog::NewIdentityDialog( \
KIdentityManagement::IdentityManager* mana  
     // enable/disable combobox and label depending on the third radio
     // button's state:
-    connect( radio, SIGNAL(toggled(bool)),
-             label, SLOT(setEnabled(bool)) );
-    connect( radio, SIGNAL(toggled(bool)),
-             mComboBox, SLOT(setEnabled(bool)) );
+    connect(radio, &QRadioButton::toggled, label, &QLabel::setEnabled);
+    connect(radio, &QRadioButton::toggled, mComboBox, &KComboBox::setEnabled);
 
     mOkButton->setEnabled( false ); // since line edit is empty
     
diff --git a/kmail/job/addemailtoexistingcontactjob.cpp \
b/kmail/job/addemailtoexistingcontactjob.cpp index 732b8ff..21c0546 100644
--- a/kmail/job/addemailtoexistingcontactjob.cpp
+++ b/kmail/job/addemailtoexistingcontactjob.cpp
@@ -51,7 +51,7 @@ void AddEmailToExistingContactJob::start()
             address.setEmails(emails);
             mItem.setPayload<KABC::Addressee>(address);
             Akonadi::ItemModifyJob *job = new Akonadi::ItemModifyJob( mItem );
-            connect( job, SIGNAL(result(KJob*)), SLOT(slotAddEmailDone(KJob*)) );
+            connect(job, &Akonadi::ItemModifyJob::result, this, \
&AddEmailToExistingContactJob::slotAddEmailDone);  }
     } else {
         qDebug()<<" not a KABC::Addressee item ";
diff --git a/kmail/kmkernel.cpp b/kmail/kmkernel.cpp
index a979d33..0c2e5b5 100644
--- a/kmail/kmkernel.cpp
+++ b/kmail/kmkernel.cpp
@@ -210,25 +210,17 @@ KMKernel::KMKernel (QObject *parent) :
     connect( folderCollectionMonitor(), \
                SIGNAL(collectionChanged(Akonadi::Collection,QSet<QByteArray>)),
              SLOT(slotCollectionChanged(Akonadi::Collection,QSet<QByteArray>)) );
 
-    connect( MailTransport::TransportManager::self(),
-             SIGNAL(transportRemoved(int,QString)),
-             SLOT(transportRemoved(int,QString)) );
-    connect( MailTransport::TransportManager::self(),
-             SIGNAL(transportRenamed(int,QString,QString)),
-             SLOT(transportRenamed(int,QString,QString)) );
+    connect(MailTransport::TransportManager::self(), \
&MailTransport::TransportManager::transportRemoved, this, \
&KMKernel::transportRemoved); +    connect(MailTransport::TransportManager::self(), \
&MailTransport::TransportManager::transportRenamed, this, \
&KMKernel::transportRenamed);  
     QDBusConnection::sessionBus().connect(QString(), QLatin1String( \
"/MailDispatcherAgent" ), \
QLatin1String("org.freedesktop.Akonadi.MailDispatcherAgent"), \
                QLatin1String("itemDispatchStarted"),this, \
                SLOT(itemDispatchStarted()) );
-    connect( Akonadi::AgentManager::self(), \
                SIGNAL(instanceStatusChanged(Akonadi::AgentInstance)),
-             this, SLOT(instanceStatusChanged(Akonadi::AgentInstance)) );
+    connect(Akonadi::AgentManager::self(), \
&Akonadi::AgentManager::instanceStatusChanged, this, \
&KMKernel::instanceStatusChanged);  
-    connect( Akonadi::AgentManager::self(), \
                SIGNAL(instanceError(Akonadi::AgentInstance,QString)),
-             this, SLOT(slotInstanceError(Akonadi::AgentInstance,QString)) );
+    connect(Akonadi::AgentManager::self(), &Akonadi::AgentManager::instanceError, \
this, &KMKernel::slotInstanceError);  
-    connect( Akonadi::AgentManager::self(), \
                SIGNAL(instanceWarning(Akonadi::AgentInstance,QString)),
-             SLOT(slotInstanceWarning(Akonadi::AgentInstance,QString)) );
+    connect(Akonadi::AgentManager::self(), &Akonadi::AgentManager::instanceWarning, \
this, &KMKernel::slotInstanceWarning);  
-    connect( Akonadi::AgentManager::self(), \
                SIGNAL(instanceRemoved(Akonadi::AgentInstance)),
-             this, SLOT(slotInstanceRemoved(Akonadi::AgentInstance)) );
+    connect(Akonadi::AgentManager::self(), &Akonadi::AgentManager::instanceRemoved, \
this, &KMKernel::slotInstanceRemoved);  
     connect ( Solid::Networking::notifier(), \
                SIGNAL(statusChanged(Solid::Networking::Status)),
               this, SLOT(slotSystemNetworkStatusChanged(Solid::Networking::Status)) \
); @@ -1069,8 +1061,7 @@ void KMKernel::checkMailOnStartup()
         return;
 
     if (Akonadi::ServerManager::state() != Akonadi::ServerManager::Running) {
-        connect(Akonadi::ServerManager::self(), \
                SIGNAL(stateChanged(Akonadi::ServerManager::State)),
-                                       \
SLOT(slotCheckAccount(Akonadi::ServerManager::State))); +        \
connect(Akonadi::ServerManager::self(), &Akonadi::ServerManager::stateChanged, this, \
&KMKernel::slotCheckAccount);  } else {
         verifyAccount();
     }
@@ -1259,7 +1250,7 @@ void KMKernel::init()
 
     mBackgroundTasksTimer = new QTimer( this );
     mBackgroundTasksTimer->setSingleShot( true );
-    connect( mBackgroundTasksTimer, SIGNAL(timeout()), this, \
SLOT(slotRunBackgroundTasks()) ); +    connect(mBackgroundTasksTimer, \
&QTimer::timeout, this, &KMKernel::slotRunBackgroundTasks);  #ifdef DEBUG_SCHEDULER \
// for debugging, see jobscheduler.h  mBackgroundTasksTimer->start( 10000 ); // 10s, \
singleshot  #else
@@ -1273,7 +1264,7 @@ void KMKernel::init()
         CommonKernel->initFolders();
     }
 
-    connect( Akonadi::ServerManager::self(), \
SIGNAL(stateChanged(Akonadi::ServerManager::State)), this, \
SLOT(akonadiStateChanged(Akonadi::ServerManager::State)) ); +    \
connect(Akonadi::ServerManager::self(), &Akonadi::ServerManager::stateChanged, this, \
                &KMKernel::akonadiStateChanged);
     connect( folderCollectionMonitor(), SIGNAL(itemRemoved(Akonadi::Item)), \
the_undoStack, SLOT(msgDestroyed(Akonadi::Item)) );  
 
@@ -1464,8 +1455,7 @@ void KMKernel::slotShowConfigurationDialog()
     if( !mConfigureDialog ) {
         mConfigureDialog = new ConfigureDialog( 0, false );
         mConfigureDialog->setObjectName( QLatin1String("configure") );
-        connect( mConfigureDialog, SIGNAL(configChanged()),
-                 this, SLOT(slotConfigChanged()) );
+        connect(mConfigureDialog, &ConfigureDialog::configChanged, this, \
&KMKernel::slotConfigChanged);  }
 
     // Save all current settings.
diff --git a/kmail/kmreadermainwin.cpp b/kmail/kmreadermainwin.cpp
index 82b92da..edc8d29 100644
--- a/kmail/kmreadermainwin.cpp
+++ b/kmail/kmreadermainwin.cpp
@@ -335,8 +335,7 @@ void KMReaderMainWin::setupAccel()
     mFontAction = new KFontAction( i18n("Select Font"), this );
     actionCollection()->addAction( QLatin1String("text_font"), mFontAction );
     mFontAction->setFont( mReaderWin->cssHelper()->bodyFont().family() );
-    connect( mFontAction, SIGNAL(triggered(QString)),
-             SLOT(slotFontAction(QString)) );
+    connect(mFontAction, static_cast<void (KFontAction::*)(const QString \
&)>(&KFontAction::triggered), this, &KMReaderMainWin::slotFontAction);  \
                mFontSizeAction = new KFontSizeAction( i18n( "Select Size" ), this );
     mFontSizeAction->setFontSize( mReaderWin->cssHelper()->bodyFont().pointSize() );
     actionCollection()->addAction( QLatin1String("text_size"), mFontSizeAction );
diff --git a/kmail/kmsystemtray.cpp b/kmail/kmsystemtray.cpp
index ae94dad..261a951 100644
--- a/kmail/kmsystemtray.cpp
+++ b/kmail/kmsystemtray.cpp
@@ -87,8 +87,7 @@ KMSystemTray::KMSystemTray(QObject *parent)
     connect(KGlobalSettings::self(), &KGlobalSettings::kdisplayPaletteChanged, this, \
                &KMSystemTray::slotGeneralPaletteChanged);
     connect(KGlobalSettings::self(), &KGlobalSettings::kdisplayFontChanged, this, \
&KMSystemTray::slotGeneralFontChanged);  
-    connect( this, SIGNAL(activateRequested(bool,QPoint)),
-             this, SLOT(slotActivated()) );
+    connect(this, &KMSystemTray::activateRequested, this, \
&KMSystemTray::slotActivated);  connect( contextMenu(), SIGNAL(aboutToShow()),
              this, SLOT(slotContextMenuAboutToShow()) );
 
@@ -310,8 +309,7 @@ void KMSystemTray::slotContextMenuAboutToShow()
     mNewMessagesPopup = new QMenu();
     fillFoldersMenu( mNewMessagesPopup, kmkernel->treeviewModelSelection() );
 
-    connect( mNewMessagesPopup, SIGNAL(triggered(QAction*)), this,
-             SLOT(slotSelectCollection(QAction*)) );
+    connect(mNewMessagesPopup, &QMenu::triggered, this, \
&KMSystemTray::slotSelectCollection);  
 
     if ( mCount > 0 ) {
diff --git a/knotes/configdialog/knotecollectionconfigwidget.cpp \
b/knotes/configdialog/knotecollectionconfigwidget.cpp index bf6fcdf..f4224eb 100644
--- a/knotes/configdialog/knotecollectionconfigwidget.cpp
+++ b/knotes/configdialog/knotecollectionconfigwidget.cpp
@@ -81,7 +81,7 @@ KNoteCollectionConfigWidget::KNoteCollectionConfigWidget(QWidget \
*parent)  mCheckProxy->setSelectionModel(mSelectionModel);
     mCheckProxy->setSourceModel(mimeTypeProxy);
 
-    connect(mModel, SIGNAL(rowsInserted(QModelIndex,int,int)), this, \
SLOT(slotCollectionsInserted(QModelIndex,int,int))); +    connect(mModel, \
&Akonadi::EntityTreeModel::rowsInserted, this, \
&KNoteCollectionConfigWidget::slotCollectionsInserted);  
     connect(mCheckProxy, &KCheckableProxyModel::dataChanged, this, \
&KNoteCollectionConfigWidget::slotDataChanged);  mCollectionFilter = new \
KRecursiveFilterProxyModel(this); @@ -92,7 +92,7 @@ \
KNoteCollectionConfigWidget::KNoteCollectionConfigWidget(QWidget *parent)  QLineEdit \
*searchLine = new QLineEdit(this);  \
searchLine->setPlaceholderText(i18n("Search..."));  \
                searchLine->setClearButtonEnabled(true);
-    connect(searchLine, SIGNAL(textChanged(QString)), this, \
SLOT(slotSetCollectionFilter(QString))); +    connect(searchLine, \
&QLineEdit::textChanged, this, \
&KNoteCollectionConfigWidget::slotSetCollectionFilter);  
     vbox->addWidget(searchLine);
 
@@ -124,7 +124,7 @@ KNoteCollectionConfigWidget::KNoteCollectionConfigWidget(QWidget \
                *parent)
     vbox->addWidget(new QLabel(i18nc("@info", "Select the folder where the note will \
                be saved:")));
     mDefaultSaveFolder = new \
Akonadi::CollectionRequester(Akonadi::Collection(NoteShared::NoteSharedGlobalConfig::self()->defaultFolder()));
                
     mDefaultSaveFolder->setMimeTypeFilter(QStringList() << \
                Akonotes::Note::mimeType());
-    connect(mDefaultSaveFolder, SIGNAL(collectionChanged(Akonadi::Collection)), \
this, SLOT(slotDataChanged())); +    connect(mDefaultSaveFolder, \
&Akonadi::CollectionRequester::collectionChanged, this, \
&KNoteCollectionConfigWidget::slotDataChanged);  
     vbox->addWidget(mDefaultSaveFolder);
 
diff --git a/libkpgp/kpgpui.cpp b/libkpgp/kpgpui.cpp
index 31ee904..749b992 100644
--- a/libkpgp/kpgpui.cpp
+++ b/libkpgp/kpgpui.cpp
@@ -156,8 +156,7 @@ Config::Config( QWidget *parent, bool encrypt )
                                << i18n("Do not use any encryption tool") );
   label->setBuddy( toolCombo );
   hboxHBoxLayout->setStretchFactor( toolCombo, 1 );
-  connect( toolCombo, SIGNAL(activated(int)),
-           this, SIGNAL(changed()) );
+  connect(toolCombo, static_cast<void (QComboBox::*)(int)>(&QComboBox::activated), \
this, &Config::changed);  // This is the place to add a KUrlRequester to be used for \
asking  // the user for the path to the executable...
   topLayout->addWidget( group );
@@ -168,8 +167,7 @@ Config::Config( QWidget *parent, bool encrypt )
   storePass = new QCheckBox( i18n("&Keep passphrase in memory"),
                              mpOptionsGroupBox );
   lay->addWidget( storePass );
-  connect( storePass, SIGNAL(toggled(bool)),
-           this, SIGNAL(changed()) );
+  connect(storePass, &QCheckBox::toggled, this, &Config::changed);
   msg = i18n( "<qt><p>When this option is enabled, the passphrase of your "
               "private key will be remembered by the application as long "
               "as the application is running. Thus you will only have to "
@@ -185,8 +183,7 @@ Config::Config( QWidget *parent, bool encrypt )
   if( encrypt ) {
     encToSelf = new QCheckBox( i18n("Always encr&ypt to self"),
                                mpOptionsGroupBox );
-   connect( encToSelf, SIGNAL(toggled(bool)),
-           this, SIGNAL(changed()) );
+   connect(encToSelf, &QCheckBox::toggled, this, &Config::changed);
 
     msg = i18n( "<qt><p>When this option is enabled, the message/file "
                 "will not only be encrypted with the receiver's public key, "
@@ -200,8 +197,7 @@ Config::Config( QWidget *parent, bool encrypt )
   showCipherText = new QCheckBox( i18n("&Show signed/encrypted text after "
                                        "composing"));
   lay->addWidget( showCipherText );
-  connect( showCipherText, SIGNAL(toggled(bool)),
-           this, SIGNAL(changed()) );
+  connect(showCipherText, &QCheckBox::toggled, this, &Config::changed);
 
   msg = i18n( "<qt><p>When this option is enabled, the signed/encrypted text "
               "will be shown in a separate window, enabling you to know how "
@@ -212,8 +208,7 @@ Config::Config( QWidget *parent, bool encrypt )
     showKeyApprovalDlg = new QCheckBox( i18n("Always show the encryption "
                                              "keys &for approval"));
     lay->addWidget( showKeyApprovalDlg );
-    connect( showKeyApprovalDlg, SIGNAL(toggled(bool)),
-           this, SIGNAL(changed()) );
+    connect(showKeyApprovalDlg, &QCheckBox::toggled, this, &Config::changed);
     msg = i18n( "<qt><p>When this option is enabled, the application will "
                 "always show you a list of public keys from which you can "
                 "choose the one it will use for encryption. If it is off, "
@@ -410,22 +405,18 @@ KeySelectionDialog::KeySelectionDialog( const KeyList& keyList,
   if( extendedSelection ) {
     connect( mCheckSelectionTimer, SIGNAL(timeout()),
              this,                 SLOT(slotCheckSelection()) );
-    connect( mListView, SIGNAL(itemSelectionChanged()),
-             this,      SLOT(slotSelectionChanged()) );
+    connect(mListView, &QTreeWidget::itemSelectionChanged, this, \
&KeySelectionDialog::slotSelectionChanged);  }
   else {
-    connect( mListView, SIGNAL(itemSelectionChanged()),
-             this,      SLOT(slotSelectionChanged()) );
+    connect(mListView, &QTreeWidget::itemSelectionChanged, this, \
&KeySelectionDialog::slotSelectionChanged);  }
   connect(mListView, &QTreeWidget::itemDoubleClicked, this, \
&KeySelectionDialog::accept);  
   mListView->setContextMenuPolicy( Qt::CustomContextMenu );
-  connect( mListView, SIGNAL(customContextMenuRequested(QPoint)),
-           this,      SLOT(slotRMB(QPoint)) );
+  connect(mListView, &QTreeWidget::customContextMenuRequested, this, \
&KeySelectionDialog::slotRMB);  
   KGuiItem::assign(buttonBox->button(QDialogButtonBox::RestoreDefaults), \
                KGuiItem(i18n("&Reread Keys")));
-  connect(buttonBox->button(QDialogButtonBox::RestoreDefaults), SIGNAL(clicked()),
-           this, SLOT(slotRereadKeys()) );
+  connect(buttonBox->button(QDialogButtonBox::RestoreDefaults), \
&QPushButton::clicked, this, &KeySelectionDialog::slotRereadKeys);  \
connect(mOkButton, &QPushButton::clicked, this, &KeySelectionDialog::slotOk);  \
connect(buttonBox->button(QDialogButtonBox::Cancel), &QPushButton::clicked, this, \
&KeySelectionDialog::slotCancel);  mainLayout->addWidget(buttonBox);
@@ -864,14 +855,12 @@ void KeySelectionDialog::slotRereadKeys()
   // save the current position of the contents
   int offsetY = mListView->verticalScrollBar()->value();
 
-  disconnect( mListView, SIGNAL(itemSelectionChanged()),
-              this,      SLOT(slotSelectionChanged()) );
+  disconnect(mListView, &QTreeWidget::itemSelectionChanged, this, \
&KeySelectionDialog::slotSelectionChanged);  
   initKeylist( keys, KeyIDList( mKeyIds ) );
   slotFilter();
 
-  connect( mListView, SIGNAL(itemSelectionChanged()),
-           this,      SLOT(slotSelectionChanged()) );
+  connect(mListView, &QTreeWidget::itemSelectionChanged, this, \
&KeySelectionDialog::slotSelectionChanged);  slotSelectionChanged();
 
   // restore the saved position of the contents
@@ -915,8 +904,7 @@ void KeySelectionDialog::slotCheckSelection( QTreeWidgetItem* \
plvi /* = 0 */ )  
     // As we might change the selection, we have to disconnect the slot
     // to prevent recursion
-    disconnect( mListView, SIGNAL(itemSelectionChanged()),
-                this,      SLOT(slotSelectionChanged()) );
+    disconnect(mListView, &QTreeWidget::itemSelectionChanged, this, \
&KeySelectionDialog::slotSelectionChanged);  
     KeyIDList newKeyIdList;
     QList<QTreeWidgetItem*> keysToBeChecked;
@@ -1016,6 +1004,7 @@ void KeySelectionDialog::slotCheckSelection( QTreeWidgetItem* \
plvi /* = 0 */ )  
     connect( mListView, SIGNAL(selectionChanged()),
              this,      SLOT(slotSelectionChanged()) );
+
   }
 }
 
@@ -1546,12 +1535,10 @@ KeyApprovalDialog::KeyApprovalDialog( const QStringList& \
addresses,  default:
         encrPrefCombo->setCurrentIndex( 0 );
     }
-    connect( encrPrefCombo, SIGNAL(activated(int)),
-             this, SLOT(slotPrefsChanged(int)) );
+    connect(encrPrefCombo, static_cast<void \
(QComboBox::*)(int)>(&QComboBox::activated), this, \
&KeyApprovalDialog::slotPrefsChanged);  mEncrPrefCombos.insert( i, encrPrefCombo );
   }
-  connect( mChangeButtonGroup, SIGNAL(buttonClicked(int)),
-           this, SLOT(slotChangeEncryptionKey(int)) );
+  connect(mChangeButtonGroup, static_cast<void \
(QButtonGroup::*)(int)>(&QButtonGroup::buttonClicked), this, \
&KeyApprovalDialog::slotChangeEncryptionKey);  
   QSize size = sizeHint();
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic