~ubuntu-branches/ubuntu/trusty/kdepimlibs/trusty

« back to all changes in this revision

Viewing changes to akonadi/contact/contactgrouplineedit.cpp

  • Committer: Package Import Robot
  • Author(s): Rohan Garg, Rohan Garg, Philip Muškovac
  • Date: 2013-11-23 17:36:44 UTC
  • mfrom: (1.1.102)
  • Revision ID: package-import@ubuntu.com-20131123173644-p5ow94192ezsny8g
Tags: 4:4.11.80-0ubuntu1
[ Rohan Garg ]
* New upstream beta release
  - Bump akonadi requirement to 1.10.45
  - Update install files
  - Update symbols

[ Philip Muškovac ]
* kdepimlibs-dev/-dbg breaks/replaces kdepim-runtime/-dbg (<< 4:4.11.80)

Show diffs side-by-side

added added

removed removed

Lines of Context:
87
87
 
88
88
  disconnect( this, SIGNAL(textChanged(QString)), this, SLOT(invalidateReference()) );
89
89
 
90
 
  updateView( reference.uid(), reference.preferredEmail() );
 
90
  updateView( reference );
91
91
}
92
92
 
93
93
KABC::ContactGroup::ContactReference ContactGroupLineEdit::contactReference() const
120
120
  mContainsReference = false;
121
121
}
122
122
 
123
 
void ContactGroupLineEdit::updateView( const QString &uid, const QString &preferredEmail )
 
123
void ContactGroupLineEdit::updateView( const KABC::ContactGroup::ContactReference &reference )
124
124
{
125
 
  Akonadi::ItemFetchJob *job = new Akonadi::ItemFetchJob( Akonadi::Item( uid.toLongLong() ) );
 
125
  Akonadi::Item item;
 
126
  if ( !reference.gid().isEmpty() ) {
 
127
    item.setGid( reference.gid() );
 
128
  } else {
 
129
    item.setId( reference.uid().toLongLong() );
 
130
  }
 
131
  Akonadi::ItemFetchJob *job = new Akonadi::ItemFetchJob( item );
126
132
  job->fetchScope().fetchFullPayload();
127
 
  job->setProperty( "preferredEmail", preferredEmail );
 
133
  job->setProperty( "preferredEmail", reference.preferredEmail() );
128
134
  connect( job, SIGNAL(result(KJob*)), SLOT(fetchDone(KJob*)) );
129
135
}
130
136
 
164
170
    setText( QString::fromLatin1( "%1 <%2>" ).arg( name ).arg( email ) );
165
171
  }
166
172
 
 
173
  mContactReference.setGid( contact.uid() );
167
174
  mContactReference.setUid( QString::number( item.id() ) );
168
175
 
169
176
  if ( contact.preferredEmail() != email ) {