| Summary: | Calls ImageCollectionShared::category and ImageCollectionShared::date without correct features | ||
|---|---|---|---|
| Product: | [Applications] digikam | Reporter: | Jesper Pedersen <blackie> |
| Component: | Albums-Plugins | Assignee: | Digikam Developers <digikam-bugs-null> |
| Status: | RESOLVED UNMAINTAINED | ||
| Severity: | normal | CC: | caulier.gilles |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | 7.6.0 | |
| Sentry Crash Report: | |||
|
Description
Jesper Pedersen
2004-09-05 13:43:58 UTC
CVS commit by pahlibar:
respect host app settings and check for features before actually accessing them
BUG: 88883
M +37 -15 cdarchiving.cpp 1.38
--- kdeextragear-libs-1/kipi-plugins/cdarchiving/cdarchiving.cpp #1.37:1.38
@@ -312,7 +312,19 @@ bool CDArchiving::prepare(void)
albumIt != albumsList.end() ; ++albumIt )
{
- AlbumData data((*albumIt).name(), (*albumIt).category(),
- (*albumIt).comment(), (*albumIt).date(),
- (*albumIt).path(), (*albumIt).images());
+ AlbumData data((*albumIt).name(),
+
+ m_interface->hasFeature(KIPI::AlbumsHaveCategory) ?
+ (*albumIt).category() : QString(),
+
+ m_interface->hasFeature(KIPI::AlbumsHaveComments) ?
+ (*albumIt).comment() : QString(),
+
+ m_interface->hasFeature(KIPI::AlbumsHaveCreationDate) ?
+ (*albumIt).date() : QDate(),
+
+ (*albumIt).isDirectory() ?
+ (*albumIt).path() : QString(),
+
+ (*albumIt).images());
m_albumsMap->insert( (*albumIt).path().prettyURL(), data );
@@ -583,7 +595,10 @@ bool CDArchiving::buildHTMLInterface (vo
m_AlbumTitle = data.albumName();
- m_AlbumComments = data.albumComments();
- m_AlbumCollection = data.albumCategory();
- m_AlbumDate = data.albumDate().toString();
+ m_AlbumComments = m_interface->hasFeature(KIPI::AlbumsHaveComments) ?
+ data.albumComments() : QString();
+ m_AlbumCollection = m_interface->hasFeature(KIPI::AlbumsHaveCategory) ?
+ data.albumCategory() : QString();
+ m_AlbumDate = m_interface->hasFeature(KIPI::AlbumsHaveCreationDate) ?
+ data.albumDate().toString() : QString();
Path = data.albumUrl().path();
@@ -807,8 +822,11 @@ void CDArchiving::createBody(QTextStream
stream << "<tr valign=top><td align=left>\n" << endl;
+ if (m_interface->hasFeature(KIPI::AlbumsHaveComments))
stream << i18n("<i>Comment:</i>") << "<br>\n" << endl;
+ if (m_interface->hasFeature(KIPI::AlbumsHaveCategory))
stream << i18n("<i>Collection:</i>") << "<br>\n" << endl;
+ if (m_interface->hasFeature(KIPI::AlbumsHaveCreationDate))
stream << i18n("<i>Date:</i>") << "<br>\n" << endl;
@@ -817,9 +835,13 @@ void CDArchiving::createBody(QTextStream
stream << "</td><td align=left>\n" << endl;
- stream << EscapeSgmlText(QTextCodec::codecForLocale(), m_AlbumComments, true, true)
+ if (m_interface->hasFeature(KIPI::AlbumsHaveComments))
+ stream << EscapeSgmlText(QTextCodec::codecForLocale(),
+ m_AlbumComments, true, true)
<< "<br>\n" << endl;
+ if (m_interface->hasFeature(KIPI::AlbumsHaveCategory))
stream << m_AlbumCollection << "<br>\n" << endl;
+ if (m_interface->hasFeature(KIPI::AlbumsHaveCreationDate))
stream << m_AlbumDate << "<br>\n" << endl;
|