port to qCDebug. Autogenerate export headers

This commit is contained in:
Montel Laurent 2014-10-27 22:35:06 +01:00
parent 8457b66b38
commit 5da7c5f77d
42 changed files with 134 additions and 209 deletions

View File

@ -172,6 +172,7 @@ ki18n_wrap_ui(okularcore_SRCS
kconfig_add_kcfg_files(okularcore_SRCS conf/settings_core.kcfgc )
add_library(okularcore SHARED ${okularcore_SRCS})
generate_export_header(okularcore BASE_NAME okularcore)
# Special handling for linking okularcore on OSX/Apple
IF(APPLE)
@ -273,6 +274,7 @@ message("KF5: Enable ui/tts.cpp again")
#qt5_add_dbus_interfaces(okularpart_SRCS ${KDE4_DBUS_INTERFACES_DIR}/org.kde.KSpeech.xml)
add_library(okularpart MODULE ${okularpart_SRCS})
generate_export_header(okularpart BASE_NAME okularpart)
target_link_libraries(okularpart okularcore Qt5::Svg KF5::Parts ${MATH_LIB} Phonon::phonon4qt5 KF5::Solid)

View File

@ -4,7 +4,7 @@ File=okular.kcfg
Inherits=SettingsCore
Mutators=true
Singleton=true
Visibility=OKULAR_PART_EXPORT
IncludeFiles=settings_core.h,okular_part_export.h
Visibility=OKULARPART_EXPORT
IncludeFiles=settings_core.h,okularpart_export.h
SourceIncludeFiles=qdom.h,QStandardPaths
MemberVariables=dpointer

View File

@ -3,6 +3,6 @@ NameSpace=Okular
File=okular_core.kcfg
Mutators=true
Singleton=true
Visibility=OKULAR_EXPORT
IncludeFiles=core/okular_export.h
Visibility=OKULARCORE_EXPORT
IncludeFiles=okularcore_export.h
MemberVariables=dpointer

View File

@ -11,7 +11,7 @@
#define _OKULAR_ACTION_H_
#include "global.h"
#include "okular_export.h"
#include "okularcore_export.h"
#include <QtCore/QString>
#include <QtCore/QVariant>
@ -40,7 +40,7 @@ class DocumentViewport;
* widgets to reimplement the 'actionType' method and return the type of
* the action described by the reimplemented class.
*/
class OKULAR_EXPORT Action
class OKULARCORE_EXPORT Action
{
public:
/**
@ -112,7 +112,7 @@ class OKULAR_EXPORT Action
* The Goto action changes the viewport to another page
* or loads an external document.
*/
class OKULAR_EXPORT GotoAction : public Action
class OKULARCORE_EXPORT GotoAction : public Action
{
public:
/**
@ -178,7 +178,7 @@ class OKULAR_EXPORT GotoAction : public Action
/**
* The Execute action executes an external application.
*/
class OKULAR_EXPORT ExecuteAction : public Action
class OKULARCORE_EXPORT ExecuteAction : public Action
{
public:
/**
@ -223,7 +223,7 @@ class OKULAR_EXPORT ExecuteAction : public Action
* The Browse action browses an url by opening a web browser or
* email client, depedning on the url protocol (e.g. http, mailto, etc.).
*/
class OKULAR_EXPORT BrowseAction : public Action
class OKULARCORE_EXPORT BrowseAction : public Action
{
public:
/**
@ -262,7 +262,7 @@ class OKULAR_EXPORT BrowseAction : public Action
* The DocumentAction action contains an action that is performed on
* the current document.
*/
class OKULAR_EXPORT DocumentAction : public Action
class OKULARCORE_EXPORT DocumentAction : public Action
{
public:
/**
@ -320,7 +320,7 @@ class OKULAR_EXPORT DocumentAction : public Action
/**
* The Sound action plays a sound on activation.
*/
class OKULAR_EXPORT SoundAction : public Action
class OKULARCORE_EXPORT SoundAction : public Action
{
public:
/**
@ -384,7 +384,7 @@ class OKULAR_EXPORT SoundAction : public Action
*
* @since 0.7 (KDE 4.1)
*/
class OKULAR_EXPORT ScriptAction : public Action
class OKULARCORE_EXPORT ScriptAction : public Action
{
public:
/**
@ -429,7 +429,7 @@ class OKULAR_EXPORT ScriptAction : public Action
*
* @since 0.15 (KDE 4.9)
*/
class OKULAR_EXPORT MovieAction : public Action
class OKULARCORE_EXPORT MovieAction : public Action
{
public:
/**
@ -488,7 +488,7 @@ class OKULAR_EXPORT MovieAction : public Action
*
* @since 0.16 (KDE 4.10)
*/
class OKULAR_EXPORT RenditionAction : public Action
class OKULARCORE_EXPORT RenditionAction : public Action
{
public:
/**

View File

@ -18,7 +18,7 @@
#include <QtXml/QDomDocument>
#include <QtXml/QDomElement>
#include "okular_export.h"
#include "okularcore_export.h"
#include "area.h"
namespace Okular {
@ -49,7 +49,7 @@ class WidgetAnnotationPrivate;
/**
* @short Helper class for (recursive) annotation retrieval/storage.
*/
class OKULAR_EXPORT AnnotationUtils
class OKULARCORE_EXPORT AnnotationUtils
{
public:
/**
@ -87,7 +87,7 @@ class OKULAR_EXPORT AnnotationUtils
* An Annotation is an object (text note, highlight, sound, popup window, ..)
* contained by a Page in the document.
*/
class OKULAR_EXPORT Annotation
class OKULARCORE_EXPORT Annotation
{
/// @cond PRIVATE
friend class AnnotationObjectRect;
@ -302,7 +302,7 @@ class OKULAR_EXPORT Annotation
* The Style class contains all information about style of the
* annotation.
*/
class OKULAR_EXPORT Style
class OKULARCORE_EXPORT Style
{
public:
/**
@ -437,7 +437,7 @@ class OKULAR_EXPORT Annotation
* The Window class contains all information about the popup window
* of the annotation that is used to edit the content and properties.
*/
class OKULAR_EXPORT Window
class OKULARCORE_EXPORT Window
{
public:
/**
@ -683,7 +683,7 @@ class OKULAR_EXPORT Annotation
*
* @since 0.15 (KDE 4.9)
*/
class OKULAR_EXPORT AnnotationProxy
class OKULARCORE_EXPORT AnnotationProxy
{
public:
enum Capability
@ -728,7 +728,7 @@ class OKULAR_EXPORT AnnotationProxy
virtual void notifyRemoval( Annotation *annotation, int page ) = 0;
};
class OKULAR_EXPORT TextAnnotation : public Annotation
class OKULARCORE_EXPORT TextAnnotation : public Annotation
{
public:
/**
@ -853,7 +853,7 @@ class OKULAR_EXPORT TextAnnotation : public Annotation
Q_DISABLE_COPY( TextAnnotation )
};
class OKULAR_EXPORT LineAnnotation : public Annotation
class OKULARCORE_EXPORT LineAnnotation : public Annotation
{
public:
/**
@ -1013,7 +1013,7 @@ class OKULAR_EXPORT LineAnnotation : public Annotation
Q_DISABLE_COPY( LineAnnotation )
};
class OKULAR_EXPORT GeomAnnotation : public Annotation
class OKULARCORE_EXPORT GeomAnnotation : public Annotation
{
public:
// common enums
@ -1075,7 +1075,7 @@ class OKULAR_EXPORT GeomAnnotation : public Annotation
Q_DISABLE_COPY( GeomAnnotation )
};
class OKULAR_EXPORT HighlightAnnotation : public Annotation
class OKULARCORE_EXPORT HighlightAnnotation : public Annotation
{
public:
/**
@ -1119,7 +1119,7 @@ class OKULAR_EXPORT HighlightAnnotation : public Annotation
* The Quad class contains 8 coordinates and style definitions
* which describe a line part of the whole highlight annotation.
*/
class OKULAR_EXPORT Quad
class OKULARCORE_EXPORT Quad
{
public:
/**
@ -1218,7 +1218,7 @@ class OKULAR_EXPORT HighlightAnnotation : public Annotation
Q_DISABLE_COPY( HighlightAnnotation )
};
class OKULAR_EXPORT StampAnnotation : public Annotation
class OKULARCORE_EXPORT StampAnnotation : public Annotation
{
public:
/**
@ -1262,7 +1262,7 @@ class OKULAR_EXPORT StampAnnotation : public Annotation
Q_DISABLE_COPY( StampAnnotation )
};
class OKULAR_EXPORT InkAnnotation : public Annotation
class OKULARCORE_EXPORT InkAnnotation : public Annotation
{
public:
/**
@ -1312,7 +1312,7 @@ class OKULAR_EXPORT InkAnnotation : public Annotation
Q_DISABLE_COPY( InkAnnotation )
};
class OKULAR_EXPORT CaretAnnotation : public Annotation
class OKULARCORE_EXPORT CaretAnnotation : public Annotation
{
public:
/**
@ -1365,7 +1365,7 @@ class OKULAR_EXPORT CaretAnnotation : public Annotation
Q_DISABLE_COPY( CaretAnnotation )
};
class OKULAR_EXPORT FileAttachmentAnnotation : public Annotation
class OKULARCORE_EXPORT FileAttachmentAnnotation : public Annotation
{
public:
/**
@ -1425,7 +1425,7 @@ class OKULAR_EXPORT FileAttachmentAnnotation : public Annotation
*
* @since 0.7 (KDE 4.1)
*/
class OKULAR_EXPORT SoundAnnotation : public Annotation
class OKULARCORE_EXPORT SoundAnnotation : public Annotation
{
public:
/**
@ -1485,7 +1485,7 @@ class OKULAR_EXPORT SoundAnnotation : public Annotation
*
* @since 0.8 (KDE 4.2)
*/
class OKULAR_EXPORT MovieAnnotation : public Annotation
class OKULARCORE_EXPORT MovieAnnotation : public Annotation
{
public:
/**
@ -1531,7 +1531,7 @@ class OKULAR_EXPORT MovieAnnotation : public Annotation
*
* @since 0.16 (KDE 4.10)
*/
class OKULAR_EXPORT ScreenAnnotation : public Annotation
class OKULARCORE_EXPORT ScreenAnnotation : public Annotation
{
public:
/**
@ -1600,7 +1600,7 @@ class OKULAR_EXPORT ScreenAnnotation : public Annotation
*
* @since 0.16 (KDE 4.10)
*/
class OKULAR_EXPORT WidgetAnnotation : public Annotation
class OKULARCORE_EXPORT WidgetAnnotation : public Annotation
{
public:
/**

View File

@ -18,7 +18,7 @@
#include <math.h>
#include "global.h"
#include "okular_export.h"
#include "okularcore_export.h"
class QPolygonF;
class QRect;
@ -44,7 +44,7 @@ class NormalizedShape;
* That allows you to zoom the page by just multiplying the normalized points with the
* zoomed page size.
*/
class OKULAR_EXPORT NormalizedPoint
class OKULARCORE_EXPORT NormalizedPoint
{
public:
/**
@ -102,7 +102,7 @@ class OKULAR_EXPORT NormalizedPoint
* NormalizedRect is a helper class which stores the coordinates
* of a normalized rect, which is a rectangle of @see NormalizedPoints.
*/
class OKULAR_EXPORT NormalizedRect
class OKULARCORE_EXPORT NormalizedRect
{
public:
/**
@ -319,7 +319,7 @@ class OKULAR_EXPORT NormalizedRect
*/
double bottom;
};
KDE_DUMMY_QHASH_FUNCTION(NormalizedRect)
//KDE_DUMMY_QHASH_FUNCTION(NormalizedRect)
/**
* @short NormalizedRect that contains a reference to an object.
@ -334,7 +334,7 @@ KDE_DUMMY_QHASH_FUNCTION(NormalizedRect)
* - Image : class Image : description of an image (n/a)
* - Annotation: class Annotation: description of an annotation
*/
class OKULAR_EXPORT ObjectRect
class OKULARCORE_EXPORT ObjectRect
{
public:
/**
@ -428,7 +428,7 @@ class OKULAR_EXPORT ObjectRect
/**
* This class describes the object rectangle for an annotation.
*/
class OKULAR_EXPORT AnnotationObjectRect : public ObjectRect
class OKULARCORE_EXPORT AnnotationObjectRect : public ObjectRect
{
public:
/**
@ -471,7 +471,7 @@ class OKULAR_EXPORT AnnotationObjectRect : public ObjectRect
/**
* This class describes the object rectangle for a source reference.
*/
class OKULAR_EXPORT SourceRefObjectRect : public ObjectRect
class OKULARCORE_EXPORT SourceRefObjectRect : public ObjectRect
{
friend class ObjectRect;
@ -857,7 +857,7 @@ void RegularArea<NormalizedShape, Shape>::transform( const QTransform &matrix )
givePtr( (*this)[i] )->transform( matrix );
}
class OKULAR_EXPORT RegularAreaRect : public RegularArea< NormalizedRect, QRect >
class OKULARCORE_EXPORT RegularAreaRect : public RegularArea< NormalizedRect, QRect >
{
public:
RegularAreaRect();
@ -901,12 +901,12 @@ class HighlightAreaRect : public RegularAreaRect
/**
* Debug operator for normalized @p point.
*/
OKULAR_EXPORT QDebug operator<<( QDebug str, const Okular::NormalizedPoint &point );
OKULARCORE_EXPORT QDebug operator<<( QDebug str, const Okular::NormalizedPoint &point );
/**
* Debug operator for normalized @p rect.
*/
OKULAR_EXPORT QDebug operator<<( QDebug str, const Okular::NormalizedRect &rect );
OKULARCORE_EXPORT QDebug operator<<( QDebug str, const Okular::NormalizedRect &rect );
#endif
#endif

View File

@ -10,7 +10,7 @@
#ifndef _OKULAR_AUDIOPLAYER_H_
#define _OKULAR_AUDIOPLAYER_H_
#include "okular_export.h"
#include "okularcore_export.h"
#include <QtCore/QObject>
@ -27,7 +27,7 @@ class SoundAction;
* Singleton utility class to play sounds in documents using the KDE sound
* system.
*/
class OKULAR_EXPORT AudioPlayer : public QObject
class OKULARCORE_EXPORT AudioPlayer : public QObject
{
Q_OBJECT

View File

@ -12,7 +12,7 @@
#include <kbookmark.h>
#include "okular_export.h"
#include "okularcore_export.h"
#include <kurl.h>
class QAction;
@ -29,7 +29,7 @@ class DocumentViewport;
* This class is responsible for loading and saving the bookmarks using the
* proper format, and for working with them (eg querying, adding, removing).
*/
class OKULAR_EXPORT BookmarkManager : public QObject
class OKULARCORE_EXPORT BookmarkManager : public QObject
{
Q_OBJECT

View File

@ -11,7 +11,7 @@
#ifndef _OKULAR_DOCUMENT_H_
#define _OKULAR_DOCUMENT_H_
#include "okular_export.h"
#include "okularcore_export.h"
#include "area.h"
#include "global.h"
#include "pagesize.h"
@ -67,7 +67,7 @@ class VisiblePageRect;
* The DocumentInfo structure can be filled in by generators to display
* metadata about the currently opened file.
*/
class OKULAR_EXPORT DocumentInfo
class OKULARCORE_EXPORT DocumentInfo
{
friend class Document;
@ -185,7 +185,7 @@ class OKULAR_EXPORT DocumentInfo
* For a better understanding of hierarchies @see README.internals.png
* @see DocumentObserver, Page
*/
class OKULAR_EXPORT Document : public QObject
class OKULARCORE_EXPORT Document : public QObject
{
Q_OBJECT
@ -1122,7 +1122,7 @@ class OKULAR_EXPORT Document : public QObject
* data is broadcasted between observers to synchronize their viewports to get
* the 'I scroll one view and others scroll too' views.
*/
class OKULAR_EXPORT DocumentViewport
class OKULARCORE_EXPORT DocumentViewport
{
public:
/**
@ -1204,7 +1204,7 @@ class OKULAR_EXPORT DocumentViewport
* - URL: a URL to be open as destination; if set, no other Destination* or
* ExternalFileName entry is used
*/
class OKULAR_EXPORT DocumentSynopsis : public QDomDocument
class OKULARCORE_EXPORT DocumentSynopsis : public QDomDocument
{
public:
/**
@ -1228,7 +1228,7 @@ class OKULAR_EXPORT DocumentSynopsis : public QDomDocument
* about an embedded file, like its name, its description, the date of creation
* and modification, and the real data of the file.
*/
class OKULAR_EXPORT EmbeddedFile
class OKULARCORE_EXPORT EmbeddedFile
{
public:
/**
@ -1282,7 +1282,7 @@ class OKULAR_EXPORT EmbeddedFile
/**
* @short An area of a specified page
*/
class OKULAR_EXPORT VisiblePageRect
class OKULARCORE_EXPORT VisiblePageRect
{
public:
/**

View File

@ -139,7 +139,7 @@ class DocumentPrivate
bool canModifyExternalAnnotations() const;
bool canRemoveExternalAnnotations() const;
void warnLimitedAnnotSupport();
OKULAR_EXPORT static QString docDataFileName(const KUrl &url, qint64 document_size);
OKULARCORE_EXPORT static QString docDataFileName(const KUrl &url, qint64 document_size);
// Methods that implement functionality needed by undo commands
void performAddPageAnnotation( int page, Annotation *annotation );

View File

@ -18,14 +18,14 @@
#include <QtCore/QString>
#include <QtPrintSupport/QPrinter>
#include "okular_export.h"
#include "okularcore_export.h"
#include "generator.h"
class QSize;
namespace Okular {
class OKULAR_EXPORT FilePrinter
class OKULARCORE_EXPORT FilePrinter
{
public:

View File

@ -15,7 +15,7 @@
#include <QtCore/QSharedDataPointer>
#include <QtCore/QString>
#include "okular_export.h"
#include "okularcore_export.h"
namespace Okular {
@ -24,7 +24,7 @@ class FontInfoPrivate;
/**
* @short A small class that represents the information of a font.
*/
class OKULAR_EXPORT FontInfo
class OKULARCORE_EXPORT FontInfo
{
public:
typedef QList<FontInfo> List;

View File

@ -10,7 +10,7 @@
#ifndef _OKULAR_FORM_H_
#define _OKULAR_FORM_H_
#include "okular_export.h"
#include "okularcore_export.h"
#include "area.h"
#include <QtCore/QStringList>
@ -33,7 +33,7 @@ class FormFieldChoicePrivate;
* This is not meant to be used as a direct base for the form fields in a
* document, but its abstract subclasses are.
*/
class OKULAR_EXPORT FormField
class OKULARCORE_EXPORT FormField
{
/// @cond PRIVATE
friend class Page;
@ -115,7 +115,7 @@ class OKULAR_EXPORT FormField
*
* @since 0.7 (KDE 4.1)
*/
class OKULAR_EXPORT FormFieldButton : public FormField
class OKULARCORE_EXPORT FormFieldButton : public FormField
{
public:
/**
@ -173,7 +173,7 @@ class OKULAR_EXPORT FormFieldButton : public FormField
* This is the base interface to reimplement to represent a text field, ie a
* field where the user insert text.
*/
class OKULAR_EXPORT FormFieldText : public FormField
class OKULARCORE_EXPORT FormFieldText : public FormField
{
public:
/**
@ -255,7 +255,7 @@ class OKULAR_EXPORT FormFieldText : public FormField
* field where the user can select one (of more) element(s) among a set of
* choices.
*/
class OKULAR_EXPORT FormFieldChoice : public FormField
class OKULARCORE_EXPORT FormFieldChoice : public FormField
{
public:
/**

View File

@ -12,7 +12,7 @@
#ifndef _OKULAR_GENERATOR_H_
#define _OKULAR_GENERATOR_H_
#include "okular_export.h"
#include "okularcore_export.h"
#include "document.h"
#include "fontinfo.h"
#include "global.h"
@ -73,7 +73,7 @@ class SourceReference;
* Every Generator can support 0 or more export formats which can be
* queried with @ref Generator::exportFormats().
*/
class OKULAR_EXPORT ExportFormat
class OKULARCORE_EXPORT ExportFormat
{
public:
typedef QList<ExportFormat> List;
@ -183,7 +183,7 @@ class OKULAR_EXPORT ExportFormat
*
* @see PrintInterface, ConfigInterface, GuiInterface
*/
class OKULAR_EXPORT Generator : public QObject
class OKULARCORE_EXPORT Generator : public QObject
{
/// @cond PRIVATE
friend class PixmapGenerationThread;
@ -564,7 +564,7 @@ class OKULAR_EXPORT Generator : public QObject
/**
* @short Describes a pixmap type request.
*/
class OKULAR_EXPORT PixmapRequest
class OKULARCORE_EXPORT PixmapRequest
{
friend class Document;
friend class DocumentPrivate;
@ -686,7 +686,7 @@ Q_DECLARE_METATYPE(Okular::Generator::PrintError)
Q_DECLARE_INTERFACE(Okular::Generator, OkularGeneratorInterface_iid)
#ifndef QT_NO_DEBUG_STREAM
OKULAR_EXPORT QDebug operator<<( QDebug str, const Okular::PixmapRequest &req );
OKULARCORE_EXPORT QDebug operator<<( QDebug str, const Okular::PixmapRequest &req );
#endif
#endif

View File

@ -10,7 +10,7 @@
#ifndef _OKULAR_MISC_H_
#define _OKULAR_MISC_H_
#include "okular_export.h"
#include "okularcore_export.h"
#include "area.h"
namespace Okular {
@ -33,7 +33,7 @@ namespace Okular {
3. Internally it that is related to the start cursor is always at it[0] while it related to end is it[1],
transition between meanings (itB/itE) is done with dir modifier;
*/
class OKULAR_EXPORT TextSelection
class OKULARCORE_EXPORT TextSelection
{
public:
/**

View File

@ -12,7 +12,7 @@
#define _OKULAR_MOVIE_H_
#include "global.h"
#include "okular_export.h"
#include "okularcore_export.h"
#include <QtCore/QSize>
@ -25,7 +25,7 @@ namespace Okular {
*
* @since 0.8 (KDE 4.2)
*/
class OKULAR_EXPORT Movie
class OKULARCORE_EXPORT Movie
{
public:
/**

View File

@ -13,7 +13,7 @@
#include <QtCore/QVector>
#include "okular_export.h"
#include "okularcore_export.h"
namespace Okular {
@ -25,7 +25,7 @@ class Page;
* Inherit this class and call Document->addObserver( yourClass ) to get
* notified of asynchronous events (new pixmap generated, or changed, etc..).
*/
class OKULAR_EXPORT DocumentObserver
class OKULARCORE_EXPORT DocumentObserver
{
public:
DocumentObserver();

View File

@ -1,33 +0,0 @@
/***************************************************************************
* Copyright (C) 2006 by Pino Toscano <toscano.pino@tiscali.it> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
***************************************************************************/
#ifndef OKULAR_EXPORT_H
#define OKULAR_EXPORT_H
/* needed for KDE_EXPORT macros */
#include <kdemacros.h>
#if defined _WIN32 || defined _WIN64
#ifndef OKULAR_EXPORT
# ifdef MAKE_OKULARCORE_LIB
# define OKULAR_EXPORT KDE_EXPORT
# else
# define OKULAR_EXPORT KDE_IMPORT
# endif
#endif
#else /* UNIX*/
/* export statements for unix */
#define OKULAR_EXPORT KDE_EXPORT
#endif
#endif

View File

@ -12,7 +12,7 @@
#include <QtCore/QLinkedList>
#include "okular_export.h"
#include "okularcore_export.h"
#include "area.h"
#include "global.h"
#include "textpage.h"
@ -46,7 +46,7 @@ class Tile;
*
* Note: The class takes ownership of all objects.
*/
class OKULAR_EXPORT Page
class OKULARCORE_EXPORT Page
{
public:
/**

View File

@ -14,7 +14,7 @@
#include <QtCore/QSharedDataPointer>
#include <QtCore/QString>
#include "okular_export.h"
#include "okularcore_export.h"
namespace Okular {
@ -23,7 +23,7 @@ class PageSizePrivate;
/**
* @short A small class that represents the size of a page.
*/
class OKULAR_EXPORT PageSize
class OKULARCORE_EXPORT PageSize
{
public:
typedef QList<PageSize> List;

View File

@ -10,7 +10,7 @@
#ifndef _OKULAR_PAGETRANSITION_H_
#define _OKULAR_PAGETRANSITION_H_
#include "okular_export.h"
#include "okularcore_export.h"
namespace Okular {
@ -21,7 +21,7 @@ namespace Okular {
* a page transition. It supports mainly the transition effects as
* defined in PDF specification 1.6.
*/
class OKULAR_EXPORT PageTransition
class OKULARCORE_EXPORT PageTransition
{
public:
/**

View File

@ -10,7 +10,7 @@
#ifndef _OKULAR_SOUND_H_
#define _OKULAR_SOUND_H_
#include "okular_export.h"
#include "okularcore_export.h"
#include <QtCore/QByteArray>
#include <QtCore/QString>
@ -23,7 +23,7 @@ namespace Okular {
* This class encapsulates the information about a sound object
* which is used for links on enter/leave page event.
*/
class OKULAR_EXPORT Sound
class OKULARCORE_EXPORT Sound
{
public:
/**

View File

@ -10,8 +10,8 @@
#ifndef OKULAR_SOURCEREFERENCE_H
#define OKULAR_SOURCEREFERENCE_H
#include "okular_export.h"
#include "okularcore_export.h"
#include <QObject>
class QString;
namespace Okular {
@ -22,7 +22,7 @@ namespace Okular {
* A source reference is a reference to one of the source(s) of the loaded
* document.
*/
class OKULAR_EXPORT SourceReference
class OKULARCORE_EXPORT SourceReference
{
public:
/**

View File

@ -10,7 +10,7 @@
#ifndef _OKULAR_TEXTDOCUMENTGENERATOR_H_
#define _OKULAR_TEXTDOCUMENTGENERATOR_H_
#include "okular_export.h"
#include "okularcore_export.h"
#include "document.h"
#include "generator.h"
@ -26,7 +26,7 @@ class TextDocumentConverterPrivate;
class TextDocumentGenerator;
class TextDocumentGeneratorPrivate;
class OKULAR_EXPORT TextDocumentConverter : public QObject
class OKULARCORE_EXPORT TextDocumentConverter : public QObject
{
Q_OBJECT
@ -150,7 +150,7 @@ class OKULAR_EXPORT TextDocumentConverter : public QObject
* This generator provides a document in the form of a QTextDocument object,
* parsed using a specialized TextDocumentConverter.
*/
class OKULAR_EXPORT TextDocumentGenerator : public Generator, public Okular::ConfigInterface
class OKULARCORE_EXPORT TextDocumentGenerator : public Generator, public Okular::ConfigInterface
{
/// @cond PRIVATE
friend class TextDocumentConverter;

View File

@ -12,7 +12,7 @@
#define _OKULAR_TEXTDOCUMENTSETTINGS_H_
#include "okular_export.h"
#include "okularcore_export.h"
#include <QFont>
#include <QWidget>
@ -79,7 +79,7 @@ class TextDocumentSettingsPrivate;
*
* @since 0.17 (KDE 4.11)
*/
class OKULAR_EXPORT TextDocumentSettingsWidget : public QWidget
class OKULARCORE_EXPORT TextDocumentSettingsWidget : public QWidget
{
public:
TextDocumentSettingsWidget( QWidget *parent = 0 );
@ -103,7 +103,7 @@ class OKULAR_EXPORT TextDocumentSettingsWidget : public QWidget
*
* @since 0.17 (KDE 4.11)
*/
class OKULAR_EXPORT TextDocumentSettings : public KConfigSkeleton
class OKULARCORE_EXPORT TextDocumentSettings : public KConfigSkeleton
{
public:
QFont font() const;

View File

@ -13,7 +13,7 @@
#include <QtCore/QList>
#include <QtCore/QString>
#include "okular_export.h"
#include "okularcore_export.h"
#include "global.h"
class QTransform;
@ -41,7 +41,7 @@ class RegularAreaRect;
* Also some document types have glyphes - sets of characters rendered as one, so in search they should
* appear as a text but are only one character when drawn on screen. We need to allow this.
*/
class OKULAR_EXPORT TextEntity
class OKULARCORE_EXPORT TextEntity
{
public:
typedef QList<TextEntity*> List;
@ -87,7 +87,7 @@ class OKULAR_EXPORT TextEntity
* providing @see TextEntity items for every word/character of
* the page.
*/
class OKULAR_EXPORT TextPage
class OKULARCORE_EXPORT TextPage
{
/// @cond PRIVATE
friend class Page;

View File

@ -22,7 +22,7 @@ namespace Okular {
*
* @since 0.16 (KDE 4.10)
*/
class OKULAR_EXPORT Tile
class OKULARCORE_EXPORT Tile
{
public:
Tile( const NormalizedRect &rect, QPixmap *pixmap, bool isValid );

View File

@ -9,7 +9,7 @@
#ifndef _OKULAR_TILES_MANAGER_P_H_
#define _OKULAR_TILES_MANAGER_P_H_
#include "okular_export.h"
#include "okularcore_export.h"
#include "area.h"
class QPixmap;

View File

@ -10,7 +10,7 @@
#ifndef _OKULAR_UTILS_H_
#define _OKULAR_UTILS_H_
#include "okular_export.h"
#include "okularcore_export.h"
#include "area.h"
class QRect;
@ -25,7 +25,7 @@ namespace Okular
*
* This class contains some static functions of general utility.
*/
class OKULAR_EXPORT Utils
class OKULARCORE_EXPORT Utils
{
public:
/**

View File

@ -10,8 +10,8 @@
#ifndef OKULAR_VIEW_H
#define OKULAR_VIEW_H
#include "okular_export.h"
#include "okularcore_export.h"
#include <QObject>
class QString;
class QVariant;
@ -29,7 +29,7 @@ class ViewPrivate;
*
* @since 0.7 (KDE 4.1)
*/
class OKULAR_EXPORT View
class OKULARCORE_EXPORT View
{
/// @cond PRIVATE
friend class Document;

View File

@ -1,16 +0,0 @@
/***************************************************************************
* Copyright (C) 2007 by Brad Hards <bradh@frogmouth.net> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
***************************************************************************/
#ifndef OOO_DEBUG_H
#define OOO_DEBUG_H
#include <KDebug>
const int OooDebug = 4715;
#endif

View File

@ -8,7 +8,6 @@
***************************************************************************/
#include "manifest.h"
#include "debug.h"
#include <QBuffer>
#include <QXmlStreamReader>
@ -19,6 +18,7 @@
using namespace OOO;
Q_LOGGING_CATEGORY(OkularOooDebug, "org.kde.okular.generators.ooo")
//---------------------------------------------------------------------
ManifestEntry::ManifestEntry( const QString &fileName ) :
@ -149,15 +149,15 @@ Manifest::Manifest( const QString &odfFileName, const QByteArray &manifestData,
} else if ( xml.name().toString() == "file-entry" ) {
QXmlStreamAttributes attributes = xml.attributes();
if (currentEntry != 0) {
kWarning(OooDebug) << "Got new StartElement for new file-entry, but haven't finished the last one yet!";
kWarning(OooDebug) << "processing" << currentEntry->fileName() << ", got" << attributes.value("manifest:full-path").toString();
qCWarning(OkularOooDebug) << "Got new StartElement for new file-entry, but haven't finished the last one yet!";
qCWarning(OkularOooDebug) << "processing" << currentEntry->fileName() << ", got" << attributes.value("manifest:full-path").toString();
}
currentEntry = new ManifestEntry( attributes.value("manifest:full-path").toString() );
currentEntry->setMimeType( attributes.value("manifest:media-type").toString() );
currentEntry->setSize( attributes.value("manifest:size").toString() );
} else if ( xml.name().toString() == "encryption-data" ) {
if (currentEntry == 0) {
kWarning(OooDebug) << "Got encryption-data without valid file-entry at line" << xml.lineNumber();
qCWarning(OkularOooDebug) << "Got encryption-data without valid file-entry at line" << xml.lineNumber();
continue;
}
QXmlStreamAttributes encryptionAttributes = xml.attributes();
@ -165,7 +165,7 @@ Manifest::Manifest( const QString &odfFileName, const QByteArray &manifestData,
currentEntry->setChecksum( encryptionAttributes.value("manifest:checksum").toString() );
} else if ( xml.name().toString() == "algorithm" ) {
if (currentEntry == 0) {
kWarning(OooDebug) << "Got algorithm without valid file-entry at line" << xml.lineNumber();
qCWarning(OkularOooDebug) << "Got algorithm without valid file-entry at line" << xml.lineNumber();
continue;
}
QXmlStreamAttributes algorithmAttributes = xml.attributes();
@ -173,7 +173,7 @@ Manifest::Manifest( const QString &odfFileName, const QByteArray &manifestData,
currentEntry->setInitialisationVector( algorithmAttributes.value("manifest:initialisation-vector").toString() );
} else if ( xml.name().toString() == "key-derivation" ) {
if (currentEntry == 0) {
kWarning(OooDebug) << "Got key-derivation without valid file-entry at line" << xml.lineNumber();
qCWarning(OkularOooDebug) << "Got key-derivation without valid file-entry at line" << xml.lineNumber();
continue;
}
QXmlStreamAttributes kdfAttributes = xml.attributes();
@ -182,19 +182,19 @@ Manifest::Manifest( const QString &odfFileName, const QByteArray &manifestData,
currentEntry->setSalt( kdfAttributes.value("manifest:salt").toString() );
} else {
// handle other StartDocument types here
kWarning(OooDebug) << "Unexpected start document type: " << xml.name().toString();
qCWarning(OkularOooDebug) << "Unexpected start document type: " << xml.name().toString();
}
} else if ( xml.tokenType() == QXmlStreamReader::EndElement ) {
if ( xml.name().toString() == "manifest" ) {
continue;
} else if ( xml.name().toString() == "file-entry") {
if (currentEntry == 0) {
kWarning(OooDebug) << "Got EndElement for file-entry without valid StartElement at line" << xml.lineNumber();
qCWarning(OkularOooDebug) << "Got EndElement for file-entry without valid StartElement at line" << xml.lineNumber();
continue;
}
// we're finished processing that file entry
if ( mEntries.contains( currentEntry->fileName() ) ) {
kWarning(OooDebug) << "Can't insert entry because of duplicate name:" << currentEntry->fileName();
qCWarning(OkularOooDebug) << "Can't insert entry because of duplicate name:" << currentEntry->fileName();
delete currentEntry;
} else {
mEntries.insert( currentEntry->fileName(), currentEntry);
@ -204,7 +204,7 @@ Manifest::Manifest( const QString &odfFileName, const QByteArray &manifestData,
}
}
if (xml.hasError()) {
kWarning(OooDebug) << "error: " << xml.errorString() << xml.lineNumber() << xml.columnNumber();
qCWarning(OkularOooDebug) << "error: " << xml.errorString() << xml.lineNumber() << xml.columnNumber();
}
}
@ -248,7 +248,7 @@ void Manifest::checkPassword( ManifestEntry *entry, const QByteArray &fileData,
} else if ( entry->checksumType() == "SHA1" ) {
csum = QCA::Hash( "sha1").hash( *decryptedData ).toByteArray();
} else {
kDebug(OooDebug) << "unknown checksum type: " << entry->checksumType();
qCDebug(OkularOooDebug) << "unknown checksum type: " << entry->checksumType();
// we can only assume it will be OK.
m_haveGoodPassword = true;
return;
@ -296,7 +296,7 @@ QByteArray Manifest::decryptFile( const QString &filename, const QByteArray &fil
QIODevice *decompresserDevice = KFilterDev::device( new QBuffer( &decryptedData, 0 ), "application/x-gzip", true );
if( !decompresserDevice ) {
kDebug(OooDebug) << "Couldn't create decompressor";
qCDebug(OkularOooDebug) << "Couldn't create decompressor";
// hopefully it isn't compressed then!
return QByteArray( fileData );
}

View File

@ -18,6 +18,10 @@
#include <QtCrypto>
#endif
#include <QtCore/qloggingcategory.h>
Q_DECLARE_LOGGING_CATEGORY(OkularOooDebug)
namespace OOO {
/**

View File

@ -10,7 +10,7 @@
#ifndef _OKULAR_CONFIGINTERFACE_H_
#define _OKULAR_CONFIGINTERFACE_H_
#include "../core/okular_export.h"
#include "okularcore_export.h"
#include <QtCore/QObject>
@ -35,7 +35,7 @@ namespace Okular {
* @endcode
* and - of course - implementing its methods.
*/
class OKULAR_EXPORT ConfigInterface
class OKULARCORE_EXPORT ConfigInterface
{
public:
/**

View File

@ -10,7 +10,7 @@
#ifndef _OKULAR_GUIINTERFACE_H_
#define _OKULAR_GUIINTERFACE_H_
#include "../core/okular_export.h"
#include "okularcore_export.h"
#include <QtCore/QObject>
@ -36,7 +36,7 @@ namespace Okular {
* @endcode
* and - of course - implementing its methods.
*/
class OKULAR_EXPORT GuiInterface : protected KXMLGUIClient
class OKULARCORE_EXPORT GuiInterface : protected KXMLGUIClient
{
public:
/**

View File

@ -10,7 +10,7 @@
#ifndef _OKULAR_PRINTINTERFACE_H_
#define _OKULAR_PRINTINTERFACE_H_
#include "../core/okular_export.h"
#include "okularcore_export.h"
#include <QtCore/QObject>
@ -36,7 +36,7 @@ namespace Okular {
* @endcode
* and - of course - implementing its methods.
*/
class OKULAR_EXPORT PrintInterface
class OKULARCORE_EXPORT PrintInterface
{
public:
/**

View File

@ -10,7 +10,7 @@
#ifndef _OKULAR_SAVEINTERFACE_H_
#define _OKULAR_SAVEINTERFACE_H_
#include "../core/okular_export.h"
#include "okularcore_export.h"
#include <QtCore/QObject>
@ -36,7 +36,7 @@ class AnnotationProxy;
* @endcode
* and - of course - implementing its methods.
*/
class OKULAR_EXPORT SaveInterface
class OKULARCORE_EXPORT SaveInterface
{
public:
/**

View File

@ -10,7 +10,7 @@
#ifndef _OKULAR_VIEWERINTERFACE_H_
#define _OKULAR_VIEWERINTERFACE_H_
#include "../core/okular_export.h"
#include "okularcore_export.h"
#include <QtCore/QObject>
#include <QtCore/QString>

View File

@ -1,33 +0,0 @@
/***************************************************************************
* Copyright (C) 2013 by Albert Astals Cid <aacid@kde.org> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
***************************************************************************/
#ifndef OKULAR_PART_EXPORT_H
#define OKULAR_PART_EXPORT_H
/* needed for KDE_EXPORT macros */
#include <kdemacros.h>
#if defined _WIN32 || defined _WIN64
#ifndef OKULAR_PART_EXPORT
# ifdef MAKE_OKULARPART_LIB
# define OKULAR_PART_EXPORT KDE_EXPORT
# else
# define OKULAR_PART_EXPORT KDE_IMPORT
# endif
#endif
#else /* UNIX*/
/* export statements for unix */
#define OKULAR_PART_EXPORT KDE_EXPORT
#endif
#endif

4
part.h
View File

@ -30,7 +30,7 @@
#include "kdocumentviewer.h"
#include "interfaces/viewerinterface.h"
#include "okular_part_export.h"
#include "okularpart_export.h"
#include <QtDBus/QtDBus>
@ -94,7 +94,7 @@ enum EmbedMode
* @author Wilco Greven <greven@kde.org>
* @version 0.2
*/
class OKULAR_PART_EXPORT Part : public KParts::ReadWritePart, public Okular::DocumentObserver, public KDocumentViewer, public Okular::ViewerInterface
class OKULARPART_EXPORT Part : public KParts::ReadWritePart, public Okular::DocumentObserver, public KDocumentViewer, public Okular::ViewerInterface
{
Q_OBJECT
Q_CLASSINFO("D-Bus Interface", "org.kde.okular")

View File

@ -1,6 +1,7 @@
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/..
${CMAKE_CURRENT_BINARY_DIR}/../
)
# checking whether we should enable activities support

View File

@ -14,7 +14,7 @@
#include "core/observer.h"
#include <QModelIndex>
#include "okular_part_export.h"
#include "okularpart_export.h"
class QDomNode;
class QModelIndex;
@ -27,7 +27,7 @@ class Document;
class PartTest;
}
class OKULAR_PART_EXPORT TOC : public QWidget, public Okular::DocumentObserver
class OKULARPART_EXPORT TOC : public QWidget, public Okular::DocumentObserver
{
Q_OBJECT
friend class Okular::PartTest;