r20813 by jghali -
scribus-commit
scribus-commit at lists.scribus.net
Sat Jan 30 22:02:53 UTC 2016
Author: jghali
Date: Sat Jan 30 22:02:52 2016
New Revision: 20813
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20813
Log:
coverity #1350101: 'constant' variable guard dead code
Modified:
trunk/Scribus/scribus/plugins/gettext/docxim/docxim.cpp
Modified: trunk/Scribus/scribus/plugins/gettext/docxim/docxim.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20813&path=/trunk/Scribus/scribus/plugins/gettext/docxim/docxim.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/docxim/docxim.cpp (original)
+++ trunk/Scribus/scribus/plugins/gettext/docxim/docxim.cpp Sat Jan 30 22:02:52 2016
@@ -650,7 +650,6 @@
QString DocXIm::getFontName(QString name)
{
QString fontName = name;
- bool found = false;
SCFontsIterator it(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts);
for ( ; it.hasNext(); it.next())
{
@@ -676,24 +675,21 @@
}
}
}
- if (found)
- return fontName;
+
+ if (!PrefsManager::instance()->appPrefs.fontPrefs.GFontSub.contains(fontName))
+ {
+ qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
+ MissingFont *dia = new MissingFont(0, fontName, m_Doc);
+ dia->exec();
+ QString fontNameR = dia->getReplacementFont();
+ delete dia;
+ qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
+ PrefsManager::instance()->appPrefs.fontPrefs.GFontSub[fontName] = fontNameR;
+ fontName = fontNameR;
+ }
else
- {
- if (!PrefsManager::instance()->appPrefs.fontPrefs.GFontSub.contains(fontName))
- {
- qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
- MissingFont *dia = new MissingFont(0, fontName, m_Doc);
- dia->exec();
- QString fontNameR = dia->getReplacementFont();
- delete dia;
- qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
- PrefsManager::instance()->appPrefs.fontPrefs.GFontSub[fontName] = fontNameR;
- fontName = fontNameR;
- }
- else
- fontName = PrefsManager::instance()->appPrefs.fontPrefs.GFontSub[fontName];
- }
+ fontName = PrefsManager::instance()->appPrefs.fontPrefs.GFontSub[fontName];
+
return fontName;
}
More information about the scribus-commit
mailing list