r23120 by jghali - Remove from ScribusView useless signals and connections due to signal never being emitted

scribus-commit scribus-commit at lists.scribus.net
Fri Aug 9 02:28:29 UTC 2019


Author: jghali
Date: Fri Aug  9 02:28:29 2019
New Revision: 23120

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23120
Log:
Remove from ScribusView useless signals and connections due to signal never being emitted

Modified:
    trunk/Scribus/scribus/canvasmode_normal.cpp
    trunk/Scribus/scribus/pageitem_textframe.cpp
    trunk/Scribus/scribus/scribus.cpp
    trunk/Scribus/scribus/scribusview.h

Modified: trunk/Scribus/scribus/canvasmode_normal.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23120&path=/trunk/Scribus/scribus/canvasmode_normal.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_normal.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_normal.cpp	Fri Aug  9 02:28:29 2019
@@ -240,9 +240,6 @@
 			// See if double click was on a frame handle
 			FPoint p = m_canvas->globalToCanvas(m->globalPos());
 			Canvas::FrameHandle fh = m_canvas->frameHitTest(QPointF(p.x(),p.y()), currItem);
-			//CB old code
-			//emit currItem->isAnnotation() ? AnnotProps() : Amode(modeEdit);
-			//mousePressEvent(m);
 			//CB if annotation, open the annotation dialog
 			if (currItem->isAnnotation())
 			{

Modified: trunk/Scribus/scribus/pageitem_textframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23120&path=/trunk/Scribus/scribus/pageitem_textframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_textframe.cpp	(original)
+++ trunk/Scribus/scribus/pageitem_textframe.cpp	Fri Aug  9 02:28:29 2019
@@ -4858,7 +4858,6 @@
 	{
 		//CB Replace with direct call for now //emit HasTextSel();
 		m_Doc->scMW()->EnableTxEdit();
-
 	}
 	else
 	{

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23120&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp	(original)
+++ trunk/Scribus/scribus/scribus.cpp	Fri Aug  9 02:28:29 2019
@@ -2320,13 +2320,12 @@
 	QMdiArea* qwsp = nullptr;
 	if (requiresGUI)
 		qwsp = mdiArea;
+
 	ScribusWin* w = new ScribusWin(qwsp, tempDoc);
 	w->setMainWindow(this);
 	if (requiresGUI && view!=nullptr)
-	{
 		actionManager->disconnectNewViewActions();
-		disconnect(view, SIGNAL(signalGuideInformation(int, qreal)), alignDistributePalette, SLOT(setGuide(int, qreal)));
-	}
+
 	ScribusView* tempView = new ScribusView(w, this, tempDoc);
 	if (requiresGUI)
 		view = tempView;
@@ -2358,10 +2357,7 @@
 	tempView->reformPages(true);
 	//>>
 	if (requiresGUI)
-	{
 		w->setSubWin(mdiArea->addSubWindow(w));
-			connect(tempView, SIGNAL(signalGuideInformation(int,qreal)), alignDistributePalette, SLOT(setGuide(int,qreal)));
-	}
 	//Independent finishing tasks after tempDoc setup
 	if (showView)
 	{
@@ -2576,7 +2572,6 @@
 	if (view!=nullptr)
 	{
 		actionManager->disconnectNewViewActions();
-		disconnect(view, SIGNAL(signalGuideInformation(int, qreal)), alignDistributePalette, SLOT(setGuide(int, qreal)));
 		if (ScCore->usingGUI())
 			doc->m_Selection->disconnect(SIGNAL(selectionIsMultiple(bool)));
 	}
@@ -2587,7 +2582,6 @@
 	actionManager->connectNewViewActions(view);
 	actionManager->disconnectNewDocActions();
 	actionManager->connectNewDocActions(doc);
-	connect(view, SIGNAL(signalGuideInformation(int,qreal)), alignDistributePalette, SLOT(setGuide(int,qreal)));
 	if (ScCore->usingGUI())
 		connect(doc->m_Selection, SIGNAL(selectionIsMultiple(bool)), actionManager, SLOT( handleMultipleSelections(bool)));
 	pagePalette->setView(view);
@@ -2738,29 +2732,19 @@
 	connect(view->horizRuler, SIGNAL(DocChanged(bool)), this, SLOT(slotDocCh(bool)), Qt::UniqueConnection);
 	connect(view, SIGNAL(ClipPo(double,double)), nodePalette, SLOT(SetXY(double,double)), Qt::UniqueConnection);
 	connect(view, SIGNAL(PolyOpen()), nodePalette, SLOT(IsOpen()), Qt::UniqueConnection);
-	connect(view, SIGNAL(PStatus(int,uint)), nodePalette, SLOT(PolyStatus(int,uint)), Qt::UniqueConnection);
 	connect(view, SIGNAL(ItemGeom()), propertiesPalette->xyzPal, SLOT(handleSelectionChanged()), Qt::UniqueConnection);
 	connect(view, SIGNAL(ChBMText(PageItem*)), this, SLOT(BookMarkTxT(PageItem*)), Qt::UniqueConnection);
 	connect(view, SIGNAL(HaveSel()), this, SLOT(HaveNewSel()), Qt::UniqueConnection);
-	connect(view, SIGNAL(PaintingDone()), this, SLOT(slotSelect()), Qt::UniqueConnection);
 	connect(view, SIGNAL(DocChanged()), this, SLOT(slotDocCh()), Qt::UniqueConnection);
 	connect(view, SIGNAL(MousePos(double,double)), this, SLOT(setStatusBarMousePosition(double,double)), Qt::UniqueConnection);
 	connect(view, SIGNAL(ItemCharStyle(const CharStyle&)), textPalette->textPal, SLOT(updateCharStyle(const CharStyle&)), Qt::UniqueConnection);
 	connect(view, SIGNAL(ItemTextEffects(int)), this, SLOT(setStyleEffects(int)), Qt::UniqueConnection);
 	connect(view, SIGNAL(ItemTextAlign(int)), this, SLOT(setAlignmentValue(int)), Qt::UniqueConnection);
-	connect(view, SIGNAL(HasTextSel()), this, SLOT(EnableTxEdit()), Qt::UniqueConnection);
-	connect(view, SIGNAL(HasNoTextSel()), this, SLOT(DisableTxEdit()), Qt::UniqueConnection);
-	connect(view, SIGNAL(CopyItem()), this, SLOT(slotEditCopy()), Qt::UniqueConnection);
-	connect(view, SIGNAL(CutItem()), this, SLOT(slotEditCut()), Qt::UniqueConnection);
 	connect(view, SIGNAL(LoadPic()), this, SLOT(slotGetContent()), Qt::UniqueConnection);
 	connect(view, SIGNAL(StatusPic()), this, SLOT(StatusPic()), Qt::UniqueConnection);
-	connect(view, SIGNAL(AppendText()), this, SLOT(slotFileAppend()), Qt::UniqueConnection);
-	connect(view, SIGNAL(AnnotProps()), this, SLOT(ModifyAnnot()), Qt::UniqueConnection);
 	connect(view, SIGNAL(LoadElem(QString,double,double,bool,bool,ScribusDoc*,ScribusView*)), this, SLOT(slotElemRead(QString,double,double,bool,bool,ScribusDoc*,ScribusView*)), Qt::UniqueConnection);
 	connect(view, SIGNAL(AddBM(PageItem*)), this, SLOT(AddBookMark(PageItem*)), Qt::UniqueConnection);
 	connect(view, SIGNAL(DelBM(PageItem*)), this, SLOT(DelBookMark(PageItem*)), Qt::UniqueConnection);
-	connect(view, SIGNAL(DoGroup()), this, SLOT(GroupObj()), Qt::UniqueConnection);
-	connect(view, SIGNAL(callGimp()), this, SLOT(callImageEditor()), Qt::UniqueConnection);
 }
 
 void ScribusMainWindow::HaveNewSel()
@@ -3537,11 +3521,8 @@
 			m_prefsManager.appPrefs.fontPrefs.AvailFonts.addScalableFonts(fi.absolutePath()+"/Document fonts", filename);
 		m_prefsManager.appPrefs.fontPrefs.AvailFonts.updateFontMap();
 		if (view != nullptr)
-		{
 			actionManager->disconnectNewViewActions();
-			disconnect(view, SIGNAL(signalGuideInformation(int, qreal)), alignDistributePalette, SLOT(setGuide(int, qreal)));
-		}
-		doc=new ScribusDoc();
+		doc = new ScribusDoc();
 		doc->saveFilePermissions(QFile::permissions(fileName));
 		doc->is12doc=is12doc;
 		doc->appMode = modeNormal;
@@ -4303,11 +4284,10 @@
 {
 	slotEndSpecialEdit();
 	view->Deselect(false);
-	if (doc==storyEditor->currentDocument())
+	if (doc == storyEditor->currentDocument())
 		storyEditor->close();
 	actionManager->disconnectNewDocActions();
 	actionManager->disconnectNewViewActions();
-	disconnect(view, SIGNAL(signalGuideInformation(int, qreal)), alignDistributePalette, SLOT(setGuide(int, qreal)));
 	m_undoManager->removeStack(doc->documentFileName());
 	closeActiveWindowMasterPageEditor();
 	slotSelect();

Modified: trunk/Scribus/scribus/scribusview.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23120&path=/trunk/Scribus/scribus/scribusview.h
==============================================================================
--- trunk/Scribus/scribus/scribusview.h	(original)
+++ trunk/Scribus/scribus/scribusview.h	Fri Aug  9 02:28:29 2019
@@ -343,20 +343,11 @@
 	void DocChanged();
 	void ItemGeom();
 	void PolyOpen();
-	void PStatus(int, uint);
 	void ItemCharStyle(const CharStyle&);
 	void ItemTextAlign(int);
 	void ItemTextEffects(int);
-	void HasTextSel();
-	void HasNoTextSel();
-	void PaintingDone();
 	void LoadPic();
 	void StatusPic();
-	void AppendText();
-	void DoGroup();
-	void CutItem();
-	void CopyItem();
-	void Amode(int);
 	void AddBM(PageItem *);
 	void DelBM(PageItem *);
 	void ChBMText(PageItem *);
@@ -364,10 +355,7 @@
 	void HavePoint(bool, bool);
 	void ClipPo(double, double);
 	void PolyStatus(int, uint);
-	void AnnotProps();
 	void MousePos(double, double);
-	void callGimp();
-	void signalGuideInformation(int, qreal);
 };
 
 




More information about the scribus-commit mailing list