~ubuntu-branches/ubuntu/vivid/digikam/vivid

« back to all changes in this revision

Viewing changes to core/digikam/tags/addtagscompletionbox.cpp

  • Committer: Package Import Robot
  • Author(s): Philip Muškovac
  • Date: 2012-02-14 19:29:29 UTC
  • mfrom: (1.2.38) (3.1.16 experimental)
  • Revision ID: package-import@ubuntu.com-20120214192929-cx2zia3b2nt67lvz
Tags: 4:2.5.0-1ubuntu1
* Merge from debian unstable, remaining changes:
  - keep seperate binary packages:
    + libkface1, libkface-data, libkface-dev
    + libkgeomap1, libkgeomap-data, libkgeomap-dev
    + libvkontakte1, libkvkontakte-dev
    + libmediawiki1, libmediawiki-dev
  - keep patches:
    + kubuntu_mysqld_executable_name.diff
  - don't fail on missing files in dh_install
  - install oxygen icons for kipi-plugins
  - build-depend on mysql 5.5 instead of 5.1
  - update install files
* digikam breaks/replaces kipi-plugins-common << 4:2.5.0~
* digikam-doc breaks/replaces digikam-data << 4:2.5.0~
* digikam-data breaks/replaces kipi-plugins << 4:2.5.0~
* kipi-plugins-common breaks/replaces kipi-plugins << 4:2.5.0~

Show diffs side-by-side

added added

removed removed

Lines of Context:
267
267
    AddTagsCompletionBoxItem* createItemTopLevel    = d->createItemForNewTag(currentText, 0);
268
268
 
269
269
    QList<AddTagsCompletionBoxItem*> assignItems;
270
 
    foreach (const QString& tagName, completionEntries)
 
270
    foreach(const QString& tagName, completionEntries)
271
271
    {
272
272
        QList<int> tagIds = TagsCache::instance()->tagsForName(tagName);
273
273
        bool uniqueName   = tagIds.count() == 1;
274
274
 
275
 
        foreach (int tagId, tagIds)
 
275
        foreach(int tagId, tagIds)
276
276
        {
277
277
            AddTagsCompletionBoxItem* item = d->createItemForExistingTag(AlbumManager::instance()->findTAlbum(tagId), uniqueName);
278
278
 
292
292
        {
293
293
            addItem(createItemUnderParent);
294
294
            setCurrentItem(createItemUnderParent);
295
 
            foreach (AddTagsCompletionBoxItem* item, assignItems)
 
295
            foreach(AddTagsCompletionBoxItem* item, assignItems)
296
296
            {
297
297
                addItem(item);
298
298
            }
302
302
        {
303
303
            addItem(createItemTopLevel);
304
304
            setCurrentItem(createItemTopLevel);
305
 
            foreach (AddTagsCompletionBoxItem* item, assignItems)
 
305
            foreach(AddTagsCompletionBoxItem* item, assignItems)
306
306
            {
307
307
                addItem(item);
308
308
            }
311
311
    }
312
312
    else
313
313
    {
314
 
        foreach (AddTagsCompletionBoxItem* item, assignItems)
 
314
        foreach(AddTagsCompletionBoxItem* item, assignItems)
315
315
        {
316
316
            addItem(item);
317
317
 
627
627
                // sort lexically
628
628
                QMap<QString, int> map;
629
629
 
630
 
                foreach (int id, tagIds)
 
630
                foreach(int id, tagIds)
631
631
                {
632
632
                    map[TagsCache::instance()->tagPath(id, TagsCache::NoLeadingSlash)] = id;
633
633
                }