mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-05 15:45:04 -04:00
Fixed bug when the user clicks on a link without http:// in a QTextBrowser. This link was opened directly in RetroShare.
Show clickable links in the channel feed message. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4923 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
6a44342e4f
commit
340a313fea
11 changed files with 78 additions and 40 deletions
|
@ -173,7 +173,7 @@ border-image: url(:/images/closepressed.png)
|
|||
<widget class="QWidget" name="verticalLayoutWidget">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QTextBrowser" name="textBrowser">
|
||||
<widget class="LinkTextBrowser" name="textBrowser">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
|
@ -191,12 +191,6 @@ border-image: url(:/images/closepressed.png)
|
|||
border-radius: 6px;
|
||||
background: white;}</string>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="openLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
@ -665,6 +659,11 @@ border: 1px solid #CCCCCC;
|
|||
<header location="global">gui/common/HashBox.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>LinkTextBrowser</class>
|
||||
<extends>QTextBrowser</extends>
|
||||
<header>gui/common/LinkTextBrowser.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../images.qrc"/>
|
||||
|
|
|
@ -80,7 +80,7 @@ public:
|
|||
EmbedInHtmlAhref() :
|
||||
EmbedInHtml(Ahref)
|
||||
{
|
||||
myRE.setPattern("(\\bretroshare://[^\\s]*)|(\\bhttps?://[^\\s]*)|(\\bwww\\.[^\\s]*)");
|
||||
myRE.setPattern("(\\bretroshare://[^\\s]*)|(\\bhttps?://[^\\s]*)|(\\bfile://[^\\s]*)|(\\bwww\\.[^\\s]*)");
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue