diff --git a/src/chatlog/chatmessage.cpp b/src/chatlog/chatmessage.cpp index c2a563b4f..017c34e57 100644 --- a/src/chatlog/chatmessage.cpp +++ b/src/chatlog/chatmessage.cpp @@ -249,7 +249,9 @@ QString ChatMessage::detectAnchors(const QString &str) "(?:\\b)((www\\.)|(http[s]?|ftp)://)" // (protocol)://(printable - non-special character) // http://ONEORMOREALHPA-DIGIT "\\w+\\S+)" // any other character, lets domains and other - "|(?:\\b)(file:///)([\\S| ]*)" //link to a local file, valid until the end of the line + // ↓ link to a file, or samba share + // https://en.wikipedia.org/wiki/File_URI_scheme + "|(?:\\b)((file|smb)://)([\\S| ]*)" "|(?:\\b)(tox:[a-zA-Z\\d]{76})" //link with full user address "|(?:\\b)(mailto:\\S+@\\S+\\.\\S+)" //@mail link "|(?:\\b)(tox:\\S+@\\S+)"); // starts with `tox` then : and only alpha-digits till the end diff --git a/src/widget/systemtrayicon.cpp b/src/widget/systemtrayicon.cpp index 32812fb2d..1a09f2a42 100644 --- a/src/widget/systemtrayicon.cpp +++ b/src/widget/systemtrayicon.cpp @@ -99,19 +99,33 @@ SystemTrayIcon::SystemTrayIcon() SystemTrayIcon::~SystemTrayIcon() { - delete qtIcon; + // only delete the used backend + switch(backendType) + { + case SystrayBackendType::Qt: + delete qtIcon; + break; #ifdef ENABLE_SYSTRAY_UNITY_BACKEND - delete unityIndicator; - delete unityMenu; + case SystrayBackendType::Unity: + delete unityIndicator; + delete unityMenu; + break; #endif #ifdef ENABLE_SYSTRAY_STATUSNOTIFIER_BACKEND - delete statusNotifier; - delete snMenu; + case SystrayBackendType::StatusNotifier: + delete statusNotifier; + delete snMenu; + break; #endif #ifdef ENABLE_SYSTRAY_GTK_BACKEND - delete gtkIcon; - delete gtkMenu; + case SystrayBackendType::GTK: + delete gtkIcon; + delete gtkMenu; + break; #endif + default: + qWarning() << "Unknown Systray Backend Type"; + } qDebug() << "Deleting SystemTrayIcon"; }