mirror of
https://invent.kde.org/graphics/okular
synced 2024-08-27 11:40:07 +00:00
Fix debug, QStandardpath
This commit is contained in:
parent
8f8b70d893
commit
f59383196d
|
@ -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 );
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
#include "converter.h"
|
||||
|
||||
#include <KAboutData>
|
||||
#include <KLocale>
|
||||
#include <kconfigdialog.h>
|
||||
#include <KLocalizedString>
|
||||
|
||||
static KAboutData createAboutData()
|
||||
{
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include <QtCore/QDebug>
|
||||
#include <QMimeType>
|
||||
#include <QMimeDatabase>
|
||||
#include <ktemporaryfile.h>
|
||||
#include <qtemporaryfile.h>
|
||||
#include <QDir>
|
||||
#include <KLocalizedString>
|
||||
|
||||
|
|
|
@ -37,8 +37,6 @@
|
|||
#include <core/area.h>
|
||||
#include <core/fileprinter.h>
|
||||
|
||||
const int XpsDebug = 4712;
|
||||
|
||||
static KAboutData createAboutData()
|
||||
{
|
||||
KAboutData aboutData(
|
||||
|
|
Loading…
Reference in a new issue