Fixed konqueror crash related to pdf files. This resolves bug 2974.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/3/head
Michele Calgaro 6 years ago
parent 95ef0537a7
commit deb3e1e0eb
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -169,13 +169,12 @@ TQString Document::getInfo( const TQString & type ) const
int i;
Dict *infoDict = info.getDict();
if (
# if defined(HAVE_POPPLER_058)
infoDict->lookup( (char*)type.latin1() ).isString()
# else
infoDict->lookup( (char*)type.latin1(), &obj )->isString()
# endif
)
#if defined(HAVE_POPPLER_058)
obj = infoDict->lookup( (char*)type.latin1() );
#else
infoDict->lookup( (char*)type.latin1(), &obj );
#endif
if (!obj.isNull() && obj.isString())
{
s1 = obj.getString();
if ( ( s1->getChar(0) & 0xff ) == 0xfe && ( s1->getChar(1) & 0xff ) == 0xff )
@ -241,13 +240,12 @@ TQDateTime Document::getDate( const TQString & type ) const
Dict *infoDict = info.getDict();
TQString result;
if (
# if defined(HAVE_POPPLER_058)
infoDict->lookup( (char*)type.latin1() ).isString()
# else
infoDict->lookup( (char*)type.latin1(), &obj )->isString()
# endif
)
#if defined(HAVE_POPPLER_058)
obj = infoDict->lookup( (char*)type.latin1() );
#else
infoDict->lookup( (char*)type.latin1(), &obj );
#endif
if (!obj.isNull() && obj.isString())
{
TQString s = UnicodeParsedString(obj.getString());
// TODO do something with the timezone information

Loading…
Cancel
Save