mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 02:16:51 +02:00
commit
db9f2c563b
2 changed files with 2 additions and 4 deletions
|
@ -970,9 +970,7 @@ void Menu::goToUser(const QString& user) {
|
||||||
/// Open a url, shortcutting any "hifi" scheme URLs to the local application.
|
/// Open a url, shortcutting any "hifi" scheme URLs to the local application.
|
||||||
void Menu::openUrl(const QUrl& url) {
|
void Menu::openUrl(const QUrl& url) {
|
||||||
if (url.scheme() == "hifi") {
|
if (url.scheme() == "hifi") {
|
||||||
QString path = url.toString(QUrl::RemoveScheme);
|
goToURL(url.toString());
|
||||||
path = path.remove(QRegExp("^:?/*"));
|
|
||||||
goTo(path);
|
|
||||||
} else {
|
} else {
|
||||||
QDesktopServices::openUrl(url);
|
QDesktopServices::openUrl(url);
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
const int NUM_MESSAGES_TO_TIME_STAMP = 20;
|
const int NUM_MESSAGES_TO_TIME_STAMP = 20;
|
||||||
|
|
||||||
const QRegularExpression regexLinks("((?:(?:ftp)|(?:https?))://\\S+)");
|
const QRegularExpression regexLinks("((?:(?:ftp)|(?:https?)|(?:hifi))://\\S+)");
|
||||||
const QRegularExpression regexHifiLinks("([#@]\\S+)");
|
const QRegularExpression regexHifiLinks("([#@]\\S+)");
|
||||||
const QString mentionSoundsPath("/sounds/mention/");
|
const QString mentionSoundsPath("/sounds/mention/");
|
||||||
const QString mentionRegex("@(\\b%1\\b)");
|
const QString mentionRegex("@(\\b%1\\b)");
|
||||||
|
|
Loading…
Reference in a new issue