~ubuntu-branches/ubuntu/vivid/kdepim/vivid

« back to all changes in this revision

Viewing changes to korganizer/views/journalview/kojournalview.cpp

  • Committer: Package Import Robot
  • Author(s): Scott Kitterman, Jonathan Riddell, Rohan Garg, Scott Kitterman
  • Date: 2012-11-21 13:12:36 UTC
  • mfrom: (0.2.33)
  • Revision ID: package-import@ubuntu.com-20121121131236-32ijw9a2txrar80k
Tags: 4:4.9.80-0ubuntu1
[ Jonathan Riddell ]
* New upstream beta release

[ Rohan Garg ]
* Add nepomuk-core-dev to build-deps

[ Scott Kitterman ]
* Add new package, libpimcommon4
  - Add libpimcommon4.install
  - Add to debian/control, including kdepim-dbg and kdepim-dev depends
  - Add to kdepim-dev.install
* Remove usr/bin/backupmail and related files from kmail.install as they are
  not provided by upstream anymore
* Add usr/bin/pimsettingexporter and related files to kmail.install
* Add libnepomukwidgets-dev to build-depends

Show diffs side-by-side

added added

removed removed

Lines of Context:
108
108
 
109
109
void KOJournalView::clearEntries()
110
110
{
111
 
//  kDebug(5850)<<"KOJournalView::clearEntries()";
 
111
  kDebug(5850)<<"KOJournalView::clearEntries()";
112
112
  QMap<QDate, JournalDateView*>::Iterator it;
113
113
  for ( it = mEntries.begin(); it != mEntries.end(); ++it ) {
114
114
    delete it.value();
122
122
    --it;
123
123
    it.value()->clear();
124
124
    const Akonadi::Item::List journals = calendar()->journals( it.key() );
 
125
    kDebug() << "updateview found" << journals.count();
125
126
    Q_FOREACH ( const Akonadi::Item &i, journals ) {
126
127
      it.value()->addJournal( i );
127
128
    }
137
138
{
138
139
  clearEntries();
139
140
  if ( end<start ) {
 
141
    kWarning() << "End is smaller than start. end=" << end << "; start=" << start;
140
142
    return;
141
143
  }
142
144
 
144
146
  Akonadi::Item::List jnls;
145
147
  for ( QDate d=end; d>=start; d=d.addDays(-1) ) {
146
148
    jnls = calendar()->journals( d );
 
149
    kDebug() << "Found" << jnls.count() << "journals on date" << d;
147
150
    it = jnls.constEnd();
148
151
    while ( it != jnls.constBegin() ) {
149
152
      --it;
150
153
      appendJournal( *it, d );
151
154
    }
152
 
    if ( jnls.count() < 1 ) {
 
155
    if ( jnls.isEmpty() ) {
153
156
      // create an empty dateentry widget
154
157
      //updateView();
 
158
      kDebug() << "Appended null journal";
155
159
      appendJournal( Akonadi::Item(), d );
156
160
    }
157
161
  }