Skip to content

Commit

Permalink
Fixed another crash on exit (after opening at least one chat)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ri0n committed May 4, 2019
1 parent 1ed3e4d commit 2b33633
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/chatview_webkit.cpp
Expand Up @@ -395,10 +395,8 @@ ChatView::ChatView(QWidget *parent) :
d->jsObject = new ChatViewJSObject(this); /* It's a session bridge between html and c++ part */
d->webView = new ChatWebView(this);
d->webView->setFocusPolicy(Qt::NoFocus);
#ifdef WEBENGINE
d->webView->setPage(new ChatViewPage(d->webView));
#else
d->webView->setPage(new ChatViewPage(d->webView));
#ifndef WEBENGINE
d->webView->settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true);
#endif
QVBoxLayout *layout = new QVBoxLayout;
Expand Down Expand Up @@ -430,7 +428,7 @@ ChatView::ChatView(QWidget *parent) :

ChatView::~ChatView()
{
#ifdef WEBENGINE
#if defined(WEBENGINE) && QT_VERSION < QT_VERSION_CHECK(5,12,3)
// next two lines is a workaround to some Qt(?) bug very similar to
// QTBUG-48014 and bunch of others (deletes QWidget twice).
// The bug was last time reproduced with Qt-5.9. algo is pretty simple:
Expand Down

0 comments on commit 2b33633

Please sign in to comment.