summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin T. H. Sandsmark <martin.sandsmark@kde.org>2016-06-18 17:34:55 (GMT)
committerMartin T. H. Sandsmark <martin.sandsmark@kde.org>2016-06-18 17:34:55 (GMT)
commitb2ffcab0433b40d5bd9c5afdd63ea3fbf45c2ebf (patch)
tree3f1ff8a574468e08ed8f42a4e46acc3b170c493a
parent32b62e919a6493cca9d5d2b272872b53f9b5e41d (diff)
Fix build of mobipocket backend
-rw-r--r--generators/CMakeLists.txt7
-rw-r--r--generators/mobipocket/CMakeLists.txt2
-rw-r--r--generators/mobipocket/converter.cpp2
-rw-r--r--generators/mobipocket/generator_mobi.cpp2
4 files changed, 7 insertions, 6 deletions
diff --git a/generators/CMakeLists.txt b/generators/CMakeLists.txt
index f8edfe9..3a223ab 100644
--- a/generators/CMakeLists.txt
+++ b/generators/CMakeLists.txt
@@ -131,7 +131,6 @@ endif(EPUB_FOUND)
add_subdirectory(txt)
-message("KF5 enable mobipocket generator")
-#if(QMOBIPOCKET_FOUND)
-# add_subdirectory(mobipocket)
-#endif()
+if(QMOBIPOCKET_FOUND)
+ add_subdirectory(mobipocket)
+endif()
diff --git a/generators/mobipocket/CMakeLists.txt b/generators/mobipocket/CMakeLists.txt
index 61fbea4..141ba0d 100644
--- a/generators/mobipocket/CMakeLists.txt
+++ b/generators/mobipocket/CMakeLists.txt
@@ -10,7 +10,7 @@ set(okularGenerator_mobi_PART_SRCS
okular_add_generator(okularGenerator_mobi ${okularGenerator_mobi_PART_SRCS})
-target_link_libraries(okularGenerator_mobi okularcore Qt5::Gui ${QMOBIPOCKET_LIBRARIES})
+target_link_libraries(okularGenerator_mobi okularcore ${QMOBIPOCKET_LIBRARIES} KF5::I18n Qt5::Gui)
########### install files ###############
diff --git a/generators/mobipocket/converter.cpp b/generators/mobipocket/converter.cpp
index 36e7147..689ca9b 100644
--- a/generators/mobipocket/converter.cpp
+++ b/generators/mobipocket/converter.cpp
@@ -92,7 +92,7 @@ QTextDocument* Converter::convert( const QString &fileName )
it.next();
QUrl u(it.key());
// external or internal link
- if (!u.isRelative()) emit addAction(new Okular::BrowseAction(it.key()), it.value().first, it.value().second);
+ if (!u.isRelative()) emit addAction(new Okular::BrowseAction(QUrl(it.key())), it.value().first, it.value().second);
else {
// is there valid target?
if (!targets.contains( it.key() ) || !targets[it.key()].isValid()) continue;
diff --git a/generators/mobipocket/generator_mobi.cpp b/generators/mobipocket/generator_mobi.cpp
index 7cbad6c..5afb02e 100644
--- a/generators/mobipocket/generator_mobi.cpp
+++ b/generators/mobipocket/generator_mobi.cpp
@@ -27,3 +27,5 @@ void MobiGenerator::addPages( KConfigDialog* dlg )
dlg->addPage( widget, generalSettings(), i18n("Mobipocket"), "application-x-mobipocket-ebook", i18n("Mobipocket Backend Configuration") );
}
+
+#include "generator_mobi.moc"