r19270 by craig - Reduce indentation

scribus-commit scribus-commit at lists.scribus.net
Mon Jun 23 09:01:48 UTC 2014


Author: craig
Date: Mon Jun 23 09:01:48 2014
New Revision: 19270

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19270
Log:
Reduce indentation

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

Modified: trunk/Scribus/scribus/ui/sctablewidget.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19270&path=/trunk/Scribus/scribus/ui/sctablewidget.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/sctablewidget.cpp (original)
+++ trunk/Scribus/scribus/ui/sctablewidget.cpp Mon Jun 23 09:01:48 2014
@@ -71,28 +71,25 @@
 
 void ScTableWidget::comboBoxReceiver(int i)
 {
-	if (sender()!=0)
-	{
-		QComboBox* comboBox = qobject_cast<QComboBox*>(sender());
-		if (comboBox)
-		{
-			int r=-1, c=-1;
-			if (widgetPositions.contains(comboBox))
-			{
-				r=widgetPositions.value(comboBox).first;
-				c=widgetPositions.value(comboBox).second;
-			}
-			if (r!=-1 && c!=-1)
-				emit cellChanged(r,c);
-		}
-	}
+	if (!sender())
+		return;
+	QComboBox* comboBox = qobject_cast<QComboBox*>(sender());
+	if (!comboBox)
+		return;
+	if (!widgetPositions.contains(comboBox))
+		return;
+	int r=-1, c=-1;
+	r=widgetPositions.value(comboBox).first;
+	c=widgetPositions.value(comboBox).second;
+	if (r!=-1 && c!=-1)
+		emit cellChanged(r,c);
 }
 
 void ScTableWidget::setCellWidget(int row, int column, QWidget * widget)
 {
-	QComboBox* combobox = qobject_cast<QComboBox*>(widget);
-	if (combobox)
-		connect(combobox, SIGNAL(currentIndexChanged(int)), this, SLOT(comboBoxReceiver(int)));
+	QComboBox* comboBox = qobject_cast<QComboBox*>(widget);
+	if (comboBox)
+		connect(comboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(comboBoxReceiver(int)));
 	widget->installEventFilter(this);
 	QTableWidget::setCellWidget(row, column, widget);
 	widgetPositions.insert(widget, QPair<int, int>(row, column));




More information about the scribus-commit mailing list