r23312 by craig - Fix deprecated QItemDelegate function usage
scribus-commit
scribus-commit at lists.scribus.net
Sat Nov 2 22:19:30 UTC 2019
Author: craig
Date: Sat Nov 2 22:19:30 2019
New Revision: 23312
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23312
Log:
Fix deprecated QItemDelegate function usage
Modified:
trunk/Scribus/scribus/ui/proptree.cpp
trunk/Scribus/scribus/ui/proptree.h
Modified: trunk/Scribus/scribus/ui/proptree.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23312&path=/trunk/Scribus/scribus/ui/proptree.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/proptree.cpp (original)
+++ trunk/Scribus/scribus/ui/proptree.cpp Sat Nov 2 22:19:30 2019
@@ -37,10 +37,9 @@
#include "units.h"
#include "util.h"
-PropTreeItemDelegate::PropTreeItemDelegate(PropTreeWidget *parent) : QItemDelegate(parent)
-{
- m_parent = parent;
- m_edit = nullptr;
+PropTreeItemDelegate::PropTreeItemDelegate(PropTreeWidget *parent) : QItemDelegate(parent),
+ m_parent(parent)
+{
}
void PropTreeItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
@@ -445,7 +444,7 @@
if (item->parent() == nullptr)
{
if (!(item->flags() & Qt::ItemIsEditable))
- setItemExpanded(item, !isItemExpanded(item));
+ item->setExpanded(!item->isExpanded());
}
}
Modified: trunk/Scribus/scribus/ui/proptree.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23312&path=/trunk/Scribus/scribus/ui/proptree.h
==============================================================================
--- trunk/Scribus/scribus/ui/proptree.h (original)
+++ trunk/Scribus/scribus/ui/proptree.h Sat Nov 2 22:19:30 2019
@@ -51,7 +51,7 @@
void valueHasChanged();
private:
PropTreeWidget *m_parent;
- mutable QWidget *m_edit;
+ mutable QWidget *m_edit {nullptr};
};
class SCRIBUS_API PropTreeItem : public QObject, public QTreeWidgetItem
More information about the scribus-commit
mailing list