[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kwidgetsaddons] src: Port some code to new connect api
From: Laurent Montel <null () kde ! org>
Date: 2017-12-31 15:03:33
Message-ID: E1eVf9B-00021L-Ob () code ! kde ! org
[Download RAW message or body]
Git commit cedfec3691fbcf82e22b5dab47debb0e36342fdf by Laurent Montel.
Committed on 31/12/2017 at 15:03.
Pushed by mlaurent into branch 'master'.
Port some code to new connect api
M +1 -1 src/kfontaction.cpp
M +0 -2 src/kfontaction.h
M +2 -2 src/kmultitabbar.cpp
M +1 -1 src/ksqueezedtextlabel.cpp
M +0 -1 src/ksqueezedtextlabel.h
https://commits.kde.org/kwidgetsaddons/cedfec3691fbcf82e22b5dab47debb0e36342fdf
diff --git a/src/kfontaction.cpp b/src/kfontaction.cpp
index 07672e6..e4c1bb8 100644
--- a/src/kfontaction.cpp
+++ b/src/kfontaction.cpp
@@ -157,7 +157,7 @@ QWidget *KFontAction::createWidget(QWidget *parent)
cb->setCurrentFont(QFont(font().toLower()));
// qCDebug(KWidgetsAddonsLog) << "\tspit back=" << cb->currentFont().family();
- connect(cb, SIGNAL(currentFontChanged(QFont)), SLOT(_k_slotFontChanged(QFont)));
+ connect(cb, &QFontComboBox::currentFontChanged, this, [this](const QFont &ft) { d->_k_slotFontChanged(ft); });
cb->setMinimumWidth(cb->sizeHint().width());
return cb;
}
diff --git a/src/kfontaction.h b/src/kfontaction.h
index 33bf331..ba8272b 100644
--- a/src/kfontaction.h
+++ b/src/kfontaction.h
@@ -56,8 +56,6 @@ public:
private:
class KFontActionPrivate;
KFontActionPrivate *const d;
-
- Q_PRIVATE_SLOT(d, void _k_slotFontChanged(const QFont &))
};
#endif
diff --git a/src/kmultitabbar.cpp b/src/kmultitabbar.cpp
index 2e487cd..a938d4f 100644
--- a/src/kmultitabbar.cpp
+++ b/src/kmultitabbar.cpp
@@ -150,7 +150,7 @@ KMultiTabBarButton::KMultiTabBarButton(const QIcon &icon, const QString &text,
int id, QWidget *parent)
: QPushButton(icon, text, parent), m_id(id), d(nullptr)
{
- connect(this, SIGNAL(clicked()), this, SLOT(slotClicked()));
+ connect(this, &KMultiTabBarButton::clicked, this, &KMultiTabBarButton::slotClicked);
// we can't see the focus, so don't take focus. #45557
// If keyboard navigation is wanted, then only the bar should take focus,
@@ -164,7 +164,7 @@ KMultiTabBarButton::KMultiTabBarButton(const QPixmap &pic, const QString &text,
int id, QWidget *parent)
: QPushButton(QIcon(pic), text, parent), m_id(id), d(nullptr)
{
- connect(this, SIGNAL(clicked()), this, SLOT(slotClicked()));
+ connect(this, &KMultiTabBarButton::clicked, this, &KMultiTabBarButton::slotClicked);
// we can't see the focus, so don't take focus. #45557
// If keyboard navigation is wanted, then only the bar should take focus,
diff --git a/src/ksqueezedtextlabel.cpp b/src/ksqueezedtextlabel.cpp
index 3b682ca..5181b70 100644
--- a/src/ksqueezedtextlabel.cpp
+++ b/src/ksqueezedtextlabel.cpp
@@ -213,7 +213,7 @@ void KSqueezedTextLabel::contextMenuEvent(QContextMenuEvent *ev)
QMenu menu(this);
QAction *act = new QAction(tr("&Copy Full Text"), &menu);
- connect(act, SIGNAL(triggered()), this, SLOT(_k_copyFullText()));
+ connect(act, &QAction::triggered, this, [this]() { d->_k_copyFullText(); });
menu.addAction(act);
ev->accept();
diff --git a/src/ksqueezedtextlabel.h b/src/ksqueezedtextlabel.h
index 88c6330..b9bc335 100644
--- a/src/ksqueezedtextlabel.h
+++ b/src/ksqueezedtextlabel.h
@@ -223,7 +223,6 @@ protected:
void squeezeTextToLabel();
private:
- Q_PRIVATE_SLOT(d, void _k_copyFullText())
KSqueezedTextLabelPrivate *const d;
};
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic