summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-11-10 07:53:57 (GMT)
committerMontel Laurent <montel@kde.org>2016-11-10 07:53:57 (GMT)
commit255473f20374e5c510c06f8250c6d22427b98d09 (patch)
treee687b627a8fe32fad0bad4d9ba62dad738e21c69
parent468218b99e3b10cecc17953170248f208cabd904 (diff)
Use qobject_cast
-rw-r--r--src/filter/filteractions/filteractionsetidentity.cpp6
-rw-r--r--src/folder/foldertreeview.cpp8
2 files changed, 7 insertions, 7 deletions
diff --git a/src/filter/filteractions/filteractionsetidentity.cpp b/src/filter/filteractions/filteractionsetidentity.cpp
index 49550d8..358e7dd 100644
--- a/src/filter/filteractions/filteractionsetidentity.cpp
+++ b/src/filter/filteractions/filteractionsetidentity.cpp
@@ -113,7 +113,7 @@ QWidget *FilterActionSetIdentity::createParamWidget(QWidget *parent) const
void FilterActionSetIdentity::applyParamWidgetValue(QWidget *paramWidget)
{
- const KIdentityManagement::IdentityCombo *comboBox = dynamic_cast<KIdentityManagement::IdentityCombo *>(paramWidget);
+ const KIdentityManagement::IdentityCombo *comboBox = qobject_cast<KIdentityManagement::IdentityCombo *>(paramWidget);
Q_ASSERT(comboBox);
mParameter = comboBox->currentIdentity();
@@ -121,7 +121,7 @@ void FilterActionSetIdentity::applyParamWidgetValue(QWidget *paramWidget)
void FilterActionSetIdentity::clearParamWidget(QWidget *paramWidget) const
{
- KIdentityManagement::IdentityCombo *comboBox = dynamic_cast<KIdentityManagement::IdentityCombo *>(paramWidget);
+ KIdentityManagement::IdentityCombo *comboBox = qobject_cast<KIdentityManagement::IdentityCombo *>(paramWidget);
Q_ASSERT(comboBox);
comboBox->setCurrentIndex(0);
@@ -129,7 +129,7 @@ void FilterActionSetIdentity::clearParamWidget(QWidget *paramWidget) const
void FilterActionSetIdentity::setParamWidgetValue(QWidget *paramWidget) const
{
- KIdentityManagement::IdentityCombo *comboBox = dynamic_cast<KIdentityManagement::IdentityCombo *>(paramWidget);
+ KIdentityManagement::IdentityCombo *comboBox = qobject_cast<KIdentityManagement::IdentityCombo *>(paramWidget);
Q_ASSERT(comboBox);
comboBox->setCurrentIdentity(mParameter);
diff --git a/src/folder/foldertreeview.cpp b/src/folder/foldertreeview.cpp
index 3ae561a..cd93726 100644
--- a/src/folder/foldertreeview.cpp
+++ b/src/folder/foldertreeview.cpp
@@ -213,7 +213,7 @@ void FolderTreeView::slotHeaderContextMenuRequested(const QPoint &pnt)
void FolderTreeView::slotHeaderContextMenuChangeSortingPolicy(bool)
{
- QAction *act = dynamic_cast< QAction * >(sender());
+ QAction *act = qobject_cast< QAction * >(sender());
if (!act) {
return;
}
@@ -263,7 +263,7 @@ void FolderTreeView::setSortingPolicy(FolderTreeWidget::SortingPolicy policy, bo
void FolderTreeView::slotHeaderContextMenuChangeToolTipDisplayPolicy(bool)
{
- QAction *act = dynamic_cast< QAction * >(sender());
+ QAction *act = qobject_cast< QAction * >(sender());
if (!act) {
return;
}
@@ -280,7 +280,7 @@ void FolderTreeView::slotHeaderContextMenuChangeToolTipDisplayPolicy(bool)
void FolderTreeView::slotHeaderContextMenuChangeHeader(bool)
{
- QAction *act = dynamic_cast< QAction * >(sender());
+ QAction *act = qobject_cast< QAction * >(sender());
if (!act) {
return;
}
@@ -306,7 +306,7 @@ void FolderTreeView::slotHeaderContextMenuChangeHeader(bool)
void FolderTreeView::slotHeaderContextMenuChangeIconSize(bool)
{
- QAction *act = dynamic_cast< QAction * >(sender());
+ QAction *act = qobject_cast< QAction * >(sender());
if (!act) {
return;
}