Move windows-only code into #ifdef

This commit is contained in:
baldurk
2017-07-12 21:27:00 +01:00
parent bb3fb53a2f
commit a01b85135b
+7 -4
View File
@@ -723,12 +723,9 @@ protected:
};
#if defined(Q_OS_WIN32)
#include <windows.h>
#include <shellapi.h>
#else
#include <unistd.h>
#endif
#include <windows.h>
typedef LSTATUS(APIENTRY *PFN_RegCreateKeyExA)(HKEY hKey, LPCSTR lpSubKey, DWORD Reserved,
LPSTR lpClass, DWORD dwOptions, REGSAM samDesired,
@@ -737,6 +734,12 @@ typedef LSTATUS(APIENTRY *PFN_RegCreateKeyExA)(HKEY hKey, LPCSTR lpSubKey, DWORD
typedef LSTATUS(APIENTRY *PFN_RegCloseKey)(HKEY hKey);
#else
#include <unistd.h>
#endif
bool IsRunningAsAdmin()
{
#if defined(Q_OS_WIN32)