summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2014-10-17 06:30:24 (GMT)
committerMontel Laurent <montel@kde.org>2014-10-17 06:30:24 (GMT)
commitf59383196de140c87e4158c62c848f03dcf62ee9 (patch)
tree213c15e7ea360d8e86c5dccad39dc5535b4bf8ac
parent8f8b70d893f29a8ac4015a02037deed0375fb660 (diff)
Fix debug, QStandardpath
-rw-r--r--generators/comicbook/unrar.cpp8
-rw-r--r--generators/epub/epubdocument.cpp7
-rw-r--r--generators/epub/epubdocument.h2
-rw-r--r--generators/epub/generator_epub.cpp2
-rw-r--r--generators/spectre/generator_ghostview.cpp2
-rw-r--r--generators/xps/generator_xps.cpp2
6 files changed, 11 insertions, 12 deletions
diff --git a/generators/comicbook/unrar.cpp b/generators/comicbook/unrar.cpp
index 0a4cdfd..7a32997 100644
--- a/generators/comicbook/unrar.cpp
+++ b/generators/comicbook/unrar.cpp
@@ -18,7 +18,6 @@
#include <QtCore/qloggingcategory.h>
#include <kglobal.h>
#include <KLocalizedString>
-#include <kstandarddirs.h>
#if !defined(Q_OS_WIN)
#include <KPty/kptyprocess.h>
#include <KPty/kptydevice.h>
@@ -28,6 +27,7 @@
#include "debug_comicbook.h"
#include <memory>
+#include <QStandardPaths>
struct UnrarHelper
{
@@ -63,11 +63,11 @@ static UnrarFlavour* detectUnrar( const QString &unrarPath )
UnrarHelper::UnrarHelper()
: kind( 0 )
{
- QString path = KStandardDirs::findExe( "unrar-nonfree" );
+ QString path = QStandardPaths::findExecutable( "unrar-nonfree" );
if ( path.isEmpty() )
- path = KStandardDirs::findExe( "unrar" );
+ path = QStandardPaths::findExecutable( "unrar" );
if ( path.isEmpty() )
- path = KStandardDirs::findExe( "rar" );
+ path = QStandardPaths::findExecutable( "rar" );
if ( !path.isEmpty() )
kind = detectUnrar( path );
diff --git a/generators/epub/epubdocument.cpp b/generators/epub/epubdocument.cpp
index 4a66616..719fcdf 100644
--- a/generators/epub/epubdocument.cpp
+++ b/generators/epub/epubdocument.cpp
@@ -11,10 +11,9 @@
#include <QTemporaryFile>
#include <QDir>
-#include <KDebug>
-
#include <QRegExp>
+Q_LOGGING_CATEGORY(OkularEpuDebug, "org.kde.okular.generators.epu")
using namespace Epub;
namespace {
@@ -107,8 +106,8 @@ QVariant EpubDocument::loadResource(int type, const QUrl &name)
}
case EpubDocument::MovieResource: {
QTemporaryFile *tmp = new QTemporaryFile(QString("%1/okrXXXXXX").arg(QDir::tempPath()),this);
- if(!tmp->open()) kWarning() << "EPUB : error creating temporary video file";
- if(tmp->write(data,size) == -1) kWarning() << "EPUB : error writing data" << tmp->errorString();
+ if(!tmp->open()) qCWarning(OkularEpuDebug) << "EPUB : error creating temporary video file";
+ if(tmp->write(data,size) == -1) qCWarning(OkularEpuDebug) << "EPUB : error writing data" << tmp->errorString();
tmp->flush();
resource.setValue(tmp->fileName());
break;
diff --git a/generators/epub/epubdocument.h b/generators/epub/epubdocument.h
index f0d55b0..88a4d0c 100644
--- a/generators/epub/epubdocument.h
+++ b/generators/epub/epubdocument.h
@@ -16,6 +16,7 @@
#include <QImage>
#include <kurl.h>
#include <epub.h>
+#include <QtCore/qloggingcategory.h>
namespace Epub {
@@ -46,4 +47,5 @@ namespace Epub {
};
}
+Q_DECLARE_LOGGING_CATEGORY(OkularEpuDebug)
#endif
diff --git a/generators/epub/generator_epub.cpp b/generators/epub/generator_epub.cpp
index 462ec34..79c220a 100644
--- a/generators/epub/generator_epub.cpp
+++ b/generators/epub/generator_epub.cpp
@@ -12,8 +12,8 @@
#include "converter.h"
#include <KAboutData>
-#include <KLocale>
#include <kconfigdialog.h>
+#include <KLocalizedString>
static KAboutData createAboutData()
{
diff --git a/generators/spectre/generator_ghostview.cpp b/generators/spectre/generator_ghostview.cpp
index ebb2ffc..d2c2d6c 100644
--- a/generators/spectre/generator_ghostview.cpp
+++ b/generators/spectre/generator_ghostview.cpp
@@ -22,7 +22,7 @@
#include <QtCore/QDebug>
#include <QMimeType>
#include <QMimeDatabase>
-#include <ktemporaryfile.h>
+#include <qtemporaryfile.h>
#include <QDir>
#include <KLocalizedString>
diff --git a/generators/xps/generator_xps.cpp b/generators/xps/generator_xps.cpp
index aac12ab..79220a7 100644
--- a/generators/xps/generator_xps.cpp
+++ b/generators/xps/generator_xps.cpp
@@ -37,8 +37,6 @@
#include <core/area.h>
#include <core/fileprinter.h>
-const int XpsDebug = 4712;
-
static KAboutData createAboutData()
{
KAboutData aboutData(