mirror of
https://invent.kde.org/graphics/okular
synced 2024-10-02 14:14:10 +00:00
Merge remote-tracking branch 'origin/master' into frameworks
Conflicts: core/document.cpp core/version.h
This commit is contained in:
commit
04943508cf
|
@ -915,6 +915,8 @@ Document::OpenResult DocumentPrivate::openDocumentInternal( const KService::Ptr&
|
|||
{
|
||||
QString propName = offer->name();
|
||||
QHash< QString, GeneratorInfo >::const_iterator genIt = m_loadedGenerators.constFind( propName );
|
||||
QString catalogName;
|
||||
m_walletGenerator = 0;
|
||||
if ( genIt != m_loadedGenerators.constEnd() )
|
||||
{
|
||||
m_generator = genIt.value().generator;
|
||||
|
@ -976,6 +978,12 @@ Document::OpenResult DocumentPrivate::openDocumentInternal( const KService::Ptr&
|
|||
{
|
||||
m_generator->d_func()->m_document = 0;
|
||||
QObject::disconnect( m_generator, 0, m_parent, 0 );
|
||||
// TODO this is a bit of a hack, since basically means that
|
||||
// you can only call walletDataForFile after calling openDocument
|
||||
// but since in reality it's what happens I've decided not to refactor/break API
|
||||
// One solution is just kill walletDataForFile and make OpenResult be an object
|
||||
// where the wallet data is also returned when OpenNeedsPassword
|
||||
m_walletGenerator = m_generator;
|
||||
m_generator = 0;
|
||||
|
||||
qDeleteAll( m_pagesVector );
|
||||
|
@ -2562,6 +2570,7 @@ void Document::closeDocument()
|
|||
d->m_generator = 0;
|
||||
d->m_generatorName = QString();
|
||||
d->m_url = QUrl();
|
||||
d->m_walletGenerator = 0;
|
||||
d->m_docFileName = QString();
|
||||
d->m_xmlFileName = QString();
|
||||
delete d->m_tempFile;
|
||||
|
@ -4553,6 +4562,8 @@ void Document::walletDataForFile( const QString &fileName, QString *walletName,
|
|||
{
|
||||
if (d->m_generator) {
|
||||
d->m_generator->walletDataForFile( fileName, walletName, walletFolder, walletKey );
|
||||
} else if (d->m_walletGenerator) {
|
||||
d->m_walletGenerator->walletDataForFile( fileName, walletName, walletFolder, walletKey );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -92,6 +92,7 @@ class DocumentPrivate
|
|||
m_memCheckTimer( 0 ),
|
||||
m_saveBookmarksTimer( 0 ),
|
||||
m_generator( 0 ),
|
||||
m_walletGenerator( 0 ),
|
||||
m_generatorsLoaded( false ),
|
||||
m_pageController( 0 ),
|
||||
m_closingLoop( 0 ),
|
||||
|
@ -246,6 +247,7 @@ class DocumentPrivate
|
|||
QHash<QString, GeneratorInfo> m_loadedGenerators;
|
||||
Generator * m_generator;
|
||||
QString m_generatorName;
|
||||
Generator * m_walletGenerator;
|
||||
bool m_generatorsLoaded;
|
||||
QVector< Page * > m_pagesVector;
|
||||
QVector< VisiblePageRect * > m_pageRects;
|
||||
|
|
Loading…
Reference in a new issue