Commit 37d56231 authored by Patrick Spendrin's avatar Patrick Spendrin Committed by Aleix Pol Gonzalez
Browse files

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
parent db1c8ad7
......@@ -38,6 +38,7 @@ find_package(KF5 ${KF5_REQUIRED_VERSION} REQUIRED COMPONENTS
Activities
Archive
Bookmarks
Completion
Config
ConfigWidgets
CoreAddons
......
......@@ -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)
......
......@@ -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 )
{
......
......@@ -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 ###############
......
......@@ -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 )
......
......@@ -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;
}
......
......@@ -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)
......
......@@ -12,7 +12,6 @@
#include "debug_dvi.h"
#include "length.h"
#include <kglobal.h>
#include <KLocalizedString>
#include <QtCore/qloggingcategory.h>
......
......@@ -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 ###############
......
......@@ -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}/" )
......
......@@ -23,7 +23,6 @@
#include <qaction.h>
#include <kactioncollection.h>
#include <QIcon>
#include <kimageio.h>
#include <KLocalizedString>
#include <kexiv2/kexiv2.h>
......
......@@ -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 ()
......
......@@ -15,7 +15,6 @@
#include <QtXml/QDomElement>
#include <QtXml/QXmlSimpleReader>
#include <kglobal.h>
#include <KLocalizedString>
#include "document.h"
......
......@@ -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 ###############
......
......@@ -31,7 +31,6 @@
#include <kconfigdialog.h>
#include <KLocalizedString>
#include <kmessagebox.h>
#include <kglobal.h>
#include <core/action.h>
#include <core/page.h>
......
......@@ -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 ###############
......
......@@ -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 ###############
......
......@@ -20,7 +20,6 @@
#include <kaboutdata.h>
#include <QtCore/QDebug>
#include <kglobal.h>
#include <KLocalizedString>
#include <core/document.h>
......
......@@ -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;
......
......@@ -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) ) )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment