Details
Description
Looking at the code of QWebHitTestResult::linkTitle in qtwebkit/Source/WebKit/qt/WidgetApi/qwebframe.cpp, it does this:
QUrl QWebHitTestResult::linkTitle() const { if (!d) return QUrl(); return d->linkTitle; }
d->linkTitle is a QString, not a QUrl. I guess C++ will automatically call QUrl::QUrl(const QString & url), correct?
Why is that? If I'm not mistaken this would return an invalid QUrl in any case.
If this can't be changed because of ABI compatibility, I propose the following:
- Change the documentation to point this issue out, and how to get the title if it's still retrievable from the QUrl.
- Convert the QString to a QUrl explicitely and add a comment describing why this is the way this is.
If I get the time I can submit a contribution for these changes, but I'd like to be sure it can't be changed in some better way first.