D13203: Add Typewriter annotation tool in Okular
Dileep Sankhla
noreply at phabricator.kde.org
Wed Jul 18 20:59:12 BST 2018
dileepsankhla added inline comments.
INLINE COMMENTS
> sander wrote in annots.cpp:182
> 1.) yes
>
> 2. You need to write a test that sets the HAVE_POPPLER_0_67 flag. Have a look at that CMakeLists.txt file. It contains calls to check_cxx_source_compiles. Each call contains a small C++ program and a HAVE_POPPLER_*** flag. The build system tries to compile the program, and if that works, then the flag is set. You need to write a new call that tests for your setTextColor method, and set the HAVE_POPPLER_0_67 flat.
I have added the following lines in generator/poppler/CMakeLists.txt:
check_cxx_source_compiles("
#include <poppler-qt5.h>
#include <QColor>
int main()
{
Poppler::TextAnnotation *annot = new Poppler::TextAnnotation( Poppler::TextAnnotation::InPlace );
annot->setTextColor(Qt::blue);
return 0;
}
" HAVE_POPPLER_0_67)
The typewriter text is created with the desired color but whenever I move the annotation, the text color falls back to "black". It means in ```PopplerAnnotationProxy::notifyModification```, ```ppl_txtann->setTextColor( okl_txtann->textColor() );``` is never get called. Why is this happening even after setting the flag in both CMakeLists.txt and annots.cpp?
REPOSITORY
R223 Okular
REVISION DETAIL
https://phabricator.kde.org/D13203
To: dileepsankhla, tobiasdeiminger
Cc: sander, ltoscano, ngraham, tobiasdeiminger, aacid, okular-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20180718/36c2e178/attachment.html>
More information about the Okular-devel
mailing list