r20218 by craig - #13183: Fix crash when you try to set a shortcut on one of the menu headings in keyboard shortcut prefs

scribus-commit scribus-commit at lists.scribus.net
Sun Jun 28 10:25:10 UTC 2015


Author: craig
Date: Sun Jun 28 10:25:10 2015
New Revision: 20218

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20218
Log:
#13183: Fix crash when you try to set a shortcut on one of the menu headings in keyboard shortcut prefs

Modified:
    trunk/Scribus/scribus/ui/prefs_keyboardshortcuts.cpp

Modified: trunk/Scribus/scribus/ui/prefs_keyboardshortcuts.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20218&path=/trunk/Scribus/scribus/ui/prefs_keyboardshortcuts.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_keyboardshortcuts.cpp (original)
+++ trunk/Scribus/scribus/ui/prefs_keyboardshortcuts.cpp Sun Jun 28 10:25:10 2015
@@ -38,8 +38,8 @@
 	QVector< QPair<QString, QStringList> >::Iterator itnmenua = defNonMenuActions->begin();
 	PluginManager& pluginManager(PluginManager::instance());
 	QStringList pluginNames(pluginManager.pluginNames(false));
-	ScPlugin* plugin;
-	ScActionPlugin* ixplug;
+	ScPlugin* plugin = NULL;
+	ScActionPlugin* ixplug = NULL;
 	QString pName;
 	for (int i = 0; i < pluginNames.count(); ++i)
 	{
@@ -344,6 +344,7 @@
 		lviToMenuMap.append(currMenuLVI);
 		currMenuLVI->setText(0, itmenu->first);
 		currMenuLVI->setExpanded(true);
+		currMenuLVI->setFlags(Qt::ItemIsEnabled);
 		prevMenuLVI=currMenuLVI;
 		first=true;
 		currLVI=0;
@@ -378,6 +379,7 @@
 		lviToMenuMap.append(currMenuLVI);
 		currMenuLVI->setText(0, itmenu->first);
 		currMenuLVI->setExpanded(true);
+		currMenuLVI->setFlags(Qt::ItemIsEnabled);
 		prevMenuLVI=currMenuLVI;
 		first=true;
 		currLVI=0;




More information about the scribus-commit mailing list