summaryrefslogtreecommitdiff
path: root/core/pim/today/plugins/datebook
authorharlekin <harlekin>2003-02-10 23:05:51 (UTC)
committer harlekin <harlekin>2003-02-10 23:05:51 (UTC)
commit871eadc731c0c05c553b8edc8c0e3198127057b6 (patch) (side-by-side diff)
tree88af2b393914bc6c8c479462b4e502ad6ee85062 /core/pim/today/plugins/datebook
parent51452f8478edb77ed1eef61adff314c2d239712f (diff)
downloadopie-871eadc731c0c05c553b8edc8c0e3198127057b6.zip
opie-871eadc731c0c05c553b8edc8c0e3198127057b6.tar.gz
opie-871eadc731c0c05c553b8edc8c0e3198127057b6.tar.bz2
fixed segfault
Diffstat (limited to 'core/pim/today/plugins/datebook') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/plugins/datebook/datebookpluginwidget.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/core/pim/today/plugins/datebook/datebookpluginwidget.cpp b/core/pim/today/plugins/datebook/datebookpluginwidget.cpp
index e2f492e..9a18408 100644
--- a/core/pim/today/plugins/datebook/datebookpluginwidget.cpp
+++ b/core/pim/today/plugins/datebook/datebookpluginwidget.cpp
@@ -40,2 +40,3 @@ DatebookPluginWidget::DatebookPluginWidget( QWidget *parent, const char* name)
+
if ( m_layoutDates ) {
@@ -46,2 +47,4 @@ DatebookPluginWidget::DatebookPluginWidget( QWidget *parent, const char* name)
+ m_eventsList.setAutoDelete( true );
+
readConfig();
@@ -71,2 +74,3 @@ void DatebookPluginWidget::refresh() {
}
+ m_eventsList.clear();
getDates();
@@ -80,15 +84,12 @@ void DatebookPluginWidget::getDates() {
QDate date = QDate::currentDate();
-
QValueList<EffectiveEvent> list = db->getEffectiveEvents( date, date.addDays( m_moreDays ) );
qBubbleSort( list );
- //Config config( "qpe" );
- int count=0;
+ int count = 0;
+ qDebug( QString("List count %1" ).arg(list.count() ) );
if ( list.count() > 0 ) {
- for ( QValueList<EffectiveEvent>::ConstIterator it = list.begin(); it != list.end(); ++it ) {
+ for ( QValueList<EffectiveEvent>::ConstIterator it = list.begin(); it != list.end(); ++it ) {
if ( count <= m_max_lines_meet ) {
- QTime time = QTime::currentTime();
-
if ( !m_onlyLater ) {
@@ -98,3 +99,3 @@ void DatebookPluginWidget::getDates() {
QObject::connect ( l, SIGNAL( editEvent( const Event & ) ), l, SLOT( editEventSlot( const Event & ) ) );
- } else if ( ( time.toString() <= TimeString::dateString( (*it).event().end() ) ) ) {
+ } else if ( QDateTime::currentDateTime() <= (*it).event().end() ) {
count++;