<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/111681/">https://git.reviewboard.kde.org/r/111681/</a>
     </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On February 15th, 2014, 5:39 p.m. UTC, <b>Albert Astals Cid</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I'm going to hate myself for suggeting this but what about

diff --git a/generators/epub/converter.cpp b/generators/epub/converter.cpp
index 394d852..cea74f7 100644
--- a/generators/epub/converter.cpp
+++ b/generators/epub/converter.cpp
@@ -9,6 +9,7 @@
 
 #include "converter.h"
 
+#include <QApplication>
 #include <QtGui/QAbstractTextDocumentLayout>
 #include <QtGui/QTextDocument>
 #include <QtGui/QTextFrame>
@@ -287,6 +288,11 @@ QTextDocument* Converter::convert( const QString &fileName )
       }
 
       QTextBlock before;
+      // HAAAAAAAAACK
+      QPalette p = qApp->palette();
+      QPalette orig = p;
+      p.setColor(QPalette::Link, Qt::blue);
+      qApp->setPalette(p);
       if(firstPage) {
         // preHtml & postHtml make it possible to have a margin around the content of the page
         const QString preHtml = QString("<html><head></head><body>"
@@ -301,6 +307,8 @@ QTextDocument* Converter::convert( const QString &fileName )
         before = _cursor->block();
         _cursor->insertHtml(htmlContent);
       }
+      qApp->setPalette(orig);
+      // HAAAAAAAAACK
 
       QTextCursor csr(mTextDocument);   // a temporary cursor
       csr.movePosition(QTextCursor::Start);

?</pre>
 </blockquote>







</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Just replace the comments with some reasoning or ranting, maybe even a reference to a QT-BUG. Otherwise, this is probably the only way to make it ever work with Qt 4, so "ship it" from my side.

Is epub the only QTextDocument based format in Okular that supports links?</pre>
<br />










<p>- Christoph</p>


<br />
<p>On August 20th, 2013, 10:40 a.m. UTC, Christoph Feck wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for Okular.</div>
<div>By Christoph Feck.</div>


<p style="color: grey;"><i>Updated Aug. 20, 2013, 10:40 a.m.</i></p>







<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>


 <a href="http://bugs.kde.org/show_bug.cgi?id=253583">253583</a>, 

 <a href="http://bugs.kde.org/show_bug.cgi?id=322547">322547</a>


</div>



<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
okular
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">As indicated in bug 322547, some documents do not specify a text color, and probably assume the default text color to be black. QTextDocument, however, defaults to using the system text color.

This patch changes the default text color to Qt::black. It should affect epub, fb2, odt, and plain text generators.

I think it is better to use this approach instead of changing the paper color to use the system background color (see bug 253583), because

1) the document might specify a text color in some places,

2) the user is able to change the fg/bg colors anyway using Okular's Accessibility options, and those probably expect black on white.
</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I tested the document from bug 322547 comment #3.</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>core/textdocumentgenerator.cpp <span style="color: grey">(b260b3f)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/111681/diff/" style="margin-left: 3em;">View Diff</a></p>







  </td>
 </tr>
</table>








  </div>
 </body>
</html>