Commit 44663ab5 authored by Laurent Montel's avatar Laurent Montel 😁

Use new connect api

parent 1d297758
......@@ -1110,28 +1110,28 @@ AppearancePageMessageTagTab::AppearancePageMessageTagTab(QWidget *parent)
this, SLOT(slotAddLineTextChanged(QString)));
//For on-the-fly updating of tag name in editbox
connect(mTagWidget->tagNameLineEdit(), SIGNAL(textChanged(QString)),
this, SLOT(slotNameLineTextChanged(QString)));
connect(mTagWidget->tagNameLineEdit(), &QLineEdit::textChanged,
this, &AppearancePageMessageTagTab::slotNameLineTextChanged);
connect(mTagWidget, &TagWidget::iconNameChanged, this, &AppearancePageMessageTagTab::slotIconNameChanged);
connect(mTagAddLineEdit, &KLineEdit::returnPressed,
this, &AppearancePageMessageTagTab::slotAddNewTag);
connect(mTagAddButton, SIGNAL(clicked()),
this, SLOT(slotAddNewTag()));
connect(mTagAddButton, &QAbstractButton::clicked,
this, &AppearancePageMessageTagTab::slotAddNewTag);
connect(mTagRemoveButton, SIGNAL(clicked()),
this, SLOT(slotRemoveTag()));
connect(mTagRemoveButton, &QAbstractButton::clicked,
this, &AppearancePageMessageTagTab::slotRemoveTag);
connect(mTagUpButton, SIGNAL(clicked()),
this, SLOT(slotMoveTagUp()));
connect(mTagUpButton, &QAbstractButton::clicked,
this, &AppearancePageMessageTagTab::slotMoveTagUp);
connect(mTagDownButton, SIGNAL(clicked()),
this, SLOT(slotMoveTagDown()));
connect(mTagDownButton, &QAbstractButton::clicked,
this, &AppearancePageMessageTagTab::slotMoveTagDown);
connect(mTagListBox, SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)),
this, SLOT(slotSelectionChanged()));
connect(mTagListBox, &QListWidget::currentItemChanged,
this, &AppearancePageMessageTagTab::slotSelectionChanged);
//Adjust widths for columns
maingrid->setStretchFactor(mTagsGroupBox, 1);
maingrid->setStretchFactor(lay, 1);
......
......@@ -267,8 +267,8 @@ ComposerPageGeneralTab::ComposerPageGeneralTab(QWidget *parent)
connect(mWrapColumnSpin, SIGNAL(valueChanged(int)),
this, SLOT(slotEmitChanged()));
// only enable the spinbox if the checkbox is checked
connect(mWordWrapCheck, SIGNAL(toggled(bool)),
mWrapColumnSpin, SLOT(setEnabled(bool)));
connect(mWordWrapCheck, &QAbstractButton::toggled,
mWrapColumnSpin, &QWidget::setEnabled);
groupGridLayout->addWidget(mWordWrapCheck, row, 0);
groupGridLayout->addWidget(mWrapColumnSpin, row, 1);
......@@ -669,18 +669,18 @@ ComposerPageExternalEditorTab::ComposerPageExternalEditorTab(QWidget *parent)
"application/x-desktop"));
mEditorRequester->setMode(KFile::File | KFile::ExistingOnly | KFile::LocalOnly);
mEditorRequester->setEnabled(false); // !mExternalEditorCheck->isChecked()
connect(mExternalEditorCheck, SIGNAL(toggled(bool)),
label, SLOT(setEnabled(bool)));
connect(mExternalEditorCheck, SIGNAL(toggled(bool)),
mEditorRequester, SLOT(setEnabled(bool)));
connect(mExternalEditorCheck, &QAbstractButton::toggled,
label, &QWidget::setEnabled);
connect(mExternalEditorCheck, &QAbstractButton::toggled,
mEditorRequester, &QWidget::setEnabled);
label = new QLabel(i18n("<b>%f</b> will be replaced with the "
"filename to edit.<br />"
"<b>%w</b> will be replaced with the window id.<br />"
"<b>%l</b> will be replaced with the line number."), this);
label->setEnabled(false); // see above
connect(mExternalEditorCheck, SIGNAL(toggled(bool)),
label, SLOT(setEnabled(bool)));
connect(mExternalEditorCheck, &QAbstractButton::toggled,
label, &QWidget::setEnabled);
layout->addWidget(mExternalEditorCheck);
layout->addWidget(hbox);
layout->addWidget(label);
......
......@@ -439,7 +439,7 @@ KMComposeWin::KMComposeWin(const KMime::Message::Ptr &aMsg, bool lastSignState,
v->addWidget(mAttachmentMissing);
mPotentialPhishingEmailWarning = new PotentialPhishingEmailWarning(this);
connect(mPotentialPhishingEmailWarning, SIGNAL(sendNow()), this, SLOT(slotCheckSendNowStep2()));
connect(mPotentialPhishingEmailWarning, &PotentialPhishingEmailWarning::sendNow, this, &KMComposeWin::slotCheckSendNowStep2);
v->addWidget(mPotentialPhishingEmailWarning);
if (GlobalSettings::self()->showForgottenAttachmentWarning()) {
......
......@@ -368,43 +368,43 @@ void ActionManager::initActions()
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~ VIEWS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
action = new QAction(QIcon::fromTheme(QStringLiteral("view-calendar-upcoming-events")), i18n("What's &Next"), this);
mACollection->addAction(QStringLiteral("view_whatsnext"), action);
connect(action, SIGNAL(triggered(bool)), mCalendarView->viewManager(),
SLOT(showWhatsNextView()));
connect(action, &QAction::triggered, mCalendarView->viewManager(),
&KOViewManager::showWhatsNextView);
action = new QAction(QIcon::fromTheme(QStringLiteral("view-calendar-month")), i18n("&Month"), this);
mACollection->addAction(QStringLiteral("view_month"), action);
connect(action, SIGNAL(triggered(bool)),
mCalendarView->viewManager(), SLOT(showMonthView()));
connect(action, &QAction::triggered,
mCalendarView->viewManager(), &KOViewManager::showMonthView);
action = new QAction(QIcon::fromTheme(QStringLiteral("view-calendar-agenda")), i18n("&Agenda"), this);
mACollection->addAction(QStringLiteral("view_agenda"), action);
connect(action, SIGNAL(triggered(bool)),
mCalendarView->viewManager(), SLOT(showAgendaView()));
connect(action, &QAction::triggered,
mCalendarView->viewManager(), &KOViewManager::showAgendaView);
action = new QAction(QIcon::fromTheme(QStringLiteral("view-calendar-list")), i18n("&Event List"), this);
mACollection->addAction(QStringLiteral("view_list"), action);
connect(action, SIGNAL(triggered(bool)), mCalendarView->viewManager(),
SLOT(showListView()));
connect(action, &QAction::triggered, mCalendarView->viewManager(),
&KOViewManager::showListView);
action = new QAction(QIcon::fromTheme(QStringLiteral("view-calendar-tasks")), i18n("&To-do List"), this);
mACollection->addAction(QStringLiteral("view_todo"), action);
connect(action, SIGNAL(triggered(bool)), mCalendarView->viewManager(),
SLOT(showTodoView()));
connect(action, &QAction::triggered, mCalendarView->viewManager(),
&KOViewManager::showTodoView);
action = new QAction(QIcon::fromTheme(QStringLiteral("view-calendar-journal")), i18n("&Journal"), this);
mACollection->addAction(QStringLiteral("view_journal"), action);
connect(action, SIGNAL(triggered(bool)), mCalendarView->viewManager(),
SLOT(showJournalView()));
connect(action, &QAction::triggered, mCalendarView->viewManager(),
&KOViewManager::showJournalView);
action = new QAction(QIcon::fromTheme(QStringLiteral("view-calendar-timeline")), i18n("Time&line"), this);
mACollection->addAction(QStringLiteral("view_timeline"), action);
connect(action, SIGNAL(triggered(bool)), mCalendarView->viewManager(),
SLOT(showTimeLineView()));
connect(action, &QAction::triggered, mCalendarView->viewManager(),
&KOViewManager::showTimeLineView);
action = new QAction(QIcon::fromTheme(QStringLiteral("view-calendar-time-spent")), i18n("Time&spent"), this);
mACollection->addAction(QStringLiteral("view_timespent"), action);
connect(action, SIGNAL(triggered(bool)), mCalendarView->viewManager(),
SLOT(showTimeSpentView()));
connect(action, &QAction::triggered, mCalendarView->viewManager(),
&KOViewManager::showTimeSpentView);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~ REFRESH ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
action = new QAction(i18n("&Refresh"), this);
......@@ -529,18 +529,18 @@ void ActionManager::initActions()
mNewSubtodoAction = new QAction(i18n("New Su&b-to-do..."), this);
mACollection->addAction(QStringLiteral("new_subtodo"), mNewSubtodoAction);
connect(mNewSubtodoAction, SIGNAL(triggered(bool)), this,
SLOT(slotNewSubTodo()));
connect(mNewSubtodoAction, &QAction::triggered, this,
&ActionManager::slotNewSubTodo);
mNewSubtodoAction->setEnabled(false);
connect(mCalendarView, SIGNAL(todoSelected(bool)), mNewSubtodoAction,
SLOT(setEnabled(bool)));
connect(mCalendarView, &CalendarView::todoSelected, mNewSubtodoAction,
&QAction::setEnabled);
mNewJournalAction = new QAction(QIcon::fromTheme(QStringLiteral("journal-new")), i18n("New &Journal..."), this);
//mNewJournalAction->setIconText( i18n( "Journal" ) );
setHelpText(mNewJournalAction, i18n("Create a new Journal"));
mACollection->addAction(QStringLiteral("new_journal"), mNewJournalAction);
connect(mNewJournalAction, SIGNAL(triggered(bool)), this,
SLOT(slotNewJournal()));
connect(mNewJournalAction, &QAction::triggered, this,
&ActionManager::slotNewJournal);
mConfigureViewAction = new QAction(QIcon::fromTheme(QStringLiteral("configure")), i18n("Configure View..."), this);
mConfigureViewAction->setIconText(i18n("Configure"));
......@@ -548,8 +548,8 @@ void ActionManager::initActions()
mConfigureViewAction->setEnabled(mCalendarView->currentView() &&
mCalendarView->currentView()->hasConfigurationDialog());
mACollection->addAction(QStringLiteral("configure_view"), mConfigureViewAction);
connect(mConfigureViewAction, SIGNAL(triggered(bool)), mCalendarView,
SLOT(configureCurrentView()));
connect(mConfigureViewAction, &QAction::triggered, mCalendarView,
&CalendarView::configureCurrentView);
mShowIncidenceAction = new QAction(i18n("&Show"), this);
mACollection->addAction(QStringLiteral("show_incidence"), mShowIncidenceAction);
......
......@@ -426,7 +426,7 @@ QMenu *AddresseeLineEdit::createStandardContextMenu()
showOU->setCheckable(true);
showOU->setChecked(d->showOU());
connect(showOU, SIGNAL(triggered(bool)), d, SLOT(slotShowOUChanged(bool)));
connect(showOU, &QAction::triggered, d, &AddresseeLineEditPrivate::slotShowOUChanged);
menu->addAction(showOU);
}
configureCompletionOrder(menu);
......
......@@ -86,6 +86,9 @@ public:
KLDAP::LdapClientSearch *ldapSearch();
QStringList balooBlackList() const;
public Q_SLOTS:
void slotShowOUChanged(bool);
private Q_SLOTS:
void slotCompletion();
void slotPopupCompletion(const QString &);
......@@ -99,7 +102,6 @@ private Q_SLOTS:
void slotAkonadiCollectionsReceived(const Akonadi::Collection::List &);
void searchInBaloo();
void slotTriggerDelayedQueries();
void slotShowOUChanged(bool);
void slotConfigureBalooBlackList();
private:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment