From 10a1899058898eeacc4e3064506825634d2c07ad Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Mon, 9 Feb 2015 22:03:44 +0100 Subject: [PATCH 1/6] Hack to restore KWallet support Better fix code-wise will come with an API break in master BUGS: 339170 --- core/document.cpp | 6 ++++++ core/document_p.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/core/document.cpp b/core/document.cpp index bdb380f98..3379886a2 100644 --- a/core/document.cpp +++ b/core/document.cpp @@ -909,6 +909,7 @@ 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; @@ -978,6 +979,8 @@ 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 hack just for 14.12 not to break API + m_walletGenerator = m_generator; m_generator = 0; qDeleteAll( m_pagesVector ); @@ -2560,6 +2563,7 @@ void Document::closeDocument() } d->m_generator = 0; d->m_generatorName = QString(); + d->m_walletGenerator = 0; d->m_url = KUrl(); d->m_docFileName = QString(); d->m_xmlFileName = QString(); @@ -4550,6 +4554,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 ); } } diff --git a/core/document_p.h b/core/document_p.h index 0f5c6b263..fda232750 100644 --- a/core/document_p.h +++ b/core/document_p.h @@ -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 m_loadedGenerators; Generator * m_generator; QString m_generatorName; + Generator * m_walletGenerator; bool m_generatorsLoaded; QVector< Page * > m_pagesVector; QVector< VisiblePageRect * > m_pageRects; From 5275d1271ffc5ea06f6770a809f83523d8779da4 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Mon, 9 Feb 2015 22:24:46 +0100 Subject: [PATCH 2/6] Justity the hack don't feel like breaking/expanding the API now --- core/document.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/document.cpp b/core/document.cpp index 3379886a2..9d1248871 100644 --- a/core/document.cpp +++ b/core/document.cpp @@ -979,7 +979,11 @@ 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 hack just for 14.12 not to break API + // 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; From 0c4ca94a0c27272e472c0a309b66d4b978823ea0 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Fri, 27 Feb 2015 01:22:09 +0100 Subject: [PATCH 3/6] Prepare for 0.21.3 --- VERSION | 2 +- core/version.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index a26469e8a..abb04316f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -okular v0.21.2 +okular v0.21.3 diff --git a/core/version.h b/core/version.h index 253b1cd0b..a6817f38c 100644 --- a/core/version.h +++ b/core/version.h @@ -10,10 +10,10 @@ #ifndef _OKULAR_VERSION_H_ #define _OKULAR_VERSION_H_ -#define OKULAR_VERSION_STRING "0.21.2" +#define OKULAR_VERSION_STRING "0.21.3" #define OKULAR_VERSION_MAJOR 0 #define OKULAR_VERSION_MINOR 21 -#define OKULAR_VERSION_RELEASE 2 +#define OKULAR_VERSION_RELEASE 3 #define OKULAR_MAKE_VERSION( a,b,c ) (((a) << 16) | ((b) << 8) | (c)) #define OKULAR_VERSION \ From 5a3d77a81b0a67b82ecdfce98abe392eec143b28 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Sun, 1 Mar 2015 16:02:52 +0100 Subject: [PATCH 4/6] Compile++ I've no idea why i need this for it to compile now, but kind of makes sense to follow the same pattern for all the phonon includes, so unify with the rest of includes in this file --- core/audioplayer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/audioplayer.cpp b/core/audioplayer.cpp index 3638040f6..ab735f3a4 100644 --- a/core/audioplayer.cpp +++ b/core/audioplayer.cpp @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include #include From 50116cf59fb44733f9c10844e29e43e41054a128 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Mon, 2 Mar 2015 23:38:06 +0100 Subject: [PATCH 5/6] Update for 15.04 Beta 1 SVN_SILENT --- VERSION | 2 +- core/version.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index 78927e95e..8c26d1d39 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -okular v0.21.60 +okular v0.21.80 diff --git a/core/version.h b/core/version.h index a962840e7..5cdd10c61 100644 --- a/core/version.h +++ b/core/version.h @@ -10,10 +10,10 @@ #ifndef _OKULAR_VERSION_H_ #define _OKULAR_VERSION_H_ -#define OKULAR_VERSION_STRING "0.21.60" +#define OKULAR_VERSION_STRING "0.21.80" #define OKULAR_VERSION_MAJOR 0 #define OKULAR_VERSION_MINOR 21 -#define OKULAR_VERSION_RELEASE 60 +#define OKULAR_VERSION_RELEASE 80 #define OKULAR_MAKE_VERSION( a,b,c ) (((a) << 16) | ((b) << 8) | (c)) #define OKULAR_VERSION \ From 7e954058d3345938644b35d7314cb3c24f897509 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Mon, 2 Mar 2015 23:39:07 +0100 Subject: [PATCH 6/6] Update for the next version in master --- VERSION | 2 +- core/version.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/VERSION b/VERSION index 8c26d1d39..6cae7d717 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -okular v0.21.80 +okular v0.22.60 diff --git a/core/version.h b/core/version.h index 5cdd10c61..6e64166c5 100644 --- a/core/version.h +++ b/core/version.h @@ -10,10 +10,10 @@ #ifndef _OKULAR_VERSION_H_ #define _OKULAR_VERSION_H_ -#define OKULAR_VERSION_STRING "0.21.80" +#define OKULAR_VERSION_STRING "0.22.60" #define OKULAR_VERSION_MAJOR 0 -#define OKULAR_VERSION_MINOR 21 -#define OKULAR_VERSION_RELEASE 80 +#define OKULAR_VERSION_MINOR 22 +#define OKULAR_VERSION_RELEASE 60 #define OKULAR_MAKE_VERSION( a,b,c ) (((a) << 16) | ((b) << 8) | (c)) #define OKULAR_VERSION \