Exclude charts features for our Windows builds
This commit is contained in:
parent
c347fb174c
commit
8240cf55ef
4 changed files with 35 additions and 1 deletions
|
@ -4,6 +4,8 @@
|
|||
#include "encountertablemodel.h"
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
#if __has_include(<QtCharts>)
|
||||
#include <QtCharts>
|
||||
|
||||
namespace Ui {
|
||||
|
@ -72,4 +74,25 @@ private:
|
|||
void showHelpDialog();
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
// 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
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit WildMonChart(QWidget *, const EncounterTableModel *) {};
|
||||
~WildMonChart() {};
|
||||
|
||||
public slots:
|
||||
void setTable(const EncounterTableModel *) {};
|
||||
void clearTable() {};
|
||||
void refresh() {};
|
||||
};
|
||||
|
||||
#endif // __has_include(<QtCharts>)
|
||||
|
||||
#endif // WILDMONCHART_H
|
||||
|
|
|
@ -4,7 +4,11 @@
|
|||
#
|
||||
#-------------------------------------------------
|
||||
|
||||
QT += core gui qml network charts
|
||||
QT += core gui qml network
|
||||
|
||||
!win32 {
|
||||
QT += charts
|
||||
}
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
|
|
|
@ -124,6 +124,10 @@ void MainWindow::initWindow() {
|
|||
ui->actionCheck_for_Updates->setVisible(false);
|
||||
#endif
|
||||
|
||||
#ifdef DISABLE_CHARTS_MODULE
|
||||
ui->pushButton_SummaryChart->setVisible(false);
|
||||
#endif
|
||||
|
||||
setWindowDisabled(true);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#if __has_include(<QtCharts>)
|
||||
#include "wildmonchart.h"
|
||||
#include "ui_wildmonchart.h"
|
||||
#include "config.h"
|
||||
|
@ -447,3 +448,5 @@ void WildMonChart::closeEvent(QCloseEvent *event) {
|
|||
porymapConfig.wildMonChartGeometry = saveGeometry();
|
||||
QWidget::closeEvent(event);
|
||||
}
|
||||
|
||||
#endif // __has_include(<QtCharts>)
|
||||
|
|
Loading…
Reference in a new issue