[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/extragear/kde3/graphics/kphotoalbum/MainWindow
From: Jan Kundrát <jkt () gentoo ! org>
Date: 2007-06-30 22:31:54
Message-ID: 1183242714.357528.31351.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 681936 by jkt:
make DeleteDialog's behave "sane and expected" again
(fixes issue reported by Sujee Maniyam on the ML )
M +15 -6 DeleteDialog.cpp
--- branches/extragear/kde3/graphics/kphotoalbum/MainWindow/DeleteDialog.cpp \
#681935:681936 @@ -56,6 +56,14 @@
return KDialogBase::exec();
}
+/*
+ * Delete selected images from disk. Supports two modes:
+ *
+ * a) Deleting physical files, files that can't be removed (no permission, \
not + * available right now,...) are left untouched.
+ * b) Blocking from database -- we don't care whether the real file is
+ * availabel, we just punt it from the database.
+ */
void DeleteDialog::deleteImages()
{
Utilities::ShowBusyCursor dummy;
@@ -64,15 +72,16 @@
QStringList listCouldNotDelete;
for( QStringList::const_iterator it = _list.constBegin(); it != \
_list.constEnd(); ++it ) {
- if ( DB::ImageInfo::imageOnDisk(*it) ) {
- if ( _delete_file->isChecked() && ( !QFile( *it ).exists() || \
!QFile( *it ).remove() ) ) {
- listCouldNotDelete.append (*it );
- } else {
+ if ( _delete_file->isChecked() )
+ if ( DB::ImageInfo::imageOnDisk(*it) && QFile( *it ).exists() \
&& QFile( *it ).remove() ) { listToDelete.append( *it );
Utilities::removeThumbNail( *it );
+ } else {
+ listCouldNotDelete.append( *it );
}
- } else {
- listCouldNotDelete.append( *it );
+ else {
+ listToDelete.append( *it );
+ Utilities::removeThumbNail( *it );
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic