summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Spendrin <ps_ml@gmx.de>2016-01-30 15:50:11 (GMT)
committerAleix Pol <aleixpol@kde.org>2016-01-30 15:51:46 (GMT)
commit37d562310266a85b21896cbe8ab333f0e7f680d5 (patch)
tree57d88febad2e70785b1f27f6d49f1df2f3153085
parentdb1c8ad75174e0eaf17f2202c915639bb5794e4e (diff)
Remove kdelibs4support from the generator plugins
This removes kdelibs4support for all generators except the mobipocket one. The test executable for kimgio needs some windows fixes too, so I'll try to make a separate review for that. REVIEW: 126375
-rw-r--r--CMakeLists.txt1
-rw-r--r--generators/comicbook/CMakeLists.txt2
-rw-r--r--generators/comicbook/unrar.cpp5
-rw-r--r--generators/djvu/CMakeLists.txt2
-rw-r--r--generators/djvu/generator_djvu.cpp1
-rw-r--r--generators/djvu/kdjvu.cpp27
-rw-r--r--generators/dvi/CMakeLists.txt2
-rw-r--r--generators/dvi/pageSize.cpp1
-rw-r--r--generators/epub/CMakeLists.txt2
-rw-r--r--generators/kimgio/CMakeLists.txt2
-rw-r--r--generators/kimgio/generator_kimgio.cpp1
-rw-r--r--generators/ooo/CMakeLists.txt2
-rw-r--r--generators/ooo/styleparser.cpp1
-rw-r--r--generators/poppler/CMakeLists.txt2
-rw-r--r--generators/poppler/generator_pdf.cpp1
-rw-r--r--generators/spectre/CMakeLists.txt2
-rw-r--r--generators/tiff/CMakeLists.txt2
-rw-r--r--generators/tiff/generator_tiff.cpp1
-rw-r--r--ui/guiutils.cpp5
-rw-r--r--ui/pagepainter.cpp1
20 files changed, 27 insertions, 36 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fa1ca9c..54dde09 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -38,6 +38,7 @@ find_package(KF5 ${KF5_REQUIRED_VERSION} REQUIRED COMPONENTS
Activities
Archive
Bookmarks
+ Completion
Config
ConfigWidgets
CoreAddons
diff --git a/generators/comicbook/CMakeLists.txt b/generators/comicbook/CMakeLists.txt
index 132f6ab..e4741b7 100644
--- a/generators/comicbook/CMakeLists.txt
+++ b/generators/comicbook/CMakeLists.txt
@@ -15,7 +15,7 @@ set( okularGenerator_comicbook_PART_SRCS
okular_add_generator(okularGenerator_comicbook ${okularGenerator_comicbook_PART_SRCS})
-target_link_libraries(okularGenerator_comicbook okularcore KF5::KIOCore KF5::I18n KF5::Archive KF5::KDELibs4Support)
+target_link_libraries(okularGenerator_comicbook okularcore KF5::KIOCore KF5::I18n KF5::Archive)
if (UNIX)
find_package(KF5 REQUIRED Pty)
target_link_libraries(okularGenerator_comicbook KF5::Pty)
diff --git a/generators/comicbook/unrar.cpp b/generators/comicbook/unrar.cpp
index 6290919..2feb41d 100644
--- a/generators/comicbook/unrar.cpp
+++ b/generators/comicbook/unrar.cpp
@@ -13,11 +13,10 @@
#include <QtCore/QFile>
#include <QtCore/QFileInfo>
#include <QtCore/QRegExp>
+#include <QtCore/QGlobalStatic>
#include <QTemporaryDir>
#include <QtCore/qloggingcategory.h>
-#include <kglobal.h>
-#include <KLocalizedString>
#if !defined(Q_OS_WIN)
#include <KPty/kptyprocess.h>
#include <KPty/kptydevice.h>
@@ -38,7 +37,7 @@ struct UnrarHelper
QString unrarPath;
};
-K_GLOBAL_STATIC( UnrarHelper, helper )
+Q_GLOBAL_STATIC( UnrarHelper, helper )
static UnrarFlavour* detectUnrar( const QString &unrarPath, const QString &versionCommand )
{
diff --git a/generators/djvu/CMakeLists.txt b/generators/djvu/CMakeLists.txt
index 0a1553d..6120505 100644
--- a/generators/djvu/CMakeLists.txt
+++ b/generators/djvu/CMakeLists.txt
@@ -15,7 +15,7 @@ set(okularGenerator_djvu_SRCS
okular_add_generator(okularGenerator_djvu ${okularGenerator_djvu_SRCS})
-target_link_libraries(okularGenerator_djvu okularcore ${DJVULIBRE_LIBRARY} KF5::KDELibs4Support)
+target_link_libraries(okularGenerator_djvu okularcore ${DJVULIBRE_LIBRARY} KF5::I18n)
########### install files ###############
diff --git a/generators/djvu/generator_djvu.cpp b/generators/djvu/generator_djvu.cpp
index f2d0008..2ef21fb 100644
--- a/generators/djvu/generator_djvu.cpp
+++ b/generators/djvu/generator_djvu.cpp
@@ -29,7 +29,6 @@
#include <QtCore/QDebug>
#include <KLocalizedString>
#include <qtemporaryfile.h>
-#include <KLocalizedString>
#include <QDir>
static void recurseCreateTOC( QDomDocument &maindoc, const QDomNode &parent, QDomNode &parentDestination, KDjVu *djvu )
diff --git a/generators/djvu/kdjvu.cpp b/generators/djvu/kdjvu.cpp
index 3a5b29e..990fcce 100644
--- a/generators/djvu/kdjvu.cpp
+++ b/generators/djvu/kdjvu.cpp
@@ -25,7 +25,6 @@
#include <libdjvu/miniexp.h>
#include <stdio.h>
-#include <KDebug>
QDebug &operator<<( QDebug & s, const ddjvu_rect_t &r )
{
@@ -36,22 +35,22 @@ QDebug &operator<<( QDebug & s, const ddjvu_rect_t &r )
static void which_ddjvu_message( const ddjvu_message_t *msg )
{
#ifdef KDJVU_DEBUG
- kDebug() << "which_djvu_message(...):" << msg->m_any.tag;
+ qDebug() << "which_djvu_message(...):" << msg->m_any.tag;
switch( msg->m_any.tag )
{
case DDJVU_ERROR:
- kDebug().nospace() << "ERROR: file " << msg->m_error.filename << ", line " << msg->m_error.lineno;
- kDebug().nospace() << "ERROR: function '" << msg->m_error.function << "'";
- kDebug().nospace() << "ERROR: '" << msg->m_error.message << "'";
+ qDebug().nospace() << "ERROR: file " << msg->m_error.filename << ", line " << msg->m_error.lineno;
+ qDebug().nospace() << "ERROR: function '" << msg->m_error.function << "'";
+ qDebug().nospace() << "ERROR: '" << msg->m_error.message << "'";
break;
case DDJVU_INFO:
- kDebug().nospace() << "INFO: '" << msg->m_info.message << "'";
+ qDebug().nospace() << "INFO: '" << msg->m_info.message << "'";
break;
case DDJVU_CHUNK:
- kDebug().nospace() << "CHUNK: '" << QByteArray( msg->m_chunk.chunkid ) << "'";
+ qDebug().nospace() << "CHUNK: '" << QByteArray( msg->m_chunk.chunkid ) << "'";
break;
case DDJVU_PROGRESS:
- kDebug().nospace() << "PROGRESS: '" << msg->m_progress.percent << "'";
+ qDebug().nospace() << "PROGRESS: '" << msg->m_progress.percent << "'";
break;
default: ;
}
@@ -478,7 +477,7 @@ QImage KDjVu::Private::generateImageTile( ddjvu_page_t *djvupage, int& res,
renderrect.w = realwidth;
renderrect.h = realheight;
#ifdef KDJVU_DEBUG
- kDebug() << "renderrect:" << renderrect;
+ qDebug() << "renderrect:" << renderrect;
#endif
ddjvu_rect_t pagerect;
pagerect.x = 0;
@@ -486,7 +485,7 @@ QImage KDjVu::Private::generateImageTile( ddjvu_page_t *djvupage, int& res,
pagerect.w = width;
pagerect.h = height;
#ifdef KDJVU_DEBUG
- kDebug() << "pagerect:" << pagerect;
+ qDebug() << "pagerect:" << pagerect;
#endif
handle_ddjvu_messages( m_djvu_cxt, false );
QImage res_img( realwidth, realheight, QImage::Format_RGB32 );
@@ -496,7 +495,7 @@ QImage KDjVu::Private::generateImageTile( ddjvu_page_t *djvupage, int& res,
res = ddjvu_page_render( djvupage, DDJVU_RENDER_COLOR,
&pagerect, &renderrect, m_format, res_img.bytesPerLine(), (char *)res_img.bits() );
#ifdef KDJVU_DEBUG
- kDebug() << "rendering result:" << res;
+ qDebug() << "rendering result:" << res;
#endif
handle_ddjvu_messages( m_djvu_cxt, false );
@@ -679,7 +678,7 @@ bool KDjVu::openFile( const QString & fileName )
return false;
}
- kDebug() << "# of pages:" << ddjvu_document_get_pagenum( d->m_djvu_document );
+ qDebug() << "# of pages:" << ddjvu_document_get_pagenum( d->m_djvu_document );
int numofpages = ddjvu_document_get_pagenum( d->m_djvu_document );
d->m_pages.clear();
d->m_pages.resize( numofpages );
@@ -723,7 +722,7 @@ bool KDjVu::openFile( const QString & fileName )
handle_ddjvu_messages( d->m_djvu_cxt, true );
if ( sts >= DDJVU_JOB_FAILED )
{
- kDebug().nospace() << "\t>>> page " << i << " failed: " << sts;
+ qDebug().nospace() << "\t>>> page " << i << " failed: " << sts;
return false;
}
@@ -1049,7 +1048,7 @@ bool KDjVu::exportAsPostScript( QFile* file, const QList<int>& pageList ) const
FILE* f = fdopen( file->handle(), "w+" );
if ( !f )
{
- kDebug() << "error while getting the FILE*";
+ qDebug() << "error while getting the FILE*";
return false;
}
diff --git a/generators/dvi/CMakeLists.txt b/generators/dvi/CMakeLists.txt
index 23bc627..801e507 100644
--- a/generators/dvi/CMakeLists.txt
+++ b/generators/dvi/CMakeLists.txt
@@ -48,7 +48,7 @@ set(okularGenerator_dvi_SRCS
okular_add_generator(okularGenerator_dvi ${okularGenerator_dvi_SRCS})
-target_link_libraries(okularGenerator_dvi okularcore KF5::I18n KF5::KDELibs4Support)
+target_link_libraries(okularGenerator_dvi okularcore KF5::I18n)
if (FREETYPE_FOUND)
target_link_libraries(okularGenerator_dvi ${FREETYPE_LIBRARIES})
endif (FREETYPE_FOUND)
diff --git a/generators/dvi/pageSize.cpp b/generators/dvi/pageSize.cpp
index fefedd5..73f13ed 100644
--- a/generators/dvi/pageSize.cpp
+++ b/generators/dvi/pageSize.cpp
@@ -12,7 +12,6 @@
#include "debug_dvi.h"
#include "length.h"
-#include <kglobal.h>
#include <KLocalizedString>
#include <QtCore/qloggingcategory.h>
diff --git a/generators/epub/CMakeLists.txt b/generators/epub/CMakeLists.txt
index 154b50a..8539b99 100644
--- a/generators/epub/CMakeLists.txt
+++ b/generators/epub/CMakeLists.txt
@@ -16,7 +16,7 @@ set(okularGenerator_epub_PART_SRCS
okular_add_generator(okularGenerator_epub ${okularGenerator_epub_PART_SRCS})
-target_link_libraries(okularGenerator_epub okularcore ${EPUB_LIBRARIES} KF5::KDELibs4Support Qt5::Widgets Qt5::Xml)
+target_link_libraries(okularGenerator_epub okularcore ${EPUB_LIBRARIES} KF5::I18n Qt5::Widgets Qt5::Xml)
########### install files ###############
diff --git a/generators/kimgio/CMakeLists.txt b/generators/kimgio/CMakeLists.txt
index 612d09b..1f62a96 100644
--- a/generators/kimgio/CMakeLists.txt
+++ b/generators/kimgio/CMakeLists.txt
@@ -8,7 +8,7 @@ include_directories(
set(okularGenerator_kimgio_PART_SRCS generator_kimgio.cpp )
add_library(okularGenerator_kimgio MODULE ${okularGenerator_kimgio_PART_SRCS})
-target_link_libraries(okularGenerator_kimgio okularcore KF5::KExiv2 KF5::KDELibs4Support)
+target_link_libraries(okularGenerator_kimgio okularcore KF5::KExiv2 KF5::I18n)
install(TARGETS okularGenerator_kimgio DESTINATION ${KDE_INSTALL_PLUGINDIR})
add_definitions( -DKDESRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/" )
diff --git a/generators/kimgio/generator_kimgio.cpp b/generators/kimgio/generator_kimgio.cpp
index 0a89a7c..2cb1a22 100644
--- a/generators/kimgio/generator_kimgio.cpp
+++ b/generators/kimgio/generator_kimgio.cpp
@@ -23,7 +23,6 @@
#include <qaction.h>
#include <kactioncollection.h>
#include <QIcon>
-#include <kimageio.h>
#include <KLocalizedString>
#include <kexiv2/kexiv2.h>
diff --git a/generators/ooo/CMakeLists.txt b/generators/ooo/CMakeLists.txt
index a402dfa..57404a8 100644
--- a/generators/ooo/CMakeLists.txt
+++ b/generators/ooo/CMakeLists.txt
@@ -27,7 +27,7 @@ set(okularGenerator_ooo_PART_SRCS
okular_add_generator(okularGenerator_ooo ${okularGenerator_ooo_PART_SRCS})
-target_link_libraries(okularGenerator_ooo okularcore KF5::KIOCore KF5::Archive KF5::I18n KF5::Wallet KF5::KDELibs4Support ${MATH_LIB} Qt5::Xml)
+target_link_libraries(okularGenerator_ooo okularcore KF5::KIOCore KF5::Archive KF5::I18n KF5::Wallet ${MATH_LIB} Qt5::Xml)
if (Qca-qt5_FOUND)
target_link_libraries(okularGenerator_ooo okularcore qca-qt5)
endif ()
diff --git a/generators/ooo/styleparser.cpp b/generators/ooo/styleparser.cpp
index 0547b84..4277a53 100644
--- a/generators/ooo/styleparser.cpp
+++ b/generators/ooo/styleparser.cpp
@@ -15,7 +15,6 @@
#include <QtXml/QDomElement>
#include <QtXml/QXmlSimpleReader>
-#include <kglobal.h>
#include <KLocalizedString>
#include "document.h"
diff --git a/generators/poppler/CMakeLists.txt b/generators/poppler/CMakeLists.txt
index 740b6fd..248825e 100644
--- a/generators/poppler/CMakeLists.txt
+++ b/generators/poppler/CMakeLists.txt
@@ -35,7 +35,7 @@ kconfig_add_kcfg_files(okularGenerator_poppler_PART_SRCS conf/pdfsettings.kcfgc
okular_add_generator(okularGenerator_poppler ${okularGenerator_poppler_PART_SRCS})
-target_link_libraries(okularGenerator_poppler ${POPPLER_LIBRARY} okularcore KF5::I18n KF5::KDELibs4Support Qt5::Xml)
+target_link_libraries(okularGenerator_poppler ${POPPLER_LIBRARY} okularcore KF5::I18n Qt5::Xml KF5::Completion)
########### install files ###############
diff --git a/generators/poppler/generator_pdf.cpp b/generators/poppler/generator_pdf.cpp
index bce7a56..1b4bccb 100644
--- a/generators/poppler/generator_pdf.cpp
+++ b/generators/poppler/generator_pdf.cpp
@@ -31,7 +31,6 @@
#include <kconfigdialog.h>
#include <KLocalizedString>
#include <kmessagebox.h>
-#include <kglobal.h>
#include <core/action.h>
#include <core/page.h>
diff --git a/generators/spectre/CMakeLists.txt b/generators/spectre/CMakeLists.txt
index 25883a8..89c52f5 100644
--- a/generators/spectre/CMakeLists.txt
+++ b/generators/spectre/CMakeLists.txt
@@ -23,7 +23,7 @@ kconfig_add_kcfg_files(okularGenerator_ghostview_SRCS conf/gssettings.kcfgc )
okular_add_generator(okularGenerator_ghostview MODULE ${okularGenerator_ghostview_SRCS})
-target_link_libraries(okularGenerator_ghostview okularcore ${LIBSPECTRE_LIBRARY} KF5::KDELibs4Support Qt5::Xml)
+target_link_libraries(okularGenerator_ghostview okularcore ${LIBSPECTRE_LIBRARY} KF5::I18n Qt5::Xml)
########### install files ###############
diff --git a/generators/tiff/CMakeLists.txt b/generators/tiff/CMakeLists.txt
index b451803..84ae45a 100644
--- a/generators/tiff/CMakeLists.txt
+++ b/generators/tiff/CMakeLists.txt
@@ -11,7 +11,7 @@ set(okularGenerator_tiff_SRCS
)
okular_add_generator(okularGenerator_tiff ${okularGenerator_tiff_SRCS})
-target_link_libraries(okularGenerator_tiff okularcore ${TIFF_LIBRARIES} KF5::KDELibs4Support)
+target_link_libraries(okularGenerator_tiff okularcore ${TIFF_LIBRARIES} KF5::I18n)
########### install files ###############
diff --git a/generators/tiff/generator_tiff.cpp b/generators/tiff/generator_tiff.cpp
index 3835cd3..b1f1f6f 100644
--- a/generators/tiff/generator_tiff.cpp
+++ b/generators/tiff/generator_tiff.cpp
@@ -20,7 +20,6 @@
#include <kaboutdata.h>
#include <QtCore/QDebug>
-#include <kglobal.h>
#include <KLocalizedString>
#include <core/document.h>
diff --git a/ui/guiutils.cpp b/ui/guiutils.cpp
index 379d1e6..821398e 100644
--- a/ui/guiutils.cpp
+++ b/ui/guiutils.cpp
@@ -13,7 +13,7 @@
#include <qpainter.h>
#include <qsvgrenderer.h>
#include <qtextdocument.h>
-#include <kfiledialog.h>
+#include <qfiledialog.h>
#include <kiconloader.h>
#include <kmessagebox.h>
#include <KLocalizedString>
@@ -204,8 +204,7 @@ KIconLoader* iconLoader()
void saveEmbeddedFile( Okular::EmbeddedFile *ef, QWidget *parent )
{
const QString caption = i18n( "Where do you want to save %1?", ef->name() );
- const QString path = KFileDialog::getSaveFileName( QUrl::fromLocalFile(ef->name()), QString(), parent, caption,
- KFileDialog::ConfirmOverwrite );
+ const QString path = QFileDialog::getSaveFileName( parent, caption, ef->name() );
if ( path.isEmpty() )
return;
diff --git a/ui/pagepainter.cpp b/ui/pagepainter.cpp
index 0c8443c..8758f7f 100644
--- a/ui/pagepainter.cpp
+++ b/ui/pagepainter.cpp
@@ -34,7 +34,6 @@
#include "core/observer.h"
#include "core/tile.h"
#include "settings_core.h"
-#include "core/document_p.h"
Q_GLOBAL_STATIC_WITH_ARGS( QPixmap, busyPixmap, ( KIconLoader::global()->loadIcon("okular", KIconLoader::NoGroup, 32, KIconLoader::DefaultState, QStringList(), 0, true) ) )