CURL_STATICLIB macro cleanup

Also move includes from headers. CURL is just void.
This commit is contained in:
Nekotekina 2020-03-22 14:10:57 +03:00
parent e606130262
commit 5261886449
4 changed files with 14 additions and 10 deletions

View File

@ -7,6 +7,12 @@
#include <QJsonDocument>
#include <QThread>
#define NOMINMAX
#ifndef CURL_STATICLIB
#define CURL_STATICLIB
#endif
#include <curl/curl.h>
LOG_CHANNEL(compat_log, "Compat");
constexpr auto qstr = QString::fromStdString;

View File

@ -5,10 +5,6 @@
#include <QPainter>
#include <QJsonObject>
#define NOMINMAX
#define CURL_STATICLIB
#include <curl/curl.h>
class gui_settings;
class progress_dialog;
@ -44,7 +40,7 @@ private:
std::atomic<bool> m_curl_result = false;
std::atomic<bool> m_curl_abort = false;
double m_actual_dwnld_size = -1.0;
CURL *m_curl = nullptr;
void* m_curl = nullptr;
QByteArray m_curl_buf;
progress_dialog* m_progress_dialog = nullptr;
std::shared_ptr<gui_settings> m_xgui_settings;

View File

@ -31,6 +31,11 @@
#include <sys/stat.h>
#endif
#ifndef CURL_STATICLIB
#define CURL_STATICLIB
#endif
#include <curl/curl.h>
LOG_CHANNEL(update_log, "UPDATER");
size_t curl_write_cb(char* ptr, size_t /*size*/, size_t nmemb, void* userdata)

View File

@ -1,9 +1,6 @@
#pragma once
#include "stdafx.h"
#define NOMINMAX
#define CURL_STATICLIB
#include <curl/curl.h>
#include <QObject>
#include <QByteArray>
@ -21,7 +18,7 @@ private:
progress_dialog* m_progress_dialog = nullptr;
QWidget* m_parent = nullptr;
CURL *m_curl = nullptr;
void* m_curl = nullptr;
QByteArray m_curl_buf;
std::atomic<bool> m_curl_abort = false;
std::atomic<bool> m_curl_result = false;