Merged in daisuke_cato/yacreader/dev_cato11 (pull request #44)

#REVISED# Crash after app exit on MacOS Sierra platform due to Qt's QColorDialog bug.
This commit is contained in:
Luis Ángel San Martín 2016-10-28 17:32:29 +00:00
commit cb6825f8af

View File

@ -169,5 +169,13 @@ int main(int argc, char * argv[])
YACReader::exitCheck(ret); YACReader::exitCheck(ret);
#ifdef Q_OS_MAC
// ugly workaround to avoid crash when app exit on MacOS Sierra due to Qt's QColorDialog bug.
// cf. https://bugreports.qt.io/browse/QTBUG-56448
QColorDialog colorDlg(0);
colorDlg.setOption(QColorDialog::NoButtons);
colorDlg.setCurrentColor(Qt::white);
#endif
return ret; return ret;
} }