summaryrefslogtreecommitdiffstats
path: root/src/corelib/global
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2016-01-08 12:30:57 +0100
committerFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2016-01-08 12:35:24 +0100
commitad16478a76815f8f61d454bf7760aaf9ffbb4b51 (patch)
treeeefdd9219cc9d59b62e042f49fc7555b980cb7a4 /src/corelib/global
parent80a741f3616290897ba0d9f1cbd3c9c5ee62da37 (diff)
parent09c92863001790a0304a5ef389901ee2b5b6cdc2 (diff)
Merge remote-tracking branch 'origin/5.6' into dev
Based on merge done by Liang Qi Change-Id: Id566e5b9f284d29bff2199f13f9417c660f5b26f
Diffstat (limited to 'src/corelib/global')
-rw-r--r--src/corelib/global/qglobal.cpp54
-rw-r--r--src/corelib/global/qglobal.h1
-rw-r--r--src/corelib/global/qnamespace.qdoc4
-rw-r--r--src/corelib/global/qprocessordetection.h50
4 files changed, 31 insertions, 78 deletions
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index a8385d3174..606a60db5a 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -66,18 +66,8 @@
#endif
#ifdef Q_OS_WINRT
-#include <wrl.h>
-#include <windows.networking.h>
-#include <windows.networking.sockets.h>
-#include <windows.networking.connectivity.h>
-using namespace Microsoft::WRL;
-using namespace Microsoft::WRL::Wrappers;
-using namespace ABI::Windows::Foundation;
-using namespace ABI::Windows::Foundation::Collections;
-using namespace ABI::Windows::Networking;
-using namespace ABI::Windows::Networking::Connectivity;
-using namespace ABI::Windows::Networking::Sockets;
-#endif
+#include <Ws2tcpip.h>
+#endif // Q_OS_WINRT
#if defined(Q_OS_VXWORKS) && defined(_WRS_KERNEL)
# include <envLib.h>
@@ -1881,8 +1871,6 @@ QT_BEGIN_INCLUDE_NAMESPACE
#include "qt_windows.h"
QT_END_INCLUDE_NAMESPACE
-#ifndef Q_OS_WINRT
-
# ifndef QT_BOOTSTRAPPED
class QWindowsSockInit
{
@@ -1913,8 +1901,6 @@ QWindowsSockInit::~QWindowsSockInit()
Q_GLOBAL_STATIC(QWindowsSockInit, winsockInit)
# endif // QT_BOOTSTRAPPED
-#endif // !Q_OS_WINRT
-
#ifdef Q_OS_WINRT
static inline HMODULE moduleHandleForFunction(LPCVOID address)
{
@@ -2807,42 +2793,6 @@ QString QSysInfo::machineHostName()
struct utsname u;
if (uname(&u) == 0)
return QString::fromLocal8Bit(u.nodename);
-#elif defined(Q_OS_WINRT)
- ComPtr<INetworkInformationStatics> statics;
- GetActivationFactory(HString::MakeReference(RuntimeClass_Windows_Networking_Connectivity_NetworkInformation).Get(), &statics);
-
- ComPtr<IVectorView<HostName *>> hostNames;
- statics->GetHostNames(&hostNames);
- if (!hostNames)
- return QString();
-
- unsigned int size;
- hostNames->get_Size(&size);
- if (size == 0)
- return QString();
-
- for (unsigned int i = 0; i < size; ++i) {
- ComPtr<IHostName> hostName;
- hostNames->GetAt(i, &hostName);
- HostNameType type;
- hostName->get_Type(&type);
- if (type != HostNameType_DomainName)
- continue;
-
- HString name;
- hostName->get_CanonicalName(name.GetAddressOf());
- UINT32 length;
- PCWSTR rawString = name.GetRawBuffer(&length);
- return QString::fromWCharArray(rawString, length);
- }
- ComPtr<IHostName> firstHost;
- hostNames->GetAt(0, &firstHost);
-
- HString name;
- firstHost->get_CanonicalName(name.GetAddressOf());
- UINT32 length;
- PCWSTR rawString = name.GetRawBuffer(&length);
- return QString::fromWCharArray(rawString, length);
#else
# ifdef Q_OS_WIN
// Important: QtNetwork depends on machineHostName() initializing ws2_32.dll
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index c84a6b5577..232c52b8fe 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -611,7 +611,6 @@ class QDataStream;
#if defined(Q_OS_WINRT)
# define QT_NO_FILESYSTEMWATCHER
-# define QT_NO_GETADDRINFO
# define QT_NO_NETWORKPROXY
# define QT_NO_PROCESS
# define QT_NO_SOCKETNOTIFIER
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc
index 7fd76be3ca..60d6d4b929 100644
--- a/src/corelib/global/qnamespace.qdoc
+++ b/src/corelib/global/qnamespace.qdoc
@@ -1719,8 +1719,8 @@
\value Key_unknown
\value Key_Call A key to answer or initiate a call (see Qt::Key_ToggleCallHangup for a key to toggle current call state)
- \value Key_Camera A key to activate the camera shutter
- \value Key_CameraFocus A key to focus the camera
+ \value Key_Camera A key to activate the camera shutter. On Windows Runtime, the environment variable QT_QPA_ENABLE_CAMERA_KEYS must be set to receive the event.
+ \value Key_CameraFocus A key to focus the camera. On Windows Runtime, the environment variable QT_QPA_ENABLE_CAMERA_KEYS must be set to receive the event.
\value Key_Context1
\value Key_Context2
\value Key_Context3
diff --git a/src/corelib/global/qprocessordetection.h b/src/corelib/global/qprocessordetection.h
index f8c168e074..b490e4a6b0 100644
--- a/src/corelib/global/qprocessordetection.h
+++ b/src/corelib/global/qprocessordetection.h
@@ -88,47 +88,51 @@
auto-detection implemented below.
*/
#if defined(__arm__) || defined(__TARGET_ARCH_ARM) || defined(_M_ARM) || defined(__aarch64__)
-# define Q_PROCESSOR_ARM
# if defined(__aarch64__)
# define Q_PROCESSOR_ARM_64
# define Q_PROCESSOR_WORDSIZE 8
# else
# define Q_PROCESSOR_ARM_32
# endif
-# if defined(__ARM64_ARCH_8__) \
- || defined(__ARM_ARCH_8A) \
- || (defined(__ARM_ARCH) && __ARM_ARCH == 8)
-# define Q_PROCESSOR_ARM_V8
-# define Q_PROCESSOR_ARM_V7
-# define Q_PROCESSOR_ARM_V6
-# define Q_PROCESSOR_ARM_V5
+# if defined(__ARM_ARCH) && __ARM_ARCH > 1
+# define Q_PROCESSOR_ARM __ARM_ARCH
+# elif defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM > 1
+# define Q_PROCESSOR_ARM __TARGET_ARCH_ARM
+# elif defined(_M_ARM) && _M_ARM > 1
+# define Q_PROCESSOR_ARM _M_ARM
+# elif defined(__ARM64_ARCH_8__)
+# define Q_PROCESSOR_ARM 8
# elif defined(__ARM_ARCH_7__) \
|| defined(__ARM_ARCH_7A__) \
|| defined(__ARM_ARCH_7R__) \
|| defined(__ARM_ARCH_7M__) \
|| defined(__ARM_ARCH_7S__) \
- || defined(_ARM_ARCH_7) \
- || (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM-0 >= 7) \
- || (defined(_M_ARM) && _M_ARM-0 >= 7) \
- || (defined(__ARMv7__))
-# define Q_PROCESSOR_ARM_V7
-# define Q_PROCESSOR_ARM_V6
-# define Q_PROCESSOR_ARM_V5
+ || defined(_ARM_ARCH_7)
+# define Q_PROCESSOR_ARM 7
# elif defined(__ARM_ARCH_6__) \
|| defined(__ARM_ARCH_6J__) \
|| defined(__ARM_ARCH_6T2__) \
|| defined(__ARM_ARCH_6Z__) \
|| defined(__ARM_ARCH_6K__) \
|| defined(__ARM_ARCH_6ZK__) \
- || defined(__ARM_ARCH_6M__) \
- || (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM-0 >= 6) \
- || (defined(_M_ARM) && _M_ARM-0 >= 6)
-# define Q_PROCESSOR_ARM_V6
-# define Q_PROCESSOR_ARM_V5
+ || defined(__ARM_ARCH_6M__)
+# define Q_PROCESSOR_ARM 6
# elif defined(__ARM_ARCH_5TEJ__) \
- || defined(__ARM_ARCH_5TE__) \
- || (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM-0 >= 5) \
- || (defined(_M_ARM) && _M_ARM-0 >= 5)
+ || defined(__ARM_ARCH_5TE__)
+# define Q_PROCESSOR_ARM 5
+# else
+# define Q_PROCESSOR_ARM 0
+# endif
+# if Q_PROCESSOR_ARM >= 8
+# define Q_PROCESSOR_ARM_V8
+# endif
+# if Q_PROCESSOR_ARM >= 7
+# define Q_PROCESSOR_ARM_V7
+# endif
+# if Q_PROCESSOR_ARM >= 6
+# define Q_PROCESSOR_ARM_V6
+# endif
+# if Q_PROCESSOR_ARM >= 5
# define Q_PROCESSOR_ARM_V5
# endif
# if defined(__ARMEL__)