summaryrefslogtreecommitdiffabout
path: root/korganizer/kojournalview.cpp
Unidiff
Diffstat (limited to 'korganizer/kojournalview.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/kojournalview.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/korganizer/kojournalview.cpp b/korganizer/kojournalview.cpp
index 7a96aa5..6fa9b23 100644
--- a/korganizer/kojournalview.cpp
+++ b/korganizer/kojournalview.cpp
@@ -146,56 +146,56 @@ void KOJournalView::clearList()
146void KOJournalView::newJournal() 146void KOJournalView::newJournal()
147{ 147{
148 //qDebug(" KOJournalView::newJournal()"); 148 //qDebug(" KOJournalView::newJournal()");
149 flushView(); 149 flushView();
150 Journal* mJournal = new Journal; 150 Journal* mJournal = new Journal;
151 mJournal->setDtStart(QDateTime(mDate,QTime(0,0,0))); 151 mJournal->setDtStart(QDateTime(mDate,QTime(0,0,0)));
152 mCalendar->addJournal(mJournal); 152 mCalendar->addJournal(mJournal);
153 showDates( mDate, QDate() ); 153 showDates( mDate, QDate() );
154} 154}
155 155
156void KOJournalView::showOnly ( Journal* j ) 156void KOJournalView::showOnly ( Journal* j )
157{ 157{
158 //qDebug("showOnly %x ", j); 158 qDebug("showOnly %x ", j);
159 flushView(); 159 flushView();
160 if ( j == 0 ) { 160 if ( j == 0 ) {
161 showDates( mDate, QDate() ); 161 showDates( mDate, QDate() );
162 return; 162 return;
163 } 163 }
164 QPtrList<Journal> jl; 164 QPtrList<Journal> jl;
165 jl.append ( j ); 165 jl.append ( j );
166 showList( jl ); 166 showList( jl );
167 JournalEntry* mEntry = jEntries.first(); 167 JournalEntry* mEntry = jEntries.first();
168 mEntry->setShowOnly(); 168 mEntry->setShowOnly();
169} 169}
170void KOJournalView::showList(QPtrList<Journal> jl) 170void KOJournalView::showList(QPtrList<Journal> jl)
171{ 171{
172 //qDebug("KOJournalView::showList %d",jl.count() ); 172 qDebug("KOJournalView::showList %d",jl.count() );
173 JournalEntry* mEntry = jEntries.first(); 173 JournalEntry* mEntry = jEntries.first();
174 JournalEntry* firstEntry = mEntry; 174 JournalEntry* firstEntry = mEntry;
175 int count = jl.count(); 175 int count = jl.count();
176 int iii = 0; 176 int iii = 0;
177 while ( iii < count ) { 177 while ( iii < count ) {
178 if ( !mEntry ) { 178 if ( !mEntry ) {
179 mEntry = getNewEntry(); 179 mEntry = getNewEntry();
180 mEntry->show();
181 mEntry->setVisibleMode( true );
182 mEntry->setDate(mDate); 180 mEntry->setDate(mDate);
183 mEntry->setJournal(jl.at(iii)); 181 mEntry->setJournal(jl.at(iii));
182 mEntry->setVisibleMode( true );
183 mEntry->show();
184 mEntry = 0; 184 mEntry = 0;
185 } else { 185 } else {
186 mEntry->setDate(mDate); 186 mEntry->setDate(mDate);
187 mEntry->setJournal(jl.at(iii)); 187 mEntry->setJournal(jl.at(iii));
188 mEntry->show();
189 mEntry->setVisibleMode( true ); 188 mEntry->setVisibleMode( true );
189 mEntry->show();
190 mEntry = jEntries.next(); 190 mEntry = jEntries.next();
191 } 191 }
192 ++iii; 192 ++iii;
193 } 193 }
194 while ( mEntry ) { 194 while ( mEntry ) {
195 mEntry->setDate(mDate); 195 mEntry->setDate(mDate);
196 mEntry->clear(); 196 mEntry->clear();
197 if ( mEntry != firstEntry ) { 197 if ( mEntry != firstEntry ) {
198 mEntry->hide(); 198 mEntry->hide();
199 mEntry->setVisibleMode( false ); 199 mEntry->setVisibleMode( false );
200 } 200 }
201 else { 201 else {