[Development] mailto links in Qt Assistant - a fix?
David Burson
david_burson at ntm.org
Tue Feb 7 20:26:21 CET 2012
Hi,
We're using Qt 4.7.4 and discovered when you click a mailto link in a custom
help file in Qt Assistant, nothing happens.
Here's our fix, showing lines 171-179 in the end of
AbstractHelpViewer::launchWithExternalApp(const QUrl &) in
[Qt]\tools\assistant\tools\assistant\helpviewer.cpp
actualTmpFile.close();
return
QDesktopServices::openUrl(QUrl(actualTmpFile.fileName()));
}
} else if (url.scheme() == QLatin1String("http") ||
url.scheme() == QLatin1String("mailto")) {
return QDesktopServices::openUrl(url);
}
return false;
}
The only change was replacing the old line 174, which tests for url.scheme()
= "http", with lines 174-175, which adds the extra test for "mailto".
My question: is there a reason "mailto" was deliberately omitted, or is it
a bug? Is this a reasonable fix? Or is there some security issue with
allowing mailto links like this?
Thanks,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120207/db2cb270/attachment.html>
More information about the Development
mailing list