Index: CMakeLists.txt =================================================================== --- CMakeLists.txt +++ CMakeLists.txt @@ -82,6 +82,28 @@ add_definitions(-DW7API) find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS WinExtras) # TODO set var for LIBS += User32.lib Ole32.lib Shell32.lib ShlWapi.lib Gdi32.lib ComCtl32.lib ? + + # taken from https://stackoverflow.com/a/40217291 + macro(get_WIN32_WINNT version) + if (CMAKE_SYSTEM_VERSION) + set(ver ${CMAKE_SYSTEM_VERSION}) + string(REGEX MATCH "^([0-9]+).([0-9])" ver ${ver}) + string(REGEX MATCH "^([0-9]+)" verMajor ${ver}) + # Check for Windows 10, b/c we'll need to convert to hex 'A'. + if ("${verMajor}" MATCHES "10") + set(verMajor "A") + string(REGEX REPLACE "^([0-9]+)" ${verMajor} ver ${ver}) + endif ("${verMajor}" MATCHES "10") + # Remove all remaining '.' characters. + string(REPLACE "." "" ver ${ver}) + # Prepend each digit with a zero. + string(REGEX REPLACE "([0-9A-Z])" "0\\1" ver ${ver}) + set(${version} "0x${ver}") + endif(CMAKE_SYSTEM_VERSION) + endmacro(get_WIN32_WINNT) + + get_WIN32_WINNT(ver) + add_definitions(-D_WIN32_WINNT=${ver}) endif() # Optional: GnomeKeyring Index: src/lib/app/datapaths.h =================================================================== --- src/lib/app/datapaths.h +++ src/lib/app/datapaths.h @@ -42,6 +42,7 @@ }; explicit DataPaths(); + ~DataPaths(); // Set absolute path of current profile static void setCurrentProfilePath(const QString &profilePath); Index: src/lib/app/datapaths.cpp =================================================================== --- src/lib/app/datapaths.cpp +++ src/lib/app/datapaths.cpp @@ -31,6 +31,10 @@ init(); } +DataPaths::~DataPaths() +{ +} + // static void DataPaths::setCurrentProfilePath(const QString &profilePath) { Index: src/lib/downloads/downloaditem.cpp =================================================================== --- src/lib/downloads/downloaditem.cpp +++ src/lib/downloads/downloaditem.cpp @@ -39,6 +39,7 @@ #ifdef Q_OS_WIN #include "Shlwapi.h" +#include "shellapi.h" #endif //#define DOWNMANAGER_DEBUG