mirror of
https://github.com/huderlem/porymap.git
synced 2026-08-19 23:25:09 -05:00
Allow compiling without the network module
This commit is contained in:
@@ -26,10 +26,14 @@
|
||||
});
|
||||
*/
|
||||
|
||||
#if __has_include(<QNetworkAccessManager>)
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QNetworkRequest>
|
||||
#include <QNetworkReply>
|
||||
#include <QDateTime>
|
||||
#endif
|
||||
|
||||
#ifdef QT_NETWORK_LIB
|
||||
|
||||
class NetworkReplyData : public QObject
|
||||
{
|
||||
@@ -84,4 +88,6 @@ private:
|
||||
const QNetworkRequest getRequest(const QUrl &url);
|
||||
};
|
||||
|
||||
#endif // QT_NETWORK_LIB
|
||||
|
||||
#endif // NETWORK_H
|
||||
|
||||
@@ -331,8 +331,11 @@ private:
|
||||
QPointer<FilterChildrenProxyModel> layoutListProxyModel = nullptr;
|
||||
QPointer<LayoutTreeModel> layoutTreeModel = nullptr;
|
||||
|
||||
#ifdef QT_NETWORK_LIB
|
||||
QPointer<UpdatePromoter> updatePromoter = nullptr;
|
||||
QPointer<NetworkAccessManager> networkAccessManager = nullptr;
|
||||
#endif
|
||||
|
||||
QPointer<AboutPorymap> aboutWindow = nullptr;
|
||||
QPointer<WildMonChart> wildMonChart = nullptr;
|
||||
QPointer<WildMonSearch> wildMonSearch = nullptr;
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef UPDATEPROMOTER_H
|
||||
#define UPDATEPROMOTER_H
|
||||
|
||||
#ifdef QT_NETWORK_LIB
|
||||
|
||||
#include "network.h"
|
||||
|
||||
#include <QDialog>
|
||||
@@ -47,4 +49,6 @@ signals:
|
||||
void changedPreferences();
|
||||
};
|
||||
|
||||
#endif // QT_NETWORK_LIB
|
||||
|
||||
#endif // UPDATEPROMOTER_H
|
||||
|
||||
Reference in New Issue
Block a user