[Digikam-devel] [Bug 96388] show number of images in the album

Arnd Baecker arnd.baecker at web.de
Wed Nov 28 20:54:37 GMT 2007


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=96388         




------- Additional Comments From arnd.baecker web de  2007-11-28 21:54 -------
To get the number of entries for a given album specified by a kurl,
including its sub-albums, the following should do the job 
(see digikamalbums.cpp)
  QStringList albumvalues;
  urlWithTrailingSlash = kurl.path(1);
  m_sqlDB.execSql(QString("SELECT DISTINCT id, url FROM Albums WHERE
        url='%1' OR url LIKE'\%%2\%';")
  .arg(escapeString(url)).arg(escapeString(urlWithTrailingSlash)),&albumvalues);

For the dates one would have to copy the code from 
void kio_digikamdates::special(const QByteArray& data)

And for searches, void kio_digikamsearch::special(const QByteArray&
data).

The routines involve iterators and some explicit tests...

This sounds like a lot of code duplication.
Maybe it is possible to extract the corresponding parts?



More information about the Digikam-devel mailing list