Avoid explicit deletion of preview window: this crashes on the mac. Use deleteonclose flag instead

This commit is contained in:
Jean-Francois Dockes 2019-11-25 10:04:55 +01:00
parent 1243c30980
commit d690882b67
3 changed files with 3 additions and 1 deletions

View File

@ -99,6 +99,8 @@ static void trimwildcards(string& elt)
void Preview::init()
{
LOGDEB("Preview::init\n");
setAttribute(Qt::WA_DeleteOnClose);
// Create the first tab (the tab widget is created with one
// initial tab for ease of use in designer, we remove it).
addEditorTab();

View File

@ -38,7 +38,6 @@ void RclMain::previewClosed(Preview *w)
} else {
LOGDEB("Old preview closed\n");
}
delete w;
}
// Document up to date check. The main problem we try to solve is

View File

@ -104,6 +104,7 @@ void SnippetsW::init()
connect(prevPB, SIGNAL(clicked()), this, SLOT(slotEditFindPrevious()));
// Get rid of the placeholder widget created from the .ui
delete browserw;
#if defined(USING_WEBKIT)
browserw = new QWebView(this);