[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdelibs/khtml
From: Kevin Puetz <puetzk () iastate ! edu>
Date: 2002-12-11 21:01:13
[Download RAW message or body]
CVS commit by puetzk:
Use the qt3.1 clipboard API, instead of the deprecated setSelectionMode()
This almost has the same bug as the konq_dirpart stuff fixed a few days ago,
except we do it again later in the function and end up fixing it. Still
ugly, new was is nicer :-)
M +2 -7 khtml_part.cpp 1.782
--- kdelibs/khtml/khtml_part.cpp #1.781:1.782
@@ -4657,8 +4657,6 @@ void KHTMLPart::khtmlMouseReleaseEvent(
if ((d->m_guiProfile == BrowserViewGUI) && (_mouse->button() == MidButton) && (event->url().isNull()))
{
- QClipboard *cb = QApplication::clipboard();
- cb->setSelectionMode( true );
QCString plain("plain");
- QString url = cb->text(plain).stripWhiteSpace();
+ QString url = QApplication::clipboard()->text(plain,QClipboard::Selection).stripWhiteSpace();
// Check if it's a URL
@@ -4726,10 +4724,7 @@ void KHTMLPart::khtmlMouseReleaseEvent(
QString text = selectedText();
text.replace(QRegExp(QChar(0xa0)), " ");
- QClipboard *cb = QApplication::clipboard();
- cb->setSelectionMode( true );
disconnect( kapp->clipboard(), SIGNAL( selectionChanged()), this, SLOT( slotClearSelection()));
- cb->setText(text);
+ kapp->clipboard()->setText(text,QClipboard::Selection);
connect( kapp->clipboard(), SIGNAL( selectionChanged()), SLOT( slotClearSelection()));
- cb->setSelectionMode( false );
#endif
//kdDebug( 6000 ) << "selectedText = " << text << endl;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic