rpcsx/rpcs3/rpcs3qt/curl_handle.h
Megamouse 3056a4db83 Qt: don't deleteLater the progress_dialog
It's already deleted on close by Qt anyway.
Also, remove QObject from curl_handle.
2024-03-09 15:18:20 +01:00

37 lines
527 B
C++

#pragma once
#include <array>
#ifndef CURL_STATICLIB
#define CURL_STATICLIB
#endif
#include <curl/curl.h>
namespace rpcs3::curl
{
inline bool g_curl_verbose = false;
class curl_handle
{
public:
explicit curl_handle();
~curl_handle();
CURL* get_curl() const;
operator CURL*() const
{
return get_curl();
}
void reset_error_buffer();
std::string get_verbose_error(CURLcode code) const;
private:
CURL* m_curl = nullptr;
bool m_uses_error_buffer = false;
std::array<char, CURL_ERROR_SIZE> m_error_buffer;
};
}