Commit 95002414 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix Bug 310627 - Drag and dropping a link to knotes from Firefox results in invisible text cursor

FIXED-IN: 4.11.3
BUG: 310627

Keep ktextedit makes work.
parent c49f0f4f
......@@ -397,35 +397,6 @@ void KNoteEdit::textDecreaseIndent()
/** protected methods **/
void KNoteEdit::dragEnterEvent( QDragEnterEvent *e )
{
const QMimeData *md = e->mimeData();
if ( KUrl::List::canDecode( md ) ) {
e->accept();
} else {
KTextEdit::dragEnterEvent( e );
}
}
void KNoteEdit::dropEvent( QDropEvent *e )
{
const QMimeData *md = e->mimeData();
if ( KUrl::List::canDecode( md ) ) {
KUrl::List list = KUrl::List::fromMimeData( md );
KUrl::List::ConstIterator begin = list.constBegin();
KUrl::List::ConstIterator end = list.constEnd();
for ( KUrl::List::ConstIterator it = begin; it != end; ++it ) {
if ( it != begin ) {
insertPlainText( QLatin1String(", ") );
}
insertPlainText( ( *it ).prettyUrl() );
}
} else {
KTextEdit::dropEvent( e );
}
}
void KNoteEdit::keyPressEvent( QKeyEvent *e )
{
KTextEdit::keyPressEvent( e );
......
......@@ -80,8 +80,6 @@ class KNoteEdit
void slotTextBackgroundColor();
protected:
virtual void dragEnterEvent( QDragEnterEvent * );
virtual void dropEvent( QDropEvent * );
virtual void keyPressEvent( QKeyEvent * );
virtual void focusInEvent( QFocusEvent * );
virtual void focusOutEvent( QFocusEvent * );
......
Supports Markdown
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