summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2014-10-05 05:39:08 (GMT)
committerMontel Laurent <montel@kde.org>2014-10-05 05:39:08 (GMT)
commit406ee919bfaa0b08aa976b032cd05fdd97c77996 (patch)
tree3dc4e504c8d38697256bfece54a72bbce960843b
parenta94b09684a1d7eb8734b39a846ba830602fe6571 (diff)
Reactivate code
-rw-r--r--generators/CMakeLists.txt6
-rw-r--r--generators/spectre/generator_ghostview.cpp8
-rw-r--r--generators/spectre/rendererthread.cpp3
3 files changed, 9 insertions, 8 deletions
diff --git a/generators/CMakeLists.txt b/generators/CMakeLists.txt
index ca5f3a9..f1ffb47 100644
--- a/generators/CMakeLists.txt
+++ b/generators/CMakeLists.txt
@@ -84,9 +84,9 @@ if(POPPLER_FOUND)
add_subdirectory(poppler)
endif(POPPLER_FOUND)
-#if(LIBSPECTRE_FOUND)
-# add_subdirectory(spectre)
-#endif(LIBSPECTRE_FOUND)
+if(LIBSPECTRE_FOUND)
+ add_subdirectory(spectre)
+endif(LIBSPECTRE_FOUND)
if(KF5KExiv2_FOUND)
add_subdirectory( kimgio )
diff --git a/generators/spectre/generator_ghostview.cpp b/generators/spectre/generator_ghostview.cpp
index 218fe06..1ee5a4b 100644
--- a/generators/spectre/generator_ghostview.cpp
+++ b/generators/spectre/generator_ghostview.cpp
@@ -23,6 +23,8 @@
#include <QMimeType>
#include <QMimeDatabase>
#include <ktemporaryfile.h>
+#include <KDebug>
+#include <QDir>
#include <core/document.h>
#include <core/page.h>
@@ -45,7 +47,7 @@ static KAboutData createAboutData()
i18n( "© 2007-2008 Albert Astals Cid" ),
i18n( "Based on the Spectre library." )
);
- aboutData.addAuthor( ki18n( "Albert Astals Cid" ), KLocalizedString(), "aacid@kde.org" );
+ aboutData.addAuthor( i18n( "Albert Astals Cid" ), QString(), QLatin1String("aacid@kde.org") );
return aboutData;
}
@@ -122,7 +124,7 @@ bool GSGenerator::print( QPrinter& printer )
return false;
SpectreExporter *exporter = spectre_exporter_new( m_internalDocument, exportFormat );
- SpectreStatus exportStatus = spectre_exporter_begin( exporter, tf.fileName().toAscii() );
+ SpectreStatus exportStatus = spectre_exporter_begin( exporter, tf.fileName().toLatin1().constData() );
int i = 0;
while ( i < pageList.count() && exportStatus == SPECTRE_STATUS_SUCCESS )
@@ -159,7 +161,7 @@ bool GSGenerator::loadDocument( const QString & fileName, QVector< Okular::Page
cache_AAgfx = documentMetaData("GraphicsAntialias", true).toBool();
m_internalDocument = spectre_document_new();
- spectre_document_load(m_internalDocument, QFile::encodeName(fileName));
+ spectre_document_load(m_internalDocument, QFile::encodeName(fileName).constData());
const SpectreStatus loadStatus = spectre_document_status(m_internalDocument);
if (loadStatus != SPECTRE_STATUS_SUCCESS)
{
diff --git a/generators/spectre/rendererthread.cpp b/generators/spectre/rendererthread.cpp
index 2e93d27..9fc91fc 100644
--- a/generators/spectre/rendererthread.cpp
+++ b/generators/spectre/rendererthread.cpp
@@ -12,6 +12,7 @@
#include <qimage.h>
#include <QtCore/QDebug>
+#include <KDebug>
#include "core/generator.h"
#include "core/page.h"
@@ -133,6 +134,4 @@ void GSRendererThread::run()
}
}
-#include "rendererthread.moc"
-
/* kate: replace-tabs on; indent-width 4; */