r18196 by fschmid - Fix a crash in the Mac Pict importer due to non existing codecs.
scribus-commit
scribus-commit at lists.scribus.net
Sun Mar 10 23:39:18 UTC 2013
Author: fschmid
Date: Sun Mar 10 23:39:17 2013
New Revision: 18196
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18196
Log:
Fix a crash in the Mac Pict importer due to non existing codecs.
Modified:
trunk/Scribus/scribus/plugins/import/pct/importpct.cpp
Modified: trunk/Scribus/scribus/plugins/import/pct/importpct.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18196&path=/trunk/Scribus/scribus/plugins/import/pct/importpct.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pct/importpct.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/pct/importpct.cpp Sun Mar 10 23:39:17 2013
@@ -1532,7 +1532,14 @@
void PctPlug::createTextPath(QByteArray textString)
{
+ QList<QByteArray> code = QTextCodec::availableCodecs();
QTextCodec *codec = QTextCodec::codecForName("Apple Roman");
+ if (!codec)
+ {
+ codec = QTextCodec::codecForName("macroman");
+ if (!codec)
+ return;
+ }
QString string = codec->toUnicode(textString);
QFont textFont;
if (!fontMap.contains(currentFontID))
More information about the scribus-commit
mailing list