summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <git@the-compiler.org>2015-01-22 08:38:24 +0100
committerMichael BrĂ¼ning <michael.bruning@theqtcompany.com>2015-01-27 09:30:52 +0000
commitce4edc79a8cf0114e7306f0e577b34555d381221 (patch)
treefeb62c548bc34df7346bed181dc6e9ffae676b51
parent58d942e3a1d7add6967a0eee13bdbad620a18664 (diff)
downloadqtwebkit-ce4edc79a8cf0114e7306f0e577b34555d381221.tar.gz
Add QWebHitTestResult::linkTitleString().
QWebHitTestResult::linkTitle returned the link title as an (invalid) QUrl. Since the return type can not be changed before Qt 6, it is now obsolete and replaced by a linkTitleString method with a correct (QString) return type. Task-number: QTBUG-44052 Change-Id: I0636de3112eac19942db7c29c7cc5b8a0ac1e05a Reviewed-by: Michael BrĂ¼ning <michael.bruning@theqtcompany.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
-rw-r--r--Source/WebKit/qt/WidgetApi/qwebframe.cpp16
-rw-r--r--Source/WebKit/qt/WidgetApi/qwebframe.h5
2 files changed, 20 insertions, 1 deletions
diff --git a/Source/WebKit/qt/WidgetApi/qwebframe.cpp b/Source/WebKit/qt/WidgetApi/qwebframe.cpp
index eb7821d53..e8faab881 100644
--- a/Source/WebKit/qt/WidgetApi/qwebframe.cpp
+++ b/Source/WebKit/qt/WidgetApi/qwebframe.cpp
@@ -1164,7 +1164,11 @@ QUrl QWebHitTestResult::linkUrl() const
return d->linkUrl;
}
+#if QT_DEPRECATED_SINCE(5,5)
/*!
+ \obsolete
+ Use linkTitleString instead.
+
Returns the title of the link.
*/
QUrl QWebHitTestResult::linkTitle() const
@@ -1173,6 +1177,18 @@ QUrl QWebHitTestResult::linkTitle() const
return QUrl();
return d->linkTitle;
}
+#endif // QT_DEPRECATED_SINCE(5,5)
+
+/*!
+ \since 5.5
+ Returns the title of the link.
+*/
+QString QWebHitTestResult::linkTitleString() const
+{
+ if (!d)
+ return QString();
+ return d->linkTitle;
+}
/*!
\since 4.6
diff --git a/Source/WebKit/qt/WidgetApi/qwebframe.h b/Source/WebKit/qt/WidgetApi/qwebframe.h
index d665bd12f..619594336 100644
--- a/Source/WebKit/qt/WidgetApi/qwebframe.h
+++ b/Source/WebKit/qt/WidgetApi/qwebframe.h
@@ -79,7 +79,10 @@ public:
QString linkText() const;
QUrl linkUrl() const;
- QUrl linkTitle() const;
+#if QT_DEPRECATED_SINCE(5,5)
+ QT_DEPRECATED QUrl linkTitle() const;
+#endif // QT_DEPRECATED_SINCE(5,5)
+ QString linkTitleString() const;
QWebFrame *linkTargetFrame() const;
QWebElement linkElement() const;