diff --git a/include/ui/wildmonchart.h b/include/ui/wildmonchart.h index 3be7e468..20840c87 100644 --- a/include/ui/wildmonchart.h +++ b/include/ui/wildmonchart.h @@ -78,7 +78,6 @@ private: // As of writing our static Qt build for Windows doesn't include the QtCharts module, so we dummy the class out here. // The charts module is additionally excluded from Windows in porymap.pro -#define DISABLE_CHARTS_MODULE class WildMonChart : public QWidget { diff --git a/porymap.pro b/porymap.pro index 5734fd73..51eadbb3 100644 --- a/porymap.pro +++ b/porymap.pro @@ -6,8 +6,10 @@ QT += core gui qml network -!win32 { +qtHaveModule(charts) { QT += charts +} else { + warning("Qt module 'charts' not found, disabling chart features.") } greaterThan(QT_MAJOR_VERSION, 4): QT += widgets diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index d9e65eb3..6fb5b899 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -127,7 +127,7 @@ void MainWindow::initWindow() { ui->actionCheck_for_Updates->setVisible(false); #endif -#ifdef DISABLE_CHARTS_MODULE +#ifdef QT_CHARTS_LIB ui->pushButton_SummaryChart->setVisible(false); #endif