Skip to content

Commit 2401acf

Browse files
committed
use web page instead web view in utils
1 parent 57c2cf3 commit 2401acf

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

src/webdriver/extension_qt/web_view_executor.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ void QWebViewCmdExecutor::CanHandleUrl(const std::string& url, bool* can, Error
222222
*error = new Error(kNoSuchWindow);
223223
return;
224224
}
225-
*can = QWebViewUtil::isUrlSupported(pWebView, url, error);
225+
*can = QWebViewUtil::isUrlSupported(pWebView->page(), url, error);
226226
}
227227

228228
void QWebViewCmdExecutor::GetTitle(std::string* title, Error **error) {

src/webdriver/extension_qt/web_view_util.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99

1010
namespace webdriver {
1111

12-
bool QWebViewUtil::isUrlSupported(QWebView* pWebView, const std::string& url, Error **error) {
13-
QWebPage* pWebPage = pWebView->page();
12+
bool QWebViewUtil::isUrlSupported(QWebPage* pWebPage, const std::string& url, Error **error) {
1413
if (NULL == pWebPage) {
1514
//*error = new Error(kBadRequest);
1615
GlobalLogger::Log(kWarningLogLevel, " Invalid QWebPage* ");

src/webdriver/extension_qt/web_view_util.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class Error;
1818

1919
class QWebViewUtil {
2020
public:
21-
static bool isUrlSupported(QWebView* pWebView, const std::string& url, Error **error);
21+
static bool isUrlSupported(QWebPage* pWebPage, const std::string& url, Error **error);
2222
static bool isUrlSupported(const std::string& url, Error **error);
2323
static QWebView* getWebView(Session* session, const ViewId& viewId);
2424

0 commit comments

Comments
 (0)