Summary: | order of images returned is not same as that of current digikam view | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | Debajyoti Bera <dbera.web> |
Component: | Plugin-Generic-HTMLGallery | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | anaselli, caulier.gilles, frederic.coiffier, jarlethorsen, marko, valerio.fuoglio |
Priority: | VHI | ||
Version: | 0.9.0 | ||
Target Milestone: | --- | ||
Platform: | Mandriva RPMs | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 0.9.2 | |
Sentry Crash Report: | |||
Attachments: | AlbumDB returns images in current digikam-view order |
Description
Debajyoti Bera
2006-09-13 23:50:41 UTC
A bad way of fixing the problems for date order would be to add replace execSql( QString("SELECT Albums.url||'/'||Images.name FROM Images, Albums " "WHERE Albums.id=%1 AND Albums.id=Images.dirid;") by execSql( QString("SELECT Albums.url||'/'||Images.name FROM Images, Albums " "WHERE Albums.id=%1 AND Albums.id=Images.dirid ORDER BY Images.datetime;") Obviously this only works when the images should be returned according to date but not for anything else. A better and complete fix is in order. Thanks. Blocks #127888 *** Bug 127888 has been marked as a duplicate of this bug. *** Created attachment 17831 [details]
AlbumDB returns images in current digikam-view order
Based on what the current "sort images" order is in digikam, return the images
in the same sort order. This way the user gets a consistent ordering of images
when trying to use some kipi plugin on the images.
File-size isnt stored in the database. I wasnt sure if this is the right way to
fix this, so I didnt make extra effort to sort it according to filesize if
thats the current view. I can add sorting by file-size (I need to know where to
get file-size information from) if this is the preferred to way to return
images in correct order.
*** Bug 129870 has been marked as a duplicate of this bug. *** Will this patch be integrated in Digikam-0.9 ? yes, it think it can be. We will take a look. Marcel, Paco ? Gilles Caulier No objection from me. Marcel, in case you overlooked, my patch doesnt work when digikam images are sorted in order of "size". It works for everything else. I explain this in my comment above. Its a limitation/bug that I want whoever commits it to be aware of. Debajyoti, Are you a solution for this problem ? Gilles Nops Gilles. I dont have a quick and easy solution. The size info is not stored in the database, so it would involve substantial change of code in kipi and maybe other place. Is it possible to store file sizes in the database without breaking the compatibility ? When the database content is refreshed ? If a file size changed, will its value in the database be refreshed automatically ? no. We won't touch database with 0.9.0 release. But, we will do it later 0.9.0. In fact we wil working on a new DB interface and a new DB structure with more informations like GPS, image size, photo info form Exif/makenote, etc. Fréderic, if you is interessed to work with digiKam team about this subject, let's me hear... Gilles ok, clean up all kipi-plugins source code (remove), do a fresh checkout from svn and try again. Gilles OK, I made some progress: googling for the error message lead me to http://sourceforge.net/mailarchive/forum.php?forum_id=6890&max_rows=25&style=flat&viewmonth=200510 which suggested to include #include <qimage.h> which I did in kpaboutdata.cpp. Then the next error I get is (still the same file ;-() kpaboutdata.cpp: In constructor `KIPIPlugins::KPAboutData::KPAboutData(const char*, const char*, int, const char*, const char*)': kpaboutdata.cpp:53: error: `setProgramLogo' undeclared (first use this function) kpaboutdata.cpp:53: error: (Each undeclared identifier is reported only once for each function it appears in.) Another google makes me believe that setProgramLogo is KDE >=3.4, http://archives.devshed.com/forums/kde-96/kde-version-in-define-1334583.html So this would mean I cannot compile current svn at all presently ... Best, Arnd still the same compile error: [...] kpaboutdata.cpp: In constructor `KIPIPlugins::KPAboutData::KPAboutData(const char*, const char*, int, const char*, const char*)': kpaboutdata.cpp:51: error: invalid use of undefined type `struct QImage' /usr/share/qt3/include/qwindowdefs.h:74: error: forward declaration of `struct QImage' kpaboutdata.cpp:51: error: `setProgramLogo' undeclared (first use this function) [...] I am just running http://www.digikam.org/?q=system/files&file=compile_digikam.txt So if this works for others, it could well be my system (too old libraries etc.?), but I don't know which it could be ... Best, Arnd Valerio, Angelo, KAboutData must be compilable at least with under all KDE 3.3 release. Thanks in advance to fix it. Gilles I dont understand. Are the errors for comments #15/#16 from compiling the patch against current SVN ? yes. Angelo and Valerio are add a new small class named KAboutData witch broke compilation unde KDE < 3.4. Thsi can be easily fixed in implementation, this is why i have CC these developpers. Gilles SVN commit 605713 by anaselli: setProgramLogo is defined from kde 3.4.0 on CCBUG: 134037 M +4 -1 kpaboutdata.cpp --- trunk/extragear/libs/kipi-plugins/common/libkipiplugins/kpaboutdata.cpp #605712:605713 @@ -24,6 +24,7 @@ #include <kglobal.h> #include <kstandarddirs.h> #include <kglobalsettings.h> +#include <kdeversion.h> #include "kpaboutdata.h" #include "pluginsversion.h" @@ -43,13 +44,15 @@ pluginDescription, "http://www.kipi-plugins.org") { +#if KDE_IS_VERSION(3,4,0) + // setProgramLogo is defined from kde 3.4.0 on QString directory; KGlobal::dirs()->addResourceType("kipi_plugins_logo", KGlobal::dirs()->kde_default("data") + "kipi/data"); directory = KGlobal::dirs()->findResourceDir("kipi_plugins_logo", "kipi-plugins_logo.png"); // set the kipiplugins logo inside the about dialog setProgramLogo(QImage(directory + "kipi-plugins_logo.png")); - +#endif // set the plugin description into long text description setOtherText(pluginDescription); Thanks Angelo, Ok. now you can try to compile kipi-plugins from trunk. Gilles Hi, the compile gets much further now - many thanks! However, the next one is setShadeSortColumn() (which seems also only available since KDE 3.4), see below for the compile error. Also note that there are many warnings like ../../libkipi/libkipi/imagecollection.h:72: warning: `visibility' attribute does not apply to types Best, Arnd [...] /usr/share/qt3/bin/moc ./renameimageswidget.h -o renameimageswidget.moc if /bin/sh ../../libtool --silent --mode=compile --tag=CXX g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../libkipi/libkipi -I../../kipi-plugins/common/include -I../../kipi-plugins/common/exiv2iface -I../../libkipi -I../../libkipi -I/usr/include/kde -I/usr/share/qt3/include -I/usr/X11R6/include -I/home/abaecker/NBB/SOFTWARE/digikam/include -DQT_THREAD_SUPPORT -D_REENTRANT -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -O2 -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -MT renameimageswidget.lo -MD -MP -MF ".deps/renameimageswidget.Tpo" \ -c -o renameimageswidget.lo `test -f 'renameimageswidget.cpp' || echo './'`renameimageswidget.cpp; \ then mv -f ".deps/renameimageswidget.Tpo" ".deps/renameimageswidget.Plo"; \ else rm -f ".deps/renameimageswidget.Tpo"; exit 1; \ fi In file included from ../../libkipi/libkipi/interface.h:38, from renameimageswidget.cpp:42: ../../libkipi/libkipi/imagecollection.h:72: warning: `visibility' attribute does not apply to types In file included from ../../libkipi/libkipi/interface.h:39, from renameimageswidget.cpp:42: ../../libkipi/libkipi/imageinfo.h:78: warning: `visibility' attribute does not apply to types In file included from renameimageswidget.cpp:42: ../../libkipi/libkipi/interface.h:91: warning: `visibility' attribute does not apply to types In file included from renameimageswidget.cpp:44: ../../libkipi/libkipi/imagedialog.h:79: warning: `visibility' attribute does not apply to types /usr/share/qt3/bin/moc renameimagesbase.h -o renameimagesbase.moc rm -f renameimagesbase.cpp echo '#include <kdialog.h>' > renameimagesbase.cpp echo '#include <klocale.h>' >> renameimagesbase.cpp /usr/share/qt3/bin/uic -L /usr/lib/kde3/plugins/designer -nounload -tr tr2i18n -i renameimagesbase.h ./renameimagesbase.ui > renameimagesbase.cpp.temp ; ret=$?; \ /usr/bin/perl -pe "s,tr2i18n( \"\" ),QString::null,g" renameimagesbase.cpp.temp | /usr/bin/perl -pe "s,tr2i18n( \"\"\, \"\" ),QString::null,g" | /usr/bin/perl -pe "s,image([0-9][0-9]*)_data,img\$1_renameimagesbase,g" | /usr/bin/perl -pe "s,: QWizard\(,: KWizard(,g" >> renameimagesbase.cpp ;\ rm -f renameimagesbase.cpp.temp ;\ if test "$ret" = 0; then echo '#include "renameimagesbase.moc"' >> renameimagesbase.cpp; else rm -f renameimagesbase.cpp ; exit $ret ; fi QPixmap: Cannot create a QPixmap when no GUI is being used if /bin/sh ../../libtool --silent --mode=compile --tag=CXX g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../libkipi/libkipi -I../../kipi-plugins/common/include -I../../kipi-plugins/common/exiv2iface -I../../libkipi -I../../libkipi -I/usr/include/kde -I/usr/share/qt3/include -I/usr/X11R6/include -I/home/abaecker/NBB/SOFTWARE/digikam/include -DQT_THREAD_SUPPORT -D_REENTRANT -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -O2 -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -MT renameimagesbase.lo -MD -MP -MF ".deps/renameimagesbase.Tpo" \ -c -o renameimagesbase.lo `test -f 'renameimagesbase.cpp' || echo './'`renameimagesbase.cpp; \ then mv -f ".deps/renameimagesbase.Tpo" ".deps/renameimagesbase.Plo"; \ else rm -f ".deps/renameimagesbase.Tpo"; exit 1; \ fi renameimagesbase.cpp: In constructor ` KIPIBatchProcessImagesPlugin::RenameImagesBase::RenameImagesBase(QWidget*, const char*, unsigned int)': renameimagesbase.cpp:107: error: `setShadeSortColumn' undeclared (first use this function) renameimagesbase.cpp:107: error: (Each undeclared identifier is reported only once for each function it appears in.) make[4]: *** [renameimagesbase.lo] Error 1 make[4]: Leaving directory `/tmp/NEWTRYSVNALL/libs/kipi-plugins/batchprocessimages' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/tmp/NEWTRYSVNALL/libs/kipi-plugins/batchprocessimages' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/tmp/NEWTRYSVNALL/libs/kipi-plugins' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/tmp/NEWTRYSVNALL/libs' make: *** [all] Error 2 Hi, I hope I don't get black-listed for filling this thread with all the compile errors (but I got the impression that you really want even that stuff in the BKO ...) To summarize before giving all the details: Compiling from svn leads on a KDE 3.3 System to errors for: - renameimagesbase.cpp: setShadeSortColumn - gallerylist.cpp:59: error: 'class KStdGuiItem' has no member named 'add' gallerylist.cpp:60: error: 'class KStdGuiItem' has no member named 'configure' gallerylist.cpp:61: error: 'class KStdGuiItem' has no member named 'remove' - plugin_gpssync.cpp: In member function `void Plugin_GPSSync::slotGPSEdit()': plugin_gpssync.cpp:241: error: 'class KMessageBox' has no member named 'errorList' - plugin_metadataedit.cpp: In member function `void Plugin_MetadataEdit::slotRemoveExif()': plugin_metadataedit.cpp:206: error: 'class KMessageBox' has no member named ' errorList' Best, Arnd And here the details: To proceed, I commented the offending line m_listView->setShadeSortColumn( FALSE ); from libs/kipi-plugins/batchprocessimages/renameimagesbase.cpp Then the next error is: make[3]: Entering directory `/tmp/NEWTRYSVNALL/libs/kipi-plugins/galleryexport' if /bin/sh ../../libtool --silent --mode=compile --tag=CXX g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../libkipi/libkipi -I../../kipi-plugins/common/include -I../../kipi-plugins/common/exiv2iface -I../../libkipi -I../../libkipi -I/usr/include/kde -I/usr/share/qt3/include -I/usr/X11R6/include -I/home/abaecker/NBB/SOFTWARE/digikam/include -DQT_THREAD_SUPPORT -D_REENTRANT -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -O2 -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -MT gallerylist.lo -MD -MP -MF ".deps/gallerylist.Tpo" \ -c -o gallerylist.lo `test -f 'gallerylist.cpp' || echo './'`gallerylist.cpp; \ then mv -f ".deps/gallerylist.Tpo" ".deps/gallerylist.Plo"; \ else rm -f ".deps/gallerylist.Tpo"; exit 1; \ fi gallerylist.cpp: In constructor ` KIPIGalleryExportPlugin::GalleryList::GalleryList(QWidget*, KIPIGalleryExportPlugin::Galleries*, bool)': gallerylist.cpp:59: error: 'class KStdGuiItem' has no member named 'add' gallerylist.cpp:60: error: 'class KStdGuiItem' has no member named 'configure' gallerylist.cpp:61: error: 'class KStdGuiItem' has no member named 'remove' make[3]: *** [gallerylist.lo] Error 1 make[3]: Leaving directory `/tmp/NEWTRYSVNALL/libs/kipi-plugins/galleryexport' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/tmp/NEWTRYSVNALL/libs/kipi-plugins' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/tmp/NEWTRYSVNALL/libs' make: *** [all] Error 2 Removing the two occurances of galleryexport in libs/kipi-plugins/Makefile gets me to the next problem: make[3]: Entering directory `/tmp/NEWTRYSVNALL/libs/kipi-plugins/gpssync' if /bin/sh ../../libtool --silent --mode=compile --tag=CXX g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../libkipi/libkipi -I../../kipi-plugins/common/include -I../../kipi-plugins/common/exiv2iface -I../../libkipi -I../../libkipi -I/usr/include/kde -I/usr/share/qt3/include -I/usr/X11R6/include -I/home/abaecker/NBB/SOFTWARE/digikam/include -DQT_THREAD_SUPPORT -D_REENTRANT -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -O2 -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -MT plugin_gpssync.lo -MD -MP -MF ".deps/plugin_gpssync.Tpo" \ -c -o plugin_gpssync.lo `test -f 'plugin_gpssync.cpp' || echo './'`plugin_gpssync.cpp; \ then mv -f ".deps/plugin_gpssync.Tpo" ".deps/plugin_gpssync.Plo"; \ else rm -f ".deps/plugin_gpssync.Tpo"; exit 1; \ fi In file included from plugin_gpssync.cpp:39: ../../libkipi/libkipi/imagecollection.h:72: warning: `visibility' attribute does not apply to types In file included from ../../libkipi/libkipi/interface.h:39, from gpssyncdialog.h:32, from plugin_gpssync.cpp:47: ../../libkipi/libkipi/imageinfo.h:78: warning: `visibility' attribute does not apply to types In file included from gpssyncdialog.h:32, from plugin_gpssync.cpp:47: ../../libkipi/libkipi/interface.h:91: warning: `visibility' attribute does not apply to types In file included from plugin_gpssync.h:27, from plugin_gpssync.cpp:48: ../../libkipi/libkipi/plugin.h:73: warning: `visibility' attribute does not apply to types plugin_gpssync.cpp: In member function `void Plugin_GPSSync::slotGPSEdit()': plugin_gpssync.cpp:241: error: 'class KMessageBox' has no member named ' errorList' plugin_gpssync.cpp: In member function `void Plugin_GPSSync::slotGPSRemove()': plugin_gpssync.cpp:301: error: 'class KMessageBox' has no member named ' errorList' make[3]: *** [plugin_gpssync.lo] Error 1 make[3]: Leaving directory `/tmp/NEWTRYSVNALL/libs/kipi-plugins/gpssync' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/tmp/NEWTRYSVNALL/libs/kipi-plugins' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/tmp/NEWTRYSVNALL/libs' make: *** [all] Error 2 Removing the two occurances of gpssync in libs/kipi-plugins/Makefile gets me to the next problem: make[3]: Entering directory `/tmp/NEWTRYSVNALL/libs/kipi-plugins/metadataedit' /usr/share/qt3/bin/moc ./plugin_metadataedit.h -o plugin_metadataedit.moc if /bin/sh ../../libtool --silent --mode=compile --tag=CXX g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../libkipi/libkipi -I../../kipi-plugins/common/include -I../../kipi-plugins/common/exiv2iface -I../../libkipi -I../../libkipi -I/usr/include/kde -I/usr/share/qt3/include -I/usr/X11R6/include -I/home/abaecker/NBB/SOFTWARE/digikam/include -DQT_THREAD_SUPPORT -D_REENTRANT -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -O2 -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -MT plugin_metadataedit.lo -MD -MP -MF ".deps/plugin_metadataedit.Tpo" \ -c -o plugin_metadataedit.lo `test -f 'plugin_metadataedit.cpp' || echo './'`plugin_metadataedit.cpp; \ then mv -f ".deps/plugin_metadataedit.Tpo" ".deps/plugin_metadataedit.Plo"; \ else rm -f ".deps/plugin_metadataedit.Tpo"; exit 1; \ fi In file included from plugin_metadataedit.cpp:37: ../../libkipi/libkipi/imagecollection.h:72: warning: `visibility' attribute does not apply to types In file included from ../../libkipi/libkipi/interface.h:39, from ../../libkipi/libkipi/plugin.h:36, from plugin_metadataedit.h:26, from plugin_metadataedit.cpp:45: ../../libkipi/libkipi/imageinfo.h:78: warning: `visibility' attribute does not apply to types In file included from ../../libkipi/libkipi/plugin.h:36, from plugin_metadataedit.h:26, from plugin_metadataedit.cpp:45: ../../libkipi/libkipi/interface.h:91: warning: `visibility' attribute does not apply to types In file included from plugin_metadataedit.h:26, from plugin_metadataedit.cpp:45: ../../libkipi/libkipi/plugin.h:73: warning: `visibility' attribute does not apply to types plugin_metadataedit.cpp: In member function `void Plugin_MetadataEdit::slotRemoveExif()': plugin_metadataedit.cpp:206: error: 'class KMessageBox' has no member named ' errorList' plugin_metadataedit.cpp: In member function `void Plugin_MetadataEdit::slotImportExif()': plugin_metadataedit.cpp:286: error: 'class KMessageBox' has no member named ' errorList' plugin_metadataedit.cpp: In member function `void Plugin_MetadataEdit::slotRemoveIptc()': plugin_metadataedit.cpp:352: error: 'class KMessageBox' has no member named ' errorList' plugin_metadataedit.cpp: In member function `void Plugin_MetadataEdit::slotImportIptc()': plugin_metadataedit.cpp:432: error: 'class KMessageBox' has no member named ' errorList' plugin_metadataedit.cpp: In member function `void Plugin_MetadataEdit::slotEditComments()': plugin_metadataedit.cpp:496: error: 'class KMessageBox' has no member named ' errorList' make[3]: *** [plugin_metadataedit.lo] Error 1 make[3]: Leaving directory `/tmp/NEWTRYSVNALL/libs/kipi-plugins/metadataedit' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/tmp/NEWTRYSVNALL/libs/kipi-plugins' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/tmp/NEWTRYSVNALL/libs' make: *** [all] Error 2 Removing the two occurances of metadataedit leads to a complete compile! (my happiness is of course limited due to the lack of gpsync and metadataedit ...;-) Arnd, stop (:=)))... Your linux is too old. Please update Gilles > stop (:=)))... Your linux is too old. Please update
Or provide a patch, since you can test it ;)
On Mon, 20 Nov 2006, Angelo Naselli wrote: > ------- Additional Comments From anaselli linux it 2006-11-20 14:26 ------- > > stop (:=)))... Your linux is too old. Please update ;-) Unfortunately, I can't update at this point. (Actually, I would not even have started, if you had told me that KDE 3.4 is a requirement ;-) > Or provide a patch, since you can test it ;) Well, I don't speak the C++, Qt and KDE combo (if there were python plugins I would be on-board ...). Sorry! But if any of you knowledgeble ones makes changes to any of the above points, I am perfectly happy to run as many compile tests as you request. Many thanks, Arnd We're currently try to decide which kde versions to support in kipi & co. by now. I will have a look at your report asap, since the fixings are easy to manage I believe there won't be any problems, but if some of them bacome hard to do or make the plugins useless it would be better not to go on. Angelo *** Bug 143246 has been marked as a duplicate of this bug. *** ------------------------------------------------------------------------ r645926 | lure | 2007-03-23 23:02:41 +0100 (Fri, 23 Mar 2007) | 6 lines Respect current sort order when passing list to KIPI plugin Patch provided by Debajyoti Bera. Thanks a lot! BUG: 134037 |