r21950 by craig - Coverity 1405377: Unhecked return value

scribus-commit scribus-commit at lists.scribus.net
Fri Apr 21 10:46:00 UTC 2017


Author: craig
Date: Fri Apr 21 10:46:00 2017
New Revision: 21950

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21950
Log:
Coverity 1405377: Unhecked return value

Modified:
    trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.cpp

Modified: trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21950&path=/trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.cpp	(original)
+++ trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.cpp	Fri Apr 21 10:46:00 2017
@@ -402,13 +402,11 @@
 	if (!PrefsManager::instance()->appPrefs.fontPrefs.GFontSub.contains(fontName))
 	{
 		qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
-		MissingFont *dia = new MissingFont(0, fontName, doc);
-		dia->exec();
-		QString fontNameR = dia->getReplacementFont();
-		delete dia;
+		MissingFont dia(0, fontName, doc);
+		dia.exec();
 		qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
-		PrefsManager::instance()->appPrefs.fontPrefs.GFontSub[fontName] = fontNameR;
-		fontName = fontNameR;
+		PrefsManager::instance()->appPrefs.fontPrefs.GFontSub[fontName] = dia.getReplacementFont();
+		fontName = dia.getReplacementFont();
 	}
 	else
 		fontName = PrefsManager::instance()->appPrefs.fontPrefs.GFontSub[fontName];




More information about the scribus-commit mailing list