Commit 98561d3b authored by Michael Pyne's avatar Michael Pyne

I think this should just about wrap up the errorList() conversions.

svn path=/trunk/kdemultimedia/juk/; revision=360297
parent 0704806f
......@@ -786,6 +786,7 @@ void Playlist::removeFromDisk(const PlaylistItemList &items)
DeleteDialog dialog(this);
if(dialog.confirmDeleteList(files)) {
bool shouldDelete = dialog.shouldDelete();
QStringList errorFiles;
for(PlaylistItemList::ConstIterator it = items.begin(); it != items.end(); ++it) {
if(m_playingItem == *it)
......@@ -803,9 +804,15 @@ void Playlist::removeFromDisk(const PlaylistItemList &items)
m_history.remove(*it);
}
else
KMessageBox::sorry(this, i18n("Could not move ") + (*it)->file().absFilePath() + ".");
errorFiles.append((*it)->file().absFilePath());
}
if(!errorFiles.isEmpty()) {
QString errorMsg = shouldDelete ?
i18n("Could not delete these files") :
i18n("Could not move these files to the Trash");
KMessageBox::errorList(this, errorMsg, errorFiles);
}
}
dataChanged();
}
......
......@@ -292,11 +292,8 @@ void PlaylistBox::remove()
couldNotDelete.append(*it);
}
// Would be nice if there were a KMessageBox::sorryList() to use with
// couldNotDelete.
if(!couldNotDelete.isEmpty())
KMessageBox::sorry(this, i18n("Could not delete all of the specified files."));
KMessageBox::errorList(this, i18n("Could delete these files."), couldNotDelete);
}
else if(remove == KMessageBox::Cancel)
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment