Version: 0.7.1 (using KDE 3.3.2-1.4.2.kde, Fedora Core release 2 (Tettnang)) Compiler: gcc version 3.3.3 20040412 (Red Hat Linux 3.3.3-7) OS: Linux (i686) release 2.6.7-1.494.2.2 Steps to reproduce: 1. Select some images (which have no comments) to e-mail. Expected Results: - No useless "comments.txt" file attached to e-mail which just contains a load of lines saying "no comments" Results: - comments.txt file with useless information attached to e-mail Further info: kipi-plugins-0.1-0.fdr.0.3.beta1.2 (kde-redhat)
CVS commit by pahlibar: don't add the comments file if there are no comments BUG: 97069 M +34 -27 sendimages.cpp 1.20 --- kdeextragear-libs-1/kipi-plugins/sendimages/sendimages.cpp #1.19:1.20 @@ -247,4 +247,6 @@ void SendImages::makeCommentsFile(void) KURL::List::Iterator it = m_imagesPackage.begin(); + bool anyCommentsPresent = false; + while( it != m_imagesPackage.end() ) { @@ -257,4 +259,6 @@ void SendImages::makeCommentsFile(void) if ( commentItem.isEmpty() ) commentItem = i18n("no comment"); + else + anyCommentsPresent = true; ImageCommentsText = ImageCommentsText + @@ -265,4 +269,6 @@ void SendImages::makeCommentsFile(void) } + if ( anyCommentsPresent ) + { QFile commentsFile( m_tmp + i18n("comments.txt") ); QTextStream stream( &commentsFile ); @@ -273,4 +279,5 @@ void SendImages::makeCommentsFile(void) m_filesSendList.append( m_tmp + i18n("comments.txt") ); } + } }