diff --git a/core/document.cpp b/core/document.cpp index e6f0acc30..06e864173 100644 --- a/core/document.cpp +++ b/core/document.cpp @@ -11,6 +11,11 @@ #include "document.h" #include "document_p.h" +#ifdef Q_OS_WIN +#define _WIN32_WINNT 0x0500 +#include +#endif + // qt/kde/system includes #include #include @@ -60,10 +65,6 @@ #include -#ifdef Q_OS_WIN -#include -#endif - using namespace Okular; struct AllocatedPixmap @@ -146,8 +147,8 @@ QString DocumentPrivate::localizedSize(const QSizeF &size) const void DocumentPrivate::cleanupPixmapMemory( qulonglong /*sure? bytesOffset*/ ) { // [MEM] choose memory parameters based on configuration profile - qulonglong clipValue = -1; - qulonglong memoryToFree = -1; + qulonglong clipValue = ~0U; + qulonglong memoryToFree = ~0U; switch ( Settings::memoryLevel() ) { case Settings::EnumMemoryLevel::Low: