Skip to content

Commit

Permalink
Support non-Windows builds without QtCharts
Browse files Browse the repository at this point in the history
  • Loading branch information
GriffinRichards committed Dec 18, 2024
1 parent bce3212 commit 4f6291a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion include/ui/wildmonchart.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ public slots:

// 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
{
Expand Down
4 changes: 3 additions & 1 deletion porymap.pro
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 4f6291a

Please sign in to comment.