fix a regression with the link fix: we only want to go into text browser mode when text is selectable

svn path=/branches/KDE/4.4/kdelibs/; revision=1096903
This commit is contained in:
Aaron J. Seigo 2010-02-27 22:19:24 +00:00
parent eedcf88713
commit 73d1f4a7c9

View File

@ -116,7 +116,6 @@ Label::Label(QGraphicsWidget *parent)
QLabel *native = new QLabel;
//disabled for now: triggers Qt bug 7254
//native->setWindowFlags(native->windowFlags()|Qt::BypassGraphicsProxyWidget);
native->setTextInteractionFlags(Qt::TextBrowserInteraction);
d->textSelectable = false;
connect(native, SIGNAL(linkActivated(QString)), this, SIGNAL(linkActivated(QString)));
connect(native, SIGNAL(linkHovered(QString)), this, SIGNAL(linkHovered(QString)));
@ -191,6 +190,12 @@ bool Label::hasScaledContents() const
void Label::setTextSelectable(bool enable)
{
if (enable) {
native->setTextInteractionFlags(Qt::TextBrowserInteraction);
} else {
native->setTextInteractionFlags(Qt::LinksAccessibleByMouse);
}
d->textSelectable = enable;
}