[Okular-devel] Better separation of okular core library from the frontend

Bogdan Cristea cristeab at gmail.com
Sat Apr 28 20:19:06 UTC 2012


Hi

The latest sources for okular contain a call to Settings::instance() method in 
Part constructor which seems to be mandatory even when using only okular core 
library. Please ensure a better separation of okular core library from the 
frontend.

Below is the code snipped I use:

Settings::instance("");
Document doc(NULL);

With previous versions of okular the first line is not needed (the instance 
method does not even exist). Latest version use this call and the Document 
constructor needs an instance of the Settings class in order to continue. 

Same problem for the observers: I need to add a custom observer in order to 
check if the page has a pixmap

if(false == page->hasPixmap(MY_OBSERVER_ID, -1, -1))

and to make pixmap requests

PixmapRequest *pr = new PixmapRequest(MY_OBSERVER_ID, page->number(), page-
>width(), page->height(), 0, false);

Again, when using only the okular core library this seems pointless.

regards
-- 
Bogdan 


More information about the Okular-devel mailing list