[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#593610: release.debian.org: freeze exception pre-approval: qorganizer



Package: release.debian.org
Severity: normal

Hello,

Today I received a mail from qorganizer's upstream author:

->8-
[...]
I found a very critical compatibility issue in qOrganizer 3.1-4. It
doesn't work well with Qt 4.6. I have issued a bugfix release.
[...]
Whenever used with the latest version of Qt some items (event titles)
from the Schedule will randomly disappear.  Without warning, causing the
user to loose data. [...]
-8<-

Qorganizer has priority 'optional' and losing data sounds like important
bug for me. Can I upload new upstream patch release 3.1.5 (current is
3.1.4)?

Upstream diffstat (excluding whitespace changes and stripping binaries
from tarball that are rebuilt anyway) attached.


P.S. Thanks for your hard work in preparing Squeeze release!

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
diff -urN -b /tmp/tardiffdir1/qOrganizer-v3.1-4/CHANGELOG.txt /tmp/tardiffdir2/qOrganizer-v3.1-5/CHANGELOG.txt
--- /tmp/tardiffdir1/qOrganizer-v3.1-4/CHANGELOG.txt	2008-09-07 13:33:54.000000000 +0300
+++ /tmp/tardiffdir2/qOrganizer-v3.1-5/CHANGELOG.txt	2010-08-19 13:05:28.000000000 +0300
@@ -1,3 +1,7 @@
+v3.1 Update 5:
+-Fixed critical compatibility issue with Qt 4.6
+-Fixed compile error under Qt 4.6
+
 v3.1 Update 4:
  -Added Polish translation thanks to Dariusz Gadomski
  -Fixed a bug that caused memory problems and crashes on 64 bit systems
Binary files /tmp/tardiffdir1/qOrganizer-v3.1-4/qOrganizer and /tmp/tardiffdir2/qOrganizer-v3.1-5/qOrganizer differ
diff -urN -b /tmp/tardiffdir1/qOrganizer-v3.1-4/src/qcalendar.cpp /tmp/tardiffdir2/qOrganizer-v3.1-5/src/qcalendar.cpp
--- /tmp/tardiffdir1/qOrganizer-v3.1-4/src/qcalendar.cpp	1970-01-01 02:00:00.000000000 +0200
+++ /tmp/tardiffdir2/qOrganizer-v3.1-5/src/qcalendar.cpp	2010-02-13 02:26:51.000000000 +0200
@@ -0,0 +1,40 @@
+#include "qcalendar.h"
+
+QCalendar :: QCalendar()
+{
+
+}
+
+
+void QCalendar :: addColoredDate(int year,int month, int day)
+{
+    QDate sdate(year,month,day);
+    dateSet.insert(sdate);
+}
+
+
+void QCalendar :: removeColoredDate(int year,int month, int day)
+{
+    QDate sdate(year,month,day);
+    dateSet.remove(sdate);
+}
+
+
+void QCalendar :: paintCell(QPainter *painter, const QRect &rect, const QDate &date) const
+{
+    if((dateSet.contains(date)) && (date != selectedDate())) {
+        painter->fillRect(rect, Qt::red);
+        painter->save();
+        painter->setPen(Qt::white);
+        painter->drawText(rect, Qt::AlignCenter, QString::number(date.day()));
+        painter->restore();
+    }
+    else
+        QCalendarWidget :: paintCell(painter,rect,date);
+}
+
+
+QCalendar :: ~QCalendar()
+{
+
+}
diff -urN -b /tmp/tardiffdir1/qOrganizer-v3.1-4/src/qcalendar.h /tmp/tardiffdir2/qOrganizer-v3.1-5/src/qcalendar.h
--- /tmp/tardiffdir1/qOrganizer-v3.1-4/src/qcalendar.h	1970-01-01 02:00:00.000000000 +0200
+++ /tmp/tardiffdir2/qOrganizer-v3.1-5/src/qcalendar.h	2010-02-13 02:26:51.000000000 +0200
@@ -0,0 +1,35 @@
+#ifndef QCALENDAR_H
+#define QCALENDAR_H
+
+#include <QCalendarWidget>
+#include <QPainter>
+#include <QDate>
+#include <QColor>
+#include <QSet>
+
+
+inline uint qHash(const QDate &d)
+    {
+                return d.year()+d.month()+d.day();
+    }
+
+
+class QCalendar : public QCalendarWidget
+{
+public:
+    QCalendar();
+    ~QCalendar();
+
+   void addColoredDate(int year,int month, int day);
+   void removeColoredDate(int year,int month,int day);
+
+
+ protected:
+   QSet<QDate> dateSet;
+
+ private:
+    virtual void paintCell(QPainter *painter, const QRect &rect, const QDate &date) const;
+
+};
+
+#endif // QCALENDAR_H
diff -urN -b /tmp/tardiffdir1/qOrganizer-v3.1-4/src/qorganizer.cpp /tmp/tardiffdir2/qOrganizer-v3.1-5/src/qorganizer.cpp
--- /tmp/tardiffdir1/qOrganizer-v3.1-4/src/qorganizer.cpp	2008-09-07 11:02:49.000000000 +0300
+++ /tmp/tardiffdir2/qOrganizer-v3.1-5/src/qorganizer.cpp	2010-08-18 10:04:02.000000000 +0300
@@ -433,7 +433,7 @@
 void qOrganizer::addCalendarPageWidgets()
 {
   //widgets in the page 
-  calendar=new QCalendarWidget; //The Calendar
+  calendar=new QCalendar(); //The Calendar
   calendar->setGridVisible(true);
   calendar-> setFirstDayOfWeek (Qt::DayOfWeek(C_FIRST_DAY_OF_WEEK)); 
   calendar->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Fixed);
@@ -445,6 +445,11 @@
 
   connect(calendar, SIGNAL(selectionChanged()), this, SLOT(updateDay()));
   
+  /*connect(calendar, SIGNAL(currentPageChanged (int,int)) , this, SLOT (loadSpecialDays(int,int)));
+  connect(calendar, SIGNAL(clicked()) , this, SLOT (loadSpecialDays(int,int)));
+
+  loadSpecialDays(date.year(),date.month());*/
+  
   tableWid = new CQTableWidget();
   tableWid->setRowCount(C_NRROWS);
   tableWid->setColumnCount(4);
@@ -1154,7 +1159,7 @@
           else 
            item->setText(list.at(j)); 
         //This is the way to access an item from the QStringList
-        if(tableWid->item(i,j)!=0) delete tableWid->takeItem(i,j);
+        //if(tableWid->item(i,j)!=0) delete tableWid->takeItem(i,j);
         tableWid->setItem(i,j,item);
       }
      }
@@ -1523,7 +1528,9 @@
          QImage *image = new QImage(origin); 
          if(!image->isNull())
           {
-           document->addResource(QTextDocument::ImageResource,origin,image);
+           QVariant variant;
+           variant = *image;
+           document->addResource(QTextDocument::ImageResource,origin,variant);
            cursor.insertImage(origin);
           }
          delete image;
@@ -1669,7 +1676,7 @@
        {
         item= new QTableWidgetItem(QTableWidgetItem::Type);
         item->setText(slist.at(j));
-        if(list->item(i,j)!=0) delete list->takeItem(i,j);
+       // if(list->item(i,j)!=0) delete list->takeItem(i,j);
         list->setItem(i,j,item);
        };
       }
@@ -1841,7 +1848,7 @@
        {
         item= new QTableWidgetItem(QTableWidgetItem::Type);
         item->setText(slist.at(j));
-        if(table->item(i,j)!=0) delete table->takeItem(i,j);
+        //if(table->item(i,j)!=0) delete table->takeItem(i,j);
         table->setItem(i,j,item);
        }
       }
@@ -2035,7 +2042,7 @@
       { 
        item= new QTableWidgetItem(QTableWidgetItem::Type);
        item->setText(v[j]);
-       if(markTable->item(i,j)!=0) delete markTable->takeItem(i,j);
+     // if(markTable->item(i,j)!=0) delete markTable->takeItem(i,j);
        markTable->setItem(i,j,item); 
       }
     }  
@@ -2110,7 +2117,7 @@
        {
         item= new QTableWidgetItem(QTableWidgetItem::Type);
         item->setText(v[j]);
-        if(absenceTable->item(i,j)!=0) delete absenceTable->takeItem(i,j);
+       // if(absenceTable->item(i,j)!=0) delete absenceTable->takeItem(i,j);
         absenceTable->setItem(i,j,item);
        };
      }
@@ -3408,7 +3415,7 @@
      QString text = query.value(j).toString();
      item= new QTableWidgetItem(QTableWidgetItem::Type);
      item->setText(text);
-     if(tableWid->item(i,j)!=0) delete tableWid->takeItem(i,j);
+     //if(tableWid->item(i,j)!=0) delete tableWid->takeItem(i,j);
      tableWid->setItem(i,j,item); 
     }
   }
@@ -3539,7 +3546,7 @@
      QString text = query.value(j).toString();
      item= new QTableWidgetItem(QTableWidgetItem::Type);
      item->setText(text);
-     if(list->item(i,j)!=0) delete list->takeItem(i,j);
+     //if(list->item(i,j)!=0) delete list->takeItem(i,j);
      list->setItem(i,j,item); 
     }
   }
@@ -3663,7 +3670,7 @@
      QString text = query.value(j).toString();
      item= new QTableWidgetItem(QTableWidgetItem::Type);
      item->setText(text);
-     if(table->item(i,j)!=0) delete table->takeItem(i,j);
+    // if(table->item(i,j)!=0) delete table->takeItem(i,j);
      table->setItem(i,j,item); 
     }
   }
@@ -3815,7 +3822,7 @@
      QString text = query.value(j).toString();
      item= new QTableWidgetItem(QTableWidgetItem::Type);
      item->setText(text);
-     if(markTable->item(i,j)!=0) delete markTable->takeItem(i,j);
+     //if(markTable->item(i,j)!=0) delete markTable->takeItem(i,j);
      markTable->setItem(i,j,item); 
     }
   }
@@ -3926,7 +3933,7 @@
      QString text = query.value(j).toString();
      item= new QTableWidgetItem(QTableWidgetItem::Type);
      item->setText(text);
-     if(absenceTable->item(i,j)!=0) delete absenceTable->takeItem(i,j);
+     //if(absenceTable->item(i,j)!=0) delete absenceTable->takeItem(i,j);
      absenceTable->setItem(i,j,item); 
     }
   }
@@ -4447,6 +4454,52 @@
   }
 }
 
+
+void qOrganizer :: loadSpecialDays(int y,int m)
+{
+    if(C_STORINGMODE!=0)
+        loadSpecialDaysDB();
+    else
+    {
+        //I could list every file in the schedule folder or I could just check every day for this month
+        //The second one is simpler
+        setCalDir();
+        if (y == 0) y = calendar -> selectedDate().year();
+        if (m == 0) m = calendar -> selectedDate().month();
+
+        QString fileName;
+        QString monthstr;
+        QString daystr;
+        QFile file(fileName);
+
+        for (int d=1;d<=31;d++)
+              {
+                //If the month doesn't have 31 days the month won't exist anyway.
+
+                monthstr = QString::number(m);
+                if(m<10) monthstr = QString("0")+monthstr;
+                daystr = QString :: number (d);
+                if(d<10) daystr = QString("0")+daystr;
+                fileName = monthstr+QString("_")+daystr+QString("_")+QString::number(y)+QString(".txt");
+                file.setFileName(fileName);
+                if ( file.exists() )
+                  {
+                    calendar -> addColoredDate(y,m,d);
+
+                  }
+
+              }
+   }
+
+}
+
+
+void qOrganizer :: loadSpecialDaysDB()
+{
+
+}
+
+
 qOrganizer::~qOrganizer()
 {
 }
diff -urN -b /tmp/tardiffdir1/qOrganizer-v3.1-4/src/qorganizer.h /tmp/tardiffdir2/qOrganizer-v3.1-5/src/qorganizer.h
--- /tmp/tardiffdir1/qOrganizer-v3.1-4/src/qorganizer.h	2007-09-08 00:51:40.000000000 +0300
+++ /tmp/tardiffdir2/qOrganizer-v3.1-5/src/qorganizer.h	2010-02-13 02:26:51.000000000 +0200
@@ -59,6 +59,7 @@
 #include <QPixmap>
 #include "settings.h"
 #include "delegates.h"
+#include "qcalendar.h"
 
 class QApplication;
 
@@ -249,7 +250,7 @@
       QAction *saveToMySQLDBAct;
       QWidget *CallWid;
       QVBoxLayout *vl;
-      QCalendarWidget *calendar;
+      QCalendar *calendar;
       QWidget *CalendarPage;
       QFontComboBox *fontBox;
       QVBoxLayout *ToDoVl;
@@ -438,6 +439,8 @@
       void saveAbsenceTable();
       void loadMarksTable();
       void loadAbsenceTable();
+      void loadSpecialDays(int year, int month);
+
 
       void trayActivated(QSystemTrayIcon::ActivationReason reason);
       void toggleVisibility();
@@ -486,6 +489,9 @@
       void saveAlltoTXT();
       void saveAlltoMySQLDB();
 
+      void loadSpecialDaysDB();
+
+
       void saveAll();     
       void loadAll();
       void updateCalendar();
diff -urN -b /tmp/tardiffdir1/qOrganizer-v3.1-4/src/qOrganizer.pro /tmp/tardiffdir2/qOrganizer-v3.1-5/src/qOrganizer.pro
--- /tmp/tardiffdir1/qOrganizer-v3.1-4/src/qOrganizer.pro	2008-09-07 13:30:20.000000000 +0300
+++ /tmp/tardiffdir2/qOrganizer-v3.1-5/src/qOrganizer.pro	2010-02-13 02:26:50.000000000 +0200
@@ -1,17 +1,25 @@
-######################################################################
+# #####################################################################
 # Automatically generated by qmake (2.01a) Wed Aug 1 11:45:53 2007
-######################################################################
-
+# #####################################################################
 TEMPLATE = app
 TARGET = 
-DEPENDPATH += . lang
+DEPENDPATH += . \
+    lang
 INCLUDEPATH += .
 
 # Input
-HEADERS += qorganizer.h settings.h delegates.h
-SOURCES += main.cpp qorganizer.cpp settings.cpp delegates.cpp
+HEADERS += qorganizer.h \
+    settings.h \
+    delegates.h \
+    qcalendar.h
+SOURCES += main.cpp \
+    qorganizer.cpp \
+    settings.cpp \
+    delegates.cpp \
+    qcalendar.cpp
 RESOURCES += application.qrc
-QT        += network sql
+QT += network \
+    sql
 TRANSLATIONS += lang/Hungarian.ts \
                 lang/Romanian.ts \
                 lang/Portuguese.ts \

Reply to: