[Digikam-devel] extragear/graphics/digikam/libs/database
Andi Clemens
andi.clemens at gmx.net
Thu May 28 09:38:08 BST 2009
No, everything is fine, I just overlooked that I have some videos in the
"images" testfolder :D
Andi
On Thursday 28 May 2009 10:28:05 Andi Clemens wrote:
> SVN commit 973925 by aclemens:
>
> Only fetch statistics for active elements.
>
> Marcel, Gilles,
>
> there is some query in the function that doesn't seem to do anything. Is
> this old code? I have commented it for now.
>
> Statistics seems to work fine for images now, but somehow I get 12
> movies more in another test database, as when I recursively display the
> movie folder.
>
> Need to check if it is a problem with my DB.
>
> Andi
>
> CCMAIL::digikam-devel at kde.org
>
> M +10 -3 albumdb.cpp
>
>
> --- trunk/extragear/graphics/digikam/libs/database/albumdb.cpp
> #973924:973925 @@ -2043,13 +2043,20 @@
> QList<QVariant> values, allFormats;
> QMap<QString, int> map;
>
> - d->db->execSql("SELECT DISTINCT format FROM ImageInformation;",
> &allFormats); + // d->db->execSql("SELECT DISTINCT format FROM
> ImageInformation;", &allFormats); + d->db->execSql("SELECT DISTINCT
> II.format "
> + " FROM ImageInformation AS II, Images "
> + " WHERE Images.id == II.imageid AND Images.status ==
> 1;", &allFormats);
>
> - QSqlQuery query = d->db->prepareQuery( QString("SELECT count() FROM
> ImageInformation WHERE format=?;") ); + // FIXME: What is this for? Old
> code?
> + // I disabled it for now because it seems to do nothing.
> + // QSqlQuery query = d->db->prepareQuery( QString("SELECT count()
> FROM ImageInformation WHERE format=?;") );
>
> foreach (const QVariant &format, allFormats)
> {
> - d->db->execSql("SELECT count() FROM ImageInformation WHERE
> format=?;", format, &values); + d->db->execSql("SELECT count() FROM
> ImageInformation AS II, Images " + " WHERE
> II.imageid == Images.id AND Images.status== 1 " + "
> AND format=?;", format, &values); map[format.toString()] =
> values.isEmpty() ? 0 : values.first().toInt(); }
>
> _______________________________________________
> Digikam-devel mailing list
> Digikam-devel at kde.org
> https://mail.kde.org/mailman/listinfo/digikam-devel
More information about the Digikam-devel
mailing list