Update the 'isCut' state of items when cutting non-files, e.g., text

BUG: 304615
FIXED-IN: 4.9.4
REVIEW: 107390
This commit is contained in:
Frank Reininghaus 2012-11-24 04:52:13 +01:00
parent a6f0745284
commit 4120805872

View file

@ -55,12 +55,8 @@ KFileItemClipboard::~KFileItemClipboard()
void KFileItemClipboard::updateCutItems()
{
const QMimeData* mimeData = QApplication::clipboard()->mimeData();
const QByteArray data = mimeData->data("application/x-kde-cutselection");
const bool isCutSelection = (!data.isEmpty() && data.at(0) == QLatin1Char('1'));
if (isCutSelection) {
m_cutItems = KUrl::List::fromMimeData(mimeData).toSet();
emit cutItemsChanged();
}
m_cutItems = KUrl::List::fromMimeData(mimeData).toSet();
emit cutItemsChanged();
}
KFileItemClipboard::KFileItemClipboard() :