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

« back to all changes in this revision

Viewing changes to akonadi/contact/editor/kedittagsdialog.cpp

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2013-09-30 14:20:53 UTC
  • mfrom: (1.1.101)
  • Revision ID: package-import@ubuntu.com-20130930142053-k66oi27s75lt8l51
Tags: 4:4.11.2-0ubuntu1
New upstream bugfix release

Show diffs side-by-side

added added

removed removed

Lines of Context:
131
131
            QListWidgetItem* item = m_tagsList->item( i );
132
132
            if ( item->checkState() == Qt::Checked ) {
133
133
                const QString label = item->data( Qt::UserRole ).toString();
134
 
                Nepomuk2::Tag tag( label );
135
 
                tag.setLabel( label );
136
 
                m_tags.append( tag );
 
134
                const QString uri = item->data(UrlTag).toString();
 
135
                if (uri.isEmpty()) {
 
136
                    Nepomuk2::Tag tag( label );
 
137
                    tag.setLabel( label );
 
138
                    m_tags.append( tag );
 
139
                } else {
 
140
                    Nepomuk2::Tag tag( uri );
 
141
                    m_tags.append( tag );
 
142
                }
137
143
            }
138
144
        }
139
145
 
231
237
 
232
238
        QListWidgetItem *item = new QListWidgetItem( label, m_tagsList );
233
239
        item->setData( Qt::UserRole, label );
 
240
        item->setData( UrlTag, tag.uri().toString());
234
241
 
235
242
        bool check = false;
236
243
        foreach ( const Nepomuk2::Tag& selectedTag, m_tags ) {