summaryrefslogtreecommitdiffstats
path: root/src/corelib/global
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/global')
-rw-r--r--src/corelib/global/global.pri5
-rw-r--r--src/corelib/global/qfloat16_p.h4
-rw-r--r--src/corelib/global/qglobal.cpp3
-rw-r--r--src/corelib/global/qlogging.cpp2
-rw-r--r--src/corelib/global/qnamespace.h2
-rw-r--r--src/corelib/global/qoperatingsystemversion_win.cpp3
-rw-r--r--src/corelib/global/qoperatingsystemversion_win_p.h63
7 files changed, 78 insertions, 4 deletions
diff --git a/src/corelib/global/global.pri b/src/corelib/global/global.pri
index e1ca8828f9..0f8935d4b5 100644
--- a/src/corelib/global/global.pri
+++ b/src/corelib/global/global.pri
@@ -42,7 +42,10 @@ SOURCES += \
VERSIONTAGGING_SOURCES = global/qversiontagging.cpp
darwin: SOURCES += global/qoperatingsystemversion_darwin.mm
-win32: SOURCES += global/qoperatingsystemversion_win.cpp
+win32 {
+ SOURCES += global/qoperatingsystemversion_win.cpp
+ HEADERS += global/qoperatingsystemversion_win_p.h
+}
# qlibraryinfo.cpp includes qconfig.cpp
INCLUDEPATH += $$QT_BUILD_TREE/src/corelib/global
diff --git a/src/corelib/global/qfloat16_p.h b/src/corelib/global/qfloat16_p.h
index ae52e64435..f3fc96e119 100644
--- a/src/corelib/global/qfloat16_p.h
+++ b/src/corelib/global/qfloat16_p.h
@@ -61,9 +61,9 @@ static inline bool qt_is_inf(qfloat16 d) Q_DECL_NOTHROW
bool is_inf;
uchar *ch = (uchar *)&d;
if (QSysInfo::ByteOrder == QSysInfo::BigEndian)
- is_inf = (ch[0] & 0x7c) == 0x7c;
+ is_inf = (ch[0] & 0x7c) == 0x7c && (ch[0] & 0x02) == 0;
else
- is_inf = (ch[1] & 0x7c) == 0x7c;
+ is_inf = (ch[1] & 0x7c) == 0x7c && (ch[1] & 0x02) == 0;
return is_inf;
}
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index 2c2dcb663b..0444926df5 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -46,6 +46,9 @@
#include "qdatetime.h"
#include "qoperatingsystemversion.h"
#include "qoperatingsystemversion_p.h"
+#if defined(Q_OS_WIN) || defined(Q_OS_CYGWIN) || defined(Q_OS_WINRT)
+#include "qoperatingsystemversion_win_p.h"
+#endif
#include <private/qlocale_tools_p.h>
#include <qmutex.h>
diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp
index 7623de8423..0861763492 100644
--- a/src/corelib/global/qlogging.cpp
+++ b/src/corelib/global/qlogging.cpp
@@ -61,7 +61,7 @@
#include <qt_windows.h>
#endif
#if QT_CONFIG(slog2)
-#include <slog2.h>
+#include <sys/slog2.h>
#endif
#if QT_HAS_INCLUDE(<paths.h>)
#include <paths.h>
diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h
index ab83730caa..2a8345195d 100644
--- a/src/corelib/global/qnamespace.h
+++ b/src/corelib/global/qnamespace.h
@@ -477,6 +477,8 @@ public:
WA_TabletTracking = 129,
+ WA_ContentsMarginsRespectsSafeArea = 130,
+
// Add new attributes before this line
WA_AttributeCount
};
diff --git a/src/corelib/global/qoperatingsystemversion_win.cpp b/src/corelib/global/qoperatingsystemversion_win.cpp
index 060ca2f7da..f3662ae1f9 100644
--- a/src/corelib/global/qoperatingsystemversion_win.cpp
+++ b/src/corelib/global/qoperatingsystemversion_win.cpp
@@ -37,7 +37,10 @@
**
****************************************************************************/
+#include "qoperatingsystemversion_win_p.h"
+
#include "qoperatingsystemversion_p.h"
+
#include <qt_windows.h>
#include <qbytearray.h>
diff --git a/src/corelib/global/qoperatingsystemversion_win_p.h b/src/corelib/global/qoperatingsystemversion_win_p.h
new file mode 100644
index 0000000000..446bd286fc
--- /dev/null
+++ b/src/corelib/global/qoperatingsystemversion_win_p.h
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QOPERATINGSYSTEMVERSION_WIN_P_H
+#define QOPERATINGSYSTEMVERSION_WIN_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtCore/qglobal.h>
+#include <qt_windows.h>
+
+QT_BEGIN_NAMESPACE
+
+OSVERSIONINFOEX qWindowsVersionInfo();
+
+QT_END_NAMESPACE
+
+#endif // QOPERATINGSYSTEMVERSION_WIN_P_H