Commit d7507c80 authored by Michael Reeves's avatar Michael Reeves

Only attempt to get text if clipboard is a text object.

parent 71aa535e
......@@ -1573,8 +1573,17 @@ void KDiff3App::slotSelectionEnd()
void KDiff3App::slotClipboardChanged()
{
QString s = QApplication::clipboard()->text();
editPaste->setEnabled(!s.isEmpty());
const QClipboard *clipboard = QApplication::clipboard();
const QMimeData *mimeData = clipboard->mimeData();
if(mimeData->hasText())
{
QString s = clipboard->text();
editPaste->setEnabled(!s.isEmpty());
}
else
{
editPaste->setEnabled(false);
}
}
void KDiff3App::slotOutputModified(bool bModified)
......
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