EntityInText made class instead of struct. Scheme updated.

No left trim of monospace text block when sending / displaying text.
New entity type (mention name) introduced, but not supported yet.
This commit is contained in:
John Preston
2016-04-29 15:00:48 +03:00
parent 724ba9e429
commit af248a6714
20 changed files with 1325 additions and 291 deletions
+15
View File
@@ -1512,3 +1512,18 @@ MsgId clientMsgId() {
Q_ASSERT(currentClientMsgId < EndClientMsgId);
return currentClientMsgId++;
}
QString LocationClickHandler::copyToClipboardContextItemText() const {
return lang(lng_context_copy_link);
}
void LocationClickHandler::onClick(Qt::MouseButton button) const {
if (!psLaunchMaps(_coords)) {
QDesktopServices::openUrl(_text);
}
}
void LocationClickHandler::setup() {
QString latlon(qsl("%1,%2").arg(_coords.lat).arg(_coords.lon));
_text = qsl("https://maps.google.com/maps?q=") + latlon + qsl("&ll=") + latlon + qsl("&z=16");
}