r23963 by jghali - Code style fixes

scribus-commit scribus-commit at lists.scribus.net
Wed Jul 29 22:49:05 UTC 2020


Author: jghali
Date: Wed Jul 29 22:49:05 2020
New Revision: 23963

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23963
Log:
Code style fixes

Modified:
    trunk/Scribus/scribus/scribus.cpp

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23963&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp	(original)
+++ trunk/Scribus/scribus/scribus.cpp	Wed Jul 29 22:49:05 2020
@@ -1696,8 +1696,9 @@
 {
 	if (e->type() == QEvent::ToolTip)
 		return (!m_prefsManager.appPrefs.displayPrefs.showToolTips);
+
 	bool retVal = false;
-	if ( e->type() == QEvent::KeyPress )
+	if (e->type() == QEvent::KeyPress)
 	{
 		QKeyEvent *k = dynamic_cast<QKeyEvent *>(e);
 		if (!k)
@@ -1713,35 +1714,31 @@
 		QKeySequence currKeySeq = QKeySequence(k->key() | keyMod);
 		if (QString(currKeySeq.toString()).isNull())
 			return false;
-		retVal=true;
+		retVal = true;
 		//Palette actions
 		if (actionManager->compareKeySeqToShortcut(currKeySeq, "specialToggleAllPalettes"))
 			scrActions["specialToggleAllPalettes"]->activate(QAction::Trigger);
-		else
-		if (actionManager->compareKeySeqToShortcut(currKeySeq, "specialToggleAllGuides"))
+		else if (actionManager->compareKeySeqToShortcut(currKeySeq, "specialToggleAllGuides"))
 			scrActions["specialToggleAllGuides"]->activate(QAction::Trigger);
 		else
-			retVal=false;
-	}
-	else
-	if ( e->type() == QEvent::KeyRelease )
+			retVal = false;
+	}
+	else if (e->type() == QEvent::KeyRelease)
 	{
 		QKeyEvent *k = dynamic_cast<QKeyEvent *>(e);
 		if (!k)
 			return false;
 #if defined(Q_OS_MAC)
-		if (k->key()==Qt::Key_QuoteLeft && k->modifiers() & Qt::ControlModifier)
+		if ((k->key() == Qt::Key_QuoteLeft) && (k->modifiers() & Qt::ControlModifier))
 		{
 			if (k->modifiers() & Qt::ShiftModifier)
 				mdiArea->activatePreviousSubWindow();
 			else
 				mdiArea->activateNextSubWindow();
-			retVal=true;
+			retVal = true;
 		}
 #endif
 	}
-	else
-		retVal=false;
 	//Return false to pass event to object
 	return retVal;
 }




More information about the scribus-commit mailing list