Support non-Windows builds without QtCharts
This commit is contained in:
parent
bce32121f0
commit
4f6291a3f6
3 changed files with 4 additions and 3 deletions
|
@ -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
|
||||||
{
|
{
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue