From be5abf2c749e808ac7e4317deb34f7e0df3f0882 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Thu, 14 Feb 2008 11:06:42 +0000 Subject: [PATCH] ok, fix in the proper way: always compile the manifest, and instead #ifdef the qca2 part in it svn path=/trunk/KDE/kdegraphics/okular/; revision=774915 --- generators/ooo/CMakeLists.txt | 6 +----- generators/ooo/manifest.cpp | 4 ++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/generators/ooo/CMakeLists.txt b/generators/ooo/CMakeLists.txt index 298ad0cd5..d152b3907 100644 --- a/generators/ooo/CMakeLists.txt +++ b/generators/ooo/CMakeLists.txt @@ -18,14 +18,10 @@ set(okularGenerator_ooo_PART_SRCS document.cpp formatproperty.cpp generator_ooo.cpp + manifest.cpp styleinformation.cpp styleparser.cpp ) -if (QCA2_FOUND) - set(okularGenerator_ooo_PART_SRCS ${okularGenerator_ooo_PART_SRCS} - manifest.cpp - ) -endif (QCA2_FOUND) kde4_add_plugin(okularGenerator_ooo ${okularGenerator_ooo_PART_SRCS}) diff --git a/generators/ooo/manifest.cpp b/generators/ooo/manifest.cpp index 1dc625a1f..0544a6802 100644 --- a/generators/ooo/manifest.cpp +++ b/generators/ooo/manifest.cpp @@ -301,6 +301,7 @@ void Manifest::savePasswordToWallet() void Manifest::checkPassword( ManifestEntry *entry, const QByteArray &fileData, QByteArray *decryptedData ) { +#ifdef QCA2 QCA::SymmetricKey key = QCA::PBKDF2( "sha1" ).makeKey( QCA::Hash( "sha1" ).hash( m_password.toLocal8Bit() ), QCA::InitializationVector( entry->salt() ), 16, //128 bit key @@ -328,6 +329,9 @@ void Manifest::checkPassword( ManifestEntry *entry, const QByteArray &fileData, } else { m_haveGoodPassword = false; } +#else + m_haveGoodPassword = false; +#endif } QByteArray Manifest::decryptFile( const QString &filename, const QByteArray &fileData )