r23981 by craig - #16191 related: Test removal of duplicate code. We can remove commented

scribus-commit scribus-commit at lists.scribus.net
Sun Aug 16 15:54:13 UTC 2020


Author: craig
Date: Sun Aug 16 15:54:13 2020
New Revision: 23981

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23981
Log:
#16191 related: Test removal of duplicate code. We can remove commented
code once confirmed ok

Modified:
    trunk/Scribus/scribus/canvasmode.h
    trunk/Scribus/scribus/scribus.cpp
    trunk/Scribus/scribus/scribus.h
    trunk/Scribus/scribus/scribusview.cpp
    trunk/Scribus/scribus/scribusview.h

Modified: trunk/Scribus/scribus/canvasmode.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23981&path=/trunk/Scribus/scribus/canvasmode.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode.h	(original)
+++ trunk/Scribus/scribus/canvasmode.h	Sun Aug 16 15:54:13 2020
@@ -150,7 +150,8 @@
 	virtual CanvasMode* delegate() { return nullptr; }
 	ScribusView* view() const { return m_view; }
 	~CanvasMode() override;
-	
+	void commonkeyPressEvent_NormalNodeEdit(QKeyEvent *e);
+	void commonkeyReleaseEvent(QKeyEvent *e);
 
 protected:
 	ScribusView* const m_view;
@@ -167,8 +168,7 @@
 	void commonDrawControls(QPainter* p, bool drawHandles);
 	/// Draws the text cursor for @a textframe, offset by @a offset.
 	void commonDrawTextCursor(QPainter* p, PageItem_TextFrame* textframe, const QPointF& offset);
-	void commonkeyPressEvent_NormalNodeEdit(QKeyEvent *e);
-	void commonkeyReleaseEvent(QKeyEvent *e);
+
 	
 private:
 	QMap<QString,QPen> m_pen;

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23981&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp	(original)
+++ trunk/Scribus/scribus/scribus.cpp	Sun Aug 16 15:54:13 2020
@@ -1951,7 +1951,7 @@
 	}
 	m_keyrep = false;
 }
-
+/*
 void ScribusMainWindow::keyReleaseEvent(QKeyEvent *k)
 {
 	//Exit out of panning mode if Control is release while the right mouse button is pressed
@@ -1993,7 +1993,7 @@
 			break;
 	}
 }
-
+*/
 void ScribusMainWindow::changeEvent(QEvent *e)
 {
 	if (e->type() == QEvent::LanguageChange)

Modified: trunk/Scribus/scribus/scribus.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23981&path=/trunk/Scribus/scribus/scribus.h
==============================================================================
--- trunk/Scribus/scribus/scribus.h	(original)
+++ trunk/Scribus/scribus/scribus.h	Sun Aug 16 15:54:13 2020
@@ -155,7 +155,7 @@
 	void changeEvent(QEvent *e);
 	void closeEvent(QCloseEvent *ce);
 	void keyPressEvent(QKeyEvent *k);
-	void keyReleaseEvent(QKeyEvent *k);
+	//void keyReleaseEvent(QKeyEvent *k);
 	void inputMethodEvent (QInputMethodEvent *event);
 	QVariant inputMethodQuery ( Qt::InputMethodQuery query ) const ;
 	void requestUpdate(int);

Modified: trunk/Scribus/scribus/scribusview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23981&path=/trunk/Scribus/scribus/scribusview.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusview.cpp	(original)
+++ trunk/Scribus/scribus/scribusview.cpp	Sun Aug 16 15:54:13 2020
@@ -3268,11 +3268,12 @@
 	else
 		m_ScMW->keyPressEvent(k);
 }
-
+/*
 void ScribusView::keyReleaseEvent(QKeyEvent *k)
 {
 	m_ScMW->keyReleaseEvent(k);
 }
+*/
 
 void ScribusView::inputMethodEvent ( QInputMethodEvent * event )
 {
@@ -3491,7 +3492,7 @@
 		if (m_canvasMode->handleKeyEvents())
 			m_canvasMode->keyReleaseEvent(m);
 		else
-			m_ScMW->keyReleaseEvent(m);
+			m_canvasMode->commonkeyReleaseEvent(m);
 		return true;
 	}
 	if (obj == widget() && event->type() == QEvent::DragEnter)

Modified: trunk/Scribus/scribus/scribusview.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23981&path=/trunk/Scribus/scribus/scribusview.h
==============================================================================
--- trunk/Scribus/scribus/scribusview.h	(original)
+++ trunk/Scribus/scribus/scribusview.h	Sun Aug 16 15:54:13 2020
@@ -317,7 +317,7 @@
 	virtual void changeEvent(QEvent *e);
 	void nativeGestureEvent(QNativeGestureEvent *e);
 	void keyPressEvent(QKeyEvent *k);
-	void keyReleaseEvent(QKeyEvent *k);
+//	void keyReleaseEvent(QKeyEvent *k);
 	void inputMethodEvent(QInputMethodEvent * event);
 	QVariant inputMethodQuery(Qt::InputMethodQuery query) const ;
 	




More information about the scribus-commit mailing list