summaryrefslogtreecommitdiff
path: root/source/kde/patch/calligra/0067-Backport-Plan-Fix-insert-file.patch
diff options
context:
space:
mode:
authorPatrick J Volkerding <volkerdi@slackware.com>2019-03-18 22:53:51 +0000
committerEric Hameleers <alien@slackware.com>2019-03-19 08:59:44 +0100
commitd0ac7419a9ebbbcc934641909bca18f194ab1cb2 (patch)
tree063081a912469eeca9908787c532cbc93eebc0c5 /source/kde/patch/calligra/0067-Backport-Plan-Fix-insert-file.patch
parent64c7dee8643c3a5a4fa6619c494e97ba435ade3f (diff)
downloadcurrent-d0ac7419a9ebbbcc934641909bca18f194ab1cb2.tar.gz
Mon Mar 18 22:53:51 UTC 201920190318225351
ap/cups-filters-1.22.2-x86_64-1.txz: Upgraded. kde/calligra-2.9.11-x86_64-28.txz: Rebuilt. Patched to fix Calligra Plan crash. Thanks to Olek. l/adwaita-icon-theme-3.32.0-noarch-1.txz: Upgraded. l/giflib-5.1.8-x86_64-1.txz: Upgraded. l/libssh2-1.8.1-x86_64-1.txz: Upgraded. Fixed several security issues. For more information, see: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-3855 https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-3856 https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-3857 https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-3858 https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-3859 https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-3860 https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-3861 https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-3862 https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-3863 (* Security fix *) x/scim-1.4.18-x86_64-1.txz: Upgraded. xap/mozilla-firefox-60.6.0esr-x86_64-1.txz: Upgraded. This is a bugfix release. For more information, see: https://www.mozilla.org/en-US/firefox/60.6.0/releasenotes/
Diffstat (limited to 'source/kde/patch/calligra/0067-Backport-Plan-Fix-insert-file.patch')
-rw-r--r--source/kde/patch/calligra/0067-Backport-Plan-Fix-insert-file.patch101
1 files changed, 101 insertions, 0 deletions
diff --git a/source/kde/patch/calligra/0067-Backport-Plan-Fix-insert-file.patch b/source/kde/patch/calligra/0067-Backport-Plan-Fix-insert-file.patch
new file mode 100644
index 00000000..4db4becc
--- /dev/null
+++ b/source/kde/patch/calligra/0067-Backport-Plan-Fix-insert-file.patch
@@ -0,0 +1,101 @@
+From 5cffbe5ecf1f82369abbad1a06154368459f7845 Mon Sep 17 00:00:00 2001
+From: Dag Andersen <danders@get2net.dk>
+Date: Mon, 22 Aug 2016 09:20:32 +0200
+Subject: [PATCH 67/80] Backport: Plan: Fix insert file
+
+Use KUrl instead of QString for filename
+KoDocument::openUrl() opens the url (not KoPart)
+---
+ plan/kptmaindocument.cpp | 23 ++++++++++-------------
+ plan/kptmaindocument.h | 4 ++--
+ plan/kptview.cpp | 2 +-
+ 3 files changed, 13 insertions(+), 16 deletions(-)
+
+diff --git a/plan/kptmaindocument.cpp b/plan/kptmaindocument.cpp
+index 2343471..e418972 100644
+--- a/plan/kptmaindocument.cpp
++++ b/plan/kptmaindocument.cpp
+@@ -947,35 +947,32 @@ bool MainDocument::loadAndParse(KoStore *store, const QString &filename, KoXmlDo
+ return true;
+ }
+
+-void MainDocument::insertFile( const QString &filename, Node *parent, Node *after )
++void MainDocument::insertFile( const KUrl &url, Node *parent, Node *after )
+ {
+ Part *part = new Part( this );
+ MainDocument *doc = new MainDocument( part );
+ part->setDocument( doc );
+ doc->disconnect(); // doc shall not handle feedback from openUrl()
+ doc->setAutoSave( 0 ); //disable
+- doc->m_insertFileInfo.url = filename;
++ doc->m_insertFileInfo.url = url;
+ doc->m_insertFileInfo.parent = parent;
+ doc->m_insertFileInfo.after = after;
+ connect(doc, SIGNAL(completed()), SLOT(insertFileCompleted()));
+ connect(doc, SIGNAL(canceled(QString)), SLOT(insertFileCancelled(QString)));
+
+- doc->openUrl( KUrl( filename ) );
++ doc->openUrl( url );
+ }
+
+ void MainDocument::insertFileCompleted()
+ {
+ kDebug(planDbg())<<sender();
+- Part *part = qobject_cast<Part*>( sender() );
+- if ( part ) {
+- MainDocument *doc = qobject_cast<MainDocument*>( part->document() );
+- if ( doc ) {
+- Project &p = doc->getProject();
+- insertProject( p, doc->m_insertFileInfo.parent, doc->m_insertFileInfo.after );
+- } else {
+- KMessageBox::error( 0, i18n("Internal error, failed to insert file.") );
+- }
+- part->deleteLater(); // also deletes document
++ MainDocument *doc = qobject_cast<MainDocument*>( sender() );
++ if ( doc ) {
++ Project &p = doc->getProject();
++ insertProject( p, doc->m_insertFileInfo.parent, doc->m_insertFileInfo.after );
++ doc->documentPart()->deleteLater(); // also deletes document
++ } else {
++ KMessageBox::error( 0, i18n("Internal error, failed to insert file.") );
+ }
+ }
+
+diff --git a/plan/kptmaindocument.h b/plan/kptmaindocument.h
+index 5ead4ea..c467e1f 100644
+--- a/plan/kptmaindocument.h
++++ b/plan/kptmaindocument.h
+@@ -117,7 +117,7 @@ public:
+ Package *loadWorkPackageXML( Project& project, QIODevice*, const KoXmlDocument& document, const KUrl& url );
+ QMap<KDateTime, Package*> workPackages() const { return m_workpackages; }
+
+- void insertFile( const QString &filename, Node *parent, Node *after = 0 );
++ void insertFile( const KUrl &url, Node *parent, Node *after = 0 );
+ bool insertProject( Project &project, Node *parent, Node *after );
+
+ KPlatoAboutPage &aboutPage() { return m_aboutPage; }
+@@ -165,7 +165,7 @@ protected:
+
+ // used by insert file
+ struct InsertFileInfo {
+- QString url;
++ KUrl url;
+ Node *parent;
+ Node *after;
+ } m_insertFileInfo;
+diff --git a/plan/kptview.cpp b/plan/kptview.cpp
+index 6876c3e..b38d8b6 100644
+--- a/plan/kptview.cpp
++++ b/plan/kptview.cpp
+@@ -1452,7 +1452,7 @@ void View::slotInsertFileFinished( int result )
+ return;
+ }
+ if ( result == QDialog::Accepted ) {
+- getPart()->insertFile( dlg->url().url(), dlg->parentNode(), dlg->afterNode() );
++ getPart()->insertFile( dlg->url(), dlg->parentNode(), dlg->afterNode() );
+ }
+ dlg->deleteLater();
+ }
+--
+2.7.4
+