aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/okular
diff options
context:
space:
mode:
authortijl <tijl@FreeBSD.org>2018-05-13 00:35:56 +0800
committertijl <tijl@FreeBSD.org>2018-05-13 00:35:56 +0800
commit9aa1be8cfa71122baeb6b16f200e732e0dfc7569 (patch)
tree6b47076358f679d8620582c88bf25751f1ba619a /graphics/okular
parent1bdc2abb462f19c0e021fdb1807d9a6f703e244a (diff)
downloadfreebsd-ports-gnome-9aa1be8cfa71122baeb6b16f200e732e0dfc7569.tar.gz
freebsd-ports-gnome-9aa1be8cfa71122baeb6b16f200e732e0dfc7569.tar.zst
freebsd-ports-gnome-9aa1be8cfa71122baeb6b16f200e732e0dfc7569.zip
Add a patch from okular-kde4 that is still needed to fix crashes.
PR: 228199 Approved by: kde (tcberner)
Diffstat (limited to 'graphics/okular')
-rw-r--r--graphics/okular/Makefile1
-rw-r--r--graphics/okular/files/patch-shell_shell.cpp29
2 files changed, 30 insertions, 0 deletions
diff --git a/graphics/okular/Makefile b/graphics/okular/Makefile
index ff4cadec65a4..a0b5cba558c5 100644
--- a/graphics/okular/Makefile
+++ b/graphics/okular/Makefile
@@ -2,6 +2,7 @@
PORTNAME= okular
DISTVERSION= ${KDE_APPLICATIONS_VERSION}
+PORTREVISION= 1
CATEGORIES= graphics kde kde-applications
MAINTAINER= kde@FreeBSD.org
diff --git a/graphics/okular/files/patch-shell_shell.cpp b/graphics/okular/files/patch-shell_shell.cpp
new file mode 100644
index 000000000000..9fb4366c96d2
--- /dev/null
+++ b/graphics/okular/files/patch-shell_shell.cpp
@@ -0,0 +1,29 @@
+--- shell/shell.cpp
++++ shell/shell.cpp
+@@ -163,7 +163,7 @@ bool Shell::openDocument( const QString& url, const QString &serializedOptions )
+ KParts::ReadWritePart* const part = m_tabs[0].part;
+
+ // Return false if we can't open new tabs and the only part is occupied
+- if ( !dynamic_cast<Okular::ViewerInterface*>(part)->openNewFilesInTabs()
++ if ( !qobject_cast<Okular::ViewerInterface*>(part)->openNewFilesInTabs()
+ && !part->url().isEmpty()
+ && !ShellUtils::unique(serializedOptions))
+ {
+@@ -181,7 +181,7 @@ bool Shell::canOpenDocs( int numDocs, int desktop )
+ return false;
+
+ KParts::ReadWritePart* const part = m_tabs[0].part;
+- const bool allowTabs = dynamic_cast<Okular::ViewerInterface*>(part)->openNewFilesInTabs();
++ const bool allowTabs = qobject_cast<Okular::ViewerInterface*>(part)->openNewFilesInTabs();
+
+ if( !allowTabs && (numDocs > 1 || !part->url().isEmpty()) )
+ return false;
+@@ -208,7 +208,7 @@ void Shell::openUrl( const KUrl & url, const QString &serializedOptions )
+ }
+ else
+ {
+- if( dynamic_cast<Okular::ViewerInterface *>(activePart)->openNewFilesInTabs() )
++ if( qobject_cast<Okular::ViewerInterface *>(activePart)->openNewFilesInTabs() )
+ {
+ openNewTab( url, serializedOptions );
+ }