~ubuntu-branches/ubuntu/saucy/digikam/saucy

« back to all changes in this revision

Viewing changes to libs/database/albumdb.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Christian Mangold
  • Date: 2010-04-09 21:30:01 UTC
  • mfrom: (1.2.28 upstream)
  • Revision ID: james.westby@ubuntu.com-20100409213001-4bfyibrd359rn7o3
Tags: 2:1.2.0-0ubuntu1
* New upstream release (LP: #560576)
* Remove all patches, fixed upstream
  - Remove quilt build-depend

Show diffs side-by-side

added added

removed removed

Lines of Context:
543
543
 
544
544
    if (albumURL.isEmpty())
545
545
    {
546
 
        *iconAlbumRelativePath = QString();
 
546
        *iconAlbumRelativePath = QString(); // krazy:exclude=nullstrassign
547
547
        *icon = iconKDE;
548
548
        return !iconKDE.isEmpty();
549
549
    }
550
550
    else
551
551
    {
552
552
        *iconAlbumRelativePath = albumURL + '/' + iconName;
553
 
        *icon = QString();
 
553
        *icon = QString(); // krazy:exclude=nullstrassign
554
554
        return true;
555
555
    }
556
556
}
3116
3116
 
3117
3117
    d->db->recordChangeset(ImageChangeset(dstId, fields));
3118
3118
 
 
3119
    copyImageTags(srcId, dstId);
 
3120
    copyImageProperties(srcId, dstId);
 
3121
}
 
3122
 
 
3123
void AlbumDB::copyImageProperties(qlonglong srcId, qlonglong dstId)
 
3124
{
 
3125
    d->db->execSql( QString("INSERT INTO ImageProperties "
 
3126
                            " (imageid, property, value) "
 
3127
                            "SELECT ?, property, value "
 
3128
                            "FROM ImageProperties WHERE imageid=?;"),
 
3129
                    dstId, srcId );
 
3130
}
 
3131
 
 
3132
void AlbumDB::copyImageTags(qlonglong srcId, qlonglong dstId)
 
3133
{
3119
3134
    d->db->execSql( QString("INSERT INTO ImageTags "
3120
3135
                            " (imageid, tagid) "
3121
3136
                            "SELECT ?, tagid "
3124
3139
    // leave empty tag list for now
3125
3140
    d->db->recordChangeset(ImageTagChangeset(dstId, QList<int>(), ImageTagChangeset::Added));
3126
3141
 
3127
 
    d->db->execSql( QString("INSERT INTO ImageProperties "
3128
 
                            " (imageid, property, value) "
3129
 
                            "SELECT ?, property, value "
3130
 
                            "FROM ImageProperties WHERE imageid=?;"),
3131
 
                    dstId, srcId );
3132
3142
}
3133
3143
 
3134
3144
bool AlbumDB::copyAlbumProperties(int srcAlbumID, int dstAlbumID)