~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): Felix Geyer
  • Date: 2010-08-26 19:25:16 UTC
  • mfrom: (1.2.30 upstream)
  • Revision ID: james.westby@ubuntu.com-20100826192516-mkbdww0h5v2x4yoy
Tags: 2:1.4.0-0ubuntu1
* New upstream bugfix release (LP: #626751)
* Install the file NEWS as upstream changelog because "ChangeLog" is
  too verbose.
* Don't copy the desktop .pot file to imageplugins, not needed anymore.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1285
1285
    d->db->recordChangeset(ImageChangeset(imageID, fields));
1286
1286
}
1287
1287
 
1288
 
void AlbumDB::changeImageInformation(qlonglong imageId, const QVariantList& infos,
 
1288
void AlbumDB::changeImageInformation(qlonglong imageId, const QVariantList& uncheckedInfos,
1289
1289
                                     DatabaseFields::ImageInformation fields)
1290
1290
{
1291
1291
    if (fields == DatabaseFields::ImageInformationNone)
1296
1296
    QMap<QString, QVariant> parameters;
1297
1297
 
1298
1298
    QMap<QString, QVariant> fieldValueMap;
1299
 
        for (int i=0; i<infos.size(); i++)
1300
 
        {
1301
 
           const QVariant& value=infos[i];
1302
 
           if (value.type() == QVariant::DateTime || value.type() == QVariant::Date)
1303
 
                   fieldValueMap.insert(fieldNames[i], value.toDateTime().toString(Qt::ISODate));
1304
 
           else
1305
 
                   fieldValueMap.insert(fieldNames[i], value);
1306
 
        }
1307
 
        DBActionType fieldValueList;
 
1299
    QVariantList infos = uncheckedInfos;
 
1300
    for (int i=0; i<infos.size(); i++)
 
1301
    {
 
1302
        QVariant& value=infos[i];
 
1303
        if (value.type() == QVariant::DateTime || value.type() == QVariant::Date)
 
1304
            value = value.toDateTime().toString(Qt::ISODate);
 
1305
        fieldValueMap.insert(fieldNames[i], value);
 
1306
    }
 
1307
    DBActionType fieldValueList;
1308
1308
        fieldValueList.setValue(true); // In this case (map as object), the value flag is not important.
1309
1309
        fieldValueList.setActionValue(fieldValueMap);
1310
1310