Commit c20dc3cb authored by Stefan Brüns's avatar Stefan Brüns
Browse files

Fix value label mouse/keyboard interaction

After commit e5cc92b8 ("Make text from Dolphin's information panel
copyable") links were no longer activatable, and the full URL is not
retrievable in case the target was partially ellided. Set
TextBrowserInteraction for links. This implicitly creates a "Copy Link
Location" entry in the Context Menu.

Also remove the TextSelectableByKeyboard flag - this implicitly creates
a cursor "|" symbol whenever one of the labels is clicked, and the cursor
can not be removed again (only by selecting a different file). The text is
still selectable using the mouse.

Depends on D25240

Reviewers: #baloo, ngraham, astippich

Reviewed By: #baloo, ngraham

Tags: #baloo

Differential Revision:
parent 4cb94129
......@@ -130,6 +130,7 @@ QWidget* WidgetFactory::createWidget(const QString& prop, const QVariant& value,
auto labelString = KStringHandler::csqueeze(valueString, maxUrlLength);
valueString = QStringLiteral("<a href=\"%1\">%2</a>").arg(valueString, labelString);
} else if ( != QLatin1String("empty")) {
if (pi.valueType() == QVariant::DateTime || pi.valueType() == QVariant::Date) {
......@@ -226,7 +227,7 @@ QSize ValueWidget::sizeHint() const
QLabel* WidgetFactory::createValueWidget(QWidget* parent)
ValueWidget* valueWidget = new ValueWidget(parent);
valueWidget->setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextSelectableByKeyboard);
valueWidget->setAlignment(Qt::AlignTop | Qt::AlignLeft);
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