[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdelibs/khtml
From: John Tapsell <john () geola ! co ! uk>
Date: 2004-12-30 21:55:55
Message-ID: 20041230215555.996EC1CFEA () office ! kde ! org
[Download RAW message or body]
CVS commit by johnflux:
Don't provide html mimetype in selection clipboard.
It doesn't seem to support it.
M +16 -6 khtml_ext.cpp 1.111
--- kdelibs/khtml/khtml_ext.cpp #1.110:1.111
@@ -221,13 +221,23 @@ void KHTMLPartBrowserExtension::copy()
disconnect( cb, SIGNAL( selectionChanged() ), m_part, SLOT( slotClearSelection() ) );
#ifndef QT_NO_MIMECLIPBOARD
- QString htmltext = m_part->selectedTextAsHTML();
-
- htmltext.replace( QChar( 0xa0 ), ' ' );
- QTextDrag *htmltextdrag = new QTextDrag(htmltext, 0L);
- htmltextdrag->setSubtype("html");
+ QString htmltext;
+ /*
+ * When selectionModeEnabled, that means the user has just selected
+ * the text, not ctrl+c to copy it. The selection clipboard
+ * doesn't seem to support mime type, so to save time, don't calculate
+ * the selected text as html.
+ * optomisation disabled for now until everything else works.
+ */
+ //if(!cb->selectionModeEnabled())
+ htmltext = m_part->selectedTextAsHTML();
QTextDrag *textdrag = new QTextDrag(text, 0L);
KMultipleDrag *drag = new KMultipleDrag( m_editableFormWidget );
drag->addDragObject( textdrag );
+ if(!htmltext.isEmpty()) {
+ htmltext.replace( QChar( 0xa0 ), ' ' );
+ QTextDrag *htmltextdrag = new QTextDrag(htmltext, 0L);
+ htmltextdrag->setSubtype("html");
drag->addDragObject( htmltextdrag );
+ }
cb->setData(drag);
#else
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic