Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/5.9' into dev
Browse files Browse the repository at this point in the history
Conflicts:
	.qmake.conf

Change-Id: I43531e087bb810889d5c1fbfcdffb29b78804839
  • Loading branch information
liangqi committed Jul 6, 2017
2 parents 9ca3443 + 03b4838 commit 7f269a5
Show file tree
Hide file tree
Showing 146 changed files with 632 additions and 273 deletions.
2 changes: 1 addition & 1 deletion doc/global/externalsites/external-resources.qdoc
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
*/

/*!
\externalpage http://www.mingw.org/
\externalpage https://mingw-w64.org/
\title MinGW
*/

Expand Down
4 changes: 4 additions & 0 deletions doc/global/externalsites/qtcreator.qdoc
Original file line number Diff line number Diff line change
Expand Up @@ -555,3 +555,7 @@
\externalpage http://doc.qt.io/qtcreator/creator-project-creating.html#creating-c-classes
\title Qt Creator: Creating C++ Classes
*/
/*!
\externalpage http://doc.qt.io/qtcreator/creator-writing-program.html
\title Creating a Qt Widget Based Application
*/
2 changes: 1 addition & 1 deletion doc/global/qt-html-templates-offline-simple.qdocconf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ qhp.extraFiles += style/offline-simple.css
HTML.headerstyles = \
" <link rel=\"stylesheet\" type=\"text/css\" href=\"style/offline-simple.css\" />\n" \
" <script type=\"text/javascript\">\n" \
" window.onload = function(){document.getElementsByTagName(\"link\").item(0).setAttribute(\"href\", \"style/offline.css\");};\n" \
" document.getElementsByTagName(\"link\").item(0).setAttribute(\"href\", \"style/offline.css\");\n" \
" </script>\n"

HTML.postheader = \
Expand Down
11 changes: 3 additions & 8 deletions examples/gui/doc/src/rasterwindow.qdoc
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,9 @@

\snippet rasterwindow/rasterwindow.cpp 1

The constructor first of all calls \l QWindow::create(). This will
create the window in the windowing system. Without calling create,
the window will not get events and will not be visible in the
windowing system. The call to create does not show the window. We
then set the geometry to be something reasonable.

Then we create the backingstore and pass it the window instance it
is supposed to manage.
In the constructor we create the backingstore and pass it the window
instance it is supposed to manage. We also set the initial window
geometry.

\snippet rasterwindow/rasterwindow.cpp 2

Expand Down
1 change: 1 addition & 0 deletions examples/widgets/doc/src/addressbook-tutorial.qdoc
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
\page tutorials-addressbook.html

\title Address Book Tutorial
\ingroup examples-layout
\brief An introduction to GUI programming, showing how to put together a
simple yet fully-functioning application.

Expand Down
1 change: 1 addition & 0 deletions examples/widgets/doc/src/borderlayout.qdoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
/*!
\example layouts/borderlayout
\title Border Layout Example
\ingroup examples-layout
\brief Shows how to arrange child widgets along a border.

\e{Border Layout} implements a layout that arranges child widgets to
Expand Down
1 change: 1 addition & 0 deletions examples/widgets/doc/src/calculator.qdoc
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
\example widgets/calculator
\title Calculator Example
\ingroup examples-widgets
\ingroup examples-layout
\brief The example shows how to use signals and slots to implement the
functionality of a calculator widget, and how to use QGridLayout
to place child widgets in a grid.
Expand Down
1 change: 1 addition & 0 deletions examples/widgets/doc/src/calendarwidget.qdoc
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
\title Calendar Widget Example
\example widgets/calendarwidget
\ingroup examples-widgets
\ingroup examples-layout
\brief The Calendar Widget example shows use of QCalendarWidget.

\borderedimage calendarwidgetexample.png
Expand Down
1 change: 1 addition & 0 deletions examples/widgets/doc/src/echoplugin.qdoc
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
\example tools/echoplugin
\title Echo Plugin Example
\ingroup examples-widgets-tools
\ingroup examples-layout

\brief This example shows how to create a Qt plugin.

Expand Down
1 change: 1 addition & 0 deletions examples/widgets/doc/src/flowlayout.qdoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
/*!
\example layouts/flowlayout
\title Flow Layout Example
\ingroup examples-layout
\brief Shows how to arrange widgets for different window sizes.

\e{Flow Layout} implements a layout that handles different window sizes. The
Expand Down
1 change: 1 addition & 0 deletions examples/widgets/doc/src/imagecomposition.qdoc
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
\example painting/imagecomposition
\title Image Composition Example
\ingroup examples-painting
\ingroup examples-layout
\brief Shows how composition modes work in QPainter.

\brief The Image Composition example lets the user combine images
Expand Down
1 change: 1 addition & 0 deletions examples/widgets/doc/src/menus.qdoc
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
\example mainwindows/menus
\title Menus Example
\ingroup examples-mainwindow
\ingroup examples-layout

\brief The Menus example demonstrates how menus can be used in a main
window application.
Expand Down
1 change: 1 addition & 0 deletions examples/widgets/doc/src/simpletreemodel.qdoc
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
\example itemviews/simpletreemodel
\title Simple Tree Model Example
\ingroup examples-itemviews
\ingroup examples-layout
\brief The Simple Tree Model example shows how to use a hierarchical model
with Qt's standard view classes.

Expand Down
1 change: 1 addition & 0 deletions examples/widgets/doc/src/sub-attaq.qdoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
/*!
\example animation/sub-attaq
\title Sub-Attaq
\ingroup examples-layout

\brief This example shows Qt's ability to combine \l{The Animation Framework}{the animation framework}
and \l{The State Machine Framework}{the state machine framework} to create a game.
Expand Down
2 changes: 1 addition & 1 deletion mkspecs/common/msvc-desktop.conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ MAKEFILE_GENERATOR = MSVC.NET
QMAKE_PLATFORM = win32
QMAKE_COMPILER = msvc
CONFIG += incremental flat precompile_header autogen_precompile_source debug_and_release debug_and_release_target embed_manifest_dll embed_manifest_exe
DEFINES += UNICODE WIN32
DEFINES += UNICODE _UNICODE WIN32
QMAKE_COMPILER_DEFINES += _WIN32
contains(QMAKE_TARGET.arch, x86_64) {
DEFINES += WIN64
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
xmlns=\"http://schemas.microsoft.com/appx/manifest/foundation/windows10\"
xmlns:mp=\"http://schemas.microsoft.com/appx/2014/phone/manifest\"
xmlns:uap=\"http://schemas.microsoft.com/appx/manifest/uap/windows10\"
xmlns:uap3=\"http://schemas.microsoft.com/appx/manifest/uap/windows10/3\"
xmlns:mobile=\"http://schemas.microsoft.com/appx/manifest/mobile/windows10\"
IgnorableNamespaces=\"uap mp mobile\">
IgnorableNamespaces=\"uap uap3 mp mobile\">

<Identity
Name=\"$${WINRT_MANIFEST.identity}\"
Expand Down
2 changes: 2 additions & 0 deletions mkspecs/features/qt_common.prf
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ clang {
greaterThan(QT_GCC_MAJOR_VERSION, 4): QMAKE_CXXFLAGS_WARN_ON += -Wdate-time
# GCC 6 introduced these
greaterThan(QT_GCC_MAJOR_VERSION, 5): QMAKE_CXXFLAGS_WARN_ON += -Wshift-overflow=2 -Wduplicated-cond
# GCC 7 has a lot of false positives relating to this, so disable completely
greaterThan(QT_GCC_MAJOR_VERSION, 6): QMAKE_CXXFLAGS_WARN_ON += -Wno-stringop-overflow
}

warnings_are_errors:warning_clean {
Expand Down
4 changes: 2 additions & 2 deletions mkspecs/features/qt_targets.prf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
QMAKE_TARGET_COMPANY = The Qt Company Ltd
QMAKE_TARGET_COMPANY = The Qt Company Ltd.
isEmpty(QMAKE_TARGET_PRODUCT): QMAKE_TARGET_PRODUCT = Qt5
isEmpty(QMAKE_TARGET_DESCRIPTION): QMAKE_TARGET_DESCRIPTION = C++ application development framework.
isEmpty(QMAKE_TARGET_DESCRIPTION): QMAKE_TARGET_DESCRIPTION = C++ Application Development Framework
QMAKE_TARGET_COPYRIGHT = Copyright (C) 2017 The Qt Company Ltd.
3 changes: 3 additions & 0 deletions mkspecs/features/qt_tool.prf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
#

CONFIG += no_launch_target
isEmpty(VERSION): VERSION = $$MODULE_VERSION
isEmpty(QMAKE_TARGET_DESCRIPTION): QMAKE_TARGET_DESCRIPTION = \
"Tool for the Qt Application Development Framework"
load(qt_app)

CONFIG += console
Expand Down
35 changes: 30 additions & 5 deletions mkspecs/features/winrt/package_manifest.prf
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,8 @@

INDENT = "$$escape_expand(\\r\\n) "

# All Windows 10 applications need to have internetClient. It is also not marked as additional
# capability anymore and is assumed to be standard.
*-msvc2015|*-msvc2017: WINRT_MANIFEST.capabilities += internetClient
# All Windows 10 applications need to have internetClient.
WINRT_MANIFEST.capabilities += internetClient

contains(WINRT_MANIFEST.capabilities, defaults) {
WINRT_MANIFEST.capabilities -= defaults
Expand All @@ -130,13 +129,39 @@
WINRT_MANIFEST.capabilities_device += $$WINRT_MANIFEST.capabilities_device_default
}

UAP_CAPABILITIES += \
appointments \
blockedChatMessages \
chat \
contacts \
enterpriseAuthentication \
# internetClient is special, as it needs to be written without namespace
#internetClient \
musicLibrary \
objects3D \
phoneCall \
picturesLibrary \
removableStorage \
sharedUserCertificates \
userAccountInformation \
videosLibrary \
voipCall

UAP3_CAPABILITIES += backgroundMediaPlayback remoteSystem userNotificationListener

# Capabilities are given as a string list and may change with the configuration (network, sensors, etc.)
WINRT_MANIFEST.capabilities = $$unique(WINRT_MANIFEST.capabilities)
WINRT_MANIFEST.capabilities_device = $$unique(WINRT_MANIFEST.capabilities_device)
!isEmpty(WINRT_MANIFEST.capabilities)|!isEmpty(WINRT_MANIFEST.capabilities_device) {
MANIFEST_CAPABILITIES += "<Capabilities>"
for(CAPABILITY, WINRT_MANIFEST.capabilities): \
MANIFEST_CAPABILITIES += " <Capability Name=\"$$CAPABILITY\" />"
for (CAPABILITY, WINRT_MANIFEST.capabilities) {
contains(UAP_CAPABILITIES, $$CAPABILITY): \
MANIFEST_CAPABILITIES += " <uap:Capability Name=\"$$CAPABILITY\" />"
else:contains(UAP3_CAPABILITIES, $$CAPABILITY): \
MANIFEST_CAPABILITIES += " <uap3:Capability Name=\"$$CAPABILITY\" />"
else: \
MANIFEST_CAPABILITIES += " <Capability Name=\"$$CAPABILITY\" />"
}
for(CAPABILITY, WINRT_MANIFEST.capabilities_device): \
MANIFEST_CAPABILITIES += " <DeviceCapability Name=\"$$CAPABILITY\" />"
MANIFEST_CAPABILITIES += "</Capabilities>"
Expand Down
2 changes: 1 addition & 1 deletion mkspecs/win32-g++/qmake.conf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ include(../common/g++-base.conf)
MAKEFILE_GENERATOR = MINGW
QMAKE_PLATFORM = win32 mingw
CONFIG += debug_and_release debug_and_release_target precompile_header
DEFINES += UNICODE
DEFINES += UNICODE _UNICODE
QMAKE_COMPILER_DEFINES += __GNUC__ WIN32

QMAKE_EXT_OBJ = .o
Expand Down
87 changes: 87 additions & 0 deletions src/3rdparty/angle/src/libANGLE/renderer/d3d/SurfaceD3D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,19 @@ SurfaceD3D::SurfaceD3D(RendererD3D *renderer,
mDepthStencilFormat(config->depthStencilFormat),
mSwapChain(nullptr),
mSwapIntervalDirty(true),
mWindowSubclassed(false),
mNativeWindow(window, config, directComposition == EGL_TRUE),
mWidth(width),
mHeight(height),
mSwapInterval(1),
mShareHandle(reinterpret_cast<HANDLE *>(shareHandle))
{
subclassWindow();
}

SurfaceD3D::~SurfaceD3D()
{
unsubclassWindow();
releaseSwapChain();
}

Expand Down Expand Up @@ -243,6 +246,90 @@ egl::Error SurfaceD3D::swapRect(EGLint x, EGLint y, EGLint width, EGLint height)
return egl::Error(EGL_SUCCESS);
}

#if !defined(ANGLE_ENABLE_WINDOWS_STORE)
#define kSurfaceProperty _TEXT("Egl::SurfaceOwner")
#define kParentWndProc _TEXT("Egl::SurfaceParentWndProc")

static LRESULT CALLBACK SurfaceWindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)
{
if (message == WM_SIZE)
{
SurfaceD3D* surf = reinterpret_cast<SurfaceD3D*>(GetProp(hwnd, kSurfaceProperty));
if(surf)
{
surf->checkForOutOfDateSwapChain();
}
}
WNDPROC prevWndFunc = reinterpret_cast<WNDPROC >(GetProp(hwnd, kParentWndProc));
return CallWindowProc(prevWndFunc, hwnd, message, wparam, lparam);
}
#endif

void SurfaceD3D::subclassWindow()
{
#if !defined(ANGLE_ENABLE_WINDOWS_STORE)
HWND window = mNativeWindow.getNativeWindow();
if (!window)
{
return;
}

DWORD processId;
DWORD threadId = GetWindowThreadProcessId(window, &processId);
if (processId != GetCurrentProcessId() || threadId != GetCurrentThreadId())
{
return;
}

SetLastError(0);
LONG_PTR oldWndProc = SetWindowLongPtr(window, GWLP_WNDPROC, reinterpret_cast<LONG_PTR>(SurfaceWindowProc));
if(oldWndProc == 0 && GetLastError() != ERROR_SUCCESS)
{
mWindowSubclassed = false;
return;
}

SetProp(window, kSurfaceProperty, reinterpret_cast<HANDLE>(this));
SetProp(window, kParentWndProc, reinterpret_cast<HANDLE>(oldWndProc));
mWindowSubclassed = true;
#endif
}

void SurfaceD3D::unsubclassWindow()
{
if (!mWindowSubclassed)
{
return;
}

#if !defined(ANGLE_ENABLE_WINDOWS_STORE)
HWND window = mNativeWindow.getNativeWindow();
if (!window)
{
return;
}

// un-subclass
LONG_PTR parentWndFunc = reinterpret_cast<LONG_PTR>(GetProp(window, kParentWndProc));

// Check the windowproc is still SurfaceWindowProc.
// If this assert fails, then it is likely the application has subclassed the
// hwnd as well and did not unsubclass before destroying its EGL context. The
// application should be modified to either subclass before initializing the
// EGL context, or to unsubclass before destroying the EGL context.
if(parentWndFunc)
{
LONG_PTR prevWndFunc = SetWindowLongPtr(window, GWLP_WNDPROC, parentWndFunc);
UNUSED_ASSERTION_VARIABLE(prevWndFunc);
ASSERT(prevWndFunc == reinterpret_cast<LONG_PTR>(SurfaceWindowProc));
}

RemoveProp(window, kSurfaceProperty);
RemoveProp(window, kParentWndProc);
#endif
mWindowSubclassed = false;
}

bool SurfaceD3D::checkForOutOfDateSwapChain()
{
RECT client;
Expand Down
4 changes: 4 additions & 0 deletions src/3rdparty/angle/src/libANGLE/renderer/d3d/SurfaceD3D.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ class SurfaceD3D : public SurfaceImpl
egl::Error resetSwapChain(int backbufferWidth, int backbufferHeight);
egl::Error resizeSwapChain(int backbufferWidth, int backbufferHeight);

void subclassWindow();
void unsubclassWindow();

RendererD3D *mRenderer;
egl::Display *mDisplay;

Expand All @@ -93,6 +96,7 @@ class SurfaceD3D : public SurfaceImpl

SwapChainD3D *mSwapChain;
bool mSwapIntervalDirty;
bool mWindowSubclassed; // Indicates whether we successfully subclassed mWindow for WM_RESIZE hooking

NativeWindow mNativeWindow; // Handler for the Window that the surface is created for.
EGLint mWidth;
Expand Down
6 changes: 0 additions & 6 deletions src/3rdparty/libjpeg.pri
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
wince {
DEFINES += NO_GETENV
contains(CE_ARCH,x86):CONFIG -= stl exceptions
contains(CE_ARCH,x86):CONFIG += exceptions_off
}

winrt: DEFINES += NO_GETENV

#Disable warnings in 3rdparty code due to unused arguments
Expand Down
1 change: 0 additions & 1 deletion src/3rdparty/zlib.pri
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
wince: DEFINES += NO_ERRNO_H
INCLUDEPATH = $$PWD/zlib $$INCLUDEPATH
SOURCES+= \
$$PWD/zlib/adler32.c \
Expand Down
Loading

0 comments on commit 7f269a5

Please sign in to comment.