mirror of
https://invent.kde.org/graphics/okular
synced 2024-08-27 11:40:07 +00:00
Merge remote-tracking branch 'origin/master' into dont-use-docdata-for-annots-and-forms
This commit is contained in:
commit
0da737a92b
|
@ -1,5 +1,7 @@
|
|||
@PACKAGE_INIT@
|
||||
|
||||
include(CMakeFindDependencyMacro)
|
||||
|
||||
find_dependency(Qt5Core @QT_REQUIRED_VERSION@)
|
||||
find_dependency(Qt5PrintSupport @QT_REQUIRED_VERSION@)
|
||||
find_dependency(Qt5Widgets @QT_REQUIRED_VERSION@)
|
||||
|
|
|
@ -38,6 +38,7 @@ GeneratorPrivate::GeneratorPrivate()
|
|||
m_closing( false ), m_closingLoop( nullptr ),
|
||||
m_dpi(72.0, 72.0)
|
||||
{
|
||||
qRegisterMetaType<Okular::Page*>();
|
||||
}
|
||||
|
||||
GeneratorPrivate::~GeneratorPrivate()
|
||||
|
@ -257,7 +258,8 @@ void Generator::generatePixmap( PixmapRequest *request )
|
|||
*/
|
||||
if ( hasFeature( TextExtraction ) && !request->page()->hasTextPage() && canGenerateTextPage() && !d->m_closing ) {
|
||||
d->mTextPageReady = false;
|
||||
d->textPageGenerationThread()->startGeneration( request->page() );
|
||||
// Queue the text generation request so that pixmap generation gets a chance to start before the text generation
|
||||
QMetaObject::invokeMethod(d->textPageGenerationThread(), "startGeneration", Qt::QueuedConnection, Q_ARG(Okular::Page*, request->page()));
|
||||
}
|
||||
|
||||
return;
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
class QEventLoop;
|
||||
class QMutex;
|
||||
|
||||
#include "page.h"
|
||||
|
||||
namespace Okular {
|
||||
|
||||
class DocumentObserver;
|
||||
|
@ -124,14 +126,15 @@ class TextPageGenerationThread : public QThread
|
|||
public:
|
||||
TextPageGenerationThread( Generator *generator );
|
||||
|
||||
void startGeneration( Page *page );
|
||||
|
||||
void endGeneration();
|
||||
|
||||
Page *page() const;
|
||||
|
||||
TextPage* textPage() const;
|
||||
|
||||
public slots:
|
||||
void startGeneration( Okular::Page *page );
|
||||
|
||||
protected:
|
||||
void run() override;
|
||||
|
||||
|
@ -166,4 +169,6 @@ class FontExtractionThread : public QThread
|
|||
|
||||
}
|
||||
|
||||
Q_DECLARE_METATYPE(Okular::Page*)
|
||||
|
||||
#endif
|
||||
|
|
|
@ -43,8 +43,6 @@ void PageController::imageRotationDone(const ThreadWeaver::JobPointer &j)
|
|||
|
||||
emit rotationFinished( job->page()->m_number, job->page()->m_page );
|
||||
}
|
||||
|
||||
job->deleteLater();
|
||||
}
|
||||
|
||||
#include "moc_pagecontroller_p.cpp"
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
"Name[sr@latin]": "Pozadina za Markdown",
|
||||
"Name[sr]": "Позадина за маркдаун",
|
||||
"Name[sv]": "Markdown-gränssnitt",
|
||||
"Name[tr]": "Markdown Arka Ucu",
|
||||
"Name[uk]": "Модуль Markdown",
|
||||
"Name[x-test]": "xxMarkdown Backendxx",
|
||||
"Name[zh_CN]": "Markdown 后端",
|
||||
|
|
|
@ -186,6 +186,7 @@ X-KDE-Keywords[sr@ijekavian]=Markdown,маркдаун
|
|||
X-KDE-Keywords[sr@ijekavianlatin]=Markdown,Markdown
|
||||
X-KDE-Keywords[sr@latin]=Markdown,Markdown
|
||||
X-KDE-Keywords[sv]=Markdown
|
||||
X-KDE-Keywords[tr]=Markdown
|
||||
X-KDE-Keywords[uk]=Markdown
|
||||
X-KDE-Keywords[x-test]=xxMarkdownxx
|
||||
X-KDE-Keywords[zh_CN]=Markdown
|
||||
|
|
|
@ -175,6 +175,7 @@ X-KDE-Keywords[sr@ijekavian]=Markdown,маркдаун
|
|||
X-KDE-Keywords[sr@ijekavianlatin]=Markdown,Markdown
|
||||
X-KDE-Keywords[sr@latin]=Markdown,Markdown
|
||||
X-KDE-Keywords[sv]=Markdown
|
||||
X-KDE-Keywords[tr]=Markdown
|
||||
X-KDE-Keywords[uk]=Markdown
|
||||
X-KDE-Keywords[x-test]=xxMarkdownxx
|
||||
X-KDE-Keywords[zh_CN]=Markdown
|
||||
|
|
|
@ -4257,6 +4257,9 @@ int PageView::viewColumns() const
|
|||
if (vm == Okular::Settings::EnumViewMode::Single) return 1;
|
||||
else if (vm == Okular::Settings::EnumViewMode::Facing ||
|
||||
vm == Okular::Settings::EnumViewMode::FacingFirstCentered) return 2;
|
||||
else if (vm == Okular::Settings::EnumViewMode::Summary
|
||||
&& d->document->pages() < Okular::Settings::viewColumns() )
|
||||
return d->document->pages();
|
||||
else return Okular::Settings::viewColumns();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue