fix win32 compilation

warnings--

svn path=/trunk/playground/graphics/okular/; revision=643874
remotes/origin/KDE/4.0
Christian Ehrlicher 19 years ago
parent 6452da8291
commit c5c2da7c89
  1. 9
      CMakeLists.txt
  2. 2
      core/area.h
  3. 3
      core/generator.h
  4. 4
      core/observer.cpp
  5. 1
      core/observer.h
  6. 2
      core/okular_export.h
  7. 12
      core/utils.cpp
  8. 4
      generators/dvi/CMakeLists.txt
  9. 4
      generators/dvi/TeXFont_PK.cpp
  10. 2
      generators/dvi/TeXFont_PK.h
  11. 2
      generators/dvi/TeXFont_TFM.cpp
  12. 2
      generators/fictionbook/CMakeLists.txt
  13. 2
      generators/ooo/CMakeLists.txt
  14. 2
      generators/plucker/CMakeLists.txt
  15. 8
      generators/plucker/unpluck/unpluck.cpp
  16. 2
      ui/annotationtools.h
  17. 2
      ui/pageview.h
  18. 3
      ui/pageviewutils.cpp
  19. 2
      ui/presentationwidget.cpp
  20. 4
      ui/presentationwidget.h
  21. 2
      ui/thumbnaillist.cpp

@ -6,6 +6,11 @@ add_subdirectory( generators )
include(OkularConfigureChecks.cmake)
if(NOT WIN32)
set(MATH_LIB m)
else(NOT WIN32)
set(MATH_LIB)
endif(NOT WIN32)
include_directories(
${CMAKE_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/okular/ui/painter_agg2/
@ -75,7 +80,7 @@ IF(APPLE)
SET(OKULAR_IOKIT "-framework IOKit" CACHE STRING "Apple IOKit framework")
ENDIF(APPLE)
target_link_libraries(okularcore ${OKULAR_IOKIT} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBRARY} ${KDE4_KDEPRINT_LIBS} ${KDE4_PHONONCORE_LIBRARY} m )
target_link_libraries(okularcore ${OKULAR_IOKIT} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBRARY} ${KDE4_KDEPRINT_LIBS} ${KDE4_PHONONCORE_LIBRARY} ${MATH_LIB})
install(TARGETS okularcore DESTINATION ${LIB_INSTALL_DIR} )
@ -138,7 +143,7 @@ kde4_automoc(${okularpart_SRCS})
kde4_add_plugin(okularpart WITH_PREFIX ${okularpart_SRCS})
target_link_libraries(okularpart okularcore ${KDE4_KPARTS_LIBS} ${KDE4_KDEPRINT_LIBS} ${KDE4_KNEWSTUFF_LIBS} ${KDE4_KHTML_LIBS} m )
target_link_libraries(okularpart okularcore ${KDE4_KPARTS_LIBS} ${KDE4_KDEPRINT_LIBS} ${KDE4_KNEWSTUFF_LIBS} ${KDE4_KHTML_LIBS} ${MATH_LIB})
if ( X11_Xrender_FOUND )
target_link_libraries( okularpart ${X11_Xrender_LIB} )
endif ( X11_Xrender_FOUND )

@ -492,7 +492,7 @@ template <class NormalizedShape, class Shape> class RegularArea : public QList<
};
template <class NormalizedShape, class Shape>
RegularArea<NormalizedShape, Shape>::~RegularArea<NormalizedShape, Shape>()
RegularArea<NormalizedShape, Shape>::~RegularArea()
{
int size = this->count();
for ( int i = 0; i < size; ++i )

@ -23,9 +23,10 @@
#include <kmimetype.h>
// KDE_EXPORT is correct here - the function needs to be exported every time
#define OKULAR_EXPORT_PLUGIN( classname ) \
extern "C" { \
OKULAR_EXPORT Okular::Generator* create_plugin() { return new classname(); } \
KDE_EXPORT Okular::Generator* create_plugin() { return new classname(); } \
}
class KAboutData;

@ -12,6 +12,10 @@
using namespace Okular;
DocumentObserver::DocumentObserver()
{
}
DocumentObserver::~DocumentObserver()
{
}

@ -52,6 +52,7 @@ class Page;
class OKULAR_EXPORT DocumentObserver
{
public:
DocumentObserver();
/**
* Destroys the document observer.
*/

@ -14,7 +14,7 @@
#include <kdemacros.h>
#if defined Q_OS_WIN
#if defined _WIN32 || defined _WIN64
#ifndef OKULAR_EXPORT
# ifdef MAKE_OKULARCORE_LIB
# define OKULAR_EXPORT KDE_EXPORT

@ -137,5 +137,15 @@ double Utils::dpiY()
return err == CGDisplayNoErr ? y : 72.0;
}
#else
#error "Not yet contributed"
#include <QDesktopWidget>
double Utils::dpiX()
{
return QDesktopWidget().physicalDpiX();
}
double Utils::dpiY()
{
return QDesktopWidget().physicalDpiY();
}
#endif

@ -25,7 +25,7 @@ set(okularGenerator_dvi_SRCS
dviFile.cpp
dviPageInfo.cpp
psgs.cpp
psheader.cpp
# psheader.cpp # already included in psgs.cpp
glyph.cpp
TeXFont.cpp
TeXFontDefinition.cpp
@ -49,7 +49,7 @@ kde4_automoc(${okularGenerator_dvi_SRCS})
kde4_add_plugin(okularGenerator_dvi WITH_PREFIX ${okularGenerator_dvi_SRCS})
target_link_libraries(okularGenerator_dvi okularcore m ${KDE4_KDEPRINT_LIBS} )
target_link_libraries(okularGenerator_dvi okularcore ${KDE4_KDEPRINT_LIBS} ${MATH_LIB} )
if (FREETYPE_FOUND)
target_link_libraries(okularGenerator_dvi ${FREETYPE_LIBRARIES})
endif (FREETYPE_FOUND)

@ -124,7 +124,7 @@ glyph* TeXFont_PK::getGlyph(quint16 ch, bool generateCharacterPixmap, const QCol
}
// This is the address of the glyph that will be returned.
struct glyph *g = glyphtable+ch;
class glyph *g = glyphtable+ch;
// Check if the glyph is loaded. If not, load it now.
if (characterBitmaps[ch] == 0) {
@ -471,7 +471,7 @@ void TeXFont_PK::read_PK_char(unsigned int ch)
int row_bit_pos;
bool paint_switch;
quint32* cp;
register struct glyph *g;
register class glyph *g;
register FILE *fp = file;
long fpwidth;
quint32 word = 0;

@ -19,7 +19,7 @@ class TeXFont_PK : public TeXFont {
// open font file or NULL
FILE* file;
class bitmap *characterBitmaps[TeXFontDefinition::max_num_of_chars_in_font];
struct bitmap *characterBitmaps[TeXFontDefinition::max_num_of_chars_in_font];
// For use by PK-decryption routines. I don't understand what these
// are good for -- Stefan Kebekus

@ -131,7 +131,7 @@ glyph* TeXFont_TFM::getGlyph(quint16 characterCode, bool generateCharacterPixmap
}
// This is the address of the glyph that will be returned.
struct glyph *g = glyphtable+characterCode;
class glyph *g = glyphtable+characterCode;
if ((generateCharacterPixmap == true) && ((g->shrunkenCharacter.isNull()) || (color != g->color)) ) {
g->color = color;

@ -16,7 +16,7 @@ kde4_automoc(${okularGenerator_fb_PART_SRCS})
kde4_add_plugin(okularGenerator_fb WITH_PREFIX ${okularGenerator_fb_PART_SRCS})
target_link_libraries(okularGenerator_fb ${POPPLER_LIBRARY} okularcore ${KDE4_KDEPRINT_LIBS} m )
target_link_libraries(okularGenerator_fb ${POPPLER_LIBRARY} okularcore ${KDE4_KDEPRINT_LIBS} ${MATH_LIB} )
install(TARGETS okularGenerator_fb DESTINATION ${PLUGIN_INSTALL_DIR})

@ -19,7 +19,7 @@ kde4_automoc(${okularGenerator_ooo_PART_SRCS})
kde4_add_plugin(okularGenerator_ooo WITH_PREFIX ${okularGenerator_ooo_PART_SRCS})
target_link_libraries(okularGenerator_ooo ${POPPLER_LIBRARY} okularcore ${KDE4_KDEPRINT_LIBS} m )
target_link_libraries(okularGenerator_ooo ${POPPLER_LIBRARY} okularcore ${KDE4_KDEPRINT_LIBS} ${MATH_LIB} )
install(TARGETS okularGenerator_ooo DESTINATION ${PLUGIN_INSTALL_DIR})

@ -23,7 +23,7 @@ kde4_automoc(${okularGenerator_plucker_SRCS})
kde4_add_plugin(okularGenerator_plucker WITH_PREFIX ${okularGenerator_plucker_SRCS} ${qunpluck_SRCS})
target_link_libraries(okularGenerator_plucker okularcore ${KDE4_KDEPRINT_LIBS} m ${JPEG_LIBRARY} )
target_link_libraries(okularGenerator_plucker okularcore ${KDE4_KDEPRINT_LIBS} ${MATH_LIB} ${JPEG_LIBRARY} )
install(TARGETS okularGenerator_plucker DESTINATION ${PLUGIN_INSTALL_DIR})

@ -814,10 +814,10 @@ plkr_Document* plkr_OpenDoc
crc = crc32 (crc, (const Bytef*)owner_id, owner_id_len);
for (i = 0; i < 10; i++) {
crc = crc32 (crc, (const Bytef*)owner_id, owner_id_len);
newdoc->owner_id_key[(i * 4) + 0] = (crc >> 24) & 0xFF;
newdoc->owner_id_key[(i * 4) + 1] = (crc >> 16) & 0xFF;
newdoc->owner_id_key[(i * 4) + 2] = (crc >> 8) & 0xFF;
newdoc->owner_id_key[(i * 4) + 3] = crc & 0xFF;
newdoc->owner_id_key[(i * 4) + 0] = (unsigned char)((crc >> 24) & 0xFF);
newdoc->owner_id_key[(i * 4) + 1] = (unsigned char)((crc >> 16) & 0xFF);
newdoc->owner_id_key[(i * 4) + 2] = (unsigned char)((crc >> 8) & 0xFF);
newdoc->owner_id_key[(i * 4) + 3] = (unsigned char)(crc & 0xFF);
}
}
else {

@ -19,7 +19,7 @@
class QPainter;
class PageViewItem;
namespace Okular {
struct Annotation;
class Annotation;
class Page;
}

@ -31,7 +31,7 @@ class KActionCollection;
namespace Okular {
class Document;
struct Annotation;
class Annotation;
}
class PageViewPrivate;

@ -356,8 +356,9 @@ ToolBarButton::ToolBarButton( QWidget * parent, const ToolBarItem & item )
static const int toolBarGridSize = 40;
static const int toolBarRBMargin = 2;
struct ToolBarPrivate
class ToolBarPrivate
{
public:
ToolBarPrivate( PageViewToolBar * qq )
: q( qq )
{

@ -572,7 +572,7 @@ void PresentationWidget::overlayClick( const QPoint & position )
return;
// compute angle relative to indicator (note coord transformation)
float angle = 0.5 + 0.5 * atan2( -xPos, -yPos ) / M_PI;
float angle = 0.5 + 0.5 * atan2( (double)-xPos, (double)-yPos ) / M_PI;
int pageIndex = (int)( angle * ( m_frames.count() - 1 ) + 0.5 );
// go to selected page

@ -22,11 +22,11 @@ class QToolBar;
class QTimer;
class KActionCollection;
class AnnotatorEngine;
class PresentationFrame;
struct PresentationFrame;
class PresentationSearchBar;
namespace Okular {
struct Annotation;
class Annotation;
class Document;
class Page;
class Link;

@ -507,7 +507,7 @@ ThumbnailWidget::ThumbnailWidget( QWidget * parent, const Okular::Document * doc
void ThumbnailWidget::resizeFitWidth( int width )
{
m_pixmapWidth = width - m_margin;
m_pixmapHeight = (int)round( m_page->ratio() * (double)m_pixmapWidth );
m_pixmapHeight = lround( m_page->ratio() * (double)m_pixmapWidth );
setFixedSize( QSize( width, heightHint() ) );
}

Loading…
Cancel
Save