[rkward] rkward: Silence some warnings.

Thomas Friedrichsmeier null at kde.org
Fri Oct 19 15:38:09 BST 2018


Git commit 404dbc00a6c0c525fffba54a46a37e5e4e93ecc7 by Thomas Friedrichsmeier.
Committed on 19/10/2018 at 14:36.
Pushed by tfry into branch 'master'.

Silence some warnings.

M  +2    -2    rkward/misc/rkstandardactions.cpp
M  +1    -0    rkward/rbackend/rkwarddevice/rkgraphicsdevice.cpp

https://commits.kde.org/rkward/404dbc00a6c0c525fffba54a46a37e5e4e93ecc7

diff --git a/rkward/misc/rkstandardactions.cpp b/rkward/misc/rkstandardactions.cpp
index 27d6b2ab..c9214dd9 100644
--- a/rkward/misc/rkstandardactions.cpp
+++ b/rkward/misc/rkstandardactions.cpp
@@ -2,7 +2,7 @@
                           rkstandardactions  -  description
                              -------------------
     begin                : Sun Nov 18 2007
-    copyright            : (C) 2007-2016 by Thomas Friedrichsmeier
+    copyright            : (C) 2007-2018 by Thomas Friedrichsmeier
     email                : thomas.friedrichsmeier at kdemail.net
  ***************************************************************************/
 
@@ -83,7 +83,6 @@ public:
 		RK_TRACE (MISC);
 		provider = context_provider;
 		setText (i18n ("&Function reference"));
-		setShortcut (Qt::Key_F2);
 		connect (this, &QAction::triggered, this, &RKSearchRHelpAction::doSearch);
 	};
 public slots:
@@ -102,6 +101,7 @@ QAction* RKStandardActions::functionHelp (RKMDIWindow *window, RKScriptContextPr
 
 	QAction* ret = new RKSearchRHelpAction (window, context_provider);
 	window->standardActionCollection ()->addAction ("function_reference", ret);
+	window->standardActionCollection ()->setDefaultShortcut (ret, Qt::Key_F2);
 	return ret;
 }
 
diff --git a/rkward/rbackend/rkwarddevice/rkgraphicsdevice.cpp b/rkward/rbackend/rkwarddevice/rkgraphicsdevice.cpp
index f5c4e3cc..88690f58 100644
--- a/rkward/rbackend/rkwarddevice/rkgraphicsdevice.cpp
+++ b/rkward/rbackend/rkwarddevice/rkgraphicsdevice.cpp
@@ -366,6 +366,7 @@ void RKGraphicsDevice::stopGettingEvents () {
 }
 
 bool RKGraphicsDevice::eventFilter (QObject *watched, QEvent *event) {
+	if (!view) return false; // view was killed, but events may still be pending
 	RK_ASSERT (watched == view);
 
 	if (interaction_opcode == RKDLocator) {



More information about the rkward-tracker mailing list