[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: extragear/graphics/digikam/libs/database
From: Marcel Wiesweg <marcel.wiesweg () gmx ! de>
Date: 2008-04-27 13:15:18
Message-ID: 1209302118.381108.16307.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 801687 by mwiesweg:
Fix searching for comment:
Do not use comment id, imageid need to be used
M +2 -0 imagecomments.cpp
M +4 -4 imagequerybuilder.cpp
--- trunk/extragear/graphics/digikam/libs/database/imagecomments.cpp #801686:801687
@@ -33,6 +33,7 @@
// Local includes
+#include "ddebug.h"
#include "albumdb.h"
#include "imagecomments.h"
@@ -387,6 +388,7 @@
DatabaseAccess access;
info.id = access.db()->setImageComment(d->id, info.comment, info.type, \
info.language, info.author, info.date); }
+ d->dirtyIndices.subtract(d->newIndices);
d->newIndices.clear();
foreach(int index, d->dirtyIndices)
--- trunk/extragear/graphics/digikam/libs/database/imagequerybuilder.cpp \
#801686:801687 @@ -542,7 +542,7 @@
else if (name == "comment")
{
sql += " (Images.id IN "
- " (SELECT id FROM ImageComments "
+ " (SELECT imageid FROM ImageComments "
" WHERE type=? AND comment ";
ImageQueryBuilder::addSqlRelation(sql, relation);
sql += " ?)) ";
@@ -551,7 +551,7 @@
else if (name == "commentauthor")
{
sql += " (Images.id IN "
- " (SELECT id FROM ImageComments "
+ " (SELECT imageid FROM ImageComments "
" WHERE type=? AND author ";
ImageQueryBuilder::addSqlRelation(sql, relation);
sql += " ?)) ";
@@ -560,7 +560,7 @@
else if (name == "headline")
{
sql += " (Images.id IN "
- " (SELECT id FROM ImageComments "
+ " (SELECT imageid FROM ImageComments "
" WHERE type=? AND comment ";
ImageQueryBuilder::addSqlRelation(sql, relation);
sql += " ?)) ";
@@ -569,7 +569,7 @@
else if (name == "title")
{
sql += " (Images.id IN "
- " (SELECT id FROM ImageComments "
+ " (SELECT imageid FROM ImageComments "
" WHERE type=? AND comment ";
ImageQueryBuilder::addSqlRelation(sql, relation);
sql += " ?)) ";
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic