Port to new connect api

wilder
Montel Laurent 9 years ago
parent aac56c7ee6
commit fbbb1fdfeb
  1. 2
      src/mdn/sendmdnhandler.cpp
  2. 2
      src/mdn/sendmdnhandler.h
  3. 22
      src/snippets/snippetsmanager.cpp
  4. 12
      src/snippets/snippetsmanager.h
  5. 6
      src/widgets/redirectdialog.cpp
  6. 4
      src/widgets/redirectdialog.h

@ -111,7 +111,7 @@ SendMdnHandler::SendMdnHandler(IKernel *kernel, QObject *parent)
, d(new Private(this, kernel))
{
d->mTimer.setSingleShot(true);
connect(&d->mTimer, SIGNAL(timeout()), this, SLOT(handleMessages()));
connect(&d->mTimer, &QTimer::timeout, this, [this]() { d->handleMessages(); });
}
SendMdnHandler::~SendMdnHandler()

@ -60,8 +60,6 @@ private:
//@cond PRIVATE
class Private;
Private *const d;
Q_PRIVATE_SLOT(d, void handleMessages())
//@endcond
};
}

@ -613,20 +613,20 @@ SnippetsManager::SnippetsManager(KActionCollection *actionCollection, QObject *p
d->mInsertSnippetAction = new QAction(i18n("Insert Snippet"), this);
connect(d->mSelectionModel, SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
this, SLOT(selectionChanged()));
connect(d->mModel, SIGNAL(dndDone()), SLOT(dndDone()));
connect(d->mModel, SIGNAL(addNewDndSnippset(QString)), this, SLOT(slotAddNewDndSnippset(QString)));
connect(d->mSelectionModel, &QItemSelectionModel::selectionChanged,
this, [this]() {d->selectionChanged();});
connect(d->mModel, &SnippetsModel::dndDone, this, [this]() { d->dndDone();} );
connect(d->mModel, &SnippetsModel::addNewDndSnippset, this, [this](const QString &str) { d->slotAddNewDndSnippset(str); });
connect(d->mAddSnippetAction, SIGNAL(triggered(bool)), SLOT(addSnippet()));
connect(d->mEditSnippetAction, SIGNAL(triggered(bool)), SLOT(editSnippet()));
connect(d->mDeleteSnippetAction, SIGNAL(triggered(bool)), SLOT(deleteSnippet()));
connect(d->mAddSnippetAction, &QAction::triggered, this, [this]() { d->addSnippet(); });
connect(d->mEditSnippetAction, &QAction::triggered, this, [this]() { d->editSnippet(); });
connect(d->mDeleteSnippetAction, &QAction::triggered, this, [this]() { d->deleteSnippet(); });
connect(d->mAddSnippetGroupAction, SIGNAL(triggered(bool)), SLOT(addSnippetGroup()));
connect(d->mEditSnippetGroupAction, SIGNAL(triggered(bool)), SLOT(editSnippetGroup()));
connect(d->mDeleteSnippetGroupAction, SIGNAL(triggered(bool)), SLOT(deleteSnippetGroup()));
connect(d->mAddSnippetGroupAction, &QAction::triggered, this, [this]() { d->addSnippetGroup(); });
connect(d->mEditSnippetGroupAction, &QAction::triggered, this, [this]() { d->editSnippetGroup(); });
connect(d->mDeleteSnippetGroupAction, &QAction::triggered, this, [this]() { d->deleteSnippetGroup(); });
connect(d->mInsertSnippetAction, SIGNAL(triggered(bool)), SLOT(insertSelectedSnippet()));
connect(d->mInsertSnippetAction, &QAction::triggered, this, [this]() { d->insertSelectedSnippet(); });
d->selectionChanged();

@ -146,18 +146,6 @@ private:
//@cond PRIVATE
class Private;
Private *const d;
Q_PRIVATE_SLOT(d, void selectionChanged())
Q_PRIVATE_SLOT(d, void addSnippet())
Q_PRIVATE_SLOT(d, void editSnippet())
Q_PRIVATE_SLOT(d, void deleteSnippet())
Q_PRIVATE_SLOT(d, void addSnippetGroup())
Q_PRIVATE_SLOT(d, void editSnippetGroup())
Q_PRIVATE_SLOT(d, void deleteSnippetGroup())
Q_PRIVATE_SLOT(d, void insertSelectedSnippet())
Q_PRIVATE_SLOT(d, void insertActionSnippet())
Q_PRIVATE_SLOT(d, void dndDone())
Q_PRIVATE_SLOT(d, void slotAddNewDndSnippset(QString))
//@endcond
};
}

@ -162,7 +162,7 @@ RedirectDialog::RedirectDialog(SendMode mode, QWidget *parent)
mainLayout->addWidget(d->mEditTo);
formLayout->addRow(d->redirectLabelType(RedirectDialog::Private::ResendTo), d->mEditTo);
connect(d->mEditTo, SIGNAL(addressChanged(QString)), SLOT(slotAddressChanged(QString)));
connect(d->mEditTo, &RedirectWidget::addressChanged, this, [this](const QString &str) { d->slotAddressChanged(str);} );
d->mEditCc = new RedirectWidget;
formLayout->addRow(d->redirectLabelType(RedirectDialog::Private::ResendCc), d->mEditCc);
@ -188,8 +188,8 @@ RedirectDialog::RedirectDialog(SendMode mode, QWidget *parent)
KGuiItem::assign(d->mUser1Button, KGuiItem(i18n("&Send Now")));
KGuiItem::assign(d->mUser2Button, KGuiItem(i18n("Send &Later")));
connect(d->mUser1Button, SIGNAL(clicked()), this, SLOT(slotUser1()));
connect(d->mUser2Button, SIGNAL(clicked()), this, SLOT(slotUser2()));
connect(d->mUser1Button, &QPushButton::clicked, this, [this]() { d->slotUser1(); });
connect(d->mUser2Button, &QPushButton::clicked, this, [this]() { d->slotUser2(); });
d->mUser1Button->setEnabled(false);
d->mUser2Button->setEnabled(false);

@ -93,10 +93,6 @@ private:
//@cond PRIVATE
class Private;
Private *const d;
Q_PRIVATE_SLOT(d, void slotUser1())
Q_PRIVATE_SLOT(d, void slotUser2())
Q_PRIVATE_SLOT(d, void slotAddressChanged(const QString &))
//@endcond
};
}

Loading…
Cancel
Save