r21093 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Sat Mar 19 15:19:41 UTC 2016


Author: jghali
Date: Sat Mar 19 15:19:41 2016
New Revision: 21093

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21093
Log:
use some new QTreeWidgetItem functions instead of deprecated ones

Modified:
    trunk/Scribus/scribus/ui/sctreewidget.cpp

Modified: trunk/Scribus/scribus/ui/sctreewidget.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21093&path=/trunk/Scribus/scribus/ui/sctreewidget.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/sctreewidget.cpp	(original)
+++ trunk/Scribus/scribus/ui/sctreewidget.cpp	Sat Mar 19 15:19:41 2016
@@ -192,11 +192,11 @@
 	int tops = topLevelItemCount();
 	for (int t = 0; t < tops; t++)
 	{
-		setItemExpanded(topLevelItem(t), false);
+		topLevelItem(t)->setExpanded(false);
 	}
 	QTreeWidgetItem *top = topLevelItem(index);
 	setCurrentItem(top);
-	setItemExpanded(top, true);
+	top->setExpanded(true);
 	int wide = 0;
 	if (top->childCount() != 0)
 	{
@@ -236,7 +236,7 @@
 	{
 		if (item->isDisabled())
 		{
-			setItemExpanded(item, false);
+			item->setExpanded(false);
 			return;
 		}
 		int wide = 0;
@@ -245,10 +245,10 @@
 		{
 			for (int t = 0; t < tops; t++)
 			{
-				setItemExpanded(topLevelItem(t), false);
+				topLevelItem(t)->setExpanded(false);
 			}
 			setCurrentItem(item);
-			setItemExpanded(item, true);
+			item->setExpanded(true);
 			if (item->childCount() != 0)
 			{
 				QTreeWidgetItem *child = item->child(0);
@@ -262,11 +262,11 @@
 		}
 		else
 		{
-			setItemExpanded(item, !isItemExpanded(item));
+			item->setExpanded(!item->isExpanded());
 			for (int t = 0; t < tops; t++)
 			{
 				QTreeWidgetItem *top = topLevelItem(t);
-				if (isItemExpanded(top))
+				if (top->isExpanded())
 				{
 					if (top->childCount() != 0)
 					{




More information about the scribus-commit mailing list