From 7862cf4c40547b25f8debf503db583b1b3a867f2 Mon Sep 17 00:00:00 2001 From: Person Date: Sun, 12 Mar 2017 18:34:45 -0700 Subject: [PATCH] --Bug fixes -Set path to libxml2 properly on Mac in defaults.pri -Workaround for color picker dialog crashing on program exit on Mac --- Builds/QtCreator/defaults.pri | 16 ++++++++++++++-- Source/Fractorium/Fractorium.cpp | 4 ++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/Builds/QtCreator/defaults.pri b/Builds/QtCreator/defaults.pri index 2b60d30..2c11e49 100644 --- a/Builds/QtCreator/defaults.pri +++ b/Builds/QtCreator/defaults.pri @@ -51,7 +51,13 @@ win32 { INCLUDEPATH += /usr/local/include/GL INCLUDEPATH += /usr/include/glm INCLUDEPATH += /usr/include/tbb - INCLUDEPATH += /usr/include/libxml2 + + unix:!macx { + INCLUDEPATH += /usr/include/libxml2 + } + else { + INCLUDEPATH += /usr/local/opt/libxml2/include/libxml2 + } #libjpeg and libpng aren't in separate folders, so nothing to add here for them. } @@ -83,7 +89,13 @@ else { LIBS += -lpng LIBS += -ltbb LIBS += -lpthread - LIBS += -lxml2 + + unix:!macx { + LIBS += -lxml2 + } + else { + LIBS += -L/usr/local/opt/libxml2/lib -lxml2 + } } macx { diff --git a/Source/Fractorium/Fractorium.cpp b/Source/Fractorium/Fractorium.cpp index 01fd985..a422d4c 100644 --- a/Source/Fractorium/Fractorium.cpp +++ b/Source/Fractorium/Fractorium.cpp @@ -45,6 +45,10 @@ Fractorium::Fractorium(QWidget* p) m_VarSortMode = 1;//Sort by weight by default. m_PaletteSortMode = 0;//Sort by palette ascending by default. m_ColorDialog = new QColorDialog(this); +#ifdef __APPLE__ + //Fixes crashing problem when closing Fractorium in Mac OS 10.12 Sierra. + m_ColorDialog->setOption(QColorDialog::NoButtons); +#endif m_Settings = FractoriumSettings::Instance(); m_QssDialog = new QssDialog(this); m_FileDialog = nullptr;//Use lazy instantiation upon first use.