jreznik pushed to taskjuggler (epel7). "upstream fix for crash when zooming report after a non-embedded report has (..more)"
notifications at fedoraproject.org
notifications at fedoraproject.org
Thu Apr 2 16:17:29 UTC 2015
>From 38320acb81f1598a09dd1a05aa65f94de3b7a552 Mon Sep 17 00:00:00 2001
From: Ondrej Vasik <ovasik at fedoraproject.org>
Date: Thu, 10 Jan 2008 17:05:09 +0000
Subject: upstream fix for crash when zooming report after a non-embedded
report has been viewed last
diff --git a/taskjuggler-2.4.0-zoomingreportcrash.patch b/taskjuggler-2.4.0-zoomingreportcrash.patch
new file mode 100644
index 0000000..0127c32
--- /dev/null
+++ b/taskjuggler-2.4.0-zoomingreportcrash.patch
@@ -0,0 +1,172 @@
+diff -urNp taskjuggler-2.4.0-orig/TaskJugglerUI/ReportManager.cpp taskjuggler-2.4.0/TaskJugglerUI/ReportManager.cpp
+--- taskjuggler-2.4.0-orig/TaskJugglerUI/ReportManager.cpp 2007-07-01 17:32:11.000000000 +0200
++++ taskjuggler-2.4.0/TaskJugglerUI/ReportManager.cpp 2008-01-10 17:32:33.000000000 +0100
+@@ -355,13 +355,16 @@ ReportManager::showReport(QListViewItem*
+ * summary report. The summary report has no report definition, so it
+ * can be identified by a 0 pointer. */
+ for (std::list<ManagedReportInfo*>::const_iterator
+- mri = reports.begin();
+- mri != reports.end(); ++mri)
+- if ((*mri)->getProjectReport() == 0)
++ mri = reports.begin(); mri != reports.end(); ++mri)
++ if ((*mri)->getProjectReport() == 0)
++ {
+ mr = *mri;
++ break;
++ }
+ }
+
+ TjUIReportBase* tjr = mr->getReport();
++ bool result = true;
+ if (tjr == 0)
+ {
+ if (mr->getProjectReport() == 0)
+@@ -377,7 +380,7 @@ ReportManager::showReport(QListViewItem*
+ CSVReport* csvReport =
+ dynamic_cast<CSVReport*>(mr->getProjectReport());
+ if (!csvReport->generate())
+- return false;
++ result = false;
+ // show the CSV file in preferred CSV handler
+ KURL reportUrl =
+ KURL::fromPathOrURL(mr->getProjectReport()->
+@@ -387,7 +390,6 @@ ReportManager::showReport(QListViewItem*
+ changeStatusBar(i18n("Displaying CSV report: '%1'")
+ .arg(mr->getProjectReport()->getFileName()));
+ KRun::runURL(reportUrl, "text/x-csv");
+- return true;
+ }
+ else if (strncmp(mr->getProjectReport()->getType(), "HTML", 4) == 0)
+ tjr = new TjHTMLReport(reportStack, this, mr->getProjectReport());
+@@ -396,17 +398,19 @@ ReportManager::showReport(QListViewItem*
+ ICalReport* icalReport =
+ dynamic_cast<ICalReport*>(mr->getProjectReport());
+ if (!icalReport->generate())
+- return false;
+- // show the TODO list in Korganizer
+- KURL reportUrl =
+- KURL::fromPathOrURL(mr->getProjectReport()->
+- getDefinitionFile());
+- reportUrl.setFileName(mr->getProjectReport()->getFileName());
+-
+- changeStatusBar(i18n("Displaying iCalendar: '%1'")
+- .arg(mr->getProjectReport()->getFileName()));
+- KRun::runURL(reportUrl, "text/calendar");
+- return true;
++ result = false;
++ else
++ {
++ // show the TODO list in Korganizer
++ KURL reportUrl =
++ KURL::fromPathOrURL(mr->getProjectReport()->
++ getDefinitionFile());
++ reportUrl.setFileName(mr->getProjectReport()->getFileName());
++
++ changeStatusBar(i18n("Displaying iCalendar: '%1'")
++ .arg(mr->getProjectReport()->getFileName()));
++ KRun::runURL(reportUrl, "text/calendar");
++ }
+ }
+ else if (strncmp(mr->getProjectReport()->getType(), "Export", 6) == 0)
+ {
+@@ -414,23 +418,24 @@ ReportManager::showReport(QListViewItem*
+ ExportReport* exportReport =
+ dynamic_cast<ExportReport*>(mr->getProjectReport());
+ if (!exportReport->generate())
+- return false;
+-
+- // Get the full file name as URL and show it in the editor
+- KURL reportUrl =
+- KURL::fromPathOrURL(mr->getProjectReport()->getFullFileName());
+- if (reportUrl.url().right(4) == ".tjp")
+- {
+- changeStatusBar(i18n("Starting new TaskJuggler for '%1'")
+- .arg(mr->getProjectReport()->getFileName()));
+- KRun::runURL(reportUrl, "application/x-tjp");
+- }
++ result = false;
+ else
+ {
+- emit signalEditFile(reportUrl);
+- showReportTab = false;
++ // Get the full file name as URL and show it in the editor
++ KURL reportUrl =
++ KURL::fromPathOrURL(mr->getProjectReport()->getFullFileName());
++ if (reportUrl.url().right(4) == ".tjp")
++ {
++ changeStatusBar(i18n("Starting new TaskJuggler for '%1'")
++ .arg(mr->getProjectReport()->getFileName()));
++ KRun::runURL(reportUrl, "application/x-tjp");
++ }
++ else
++ {
++ emit signalEditFile(reportUrl);
++ showReportTab = false;
++ }
+ }
+- return true;
+ }
+ else if (strncmp(mr->getProjectReport()->getType(), "XMLReport", 9)
+ == 0)
+@@ -448,36 +453,44 @@ ReportManager::showReport(QListViewItem*
+ else
+ changeStatusBar(i18n("Could not generated report '%1'")
+ .arg(mr->getProjectReport()->getFileName()));
+- return result;
+ }
+ else
+ {
+ kdDebug() << "Report type " << mr->getProjectReport()->getType()
+ << " not yet supported" << endl;
+- return false;
++ result = false;
+ }
+
+- if (tjr)
++ if (!tjr)
+ {
+- connect(tjr, SIGNAL(signalChangeStatusBar(const QString&)),
+- this, SLOT(changeStatusBar(const QString&)));
+- connect(tjr, SIGNAL(signalEditCoreAttributes(CoreAttributes*)),
+- this, SLOT(editCoreAttributes(CoreAttributes*)));
++ /* A report with no widget that can be embedded in the report view
++ * has been selected. We fall back to show the summary report and
++ * unselect the selected browser item. */
++ if (browser->currentItem())
++ browser->setSelected(browser->currentItem(), false);
++ tjr = new TjSummaryReport(reportStack, this, project);
++ }
+
+- if (!tjr->generateReport())
+- {
+- delete tjr;
+- return false;
+- }
++ connect(tjr, SIGNAL(signalChangeStatusBar(const QString&)),
++ this, SLOT(changeStatusBar(const QString&)));
++ connect(tjr, SIGNAL(signalEditCoreAttributes(CoreAttributes*)),
++ this, SLOT(editCoreAttributes(CoreAttributes*)));
+
+- reportStack->addWidget(tjr);
+- mr->setReport(tjr);
++ if (!tjr->generateReport())
++ {
++ delete tjr;
++ if (browser->currentItem())
++ browser->setSelected(browser->currentItem(), false);
++ return false;
+ }
++
++ reportStack->addWidget(tjr);
++ mr->setReport(tjr);
+ }
+- if (tjr)
+- reportStack->raiseWidget(tjr);
+
+- return true;
++ reportStack->raiseWidget(tjr);
++
++ return result;
+ }
+
+ void
diff --git a/taskjuggler.spec b/taskjuggler.spec
index dc8d4e2..1ab9a7f 100644
--- a/taskjuggler.spec
+++ b/taskjuggler.spec
@@ -1,6 +1,6 @@
Name: taskjuggler
Version: 2.4.0
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: Project management tool
Group: Applications/Productivity
@@ -16,6 +16,7 @@ Requires(post): desktop-file-utils
Requires(postun): desktop-file-utils
Patch0: taskjuggler-2.4.0-floatpointformat.patch
+Patch1: taskjuggler-2.4.0-zoomingreportcrash.patch
%description
TaskJuggler is a modern and powerful project management tool. Its new approach
@@ -33,6 +34,8 @@ communication management.
#Floating point formatter bug with lost zeros(upstream)
%patch0 -p1
+#Fixed crash when zooming a report after a non-embedded report has been viewed.
+%patch1 -p1
%build
[ -n "$QTDIR" ] || . %{_sysconfdir}/profile.d/qt.sh
@@ -101,6 +104,10 @@ fi
%changelog
+* Thu Jan 10 2008 Ondrej Vasik <ovasik at redhat.com> - 2.4.0-5
+- Fixed crash when zooming a report after a non-embedded
+ report has been viewed last(upstream).
+
* Fri Oct 5 2007 Ondrej Vasik <ovasik at redhat.com> - 2.4.0-4
- fixed serious bug in floating point formatter(upstream)
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/taskjuggler.git/commit/?h=epel7&id=38320acb81f1598a09dd1a05aa65f94de3b7a552
More information about the scm-commits
mailing list