History

Add hifi:// clickable links to chat

The handling also needed to be updated to handle domains correctly - just routing to goToURL instead of gTo fixes this.

Ryan Huffman committed 12 years ago

Commit fdaa42b1 parent 6762d4d2 files · +2 −4Browse files

Showing the changes to interface/src/Menu.cpp (1 of 2 files). Show all

Unified · Split

interface/src/Menu.cpp+1−3
@@ -984,9 +984,7 @@ void Menu::goToUser(const QString& user) { · 983 unmodified lines
984/// Open a url, shortcutting any "hifi" scheme URLs to the local application.984/// Open a url, shortcutting any "hifi" scheme URLs to the local application.
985void Menu::openUrl(const QUrl& url) {985void Menu::openUrl(const QUrl& url) {
986 if (url.scheme() == "hifi") {986 if (url.scheme() == "hifi") {
987 QString path = url.toString(QUrl::RemoveScheme);987 goToURL(url.toString());
988 path = path.remove(QRegExp("^:?/*"));
989 goTo(path);
990 } else {988 } else {
991 QDesktopServices::openUrl(url);989 QDesktopServices::openUrl(url);
992 }990 }