poppler/poppler-0.67.0-qt4-const.patch

169 lines
6.3 KiB
Diff
Raw Normal View History

2018-08-14 00:32:06 +00:00
--- poppler-0.67.0/qt4/src/poppler-document.cc.orig 2018-08-08 10:13:17.130028069 +0200
+++ poppler-0.67.0/qt4/src/poppler-document.cc 2018-08-08 11:14:58.301690615 +0200
@@ -605,7 +605,7 @@ namespace Poppler {
if ( !outline )
return NULL;
- GooList * items = outline->getItems();
+ const GooList * items = outline->getItems();
if ( !items || items->getLength() < 1 )
return NULL;
@@ -799,7 +799,7 @@ namespace Poppler {
return Document::NoForm; // make gcc happy
}
- QDateTime convertDate( char *dateString )
+ QDateTime convertDate( const char *dateString )
{
int year, mon, day, hour, min, sec, tzHours, tzMins;
char tz;
@@ -830,6 +830,12 @@ namespace Poppler {
return QDateTime();
}
+ QDateTime convertDate( char *dateString )
+ {
+ return convertDate( (const char *) dateString );
+ }
+
+
bool isCmsAvailable()
{
#if defined(USE_CMS)
--- poppler-0.67.0/qt4/src/poppler-embeddedfile.cc.orig 2018-08-08 10:13:17.130028069 +0200
+++ poppler-0.67.0/qt4/src/poppler-embeddedfile.cc 2018-08-08 10:50:42.645723179 +0200
@@ -68,13 +68,13 @@ EmbeddedFile::~EmbeddedFile()
QString EmbeddedFile::name() const
{
- GooString *goo = m_embeddedFile->filespec->getFileName();
+ const GooString *goo = m_embeddedFile->filespec->getFileName();
return goo ? UnicodeParsedString(goo) : QString();
}
QString EmbeddedFile::description() const
{
- GooString *goo = m_embeddedFile->filespec->getDescription();
+ const GooString *goo = m_embeddedFile->filespec->getDescription();
return goo ? UnicodeParsedString(goo) : QString();
}
@@ -85,25 +85,25 @@ int EmbeddedFile::size() const
QDateTime EmbeddedFile::modDate() const
{
- GooString *goo = m_embeddedFile->embFile() ? m_embeddedFile->embFile()->modDate() : NULL;
+ const GooString *goo = m_embeddedFile->embFile() ? m_embeddedFile->embFile()->modDate() : NULL;
2019-01-25 19:05:03 +00:00
return goo ? convertDate(goo->c_str()) : QDateTime();
2018-08-14 00:32:06 +00:00
}
QDateTime EmbeddedFile::createDate() const
{
- GooString *goo = m_embeddedFile->embFile() ? m_embeddedFile->embFile()->createDate() : NULL;
+ const GooString *goo = m_embeddedFile->embFile() ? m_embeddedFile->embFile()->createDate() : NULL;
2019-01-25 19:05:03 +00:00
return goo ? convertDate(goo->c_str()) : QDateTime();
2018-08-14 00:32:06 +00:00
}
QByteArray EmbeddedFile::checksum() const
{
- GooString *goo = m_embeddedFile->embFile() ? m_embeddedFile->embFile()->checksum() : NULL;
+ const GooString *goo = m_embeddedFile->embFile() ? m_embeddedFile->embFile()->checksum() : NULL;
2019-01-25 19:05:03 +00:00
return goo ? QByteArray::fromRawData(goo->c_str(), goo->getLength()) : QByteArray();
2018-08-14 00:32:06 +00:00
}
QString EmbeddedFile::mimeType() const
{
- GooString *goo = m_embeddedFile->embFile() ? m_embeddedFile->embFile()->mimeType() : NULL;
+ const GooString *goo = m_embeddedFile->embFile() ? m_embeddedFile->embFile()->mimeType() : NULL;
2019-01-25 19:05:03 +00:00
return goo ? QString(goo->c_str()) : QString();
2018-08-14 00:32:06 +00:00
}
--- poppler-0.67.0/qt4/src/poppler-movie.cc.orig 2018-08-08 10:13:17.131028077 +0200
+++ poppler-0.67.0/qt4/src/poppler-movie.cc 2018-08-08 10:52:41.284914743 +0200
@@ -57,7 +57,7 @@ MovieObject::MovieObject( AnnotMovie *an
m_movieData->m_movieObj = ann->getMovie()->copy();
//TODO: copy poster image
- MovieActivationParameters *mp = m_movieData->m_movieObj->getActivationParameters();
+ const MovieActivationParameters *mp = m_movieData->m_movieObj->getActivationParameters();
int width, height;
m_movieData->m_movieObj->getFloatingWindowSize(&width, &height);
m_movieData->m_size = QSize(width, height);
@@ -73,7 +73,7 @@ MovieObject::~MovieObject()
QString MovieObject::url() const
{
- GooString * goo = m_movieData->m_movieObj->getFileName();
+ const GooString * goo = m_movieData->m_movieObj->getFileName();
2019-01-25 19:05:03 +00:00
return goo ? QString( goo->c_str() ) : QString();
2018-08-14 00:32:06 +00:00
}
--- poppler-0.67.0/qt4/src/poppler-private.h.orig 2018-08-08 10:13:17.132028085 +0200
+++ poppler-0.67.0/qt4/src/poppler-private.h 2018-08-08 11:00:30.836672893 +0200
@@ -54,9 +54,9 @@ class FormWidget;
namespace Poppler {
/* borrowed from kpdf */
- QString unicodeToQString(Unicode* u, int len);
+ QString unicodeToQString(const Unicode* u, int len);
- QString UnicodeParsedString(GooString *s1);
+ QString UnicodeParsedString(const GooString *s1);
GooString *QStringToUnicodeGooString(const QString &s);
@@ -69,13 +69,13 @@ namespace Poppler {
class LinkDestinationData
{
public:
- LinkDestinationData( LinkDest *l, GooString *nd, Poppler::DocumentData *pdfdoc, bool external )
+ LinkDestinationData( const LinkDest *l, const GooString *nd, Poppler::DocumentData *pdfdoc, bool external )
: ld(l), namedDest(nd), doc(pdfdoc), externalDest(external)
{
}
- LinkDest *ld;
- GooString *namedDest;
+ const LinkDest *ld;
+ const GooString *namedDest;
Poppler::DocumentData *doc;
bool externalDest;
};
@@ -115,7 +115,7 @@ namespace Poppler {
~DocumentData();
- void addTocChildren( QDomDocument * docSyn, QDomNode * parent, GooList * items );
+ void addTocChildren( QDomDocument * docSyn, QDomNode * parent, const GooList * items );
void setPaperColor(const QColor &color)
{
--- poppler-0.67.0/qt4/src/poppler-qt4.h.orig 2018-08-08 10:13:17.133028093 +0200
+++ poppler-0.67.0/qt4/src/poppler-qt4.h 2018-08-08 10:29:23.807858790 +0200
@@ -1816,7 +1816,12 @@ height = dummy.height();
/**
Conversion from PDF date string format to QDateTime
*/
- POPPLER_QT4_EXPORT QDateTime convertDate( char *dateString );
+ POPPLER_QT4_EXPORT Q_DECL_DEPRECATED QDateTime convertDate( char *dateString );
+
+ /**
+ Conversion from PDF date string format to QDateTime
+ */
+ POPPLER_QT4_EXPORT QDateTime convertDate( const char *dateString );
/**
Whether the color management functions are available.
--- poppler-0.67.0/qt4/src/poppler-sound.cc.orig 2018-08-08 10:13:17.133028093 +0200
+++ poppler-0.67.0/qt4/src/poppler-sound.cc 2018-08-08 11:10:31.644004477 +0200
@@ -75,7 +75,7 @@ QString SoundObject::url() const
if ( m_soundData->m_type != SoundObject::External )
return QString();
- GooString * goo = m_soundData->m_soundObj->getFileName();
+ const GooString * goo = m_soundData->m_soundObj->getFileName();
2019-01-25 19:05:03 +00:00
return goo ? QString( goo->c_str() ) : QString();
2018-08-14 00:32:06 +00:00
}