Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Graphics
Okular
Commits
cbddcd32
Commit
cbddcd32
authored
Sep 05, 2020
by
Albert Astals Cid
2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kwallet and kjs are mandatory in cmake anyway, remove ifdefs
parent
a05df764
Pipeline
#33187
passed with stage
in 10 minutes and 18 seconds
Changes
5
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
2 additions
and
27 deletions
+2
-27
CMakeLists.txt
CMakeLists.txt
+0
-7
core/generator.cpp
core/generator.cpp
+0
-4
core/scripter.cpp
core/scripter.cpp
+0
-6
generators/ooo/generator_ooo.cpp
generators/ooo/generator_ooo.cpp
+0
-4
part.cpp
part.cpp
+2
-6
No files found.
CMakeLists.txt
View file @
cbddcd32
...
...
@@ -112,13 +112,6 @@ find_package(KF5 ${KF5_REQUIRED_VERSION} REQUIRED COMPONENTS
Wallet
)
if
(
KF5Wallet_FOUND
)
add_definitions
(
-DWITH_KWALLET=1
)
endif
()
if
(
KF5JS_FOUND
)
add_definitions
(
-DWITH_KJS=1
)
endif
()
if
(
NOT WIN32 AND NOT ANDROID
)
find_package
(
KF5
${
KF5_REQUIRED_VERSION
}
REQUIRED COMPONENTS
Activities
...
...
core/generator.cpp
View file @
cbddcd32
...
...
@@ -25,9 +25,7 @@
#include <QMimeDatabase>
#include <QTimer>
#ifdef WITH_KWALLET
#include <KWallet>
#endif
#include "document.h"
#include "document_p.h"
...
...
@@ -398,11 +396,9 @@ bool Generator::exportTo(const QString &, const ExportFormat &)
void
Generator
::
walletDataForFile
(
const
QString
&
fileName
,
QString
*
walletName
,
QString
*
walletFolder
,
QString
*
walletKey
)
const
{
#ifdef WITH_KWALLET
*
walletKey
=
fileName
.
section
(
QLatin1Char
(
'/'
),
-
1
,
-
1
);
*
walletName
=
KWallet
::
Wallet
::
NetworkWallet
();
*
walletFolder
=
QStringLiteral
(
"KPdf"
);
#endif
}
bool
Generator
::
hasFeature
(
GeneratorFeature
feature
)
const
...
...
core/scripter.cpp
View file @
cbddcd32
...
...
@@ -22,17 +22,13 @@ class Okular::ScripterPrivate
public:
ScripterPrivate
(
DocumentPrivate
*
doc
)
:
m_doc
(
doc
)
#ifdef WITH_KJS
,
m_kjs
(
nullptr
)
#endif
,
m_event
(
nullptr
)
{
}
DocumentPrivate
*
m_doc
;
#ifdef WITH_KJS
QScopedPointer
<
ExecutorKJS
>
m_kjs
;
#endif
Event
*
m_event
;
};
...
...
@@ -49,7 +45,6 @@ Scripter::~Scripter()
void
Scripter
::
execute
(
ScriptType
type
,
const
QString
&
script
)
{
qCDebug
(
OkularCoreDebug
)
<<
"executing the script:"
;
#ifdef WITH_KJS
#if 0
if ( script.length() < 1000 )
qDebug() << script;
...
...
@@ -74,7 +69,6 @@ void Scripter::execute(ScriptType type, const QString &script)
}
d
->
m_kjs
->
execute
(
builtInScript
+
script
,
d
->
m_event
);
}
#endif
}
void
Scripter
::
setEvent
(
Event
*
event
)
...
...
generators/ooo/generator_ooo.cpp
View file @
cbddcd32
...
...
@@ -14,9 +14,7 @@
#include <KAboutData>
#include <KConfigDialog>
#include <KLocalizedString>
#ifdef WITH_KWALLET
#include <kwallet.h>
#endif
OKULAR_EXPORT_PLUGIN
(
KOOOGenerator
,
"libokularGenerator_ooo.json"
)
...
...
@@ -35,9 +33,7 @@ void KOOOGenerator::addPages(KConfigDialog *dlg)
void
KOOOGenerator
::
walletDataForFile
(
const
QString
&
fileName
,
QString
*
walletName
,
QString
*
walletFolder
,
QString
*
walletKey
)
const
{
*
walletKey
=
fileName
+
QStringLiteral
(
"/opendocument"
);
#ifdef WITH_KWALLET
*
walletName
=
KWallet
::
Wallet
::
LocalWallet
();
*
walletFolder
=
KWallet
::
Wallet
::
PasswordFolder
();
#endif
}
#include "generator_ooo.moc"
part.cpp
View file @
cbddcd32
...
...
@@ -67,13 +67,11 @@
#include <KStandardShortcut>
#include <KToggleAction>
#include <KToggleFullScreenAction>
#include <Kdelibs4ConfigMigrator>
#include <Kdelibs4Migration>
#ifdef WITH_KWALLET
#include <KWallet>
#endif
#include <KXMLGUIClient>
#include <KXMLGUIFactory>
#include <Kdelibs4ConfigMigrator>
#include <Kdelibs4Migration>
#if PURPOSE_FOUND
#include <Purpose/AlternativesModel>
...
...
@@ -1374,7 +1372,6 @@ Document::OpenResult Part::doOpenFile(const QMimeType &mimeA, const QString &fil
}
m_documentOpenWithPassword
=
false
;
#ifdef WITH_KWALLET
// if the file didn't open correctly it might be encrypted, so ask for a pass
QString
walletName
,
walletFolder
,
walletKey
;
m_document
->
walletDataForFile
(
fileNameToOpen
,
&
walletName
,
&
walletFolder
,
&
walletKey
);
...
...
@@ -1440,7 +1437,6 @@ Document::OpenResult Part::doOpenFile(const QMimeType &mimeA, const QString &fil
}
}
}
#endif
}
if
(
openResult
==
Document
::
OpenSuccess
)
{
...
...
Albert Astals Cid
@aacid
mentioned in commit
26971054
·
Sep 09, 2020
mentioned in commit
26971054
mentioned in commit 269710546263c50788875b5bef362582fa786146
Toggle commit list
Albert Astals Cid
@aacid
mentioned in merge request
!266 (merged)
·
Sep 09, 2020
mentioned in merge request
!266 (merged)
mentioned in merge request !266
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment