Commit 43cf8c8a authored by Stefan Brüns's avatar Stefan Brüns

[EPubGenerator] Fetch the application palette just once

Summary:
There is no reason to fetch the palette once per loop,
just do it once

Reviewers: #okular, ngraham

Reviewed By: ngraham

Subscribers: okular-devel

Tags: #okular

Differential Revision: https://phabricator.kde.org/D20947
parent f7fbbf76
...@@ -201,6 +201,14 @@ QTextDocument* Converter::convert( const QString &fileName ) ...@@ -201,6 +201,14 @@ QTextDocument* Converter::convert( const QString &fileName )
bool firstPage = true; bool firstPage = true;
QVector<Okular::MovieAnnotation *> movieAnnots; QVector<Okular::MovieAnnotation *> movieAnnots;
QVector<Okular::SoundAction *> soundActions; QVector<Okular::SoundAction *> soundActions;
// HACK BEGIN Get the links without CSS to be blue
// Remove if Qt ever gets fixed and the code in textdocumentgenerator.cpp works
const QPalette orig = qApp->palette();
QPalette p = orig;
p.setColor(QPalette::Link, Qt::blue);
// HACK END
const QSize videoSize(320, 240); const QSize videoSize(320, 240);
do{ do{
if(!epub_it_get_curr(it)) { if(!epub_it_get_curr(it)) {
...@@ -289,11 +297,7 @@ QTextDocument* Converter::convert( const QString &fileName ) ...@@ -289,11 +297,7 @@ QTextDocument* Converter::convert( const QString &fileName )
htmlContent = dom.toString(); htmlContent = dom.toString();
} }
// HACK BEGIN Get the links without CSS to be blue // HACK BEGIN
// Remove if Qt ever gets fixed and the code in textdocumentgenerator.cpp works
const QPalette orig = qApp->palette();
QPalette p = orig;
p.setColor(QPalette::Link, Qt::blue);
qApp->setPalette(p); qApp->setPalette(p);
// HACK END // HACK END
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment