[Kde-imaging] [Bug 88883] calls KIPI::ImageCollectionShared::category and KIPI::ImageCollectionShared::date without correct features

Renchi Raju renchi at pooh.tam.uiuc.edu
Wed Dec 22 06:16:10 CET 2004


------- 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=88883        
renchi pooh tam uiuc edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From renchi pooh tam uiuc edu  2004-12-22 06:16 -------
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;


More information about the Kde-imaging mailing list