summaryrefslogtreecommitdiff
path: root/graphics/okular/files/patch-shell_shell.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/okular/files/patch-shell_shell.cpp')
-rw-r--r--graphics/okular/files/patch-shell_shell.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/graphics/okular/files/patch-shell_shell.cpp b/graphics/okular/files/patch-shell_shell.cpp
index 9fb4366c96d2..b7b5d87e40b3 100644
--- a/graphics/okular/files/patch-shell_shell.cpp
+++ b/graphics/okular/files/patch-shell_shell.cpp
@@ -1,29 +1,29 @@
---- shell/shell.cpp
+--- shell/shell.cpp.orig 2020-07-18 10:42:15 UTC
+++ shell/shell.cpp
-@@ -163,7 +163,7 @@ bool Shell::openDocument( const QString& url, const QString &serializedOptions )
- KParts::ReadWritePart* const part = m_tabs[0].part;
+@@ -215,7 +215,7 @@ bool Shell::openDocument(const QUrl &url, const QStrin
+ 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;
+- if (!dynamic_cast<Okular::ViewerInterface *>(part)->openNewFilesInTabs() && !part->url().isEmpty() && !ShellUtils::unique(serializedOptions)) {
++ if (!qobject_cast<Okular::ViewerInterface *>(part)->openNewFilesInTabs() && !part->url().isEmpty() && !ShellUtils::unique(serializedOptions)) {
+ 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();
+@@ -235,7 +235,7 @@ bool Shell::canOpenDocs(int numDocs, int desktop)
+ return false;
- 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 );
- }
+ 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;
+@@ -257,7 +257,7 @@ void Shell::openUrl(const QUrl &url, const QString &se
+ applyOptionsToPart(activePart, serializedOptions);
+ activePart->openUrl(url);
+ } else {
+- if (dynamic_cast<Okular::ViewerInterface *>(activePart)->openNewFilesInTabs()) {
++ if (qobject_cast<Okular::ViewerInterface *>(activePart)->openNewFilesInTabs()) {
+ openNewTab(url, serializedOptions);
+ } else {
+ Shell *newShell = new Shell(serializedOptions);