The method 'showSourceLocation' has been extended with a new parameter which
controls whether the given source location is shown graphically. A new method
'clearLastShownSourceLocation' has been added; and a corresponding implementation
is provided.
This increases the UI responsiveness on opening PDF that are slow to render
This is because we can only have one thread using the pdf because of
poppler, if we do not queue this call, it will immediately try to generate
the pixmap for this page ending up in the thread for rendering being started.
But then while we are still opening the file we will ask if the file
has embedded files, and this means accessing poppler again and we will be
stuck there because the rendering thread has still not finished. This way by
delaying the execution until we return to the event loop we guarantee
all short queries that are done while opening the file are done already and
we won't block the UI
Since sometimes we even change the pdfdoc pointer itself ;-)
This was working previously by pure luck (read bug in poppler :D)
BUGS: 284464
FIXED-IN: 4.7.3
(cherry picked from commit eb705417fa)
In viewer mode the part will now use a different XML GUI file (part-viewermode.rc).
Also, some actions won't be created, e.g. those used for exporting stuff, for
launching presentation mode, or for selecting parts of the document. The captions
of the configuration dialogs also contain the word 'viewer' then.
The old code assumed the number of children would be
"-NUMBER "
while this file has
"-NUMBER/"
so what we do now is looping after the - until we find a non digit
All this code would better be done using a regexp and not that many section calls
but i did not want to touch it more than needed
BUGS: 283447
FIXED-IN: 4.7.3
(cherry picked from commit 83df127ac0)
This is done through a string "ConfigFileName=<file name>" which can be given to
the constructor in its argument list.
Note that the file ui/fileinterpreterpreview.cpp currently still contains a
reference to "okularrc", which we leave for now (as it just stores the size
of a dialog in that config file).