r17096 by jghali - remove the DocChanged() signal from quite a few property widgets :

scribus-commit scribus-commit at lists.scribus.net
Sat Dec 17 23:17:10 UTC 2011


Author: jghali
Date: Sat Dec 17 23:17:09 2011
New Revision: 17096

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17096
Log:
remove the DocChanged() signal from quite a few property widgets : 
- this signal is broken as it is just emitted to call ScribusMainWindow::slotDocCh()
- proper way to signal doc is changed is to call m_doc->changed() or m_item->update() as needed

Modified:
    branches/ScribusOIF/scribus/ui/propertywidget_group.cpp
    branches/ScribusOIF/scribus/ui/propertywidget_groupshape.cpp
    branches/ScribusOIF/scribus/ui/propertywidget_groupshape.h
    branches/ScribusOIF/scribus/ui/propertywidget_image.cpp
    branches/ScribusOIF/scribus/ui/propertywidget_line.cpp
    branches/ScribusOIF/scribus/ui/propertywidget_line.h
    branches/ScribusOIF/scribus/ui/propertywidget_pathtext.cpp
    branches/ScribusOIF/scribus/ui/propertywidget_pos.cpp
    branches/ScribusOIF/scribus/ui/propertywidget_pos.h
    branches/ScribusOIF/scribus/ui/propertywidget_shape.cpp
    branches/ScribusOIF/scribus/ui/propertywidget_shape.h
    branches/ScribusOIF/scribus/ui/propertywidget_text.cpp

Modified: branches/ScribusOIF/scribus/ui/propertywidget_group.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17096&path=/branches/ScribusOIF/scribus/ui/propertywidget_group.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertywidget_group.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertywidget_group.cpp Sat Dec 17 23:17:09 2011
@@ -58,7 +58,6 @@
 
 	groupShapeWidget->setMainWindow(mw);
 
-	connect(this  , SIGNAL(DocChanged())      , m_ScMW, SLOT(slotDocCh()));
 	connect(m_ScMW, SIGNAL(UpdateRequest(int)), this  , SLOT(handleUpdateRequest(int)));
 }
 

Modified: branches/ScribusOIF/scribus/ui/propertywidget_groupshape.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17096&path=/branches/ScribusOIF/scribus/ui/propertywidget_groupshape.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertywidget_groupshape.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertywidget_groupshape.cpp Sat Dec 17 23:17:09 2011
@@ -227,7 +227,7 @@
 				mode = PageItem::TextFlowUsesImageClipping;
 		}
 		m_item->setTextFlowMode(mode);
-		emit DocChanged();
+		m_doc->changed();
 		m_doc->invalidateAll();
 		m_doc->regionsChanged()->update(QRect());
 	}
@@ -271,7 +271,7 @@
 		return;
 	m_item->setCornerRadius(roundRect->value() / m_unitRatio);
 	m_ScMW->view->SetFrameRounded();
-	emit DocChanged();
+	m_doc->changed();
 	m_doc->regionsChanged()->update(QRect());
 }
 

Modified: branches/ScribusOIF/scribus/ui/propertywidget_groupshape.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17096&path=/branches/ScribusOIF/scribus/ui/propertywidget_groupshape.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertywidget_groupshape.h (original)
+++ branches/ScribusOIF/scribus/ui/propertywidget_groupshape.h Sat Dec 17 23:17:09 2011
@@ -49,7 +49,6 @@
 	void handleNewShape(int, int, qreal *);
 
 signals:
-	void DocChanged();
 	void shapeChanged(int);
 	void shapeEditStarted();
 };

Modified: branches/ScribusOIF/scribus/ui/propertywidget_image.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17096&path=/branches/ScribusOIF/scribus/ui/propertywidget_image.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertywidget_image.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertywidget_image.cpp Sat Dec 17 23:17:09 2011
@@ -501,7 +501,6 @@
 	{
 		m_item->setImageScalingMode(freeScale->isChecked(), cbProportional->isChecked());
 		//emit UpdtGui(PageItem::ImageFrame);
-		//emit DocChanged();
 		m_doc->changed();
 		m_doc->regionsChanged()->update(QRect());
 	}
@@ -599,7 +598,6 @@
 	if (!m_doc || !m_item || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	m_ScMW->view->editExtendedImageProperties();
-	//emit DocChanged();
 	m_doc->changed();
 }
 

Modified: branches/ScribusOIF/scribus/ui/propertywidget_line.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17096&path=/branches/ScribusOIF/scribus/ui/propertywidget_line.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertywidget_line.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertywidget_line.cpp Sat Dec 17 23:17:09 2011
@@ -137,7 +137,6 @@
 {
 	m_ScMW = mw;
 
-	connect(this  , SIGNAL(DocChanged())      , m_ScMW, SLOT(slotDocCh()));
 	connect(m_ScMW, SIGNAL(UpdateRequest(int)), this  , SLOT(handleUpdateRequest(int)));
 }
 
@@ -610,7 +609,6 @@
 		m_item->RightLine  = rightLine->isChecked();
 		m_item->BottomLine = bottomLine->isChecked();
 		m_item->update();
-		emit DocChanged();
 	}
 }
 
@@ -654,7 +652,6 @@
 			//m_item->setDashOffset(dashEditor->Offset->value() * m_item->lineWidth());
 		}
 		m_item->update();
-		emit DocChanged();
 	}
 }
 

Modified: branches/ScribusOIF/scribus/ui/propertywidget_line.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17096&path=/branches/ScribusOIF/scribus/ui/propertywidget_line.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertywidget_line.h (original)
+++ branches/ScribusOIF/scribus/ui/propertywidget_line.h Sat Dec 17 23:17:09 2011
@@ -83,7 +83,6 @@
 	void handleLineStyle(int index);
 
 signals:
-	void DocChanged();
 	void lineModeChanged(int);
 };
 

Modified: branches/ScribusOIF/scribus/ui/propertywidget_pathtext.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17096&path=/branches/ScribusOIF/scribus/ui/propertywidget_pathtext.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertywidget_pathtext.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertywidget_pathtext.cpp Sat Dec 17 23:17:09 2011
@@ -161,7 +161,6 @@
 	m_doc->AdjustItemSize(m_item);
 	m_item->updatePolyClip();
 	m_item->update();
-	//emit DocChanged();
 }
 
 void PropertyWidget_PathText::handlePathFlip()
@@ -171,7 +170,6 @@
 	m_item->textPathFlipped = flippedPathText->isChecked();
 	m_item->updatePolyClip();
 	m_item->update();
-	//emit DocChanged();
 }
 
 void PropertyWidget_PathText::handlePathLine()
@@ -180,7 +178,6 @@
 		return;
 	m_item->PoShow = showCurveCheckBox->isChecked();
 	m_item->update();
-	//emit DocChanged();
 }
 
 void PropertyWidget_PathText::handlePathOffs()
@@ -191,7 +188,6 @@
 	m_doc->AdjustItemSize(m_item);
 	m_item->updatePolyClip();
 	m_item->update();
-	//emit DocChanged();
 }
 
 void PropertyWidget_PathText::handlePathType()
@@ -200,7 +196,6 @@
 		return;
 	m_item->textPathType = pathTextType->currentIndex();
 	m_item->update();
-	//emit DocChanged();
 }
 
 void PropertyWidget_PathText::changeEvent(QEvent *e)

Modified: branches/ScribusOIF/scribus/ui/propertywidget_pos.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17096&path=/branches/ScribusOIF/scribus/ui/propertywidget_pos.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertywidget_pos.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertywidget_pos.cpp Sat Dec 17 23:17:09 2011
@@ -293,7 +293,6 @@
 {
 	m_ScMW = mw;
 
-	connect(this, SIGNAL(DocChanged()), m_ScMW, SLOT(slotDocCh()));
 	connect(mw, SIGNAL(AppModeChanged(int, int)), this, SLOT(handleAppModeChanged(int, int)));
 }
 
@@ -721,7 +720,7 @@
 			}
 		}
 		m_doc->regionsChanged()->update(QRect());
-		emit DocChanged();
+		m_doc->changed();
 	}
 }
 
@@ -802,7 +801,7 @@
 		}
 	}
 	m_doc->regionsChanged()->update(QRect());
-	emit DocChanged();
+	m_doc->changed();
 }
 
 void PropertyWidget_Position::handleNewW()
@@ -926,7 +925,6 @@
 		}
 		m_item->Sizing = oldS;
 	}
-	//emit DocChanged();
 	m_doc->changed();
 	m_doc->regionsChanged()->update(QRect());
 }
@@ -1053,7 +1051,6 @@
 			}
 			m_item->Sizing = oldS;
 		}
-		//emit DocChanged();
 		m_doc->changed();
 		m_doc->regionsChanged()->update(QRect());
 	}
@@ -1082,8 +1079,8 @@
 				m_doc->m_Selection->itemAt(i)->checkChanges(true);
 			m_ScMW->view->endGroupTransaction();
 		}
-		emit DocChanged();
 		m_doc->regionsChanged()->update(QRect());
+		m_doc->changed();
 		m_oldRotation = rotationSpin->value();
 	}
 }
@@ -1214,7 +1211,6 @@
 			{
 				m_item->AdjustPictScale();
 				m_item->update();
-				emit DocChanged();
 			}
 		}
 	}

Modified: branches/ScribusOIF/scribus/ui/propertywidget_pos.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17096&path=/branches/ScribusOIF/scribus/ui/propertywidget_pos.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertywidget_pos.h (original)
+++ branches/ScribusOIF/scribus/ui/propertywidget_pos.h Sat Dec 17 23:17:09 2011
@@ -104,9 +104,6 @@
 	void spinboxStartUserAction();
 	void spinboxFinishUserAction();
 	void updateSpinBoxConstants();
-
-signals:
-	void DocChanged();
 };
 
 #endif

Modified: branches/ScribusOIF/scribus/ui/propertywidget_shape.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17096&path=/branches/ScribusOIF/scribus/ui/propertywidget_shape.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertywidget_shape.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertywidget_shape.cpp Sat Dec 17 23:17:09 2011
@@ -207,7 +207,6 @@
 {
 	m_ScMW = mw;
 
-	connect(this  , SIGNAL(DocChanged())      , m_ScMW, SLOT(slotDocCh()));
 	connect(m_ScMW, SIGNAL(UpdateRequest(int)), this  , SLOT(handleUpdateRequest(int)));
 }
 
@@ -348,7 +347,7 @@
 				mode = PageItem::TextFlowUsesImageClipping;
 		}
 		m_item->setTextFlowMode(mode);
-		emit DocChanged();
+		m_doc->changed();
 		m_doc->regionsChanged()->update(QRect());
 	}
 }
@@ -381,7 +380,7 @@
 			roundRect->setEnabled(false);
 			connect(m_ScMW->nodePalette, SIGNAL(paletteClosed()), this, SLOT(handleShapeEditEnded()));
 		}
-		emit DocChanged();
+		m_doc->changed();
 	}
 }
 
@@ -405,7 +404,7 @@
 		return;
 	m_item->setCornerRadius(roundRect->value() / m_unitRatio);
 	m_ScMW->view->SetFrameRounded();
-	emit DocChanged();
+	m_doc->changed();
 	m_doc->regionsChanged()->update(QRect());
 }
 
@@ -415,7 +414,6 @@
 		return;
 	m_item->fillRule = evenOdd->isChecked();
 	m_item->update();
-	emit DocChanged();
 }
 
 void PropertyWidget_Shape::handleNewShape(int f, int c, qreal *vals)

Modified: branches/ScribusOIF/scribus/ui/propertywidget_shape.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17096&path=/branches/ScribusOIF/scribus/ui/propertywidget_shape.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertywidget_shape.h (original)
+++ branches/ScribusOIF/scribus/ui/propertywidget_shape.h Sat Dec 17 23:17:09 2011
@@ -69,9 +69,6 @@
 	void handleCornerRadius();
 	void handleFillRule();
 	void handleNewShape(int, int, qreal *);
-
-signals:
-	void DocChanged();
 };
 
 #endif

Modified: branches/ScribusOIF/scribus/ui/propertywidget_text.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17096&path=/branches/ScribusOIF/scribus/ui/propertywidget_text.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertywidget_text.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertywidget_text.cpp Sat Dec 17 23:17:09 2011
@@ -81,7 +81,6 @@
 	pathTextWidgets->setMainWindow(mw);
 	styleWidgets->setMainWindow(mw);
 
-	connect(this  , SIGNAL(DocChanged())           , m_ScMW, SLOT(slotDocCh()));
 	connect(m_ScMW, SIGNAL(UpdateRequest(int))     , this  , SLOT(handleUpdateRequest(int)));
 }
 
@@ -294,7 +293,6 @@
 	else if( radioFlop == PropertyWidget_Flop::LineSpacingID)
 		m_item->setFirstLineOffset(FLOPLineSpacing);
 	m_item->update();
-	//emit DocChanged();
 }
 
 void PropertyWidget_Text::handleFontSize()




More information about the scribus-commit mailing list