diff options
author | tijl <tijl@FreeBSD.org> | 2018-05-13 00:35:56 +0800 |
---|---|---|
committer | tijl <tijl@FreeBSD.org> | 2018-05-13 00:35:56 +0800 |
commit | 9aa1be8cfa71122baeb6b16f200e732e0dfc7569 (patch) | |
tree | 6b47076358f679d8620582c88bf25751f1ba619a /graphics/okular | |
parent | 1bdc2abb462f19c0e021fdb1807d9a6f703e244a (diff) | |
download | freebsd-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/Makefile | 1 | ||||
-rw-r--r-- | graphics/okular/files/patch-shell_shell.cpp | 29 |
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 ); + } |