Support non-Windows builds without QtCharts

This commit is contained in:
GriffinR 2024-12-18 13:25:48 -05:00
parent bce32121f0
commit 4f6291a3f6
3 changed files with 4 additions and 3 deletions

View file

@ -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. // 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 // The charts module is additionally excluded from Windows in porymap.pro
#define DISABLE_CHARTS_MODULE
class WildMonChart : public QWidget class WildMonChart : public QWidget
{ {

View file

@ -6,8 +6,10 @@
QT += core gui qml network QT += core gui qml network
!win32 { qtHaveModule(charts) {
QT += charts QT += charts
} else {
warning("Qt module 'charts' not found, disabling chart features.")
} }
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

View file

@ -127,7 +127,7 @@ void MainWindow::initWindow() {
ui->actionCheck_for_Updates->setVisible(false); ui->actionCheck_for_Updates->setVisible(false);
#endif #endif
#ifdef DISABLE_CHARTS_MODULE #ifdef QT_CHARTS_LIB
ui->pushButton_SummaryChart->setVisible(false); ui->pushButton_SummaryChart->setVisible(false);
#endif #endif