graphics/dspdfviewer: Prepare for Qt5-5.14

PR:		244964
This commit is contained in:
Tobias C. Berner 2020-04-04 13:10:57 +00:00
parent 2dc064e2f3
commit eeee6534ff
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=530656
2 changed files with 43 additions and 0 deletions

View file

@ -6,6 +6,19 @@ Fix build with Clang 8:
--- dspdfviewer.cpp.orig 2016-09-13 13:18:47 UTC
+++ dspdfviewer.cpp
@@ -292,10 +292,10 @@ void DSPDFViewer::sendAllClockSignals() const
emit presentationClockUpdate(presentationClock());
}
-QTime DSPDFViewer::timeSince(const QTime& startPoint) const
+QTime DSPDFViewer::timeSince(const QElapsedTimer& startPoint) const
{
QTime result(0,0);
- result = result.addMSecs(startPoint.elapsed());
+ result = result.addMSecs(static_cast<int>(startPoint.elapsed()));
return result;
}
@@ -308,7 +308,7 @@ RenderingIdentifier DSPDFViewer::toRenderIdent(unsigne
RenderingIdentifier DSPDFViewer::toThumbnailRenderIdent(unsigned int pageNumber, PDFViewerWindow& window)

View file

@ -0,0 +1,30 @@
--- dspdfviewer.h.orig 2016-09-13 13:18:47 UTC
+++ dspdfviewer.h
@@ -22,6 +22,7 @@
#define dspdfviewer_H
#include <QObject>
+#include <QElapsedTimer>
#include <QTimer>
#include <QFileSystemWatcher>
#include "poppler-qt.h"
@@ -42,8 +43,8 @@ class DSPDFViewer: public QObject (private)
private:
QTimer clockDisplayTimer;
- QTime slideStart;
- QTime presentationStart;
+ QElapsedTimer slideStart;
+ QElapsedTimer presentationStart;
bool presentationClockRunning;
private:
@@ -89,7 +90,7 @@ private slots: (public)
QTime slideClock() const;
QTime presentationClock() const;
- QTime timeSince( const QTime& startPoint) const;
+ QTime timeSince( const QElapsedTimer& startPoint) const;
bool isAudienceScreenBlank() const;