rpms/taskjuggler/devel taskjuggler-2.4.0-zoomingreportcrash.patch, NONE, 1.1 taskjuggler.spec, 1.11, 1.12

Ondrej Vasik (ovasik) fedora-extras-commits at redhat.com
Thu Jan 10 17:05:50 UTC 2008


Author: ovasik

Update of /cvs/extras/rpms/taskjuggler/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv28198

Modified Files:
	taskjuggler.spec 
Added Files:
	taskjuggler-2.4.0-zoomingreportcrash.patch 
Log Message:
upstream fix for crash when zooming report after a non-embedded report has been viewed last

taskjuggler-2.4.0-zoomingreportcrash.patch:

--- NEW FILE taskjuggler-2.4.0-zoomingreportcrash.patch ---
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


Index: taskjuggler.spec
===================================================================
RCS file: /cvs/extras/rpms/taskjuggler/devel/taskjuggler.spec,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- taskjuggler.spec	5 Oct 2007 13:45:54 -0000	1.11
+++ taskjuggler.spec	10 Jan 2008 17:05:09 -0000	1.12
@@ -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(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 @@
 
 #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 @@
 
 
 %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)
 




More information about the fedora-extras-commits mailing list