-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
366 geometry editor map #367
Conversation
@@ -1156,8 +1156,8 @@ EditorWebView::EditorWebView(bool isIP, const openstudio::model::Model& model, Q | |||
m_view->settings()->setAttribute(QWebEngineSettings::WebAttribute::LocalContentCanAccessRemoteUrls, true); | |||
m_view->settings()->setAttribute(QWebEngineSettings::WebAttribute::SpatialNavigationEnabled, true); | |||
|
|||
m_page = new OSWebEnginePage(this); | |||
m_view->setPage(m_page); // note, view does not take ownership of page | |||
m_page = new OSWebEnginePage(m_view); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure this change is needed?
this->profile()->setUrlRequestInterceptor(interceptor); | ||
} | ||
|
||
OSWebEnginePage::~OSWebEnginePage() {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need to free the OSUrlRequestInterceptor*. You should perhaps just use a unique_ptr?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://doc.qt.io/qt-5/qwebengineprofile.html#setUrlRequestInterceptor
https://doc.qt.io/qt-5/qwebengineprofile.html#setUrlRequestInterceptor
I interpret that as meaning it doesn't free.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
welllll I guess you do pass this as a parent : OSUrlRequestInterceptor* interceptor = new OSUrlRequestInterceptor(this);
...
No description provided.