aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/winextras/qquickjumplist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/imports/winextras/qquickjumplist.cpp')
-rw-r--r--src/imports/winextras/qquickjumplist.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/imports/winextras/qquickjumplist.cpp b/src/imports/winextras/qquickjumplist.cpp
index 0f210c7..615af08 100644
--- a/src/imports/winextras/qquickjumplist.cpp
+++ b/src/imports/winextras/qquickjumplist.cpp
@@ -65,13 +65,11 @@ QT_BEGIN_NAMESPACE
*/
QQuickJumpList::QQuickJumpList(QObject *parent) :
- QObject(parent), m_recent(0), m_frequent(0), m_tasks(0)
+ QObject(parent)
{
}
-QQuickJumpList::~QQuickJumpList()
-{
-}
+QQuickJumpList::~QQuickJumpList() = default;
/*!
\qmlproperty JumpListCategory JumpList::recent
@@ -82,7 +80,7 @@ QQuickJumpList::~QQuickJumpList()
QQuickJumpListCategory *QQuickJumpList::recent() const
{
if (!m_recent) {
- QQuickJumpList *that = const_cast<QQuickJumpList *>(this);
+ auto *that = const_cast<QQuickJumpList *>(this);
that->m_recent = new QQuickJumpListCategory(that);
connect(m_recent, &QQuickJumpListCategory::visibilityChanged, that, &QQuickJumpList::rebuild);
m_recent->setVisible(false);
@@ -99,7 +97,7 @@ QQuickJumpListCategory *QQuickJumpList::recent() const
QQuickJumpListCategory *QQuickJumpList::frequent() const
{
if (!m_frequent) {
- QQuickJumpList *that = const_cast<QQuickJumpList *>(this);
+ auto *that = const_cast<QQuickJumpList *>(this);
that->m_frequent = new QQuickJumpListCategory(that);
connect(m_frequent, &QQuickJumpListCategory::visibilityChanged, that, &QQuickJumpList::rebuild);
m_frequent->setVisible(false);
@@ -115,7 +113,7 @@ QQuickJumpListCategory *QQuickJumpList::frequent() const
QQuickJumpListCategory *QQuickJumpList::tasks() const
{
if (!m_tasks) {
- QQuickJumpList *that = const_cast<QQuickJumpList *>(this);
+ auto *that = const_cast<QQuickJumpList *>(this);
that->m_tasks = new QQuickJumpListCategory(that);
connect(m_tasks, &QQuickJumpListCategory::visibilityChanged, that, &QQuickJumpList::rebuild);
}
@@ -141,7 +139,7 @@ void QQuickJumpList::setTasks(QQuickJumpListCategory *tasks)
*/
QQmlListProperty<QObject> QQuickJumpList::data()
{
- return QQmlListProperty<QObject>(this, this, &QQuickJumpList::data_append, 0, 0, 0);
+ return QQmlListProperty<QObject>(this, this, &QQuickJumpList::data_append, nullptr, nullptr, nullptr);
}
/*!
@@ -182,8 +180,8 @@ void QQuickJumpList::rebuild()
void QQuickJumpList::data_append(QQmlListProperty<QObject> *property, QObject *object)
{
- if (QQuickJumpListCategory *category = qobject_cast<QQuickJumpListCategory *>(object)) {
- QQuickJumpList *jumpList = static_cast<QQuickJumpList *>(property->object);
+ if (auto *category = qobject_cast<QQuickJumpListCategory *>(object)) {
+ auto *jumpList = static_cast<QQuickJumpList *>(property->object);
connect(category, &QQuickJumpListCategory::visibilityChanged, jumpList, &QQuickJumpList::rebuild);
jumpList->m_categories.append(category);
emit jumpList->categoriesChanged();