Changeset View
Changeset View
Standalone View
Standalone View
language/duchain/navigation/abstractnavigationwidget.cpp
Show First 20 Lines • Show All 105 Lines • ▼ Show 20 Line(s) | 94 | { | |||
---|---|---|---|---|---|
106 | d->m_browser->setOpenLinks(false); | 106 | d->m_browser->setOpenLinks(false); | ||
107 | d->m_browser->setOpenExternalLinks(false); | 107 | d->m_browser->setOpenExternalLinks(false); | ||
108 | 108 | | |||
109 | QVBoxLayout* layout = new QVBoxLayout; | 109 | QVBoxLayout* layout = new QVBoxLayout; | ||
110 | layout->addWidget(d->m_browser); | 110 | layout->addWidget(d->m_browser); | ||
111 | layout->setMargin(0); | 111 | layout->setMargin(0); | ||
112 | setLayout(layout); | 112 | setLayout(layout); | ||
113 | 113 | | |||
114 | connect(d->m_browser, &QTextEdit::selectionChanged, this, [=]() { | ||||
115 | d->m_browser->copy(); | ||||
kfunk: That's unexpected behavior.
Better: Use a small "copy" icon, preferrably in the upper right… | |||||
116 | }); | ||||
117 | | ||||
114 | connect(d->m_browser.data(), &QTextBrowser::anchorClicked, this, [&](const QUrl& url) { d->anchorClicked(url); }); | 118 | connect(d->m_browser.data(), &QTextBrowser::anchorClicked, this, [&](const QUrl& url) { d->anchorClicked(url); }); | ||
115 | 119 | | |||
116 | foreach(QWidget* w, findChildren<QWidget*>()) | 120 | foreach(QWidget* w, findChildren<QWidget*>()) | ||
117 | w->setContextMenuPolicy(Qt::NoContextMenu); | 121 | w->setContextMenuPolicy(Qt::NoContextMenu); | ||
118 | } | 122 | } | ||
119 | 123 | | |||
120 | AbstractNavigationWidget::~AbstractNavigationWidget() { | 124 | AbstractNavigationWidget::~AbstractNavigationWidget() { | ||
121 | if(d->m_currentWidget) | 125 | if(d->m_currentWidget) | ||
▲ Show 20 Lines • Show All 207 Lines • Show Last 20 Lines |
That's unexpected behavior.
Better: Use a small "copy" icon, preferrably in the upper right corner, which copies the text to the clipboard when clicked?