Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Sep 2019 02:08:27 +0000 (UTC)
From:      Santhosh Raju <fox@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r511054 - in head/graphics/dspdfviewer: . files
Message-ID:  <201909040208.x8428R1N097372@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: fox
Date: Wed Sep  4 02:08:27 2019
New Revision: 511054
URL: https://svnweb.freebsd.org/changeset/ports/511054

Log:
  graphics/dspdfviewer: Fixes build with Qt 5.13
  
  Submitted by:	adridg
  Approved by:	philip (mentor)

Added:
  head/graphics/dspdfviewer/files/patch-pdfviewerwindow.cpp   (contents, props changed)
Modified:
  head/graphics/dspdfviewer/Makefile

Modified: head/graphics/dspdfviewer/Makefile
==============================================================================
--- head/graphics/dspdfviewer/Makefile	Wed Sep  4 01:22:51 2019	(r511053)
+++ head/graphics/dspdfviewer/Makefile	Wed Sep  4 02:08:27 2019	(r511054)
@@ -3,7 +3,7 @@
 PORTNAME=	dspdfviewer
 PORTVERSION=	1.15.1
 DISTVERSIONPREFIX=	v
-PORTREVISION=	19
+PORTREVISION=	20
 CATEGORIES=	graphics
 
 MAINTAINER=	fox@FreeBSD.org

Added: head/graphics/dspdfviewer/files/patch-pdfviewerwindow.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/dspdfviewer/files/patch-pdfviewerwindow.cpp	Wed Sep  4 02:08:27 2019	(r511054)
@@ -0,0 +1,42 @@
+ Fix graphics/dspdfviewer build w/ Qt 5.13
+
+ - adjust to deprecated methods
+ - QApplication::flush() hasn't really been a thing since Qt4,
+   just comment it out.
+
+The application looks abandoned upstream.
+
+Patched by adridg@freebsd.org
+--- pdfviewerwindow.cpp.orig	2016-09-13 13:18:47 UTC
++++ pdfviewerwindow.cpp
+@@ -24,6 +24,7 @@
+ #include <QHBoxLayout>
+ #include <QLabel>
+ #include <QMouseEvent>
++#include <QScreen>
+ #if defined(POPPLER_QT5) && defined(_WIN32)
+ #include <QWindow>
+ #endif
+@@ -116,7 +117,12 @@ void PDFViewerWindow::reposition()
+     this->windowHandle()->setScreen(0);
+   this->showFullScreen();
+ #else
+-  QRect rect = QApplication::desktop()->screenGeometry( numeric_cast<int>(getMonitor()) );
++  auto screens = QGuiApplication::screens();
++  int screen_number = numeric_cast<int>(getMonitor());
++  if ((screen_number < 0) || (screen_number >= screens.length())) {
++    screen_number = 0;
++  }
++  QRect rect = screens.at(screen_number)->geometry();
+   move(rect.topLeft());
+   resize( rect.size() );
+   this->showFullScreen();
+@@ -381,7 +387,7 @@ void PDFViewerWindow::resizeEvent(QResizeEvent* resize
+ 		! i3shellcode_executed
+ 		// Make sure to do this only once
+ 		) {
+-		QApplication::flush(); // Make sure the window has been painted
++		// QApplication::flush(); // Make sure the window has been painted
+ 		// This is the second screen. It has now been created.
+ 		// so we should call the i3 shellcode now
+ 		const std::string shellcode = runtimeConfiguration.i3workaround_shellcode();



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909040208.x8428R1N097372>