~ubuntu-branches/ubuntu/quantal/kdepim/quantal

« back to all changes in this revision

Viewing changes to messagelist/storagemodel.cpp

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2011-12-15 14:17:51 UTC
  • mto: This revision was merged to the branch mainline in revision 193.
  • Revision ID: package-import@ubuntu.com-20111215141751-bmhdpiwl23wd9w26
Tags: upstream-4.7.90
ImportĀ upstreamĀ versionĀ 4.7.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
119
119
  connect( d->mSopranoModel.data(), SIGNAL(statementRemoved(Soprano::Statement)),
120
120
           SLOT(statementChanged(Soprano::Statement)) );
121
121
 
122
 
  connect( d->mModel, SIGNAL(dataChanged(QModelIndex, QModelIndex)),
123
 
           this, SLOT(onSourceDataChanged(QModelIndex, QModelIndex)) );
 
122
  connect( d->mModel, SIGNAL(dataChanged(QModelIndex,QModelIndex)),
 
123
           this, SLOT(onSourceDataChanged(QModelIndex,QModelIndex)) );
124
124
 
125
125
  connect( d->mModel, SIGNAL(layoutAboutToBeChanged()),
126
126
           this, SIGNAL(layoutAboutToBeChanged()) );
132
132
           this, SIGNAL(modelReset()) );
133
133
 
134
134
  //Here we assume we'll always get QModelIndex() in the parameters
135
 
  connect( d->mModel, SIGNAL(rowsAboutToBeInserted(QModelIndex, int, int)),
136
 
           this, SIGNAL(rowsAboutToBeInserted(QModelIndex, int, int)) );
137
 
  connect( d->mModel, SIGNAL(rowsInserted(QModelIndex, int, int)),
138
 
           this, SIGNAL(rowsInserted(QModelIndex, int, int)) );
139
 
  connect( d->mModel, SIGNAL(rowsAboutToBeRemoved(QModelIndex, int, int)),
140
 
           this, SIGNAL(rowsAboutToBeRemoved(QModelIndex, int, int)) );
141
 
  connect( d->mModel, SIGNAL(rowsRemoved(QModelIndex, int, int)),
142
 
           this, SIGNAL(rowsRemoved(QModelIndex, int, int)) );
 
135
  connect( d->mModel, SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)),
 
136
           this, SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)) );
 
137
  connect( d->mModel, SIGNAL(rowsInserted(QModelIndex,int,int)),
 
138
           this, SIGNAL(rowsInserted(QModelIndex,int,int)) );
 
139
  connect( d->mModel, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)),
 
140
           this, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)) );
 
141
  connect( d->mModel, SIGNAL(rowsRemoved(QModelIndex,int,int)),
 
142
           this, SIGNAL(rowsRemoved(QModelIndex,int,int)) );
143
143
 
144
 
  connect( d->mSelectionModel, SIGNAL(selectionChanged(QItemSelection, QItemSelection)),
 
144
  connect( d->mSelectionModel, SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
145
145
           this, SLOT(onSelectionChanged()) );
146
146
 
147
147
  d->loadSettings();
230
230
{
231
231
  const Item item = itemForRow( row );
232
232
  const KMime::Message::Ptr mail = messageForItem( item );
233
 
  if ( !mail ) return false;
 
233
  if ( !mail ) {
 
234
    return false;
 
235
  }
234
236
 
235
 
  QString sender = mail->from()->asUnicodeString();
236
 
  QString receiver = mail->to()->asUnicodeString();
 
237
  QString sender;
 
238
  if ( mail->from() ) {
 
239
    sender = mail->from()->asUnicodeString();
 
240
  }
 
241
  QString receiver;
 
242
  if ( mail->to() ) {
 
243
    receiver = mail->to()->asUnicodeString();
 
244
  }
237
245
 
238
246
  // Static for speed reasons
239
247
  static const QString noSubject = i18nc( "displayed as subject when the subject of a mail is empty", "No Subject" );