Windows build fixes

pull/358/head
f4exb 2019-05-31 19:24:02 +02:00
rodzic 76f20fe5d0
commit 8a0d0de573
2 zmienionych plików z 11 dodań i 1 usunięć

Wyświetl plik

@ -34,9 +34,15 @@ static int runQtApplication(int argc, char* argv[], qtwebapp::LoggerWithFile *lo
QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8"));
QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
*/
#ifdef _MSC_VER
QCoreApplication::setOrganizationName("f4exb");
QCoreApplication::setApplicationName("SDRangel");
QCoreApplication::setApplicationVersion("4.8.2");
#else
QCoreApplication::setOrganizationName(COMPANY);
QCoreApplication::setApplicationName(APPLICATION_NAME);
QCoreApplication::setApplicationVersion(SDRANGEL_VERSION);
#endif
#if QT_VERSION >= 0x050600
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps

Wyświetl plik

@ -49,7 +49,9 @@ WebAPIRequestMapper::WebAPIRequestMapper(QObject* parent) :
HttpRequestHandler(parent),
m_adapter(0)
{
#ifndef _MSC_VER
Q_INIT_RESOURCE(webapi);
#endif
qtwebapp::HttpDocrootSettings docrootSettings;
docrootSettings.path = ":/webapi";
m_staticFileController = new qtwebapp::StaticFileController(docrootSettings, parent);
@ -58,7 +60,9 @@ WebAPIRequestMapper::WebAPIRequestMapper(QObject* parent) :
WebAPIRequestMapper::~WebAPIRequestMapper()
{
delete m_staticFileController;
#ifndef _MSC_VER
Q_CLEANUP_RESOURCE(webapi);
#endif
}
void WebAPIRequestMapper::service(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response)