summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config.tests/qpa/direct2d/direct2d.cpp57
-rw-r--r--config.tests/qpa/direct2d/direct2d.pro4
-rw-r--r--config.tests/unix/iconv/iconv.pro2
-rw-r--r--config.tests/unix/neon/neon.pro4
-rw-r--r--config.tests/unix/odbc/odbc.pro2
-rw-r--r--config.tests/unix/qqnx_imf/qqnx_imf.cpp (renamed from config.tests/unix/neon/neon.cpp)13
-rw-r--r--config.tests/unix/qqnx_imf/qqnx_imf.pro3
-rw-r--r--config.tests/x11/opengl/opengl.pro2
-rwxr-xr-xconfigure44
-rw-r--r--dist/changes-5.3.036
-rw-r--r--examples/embedded/styleexample/stylewidget.cpp2
-rw-r--r--examples/ipc/sharedmemory/dialog.cpp6
-rw-r--r--examples/network/bearermonitor/bearermonitor.cpp8
-rw-r--r--examples/network/bearermonitor/bearermonitor.h4
-rw-r--r--examples/network/dnslookup/dnslookup.cpp13
-rw-r--r--examples/network/loopback/dialog.cpp4
-rw-r--r--examples/network/network.pro2
-rw-r--r--examples/network/securesocketclient/main.cpp4
-rw-r--r--examples/network/torrent/peerwireclient.cpp2
-rw-r--r--examples/network/torrent/torrentserver.cpp2
-rw-r--r--examples/opengl/framebufferobject2/glwidget.cpp30
-rw-r--r--examples/opengl/framebufferobject2/main.cpp4
-rw-r--r--examples/opengl/pbuffers/main.cpp4
-rw-r--r--examples/opengl/pbuffers2/main.cpp4
-rw-r--r--examples/opengl/samplebuffers/main.cpp8
-rw-r--r--examples/touch/fingerpaint/mainwindow.cpp2
-rw-r--r--examples/widgets/doc/src/treemodelcompleter.qdoc2
-rw-r--r--examples/widgets/graphicsview/boxes/glbuffers.h6
-rw-r--r--examples/widgets/graphicsview/boxes/glextensions.cpp70
-rw-r--r--examples/widgets/graphicsview/boxes/glextensions.h46
-rw-r--r--examples/widgets/graphicsview/boxes/scene.cpp16
-rw-r--r--examples/widgets/graphicsview/elasticnodes/graphwidget.cpp4
-rw-r--r--examples/widgets/itemviews/pixelator/mainwindow.cpp10
-rw-r--r--examples/widgets/layouts/basiclayouts/dialog.cpp2
-rw-r--r--examples/widgets/layouts/borderlayout/borderlayout.h12
-rw-r--r--examples/widgets/mainwindows/mdi/mdichild.cpp4
-rw-r--r--examples/widgets/mainwindows/sdi/mainwindow.cpp4
-rw-r--r--examples/widgets/richtext/textedit/textedit.cpp2
-rw-r--r--examples/widgets/tools/codecs/mainwindow.cpp2
-rw-r--r--examples/widgets/tutorials/modelview/5_edit/mymodel.cpp12
-rw-r--r--examples/widgets/widgets/calculator/calculator.cpp24
-rw-r--r--examples/widgets/widgets/lineedits/window.cpp4
-rw-r--r--examples/widgets/widgets/scribble/mainwindow.cpp2
-rw-r--r--examples/widgets/widgets/spinboxes/window.cpp29
-rw-r--r--examples/widgets/widgets/spinboxes/window.h3
-rw-r--r--examples/widgets/widgets/tetrix/tetrixboard.cpp54
-rw-r--r--examples/widgets/widgets/wiggly/wigglywidget.cpp4
-rw-r--r--mkspecs/common/clang.conf1
-rw-r--r--mkspecs/common/gcc-base.conf1
-rw-r--r--mkspecs/common/mac/qplatformdefs.h4
-rw-r--r--mkspecs/common/wince/qplatformdefs.h82
-rw-r--r--mkspecs/common/winrt_winphone/qmake.conf22
-rw-r--r--mkspecs/common/winrt_winphone/qplatformdefs.h141
-rw-r--r--mkspecs/cygwin-g++/qplatformdefs.h6
-rw-r--r--mkspecs/darwin-g++/qplatformdefs.h4
-rw-r--r--mkspecs/devices/linux-tegra2-g++/qmake.conf4
-rw-r--r--mkspecs/features/configure.prf6
-rw-r--r--mkspecs/features/create_cmake.prf2
-rw-r--r--mkspecs/features/ctest_testcase_common.prf2
-rw-r--r--mkspecs/features/default_post.prf2
-rw-r--r--mkspecs/features/moc.prf9
-rw-r--r--mkspecs/features/precompile_header.prf24
-rw-r--r--mkspecs/features/qlalr.prf49
-rw-r--r--mkspecs/features/qml_plugin.prf2
-rw-r--r--mkspecs/features/qt_common.prf22
-rw-r--r--mkspecs/features/qt_module.prf31
-rw-r--r--mkspecs/features/qt_plugin.prf2
-rw-r--r--mkspecs/features/win32/windows.prf2
-rw-r--r--mkspecs/features/winrt/console.prf5
-rw-r--r--mkspecs/freebsd-g++/qplatformdefs.h4
-rw-r--r--mkspecs/hurd-g++/qplatformdefs.h4
-rw-r--r--mkspecs/irix-cc-64/qplatformdefs.h4
-rw-r--r--mkspecs/irix-cc/qplatformdefs.h4
-rw-r--r--mkspecs/irix-g++/qplatformdefs.h4
-rw-r--r--mkspecs/linux-clang/qplatformdefs.h8
-rw-r--r--mkspecs/linux-cxx/qplatformdefs.h4
-rw-r--r--mkspecs/linux-g++/qplatformdefs.h4
-rw-r--r--mkspecs/linux-icc/qmake.conf1
-rw-r--r--mkspecs/linux-kcc/qplatformdefs.h4
-rw-r--r--mkspecs/linux-llvm/qplatformdefs.h4
-rw-r--r--mkspecs/linux-lsb-g++/qplatformdefs.h4
-rw-r--r--mkspecs/linux-pgcc/qplatformdefs.h4
-rw-r--r--mkspecs/lynxos-g++/qplatformdefs.h4
-rw-r--r--mkspecs/macx-ios-clang/features/default_post.prf14
-rw-r--r--mkspecs/macx-ios-clang/features/default_pre.prf9
-rw-r--r--mkspecs/netbsd-g++/qplatformdefs.h4
-rw-r--r--mkspecs/openbsd-g++/qplatformdefs.h4
-rw-r--r--mkspecs/qnx-armv7le-qcc/qplatformdefs.h7
-rw-r--r--mkspecs/qnx-x86-qcc/qplatformdefs.h7
-rw-r--r--mkspecs/sco-cc/qplatformdefs.h4
-rw-r--r--mkspecs/sco-g++/qplatformdefs.h4
-rw-r--r--mkspecs/solaris-cc-64/qplatformdefs.h4
-rw-r--r--mkspecs/solaris-cc/qplatformdefs.h4
-rw-r--r--mkspecs/solaris-g++-64/qplatformdefs.h4
-rw-r--r--mkspecs/solaris-g++/qplatformdefs.h4
-rw-r--r--mkspecs/tru64-cxx/qplatformdefs.h4
-rw-r--r--mkspecs/tru64-g++/qplatformdefs.h4
-rw-r--r--mkspecs/unixware-cc/qplatformdefs.h4
-rw-r--r--mkspecs/unixware-g++/qplatformdefs.h4
-rw-r--r--mkspecs/unsupported/integrity-ghs/qplatformdefs.h54
-rw-r--r--mkspecs/unsupported/linux-armcc/qplatformdefs.h4
-rw-r--r--mkspecs/unsupported/linux-libc++-clang/qmake.conf20
-rw-r--r--mkspecs/unsupported/linux-libc++-clang/qplatformdefs.h100
-rw-r--r--mkspecs/unsupported/qnx-X11-g++/qplatformdefs.h4
-rw-r--r--mkspecs/unsupported/win32-msvc2003/qplatformdefs.h80
-rw-r--r--mkspecs/win32-g++/qplatformdefs.h86
-rw-r--r--mkspecs/win32-msvc2005/qplatformdefs.h82
-rw-r--r--mkspecs/winphone-arm-msvc2012/qmake.conf4
-rw-r--r--mkspecs/winphone-arm-msvc2012/qplatformdefs.h2
-rw-r--r--mkspecs/winphone-x86-msvc2012/qmake.conf4
-rw-r--r--mkspecs/winphone-x86-msvc2012/qplatformdefs.h2
-rw-r--r--mkspecs/winrt-arm-msvc2012/qmake.conf4
-rw-r--r--mkspecs/winrt-arm-msvc2012/qplatformdefs.h2
-rw-r--r--mkspecs/winrt-arm-msvc2013/qmake.conf20
-rw-r--r--mkspecs/winrt-arm-msvc2013/qplatformdefs.h42
-rw-r--r--mkspecs/winrt-x64-msvc2012/qmake.conf4
-rw-r--r--mkspecs/winrt-x64-msvc2012/qplatformdefs.h2
-rw-r--r--mkspecs/winrt-x64-msvc2013/qmake.conf20
-rw-r--r--mkspecs/winrt-x64-msvc2013/qplatformdefs.h42
-rw-r--r--mkspecs/winrt-x86-msvc2012/qmake.conf6
-rw-r--r--mkspecs/winrt-x86-msvc2012/qplatformdefs.h2
-rw-r--r--mkspecs/winrt-x86-msvc2013/qmake.conf20
-rw-r--r--mkspecs/winrt-x86-msvc2013/qplatformdefs.h42
-rw-r--r--qmake/Makefile.unix6
-rw-r--r--qmake/Makefile.win323
-rw-r--r--qmake/generators/makefile.cpp24
-rw-r--r--qmake/generators/makefile.h20
-rw-r--r--qmake/generators/makefiledeps.cpp26
-rw-r--r--qmake/generators/makefiledeps.h6
-rw-r--r--qmake/generators/unix/unixmake.cpp29
-rw-r--r--qmake/generators/unix/unixmake2.cpp56
-rw-r--r--qmake/generators/win32/mingw_make.cpp60
-rw-r--r--qmake/generators/win32/msbuild_objectmodel.cpp63
-rw-r--r--qmake/generators/win32/msvc_nmake.cpp72
-rw-r--r--qmake/generators/win32/msvc_nmake.h2
-rw-r--r--qmake/generators/win32/msvc_objectmodel.cpp44
-rw-r--r--qmake/generators/win32/msvc_objectmodel.h4
-rw-r--r--qmake/generators/win32/msvc_vcproj.cpp28
-rw-r--r--qmake/generators/win32/winmakefile.cpp42
-rw-r--r--qmake/option.cpp4
-rw-r--r--qmake/project.h1
-rw-r--r--qmake/qmake.pri3
-rw-r--r--src/3rdparty/angle/include/EGL/eglplatform.h10
-rw-r--r--src/3rdparty/angle/src/compiler/osinclude.h35
-rw-r--r--src/3rdparty/angle/src/compiler/ossource_posix.cpp8
-rw-r--r--src/3rdparty/angle/src/compiler/ossource_win.cpp8
-rw-r--r--src/3rdparty/angle/src/compiler/ossource_winrt.cpp75
-rw-r--r--src/3rdparty/angle/src/libEGL/Display.cpp8
-rw-r--r--src/3rdparty/angle/src/libEGL/Display.h4
-rw-r--r--src/3rdparty/angle/src/libEGL/Surface.cpp45
-rw-r--r--src/3rdparty/angle/src/libEGL/Surface.h7
-rw-r--r--src/3rdparty/angle/src/libEGL/libEGL.cpp4
-rw-r--r--src/3rdparty/angle/src/libEGL/main.cpp40
-rw-r--r--src/3rdparty/angle/src/libGLESv2/Buffer.cpp8
-rw-r--r--src/3rdparty/angle/src/libGLESv2/Buffer.h4
-rw-r--r--src/3rdparty/angle/src/libGLESv2/libGLESv2.cpp4
-rw-r--r--src/3rdparty/angle/src/libGLESv2/main.cpp39
-rw-r--r--src/3rdparty/angle/src/libGLESv2/precompiled.h15
-rw-r--r--src/3rdparty/angle/src/libGLESv2/renderer/BufferStorage.h2
-rw-r--r--src/3rdparty/angle/src/libGLESv2/renderer/BufferStorage11.cpp9
-rw-r--r--src/3rdparty/angle/src/libGLESv2/renderer/BufferStorage11.h2
-rw-r--r--src/3rdparty/angle/src/libGLESv2/renderer/BufferStorage9.cpp2
-rw-r--r--src/3rdparty/angle/src/libGLESv2/renderer/BufferStorage9.h2
-rw-r--r--src/3rdparty/angle/src/libGLESv2/renderer/Image11.cpp7
-rw-r--r--src/3rdparty/angle/src/libGLESv2/renderer/IndexBuffer11.cpp4
-rw-r--r--src/3rdparty/angle/src/libGLESv2/renderer/RenderStateCache.cpp3
-rw-r--r--src/3rdparty/angle/src/libGLESv2/renderer/Renderer.cpp55
-rw-r--r--src/3rdparty/angle/src/libGLESv2/renderer/Renderer.h27
-rw-r--r--src/3rdparty/angle/src/libGLESv2/renderer/Renderer11.cpp298
-rw-r--r--src/3rdparty/angle/src/libGLESv2/renderer/Renderer11.h4
-rw-r--r--src/3rdparty/angle/src/libGLESv2/renderer/SwapChain.h4
-rw-r--r--src/3rdparty/angle/src/libGLESv2/renderer/SwapChain11.cpp32
-rw-r--r--src/3rdparty/angle/src/libGLESv2/renderer/SwapChain11.h2
-rw-r--r--src/3rdparty/angle/src/libGLESv2/renderer/TextureStorage11.cpp8
-rw-r--r--src/3rdparty/angle/src/libGLESv2/renderer/renderer11_utils.cpp4
-rw-r--r--src/3rdparty/angle/src/libGLESv2/renderer/renderer11_utils.h2
-rw-r--r--src/3rdparty/angle/src/libGLESv2/renderer/shaders/Clear11.hlsl4
-rw-r--r--src/3rdparty/angle/src/libGLESv2/utilities.cpp53
-rw-r--r--src/3rdparty/libjpeg.pri2
-rw-r--r--src/3rdparty/libpng/pngpriv.h2
-rw-r--r--src/3rdparty/pcre/AUTHORS6
-rw-r--r--src/3rdparty/pcre/LICENCE6
-rw-r--r--src/3rdparty/pcre/config.h1
-rw-r--r--src/3rdparty/pcre/patches/bug_1423_jit_condition_misoptimization_fix.diff15
-rw-r--r--src/3rdparty/pcre/patches/r1340_fix_jit_on_android.patch18
-rw-r--r--src/3rdparty/pcre/pcre.h50
-rw-r--r--src/3rdparty/pcre/pcre16_valid_utf16.c25
-rw-r--r--src/3rdparty/pcre/pcre_byte_order.c19
-rw-r--r--src/3rdparty/pcre/pcre_chartables.c2
-rw-r--r--src/3rdparty/pcre/pcre_compile.c3621
-rw-r--r--src/3rdparty/pcre/pcre_config.c4
-rw-r--r--src/3rdparty/pcre/pcre_dfa_exec.c230
-rw-r--r--src/3rdparty/pcre/pcre_exec.c959
-rw-r--r--src/3rdparty/pcre/pcre_fullinfo.c16
-rw-r--r--src/3rdparty/pcre/pcre_internal.h453
-rw-r--r--src/3rdparty/pcre/pcre_jit_compile.c3414
-rw-r--r--src/3rdparty/pcre/pcre_maketables.c27
-rw-r--r--src/3rdparty/pcre/pcre_string_utils.c8
-rw-r--r--src/3rdparty/pcre/pcre_study.c86
-rw-r--r--src/3rdparty/pcre/pcre_tables.c15
-rw-r--r--src/3rdparty/pcre/pcre_ucd.c753
-rw-r--r--src/3rdparty/pcre/pcre_valid_utf8.c15
-rw-r--r--src/3rdparty/pcre/pcre_xclass.c101
-rw-r--r--src/3rdparty/pcre/sljit/sljitConfig.h1
-rw-r--r--src/3rdparty/pcre/sljit/sljitConfigInternal.h19
-rw-r--r--src/3rdparty/pcre/sljit/sljitExecAllocator.c23
-rw-r--r--src/3rdparty/pcre/sljit/sljitLir.c60
-rw-r--r--src/3rdparty/pcre/sljit/sljitLir.h37
-rw-r--r--src/3rdparty/pcre/sljit/sljitNativeARM_Thumb2.c10
-rw-r--r--src/3rdparty/pcre/sljit/sljitNativeARM_v5.c12
-rw-r--r--src/3rdparty/pcre/sljit/sljitNativeMIPS_common.c10
-rw-r--r--src/3rdparty/pcre/sljit/sljitNativePPC_common.c10
-rw-r--r--src/3rdparty/pcre/sljit/sljitNativeSPARC_common.c37
-rw-r--r--src/3rdparty/pcre/sljit/sljitNativeX86_32.c10
-rw-r--r--src/3rdparty/pcre/sljit/sljitNativeX86_common.c151
-rw-r--r--src/3rdparty/pcre/ucp.h5
-rw-r--r--src/3rdparty/sqlite/shell.c758
-rw-r--r--src/3rdparty/sqlite/sqlite3.c26239
-rw-r--r--src/3rdparty/sqlite/sqlite3.h251
-rw-r--r--src/3rdparty/zlib_dependency.pri2
-rw-r--r--src/android/jar/AndroidManifest.xml1
-rw-r--r--src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java106
-rw-r--r--src/android/jar/src/org/qtproject/qt5/android/QtLayout.java11
-rw-r--r--src/android/jar/src/org/qtproject/qt5/android/QtNative.java66
-rw-r--r--src/android/jar/src/org/qtproject/qt5/android/QtSurface.java103
-rw-r--r--src/angle/patches/0012-ANGLE-Support-WinRT.patch1131
-rw-r--r--src/angle/patches/0013-ANGLE-Enable-D3D11-for-feature-level-9-cards.patch990
-rw-r--r--src/angle/patches/0014-ANGLE-D3D11-Always-execute-QueryInterface.patch51
-rw-r--r--src/angle/patches/0015-ANGLE-Dynamically-load-D3D-compiler-from-a-list-of-k.patch85
-rw-r--r--src/angle/patches/0016-ANGLE-D3D11-Fix-build-on-desktop-Windows.patch28
-rw-r--r--src/angle/src/common/common.pri2
-rw-r--r--src/angle/src/compiler/translator_common.pro9
-rw-r--r--src/angle/src/compiler/translator_hlsl.pro2
-rw-r--r--src/angle/src/config.pri5
-rw-r--r--src/angle/src/d3dcompiler/d3dcompiler.pro14
-rw-r--r--src/angle/src/d3dcompiler/d3dcompiler_qt.def3
-rw-r--r--src/angle/src/d3dcompiler/d3dcompiler_qtd.def3
-rw-r--r--src/angle/src/d3dcompiler/main.cpp315
-rw-r--r--src/angle/src/libEGL/libEGL.pro2
-rw-r--r--src/angle/src/libGLESv2/libGLESv2.pro10
-rw-r--r--src/angle/src/src.pro1
-rw-r--r--src/corelib/animation/qpropertyanimation.cpp2
-rw-r--r--src/corelib/arch/arch.pri8
-rw-r--r--src/corelib/arch/qatomic_alpha.h527
-rw-r--r--src/corelib/arch/qatomic_bfin.h350
-rw-r--r--src/corelib/arch/qatomic_ia64.h4
-rw-r--r--src/corelib/arch/qatomic_integrity.h295
-rw-r--r--src/corelib/arch/qatomic_power.h521
-rw-r--r--src/corelib/arch/qatomic_s390.h433
-rw-r--r--src/corelib/arch/qatomic_sh4a.h540
-rw-r--r--src/corelib/arch/qatomic_sparc.h532
-rw-r--r--src/corelib/arch/qatomic_unix.h4
-rw-r--r--src/corelib/arch/qatomic_vxworks.h330
-rw-r--r--src/corelib/arch/qatomic_x86.h3
-rw-r--r--src/corelib/codecs/qutfcodec.cpp261
-rw-r--r--src/corelib/codecs/qutfcodec_p.h224
-rw-r--r--src/corelib/corelib.pro2
-rw-r--r--src/corelib/doc/snippets/code/doc_src_properties.cpp2
-rw-r--r--src/corelib/doc/snippets/code/doc_src_qalgorithms.cpp10
-rw-r--r--src/corelib/doc/snippets/code/doc_src_qiterator.cpp16
-rw-r--r--src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp8
-rw-r--r--src/corelib/doc/snippets/qsignalmapper/buttonwidget.cpp8
-rw-r--r--src/corelib/global/qcompilerdetection.h76
-rw-r--r--src/corelib/global/qglobal.cpp15
-rw-r--r--src/corelib/global/qglobal.h29
-rw-r--r--src/corelib/global/qlibraryinfo.cpp57
-rw-r--r--src/corelib/global/qlibraryinfo.h4
-rw-r--r--src/corelib/global/qlogging.cpp2
-rw-r--r--src/corelib/global/qnamespace.h11
-rw-r--r--src/corelib/global/qnamespace.qdoc22
-rw-r--r--src/corelib/global/qnumeric.cpp136
-rw-r--r--src/corelib/global/qnumeric.h3
-rw-r--r--src/corelib/global/qtypeinfo.h43
-rw-r--r--src/corelib/io/io.pri6
-rw-r--r--src/corelib/io/qdatastream.cpp3
-rw-r--r--src/corelib/io/qdatastream.h5
-rw-r--r--src/corelib/io/qdebug.h32
-rw-r--r--src/corelib/io/qdir.cpp2
-rw-r--r--src/corelib/io/qdiriterator.cpp2
-rw-r--r--src/corelib/io/qfilesystemengine_win.cpp192
-rw-r--r--src/corelib/io/qfilesystementry.cpp6
-rw-r--r--src/corelib/io/qfilesystemiterator_unix.cpp4
-rw-r--r--src/corelib/io/qfilesystemiterator_win.cpp14
-rw-r--r--src/corelib/io/qfilesystemmetadata_p.h6
-rw-r--r--src/corelib/io/qfilesystemwatcher_inotify.cpp6
-rw-r--r--src/corelib/io/qfsfileengine_unix.cpp15
-rw-r--r--src/corelib/io/qfsfileengine_win.cpp73
-rw-r--r--src/corelib/io/qlockfile_win.cpp14
-rw-r--r--src/corelib/io/qprocess.cpp12
-rw-r--r--src/corelib/io/qprocess_unix.cpp100
-rw-r--r--src/corelib/io/qprocess_win.cpp2
-rw-r--r--src/corelib/io/qresource.cpp24
-rw-r--r--src/corelib/io/qsettings.cpp87
-rw-r--r--src/corelib/io/qsettings.h2
-rw-r--r--src/corelib/io/qstandardpaths.cpp203
-rw-r--r--src/corelib/io/qstandardpaths_blackberry.cpp9
-rw-r--r--src/corelib/io/qstandardpaths_mac.cpp25
-rw-r--r--src/corelib/io/qstandardpaths_win.cpp28
-rw-r--r--src/corelib/io/qstandardpaths_winrt.cpp127
-rw-r--r--src/corelib/io/qtemporaryfile.cpp17
-rw-r--r--src/corelib/io/qurlidna.cpp2
-rw-r--r--src/corelib/io/qurlrecode.cpp186
-rw-r--r--src/corelib/io/qwindowspipereader.cpp3
-rw-r--r--src/corelib/io/qwindowspipereader_p.h2
-rw-r--r--src/corelib/io/qwindowspipewriter.cpp4
-rw-r--r--src/corelib/io/qwinoverlappedionotifier.cpp139
-rw-r--r--src/corelib/io/qwinoverlappedionotifier_p.h47
-rw-r--r--src/corelib/itemmodels/qitemselectionmodel.cpp3
-rw-r--r--src/corelib/itemmodels/qsortfilterproxymodel.cpp10
-rw-r--r--src/corelib/json/qjsonarray.cpp25
-rw-r--r--src/corelib/json/qjsonarray.h8
-rw-r--r--src/corelib/json/qjsonparser.cpp45
-rw-r--r--src/corelib/json/qjsonvalue.cpp22
-rw-r--r--src/corelib/json/qjsonvalue.h5
-rw-r--r--src/corelib/json/qjsonwriter.cpp52
-rw-r--r--src/corelib/kernel/kernel.pri28
-rw-r--r--src/corelib/kernel/qcore_mac_p.h14
-rw-r--r--src/corelib/kernel/qcore_unix_p.h2
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp56
-rw-r--r--src/corelib/kernel/qcoreapplication.h3
-rw-r--r--src/corelib/kernel/qcoreapplication_p.h1
-rw-r--r--src/corelib/kernel/qcorecmdlineargs_p.h2
-rw-r--r--src/corelib/kernel/qeventdispatcher_glib_p.h20
-rw-r--r--src/corelib/kernel/qeventdispatcher_unix_p.h32
-rw-r--r--src/corelib/kernel/qeventdispatcher_winrt.cpp402
-rw-r--r--src/corelib/kernel/qeventdispatcher_winrt_p.h108
-rw-r--r--src/corelib/kernel/qfunctions_p.h2
-rw-r--r--src/corelib/kernel/qfunctions_winrt.cpp105
-rw-r--r--src/corelib/kernel/qfunctions_winrt.h122
-rw-r--r--src/corelib/kernel/qjni_p.h12
-rw-r--r--src/corelib/kernel/qmetaobject.cpp14
-rw-r--r--src/corelib/kernel/qmetaobjectbuilder.cpp2
-rw-r--r--src/corelib/kernel/qobject.cpp133
-rw-r--r--src/corelib/kernel/qobject.h77
-rw-r--r--src/corelib/kernel/qobject_p.h1
-rw-r--r--src/corelib/kernel/qobjectdefs.h2
-rw-r--r--src/corelib/kernel/qobjectdefs_impl.h4
-rw-r--r--src/corelib/kernel/qppsattribute.cpp308
-rw-r--r--src/corelib/kernel/qppsattribute_p.h139
-rw-r--r--src/corelib/kernel/qppsattributeprivate_p.h91
-rw-r--r--src/corelib/kernel/qppsobject.cpp964
-rw-r--r--src/corelib/kernel/qppsobject_p.h130
-rw-r--r--src/corelib/kernel/qppsobjectprivate_p.h128
-rw-r--r--src/corelib/kernel/qsharedmemory.cpp4
-rw-r--r--src/corelib/kernel/qsystemsemaphore_win.cpp2
-rw-r--r--src/corelib/kernel/qvariant.cpp2
-rw-r--r--src/corelib/kernel/qvariant_p.h2
-rw-r--r--src/corelib/kernel/qwineventnotifier.cpp4
-rw-r--r--src/corelib/plugin/qlibrary_unix.cpp2
-rw-r--r--src/corelib/plugin/qlibrary_win.cpp6
-rw-r--r--src/corelib/statemachine/qstatemachine.cpp108
-rw-r--r--src/corelib/thread/qatomic.cpp7
-rw-r--r--src/corelib/thread/qatomic.h2
-rw-r--r--src/corelib/thread/qbasicatomic.h23
-rw-r--r--src/corelib/thread/qmutex_win.cpp9
-rw-r--r--src/corelib/thread/qoldbasicatomic.h143
-rw-r--r--src/corelib/thread/qthread.cpp2
-rw-r--r--src/corelib/thread/qthread_p.h9
-rw-r--r--src/corelib/thread/qthread_win.cpp154
-rw-r--r--src/corelib/thread/qthreadpool.cpp28
-rw-r--r--src/corelib/thread/qthreadpool_p.h3
-rw-r--r--src/corelib/thread/qwaitcondition.h6
-rw-r--r--src/corelib/thread/qwaitcondition_win.cpp11
-rw-r--r--src/corelib/thread/thread.pri3
-rw-r--r--src/corelib/tools/qalgorithms.h86
-rw-r--r--src/corelib/tools/qbitarray.cpp4
-rw-r--r--src/corelib/tools/qbytearray.cpp8
-rw-r--r--src/corelib/tools/qchar.cpp7
-rw-r--r--src/corelib/tools/qchar.h6
-rw-r--r--src/corelib/tools/qcollator_win.cpp24
-rw-r--r--src/corelib/tools/qdatetime.cpp3
-rw-r--r--src/corelib/tools/qlinkedlist.h2
-rw-r--r--src/corelib/tools/qlocale.h5
-rw-r--r--src/corelib/tools/qlocale.qdoc5
-rw-r--r--src/corelib/tools/qlocale_data_p.h8890
-rw-r--r--src/corelib/tools/qlocale_p.h4
-rw-r--r--src/corelib/tools/qlocale_win.cpp206
-rw-r--r--src/corelib/tools/qregexp.h2
-rw-r--r--src/corelib/tools/qsimd.cpp4
-rw-r--r--src/corelib/tools/qstring.cpp109
-rw-r--r--src/corelib/tools/qstring.h23
-rw-r--r--src/corelib/tools/qstring_compat.cpp68
-rw-r--r--src/corelib/tools/qstringbuilder.h4
-rw-r--r--src/corelib/tools/qstringlist.cpp2
-rw-r--r--src/corelib/tools/qtimezone.cpp34
-rw-r--r--src/corelib/tools/qtimezoneprivate.cpp48
-rw-r--r--src/corelib/tools/qtimezoneprivate_data_p.h1712
-rw-r--r--src/corelib/tools/qtimezoneprivate_icu.cpp10
-rw-r--r--src/corelib/tools/qtimezoneprivate_mac.mm12
-rw-r--r--src/corelib/tools/qtimezoneprivate_p.h16
-rw-r--r--src/corelib/tools/qtimezoneprivate_tz.cpp46
-rw-r--r--src/corelib/tools/qtimezoneprivate_win.cpp28
-rw-r--r--src/corelib/tools/qunicodetables.cpp10891
-rw-r--r--src/corelib/tools/qunicodetables_p.h3
-rw-r--r--src/corelib/tools/qunicodetools.cpp80
-rw-r--r--src/corelib/tools/qvarlengtharray.h49
-rw-r--r--src/corelib/tools/qvarlengtharray.qdoc39
-rw-r--r--src/corelib/tools/tools.pri10
-rw-r--r--src/corelib/xml/qxmlstream.cpp2
-rw-r--r--src/dbus/qdbus_symbols_p.h3
-rw-r--r--src/dbus/qdbusabstractinterface.cpp54
-rw-r--r--src/dbus/qdbusabstractinterface_p.h2
-rw-r--r--src/dbus/qdbusconnection_p.h2
-rw-r--r--src/dbus/qdbusdemarshaller.cpp4
-rw-r--r--src/dbus/qdbusintegrator.cpp13
-rw-r--r--src/dbus/qdbusinternalfilters.cpp6
-rw-r--r--src/dbus/qdbusserver.cpp27
-rw-r--r--src/dbus/qdbusserver.h3
-rw-r--r--src/gui/accessible/qaccessiblecache.cpp2
-rw-r--r--src/gui/doc/snippets/image/supportedformat.cpp8
-rw-r--r--src/gui/doc/src/coordsys.qdoc2
-rw-r--r--src/gui/doc/src/paintsystem.qdoc4
-rw-r--r--src/gui/image/image.pri15
-rw-r--r--src/gui/image/qbmphandler.cpp107
-rw-r--r--src/gui/image/qimage.cpp2485
-rw-r--r--src/gui/image/qimage.h15
-rw-r--r--src/gui/image/qimage_compat.cpp (renamed from src/gui/image/qimage_avx.cpp)29
-rw-r--r--src/gui/image/qimage_conversions.cpp2183
-rw-r--r--src/gui/image/qimage_neon.cpp4
-rw-r--r--src/gui/image/qimage_p.h13
-rw-r--r--src/gui/image/qimagereader.cpp29
-rw-r--r--src/gui/image/qjpeghandler.cpp10
-rw-r--r--src/gui/image/qpixmap.cpp22
-rw-r--r--src/gui/image/qpixmap.h7
-rw-r--r--src/gui/image/qpixmap_raster.cpp11
-rw-r--r--src/gui/image/qpixmap_raster_p.h1
-rw-r--r--src/gui/image/qplatformpixmap.h9
-rw-r--r--src/gui/image/qpnghandler.pri2
-rw-r--r--src/gui/image/qxbmhandler.cpp24
-rw-r--r--src/gui/kernel/qdrag.cpp6
-rw-r--r--src/gui/kernel/qevent.cpp18
-rw-r--r--src/gui/kernel/qevent.h2
-rw-r--r--src/gui/kernel/qguiapplication.cpp59
-rw-r--r--src/gui/kernel/qguiapplication_p.h6
-rw-r--r--src/gui/kernel/qguivariant.cpp2
-rw-r--r--src/gui/kernel/qkeysequence.cpp2
-rw-r--r--src/gui/kernel/qplatformintegration.cpp2
-rw-r--r--src/gui/kernel/qplatformintegration.h3
-rw-r--r--src/gui/kernel/qplatformtheme.cpp65
-rw-r--r--src/gui/kernel/qplatformtheme.h6
-rw-r--r--src/gui/kernel/qplatformwindow.cpp15
-rw-r--r--src/gui/kernel/qshortcutmap.cpp2
-rw-r--r--src/gui/kernel/qstylehints.cpp117
-rw-r--r--src/gui/kernel/qstylehints.h8
-rw-r--r--src/gui/kernel/qsurfaceformat.cpp124
-rw-r--r--src/gui/kernel/qsurfaceformat.h12
-rw-r--r--src/gui/kernel/qwindowsysteminterface.cpp20
-rw-r--r--src/gui/kernel/qwindowsysteminterface.h16
-rw-r--r--src/gui/kernel/qwindowsysteminterface_p.h11
-rw-r--r--src/gui/math3d/qvector2d.h82
-rw-r--r--src/gui/math3d/qvector3d.h86
-rw-r--r--src/gui/math3d/qvector4d.h90
-rw-r--r--src/gui/opengl/qopenglframebufferobject.cpp140
-rw-r--r--src/gui/opengl/qopenglframebufferobject.h1
-rw-r--r--src/gui/opengl/qopenglframebufferobject_p.h1
-rw-r--r--src/gui/painting/painting.pri13
-rw-r--r--src/gui/painting/qbrush.cpp81
-rw-r--r--src/gui/painting/qdrawhelper.cpp433
-rw-r--r--src/gui/painting/qdrawhelper_avx.cpp70
-rw-r--r--src/gui/painting/qdrawhelper_neon.cpp6
-rw-r--r--src/gui/painting/qdrawhelper_neon_p.h4
-rw-r--r--src/gui/painting/qdrawhelper_p.h22
-rw-r--r--src/gui/painting/qdrawhelper_sse2.cpp8
-rw-r--r--src/gui/painting/qdrawhelper_x86_p.h27
-rw-r--r--src/gui/painting/qdrawingprimitive_sse2_p.h4
-rw-r--r--src/gui/painting/qpaintengine.cpp1
-rw-r--r--src/gui/painting/qpaintengine.h1
-rw-r--r--src/gui/painting/qpainterpath.cpp24
-rw-r--r--src/gui/painting/qpainterpath.h2
-rw-r--r--src/gui/painting/qpen.cpp4
-rw-r--r--src/gui/text/qfontengine_ft.cpp4
-rw-r--r--src/gui/text/qtextcursor.cpp1
-rw-r--r--src/gui/text/qtextdocument.cpp94
-rw-r--r--src/gui/text/qtextdocument.h8
-rw-r--r--src/gui/text/qtextdocument_p.h1
-rw-r--r--src/gui/text/qtextengine.cpp16
-rw-r--r--src/gui/text/qtextengine_p.h1
-rw-r--r--src/gui/text/qtextformat.cpp22
-rw-r--r--src/gui/text/qtextformat.h1
-rw-r--r--src/gui/text/qtextformat_p.h6
-rw-r--r--src/gui/util/qabstractlayoutstyleinfo.cpp53
-rw-r--r--src/gui/util/qabstractlayoutstyleinfo_p.h97
-rw-r--r--src/gui/util/qgridlayoutengine.cpp (renamed from src/widgets/graphicsview/qgridlayoutengine.cpp)347
-rw-r--r--src/gui/util/qgridlayoutengine_p.h (renamed from src/widgets/graphicsview/qgridlayoutengine_p.h)151
-rw-r--r--src/gui/util/qlayoutpolicy.cpp136
-rw-r--r--src/gui/util/qlayoutpolicy_p.h185
-rw-r--r--src/gui/util/util.pri10
-rw-r--r--src/network/access/qnetworkcookie.cpp36
-rw-r--r--src/network/doc/snippets/network/tcpwait.cpp8
-rw-r--r--src/network/kernel/kernel.pri14
-rw-r--r--src/network/kernel/qauthenticator.cpp21
-rw-r--r--src/network/kernel/qdnslookup.cpp19
-rw-r--r--src/network/kernel/qdnslookup.h6
-rw-r--r--src/network/kernel/qdnslookup_p.h1
-rw-r--r--src/network/kernel/qdnslookup_winrt.cpp144
-rw-r--r--src/network/kernel/qhostaddress.cpp6
-rw-r--r--src/network/kernel/qhostinfo_unix.cpp6
-rw-r--r--src/network/kernel/qhostinfo_winrt.cpp194
-rw-r--r--src/network/kernel/qnetworkinterface_unix.cpp2
-rw-r--r--src/network/kernel/qnetworkinterface_winrt.cpp198
-rw-r--r--src/network/socket/qabstractsocket.cpp37
-rw-r--r--src/network/socket/qabstractsocket.h4
-rw-r--r--src/network/socket/qabstractsocketengine.cpp4
-rw-r--r--src/network/socket/qabstractsocketengine_p.h2
-rw-r--r--src/network/socket/qlocalserver.cpp2
-rw-r--r--src/network/socket/qnativesocketengine_p.h6
-rw-r--r--src/network/socket/qnativesocketengine_unix.cpp2
-rw-r--r--src/network/socket/qnativesocketengine_win.cpp28
-rw-r--r--src/network/socket/qnativesocketengine_winrt.cpp327
-rw-r--r--src/network/socket/qnativesocketengine_winrt_p.h145
-rw-r--r--src/network/socket/qsocks5socketengine.cpp7
-rw-r--r--src/network/socket/socket.pri19
-rw-r--r--src/network/ssl/qsslkey.cpp2
-rw-r--r--src/network/ssl/qsslsocket_openssl_symbols_p.h40
-rw-r--r--src/opengl/opengl.pro3
-rw-r--r--src/opengl/qglframebufferobject.cpp4
-rw-r--r--src/platformsupport/cglconvenience/cglconvenience.mm1
-rw-r--r--src/platformsupport/devicediscovery/devicediscovery.pri13
-rw-r--r--src/platformsupport/devicediscovery/qdevicediscovery_dummy.cpp (renamed from src/plugins/platforms/android/src/opengl/qandroidopenglplatformscreen.cpp)31
-rw-r--r--src/platformsupport/devicediscovery/qdevicediscovery_p.h9
-rw-r--r--src/platformsupport/eglconvenience/eglconvenience.pri20
-rw-r--r--src/platformsupport/eglconvenience/qeglcompositor.cpp (renamed from src/plugins/platforms/eglfs/qeglfscompositor.cpp)71
-rw-r--r--src/platformsupport/eglconvenience/qeglcompositor_p.h (renamed from src/plugins/platforms/eglfs/qeglfscompositor.h)27
-rw-r--r--src/platformsupport/eglconvenience/qeglconvenience.cpp109
-rw-r--r--src/platformsupport/eglconvenience/qeglconvenience_p.h10
-rw-r--r--src/platformsupport/eglconvenience/qeglpbuffer.cpp12
-rw-r--r--src/platformsupport/eglconvenience/qeglplatformbackingstore.cpp (renamed from src/plugins/platforms/eglfs/qeglfsbackingstore.cpp)74
-rw-r--r--src/platformsupport/eglconvenience/qeglplatformbackingstore_p.h (renamed from src/plugins/platforms/eglfs/qeglfsbackingstore.h)19
-rw-r--r--src/platformsupport/eglconvenience/qeglplatformcontext.cpp50
-rw-r--r--src/platformsupport/eglconvenience/qeglplatformcontext_p.h7
-rw-r--r--src/platformsupport/eglconvenience/qeglplatformcursor.cpp (renamed from src/plugins/platforms/eglfs/qeglfscursor.cpp)157
-rw-r--r--src/platformsupport/eglconvenience/qeglplatformcursor_p.h (renamed from src/plugins/platforms/eglfs/qeglfscursor.h)41
-rw-r--r--src/platformsupport/eglconvenience/qeglplatformintegration.cpp255
-rw-r--r--src/platformsupport/eglconvenience/qeglplatformintegration_p.h97
-rw-r--r--src/platformsupport/eglconvenience/qeglplatformscreen.cpp110
-rw-r--r--src/platformsupport/eglconvenience/qeglplatformscreen_p.h81
-rw-r--r--src/platformsupport/eglconvenience/qeglplatformwindow.cpp118
-rw-r--r--src/platformsupport/eglconvenience/qeglplatformwindow_p.h76
-rw-r--r--src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp67
-rw-r--r--src/platformsupport/input/evdevkeyboard/qevdevkeyboard_defaultmap_p.h4
-rw-r--r--src/platformsupport/themes/genericunix/qgenericunixthemes.cpp20
-rw-r--r--src/platformsupport/themes/genericunix/qgenericunixthemes_p.h3
-rw-r--r--src/plugins/accessible/widgets/itemviews.cpp3
-rw-r--r--src/plugins/bearer/connman/qconnmanservice_linux_p.h32
-rw-r--r--src/plugins/bearer/connman/qofonoservice_linux_p.h2
-rw-r--r--src/plugins/bearer/networkmanager/qnetworkmanagerservice.h24
-rw-r--r--src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp1
-rw-r--r--src/plugins/platforms/android/android.json (renamed from src/plugins/platforms/android/src/android.json)0
-rw-r--r--src/plugins/platforms/android/android.pro81
-rw-r--r--src/plugins/platforms/android/androidjniaccessibility.cpp (renamed from src/plugins/platforms/android/src/androidjniaccessibility.cpp)0
-rw-r--r--src/plugins/platforms/android/androidjniaccessibility.h (renamed from src/plugins/platforms/android/src/androidjniaccessibility.h)0
-rw-r--r--src/plugins/platforms/android/androidjniclipboard.cpp (renamed from src/plugins/platforms/android/src/androidjniclipboard.cpp)0
-rw-r--r--src/plugins/platforms/android/androidjniclipboard.h (renamed from src/plugins/platforms/android/src/androidjniclipboard.h)0
-rw-r--r--src/plugins/platforms/android/androidjniinput.cpp (renamed from src/plugins/platforms/android/src/androidjniinput.cpp)9
-rw-r--r--src/plugins/platforms/android/androidjniinput.h (renamed from src/plugins/platforms/android/src/androidjniinput.h)0
-rw-r--r--src/plugins/platforms/android/androidjnimain.cpp (renamed from src/plugins/platforms/android/src/androidjnimain.cpp)380
-rw-r--r--src/plugins/platforms/android/androidjnimain.h (renamed from src/plugins/platforms/android/src/androidjnimain.h)22
-rw-r--r--src/plugins/platforms/android/androidjnimenu.cpp (renamed from src/plugins/platforms/android/src/androidjnimenu.cpp)18
-rw-r--r--src/plugins/platforms/android/androidjnimenu.h (renamed from src/plugins/platforms/android/src/androidjnimenu.h)0
-rw-r--r--src/plugins/platforms/android/androidplatformplugin.cpp (renamed from src/plugins/platforms/android/src/androidplatformplugin.cpp)0
-rw-r--r--src/plugins/platforms/android/androidsurfaceclient.h (renamed from src/plugins/platforms/android/src/raster/qandroidplatformscreen.h)28
-rw-r--r--src/plugins/platforms/android/opengl/opengl.pro32
-rw-r--r--src/plugins/platforms/android/qandroidassetsfileenginehandler.cpp (renamed from src/plugins/platforms/android/src/qandroidassetsfileenginehandler.cpp)0
-rw-r--r--src/plugins/platforms/android/qandroidassetsfileenginehandler.h (renamed from src/plugins/platforms/android/src/qandroidassetsfileenginehandler.h)0
-rw-r--r--src/plugins/platforms/android/qandroidinputcontext.cpp (renamed from src/plugins/platforms/android/src/qandroidinputcontext.cpp)0
-rw-r--r--src/plugins/platforms/android/qandroidinputcontext.h (renamed from src/plugins/platforms/android/src/qandroidinputcontext.h)0
-rw-r--r--src/plugins/platforms/android/qandroidplatformaccessibility.cpp (renamed from src/plugins/platforms/android/src/qandroidplatformaccessibility.cpp)0
-rw-r--r--src/plugins/platforms/android/qandroidplatformaccessibility.h (renamed from src/plugins/platforms/android/src/qandroidplatformaccessibility.h)0
-rw-r--r--src/plugins/platforms/android/qandroidplatformbackingstore.cpp78
-rw-r--r--src/plugins/platforms/android/qandroidplatformbackingstore.h66
-rw-r--r--src/plugins/platforms/android/qandroidplatformclipboard.cpp (renamed from src/plugins/platforms/android/src/qandroidplatformclipboard.cpp)0
-rw-r--r--src/plugins/platforms/android/qandroidplatformclipboard.h (renamed from src/plugins/platforms/android/src/qandroidplatformclipboard.h)0
-rw-r--r--src/plugins/platforms/android/qandroidplatformdialoghelpers.cpp (renamed from src/plugins/platforms/android/src/qandroidplatformdialoghelpers.cpp)51
-rw-r--r--src/plugins/platforms/android/qandroidplatformdialoghelpers.h (renamed from src/plugins/platforms/android/src/qandroidplatformdialoghelpers.h)0
-rw-r--r--src/plugins/platforms/android/qandroidplatformfontdatabase.cpp (renamed from src/plugins/platforms/android/src/qandroidplatformfontdatabase.cpp)0
-rw-r--r--src/plugins/platforms/android/qandroidplatformfontdatabase.h (renamed from src/plugins/platforms/android/src/qandroidplatformfontdatabase.h)0
-rw-r--r--src/plugins/platforms/android/qandroidplatformintegration.cpp (renamed from src/plugins/platforms/android/src/qandroidplatformintegration.cpp)157
-rw-r--r--src/plugins/platforms/android/qandroidplatformintegration.h (renamed from src/plugins/platforms/android/src/qandroidplatformintegration.h)41
-rw-r--r--src/plugins/platforms/android/qandroidplatformmenu.cpp (renamed from src/plugins/platforms/android/src/qandroidplatformmenu.cpp)0
-rw-r--r--src/plugins/platforms/android/qandroidplatformmenu.h (renamed from src/plugins/platforms/android/src/qandroidplatformmenu.h)0
-rw-r--r--src/plugins/platforms/android/qandroidplatformmenubar.cpp (renamed from src/plugins/platforms/android/src/qandroidplatformmenubar.cpp)0
-rw-r--r--src/plugins/platforms/android/qandroidplatformmenubar.h (renamed from src/plugins/platforms/android/src/qandroidplatformmenubar.h)0
-rw-r--r--src/plugins/platforms/android/qandroidplatformmenuitem.cpp (renamed from src/plugins/platforms/android/src/qandroidplatformmenuitem.cpp)0
-rw-r--r--src/plugins/platforms/android/qandroidplatformmenuitem.h (renamed from src/plugins/platforms/android/src/qandroidplatformmenuitem.h)0
-rw-r--r--src/plugins/platforms/android/qandroidplatformopenglcontext.cpp (renamed from src/plugins/platforms/android/src/opengl/qandroidopenglcontext.cpp)49
-rw-r--r--src/plugins/platforms/android/qandroidplatformopenglcontext.h (renamed from src/plugins/platforms/android/src/opengl/qandroidopenglcontext.h)22
-rw-r--r--src/plugins/platforms/android/qandroidplatformopenglwindow.cpp160
-rw-r--r--src/plugins/platforms/android/qandroidplatformopenglwindow.h83
-rw-r--r--src/plugins/platforms/android/qandroidplatformrasterwindow.cpp78
-rw-r--r--src/plugins/platforms/android/qandroidplatformrasterwindow.h70
-rw-r--r--src/plugins/platforms/android/qandroidplatformscreen.cpp352
-rw-r--r--src/plugins/platforms/android/qandroidplatformscreen.h120
-rw-r--r--src/plugins/platforms/android/qandroidplatformservices.cpp (renamed from src/plugins/platforms/android/src/qandroidplatformservices.cpp)0
-rw-r--r--src/plugins/platforms/android/qandroidplatformservices.h (renamed from src/plugins/platforms/android/src/qandroidplatformservices.h)0
-rw-r--r--src/plugins/platforms/android/qandroidplatformtheme.cpp (renamed from src/plugins/platforms/android/src/qandroidplatformtheme.cpp)16
-rw-r--r--src/plugins/platforms/android/qandroidplatformtheme.h (renamed from src/plugins/platforms/android/src/qandroidplatformtheme.h)1
-rw-r--r--src/plugins/platforms/android/qandroidplatformwindow.cpp (renamed from src/plugins/platforms/android/src/raster/qandroidplatformwindow.cpp)111
-rw-r--r--src/plugins/platforms/android/qandroidplatformwindow.h (renamed from src/plugins/platforms/android/src/opengl/qandroidopenglplatformwindow.h)60
-rw-r--r--src/plugins/platforms/android/qandroidsystemlocale.cpp (renamed from src/plugins/platforms/android/src/qandroidsystemlocale.cpp)0
-rw-r--r--src/plugins/platforms/android/qandroidsystemlocale.h (renamed from src/plugins/platforms/android/src/qandroidsystemlocale.h)0
-rw-r--r--src/plugins/platforms/android/raster/raster.pro19
-rw-r--r--src/plugins/platforms/android/src/opengl/qandroidopenglplatformwindow.cpp178
-rw-r--r--src/plugins/platforms/android/src/opengl/qeglfshooks_android.cpp161
-rw-r--r--src/plugins/platforms/android/src/raster/qandroidplatformscreen.cpp94
-rw-r--r--src/plugins/platforms/android/src/raster/raster.pri7
-rw-r--r--src/plugins/platforms/android/src/src.pri55
-rw-r--r--src/plugins/platforms/cocoa/messages.cpp5
-rw-r--r--src/plugins/platforms/cocoa/messages.h2
-rw-r--r--src/plugins/platforms/cocoa/qcocoaapplication.h2
-rw-r--r--src/plugins/platforms/cocoa/qcocoaglcontext.mm2
-rw-r--r--src/plugins/platforms/cocoa/qcocoahelpers.h1
-rw-r--r--src/plugins/platforms/cocoa/qcocoahelpers.mm6
-rw-r--r--src/plugins/platforms/cocoa/qcocoatheme.h1
-rw-r--r--src/plugins/platforms/cocoa/qcocoatheme.mm6
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.h5
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.mm39
-rw-r--r--src/plugins/platforms/direct2d/direct2d.json3
-rw-r--r--src/plugins/platforms/direct2d/direct2d.pro39
-rw-r--r--src/plugins/platforms/direct2d/qwindowsdirect2dbackingstore.cpp239
-rw-r--r--src/plugins/platforms/direct2d/qwindowsdirect2dbackingstore.h76
-rw-r--r--src/plugins/platforms/direct2d/qwindowsdirect2dbitmap.cpp205
-rw-r--r--src/plugins/platforms/direct2d/qwindowsdirect2dbitmap.h81
-rw-r--r--src/plugins/platforms/direct2d/qwindowsdirect2dcontext.cpp218
-rw-r--r--src/plugins/platforms/direct2d/qwindowsdirect2dcontext.h84
-rw-r--r--src/plugins/platforms/direct2d/qwindowsdirect2ddevicecontext.cpp135
-rw-r--r--src/plugins/platforms/direct2d/qwindowsdirect2ddevicecontext.h95
-rw-r--r--src/plugins/platforms/direct2d/qwindowsdirect2dhelpers.h96
-rw-r--r--src/plugins/platforms/direct2d/qwindowsdirect2dintegration.cpp122
-rw-r--r--src/plugins/platforms/direct2d/qwindowsdirect2dintegration.h78
-rw-r--r--src/plugins/platforms/direct2d/qwindowsdirect2dnativeinterface.cpp (renamed from src/plugins/platforms/ios/qiossoftwareinputhandler.h)33
-rw-r--r--src/plugins/platforms/direct2d/qwindowsdirect2dnativeinterface.h58
-rw-r--r--src/plugins/platforms/direct2d/qwindowsdirect2dpaintdevice.cpp131
-rw-r--r--src/plugins/platforms/direct2d/qwindowsdirect2dpaintdevice.h71
-rw-r--r--src/plugins/platforms/direct2d/qwindowsdirect2dpaintengine.cpp1116
-rw-r--r--src/plugins/platforms/direct2d/qwindowsdirect2dpaintengine.h87
-rw-r--r--src/plugins/platforms/direct2d/qwindowsdirect2dplatformpixmap.cpp179
-rw-r--r--src/plugins/platforms/direct2d/qwindowsdirect2dplatformpixmap.h85
-rw-r--r--src/plugins/platforms/direct2d/qwindowsdirect2dplatformplugin.cpp66
-rw-r--r--src/plugins/platforms/directfb/qdirectfbconvenience.cpp4
-rw-r--r--src/plugins/platforms/eglfs/eglfs.pri10
-rw-r--r--src/plugins/platforms/eglfs/qeglfscontext.cpp33
-rw-r--r--src/plugins/platforms/eglfs/qeglfscontext.h9
-rw-r--r--src/plugins/platforms/eglfs/qeglfshooks.h4
-rw-r--r--src/plugins/platforms/eglfs/qeglfshooks_stub.cpp129
-rw-r--r--src/plugins/platforms/eglfs/qeglfsintegration.cpp189
-rw-r--r--src/plugins/platforms/eglfs/qeglfsintegration.h47
-rw-r--r--src/plugins/platforms/eglfs/qeglfsscreen.cpp68
-rw-r--r--src/plugins/platforms/eglfs/qeglfsscreen.h40
-rw-r--r--src/plugins/platforms/eglfs/qeglfswindow.cpp58
-rw-r--r--src/plugins/platforms/eglfs/qeglfswindow.h41
-rw-r--r--src/plugins/platforms/ios/ios.pro1
-rw-r--r--src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp32
-rw-r--r--src/plugins/platforms/minimal/qminimalintegration.cpp17
-rw-r--r--src/plugins/platforms/minimalegl/qminimaleglscreen.cpp10
-rw-r--r--src/plugins/platforms/offscreen/qoffscreenintegration.cpp8
-rw-r--r--src/plugins/platforms/platforms.pro7
-rw-r--r--src/plugins/platforms/qnx/qnx.pro3
-rw-r--r--src/plugins/platforms/qnx/qqnxabstractvirtualkeyboard.cpp46
-rw-r--r--src/plugins/platforms/qnx/qqnxabstractvirtualkeyboard.h24
-rw-r--r--src/plugins/platforms/qnx/qqnxeglwindow.cpp4
-rw-r--r--src/plugins/platforms/qnx/qqnxinputcontext_imf.cpp1601
-rw-r--r--src/plugins/platforms/qnx/qqnxinputcontext_imf.h76
-rw-r--r--src/plugins/platforms/qnx/qqnxinputcontext_noimf.cpp9
-rw-r--r--src/plugins/platforms/qnx/qqnxintegration.cpp27
-rw-r--r--src/plugins/platforms/qnx/qqnxnativeinterface.cpp22
-rw-r--r--src/plugins/platforms/qnx/qqnxnativeinterface.h2
-rw-r--r--src/plugins/platforms/qnx/qqnxscreen.cpp9
-rw-r--r--src/plugins/platforms/qnx/qqnxscreen.h2
-rw-r--r--src/plugins/platforms/qnx/qqnxscreeneventfilter.h58
-rw-r--r--src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp73
-rw-r--r--src/plugins/platforms/qnx/qqnxscreeneventhandler.h7
-rw-r--r--src/plugins/platforms/qnx/qqnxvirtualkeyboardbps.cpp91
-rw-r--r--src/plugins/platforms/qnx/qqnxvirtualkeyboardbps.h6
-rw-r--r--src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.cpp192
-rw-r--r--src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.h17
-rw-r--r--src/plugins/platforms/qnx/qqnxwindow.cpp129
-rw-r--r--src/plugins/platforms/qnx/qqnxwindow.h8
-rw-r--r--src/plugins/platforms/windows/accessible/accessible.pri4
-rw-r--r--src/plugins/platforms/windows/main.cpp4
-rw-r--r--src/plugins/platforms/windows/qtwindowsglobal.h3
-rw-r--r--src/plugins/platforms/windows/qwindowsbackingstore.cpp7
-rw-r--r--src/plugins/platforms/windows/qwindowscontext.cpp21
-rw-r--r--src/plugins/platforms/windows/qwindowscontext.h2
-rw-r--r--src/plugins/platforms/windows/qwindowsfontdatabase.cpp3
-rw-r--r--src/plugins/platforms/windows/qwindowsfontenginedirectwrite.h2
-rw-r--r--src/plugins/platforms/windows/qwindowsgdiintegration.cpp81
-rw-r--r--src/plugins/platforms/windows/qwindowsgdiintegration.h66
-rw-r--r--src/plugins/platforms/windows/qwindowsgdinativeinterface.cpp62
-rw-r--r--src/plugins/platforms/windows/qwindowsgdinativeinterface.h58
-rw-r--r--src/plugins/platforms/windows/qwindowsglcontext.cpp26
-rw-r--r--src/plugins/platforms/windows/qwindowsglcontext.h6
-rw-r--r--src/plugins/platforms/windows/qwindowsintegration.cpp207
-rw-r--r--src/plugins/platforms/windows/qwindowsintegration.h5
-rw-r--r--src/plugins/platforms/windows/qwindowsmousehandler.cpp13
-rw-r--r--src/plugins/platforms/windows/qwindowsnativeinterface.cpp169
-rw-r--r--src/plugins/platforms/windows/qwindowsnativeinterface.h94
-rw-r--r--src/plugins/platforms/windows/qwindowsscreen.cpp2
-rw-r--r--src/plugins/platforms/windows/qwindowstheme.cpp9
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.cpp4
-rw-r--r--src/plugins/platforms/windows/windows.pri180
-rw-r--r--src/plugins/platforms/windows/windows.pro181
-rw-r--r--src/plugins/platforms/winrt/blit.hlsl14
-rw-r--r--src/plugins/platforms/winrt/main.cpp74
-rw-r--r--src/plugins/platforms/winrt/qwinrtbackingstore.cpp393
-rw-r--r--src/plugins/platforms/winrt/qwinrtbackingstore.h77
-rw-r--r--src/plugins/platforms/winrt/qwinrtcursor.cpp153
-rw-r--r--src/plugins/platforms/winrt/qwinrtcursor.h77
-rw-r--r--src/plugins/platforms/winrt/qwinrteglcontext.cpp63
-rw-r--r--src/plugins/platforms/winrt/qwinrteglcontext.h63
-rw-r--r--src/plugins/platforms/winrt/qwinrteventdispatcher.cpp105
-rw-r--r--src/plugins/platforms/winrt/qwinrteventdispatcher.h81
-rw-r--r--src/plugins/platforms/winrt/qwinrtfontdatabase.cpp64
-rw-r--r--src/plugins/platforms/winrt/qwinrtfontdatabase.h (renamed from src/plugins/platforms/android/src/opengl/qandroidopenglplatformscreen.h)15
-rw-r--r--src/plugins/platforms/winrt/qwinrtinputcontext.cpp300
-rw-r--r--src/plugins/platforms/winrt/qwinrtinputcontext.h121
-rw-r--r--src/plugins/platforms/winrt/qwinrtintegration.cpp194
-rw-r--r--src/plugins/platforms/winrt/qwinrtintegration.h86
-rw-r--r--src/plugins/platforms/winrt/qwinrtscreen.cpp975
-rw-r--r--src/plugins/platforms/winrt/qwinrtscreen.h168
-rw-r--r--src/plugins/platforms/winrt/qwinrtservices.cpp138
-rw-r--r--src/plugins/platforms/winrt/qwinrtservices.h80
-rw-r--r--src/plugins/platforms/winrt/qwinrtwindow.cpp119
-rw-r--r--src/plugins/platforms/winrt/qwinrtwindow.h (renamed from src/plugins/platforms/android/src/raster/qandroidplatformwindow.h)40
-rw-r--r--src/plugins/platforms/winrt/winrt.json3
-rw-r--r--src/plugins/platforms/winrt/winrt.pro55
-rw-r--r--src/plugins/platforms/xcb/qglxintegration.cpp38
-rw-r--r--src/plugins/platforms/xcb/qglxintegration.h2
-rw-r--r--src/plugins/platforms/xcb/qxcbbackingstore.cpp6
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.cpp77
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.h20
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection_xi2.cpp132
-rw-r--r--src/plugins/platforms/xcb/qxcbdrag.cpp4
-rw-r--r--src/plugins/platforms/xcb/qxcbkeyboard.cpp96
-rw-r--r--src/plugins/platforms/xcb/qxcbsessionmanager.cpp1
-rw-r--r--src/plugins/platforms/xcb/qxcbwindow.cpp7
-rw-r--r--src/plugins/platforms/xcb/xcb-plugin.pro2
-rw-r--r--src/plugins/plugins.pro2
-rw-r--r--src/printsupport/dialogs/qprintdialog_win.cpp4
-rw-r--r--src/printsupport/kernel/qprintengine_win.cpp98
-rw-r--r--src/printsupport/kernel/qprinter.cpp7
-rw-r--r--src/printsupport/kernel/qprinter.h7
-rw-r--r--src/printsupport/widgets/qprintpreviewwidget.cpp7
-rw-r--r--src/sql/doc/src/sql-driver.qdoc8
-rw-r--r--src/sql/drivers/ibase/qsql_ibase.cpp2
-rw-r--r--src/sql/drivers/psql/qsql_psql.cpp7
-rw-r--r--src/sql/drivers/psql/qsql_psql.pri2
-rw-r--r--src/sql/drivers/sqlite/qsql_sqlite.cpp2
-rw-r--r--src/sql/drivers/tds/qsql_tds.pri2
-rw-r--r--src/sql/kernel/qsqldriver.cpp2
-rw-r--r--src/sql/kernel/qsqlerror.cpp107
-rw-r--r--src/sql/kernel/qsqlerror.h25
-rw-r--r--src/sql/kernel/qsqlquery.cpp33
-rw-r--r--src/sql/kernel/qsqlquery.h1
-rw-r--r--src/src.pro14
-rw-r--r--src/testlib/qtestcase.cpp48
-rw-r--r--src/testlib/qtestcase.h89
-rw-r--r--src/testlib/qtestlog.cpp73
-rw-r--r--src/testlib/qtestlog_p.h2
-rw-r--r--src/testlib/qxmltestlogger.cpp16
-rw-r--r--src/testlib/qxmltestlogger_p.h3
-rw-r--r--src/tools/bootstrap/bootstrap.pro5
-rw-r--r--src/tools/moc/generator.cpp44
-rw-r--r--src/tools/moc/generator.h5
-rw-r--r--src/tools/moc/moc.cpp21
-rw-r--r--src/tools/moc/moc.h4
-rw-r--r--src/tools/qlalr/compress.cpp286
-rw-r--r--src/tools/qlalr/compress.h60
-rw-r--r--src/tools/qlalr/cppgenerator.cpp750
-rw-r--r--src/tools/qlalr/cppgenerator.h98
-rw-r--r--src/tools/qlalr/doc/qlalr.qdocconf64
-rw-r--r--src/tools/qlalr/doc/src/classic.css97
-rw-r--r--src/tools/qlalr/doc/src/images/qt-logo.pngbin0 -> 1422 bytes
-rw-r--r--src/tools/qlalr/doc/src/qlalr.qdoc106
-rw-r--r--src/tools/qlalr/dotgraph.cpp102
-rw-r--r--src/tools/qlalr/dotgraph.h61
-rw-r--r--src/tools/qlalr/examples/dummy-xml/dummy-xml.pro2
-rw-r--r--src/tools/qlalr/examples/dummy-xml/ll/dummy-xml-ll.cpp123
-rw-r--r--src/tools/qlalr/examples/dummy-xml/xml.g242
-rw-r--r--src/tools/qlalr/examples/glsl/build.sh47
-rwxr-xr-xsrc/tools/qlalr/examples/glsl/glsl4
-rw-r--r--src/tools/qlalr/examples/glsl/glsl-lex.l245
-rw-r--r--src/tools/qlalr/examples/glsl/glsl.g671
-rw-r--r--src/tools/qlalr/examples/glsl/glsl.pro4
-rw-r--r--src/tools/qlalr/examples/lambda/COMPILE3
-rw-r--r--src/tools/qlalr/examples/lambda/lambda.g81
-rw-r--r--src/tools/qlalr/examples/lambda/lambda.pro3
-rw-r--r--src/tools/qlalr/examples/lambda/main.cpp199
-rw-r--r--src/tools/qlalr/examples/qparser/COMPILE3
-rw-r--r--src/tools/qlalr/examples/qparser/calc.g133
-rw-r--r--src/tools/qlalr/examples/qparser/calc.l61
-rw-r--r--src/tools/qlalr/examples/qparser/qparser.cpp43
-rw-r--r--src/tools/qlalr/examples/qparser/qparser.h152
-rw-r--r--src/tools/qlalr/examples/qparser/qparser.pro4
-rw-r--r--src/tools/qlalr/grammar.cpp127
-rw-r--r--src/tools/qlalr/grammar_p.h131
-rw-r--r--src/tools/qlalr/lalr.cpp781
-rw-r--r--src/tools/qlalr/lalr.g802
-rw-r--r--src/tools/qlalr/lalr.h503
-rw-r--r--src/tools/qlalr/main.cpp185
-rw-r--r--src/tools/qlalr/parsetable.cpp128
-rw-r--r--src/tools/qlalr/parsetable.h61
-rw-r--r--src/tools/qlalr/qlalr.pro25
-rw-r--r--src/tools/qlalr/recognizer.cpp490
-rw-r--r--src/tools/qlalr/recognizer.h113
-rw-r--r--src/tools/uic/cpp/cppwriteincludes.cpp3
-rw-r--r--src/tools/uic/main.cpp6
-rw-r--r--src/tools/uic/option.h1
-rw-r--r--src/widgets/dialogs/qcolordialog.cpp6
-rw-r--r--src/widgets/dialogs/qfiledialog.cpp5
-rw-r--r--src/widgets/dialogs/qfileinfogatherer.cpp2
-rw-r--r--src/widgets/dialogs/qfilesystemmodel.cpp2
-rw-r--r--src/widgets/dialogs/qfontdialog.cpp6
-rw-r--r--src/widgets/dialogs/qinputdialog.cpp9
-rw-r--r--src/widgets/dialogs/qmessagebox.cpp4
-rw-r--r--src/widgets/dialogs/qwizard.cpp90
-rw-r--r--src/widgets/dialogs/qwizard.h3
-rw-r--r--src/widgets/dialogs/qwizard_win.cpp50
-rw-r--r--src/widgets/dialogs/qwizard_win_p.h4
-rw-r--r--src/widgets/doc/snippets/code/doc_src_layout.cpp2
-rw-r--r--src/widgets/doc/snippets/customstyle/customstyle.cpp48
-rw-r--r--src/widgets/doc/snippets/mainwindowsnippet.cpp2
-rw-r--r--src/widgets/doc/snippets/mdiareasnippets.cpp2
-rw-r--r--src/widgets/doc/snippets/textdocument-imagedrop/textedit.cpp2
-rw-r--r--src/widgets/doc/snippets/timeline/main.cpp2
-rw-r--r--src/widgets/graphicsview/graphicsview.pri6
-rw-r--r--src/widgets/graphicsview/qgraphicsgridlayout.cpp55
-rw-r--r--src/widgets/graphicsview/qgraphicsgridlayoutengine.cpp101
-rw-r--r--src/widgets/graphicsview/qgraphicsgridlayoutengine_p.h125
-rw-r--r--src/widgets/graphicsview/qgraphicslayoutstyleinfo.cpp108
-rw-r--r--src/widgets/graphicsview/qgraphicslayoutstyleinfo_p.h96
-rw-r--r--src/widgets/graphicsview/qgraphicslinearlayout.cpp54
-rw-r--r--src/widgets/graphicsview/qgraphicsproxywidget.cpp16
-rw-r--r--src/widgets/graphicsview/qsimplex_p.h7
-rw-r--r--src/widgets/itemviews/qabstractitemview.cpp3
-rw-r--r--src/widgets/itemviews/qfileiconprovider.cpp8
-rw-r--r--src/widgets/itemviews/qheaderview.cpp78
-rw-r--r--src/widgets/itemviews/qheaderview_p.h28
-rw-r--r--src/widgets/itemviews/qitemeditorfactory.cpp8
-rw-r--r--src/widgets/itemviews/qtreeview.cpp14
-rw-r--r--src/widgets/itemviews/qtreewidget.cpp9
-rw-r--r--src/widgets/kernel/qapplication.cpp12
-rw-r--r--src/widgets/kernel/qapplication_p.h2
-rw-r--r--src/widgets/kernel/qapplication_qpa.cpp4
-rw-r--r--src/widgets/kernel/qformlayout.h2
-rw-r--r--src/widgets/kernel/qwidget.cpp2
-rw-r--r--src/widgets/kernel/qwidgetbackingstore.cpp6
-rw-r--r--src/widgets/kernel/win.pri2
-rw-r--r--src/widgets/styles/qstyle.h2
-rw-r--r--src/widgets/styles/qwindowscestyle.cpp2
-rw-r--r--src/widgets/styles/qwindowsmobilestyle.cpp5572
-rw-r--r--src/widgets/styles/qwindowsstyle.cpp20
-rw-r--r--src/widgets/util/qsystemtrayicon.cpp4
-rw-r--r--src/widgets/util/util.pri2
-rw-r--r--src/widgets/widgets/qabstractspinbox.cpp33
-rw-r--r--src/widgets/widgets/qabstractspinbox.h4
-rw-r--r--src/widgets/widgets/qabstractspinbox_p.h1
-rw-r--r--src/widgets/widgets/qcombobox.cpp12
-rw-r--r--src/widgets/widgets/qdatetimeedit.cpp12
-rw-r--r--src/widgets/widgets/qdialogbuttonbox.cpp94
-rw-r--r--src/widgets/widgets/qdockarealayout.cpp16
-rw-r--r--src/widgets/widgets/qdockwidget.cpp4
-rw-r--r--src/widgets/widgets/qdockwidget_p.h2
-rw-r--r--src/widgets/widgets/qeffects.cpp42
-rw-r--r--src/widgets/widgets/qfontcombobox.cpp7
-rw-r--r--src/widgets/widgets/qlcdnumber.h1
-rw-r--r--src/widgets/widgets/qlineedit.cpp11
-rw-r--r--src/widgets/widgets/qlineedit_p.h5
-rw-r--r--src/widgets/widgets/qmdiarea.cpp3
-rw-r--r--src/widgets/widgets/qmenu.cpp4
-rw-r--r--src/widgets/widgets/qmenubar.cpp6
-rw-r--r--src/widgets/widgets/qplaintextedit.cpp24
-rw-r--r--src/widgets/widgets/qpushbutton.cpp6
-rw-r--r--src/widgets/widgets/qsizegrip.cpp2
-rw-r--r--src/widgets/widgets/qslider.cpp4
-rw-r--r--src/widgets/widgets/qspinbox.cpp16
-rw-r--r--src/widgets/widgets/qsplashscreen.cpp4
-rw-r--r--src/widgets/widgets/qtabwidget.cpp3
-rw-r--r--src/widgets/widgets/qtextbrowser.cpp2
-rw-r--r--src/widgets/widgets/qtoolbar.cpp4
-rw-r--r--src/widgets/widgets/qtoolbar.h2
-rw-r--r--src/widgets/widgets/qtoolbararealayout.cpp6
-rw-r--r--src/widgets/widgets/qwidgettextcontrol.cpp6
-rw-r--r--src/winmain/qtmain_winrt.cpp76
-rw-r--r--src/winmain/winmain.pro3
-rw-r--r--src/xml/sax/qxml.cpp10
-rw-r--r--tests/auto/corelib/codecs/qtextcodec/echo/main.cpp3
-rw-r--r--tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp76
-rw-r--r--tests/auto/corelib/global/qlogging/tst_qlogging.cpp4
-rw-r--r--tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp93
-rw-r--r--tests/auto/corelib/io/io.pro7
-rw-r--r--tests/auto/corelib/io/qdebug/tst_qdebug.cpp18
-rw-r--r--tests/auto/corelib/io/qfile/test/test.pro7
-rw-r--r--tests/auto/corelib/io/qfile/tst_qfile.cpp24
-rw-r--r--tests/auto/corelib/io/qfileinfo/qfileinfo.pro2
-rw-r--r--tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp16
-rw-r--r--tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp6
-rw-r--r--tests/auto/corelib/io/qnodebug/tst_qnodebug.cpp6
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEOF/testProcessEOF.pro2
-rw-r--r--tests/auto/corelib/io/qsettings/tst_qsettings.cpp8
-rw-r--r--tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp6
-rw-r--r--tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp4
-rw-r--r--tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp4
-rw-r--r--tests/auto/corelib/io/qwinoverlappedionotifier/tst_qwinoverlappedionotifier.cpp1
-rw-r--r--tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp4
-rw-r--r--tests/auto/corelib/json/tst_qtjson.cpp55
-rw-r--r--tests/auto/corelib/kernel/kernel.pro3
-rw-r--r--tests/auto/corelib/kernel/qeventloop/qeventloop.pro2
-rw-r--r--tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp4
-rw-r--r--tests/auto/corelib/kernel/qmetatype/qmetatype.pro4
-rw-r--r--tests/auto/corelib/kernel/qobject/tst_qobject.cpp44
-rw-r--r--tests/auto/corelib/kernel/qsignalblocker/.gitignore1
-rw-r--r--tests/auto/corelib/kernel/qsignalblocker/qsignalblocker.pro7
-rw-r--r--tests/auto/corelib/kernel/qsignalblocker/tst_qsignalblocker.cpp305
-rw-r--r--tests/auto/corelib/thread/qthread/tst_qthread.cpp36
-rw-r--r--tests/auto/corelib/thread/qthreadpool/tst_qthreadpool.cpp28
-rw-r--r--tests/auto/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp2
-rw-r--r--tests/auto/corelib/tools/qchar/data/NormalizationTest.txt6
-rw-r--r--tests/auto/corelib/tools/qchar/tst_qchar.cpp20
-rw-r--r--tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp4
-rw-r--r--tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp5
-rw-r--r--tests/auto/corelib/tools/qlocale/tst_qlocale.cpp30
-rw-r--r--tests/auto/corelib/tools/qstring/tst_qstring.cpp10
-rw-r--r--tests/auto/corelib/tools/qtextboundaryfinder/data/GraphemeBreakTest.txt6
-rw-r--r--tests/auto/corelib/tools/qtextboundaryfinder/data/LineBreakTest.txt18
-rw-r--r--tests/auto/corelib/tools/qtextboundaryfinder/data/SentenceBreakTest.txt6
-rw-r--r--tests/auto/corelib/tools/qtextboundaryfinder/data/WordBreakTest.txt978
-rw-r--r--tests/auto/corelib/tools/qtimezone/tst_qtimezone.cpp2
-rw-r--r--tests/auto/corelib/tools/qvarlengtharray/tst_qvarlengtharray.cpp65
-rw-r--r--tests/auto/gui/image/qimage/qimage.pro1
-rw-r--r--tests/auto/gui/image/qimage/tst_qimage.cpp269
-rw-r--r--tests/auto/gui/image/qpixmap/qpixmap.pro2
-rw-r--r--tests/auto/gui/image/qpixmap/tst_qpixmap.cpp6
-rw-r--r--tests/auto/gui/itemmodels/qstandarditemmodel/tst_qstandarditemmodel.cpp2
-rw-r--r--tests/auto/gui/kernel/qguivariant/test/black.pngbin0 -> 697 bytes
-rw-r--r--tests/auto/gui/kernel/qguivariant/test/black2.pngbin0 -> 697 bytes
-rw-r--r--tests/auto/gui/kernel/qguivariant/test/test.pro1
-rw-r--r--tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp29
-rw-r--r--tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.qrc6
-rw-r--r--tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp30
-rw-r--r--tests/auto/gui/kernel/qmouseevent/tst_qmouseevent.cpp24
-rw-r--r--tests/auto/gui/kernel/qmouseevent_modal/tst_qmouseevent_modal.cpp8
-rw-r--r--tests/auto/gui/kernel/qwindow/tst_qwindow.cpp63
-rw-r--r--tests/auto/gui/painting/qpainter/tst_qpainter.cpp52
-rw-r--r--tests/auto/gui/painting/qpainter/utils/createImages/main.cpp100
-rw-r--r--tests/auto/gui/painting/qpen/tst_qpen.cpp24
-rw-r--r--tests/auto/gui/painting/qpolygon/tst_qpolygon.cpp10
-rw-r--r--tests/auto/gui/painting/qregion/tst_qregion.cpp186
-rw-r--r--tests/auto/gui/painting/qwmatrix/tst_qwmatrix.cpp218
-rw-r--r--tests/auto/gui/qopengl/tst_qopengl.cpp50
-rw-r--r--tests/auto/gui/text/qfont/tst_qfont.cpp158
-rw-r--r--tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp10
-rw-r--r--tests/auto/gui/text/qfontmetrics/tst_qfontmetrics.cpp2
-rw-r--r--tests/auto/gui/text/qtextdocument/common.h10
-rw-r--r--tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp50
-rw-r--r--tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp198
-rw-r--r--tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp110
-rw-r--r--tests/auto/gui/text/qtextlist/tst_qtextlist.cpp2
-rw-r--r--tests/auto/gui/text/qtextpiecetable/tst_qtextpiecetable.cpp180
-rw-r--r--tests/auto/network/access/qftp/tst_qftp.cpp17
-rw-r--r--tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp11
-rw-r--r--tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp42
-rw-r--r--tests/auto/network/bearer/qnetworksession/test/tst_qnetworksession.cpp12
-rw-r--r--tests/auto/network/kernel/kernel.pro4
-rw-r--r--tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp6
-rw-r--r--tests/auto/network/kernel/qhostinfo/qhostinfo.pro2
-rw-r--r--tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp2
-rw-r--r--tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp14
-rw-r--r--tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp2
-rw-r--r--tests/auto/network/socket/qtcpserver/crashingServer/crashingServer.pro2
-rw-r--r--tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp38
-rw-r--r--tests/auto/network/socket/qtcpsocket/stressTest/Test.h2
-rw-r--r--tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp77
-rw-r--r--tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp16
-rw-r--r--tests/auto/network/socket/socket.pro4
-rw-r--r--tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp10
-rw-r--r--tests/auto/network/ssl/ssl.pro4
-rw-r--r--tests/auto/other/atwrapper/atWrapperAutotest.cpp2
-rw-r--r--tests/auto/other/collections/tst_collections.cpp1628
-rw-r--r--tests/auto/other/d3dcompiler/d3dcompiler.pro5
-rw-r--r--tests/auto/other/d3dcompiler/tst_d3dcompiler.cpp372
-rw-r--r--tests/auto/other/languagechange/tst_languagechange.cpp8
-rw-r--r--tests/auto/other/other.pro3
-rw-r--r--tests/auto/other/qaccessibility/qaccessibility.pro5
-rw-r--r--tests/auto/other/qaccessibility/tst_qaccessibility.cpp4
-rw-r--r--tests/auto/other/qcomplextext/tst_qcomplextext.cpp58
-rw-r--r--tests/auto/other/qfocusevent/tst_qfocusevent.cpp4
-rw-r--r--tests/auto/other/qvariant_common/tst_qvariant_common.h2
-rw-r--r--tests/auto/printsupport/dialogs/dialogs.pro3
-rw-r--r--tests/auto/printsupport/dialogs/qabstractprintdialog/.gitignore (renamed from tests/auto/widgets/dialogs/qabstractprintdialog/.gitignore)0
-rw-r--r--tests/auto/printsupport/dialogs/qabstractprintdialog/qabstractprintdialog.pro (renamed from tests/auto/widgets/dialogs/qabstractprintdialog/qabstractprintdialog.pro)0
-rw-r--r--tests/auto/printsupport/dialogs/qabstractprintdialog/tst_qabstractprintdialog.cpp (renamed from tests/auto/widgets/dialogs/qabstractprintdialog/tst_qabstractprintdialog.cpp)0
-rw-r--r--tests/auto/printsupport/printsupport.pro1
-rw-r--r--tests/auto/shared/platformclipboard.h4
-rw-r--r--tests/auto/sql/kernel/qsql/qsql.pro2
-rw-r--r--tests/auto/sql/kernel/qsqldatabase/tst_databases.h15
-rw-r--r--tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp224
-rw-r--r--tests/auto/sql/kernel/qsqldriver/qsqldriver.pro2
-rw-r--r--tests/auto/sql/kernel/qsqlerror/tst_qsqlerror.cpp18
-rw-r--r--tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp10
-rw-r--r--tests/auto/sql/kernel/qsqlrecord/tst_qsqlrecord.cpp98
-rw-r--r--tests/auto/sql/kernel/qsqlresult/qsqlresult.pro2
-rw-r--r--tests/auto/sql/models/qsqlquerymodel/tst_qsqlquerymodel.cpp16
-rw-r--r--tests/auto/sql/models/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro2
-rw-r--r--tests/auto/testlib/selftests/crashes/tst_crashes.cpp2
-rw-r--r--tests/auto/testlib/selftests/expected_assert.lightxml4
-rw-r--r--tests/auto/testlib/selftests/expected_assert.xml4
-rw-r--r--tests/auto/testlib/selftests/expected_badxml.lightxml14
-rw-r--r--tests/auto/testlib/selftests/expected_badxml.txt8
-rw-r--r--tests/auto/testlib/selftests/expected_badxml.xml14
-rw-r--r--tests/auto/testlib/selftests/expected_benchlibcounting.lightxml10
-rw-r--r--tests/auto/testlib/selftests/expected_benchlibcounting.txt4
-rw-r--r--tests/auto/testlib/selftests/expected_benchlibcounting.xml10
-rw-r--r--tests/auto/testlib/selftests/expected_benchlibeventcounter.lightxml4
-rw-r--r--tests/auto/testlib/selftests/expected_benchlibeventcounter.xml4
-rw-r--r--tests/auto/testlib/selftests/expected_benchlibtickcounter.lightxml9
-rw-r--r--tests/auto/testlib/selftests/expected_benchlibtickcounter.txt4
-rw-r--r--tests/auto/testlib/selftests/expected_benchlibtickcounter.xml6
-rw-r--r--tests/auto/testlib/selftests/expected_benchlibwalltime.lightxml23
-rw-r--r--tests/auto/testlib/selftests/expected_benchlibwalltime.txt12
-rw-r--r--tests/auto/testlib/selftests/expected_benchlibwalltime.xml12
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.lightxml51
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.txt40
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.xml51
-rw-r--r--tests/auto/testlib/selftests/expected_commandlinedata.lightxml17
-rw-r--r--tests/auto/testlib/selftests/expected_commandlinedata.txt12
-rw-r--r--tests/auto/testlib/selftests/expected_commandlinedata.xml17
-rw-r--r--tests/auto/testlib/selftests/expected_counting.lightxml52
-rw-r--r--tests/auto/testlib/selftests/expected_counting.txt36
-rw-r--r--tests/auto/testlib/selftests/expected_counting.xml52
-rw-r--r--tests/auto/testlib/selftests/expected_counting.xunitxml8
-rw-r--r--tests/auto/testlib/selftests/expected_datatable.lightxml37
-rw-r--r--tests/auto/testlib/selftests/expected_datatable.txt26
-rw-r--r--tests/auto/testlib/selftests/expected_datatable.xml37
-rw-r--r--tests/auto/testlib/selftests/expected_datetime.lightxml11
-rw-r--r--tests/auto/testlib/selftests/expected_datetime.txt6
-rw-r--r--tests/auto/testlib/selftests/expected_datetime.xml11
-rw-r--r--tests/auto/testlib/selftests/expected_exceptionthrow.lightxml5
-rw-r--r--tests/auto/testlib/selftests/expected_exceptionthrow.txt2
-rw-r--r--tests/auto/testlib/selftests/expected_exceptionthrow.xml5
-rw-r--r--tests/auto/testlib/selftests/expected_expectfail.lightxml43
-rw-r--r--tests/auto/testlib/selftests/expected_expectfail.txt28
-rw-r--r--tests/auto/testlib/selftests/expected_expectfail.xml43
-rw-r--r--tests/auto/testlib/selftests/expected_failcleanup.lightxml6
-rw-r--r--tests/auto/testlib/selftests/expected_failcleanup.txt2
-rw-r--r--tests/auto/testlib/selftests/expected_failcleanup.xml6
-rw-r--r--tests/auto/testlib/selftests/expected_failinit.lightxml5
-rw-r--r--tests/auto/testlib/selftests/expected_failinit.txt2
-rw-r--r--tests/auto/testlib/selftests/expected_failinit.xml5
-rw-r--r--tests/auto/testlib/selftests/expected_failinitdata.lightxml4
-rw-r--r--tests/auto/testlib/selftests/expected_failinitdata.txt2
-rw-r--r--tests/auto/testlib/selftests/expected_failinitdata.xml4
-rw-r--r--tests/auto/testlib/selftests/expected_fetchbogus.lightxml3
-rw-r--r--tests/auto/testlib/selftests/expected_fetchbogus.xml3
-rw-r--r--tests/auto/testlib/selftests/expected_findtestdata.lightxml6
-rw-r--r--tests/auto/testlib/selftests/expected_findtestdata.txt2
-rw-r--r--tests/auto/testlib/selftests/expected_findtestdata.xml6
-rw-r--r--tests/auto/testlib/selftests/expected_float.txt12
-rw-r--r--tests/auto/testlib/selftests/expected_globaldata.lightxml81
-rw-r--r--tests/auto/testlib/selftests/expected_globaldata.txt74
-rw-r--r--tests/auto/testlib/selftests/expected_globaldata.xml81
-rw-r--r--tests/auto/testlib/selftests/expected_globaldata.xunitxml132
-rw-r--r--tests/auto/testlib/selftests/expected_longstring.lightxml6
-rw-r--r--tests/auto/testlib/selftests/expected_longstring.txt2
-rw-r--r--tests/auto/testlib/selftests/expected_longstring.xml6
-rw-r--r--tests/auto/testlib/selftests/expected_maxwarnings.lightxml4
-rw-r--r--tests/auto/testlib/selftests/expected_maxwarnings.xml4
-rw-r--r--tests/auto/testlib/selftests/expected_silent.txt4
-rw-r--r--tests/auto/testlib/selftests/expected_singleskip.lightxml6
-rw-r--r--tests/auto/testlib/selftests/expected_singleskip.txt2
-rw-r--r--tests/auto/testlib/selftests/expected_singleskip.xml6
-rw-r--r--tests/auto/testlib/selftests/expected_skip.lightxml12
-rw-r--r--tests/auto/testlib/selftests/expected_skip.txt6
-rw-r--r--tests/auto/testlib/selftests/expected_skip.xml12
-rw-r--r--tests/auto/testlib/selftests/expected_skipcleanup.lightxml6
-rw-r--r--tests/auto/testlib/selftests/expected_skipcleanup.txt2
-rw-r--r--tests/auto/testlib/selftests/expected_skipcleanup.xml6
-rw-r--r--tests/auto/testlib/selftests/expected_skipinit.lightxml5
-rw-r--r--tests/auto/testlib/selftests/expected_skipinit.txt2
-rw-r--r--tests/auto/testlib/selftests/expected_skipinit.xml5
-rw-r--r--tests/auto/testlib/selftests/expected_skipinitdata.lightxml4
-rw-r--r--tests/auto/testlib/selftests/expected_skipinitdata.txt2
-rw-r--r--tests/auto/testlib/selftests/expected_skipinitdata.xml4
-rw-r--r--tests/auto/testlib/selftests/expected_strcmp.lightxml25
-rw-r--r--tests/auto/testlib/selftests/expected_strcmp.txt16
-rw-r--r--tests/auto/testlib/selftests/expected_strcmp.xml25
-rw-r--r--tests/auto/testlib/selftests/expected_subtest.lightxml72
-rw-r--r--tests/auto/testlib/selftests/expected_subtest.txt66
-rw-r--r--tests/auto/testlib/selftests/expected_subtest.xml72
-rw-r--r--tests/auto/testlib/selftests/expected_subtest.xunitxml124
-rw-r--r--tests/auto/testlib/selftests/expected_verbose1.lightxml52
-rw-r--r--tests/auto/testlib/selftests/expected_verbose1.txt36
-rw-r--r--tests/auto/testlib/selftests/expected_verbose1.xml52
-rw-r--r--tests/auto/testlib/selftests/expected_verbose1.xunitxml8
-rw-r--r--tests/auto/testlib/selftests/expected_verbose2.lightxml88
-rw-r--r--tests/auto/testlib/selftests/expected_verbose2.txt72
-rw-r--r--tests/auto/testlib/selftests/expected_verbose2.xml88
-rw-r--r--tests/auto/testlib/selftests/expected_verbose2.xunitxml8
-rw-r--r--tests/auto/testlib/selftests/expected_verifyexceptionthrown.lightxml61
-rw-r--r--tests/auto/testlib/selftests/expected_verifyexceptionthrown.txt21
-rw-r--r--tests/auto/testlib/selftests/expected_verifyexceptionthrown.xml64
-rw-r--r--tests/auto/testlib/selftests/expected_verifyexceptionthrown.xunitxml31
-rw-r--r--tests/auto/testlib/selftests/expected_warnings.lightxml21
-rw-r--r--tests/auto/testlib/selftests/expected_warnings.txt6
-rw-r--r--tests/auto/testlib/selftests/expected_warnings.xml21
-rw-r--r--tests/auto/testlib/selftests/expected_warnings.xunitxml11
-rw-r--r--tests/auto/testlib/selftests/expected_xunit.lightxml24
-rw-r--r--tests/auto/testlib/selftests/expected_xunit.txt14
-rw-r--r--tests/auto/testlib/selftests/expected_xunit.xml24
-rwxr-xr-xtests/auto/testlib/selftests/generate_expected_output.py124
-rw-r--r--tests/auto/testlib/selftests/selftests.pri1
-rw-r--r--tests/auto/testlib/selftests/selftests.qrc4
-rw-r--r--tests/auto/testlib/selftests/tst_selftests.cpp26
-rw-r--r--tests/auto/testlib/selftests/verifyexceptionthrown/tst_verifyexceptionthrown.cpp162
-rw-r--r--tests/auto/testlib/selftests/verifyexceptionthrown/verifyexceptionthrown.pro8
-rw-r--r--tests/auto/testlib/selftests/warnings/tst_warnings.cpp21
-rw-r--r--tests/auto/tools/moc/moc.pro5
-rw-r--r--tests/auto/tools/moc/qtbug-35657-gadget.h51
-rw-r--r--tests/auto/tools/moc/related-metaobjects-in-gadget.h54
-rw-r--r--tests/auto/tools/moc/related-metaobjects-in-namespaces.h60
-rw-r--r--tests/auto/tools/moc/tst_moc.cpp73
-rw-r--r--tests/auto/tools/uic/baseline/translation/Dialog_without_Buttons_tr.h50
-rw-r--r--tests/auto/tools/uic/tst_uic.cpp52
-rw-r--r--tests/auto/widgets/dialogs/dialogs.pro5
-rw-r--r--tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp2
-rw-r--r--tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp4
-rw-r--r--tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp17
-rw-r--r--tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp10
-rw-r--r--tests/auto/widgets/dialogs/qinputdialog/tst_qinputdialog.cpp4
-rw-r--r--tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp47
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp2
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsitem/qgraphicsitem.pro2
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp2
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp96
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp36
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsscene/qgraphicsscene.pro2
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp2
-rw-r--r--tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp8
-rw-r--r--tests/auto/widgets/itemviews/qitemdelegate/qitemdelegate.pro2
-rw-r--r--tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp2
-rw-r--r--tests/auto/widgets/itemviews/qlistview/qlistview.pro2
-rw-r--r--tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp4
-rw-r--r--tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp28
-rw-r--r--tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp22
-rw-r--r--tests/auto/widgets/itemviews/qtreewidget/tst_qtreewidget.cpp30
-rw-r--r--tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp114
-rw-r--r--tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp2
-rw-r--r--tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp4
-rw-r--r--tests/auto/widgets/kernel/qshortcut/tst_qshortcut.cpp318
-rw-r--r--tests/auto/widgets/kernel/qwidget/qwidget.pro2
-rw-r--r--tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp66
-rw-r--r--tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp2
-rw-r--r--tests/auto/widgets/widgets/qcalendarwidget/tst_qcalendarwidget.cpp2
-rw-r--r--tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp30
-rw-r--r--tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp2
-rw-r--r--tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp18
-rw-r--r--tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp48
-rw-r--r--tests/auto/widgets/widgets/qlabel/tst_qlabel.cpp4
-rw-r--r--tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp217
-rw-r--r--tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp6
-rw-r--r--tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp56
-rw-r--r--tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp6
-rw-r--r--tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp49
-rw-r--r--tests/auto/widgets/widgets/qtabwidget/qtabwidget.pro2
-rw-r--r--tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp2
-rw-r--r--tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp15
-rw-r--r--tests/auto/widgets/widgets/qtoolbox/tst_qtoolbox.cpp6
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/parser/parser.cpp284
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/parser/parser.h16
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/tst_qxmlsimplereader.cpp82
-rw-r--r--tests/auto/xml/sax/qxmlsimplereader/xmldocs/not-wf/sa/170.xml.ref2
-rw-r--r--tests/baselineserver/shared/baselineprotocol.cpp6
-rw-r--r--tests/benchmarks/corelib/io/qdir/10000/bench_qdir_10000.cpp5
-rw-r--r--tests/benchmarks/corelib/io/qdiriterator/main.cpp5
-rw-r--r--tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp5
-rw-r--r--tests/benchmarks/corelib/io/qfile/main.cpp26
-rw-r--r--tests/benchmarks/corelib/io/qfileinfo/main.cpp4
-rw-r--r--tests/benchmarks/corelib/thread/qmutex/tst_qmutex.cpp4
-rw-r--r--tests/benchmarks/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp174
-rw-r--r--tests/benchmarks/corelib/thread/thread.pro1
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.cpp20
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.h6
-rw-r--r--tests/benchmarks/network/socket/qtcpserver/tst_qtcpserver.cpp8
-rw-r--r--tests/manual/bearerex/bearerex.cpp16
-rw-r--r--tests/manual/qpainfo/main.cpp3
-rw-r--r--tests/shared/filesystem.h2
-rw-r--r--tools/configure/Makefile.mingw1
-rw-r--r--tools/configure/Makefile.win323
-rw-r--r--tools/configure/configure.pro3
-rw-r--r--tools/configure/configureapp.cpp70
-rw-r--r--tools/configure/configureapp.h14
-rw-r--r--tools/configure/environment.cpp18
-rw-r--r--tools/configure/main.cpp12
-rw-r--r--tools/configure/tools.cpp4
-rwxr-xr-xutil/local_database/cldr2qlocalexml.py18
-rwxr-xr-xutil/local_database/cldr2qtimezone.py29
-rw-r--r--util/local_database/enumdata.py5
-rw-r--r--util/unicode/data/ArabicShaping.txt227
-rw-r--r--util/unicode/data/BidiMirroring.txt14
-rw-r--r--util/unicode/data/Blocks.txt4
-rw-r--r--util/unicode/data/CaseFolding.txt6
-rw-r--r--util/unicode/data/DerivedAge.txt20
-rw-r--r--util/unicode/data/DerivedNormalizationProps.txt22
-rw-r--r--util/unicode/data/GraphemeBreakProperty.txt21
-rw-r--r--util/unicode/data/LineBreak.txt30
-rw-r--r--util/unicode/data/NormalizationCorrections.txt6
-rw-r--r--util/unicode/data/Scripts.txt27
-rw-r--r--util/unicode/data/SentenceBreakProperty.txt24
-rw-r--r--util/unicode/data/SpecialCasing.txt8
-rw-r--r--util/unicode/data/UnicodeData.txt21
-rw-r--r--util/unicode/data/WordBreakProperty.txt61
-rw-r--r--util/unicode/main.cpp136
1211 files changed, 81411 insertions, 45819 deletions
diff --git a/config.tests/qpa/direct2d/direct2d.cpp b/config.tests/qpa/direct2d/direct2d.cpp
new file mode 100644
index 0000000000..66966ae385
--- /dev/null
+++ b/config.tests/qpa/direct2d/direct2d.cpp
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the config.tests 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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <d3d11_1.h>
+#include <d2d1_1.h>
+#include <d2d1_1helper.h>
+#include <dxgi1_2.h>
+#include <wrl.h>
+#include <dwrite.h>
+
+using Microsoft::WRL::ComPtr;
+
+int main(int, char**)
+{
+ ComPtr<ID2D1Factory1> d2dFactory;
+ D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, d2dFactory.ReleaseAndGetAddressOf());
+
+ return 0;
+}
diff --git a/config.tests/qpa/direct2d/direct2d.pro b/config.tests/qpa/direct2d/direct2d.pro
new file mode 100644
index 0000000000..ab62a1da5c
--- /dev/null
+++ b/config.tests/qpa/direct2d/direct2d.pro
@@ -0,0 +1,4 @@
+SOURCES = direct2d.cpp
+LIBS += -ld2d1 -ldwrite -ld3d11
+CONFIG -= qt
+CONFIG += console
diff --git a/config.tests/unix/iconv/iconv.pro b/config.tests/unix/iconv/iconv.pro
index 1ef6aa7207..65a67f16d3 100644
--- a/config.tests/unix/iconv/iconv.pro
+++ b/config.tests/unix/iconv/iconv.pro
@@ -1,3 +1,3 @@
SOURCES = iconv.cpp
CONFIG -= qt dylib
-mac|win32-g++*|qnx:LIBS += -liconv
+mac|mingw|qnx:LIBS += -liconv
diff --git a/config.tests/unix/neon/neon.pro b/config.tests/unix/neon/neon.pro
deleted file mode 100644
index efd608bd63..0000000000
--- a/config.tests/unix/neon/neon.pro
+++ /dev/null
@@ -1,4 +0,0 @@
-SOURCES = neon.cpp
-CONFIG -= x11 qt
-isEmpty(QMAKE_CFLAGS_NEON):error("This compiler does not support Neon")
-else:QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_NEON
diff --git a/config.tests/unix/odbc/odbc.pro b/config.tests/unix/odbc/odbc.pro
index 418a0e0d54..70f3b668da 100644
--- a/config.tests/unix/odbc/odbc.pro
+++ b/config.tests/unix/odbc/odbc.pro
@@ -1,4 +1,4 @@
SOURCES = odbc.cpp
CONFIG -= qt dylib
-win32-g++*:LIBS += -lodbc32
+mingw:LIBS += -lodbc32
else:LIBS += -lodbc
diff --git a/config.tests/unix/neon/neon.cpp b/config.tests/unix/qqnx_imf/qqnx_imf.cpp
index ccbb476367..b88593bf33 100644
--- a/config.tests/unix/neon/neon.cpp
+++ b/config.tests/unix/qqnx_imf/qqnx_imf.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 BlackBerry Limited. All rights reserved.
** Contact: http://www.qt-project.org/legal
**
** This file is part of the config.tests of the Qt Toolkit.
@@ -39,13 +39,10 @@
**
****************************************************************************/
-#include <arm_neon.h>
+#include "imf/imf_client.h"
-int main(int, char**)
+int main(int, char **)
{
- int32x4_t null = vdupq_n_s32(0x0);
-
- int result;
- vst1q_lane_s32(&result, null, 0);
- return result;
+ imf_client_init();
+ return 0;
}
diff --git a/config.tests/unix/qqnx_imf/qqnx_imf.pro b/config.tests/unix/qqnx_imf/qqnx_imf.pro
new file mode 100644
index 0000000000..c51adb65ad
--- /dev/null
+++ b/config.tests/unix/qqnx_imf/qqnx_imf.pro
@@ -0,0 +1,3 @@
+SOURCES = qqnx_imf.cpp
+CONFIG -= qt
+LIBS += -linput_client
diff --git a/config.tests/x11/opengl/opengl.pro b/config.tests/x11/opengl/opengl.pro
index 5c3a1c50cb..d6814f1bd5 100644
--- a/config.tests/x11/opengl/opengl.pro
+++ b/config.tests/x11/opengl/opengl.pro
@@ -7,5 +7,5 @@ for(p, QMAKE_LIBDIR_OPENGL) {
}
CONFIG -= qt
-win32-g++*:LIBS += -lopengl32
+mingw:LIBS += -lopengl32
else:LIBS += -lGL
diff --git a/configure b/configure
index 90c349cfc7..bd580a85c0 100755
--- a/configure
+++ b/configure
@@ -630,6 +630,7 @@ CFG_PKGCONFIG=auto
CFG_STACK_PROTECTOR_STRONG=auto
CFG_SLOG2=auto
CFG_PPS=auto
+CFG_QNX_IMF=auto
CFG_SYSTEM_PROXIES=no
# Target architecture
@@ -1551,13 +1552,6 @@ while [ "$#" -gt 0 ]; do
iwmmxt)
CFG_IWMMXT="yes"
;;
- neon)
- if [ "$VAL" = "no" ]; then
- CFG_NEON="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
mips_dsp)
if [ "$VAL" = "no" ]; then
CFG_MIPS_DSP="$VAL"
@@ -1780,6 +1774,13 @@ while [ "$#" -gt 0 ]; do
UNKNOWN_OPT=yes
fi
;;
+ imf)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ CFG_QNX_IMF="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
pps)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_PPS="$VAL"
@@ -2275,7 +2276,6 @@ Configure options:
-no-sse4.2 ......... Do not compile with use of SSE4.2 instructions.
-no-avx ............ Do not compile with use of AVX instructions.
-no-avx2 ........... Do not compile with use of AVX2 instructions.
- -no-neon ........... Do not compile with use of NEON instructions.
-no-mips_dsp ....... Do not compile with use of MIPS DSP instructions.
-no-mips_dspr2 ..... Do not compile with use of MIPS DSP rev2 instructions.
@@ -2484,6 +2484,9 @@ QNX/Blackberry options:
-no-pps ............ Do not compile with pps support.
-pps ............... Compile with pps support.
+ -no-imf ............ Do not compile with imf support.
+ -imf ............... Compile with imf support.
+
MacOS/iOS options:
-Fstring ........... Add an explicit framework path.
@@ -3346,7 +3349,6 @@ if [ "$XPLATFORM_IOS" = "yes" ]; then
CFG_PKGCONFIG="no"
CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS examples tests"
CFG_SHARED="no" # iOS builds should be static to be able to submit to the App Store
- CFG_CXX11="no" # C++11 support disabled for now
CFG_SKIP_MODULES="$CFG_SKIP_MODULES qtconnectivity qtdoc qtlocation qtmacextras qtserialport qttools qtwebkit qtwebkit-examples"
# If the user passes -sdk on the command line we build a SDK-specific Qt build.
@@ -4328,17 +4330,6 @@ if [ "$CFG_IWMMXT" = "yes" ]; then
fi
fi
-# detect neon support
-if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then
- if compileTest unix/neon "neon"; then
- CFG_NEON=yes
- else
- CFG_NEON=no
- fi
-elif [ "$CFG_ARCH" != "arm" ]; then
- CFG_NEON=no
-fi
-
# detect mips_dsp support
if [ "$CFG_ARCH" = "mips" ] && [ "${CFG_MIPS_DSP}" = "auto" ]; then
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mips_dsp "mips_dsp" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
@@ -4388,7 +4379,14 @@ if [ "$XPLATFORM_QNX" = "yes" ]; then
CFG_SLOG2=no
fi
fi
-
+ if [ "$CFG_QNX_IMF" != "no" ]; then
+ if compileTest unix/qqnx_imf "qqnx_imf"; then
+ CFG_QNX_IMF=yes
+ QMAKE_CONFIG="$QMAKE_CONFIG qqnx_imf"
+ else
+ CFG_QNX_IMF=no
+ fi
+ fi
if [ "$CFG_PPS" != "no" ]; then
if compileTest unix/pps "pps"; then
CFG_PPS=yes
@@ -5782,7 +5780,6 @@ fi
[ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
[ "$CFG_AVX2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx2"
[ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
-[ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
if [ "$CFG_ARCH" = "mips" ]; then
[ "$CFG_MIPS_DSP" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mips_dsp"
[ "$CFG_MIPS_DSPR2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mips_dspr2"
@@ -6216,7 +6213,7 @@ fi
echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
echo "// Compiler sub-arch support" >>"$outpath/src/corelib/global/qconfig.h.new"
for SUBARCH in SSE2 SSE3 SSSE3 SSE4_1 SSE4_2 AVX AVX2 \
- IWMMXT NEON \
+ IWMMXT \
MIPS_DSP MIPS_DSPR2; do
eval "VAL=\$CFG_$SUBARCH"
case "$VAL" in
@@ -6762,6 +6759,7 @@ fi
report_support " Session management ....." "$CFG_SM"
if [ "$XPLATFORM_QNX" = "yes" ]; then
report_support " SLOG2 .................." "$CFG_SLOG2"
+ report_support " IMF ...................." "$CFG_QNX_IMF"
report_support " PPS ...................." "$CFG_PPS"
fi
report_support " SQL drivers:"
diff --git a/dist/changes-5.3.0 b/dist/changes-5.3.0
new file mode 100644
index 0000000000..35fc9cabb0
--- /dev/null
+++ b/dist/changes-5.3.0
@@ -0,0 +1,36 @@
+Qt 5.3 introduces many new features and improvements as well as bugfixes
+over the 5.2.x series. For more details, refer to the online documentation
+included in this distribution. The documentation is also available online:
+
+ http://qt-project.org/doc/qt-5.3
+
+The Qt version 5.3 series is binary compatible with the 5.2.x series.
+Applications compiled for 5.2 will continue to run with 5.3.
+
+Some of the changes listed in this file include issue tracking numbers
+corresponding to tasks in the Qt Bug Tracker:
+
+ http://bugreports.qt-project.org/
+
+Each of these identifiers can be entered in the bug tracker to obtain more
+information about a particular change.
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+QtWidgets
+---------
+
+QtCore
+------
+
+ - Added QSignalBlocker, a RAII-style wrapper around
+ QObject::blockSignals().
+
+QtGui
+-----
+
+ - Added setSwapInterval() to QSurfaceFormat. Platforms that support
+ setting the swap interval are now defaulting to the value of 1,
+ meaning vsync is enabled.
diff --git a/examples/embedded/styleexample/stylewidget.cpp b/examples/embedded/styleexample/stylewidget.cpp
index 411df77293..c45949e0f0 100644
--- a/examples/embedded/styleexample/stylewidget.cpp
+++ b/examples/embedded/styleexample/stylewidget.cpp
@@ -49,7 +49,7 @@
StyleWidget::StyleWidget(QWidget *parent)
: QFrame(parent)
{
- m_ui.setupUi(this);
+ m_ui.setupUi(this);
}
diff --git a/examples/ipc/sharedmemory/dialog.cpp b/examples/ipc/sharedmemory/dialog.cpp
index 2be62b1b47..c504f3a202 100644
--- a/examples/ipc/sharedmemory/dialog.cpp
+++ b/examples/ipc/sharedmemory/dialog.cpp
@@ -73,8 +73,8 @@ Dialog::Dialog(QWidget *parent)
ui.setupUi(this);
connect(ui.loadFromFileButton, SIGNAL(clicked()), SLOT(loadFromFile()));
connect(ui.loadFromSharedMemoryButton,
- SIGNAL(clicked()),
- SLOT(loadFromMemory()));
+ SIGNAL(clicked()),
+ SLOT(loadFromMemory()));
setWindowTitle(tr("SharedMemory Example"));
}
//! [0]
@@ -155,7 +155,7 @@ void Dialog::loadFromMemory()
{
if (!sharedMemory.attach()) {
ui.label->setText(tr("Unable to attach to shared memory segment.\n" \
- "Load an image first."));
+ "Load an image first."));
return;
}
diff --git a/examples/network/bearermonitor/bearermonitor.cpp b/examples/network/bearermonitor/bearermonitor.cpp
index 58421e52b1..4590a91f4f 100644
--- a/examples/network/bearermonitor/bearermonitor.cpp
+++ b/examples/network/bearermonitor/bearermonitor.cpp
@@ -84,10 +84,10 @@ BearerMonitor::BearerMonitor(QWidget *parent)
this, SLOT(configurationChanged(const QNetworkConfiguration)));
connect(&manager, SIGNAL(updateCompleted()), this, SLOT(updateConfigurations()));
-#if defined(Q_OS_WIN)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
connect(registerButton, SIGNAL(clicked()), this, SLOT(registerNetwork()));
connect(unregisterButton, SIGNAL(clicked()), this, SLOT(unregisterNetwork()));
-#else
+#else // Q_OS_WIN && !Q_OS_WINRT
nlaGroup->hide();
#endif
@@ -257,7 +257,7 @@ void BearerMonitor::onlineStateChanged(bool isOnline)
onlineState->setText(tr("Offline"));
}
-#if defined(Q_OS_WIN)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
void BearerMonitor::registerNetwork()
{
QTreeWidgetItem *item = treeWidget->currentItem();
@@ -301,7 +301,7 @@ void BearerMonitor::unregisterNetwork()
if (WSASetService(&networkInfo, RNRSERVICE_DELETE, 0) == SOCKET_ERROR)
qDebug() << "WSASetService(RNRSERVICE_DELETE) returned" << WSAGetLastError();
}
-#endif
+#endif // Q_OS_WIN && !Q_OS_WINRT
void BearerMonitor::showConfigurationFor(QTreeWidgetItem *item)
{
diff --git a/examples/network/bearermonitor/bearermonitor.h b/examples/network/bearermonitor/bearermonitor.h
index aaa2c18424..307262c2b4 100644
--- a/examples/network/bearermonitor/bearermonitor.h
+++ b/examples/network/bearermonitor/bearermonitor.h
@@ -66,10 +66,10 @@ private slots:
void onlineStateChanged(bool isOnline);
-#if defined(Q_OS_WIN)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
void registerNetwork();
void unregisterNetwork();
-#endif
+#endif // Q_OS_WIN && !Q_OS_WINRT
void showConfigurationFor(QTreeWidgetItem *item);
diff --git a/examples/network/dnslookup/dnslookup.cpp b/examples/network/dnslookup/dnslookup.cpp
index 77e8abc927..202a5f9580 100644
--- a/examples/network/dnslookup/dnslookup.cpp
+++ b/examples/network/dnslookup/dnslookup.cpp
@@ -50,7 +50,7 @@
static void usage() {
printf("Qt DNS example - performs DNS lookups\n"
- "Usage: dnslookup [-t <type>] name\n\n");
+ "Usage: dnslookup [-t <type>] [-s nameserver] name\n\n");
}
DnsManager::DnsManager()
@@ -93,6 +93,17 @@ void DnsManager::execute()
return;
}
}
+ if (args.size() > 1 && args.first() == "-s") {
+ args.takeFirst();
+ const QString ns = args.takeFirst();
+ QHostAddress nameserver(ns);
+ if (nameserver.isNull() || nameserver.protocol() == QAbstractSocket::UnknownNetworkLayerProtocol) {
+ printf("Bad nameserver address: %s\n", qPrintable(ns));
+ QCoreApplication::instance()->quit();
+ return;
+ }
+ dns->setNameserver(nameserver);
+ }
if (args.isEmpty()) {
usage();
QCoreApplication::instance()->quit();
diff --git a/examples/network/loopback/dialog.cpp b/examples/network/loopback/dialog.cpp
index a378ccabaa..da5dbce854 100644
--- a/examples/network/loopback/dialog.cpp
+++ b/examples/network/loopback/dialog.cpp
@@ -99,9 +99,9 @@ void Dialog::start()
QMessageBox::StandardButton ret = QMessageBox::critical(this,
tr("Loopback"),
tr("Unable to start the test: %1.")
- .arg(tcpServer.errorString()),
+ .arg(tcpServer.errorString()),
QMessageBox::Retry
- | QMessageBox::Cancel);
+ | QMessageBox::Cancel);
if (ret == QMessageBox::Cancel)
return;
}
diff --git a/examples/network/network.pro b/examples/network/network.pro
index be4ccdbddf..8ed72315e2 100644
--- a/examples/network/network.pro
+++ b/examples/network/network.pro
@@ -23,7 +23,7 @@ qtHaveModule(widgets) {
multicastsender
# no QProcess
- !vxworks:!qnx:SUBDIRS += network-chat
+ !vxworks:!qnx:!winrt:SUBDIRS += network-chat
contains(QT_CONFIG, openssl):SUBDIRS += securesocketclient
contains(QT_CONFIG, openssl-linked):SUBDIRS += securesocketclient
diff --git a/examples/network/securesocketclient/main.cpp b/examples/network/securesocketclient/main.cpp
index de89fafa32..46beaf0d4f 100644
--- a/examples/network/securesocketclient/main.cpp
+++ b/examples/network/securesocketclient/main.cpp
@@ -50,8 +50,8 @@ int main(int argc, char **argv)
QApplication app(argc, argv);
if (!QSslSocket::supportsSsl()) {
- QMessageBox::information(0, "Secure Socket Client",
- "This system does not support OpenSSL.");
+ QMessageBox::information(0, "Secure Socket Client",
+ "This system does not support OpenSSL.");
return -1;
}
diff --git a/examples/network/torrent/peerwireclient.cpp b/examples/network/torrent/peerwireclient.cpp
index a0be01d363..2b5fe3ada1 100644
--- a/examples/network/torrent/peerwireclient.cpp
+++ b/examples/network/torrent/peerwireclient.cpp
@@ -215,7 +215,7 @@ void PeerWireClient::sendPieceList(const QBitArray &bitField)
// Don't send the bitfield if it's all zeros.
if (bitField.count(true) == 0)
- return;
+ return;
int bitFieldSize = bitField.size();
int size = (bitFieldSize + 7) / 8;
diff --git a/examples/network/torrent/torrentserver.cpp b/examples/network/torrent/torrentserver.cpp
index 2196863ca0..0a9d836098 100644
--- a/examples/network/torrent/torrentserver.cpp
+++ b/examples/network/torrent/torrentserver.cpp
@@ -64,7 +64,7 @@ void TorrentServer::removeClient(TorrentClient *client)
void TorrentServer::incomingConnection(qintptr socketDescriptor)
{
PeerWireClient *client =
- new PeerWireClient(ConnectionManager::instance()->clientId(), this);
+ new PeerWireClient(ConnectionManager::instance()->clientId(), this);
if (client->setSocketDescriptor(socketDescriptor)) {
if (ConnectionManager::instance()->canAddConnection() && !clients.isEmpty()) {
diff --git a/examples/opengl/framebufferobject2/glwidget.cpp b/examples/opengl/framebufferobject2/glwidget.cpp
index 27dc603f3c..32b9799a4a 100644
--- a/examples/opengl/framebufferobject2/glwidget.cpp
+++ b/examples/opengl/framebufferobject2/glwidget.cpp
@@ -112,20 +112,20 @@ void GLWidget::initializeGL()
{
glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
- // draw cube background
+ // draw cube background
glPushMatrix();
glLoadIdentity();
glTranslatef(0.5f, 0.5f, -2.0f);
- glDisable(GL_TEXTURE_2D);
- glEnableClientState(GL_COLOR_ARRAY);
- glVertexPointer(2, GL_INT, 0, faceArray);
- glDrawArrays(GL_QUADS, 0, 4);
- glVertexPointer(3, GL_INT, 0, cubeArray);
- glDisableClientState(GL_COLOR_ARRAY);
- glEnable(GL_TEXTURE_2D);
+ glDisable(GL_TEXTURE_2D);
+ glEnableClientState(GL_COLOR_ARRAY);
+ glVertexPointer(2, GL_INT, 0, faceArray);
+ glDrawArrays(GL_QUADS, 0, 4);
+ glVertexPointer(3, GL_INT, 0, cubeArray);
+ glDisableClientState(GL_COLOR_ARRAY);
+ glEnable(GL_TEXTURE_2D);
glPopMatrix();
- // draw cube
+ // draw cube
glTranslatef(0.5f, 0.5f, 0.5f);
glRotatef(3.0f, 1.0f, 1.0f, 1.0f);
glTranslatef(-0.5f, -0.5f, -0.5f);
@@ -205,12 +205,12 @@ void GLWidget::paintGL()
glTranslatef(-1.2f, -0.8f, 0.0f);
glScalef(0.2f, 0.2f, 0.2f);
for (int y = 0; y < 5; ++y) {
- for (int x = 0; x < 5; ++x) {
- glTranslatef(2.0f, 0, 0);
- glColor4f(0.8f, 0.8f, 0.8f, 1.0f);
- glDrawArrays(GL_QUADS, 0, 4);
- }
- glTranslatef(-10.0f, 2.0f, 0);
+ for (int x = 0; x < 5; ++x) {
+ glTranslatef(2.0f, 0, 0);
+ glColor4f(0.8f, 0.8f, 0.8f, 1.0f);
+ glDrawArrays(GL_QUADS, 0, 4);
+ }
+ glTranslatef(-10.0f, 2.0f, 0);
}
glVertexPointer(3, GL_INT, 0, cubeArray);
diff --git a/examples/opengl/framebufferobject2/main.cpp b/examples/opengl/framebufferobject2/main.cpp
index ab7359bef3..4c9aa9840f 100644
--- a/examples/opengl/framebufferobject2/main.cpp
+++ b/examples/opengl/framebufferobject2/main.cpp
@@ -48,8 +48,8 @@ int main(int argc, char **argv)
QApplication a(argc, argv);
if (!QGLFormat::hasOpenGL() || !QGLFramebufferObject::hasOpenGLFramebufferObjects()) {
- QMessageBox::information(0, "OpenGL framebuffer objects 2",
- "This system does not support OpenGL/framebuffer objects.");
+ QMessageBox::information(0, "OpenGL framebuffer objects 2",
+ "This system does not support OpenGL/framebuffer objects.");
return -1;
}
diff --git a/examples/opengl/pbuffers/main.cpp b/examples/opengl/pbuffers/main.cpp
index e6b1fc5f48..8be6640e92 100644
--- a/examples/opengl/pbuffers/main.cpp
+++ b/examples/opengl/pbuffers/main.cpp
@@ -54,8 +54,8 @@ int main(int argc, char **argv)
widget.makeCurrent();
if (!QGLFormat::hasOpenGL() || !QGLPixelBuffer::hasOpenGLPbuffers()) {
- QMessageBox::information(0, "OpenGL pbuffers",
- "This system does not support OpenGL/pbuffers.");
+ QMessageBox::information(0, "OpenGL pbuffers",
+ "This system does not support OpenGL/pbuffers.");
return -1;
}
diff --git a/examples/opengl/pbuffers2/main.cpp b/examples/opengl/pbuffers2/main.cpp
index 60d8787c58..79fd88a3c8 100644
--- a/examples/opengl/pbuffers2/main.cpp
+++ b/examples/opengl/pbuffers2/main.cpp
@@ -51,8 +51,8 @@ int main(int argc, char **argv)
widget.resize(640, 480);
widget.makeCurrent();
if (!QGLFormat::hasOpenGL() || !QGLPixelBuffer::hasOpenGLPbuffers()) {
- QMessageBox::information(0, "OpenGL pbuffers 2",
- "This system does not support OpenGL/pbuffers.");
+ QMessageBox::information(0, "OpenGL pbuffers 2",
+ "This system does not support OpenGL/pbuffers.");
return -1;
}
widget.show();
diff --git a/examples/opengl/samplebuffers/main.cpp b/examples/opengl/samplebuffers/main.cpp
index cb25ffb3ec..a1272af4db 100644
--- a/examples/opengl/samplebuffers/main.cpp
+++ b/examples/opengl/samplebuffers/main.cpp
@@ -50,16 +50,16 @@ int main(int argc, char **argv)
f.setSampleBuffers(true);
QGLFormat::setDefaultFormat(f);
if (!QGLFormat::hasOpenGL()) {
- QMessageBox::information(0, "OpenGL samplebuffers",
- "This system does not support OpenGL.");
+ QMessageBox::information(0, "OpenGL samplebuffers",
+ "This system does not support OpenGL.");
return 0;
}
GLWidget widget(0);
if (!widget.format().sampleBuffers()) {
- QMessageBox::information(0, "OpenGL samplebuffers",
- "This system does not have sample buffer support.");
+ QMessageBox::information(0, "OpenGL samplebuffers",
+ "This system does not have sample buffer support.");
return 0;
}
diff --git a/examples/touch/fingerpaint/mainwindow.cpp b/examples/touch/fingerpaint/mainwindow.cpp
index 9481f888b5..f0477011d3 100644
--- a/examples/touch/fingerpaint/mainwindow.cpp
+++ b/examples/touch/fingerpaint/mainwindow.cpp
@@ -186,7 +186,7 @@ bool MainWindow::maybeSave()
tr("The image has been modified.\n"
"Do you want to save your changes?"),
QMessageBox::Save | QMessageBox::Discard
- | QMessageBox::Cancel);
+ | QMessageBox::Cancel);
if (ret == QMessageBox::Save) {
return saveFile("png");
} else if (ret == QMessageBox::Cancel) {
diff --git a/examples/widgets/doc/src/treemodelcompleter.qdoc b/examples/widgets/doc/src/treemodelcompleter.qdoc
index f18db0db65..9411371d12 100644
--- a/examples/widgets/doc/src/treemodelcompleter.qdoc
+++ b/examples/widgets/doc/src/treemodelcompleter.qdoc
@@ -1,4 +1,4 @@
- /****************************************************************************
+/****************************************************************************
**
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
diff --git a/examples/widgets/graphicsview/boxes/glbuffers.h b/examples/widgets/graphicsview/boxes/glbuffers.h
index 8b95ec2ea5..304b3da87a 100644
--- a/examples/widgets/graphicsview/boxes/glbuffers.h
+++ b/examples/widgets/graphicsview/boxes/glbuffers.h
@@ -196,9 +196,9 @@ public:
{
GLBUFFERS_ASSERT_OPENGL("GLVertexBuffer::GLVertexBuffer", glGenBuffers && glBindBuffer && glBufferData, return)
- glGenBuffers(1, &m_buffer);
- glBindBuffer(GL_ARRAY_BUFFER, m_buffer);
- glBufferData(GL_ARRAY_BUFFER, (m_length = length) * sizeof(T), data, mode);
+ glGenBuffers(1, &m_buffer);
+ glBindBuffer(GL_ARRAY_BUFFER, m_buffer);
+ glBufferData(GL_ARRAY_BUFFER, (m_length = length) * sizeof(T), data, mode);
}
~GLVertexBuffer()
diff --git a/examples/widgets/graphicsview/boxes/glextensions.cpp b/examples/widgets/graphicsview/boxes/glextensions.cpp
index eb0fe0ec6a..d10c0b4a62 100644
--- a/examples/widgets/graphicsview/boxes/glextensions.cpp
+++ b/examples/widgets/graphicsview/boxes/glextensions.cpp
@@ -45,54 +45,54 @@
bool GLExtensionFunctions::resolve(const QGLContext *context)
{
- bool ok = true;
+ bool ok = true;
- RESOLVE_GL_FUNC(GenFramebuffersEXT)
- RESOLVE_GL_FUNC(GenRenderbuffersEXT)
- RESOLVE_GL_FUNC(BindRenderbufferEXT)
- RESOLVE_GL_FUNC(RenderbufferStorageEXT)
- RESOLVE_GL_FUNC(DeleteFramebuffersEXT)
- RESOLVE_GL_FUNC(DeleteRenderbuffersEXT)
- RESOLVE_GL_FUNC(BindFramebufferEXT)
- RESOLVE_GL_FUNC(FramebufferTexture2DEXT)
- RESOLVE_GL_FUNC(FramebufferRenderbufferEXT)
- RESOLVE_GL_FUNC(CheckFramebufferStatusEXT)
+ RESOLVE_GL_FUNC(GenFramebuffersEXT)
+ RESOLVE_GL_FUNC(GenRenderbuffersEXT)
+ RESOLVE_GL_FUNC(BindRenderbufferEXT)
+ RESOLVE_GL_FUNC(RenderbufferStorageEXT)
+ RESOLVE_GL_FUNC(DeleteFramebuffersEXT)
+ RESOLVE_GL_FUNC(DeleteRenderbuffersEXT)
+ RESOLVE_GL_FUNC(BindFramebufferEXT)
+ RESOLVE_GL_FUNC(FramebufferTexture2DEXT)
+ RESOLVE_GL_FUNC(FramebufferRenderbufferEXT)
+ RESOLVE_GL_FUNC(CheckFramebufferStatusEXT)
- RESOLVE_GL_FUNC(ActiveTexture)
- RESOLVE_GL_FUNC(TexImage3D)
+ RESOLVE_GL_FUNC(ActiveTexture)
+ RESOLVE_GL_FUNC(TexImage3D)
- RESOLVE_GL_FUNC(GenBuffers)
- RESOLVE_GL_FUNC(BindBuffer)
- RESOLVE_GL_FUNC(BufferData)
- RESOLVE_GL_FUNC(DeleteBuffers)
- RESOLVE_GL_FUNC(MapBuffer)
- RESOLVE_GL_FUNC(UnmapBuffer)
+ RESOLVE_GL_FUNC(GenBuffers)
+ RESOLVE_GL_FUNC(BindBuffer)
+ RESOLVE_GL_FUNC(BufferData)
+ RESOLVE_GL_FUNC(DeleteBuffers)
+ RESOLVE_GL_FUNC(MapBuffer)
+ RESOLVE_GL_FUNC(UnmapBuffer)
- return ok;
+ return ok;
}
bool GLExtensionFunctions::fboSupported() {
return GenFramebuffersEXT
- && GenRenderbuffersEXT
- && BindRenderbufferEXT
- && RenderbufferStorageEXT
- && DeleteFramebuffersEXT
- && DeleteRenderbuffersEXT
- && BindFramebufferEXT
- && FramebufferTexture2DEXT
- && FramebufferRenderbufferEXT
- && CheckFramebufferStatusEXT;
+ && GenRenderbuffersEXT
+ && BindRenderbufferEXT
+ && RenderbufferStorageEXT
+ && DeleteFramebuffersEXT
+ && DeleteRenderbuffersEXT
+ && BindFramebufferEXT
+ && FramebufferTexture2DEXT
+ && FramebufferRenderbufferEXT
+ && CheckFramebufferStatusEXT;
}
bool GLExtensionFunctions::openGL15Supported() {
return ActiveTexture
- && TexImage3D
+ && TexImage3D
&& GenBuffers
- && BindBuffer
- && BufferData
- && DeleteBuffers
- && MapBuffer
- && UnmapBuffer;
+ && BindBuffer
+ && BufferData
+ && DeleteBuffers
+ && MapBuffer
+ && UnmapBuffer;
}
#undef RESOLVE_GL_FUNC
diff --git a/examples/widgets/graphicsview/boxes/glextensions.h b/examples/widgets/graphicsview/boxes/glextensions.h
index 46f2c11967..d92d5c304f 100644
--- a/examples/widgets/graphicsview/boxes/glextensions.h
+++ b/examples/widgets/graphicsview/boxes/glextensions.h
@@ -145,37 +145,37 @@ typedef GLboolean (APIENTRY *_glUnmapBuffer) (GLenum);
struct GLExtensionFunctions
{
- bool resolve(const QGLContext *context);
+ bool resolve(const QGLContext *context);
bool fboSupported();
bool openGL15Supported(); // the rest: multi-texture, 3D-texture, vertex buffer objects
- _glGenFramebuffersEXT GenFramebuffersEXT;
- _glGenRenderbuffersEXT GenRenderbuffersEXT;
- _glBindRenderbufferEXT BindRenderbufferEXT;
- _glRenderbufferStorageEXT RenderbufferStorageEXT;
- _glDeleteFramebuffersEXT DeleteFramebuffersEXT;
- _glDeleteRenderbuffersEXT DeleteRenderbuffersEXT;
- _glBindFramebufferEXT BindFramebufferEXT;
- _glFramebufferTexture2DEXT FramebufferTexture2DEXT;
- _glFramebufferRenderbufferEXT FramebufferRenderbufferEXT;
- _glCheckFramebufferStatusEXT CheckFramebufferStatusEXT;
-
- _glActiveTexture ActiveTexture;
- _glTexImage3D TexImage3D;
-
- _glGenBuffers GenBuffers;
- _glBindBuffer BindBuffer;
- _glBufferData BufferData;
- _glDeleteBuffers DeleteBuffers;
- _glMapBuffer MapBuffer;
- _glUnmapBuffer UnmapBuffer;
+ _glGenFramebuffersEXT GenFramebuffersEXT;
+ _glGenRenderbuffersEXT GenRenderbuffersEXT;
+ _glBindRenderbufferEXT BindRenderbufferEXT;
+ _glRenderbufferStorageEXT RenderbufferStorageEXT;
+ _glDeleteFramebuffersEXT DeleteFramebuffersEXT;
+ _glDeleteRenderbuffersEXT DeleteRenderbuffersEXT;
+ _glBindFramebufferEXT BindFramebufferEXT;
+ _glFramebufferTexture2DEXT FramebufferTexture2DEXT;
+ _glFramebufferRenderbufferEXT FramebufferRenderbufferEXT;
+ _glCheckFramebufferStatusEXT CheckFramebufferStatusEXT;
+
+ _glActiveTexture ActiveTexture;
+ _glTexImage3D TexImage3D;
+
+ _glGenBuffers GenBuffers;
+ _glBindBuffer BindBuffer;
+ _glBufferData BufferData;
+ _glDeleteBuffers DeleteBuffers;
+ _glMapBuffer MapBuffer;
+ _glUnmapBuffer UnmapBuffer;
};
inline GLExtensionFunctions &getGLExtensionFunctions()
{
- static GLExtensionFunctions funcs;
- return funcs;
+ static GLExtensionFunctions funcs;
+ return funcs;
}
#define glGenFramebuffersEXT getGLExtensionFunctions().GenFramebuffersEXT
diff --git a/examples/widgets/graphicsview/boxes/scene.cpp b/examples/widgets/graphicsview/boxes/scene.cpp
index 11e9f4ea5a..621068ab0b 100644
--- a/examples/widgets/graphicsview/boxes/scene.cpp
+++ b/examples/widgets/graphicsview/boxes/scene.cpp
@@ -186,10 +186,10 @@ TwoSidedGraphicsWidget::TwoSidedGraphicsWidget(QGraphicsScene *scene)
void TwoSidedGraphicsWidget::setWidget(int index, QWidget *widget)
{
if (index < 0 || index >= 2)
- {
- qWarning("TwoSidedGraphicsWidget::setWidget: Index out of bounds, index == %d", index);
- return;
- }
+ {
+ qWarning("TwoSidedGraphicsWidget::setWidget: Index out of bounds, index == %d", index);
+ return;
+ }
GraphicsWidget *proxy = new GraphicsWidget;
proxy->setWidget(widget);
@@ -210,10 +210,10 @@ void TwoSidedGraphicsWidget::setWidget(int index, QWidget *widget)
QWidget *TwoSidedGraphicsWidget::widget(int index)
{
if (index < 0 || index >= 2)
- {
- qWarning("TwoSidedGraphicsWidget::widget: Index out of bounds, index == %d", index);
- return 0;
- }
+ {
+ qWarning("TwoSidedGraphicsWidget::widget: Index out of bounds, index == %d", index);
+ return 0;
+ }
return m_proxyWidgets[index]->widget();
}
diff --git a/examples/widgets/graphicsview/elasticnodes/graphwidget.cpp b/examples/widgets/graphicsview/elasticnodes/graphwidget.cpp
index 8ae8749091..973b630235 100644
--- a/examples/widgets/graphicsview/elasticnodes/graphwidget.cpp
+++ b/examples/widgets/graphicsview/elasticnodes/graphwidget.cpp
@@ -193,9 +193,9 @@ void GraphWidget::drawBackground(QPainter *painter, const QRectF &rect)
QRectF rightShadow(sceneRect.right(), sceneRect.top() + 5, 5, sceneRect.height());
QRectF bottomShadow(sceneRect.left() + 5, sceneRect.bottom(), sceneRect.width(), 5);
if (rightShadow.intersects(rect) || rightShadow.contains(rect))
- painter->fillRect(rightShadow, Qt::darkGray);
+ painter->fillRect(rightShadow, Qt::darkGray);
if (bottomShadow.intersects(rect) || bottomShadow.contains(rect))
- painter->fillRect(bottomShadow, Qt::darkGray);
+ painter->fillRect(bottomShadow, Qt::darkGray);
// Fill
QLinearGradient gradient(sceneRect.topLeft(), sceneRect.bottomRight());
diff --git a/examples/widgets/itemviews/pixelator/mainwindow.cpp b/examples/widgets/itemviews/pixelator/mainwindow.cpp
index 1f6a403efc..aca5545af0 100644
--- a/examples/widgets/itemviews/pixelator/mainwindow.cpp
+++ b/examples/widgets/itemviews/pixelator/mainwindow.cpp
@@ -156,11 +156,11 @@ void MainWindow::printImage()
{
#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
if (model->rowCount(QModelIndex())*model->columnCount(QModelIndex()) > 90000) {
- QMessageBox::StandardButton answer;
- answer = QMessageBox::question(this, tr("Large Image Size"),
- tr("The printed image may be very large. Are you sure that "
- "you want to print it?"),
- QMessageBox::Yes | QMessageBox::No);
+ QMessageBox::StandardButton answer;
+ answer = QMessageBox::question(this, tr("Large Image Size"),
+ tr("The printed image may be very large. Are you sure that "
+ "you want to print it?"),
+ QMessageBox::Yes | QMessageBox::No);
if (answer == QMessageBox::No)
return;
}
diff --git a/examples/widgets/layouts/basiclayouts/dialog.cpp b/examples/widgets/layouts/basiclayouts/dialog.cpp
index d162cd8541..f8b8d68d4f 100644
--- a/examples/widgets/layouts/basiclayouts/dialog.cpp
+++ b/examples/widgets/layouts/basiclayouts/dialog.cpp
@@ -101,7 +101,7 @@ void Dialog::createHorizontalGroupBox()
for (int i = 0; i < NumButtons; ++i) {
buttons[i] = new QPushButton(tr("Button %1").arg(i + 1));
- layout->addWidget(buttons[i]);
+ layout->addWidget(buttons[i]);
}
horizontalGroupBox->setLayout(layout);
}
diff --git a/examples/widgets/layouts/borderlayout/borderlayout.h b/examples/widgets/layouts/borderlayout/borderlayout.h
index d818462035..eae425d5e6 100644
--- a/examples/widgets/layouts/borderlayout/borderlayout.h
+++ b/examples/widgets/layouts/borderlayout/borderlayout.h
@@ -69,13 +69,13 @@ public:
private:
struct ItemWrapper
{
- ItemWrapper(QLayoutItem *i, Position p) {
- item = i;
- position = p;
- }
+ ItemWrapper(QLayoutItem *i, Position p) {
+ item = i;
+ position = p;
+ }
- QLayoutItem *item;
- Position position;
+ QLayoutItem *item;
+ Position position;
};
enum SizeType { MinimumSize, SizeHint };
diff --git a/examples/widgets/mainwindows/mdi/mdichild.cpp b/examples/widgets/mainwindows/mdi/mdichild.cpp
index f55e08a249..95c95e45e0 100644
--- a/examples/widgets/mainwindows/mdi/mdichild.cpp
+++ b/examples/widgets/mainwindows/mdi/mdichild.cpp
@@ -145,13 +145,13 @@ void MdiChild::documentWasModified()
bool MdiChild::maybeSave()
{
if (document()->isModified()) {
- QMessageBox::StandardButton ret;
+ QMessageBox::StandardButton ret;
ret = QMessageBox::warning(this, tr("MDI"),
tr("'%1' has been modified.\n"
"Do you want to save your changes?")
.arg(userFriendlyCurrentFile()),
QMessageBox::Save | QMessageBox::Discard
- | QMessageBox::Cancel);
+ | QMessageBox::Cancel);
if (ret == QMessageBox::Save)
return save();
else if (ret == QMessageBox::Cancel)
diff --git a/examples/widgets/mainwindows/sdi/mainwindow.cpp b/examples/widgets/mainwindows/sdi/mainwindow.cpp
index b7af4ffd9d..6db9bd6261 100644
--- a/examples/widgets/mainwindows/sdi/mainwindow.cpp
+++ b/examples/widgets/mainwindows/sdi/mainwindow.cpp
@@ -282,12 +282,12 @@ void MainWindow::writeSettings()
bool MainWindow::maybeSave()
{
if (textEdit->document()->isModified()) {
- QMessageBox::StandardButton ret;
+ QMessageBox::StandardButton ret;
ret = QMessageBox::warning(this, tr("SDI"),
tr("The document has been modified.\n"
"Do you want to save your changes?"),
QMessageBox::Save | QMessageBox::Discard
- | QMessageBox::Cancel);
+ | QMessageBox::Cancel);
if (ret == QMessageBox::Save)
return save();
else if (ret == QMessageBox::Cancel)
diff --git a/examples/widgets/richtext/textedit/textedit.cpp b/examples/widgets/richtext/textedit/textedit.cpp
index 873a29eb0e..128924ef4e 100644
--- a/examples/widgets/richtext/textedit/textedit.cpp
+++ b/examples/widgets/richtext/textedit/textedit.cpp
@@ -283,7 +283,7 @@ void TextEdit::setupTextActions()
tr("&Bold"), this);
actionTextBold->setShortcut(Qt::CTRL + Qt::Key_B);
actionTextBold->setPriority(QAction::LowPriority);
- QFont bold;
+ QFont bold;
bold.setBold(true);
actionTextBold->setFont(bold);
connect(actionTextBold, SIGNAL(triggered()), this, SLOT(textBold()));
diff --git a/examples/widgets/tools/codecs/mainwindow.cpp b/examples/widgets/tools/codecs/mainwindow.cpp
index e8f08bea6c..1e722ac6df 100644
--- a/examples/widgets/tools/codecs/mainwindow.cpp
+++ b/examples/widgets/tools/codecs/mainwindow.cpp
@@ -162,7 +162,7 @@ void MainWindow::createActions()
QString text = tr("%1...").arg(QString(codec->name()));
QAction *action = new QAction(text, this);
- action->setData(codec->name());
+ action->setData(codec->name());
connect(action, SIGNAL(triggered()), this, SLOT(save()));
saveAsActs.append(action);
}
diff --git a/examples/widgets/tutorials/modelview/5_edit/mymodel.cpp b/examples/widgets/tutorials/modelview/5_edit/mymodel.cpp
index 317c4760fb..0a2c301f9c 100644
--- a/examples/widgets/tutorials/modelview/5_edit/mymodel.cpp
+++ b/examples/widgets/tutorials/modelview/5_edit/mymodel.cpp
@@ -77,14 +77,14 @@ bool MyModel::setData(const QModelIndex & index, const QVariant & value, int rol
{
//save value from editor to member m_gridData
m_gridData[index.row()][index.column()] = value.toString();
- //for presentation purposes only: build and emit a joined string
+ //for presentation purposes only: build and emit a joined string
QString result;
- for(int row= 0; row < ROWS; row++)
- {
+ for (int row= 0; row < ROWS; row++)
+ {
for(int col= 0; col < COLS; col++)
- {
- result += m_gridData[row][col] + " ";
- }
+ {
+ result += m_gridData[row][col] + " ";
+ }
}
emit editCompleted( result );
}
diff --git a/examples/widgets/widgets/calculator/calculator.cpp b/examples/widgets/widgets/calculator/calculator.cpp
index 5b6b69ba03..bb3836bd70 100644
--- a/examples/widgets/widgets/calculator/calculator.cpp
+++ b/examples/widgets/widgets/calculator/calculator.cpp
@@ -69,7 +69,7 @@ Calculator::Calculator(QWidget *parent)
//! [4]
for (int i = 0; i < NumDigitButtons; ++i) {
- digitButtons[i] = createButton(QString::number(i), SLOT(digitClicked()));
+ digitButtons[i] = createButton(QString::number(i), SLOT(digitClicked()));
}
Button *pointButton = createButton(tr("."), SLOT(pointClicked()));
@@ -144,7 +144,7 @@ void Calculator::digitClicked()
if (waitingForOperand) {
display->clear();
- waitingForOperand = false;
+ waitingForOperand = false;
}
display->setText(display->text() + QString::number(digitValue));
}
@@ -169,8 +169,8 @@ void Calculator::unaryOperatorClicked()
result = pow(operand, 2.0);
} else if (clickedOperator == tr("1/x")) {
if (operand == 0.0) {
- abortOperation();
- return;
+ abortOperation();
+ return;
}
result = 1.0 / operand;
}
@@ -192,7 +192,7 @@ void Calculator::additiveOperatorClicked()
//! [12] //! [13]
if (!calculate(operand, pendingMultiplicativeOperator)) {
abortOperation();
- return;
+ return;
}
display->setText(QString::number(factorSoFar));
operand = factorSoFar;
@@ -205,7 +205,7 @@ void Calculator::additiveOperatorClicked()
//! [14] //! [15]
if (!calculate(operand, pendingAdditiveOperator)) {
abortOperation();
- return;
+ return;
}
display->setText(QString::number(sumSoFar));
} else {
@@ -229,7 +229,7 @@ void Calculator::multiplicativeOperatorClicked()
if (!pendingMultiplicativeOperator.isEmpty()) {
if (!calculate(operand, pendingMultiplicativeOperator)) {
abortOperation();
- return;
+ return;
}
display->setText(QString::number(factorSoFar));
} else {
@@ -249,7 +249,7 @@ void Calculator::equalClicked()
if (!pendingMultiplicativeOperator.isEmpty()) {
if (!calculate(operand, pendingMultiplicativeOperator)) {
abortOperation();
- return;
+ return;
}
operand = factorSoFar;
factorSoFar = 0.0;
@@ -258,7 +258,7 @@ void Calculator::equalClicked()
if (!pendingAdditiveOperator.isEmpty()) {
if (!calculate(operand, pendingAdditiveOperator)) {
abortOperation();
- return;
+ return;
}
pendingAdditiveOperator.clear();
} else {
@@ -387,9 +387,9 @@ bool Calculator::calculate(double rightOperand, const QString &pendingOperator)
} else if (pendingOperator == tr("\303\227")) {
factorSoFar *= rightOperand;
} else if (pendingOperator == tr("\303\267")) {
- if (rightOperand == 0.0)
- return false;
- factorSoFar /= rightOperand;
+ if (rightOperand == 0.0)
+ return false;
+ factorSoFar /= rightOperand;
}
return true;
}
diff --git a/examples/widgets/widgets/lineedits/window.cpp b/examples/widgets/widgets/lineedits/window.cpp
index a0871e7c77..fe241208f6 100644
--- a/examples/widgets/widgets/lineedits/window.cpp
+++ b/examples/widgets/widgets/lineedits/window.cpp
@@ -182,7 +182,7 @@ void Window::echoChanged(int index)
echoLineEdit->setEchoMode(QLineEdit::Password);
break;
case 2:
- echoLineEdit->setEchoMode(QLineEdit::PasswordEchoOnEdit);
+ echoLineEdit->setEchoMode(QLineEdit::PasswordEchoOnEdit);
break;
case 3:
echoLineEdit->setEchoMode(QLineEdit::NoEcho);
@@ -221,7 +221,7 @@ void Window::alignmentChanged(int index)
alignmentLineEdit->setAlignment(Qt::AlignCenter);
break;
case 2:
- alignmentLineEdit->setAlignment(Qt::AlignRight);
+ alignmentLineEdit->setAlignment(Qt::AlignRight);
}
}
//! [11]
diff --git a/examples/widgets/widgets/scribble/mainwindow.cpp b/examples/widgets/widgets/scribble/mainwindow.cpp
index 65550ae606..5f175c15b5 100644
--- a/examples/widgets/widgets/scribble/mainwindow.cpp
+++ b/examples/widgets/widgets/scribble/mainwindow.cpp
@@ -219,7 +219,7 @@ bool MainWindow::maybeSave()
tr("The image has been modified.\n"
"Do you want to save your changes?"),
QMessageBox::Save | QMessageBox::Discard
- | QMessageBox::Cancel);
+ | QMessageBox::Cancel);
if (ret == QMessageBox::Save) {
return saveFile("png");
} else if (ret == QMessageBox::Cancel) {
diff --git a/examples/widgets/widgets/spinboxes/window.cpp b/examples/widgets/widgets/spinboxes/window.cpp
index acce642ec6..6503d60f22 100644
--- a/examples/widgets/widgets/spinboxes/window.cpp
+++ b/examples/widgets/widgets/spinboxes/window.cpp
@@ -94,6 +94,16 @@ void Window::createSpinBoxes()
priceSpinBox->setValue(99);
//! [4] //! [5]
+ groupSeparatorSpinBox = new QSpinBox;
+ groupSeparatorSpinBox->setRange(-99999999, 99999999);
+ groupSeparatorSpinBox->setValue(1000);
+ groupSeparatorSpinBox->setGroupSeparatorShown(true);
+ QCheckBox *groupSeparatorChkBox = new QCheckBox;
+ groupSeparatorChkBox->setText(tr("Show group separator"));
+ groupSeparatorChkBox->setChecked(true);
+ connect(groupSeparatorChkBox, &QCheckBox::toggled, groupSeparatorSpinBox,
+ &QSpinBox::setGroupSeparatorShown);
+
QLabel *hexLabel = new QLabel(tr("Enter a value between "
"%1 and %2:").arg('-' + QString::number(31, 16)).arg(QString::number(31, 16)));
QSpinBox *hexSpinBox = new QSpinBox;
@@ -111,6 +121,8 @@ void Window::createSpinBoxes()
spinBoxLayout->addWidget(priceSpinBox);
spinBoxLayout->addWidget(hexLabel);
spinBoxLayout->addWidget(hexSpinBox);
+ spinBoxLayout->addWidget(groupSeparatorChkBox);
+ spinBoxLayout->addWidget(groupSeparatorSpinBox);
spinBoxesGroup->setLayout(spinBoxLayout);
}
//! [5]
@@ -182,12 +194,12 @@ void Window::setFormatString(const QString &formatString)
meetingEdit->setDateRange(QDate(2004, 11, 1), QDate(2005, 11, 30));
meetingLabel->setText(tr("Meeting date (between %0 and %1):")
.arg(meetingEdit->minimumDate().toString(Qt::ISODate))
- .arg(meetingEdit->maximumDate().toString(Qt::ISODate)));
+ .arg(meetingEdit->maximumDate().toString(Qt::ISODate)));
} else {
meetingEdit->setTimeRange(QTime(0, 7, 20, 0), QTime(21, 0, 0, 0));
meetingLabel->setText(tr("Meeting time (between %0 and %1):")
.arg(meetingEdit->minimumTime().toString(Qt::ISODate))
- .arg(meetingEdit->maximumTime().toString(Qt::ISODate)));
+ .arg(meetingEdit->maximumTime().toString(Qt::ISODate)));
}
}
//! [13]
@@ -237,6 +249,17 @@ void Window::createDoubleSpinBoxes()
//! [17]
this, SLOT(changePrecision(int)));
+ groupSeparatorSpinBox_d = new QDoubleSpinBox;
+ groupSeparatorSpinBox_d->setRange(-99999999, 99999999);
+ groupSeparatorSpinBox_d->setDecimals(2);
+ groupSeparatorSpinBox_d->setValue(1000.00);
+ groupSeparatorSpinBox_d->setGroupSeparatorShown(true);
+ QCheckBox *groupSeparatorChkBox = new QCheckBox;
+ groupSeparatorChkBox->setText(tr("Show group separator"));
+ groupSeparatorChkBox->setChecked(true);
+ connect(groupSeparatorChkBox, &QCheckBox::toggled, groupSeparatorSpinBox_d,
+ &QDoubleSpinBox::setGroupSeparatorShown);
+
//! [18]
QVBoxLayout *spinBoxLayout = new QVBoxLayout;
spinBoxLayout->addWidget(precisionLabel);
@@ -247,6 +270,8 @@ void Window::createDoubleSpinBoxes()
spinBoxLayout->addWidget(scaleSpinBox);
spinBoxLayout->addWidget(priceLabel);
spinBoxLayout->addWidget(priceSpinBox);
+ spinBoxLayout->addWidget(groupSeparatorChkBox);
+ spinBoxLayout->addWidget(groupSeparatorSpinBox_d);
doubleSpinBoxesGroup->setLayout(spinBoxLayout);
}
//! [18]
diff --git a/examples/widgets/widgets/spinboxes/window.h b/examples/widgets/widgets/spinboxes/window.h
index ef7af04f59..32622c2c24 100644
--- a/examples/widgets/widgets/spinboxes/window.h
+++ b/examples/widgets/widgets/spinboxes/window.h
@@ -45,6 +45,7 @@
QT_BEGIN_NAMESPACE
class QDateTimeEdit;
+class QSpinBox;
class QDoubleSpinBox;
class QGroupBox;
class QLabel;
@@ -75,6 +76,8 @@ private:
QGroupBox *editsGroup;
QGroupBox *doubleSpinBoxesGroup;
QLabel *meetingLabel;
+ QSpinBox *groupSeparatorSpinBox;
+ QDoubleSpinBox *groupSeparatorSpinBox_d;
};
//! [0]
diff --git a/examples/widgets/widgets/tetrix/tetrixboard.cpp b/examples/widgets/widgets/tetrix/tetrixboard.cpp
index 15a2e8e6dd..c286af6406 100644
--- a/examples/widgets/widgets/tetrix/tetrixboard.cpp
+++ b/examples/widgets/widgets/tetrix/tetrixboard.cpp
@@ -109,9 +109,9 @@ void TetrixBoard::pause()
isPaused = !isPaused;
if (isPaused) {
- timer.stop();
+ timer.stop();
} else {
- timer.start(timeoutTime(), this);
+ timer.start(timeoutTime(), this);
}
update();
//! [5] //! [6]
@@ -128,7 +128,7 @@ void TetrixBoard::paintEvent(QPaintEvent *event)
//! [7]
if (isPaused) {
- painter.drawText(rect, Qt::AlignCenter, tr("Pause"));
+ painter.drawText(rect, Qt::AlignCenter, tr("Pause"));
return;
}
@@ -138,7 +138,7 @@ void TetrixBoard::paintEvent(QPaintEvent *event)
for (int i = 0; i < BoardHeight; ++i) {
for (int j = 0; j < BoardWidth; ++j) {
TetrixShape shape = shapeAt(j, BoardHeight - i - 1);
- if (shape != NoShape)
+ if (shape != NoShape)
drawSquare(painter, rect.left() + j * squareWidth(),
boardTop + i * squareHeight(), shape);
}
@@ -165,7 +165,7 @@ void TetrixBoard::paintEvent(QPaintEvent *event)
void TetrixBoard::keyPressEvent(QKeyEvent *event)
{
if (!isStarted || isPaused || curPiece.shape() == NoShape) {
- QFrame::keyPressEvent(event);
+ QFrame::keyPressEvent(event);
return;
}
//! [13]
@@ -174,24 +174,24 @@ void TetrixBoard::keyPressEvent(QKeyEvent *event)
switch (event->key()) {
case Qt::Key_Left:
tryMove(curPiece, curX - 1, curY);
- break;
+ break;
case Qt::Key_Right:
tryMove(curPiece, curX + 1, curY);
- break;
+ break;
case Qt::Key_Down:
tryMove(curPiece.rotatedRight(), curX, curY);
- break;
+ break;
case Qt::Key_Up:
tryMove(curPiece.rotatedLeft(), curX, curY);
- break;
+ break;
case Qt::Key_Space:
- dropDown();
- break;
+ dropDown();
+ break;
case Qt::Key_D:
- oneLineDown();
- break;
+ oneLineDown();
+ break;
default:
- QFrame::keyPressEvent(event);
+ QFrame::keyPressEvent(event);
}
//! [14]
}
@@ -201,9 +201,9 @@ void TetrixBoard::timerEvent(QTimerEvent *event)
{
if (event->timerId() == timer.timerId()) {
if (isWaitingAfterLine) {
- isWaitingAfterLine = false;
- newPiece();
- timer.start(timeoutTime(), this);
+ isWaitingAfterLine = false;
+ newPiece();
+ timer.start(timeoutTime(), this);
} else {
oneLineDown();
}
@@ -243,7 +243,7 @@ void TetrixBoard::dropDown()
void TetrixBoard::oneLineDown()
{
if (!tryMove(curPiece, curX, curY - 1))
- pieceDropped(0);
+ pieceDropped(0);
}
//! [21]
@@ -290,24 +290,24 @@ void TetrixBoard::removeFullLines()
if (lineIsFull) {
//! [24] //! [25]
- ++numFullLines;
- for (int k = i; k < BoardHeight - 1; ++k) {
+ ++numFullLines;
+ for (int k = i; k < BoardHeight - 1; ++k) {
for (int j = 0; j < BoardWidth; ++j)
shapeAt(j, k) = shapeAt(j, k + 1);
- }
+ }
//! [25] //! [26]
- for (int j = 0; j < BoardWidth; ++j)
+ for (int j = 0; j < BoardWidth; ++j)
shapeAt(j, BoardHeight - 1) = NoShape;
- }
+ }
//! [26] //! [27]
}
//! [27]
//! [28]
if (numFullLines > 0) {
- numLinesRemoved += numFullLines;
- score += 10 * numFullLines;
- emit linesRemovedChanged(numLinesRemoved);
+ numLinesRemoved += numFullLines;
+ score += 10 * numFullLines;
+ emit linesRemovedChanged(numLinesRemoved);
emit scoreChanged(score);
timer.start(500, this);
@@ -329,7 +329,7 @@ void TetrixBoard::newPiece()
curY = BoardHeight - 1 + curPiece.minY();
if (!tryMove(curPiece, curX, curY)) {
- curPiece.setShape(NoShape);
+ curPiece.setShape(NoShape);
timer.stop();
isStarted = false;
}
diff --git a/examples/widgets/widgets/wiggly/wigglywidget.cpp b/examples/widgets/widgets/wiggly/wigglywidget.cpp
index cfd45a611a..a68bafb77d 100644
--- a/examples/widgets/widgets/wiggly/wigglywidget.cpp
+++ b/examples/widgets/widgets/wiggly/wigglywidget.cpp
@@ -63,7 +63,7 @@ void WigglyWidget::paintEvent(QPaintEvent * /* event */)
//! [1] //! [2]
{
static const int sineTable[16] = {
- 0, 38, 71, 92, 100, 92, 71, 38, 0, -38, -71, -92, -100, -92, -71, -38
+ 0, 38, 71, 92, 100, 92, 71, 38, 0, -38, -71, -92, -100, -92, -71, -38
};
QFontMetrics metrics(font());
@@ -94,7 +94,7 @@ void WigglyWidget::timerEvent(QTimerEvent *event)
++step;
update();
} else {
- QWidget::timerEvent(event);
+ QWidget::timerEvent(event);
}
//! [6]
}
diff --git a/mkspecs/common/clang.conf b/mkspecs/common/clang.conf
index ace2496f10..d58b44b295 100644
--- a/mkspecs/common/clang.conf
+++ b/mkspecs/common/clang.conf
@@ -13,6 +13,7 @@ QMAKE_LINK_SHLIB = $$QMAKE_CXX
CONFIG += clang_pch_style
QMAKE_PCH_OUTPUT_EXT = .pch
+QMAKE_CFLAGS_ISYSTEM = -isystem
QMAKE_CFLAGS_PRECOMPILE = -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
QMAKE_CFLAGS_USE_PRECOMPILE = -Xclang -include-pch -Xclang ${QMAKE_PCH_OUTPUT}
QMAKE_CXXFLAGS_PRECOMPILE = -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
diff --git a/mkspecs/common/gcc-base.conf b/mkspecs/common/gcc-base.conf
index b1f2ad4979..e3e72741ab 100644
--- a/mkspecs/common/gcc-base.conf
+++ b/mkspecs/common/gcc-base.conf
@@ -40,6 +40,7 @@ QMAKE_CFLAGS_DEBUG += -g
QMAKE_CFLAGS_SHLIB += -fPIC
QMAKE_CFLAGS_STATIC_LIB += -fPIC
QMAKE_CFLAGS_APP += -fPIE
+QMAKE_CFLAGS_ISYSTEM = -isystem
QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses
QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden
QMAKE_CFLAGS_EXCEPTIONS_OFF += -fno-exceptions
diff --git a/mkspecs/common/mac/qplatformdefs.h b/mkspecs/common/mac/qplatformdefs.h
index 7ee337cce4..aad3b2330c 100644
--- a/mkspecs/common/mac/qplatformdefs.h
+++ b/mkspecs/common/mac/qplatformdefs.h
@@ -87,7 +87,7 @@
#define QT_SIGNAL_IGNORE (void (*)(int))1
-#define QT_SNPRINTF ::snprintf
-#define QT_VSNPRINTF ::vsnprintf
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/common/wince/qplatformdefs.h b/mkspecs/common/wince/qplatformdefs.h
index d46a03d5ca..b4d44c1dc5 100644
--- a/mkspecs/common/wince/qplatformdefs.h
+++ b/mkspecs/common/wince/qplatformdefs.h
@@ -63,48 +63,48 @@
#include <windows.h>
#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct _stati64 // non-ANSI defs
-#define QT_STATBUF4TSTAT struct _stati64 // non-ANSI defs
-#define QT_STAT ::_stati64
-#define QT_FSTAT ::_fstati64
+#define QT_STATBUF struct _stati64 // non-ANSI defs
+#define QT_STATBUF4TSTAT struct _stati64 // non-ANSI defs
+#define QT_STAT ::_stati64
+#define QT_FSTAT ::_fstati64
#else
-#define QT_STATBUF struct stat // non-ANSI defs
-#define QT_STATBUF4TSTAT struct stat // non-ANSI defs
-#define QT_STAT ::qt_wince_stat
-#define QT_FSTAT ::qt_wince__fstat
+#define QT_STATBUF struct stat // non-ANSI defs
+#define QT_STATBUF4TSTAT struct stat // non-ANSI defs
+#define QT_STAT ::qt_wince_stat
+#define QT_FSTAT ::qt_wince__fstat
#endif
-#define QT_STAT_REG _S_IFREG
-#define QT_STAT_DIR _S_IFDIR
-#define QT_STAT_MASK _S_IFMT
+#define QT_STAT_REG _S_IFREG
+#define QT_STAT_DIR _S_IFDIR
+#define QT_STAT_MASK _S_IFMT
#if defined(_S_IFLNK)
-# define QT_STAT_LNK _S_IFLNK
+# define QT_STAT_LNK _S_IFLNK
#endif
-#define QT_FILENO ::qt_wince___fileno
-#define QT_OPEN ::qt_wince_open
-#define QT_CLOSE ::qt_wince__close
+#define QT_FILENO ::qt_wince___fileno
+#define QT_OPEN ::qt_wince_open
+#define QT_CLOSE ::qt_wince__close
#ifdef QT_LARGEFILE_SUPPORT
-#define QT_LSEEK ::_lseeki64
-#define QT_TSTAT ::_tstati64
+#define QT_LSEEK ::_lseeki64
+#define QT_TSTAT ::_tstati64
#else
-#define QT_LSEEK ::qt_wince__lseek
-#define QT_TSTAT ::_tstat
+#define QT_LSEEK ::qt_wince__lseek
+#define QT_TSTAT ::_tstat
#endif
-#define QT_READ ::qt_wince__read
-#define QT_WRITE ::qt_wince__write
-#define QT_ACCESS ::qt_wince__access
-#define QT_GETCWD ::_getcwd
-#define QT_CHDIR ::_chdir
-#define QT_MKDIR ::qt_wince__mkdir
-#define QT_RMDIR ::qt_wince__rmdir
-#define QT_OPEN_LARGEFILE 0
-#define QT_OPEN_RDONLY _O_RDONLY
-#define QT_OPEN_WRONLY _O_WRONLY
-#define QT_OPEN_RDWR _O_RDWR
-#define QT_OPEN_CREAT _O_CREAT
-#define QT_OPEN_TRUNC _O_TRUNC
-#define QT_OPEN_APPEND _O_APPEND
-# define QT_OPEN_TEXT _O_TEXT
-# define QT_OPEN_BINARY _O_BINARY
+#define QT_READ ::qt_wince__read
+#define QT_WRITE ::qt_wince__write
+#define QT_ACCESS ::qt_wince__access
+#define QT_GETCWD ::_getcwd
+#define QT_CHDIR ::_chdir
+#define QT_MKDIR ::qt_wince__mkdir
+#define QT_RMDIR ::qt_wince__rmdir
+#define QT_OPEN_LARGEFILE 0
+#define QT_OPEN_RDONLY _O_RDONLY
+#define QT_OPEN_WRONLY _O_WRONLY
+#define QT_OPEN_RDWR _O_RDWR
+#define QT_OPEN_CREAT _O_CREAT
+#define QT_OPEN_TRUNC _O_TRUNC
+#define QT_OPEN_APPEND _O_APPEND
+# define QT_OPEN_TEXT _O_TEXT
+# define QT_OPEN_BINARY _O_BINARY
#define QT_FOPEN ::fopen
#define QT_FSEEK ::fseek
@@ -115,17 +115,17 @@
#define QT_FPOS_T fpos_t
#define QT_OFF_T long
-#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_ARGS int
#define QT_VSNPRINTF(buffer, count, format, arg) \
_vsnprintf(buffer, count, format, arg)
-#define QT_SNPRINTF ::_snprintf
+#define QT_SNPRINTF ::_snprintf
-# define F_OK 0
-# define X_OK 1
-# define W_OK 2
-# define R_OK 4
+# define F_OK 0
+# define X_OK 1
+# define W_OK 2
+# define R_OK 4
typedef int mode_t;
diff --git a/mkspecs/common/winrt_winphone/qmake.conf b/mkspecs/common/winrt_winphone/qmake.conf
index a8c9582c31..c990122ac6 100644
--- a/mkspecs/common/winrt_winphone/qmake.conf
+++ b/mkspecs/common/winrt_winphone/qmake.conf
@@ -1,16 +1,15 @@
#
# qmake configuration for winrt and windows phone 8
#
-# Written for Microsoft Visual C++ 2012
+# Written for Microsoft Visual C++
#
MAKEFILE_GENERATOR = MSBUILD
QMAKE_COMPILER = msvc
QMAKE_PLATFORM = winrt win32
CONFIG += incremental flat precompile_header autogen_precompile_source debug_and_release debug_and_release_target no_generated_target_info autogen_wmappmanifest rtti
-DEFINES += UNICODE WINRT QT_LARGEFILE_SUPPORT Q_BYTE_ORDER=Q_LITTLE_ENDIAN \
+DEFINES += UNICODE WIN32 QT_LARGEFILE_SUPPORT Q_BYTE_ORDER=Q_LITTLE_ENDIAN \
QT_NO_PRINTER QT_NO_PRINTDIALOG # TODO: Remove when printing is re-enabled
-QMAKE_COMPILER_DEFINES += _MSC_VER=1700 WINRT
DEPLOYMENT_PLUGIN += qwinrt
@@ -19,7 +18,6 @@ QMAKE_LEX = flex
QMAKE_LEXFLAGS =
QMAKE_YACC = byacc
QMAKE_YACCFLAGS = -d
-#QMAKE_CFLAGS = -nologo -Zm200 -Zc:wchar_t-
QMAKE_CFLAGS = -nologo -Zm200
QMAKE_CFLAGS_WARN_ON = -W3
QMAKE_CFLAGS_WARN_OFF = -W0
@@ -64,22 +62,24 @@ QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ $<
QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<<
QMAKE_LINK = link
-QMAKE_LFLAGS = /NOLOGO /DYNAMICBASE /NXCOMPAT /NODEFAULTLIB:ole32.lib
+QMAKE_LFLAGS = /NOLOGO /DYNAMICBASE /NXCOMPAT /NODEFAULTLIB:ole32.lib /APPCONTAINER
QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO
QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO = /DEBUG /OPT:REF /INCREMENTAL:NO
QMAKE_LFLAGS_DEBUG = /DEBUG
-QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE
QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS
-QMAKE_LFLAGS_EXE = /WINMD /MANIFEST:NO
-QMAKE_LFLAGS_DLL = /WINMD /MANIFEST:NO /DLL /WINMDFILE:$(DESTDIR_TARGET).winmd
+QMAKE_LFLAGS_EXE = /MANIFEST:NO
+QMAKE_LFLAGS_DLL = /MANIFEST:NO /DLL
QMAKE_LFLAGS_LTCG = /LTCG
QMAKE_EXTENSION_STATICLIB = lib
+QMAKE_LIBS += runtimeobject.lib
QMAKE_LIBS_CORE =
-QMAKE_LIBS_GUI = d3d11.lib
+QMAKE_LIBS_GUI =
QMAKE_LIBS_NETWORK =
+QMAKE_LIBS_OPENGL_ES2 = libEGL.lib libGLESv2.lib
+QMAKE_LIBS_OPENGL_ES2_DEBUG = libEGLd.lib libGLESv2d.lib
-QMAKE_LIBS_QT_ENTRY = -lqtmain /ENTRY:wmainCRTStartup
+QMAKE_LIBS_QT_ENTRY = -lqtmain
QMAKE_IDL = midl
QMAKE_LIB = lib /NOLOGO
@@ -89,5 +89,5 @@ include(../shell-win32.conf)
VCPROJ_EXTENSION = .vcxproj
VCSOLUTION_EXTENSION = .sln
-VCPROJ_KEYWORD = Qt4VSv1.0
+VCPROJ_KEYWORD = Qt4VSv1.0
load(qt_config)
diff --git a/mkspecs/common/winrt_winphone/qplatformdefs.h b/mkspecs/common/winrt_winphone/qplatformdefs.h
new file mode 100644
index 0000000000..96f20569d2
--- /dev/null
+++ b/mkspecs/common/winrt_winphone/qplatformdefs.h
@@ -0,0 +1,141 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the qmake spec 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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+#ifdef UNICODE
+#ifndef _UNICODE
+#define _UNICODE
+#endif
+#endif
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+#include "qfunctions_winrt.h"
+
+#define _POSIX_
+#include <limits.h>
+#undef _POSIX_
+
+#include <tchar.h>
+#include <io.h>
+#include <direct.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <sys/stat.h>
+#include <stdlib.h>
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_STATBUF struct _stati64 // non-ANSI defs
+#define QT_STATBUF4TSTAT struct _stati64 // non-ANSI defs
+#define QT_STAT ::_stati64
+#define QT_FSTAT ::_fstati64
+#else
+#define QT_STATBUF struct _stat // non-ANSI defs
+#define QT_STATBUF4TSTAT struct _stat // non-ANSI defs
+#define QT_STAT ::_stat
+#define QT_FSTAT ::_fstat
+#endif
+#define QT_STAT_REG _S_IFREG
+#define QT_STAT_DIR _S_IFDIR
+#define QT_STAT_MASK _S_IFMT
+#if defined(_S_IFLNK)
+# define QT_STAT_LNK _S_IFLNK
+#endif
+#define QT_FILENO _fileno
+#define QT_OPEN ::_open
+#define QT_CLOSE ::_close
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_LSEEK ::_lseeki64
+#define QT_TSTAT ::_tstati64
+#else
+#define QT_LSEEK ::_lseek
+#define QT_TSTAT ::_tstat
+#endif
+#define QT_READ ::_read
+#define QT_WRITE ::_write
+#define QT_ACCESS ::_access
+#define QT_GETCWD ::_getcwd
+#define QT_CHDIR ::_chdir
+#define QT_MKDIR ::_mkdir
+#define QT_RMDIR ::_rmdir
+#define QT_OPEN_LARGEFILE 0
+#define QT_OPEN_RDONLY _O_RDONLY
+#define QT_OPEN_WRONLY _O_WRONLY
+#define QT_OPEN_RDWR _O_RDWR
+#define QT_OPEN_CREAT _O_CREAT
+#define QT_OPEN_TRUNC _O_TRUNC
+#define QT_OPEN_APPEND _O_APPEND
+#if defined(O_TEXT)
+# define QT_OPEN_TEXT _O_TEXT
+# define QT_OPEN_BINARY _O_BINARY
+#endif
+
+#include "../common/c89/qplatformdefs.h"
+
+#ifdef QT_LARGEFILE_SUPPORT
+#undef QT_FSEEK
+#undef QT_FTELL
+#undef QT_OFF_T
+
+#define QT_FSEEK ::_fseeki64
+#define QT_FTELL ::_ftelli64
+#define QT_OFF_T __int64
+#endif
+
+#define QT_SIGNAL_ARGS int
+
+#define QT_VSNPRINTF(buffer, count, format, arg) \
+ vsnprintf_s(buffer, count, count-1, format, arg)
+
+#define QT_SNPRINTF ::_snprintf
+
+# define F_OK 0
+# define X_OK 1
+# define W_OK 2
+# define R_OK 4
+
+typedef int mode_t;
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/cygwin-g++/qplatformdefs.h b/mkspecs/cygwin-g++/qplatformdefs.h
index e7255a9342..b3ecc0f84d 100644
--- a/mkspecs/cygwin-g++/qplatformdefs.h
+++ b/mkspecs/cygwin-g++/qplatformdefs.h
@@ -73,7 +73,7 @@
#include <sys/ioctl.h>
// Cygwin does not provide <sys/ipc.h> and <sys/shm.h> because it
// doesn't support SysV IPC or shared memory. See for example:
-// http://afni.nimh.nih.gov/afni/afniboard/messages/1725.html
+// http://afni.nimh.nih.gov/afni/afniboard/messages/1725.html
#include <sys/time.h>
#include <sys/socket.h>
#include <sys/stat.h>
@@ -88,8 +88,8 @@
#define QT_OPEN_LARGEFILE 0
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
-#define QT_SNPRINTF ::snprintf
-#define QT_VSNPRINTF ::vsnprintf
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
#endif
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/darwin-g++/qplatformdefs.h b/mkspecs/darwin-g++/qplatformdefs.h
index 20ffac9e5b..f89d4bee80 100644
--- a/mkspecs/darwin-g++/qplatformdefs.h
+++ b/mkspecs/darwin-g++/qplatformdefs.h
@@ -79,7 +79,7 @@
#undef QT_OPEN_LARGEFILE
#define QT_OPEN_LARGEFILE 0
-#define QT_SNPRINTF ::snprintf
-#define QT_VSNPRINTF ::vsnprintf
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/devices/linux-tegra2-g++/qmake.conf b/mkspecs/devices/linux-tegra2-g++/qmake.conf
index 320e1b8a21..adadc4d5b0 100644
--- a/mkspecs/devices/linux-tegra2-g++/qmake.conf
+++ b/mkspecs/devices/linux-tegra2-g++/qmake.conf
@@ -6,9 +6,7 @@
# A typical configure line looks like this:
# <path-to-qt-src>/configure -opensource -confirm-license -make libs -prefix /usr/local/Qt-5.0.0/Qt5-tegra2
# -device tegra2 -device-option CROSS_COMPILE=<path-to-crosstoolchain>/bin/arm-none-linux-gnueabi- \
-# -sysroot <path-to-rootfs> -no-neon
-
-# CAUTION: The Tegra2 chips don't support neon, make sure it will not be used (-no-neon)
+# -sysroot <path-to-rootfs>
include(../common/linux_device_pre.conf)
diff --git a/mkspecs/features/configure.prf b/mkspecs/features/configure.prf
index 39144e7216..fe41c541a2 100644
--- a/mkspecs/features/configure.prf
+++ b/mkspecs/features/configure.prf
@@ -53,6 +53,12 @@ defineTest(qtCompileTest) {
# Disable qmake features which are typically counterproductive for tests
qmake_configs = "\"CONFIG -= qt debug_and_release app_bundle lib_bundle\""
+ # On WinRT we need to change the entry point as we cannot create windows
+ # applications
+ winrt {
+ qmake_configs += " \"QMAKE_LFLAGS+=/ENTRY:main\""
+ }
+
# Clean up after previous run
exists($$test_out_dir/Makefile):qtRunLoggedCommand("$$test_cmd_base $$QMAKE_MAKE distclean")
diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf
index 19b26460a0..82e2812f3b 100644
--- a/mkspecs/features/create_cmake.prf
+++ b/mkspecs/features/create_cmake.prf
@@ -195,7 +195,7 @@ mac {
CMAKE_LIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}d.dll
CMAKE_LIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.dll
- win32-g++ {
+ mingw {
CMAKE_WINMAIN_FILE_LOCATION_DEBUG = libqtmain$${QT_LIBINFIX}d.a
CMAKE_WINMAIN_FILE_LOCATION_RELEASE = libqtmain$${QT_LIBINFIX}.a
diff --git a/mkspecs/features/ctest_testcase_common.prf b/mkspecs/features/ctest_testcase_common.prf
index a9461eb4ae..a2b7e8e72b 100644
--- a/mkspecs/features/ctest_testcase_common.prf
+++ b/mkspecs/features/ctest_testcase_common.prf
@@ -51,7 +51,7 @@ load(cmake_functions)
CMAKE_BUILD_TYPE = Debug
CONFIG(release, debug|release):CMAKE_BUILD_TYPE = Release
-win32-g++*:isEmpty(CROSS_COMPILE):CMAKE_GENERATOR = -G \"MinGW Makefiles\"
+mingw:isEmpty(CROSS_COMPILE):CMAKE_GENERATOR = -G \"MinGW Makefiles\"
win32:equals(QT_ARCH, x86_64) {
win32-msvc2010:CMAKE_GENERATOR = -G \"Visual Studio 10 Win64\"
win32-msvc2012:CMAKE_GENERATOR = -G \"Visual Studio 11 Win64\"
diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf
index ee0fdfef48..dd2923f9be 100644
--- a/mkspecs/features/default_post.prf
+++ b/mkspecs/features/default_post.prf
@@ -82,5 +82,7 @@ breakpad {
!isEmpty(QMAKE_STRIP):QMAKE_POST_LINK = $$QMAKE_POST_LINK$$escape_expand(\\n\\t)$$quote($$QMAKE_STRIP $$DEBUGFILENAME)
}
+!precompile_header: SOURCES += $$NO_PCH_SOURCES
+
QMAKE_INCDIR += $$QMAKE_INCDIR_POST
QMAKE_LIBDIR += $$QMAKE_LIBDIR_POST
diff --git a/mkspecs/features/moc.prf b/mkspecs/features/moc.prf
index 59ac9db05b..f60e7b54e3 100644
--- a/mkspecs/features/moc.prf
+++ b/mkspecs/features/moc.prf
@@ -21,12 +21,12 @@ win32:count(INCLUDEPATH, 40, >) {
EOC = $$escape_expand(\\r\\h)
}
+ RET = @echo -I$$QMAKESPEC > $$WIN_INCLUDETEMP $$EOC
+ RET += @echo -I$$_PRO_FILE_PWD_ >> $$WIN_INCLUDETEMP $$EOC
unset(INCFILELIST)
- RET =
for(incfile, INCLUDEPATH) {
INCFILELIST = -I$$incfile
- isEmpty(RET): RET += @echo $$INCFILELIST> $$WIN_INCLUDETEMP $$EOC
- else: RET += @echo $$INCFILELIST>> $$WIN_INCLUDETEMP $$EOC
+ RET += @echo $$INCFILELIST>> $$WIN_INCLUDETEMP $$EOC
}
!isEmpty(INCFILELIST):RET += @echo $$INCFILELIST>> $$WIN_INCLUDETEMP $$EOC
@@ -45,7 +45,8 @@ defineReplace(mocCmdBase) {
}
incvar = @$$WIN_INCLUDETEMP
} else {
- incvar = $(INCPATH)
+ incvar = -I$$QMAKESPEC -I$$_PRO_FILE_PWD_ $$join(INCLUDEPATH, " -I", -I)
+ incvar += $$QMAKE_FRAMEWORKPATH_FLAGS
}
RET += $$QMAKE_MOC $(DEFINES) $$join(QMAKE_COMPILER_DEFINES, " -D", -D) $$incvar $$join(QMAKE_DEFAULT_INCDIRS, " -I", -I) $$QMAKE_MOC_OPTIONS
return($$RET)
diff --git a/mkspecs/features/precompile_header.prf b/mkspecs/features/precompile_header.prf
new file mode 100644
index 0000000000..9b233dd872
--- /dev/null
+++ b/mkspecs/features/precompile_header.prf
@@ -0,0 +1,24 @@
+#
+# W A R N I N G
+# -------------
+#
+# This file is not part of the Qt API. It exists purely as an
+# implementation detail. It may change from version to version
+# without notice, or even be removed.
+#
+# We mean it.
+#
+
+#
+# Set up extra compiler for PCH disabled sources
+#
+no_pch_compiler.commands = $$QMAKE_CXX -c $(CXXFLAGS) $(INCPATH) ${QMAKE_FILE_IN}
+msvc: no_pch_compiler.commands += -Fo${QMAKE_FILE_OUT}
+else: no_pch_compiler.commands += -o ${QMAKE_FILE_OUT}
+no_pch_compiler.dependency_type = TYPE_C
+no_pch_compiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)}
+no_pch_compiler.input = NO_PCH_SOURCES
+no_pch_compiler.variable_out = OBJECTS
+no_pch_compiler.name = compiling[no_pch] ${QMAKE_FILE_IN}
+silent: no_pch_compiler.commands = @echo compiling[no_pch] ${QMAKE_FILE_IN} && $$no_pch_compiler.commands
+QMAKE_EXTRA_COMPILERS += no_pch_compiler
diff --git a/mkspecs/features/qlalr.prf b/mkspecs/features/qlalr.prf
new file mode 100644
index 0000000000..e5e4b87802
--- /dev/null
+++ b/mkspecs/features/qlalr.prf
@@ -0,0 +1,49 @@
+qtPrepareTool(QMAKE_QLALR, qlalr)
+
+isEmpty(QLALR_DIR): QLALR_DIR = .
+
+!isEmpty(QLALRSOURCES) {
+ INCLUDEPATH += $$absolute_path($$QLALR_DIR, $$OUT_PWD)
+}
+
+for (s, QLALRSOURCES) {
+ sf = $$absolute_path($$s, $$_PRO_FILE_PWD_)
+ QMAKE_INTERNAL_INCLUDED_FILES += $$sf
+ sfl = $$cat($$sf, lines)
+ parser = $$lower($$member($$list($$find(sfl, "^%parser\\s")), 1))
+ isEmpty(parser): error("Could not extract %parser from $$sf")
+ decl = $$member($$list($$find(sfl, "^%decl\\s")), 1)
+ isEmpty(decl): error("Could not extract %decl from $$sf")
+ impl = $$member($$list($$find(sfl, "^%impl\\s")), 1)
+ isEmpty(impl): error("Could not extract %impl from $$sf")
+ base = qlalr_$$replace(sf, ^.*/([^./]+)[^/]*$, \\1)
+
+ invar = $$upper($$base)_SOURCES
+ $$invar = $$sf
+ $${base}.input = $$invar
+ $${base}.output = $$QLALR_DIR/$${parser}.cpp
+ $${base}.variable_out = GENERATED_SOURCES
+ $${base}.commands = $$QMAKE_QLALR $$QMAKE_QLALRFLAGS ${QMAKE_FILE_IN}
+ silent: $${base}.commands = @echo qlalr ${QMAKE_FILE_IN} && $${base}.commands
+ $${base}.name = QLALR ${QMAKE_FILE_IN}
+
+ $${base}_h.input = $$invar
+ $${base}_h.output = $$QLALR_DIR/$${parser}_p.h
+ $${base}_h.CONFIG = no_link
+ $${base}_h.depends = $$QLALR_DIR/$${parser}.cpp
+ $${base}_h.commands = $$escape_expand(\\n) # force creation of rule
+
+ $${base}_decl.input = $$invar
+ $${base}_decl.output = $$QLALR_DIR/$${decl}
+ $${base}_decl.CONFIG = no_link
+ $${base}_decl.depends = $$QLALR_DIR/$${parser}.cpp
+ $${base}_decl.commands = $$escape_expand(\\n) # force creation of rule
+
+ $${base}_impl.input = $$invar
+ $${base}_impl.output = $$QLALR_DIR/$${impl}
+ $${base}_impl.variable_out = GENERATED_SOURCES
+ $${base}_impl.depends = $$QLALR_DIR/$${parser}.cpp
+ $${base}_impl.commands = $$escape_expand(\\n) # force creation of rule
+
+ QMAKE_EXTRA_COMPILERS += $$base $${base}_h $${base}_decl $${base}_impl
+}
diff --git a/mkspecs/features/qml_plugin.prf b/mkspecs/features/qml_plugin.prf
index af941058db..f3739572c7 100644
--- a/mkspecs/features/qml_plugin.prf
+++ b/mkspecs/features/qml_plugin.prf
@@ -101,7 +101,7 @@ load(qt_common)
load(qml_module)
-unix|win32-g++* {
+unix|mingw {
!isEmpty(_QMAKE_SUPER_CACHE_): \
lib_replace.match = $$dirname(_QMAKE_SUPER_CACHE_)/[^/][^/]*/lib
else: \
diff --git a/mkspecs/features/qt_common.prf b/mkspecs/features/qt_common.prf
index 22d66e8907..051420e4f1 100644
--- a/mkspecs/features/qt_common.prf
+++ b/mkspecs/features/qt_common.prf
@@ -27,11 +27,15 @@ warnings_are_errors:warning_clean {
# This setting is compiler-dependent anyway because it depends on the version of the
# compiler.
clang {
- # Apple clang 4.0-4.2
- # Regular clang is not tested
- ver = $${QT_APPLE_CLANG_MAJOR_VERSION}.$${QT_APPLE_CLANG_MINOR_VERSION}
- contains(ver, "4\\.[012]") {
- QMAKE_CXXFLAGS += -Werror -Wno-error=\\$${LITERAL_HASH}warnings -Wno-error=deprecated-declarations $$WERROR
+ # Apple clang 4.0-4.2,5.0
+ # Regular clang 3.3 & 3.4
+ apple_ver = $${QT_APPLE_CLANG_MAJOR_VERSION}.$${QT_APPLE_CLANG_MINOR_VERSION}
+ reg_ver = $${QT_CLANG_MAJOR_VERSION}.$${QT_CLANG_MINOR_VERSION}
+ contains(apple_ver, "4\\.[012]|5\\.0")|contains(reg_ver, "3\\.[34]") {
+ QMAKE_CXXFLAGS_WARN_ON += -Werror -Wno-error=\\$${LITERAL_HASH}warnings -Wno-error=deprecated-declarations $$WERROR
+
+ # glibc's bswap_XX macros use the "register" keyword
+ linux:equals(reg_ver, "3.4"): QMAKE_CXXFLAGS_WARN_ON += -Wno-error=deprecated-register
}
} else:intel_icc:linux {
# Intel CC 13.0 - 14.0, on Linux only
@@ -43,20 +47,20 @@ warnings_are_errors:warning_clean {
# 1478: function "entity" (declared at line N) was declared deprecated
# 1881: argument must be a constant null pointer value
# (NULL in C++ is usually a literal 0)
- QMAKE_CXXFLAGS += -Werror -ww177,1224,1478,1881 $$WERROR
+ QMAKE_CXXFLAGS_WARN_ON += -Werror -ww177,1224,1478,1881 $$WERROR
}
} else:gcc:!clang:!intel_icc {
# GCC 4.6-4.8
ver = $${QT_GCC_MAJOR_VERSION}.$${QT_GCC_MINOR_VERSION}
contains(ver, "4\\.[678]") {
- QMAKE_CXXFLAGS += -Werror -Wno-error=cpp -Wno-error=deprecated-declarations $$WERROR
+ QMAKE_CXXFLAGS_WARN_ON += -Werror -Wno-error=cpp -Wno-error=deprecated-declarations $$WERROR
# GCC prints this bogus warning, after it has inlined a lot of code
# error: assuming signed overflow does not occur when assuming that (X + c) < X is always false
- QMAKE_CXXFLAGS += -Wno-error=strict-overflow
+ QMAKE_CXXFLAGS_WARN_ON += -Wno-error=strict-overflow
# Work-around for bug https://code.google.com/p/android/issues/detail?id=58135
- android: QMAKE_CXXFLAGS += -Wno-error=literal-suffix
+ android: QMAKE_CXXFLAGS_WARN_ON += -Wno-error=literal-suffix
}
}
unset(ver)
diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf
index 11509eeb40..32a722fb53 100644
--- a/mkspecs/features/qt_module.prf
+++ b/mkspecs/features/qt_module.prf
@@ -126,6 +126,33 @@ aix-g++* {
QMAKE_CXXFLAGS += -mminimal-toc
}
+sse2:!contains(QT_CPU_FEATURES.$$QT_ARCH, sse2):!host_build:!if(static:contains(QT_CONFIG, shared)) {
+ # If the compiler supports SSE2, enable it unconditionally in all of Qt shared libraries
+ # (and only the libraries). This is not expected to be a problem because:
+ # - on Windows, sharing of libraries is uncommon
+ # - on Mac OS X, all x86 CPUs already have SSE2 support (we won't even reach here)
+ # - on Linux, the dynamic loader can find the libraries on LIBDIR/sse2/
+ # The last guarantee does not apply to executables and plugins, so we can't enable for them.
+ QT_CPU_FEATURES.$$QT_ARCH += sse sse2
+ QMAKE_CFLAGS += $$QMAKE_CFLAGS_SSE2
+ QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_SSE2
+}
+
+clang {
+ apple_clang_ver = $${QT_APPLE_CLANG_MAJOR_VERSION}.$${QT_APPLE_CLANG_MINOR_VERSION}
+ reg_clang_ver = $${QT_CLANG_MAJOR_VERSION}.$${QT_CLANG_MINOR_VERSION}
+ !lessThan(apple_clang_ver, "5.1")|!lessThan(reg_clang_ver, "3.4"): \
+ CONFIG += compiler_supports_fpmath
+} else: gcc {
+ CONFIG += compiler_supports_fpmath
+}
+
+equals(QT_ARCH, i386):contains(QT_CPU_FEATURES.$$QT_ARCH, sse2):compiler_supports_fpmath {
+ # Turn on SSE-based floating-point math
+ QMAKE_CFLAGS += -mfpmath=sse
+ QMAKE_CXXFLAGS += -mfpmath=sse
+}
+
android: CONFIG += qt_android_deps
#install directives
@@ -146,7 +173,7 @@ else: \
lib_replace.CONFIG = path
QMAKE_PRL_INSTALL_REPLACE += include_replace lib_replace
-unix|win32-g++* {
+unix|mingw {
CONFIG += create_pc
QMAKE_PKGCONFIG_LIBDIR = $$lib_replace.replace
QMAKE_PKGCONFIG_INCDIR = $$include_replace.replace
@@ -161,7 +188,7 @@ unix {
QMAKE_LIBTOOL_INSTALL_REPLACE += include_replace lib_replace
}
-unix|win32-g++* {
+unix|mingw {
QMAKE_PKGCONFIG_NAME = $$replace(TARGET, ^Qt, "Qt$$section(VERSION, ., 0, 0) ")
QMAKE_PKGCONFIG_FILE = $$replace(TARGET, ^Qt, Qt$$section(VERSION, ., 0, 0))
for(i, MODULE_DEPENDS): \
diff --git a/mkspecs/features/qt_plugin.prf b/mkspecs/features/qt_plugin.prf
index c9fe22688b..f710bbff43 100644
--- a/mkspecs/features/qt_plugin.prf
+++ b/mkspecs/features/qt_plugin.prf
@@ -55,7 +55,7 @@ load(qt_common)
wince*:LIBS += $$QMAKE_LIBS_GUI
QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF
-unix|win32-g++* {
+unix|mingw {
!isEmpty(_QMAKE_SUPER_CACHE_): \
rplbase = $$dirname(_QMAKE_SUPER_CACHE_)/[^/][^/]*
else: \
diff --git a/mkspecs/features/win32/windows.prf b/mkspecs/features/win32/windows.prf
index d0b59e05e0..82e0ebe1b5 100644
--- a/mkspecs/features/win32/windows.prf
+++ b/mkspecs/features/win32/windows.prf
@@ -1,7 +1,7 @@
CONFIG -= console
contains(TEMPLATE, ".*app"){
QMAKE_LFLAGS += $$QMAKE_LFLAGS_WINDOWS $$QMAKE_LFLAGS_EXE
- win32-g++:DEFINES += QT_NEEDS_QMAIN
+ mingw:DEFINES += QT_NEEDS_QMAIN
qt:for(entryLib, $$list($$unique(QMAKE_LIBS_QT_ENTRY))) {
isEqual(entryLib, -lqtmain): {
diff --git a/mkspecs/features/winrt/console.prf b/mkspecs/features/winrt/console.prf
new file mode 100644
index 0000000000..c4afe5b96e
--- /dev/null
+++ b/mkspecs/features/winrt/console.prf
@@ -0,0 +1,5 @@
+# This is an empty prf file to overwrite the win32 version.
+# On Windows RT all applications need to be windows applications
+# and also link to winmain. Inside winmain we create the launch
+# arguments and also initialize the UI.
+
diff --git a/mkspecs/freebsd-g++/qplatformdefs.h b/mkspecs/freebsd-g++/qplatformdefs.h
index 329c46e8d6..358e93aaf9 100644
--- a/mkspecs/freebsd-g++/qplatformdefs.h
+++ b/mkspecs/freebsd-g++/qplatformdefs.h
@@ -82,7 +82,7 @@
#define QT_OPEN_LARGEFILE 0
-#define QT_SNPRINTF ::snprintf
-#define QT_VSNPRINTF ::vsnprintf
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/hurd-g++/qplatformdefs.h b/mkspecs/hurd-g++/qplatformdefs.h
index 8b47450abe..a6642eb83a 100644
--- a/mkspecs/hurd-g++/qplatformdefs.h
+++ b/mkspecs/hurd-g++/qplatformdefs.h
@@ -85,8 +85,8 @@
#include "../common/posix/qplatformdefs.h"
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
-#define QT_SNPRINTF ::snprintf
-#define QT_VSNPRINTF ::vsnprintf
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
#endif
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/irix-cc-64/qplatformdefs.h b/mkspecs/irix-cc-64/qplatformdefs.h
index 5d8a792950..7338595bc8 100644
--- a/mkspecs/irix-cc-64/qplatformdefs.h
+++ b/mkspecs/irix-cc-64/qplatformdefs.h
@@ -88,8 +88,8 @@
// Irix 6.5 and better
#if defined(_SGIAPI)
-#define QT_SNPRINTF ::snprintf
-#define QT_VSNPRINTF ::vsnprintf
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
#endif
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/irix-cc/qplatformdefs.h b/mkspecs/irix-cc/qplatformdefs.h
index 5d8a792950..7338595bc8 100644
--- a/mkspecs/irix-cc/qplatformdefs.h
+++ b/mkspecs/irix-cc/qplatformdefs.h
@@ -88,8 +88,8 @@
// Irix 6.5 and better
#if defined(_SGIAPI)
-#define QT_SNPRINTF ::snprintf
-#define QT_VSNPRINTF ::vsnprintf
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
#endif
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/irix-g++/qplatformdefs.h b/mkspecs/irix-g++/qplatformdefs.h
index 38d107e1e0..90c3349c21 100644
--- a/mkspecs/irix-g++/qplatformdefs.h
+++ b/mkspecs/irix-g++/qplatformdefs.h
@@ -95,8 +95,8 @@
// Irix 6.5 and better
#if defined(_SGIAPI)
-#define QT_SNPRINTF ::snprintf
-#define QT_VSNPRINTF ::vsnprintf
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
#endif
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/linux-clang/qplatformdefs.h b/mkspecs/linux-clang/qplatformdefs.h
index bdf4d5056d..7366ca9bfa 100644
--- a/mkspecs/linux-clang/qplatformdefs.h
+++ b/mkspecs/linux-clang/qplatformdefs.h
@@ -87,14 +87,14 @@
#undef QT_SOCKLEN_T
#if defined(__GLIBC__) && (__GLIBC__ >= 2)
-#define QT_SOCKLEN_T socklen_t
+#define QT_SOCKLEN_T socklen_t
#else
-#define QT_SOCKLEN_T int
+#define QT_SOCKLEN_T int
#endif
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
-#define QT_SNPRINTF ::snprintf
-#define QT_VSNPRINTF ::vsnprintf
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
#endif
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/linux-cxx/qplatformdefs.h b/mkspecs/linux-cxx/qplatformdefs.h
index a948d169f0..ed36408e2e 100644
--- a/mkspecs/linux-cxx/qplatformdefs.h
+++ b/mkspecs/linux-cxx/qplatformdefs.h
@@ -94,8 +94,8 @@
#endif
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
-#define QT_SNPRINTF ::snprintf
-#define QT_VSNPRINTF ::vsnprintf
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
#endif
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/linux-g++/qplatformdefs.h b/mkspecs/linux-g++/qplatformdefs.h
index 82d0e1663c..0e3e6077e3 100644
--- a/mkspecs/linux-g++/qplatformdefs.h
+++ b/mkspecs/linux-g++/qplatformdefs.h
@@ -93,8 +93,8 @@
#endif
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
-#define QT_SNPRINTF ::snprintf
-#define QT_VSNPRINTF ::vsnprintf
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
#endif
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/linux-icc/qmake.conf b/mkspecs/linux-icc/qmake.conf
index ee5f1f0ea4..d0ca604f07 100644
--- a/mkspecs/linux-icc/qmake.conf
+++ b/mkspecs/linux-icc/qmake.conf
@@ -22,6 +22,7 @@ QMAKE_CFLAGS_DEBUG = -O0 -g
QMAKE_CFLAGS_SHLIB = -fPIC -fno-jump-tables
QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
QMAKE_CFLAGS_YACC =
+QMAKE_CFLAGS_ISYSTEM = -isystem
QMAKE_CFLAGS_THREAD = -D_REENTRANT
QMAKE_CFLAGS_SSE2 += -xSSE2
diff --git a/mkspecs/linux-kcc/qplatformdefs.h b/mkspecs/linux-kcc/qplatformdefs.h
index a491e7ed6c..dbad004602 100644
--- a/mkspecs/linux-kcc/qplatformdefs.h
+++ b/mkspecs/linux-kcc/qplatformdefs.h
@@ -97,8 +97,8 @@
#endif
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
-#define QT_SNPRINTF ::snprintf
-#define QT_VSNPRINTF ::vsnprintf
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
#endif
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/linux-llvm/qplatformdefs.h b/mkspecs/linux-llvm/qplatformdefs.h
index cbbe04e80c..6dae1a8ae5 100644
--- a/mkspecs/linux-llvm/qplatformdefs.h
+++ b/mkspecs/linux-llvm/qplatformdefs.h
@@ -94,8 +94,8 @@
#endif
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
-#define QT_SNPRINTF ::snprintf
-#define QT_VSNPRINTF ::vsnprintf
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
#endif
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/linux-lsb-g++/qplatformdefs.h b/mkspecs/linux-lsb-g++/qplatformdefs.h
index 5060e1a222..a4855bcde5 100644
--- a/mkspecs/linux-lsb-g++/qplatformdefs.h
+++ b/mkspecs/linux-lsb-g++/qplatformdefs.h
@@ -105,8 +105,8 @@
#endif
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
-#define QT_SNPRINTF ::snprintf
-#define QT_VSNPRINTF ::vsnprintf
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
#endif
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/linux-pgcc/qplatformdefs.h b/mkspecs/linux-pgcc/qplatformdefs.h
index a948d169f0..ed36408e2e 100644
--- a/mkspecs/linux-pgcc/qplatformdefs.h
+++ b/mkspecs/linux-pgcc/qplatformdefs.h
@@ -94,8 +94,8 @@
#endif
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
-#define QT_SNPRINTF ::snprintf
-#define QT_VSNPRINTF ::vsnprintf
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
#endif
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/lynxos-g++/qplatformdefs.h b/mkspecs/lynxos-g++/qplatformdefs.h
index 469d032299..314c61443f 100644
--- a/mkspecs/lynxos-g++/qplatformdefs.h
+++ b/mkspecs/lynxos-g++/qplatformdefs.h
@@ -86,8 +86,8 @@
#endif
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
-#define QT_SNPRINTF ::snprintf
-#define QT_VSNPRINTF ::vsnprintf
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
#endif
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/macx-ios-clang/features/default_post.prf b/mkspecs/macx-ios-clang/features/default_post.prf
index 3428823624..6662bb9c8e 100644
--- a/mkspecs/macx-ios-clang/features/default_post.prf
+++ b/mkspecs/macx-ios-clang/features/default_post.prf
@@ -7,6 +7,9 @@ contains(QMAKE_MAC_SDK, ^iphonesimulator.*) {
CONFIG += iphonesimulator
}
+iphonesimulator_and_iphoneos:iphonesimulator: \
+ QMAKE_MAC_SDK ~= s,^iphoneos,iphonesimulator,
+
# Resolve config so we don't need to use CONFIG() later on
CONFIG(iphonesimulator, iphonesimulator|iphoneos) {
CONFIG -= iphoneos
@@ -118,15 +121,6 @@ equals(TEMPLATE, app) {
iphonesimulator.name = Simulator
iphoneos.name = Device
addExclusiveBuilds(iphonesimulator, iphoneos)
-
- iphonesimulator_and_iphoneos:iphonesimulator {
- QT_ARCH = i386
- QMAKE_MAC_SDK ~= s,^iphoneos,iphonesimulator,
-
- # Since the CPU feature detection done by configure is limited to one
- # target at the moment, we disable SIMD support for simulator.
- CONFIG -= simd
- }
} else: equals(TEMPLATE, subdirs) {
# Prevent recursion into host_builds
for(subdir, SUBDIRS) {
@@ -184,7 +178,7 @@ macx-xcode {
launch_images.files = $$copy_image.output
QMAKE_BUNDLE_DATA += launch_images
- !c++11 {
+ !contains(QT_CONFIG, c++11) {
# Explicitly use libstdc++ if C++11 support is not enabled,
# as otherwise Xcode will choose the compiler default based
# on the deployment target, which for iOS 7 is libc++. This
diff --git a/mkspecs/macx-ios-clang/features/default_pre.prf b/mkspecs/macx-ios-clang/features/default_pre.prf
index 3501f5eae0..7b8f9c9b5d 100644
--- a/mkspecs/macx-ios-clang/features/default_pre.prf
+++ b/mkspecs/macx-ios-clang/features/default_pre.prf
@@ -8,3 +8,12 @@ load(default_pre)
# Check for supported Xcode versions
lessThan(QMAKE_XCODE_VERSION, "4.3"): \
error("This mkspec requires Xcode 4.3 or later")
+
+iphonesimulator_and_iphoneos:iphonesimulator {
+ # For a iphonesimulator_and_iphoneos build all the config tests
+ # are based on the iPhoneOS ARM SDK, but we know that the simulator
+ # is i386 and that we support SSE/SSE2.
+ QT_ARCH = i386
+ QT_CPU_FEATURES.i386 = sse sse2
+ DEFINES += QT_COMPILER_SUPPORTS_SSE2
+}
diff --git a/mkspecs/netbsd-g++/qplatformdefs.h b/mkspecs/netbsd-g++/qplatformdefs.h
index af7d0acf24..5388141931 100644
--- a/mkspecs/netbsd-g++/qplatformdefs.h
+++ b/mkspecs/netbsd-g++/qplatformdefs.h
@@ -84,8 +84,8 @@
// NetBSD 1.0 - 1.3.3 int
// NetBSD 1.4 - 1.5 socklen_t
-#define QT_SNPRINTF ::snprintf
-#define QT_VSNPRINTF ::vsnprintf
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
// Older NetBSD versions may still use the a.out format instead of ELF.
#ifndef __ELF__
diff --git a/mkspecs/openbsd-g++/qplatformdefs.h b/mkspecs/openbsd-g++/qplatformdefs.h
index 9901bc632f..51844ee657 100644
--- a/mkspecs/openbsd-g++/qplatformdefs.h
+++ b/mkspecs/openbsd-g++/qplatformdefs.h
@@ -85,8 +85,8 @@
// OpenBSD 2.2 - 2.4 int
// OpenBSD 2.5 - 2.8 socklen_t
-#define QT_SNPRINTF ::snprintf
-#define QT_VSNPRINTF ::vsnprintf
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
// 1003.1c-1995 says on page 38 (2.9.3, paragraph 3) that if _POSIX_THREADS
// is defined, then _POSIX_THREAD_SAFE_FUNCTIONS must also be defined.
diff --git a/mkspecs/qnx-armv7le-qcc/qplatformdefs.h b/mkspecs/qnx-armv7le-qcc/qplatformdefs.h
index 2fac2ae3d2..b47aecde0d 100644
--- a/mkspecs/qnx-armv7le-qcc/qplatformdefs.h
+++ b/mkspecs/qnx-armv7le-qcc/qplatformdefs.h
@@ -83,8 +83,15 @@
#include <arpa/inet.h>
#define QT_USE_XOPEN_LFS_EXTENSIONS
+#if !defined(__EXT_QNX__READDIR64_R)
#define QT_NO_READDIR64
+#endif
#include "../common/posix/qplatformdefs.h"
+#if defined(__EXT_QNX__READDIR64_R)
+#define QT_EXT_QNX_READDIR_R ::_readdir64_r
+#elif defined(__EXT_QNX__READDIR_R)
+#define QT_EXT_QNX_READDIR_R ::_readdir_r
+#endif
#define QT_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
diff --git a/mkspecs/qnx-x86-qcc/qplatformdefs.h b/mkspecs/qnx-x86-qcc/qplatformdefs.h
index 2fac2ae3d2..b47aecde0d 100644
--- a/mkspecs/qnx-x86-qcc/qplatformdefs.h
+++ b/mkspecs/qnx-x86-qcc/qplatformdefs.h
@@ -83,8 +83,15 @@
#include <arpa/inet.h>
#define QT_USE_XOPEN_LFS_EXTENSIONS
+#if !defined(__EXT_QNX__READDIR64_R)
#define QT_NO_READDIR64
+#endif
#include "../common/posix/qplatformdefs.h"
+#if defined(__EXT_QNX__READDIR64_R)
+#define QT_EXT_QNX_READDIR_R ::_readdir64_r
+#elif defined(__EXT_QNX__READDIR_R)
+#define QT_EXT_QNX_READDIR_R ::_readdir_r
+#endif
#define QT_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
diff --git a/mkspecs/sco-cc/qplatformdefs.h b/mkspecs/sco-cc/qplatformdefs.h
index a880f4579b..5d039f6b3b 100644
--- a/mkspecs/sco-cc/qplatformdefs.h
+++ b/mkspecs/sco-cc/qplatformdefs.h
@@ -81,7 +81,7 @@
#undef QT_SOCKLEN_T
#define QT_SOCKLEN_T size_t
-#define QT_SNPRINTF ::snprintf
-#define QT_VSNPRINTF ::vsnprintf
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/sco-g++/qplatformdefs.h b/mkspecs/sco-g++/qplatformdefs.h
index f0e5eb8293..cff39e6d1a 100644
--- a/mkspecs/sco-g++/qplatformdefs.h
+++ b/mkspecs/sco-g++/qplatformdefs.h
@@ -85,7 +85,7 @@
#undef QT_SOCKLEN_T
#define QT_SOCKLEN_T int
-#define QT_SNPRINTF ::snprintf
-#define QT_VSNPRINTF ::vsnprintf
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/solaris-cc-64/qplatformdefs.h b/mkspecs/solaris-cc-64/qplatformdefs.h
index acdc14c81b..a0560c0157 100644
--- a/mkspecs/solaris-cc-64/qplatformdefs.h
+++ b/mkspecs/solaris-cc-64/qplatformdefs.h
@@ -87,8 +87,8 @@ static inline int qt_socket_connect(int s, struct sockaddr *addr, QT_SOCKLEN_T a
{ return ::connect(s, addr, addrlen); }
// Only Solaris 7 and better support 64-bit
-#define QT_SNPRINTF ::snprintf
-#define QT_VSNPRINTF ::vsnprintf
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
#ifdef connect
#undef connect
diff --git a/mkspecs/solaris-cc/qplatformdefs.h b/mkspecs/solaris-cc/qplatformdefs.h
index f905ad55c3..0b72174c6f 100644
--- a/mkspecs/solaris-cc/qplatformdefs.h
+++ b/mkspecs/solaris-cc/qplatformdefs.h
@@ -113,8 +113,8 @@ extern "C" int gethostname(char *, int);
#if defined(_XOPEN_UNIX)
// Solaris 2.6 and better
-#define QT_SNPRINTF ::snprintf
-#define QT_VSNPRINTF ::vsnprintf
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
#endif
#ifdef connect
diff --git a/mkspecs/solaris-g++-64/qplatformdefs.h b/mkspecs/solaris-g++-64/qplatformdefs.h
index 4d408bf89e..11f25a5fc7 100644
--- a/mkspecs/solaris-g++-64/qplatformdefs.h
+++ b/mkspecs/solaris-g++-64/qplatformdefs.h
@@ -100,7 +100,7 @@ static inline int qt_socket_bind(int s, struct sockaddr *addr, QT_SOCKLEN_T addr
#endif
// Only Solaris 7 and better support 64-bit
-#define QT_SNPRINTF ::snprintf
-#define QT_VSNPRINTF ::vsnprintf
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/solaris-g++/qplatformdefs.h b/mkspecs/solaris-g++/qplatformdefs.h
index 44ab7bbb53..a1cd5797fa 100644
--- a/mkspecs/solaris-g++/qplatformdefs.h
+++ b/mkspecs/solaris-g++/qplatformdefs.h
@@ -128,8 +128,8 @@ extern "C" int gethostname(char *, int);
#if defined(_XOPEN_UNIX)
// Solaris 2.6 and better
-#define QT_SNPRINTF ::snprintf
-#define QT_VSNPRINTF ::vsnprintf
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
#endif
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/tru64-cxx/qplatformdefs.h b/mkspecs/tru64-cxx/qplatformdefs.h
index 0ff0aa83e7..71e9bb4ace 100644
--- a/mkspecs/tru64-cxx/qplatformdefs.h
+++ b/mkspecs/tru64-cxx/qplatformdefs.h
@@ -102,8 +102,8 @@ extern "C" int usleep(useconds_t);
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE-0 >= 400)
// Tru64 5.0 and better
-#define QT_SNPRINTF ::snprintf
-#define QT_VSNPRINTF ::vsnprintf
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
#endif
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/tru64-g++/qplatformdefs.h b/mkspecs/tru64-g++/qplatformdefs.h
index 0ff0aa83e7..71e9bb4ace 100644
--- a/mkspecs/tru64-g++/qplatformdefs.h
+++ b/mkspecs/tru64-g++/qplatformdefs.h
@@ -102,8 +102,8 @@ extern "C" int usleep(useconds_t);
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE-0 >= 400)
// Tru64 5.0 and better
-#define QT_SNPRINTF ::snprintf
-#define QT_VSNPRINTF ::vsnprintf
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
#endif
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/unixware-cc/qplatformdefs.h b/mkspecs/unixware-cc/qplatformdefs.h
index 795e7cc98e..73e25a3b79 100644
--- a/mkspecs/unixware-cc/qplatformdefs.h
+++ b/mkspecs/unixware-cc/qplatformdefs.h
@@ -85,7 +85,7 @@
#define QT_OFF_T off_t
#define QT_SOCKLEN_T size_t
-#define QT_SNPRINTF ::snprintf
-#define QT_VSNPRINTF ::vsnprintf
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/unixware-g++/qplatformdefs.h b/mkspecs/unixware-g++/qplatformdefs.h
index 795e7cc98e..73e25a3b79 100644
--- a/mkspecs/unixware-g++/qplatformdefs.h
+++ b/mkspecs/unixware-g++/qplatformdefs.h
@@ -85,7 +85,7 @@
#define QT_OFF_T off_t
#define QT_SOCKLEN_T size_t
-#define QT_SNPRINTF ::snprintf
-#define QT_VSNPRINTF ::vsnprintf
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/unsupported/integrity-ghs/qplatformdefs.h b/mkspecs/unsupported/integrity-ghs/qplatformdefs.h
index 75b2c59972..ab0c134138 100644
--- a/mkspecs/unsupported/integrity-ghs/qplatformdefs.h
+++ b/mkspecs/unsupported/integrity-ghs/qplatformdefs.h
@@ -110,37 +110,37 @@
#define QT_OFF_T long
#endif
-#define QT_STAT_REG S_IFREG
-#define QT_STAT_DIR S_IFDIR
-#define QT_STAT_MASK S_IFMT
-#define QT_STAT_LNK S_IFLNK
-#define QT_SOCKET_CONNECT ::connect
-#define QT_SOCKET_BIND ::bind
-#define QT_FILENO fileno
+#define QT_STAT_REG S_IFREG
+#define QT_STAT_DIR S_IFDIR
+#define QT_STAT_MASK S_IFMT
+#define QT_STAT_LNK S_IFLNK
+#define QT_SOCKET_CONNECT ::connect
+#define QT_SOCKET_BIND ::bind
+#define QT_FILENO fileno
#ifndef QT_CLOSE
-#define QT_CLOSE ::close
+#define QT_CLOSE ::close
#endif
#ifndef QT_READ
-#define QT_READ ::read
+#define QT_READ ::read
#endif
#ifndef QT_WRITE
-#define QT_WRITE ::write
+#define QT_WRITE ::write
#endif
-#define QT_ACCESS ::access
-#define QT_GETCWD ::getcwd
-#define QT_CHDIR ::chdir
-#define QT_MKDIR ::mkdir
-#define QT_RMDIR ::rmdir
-#define QT_OPEN_RDONLY O_RDONLY
-#define QT_OPEN_WRONLY O_WRONLY
-#define QT_OPEN_RDWR O_RDWR
-#define QT_OPEN_CREAT O_CREAT
-#define QT_OPEN_TRUNC O_TRUNC
-#define QT_OPEN_APPEND O_APPEND
-
-#define QT_SIGNAL_RETTYPE void
-#define QT_SIGNAL_ARGS int
-#define QT_SIGNAL_IGNORE SIG_IGN
+#define QT_ACCESS ::access
+#define QT_GETCWD ::getcwd
+#define QT_CHDIR ::chdir
+#define QT_MKDIR ::mkdir
+#define QT_RMDIR ::rmdir
+#define QT_OPEN_RDONLY O_RDONLY
+#define QT_OPEN_WRONLY O_WRONLY
+#define QT_OPEN_RDWR O_RDWR
+#define QT_OPEN_CREAT O_CREAT
+#define QT_OPEN_TRUNC O_TRUNC
+#define QT_OPEN_APPEND O_APPEND
+
+#define QT_SIGNAL_RETTYPE void
+#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_IGNORE SIG_IGN
#define QT_MMAP ::mmap
@@ -166,8 +166,8 @@
#define QT_SOCKLEN_T socklen_t
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
-#define QT_SNPRINTF ::snprintf
-#define QT_VSNPRINTF ::vsnprintf
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
#endif
// INTEGRITY doesn't enable the declaration in _POSIX_SOURCE mode,
diff --git a/mkspecs/unsupported/linux-armcc/qplatformdefs.h b/mkspecs/unsupported/linux-armcc/qplatformdefs.h
index 2f023824ec..c1066ee9a2 100644
--- a/mkspecs/unsupported/linux-armcc/qplatformdefs.h
+++ b/mkspecs/unsupported/linux-armcc/qplatformdefs.h
@@ -93,8 +93,8 @@
#endif
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
-#define QT_SNPRINTF ::snprintf
-#define QT_VSNPRINTF ::vsnprintf
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
#endif
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/unsupported/linux-libc++-clang/qmake.conf b/mkspecs/unsupported/linux-libc++-clang/qmake.conf
new file mode 100644
index 0000000000..bf0abb2a54
--- /dev/null
+++ b/mkspecs/unsupported/linux-libc++-clang/qmake.conf
@@ -0,0 +1,20 @@
+#
+# qmake configuration for linux-clang
+#
+
+MAKEFILE_GENERATOR = UNIX
+CONFIG += incremental
+
+QMAKE_INCREMENTAL_STYLE = sublib
+
+include(../../common/linux.conf)
+include(../../common/gcc-base-unix.conf)
+include(../../common/clang.conf)
+
+QMAKE_CFLAGS_RELEASE = -Os
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+
+QMAKE_CXXFLAGS_CXX11 += -std=c++11 -stdlib=libc++
+QMAKE_LFLAGS_CXX11 += -stdlib=libc++ -lc++abi
+
+load(qt_config)
diff --git a/mkspecs/unsupported/linux-libc++-clang/qplatformdefs.h b/mkspecs/unsupported/linux-libc++-clang/qplatformdefs.h
new file mode 100644
index 0000000000..c1066ee9a2
--- /dev/null
+++ b/mkspecs/unsupported/linux-libc++-clang/qplatformdefs.h
@@ -0,0 +1,100 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the qmake spec 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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+// 1) need to reset default environment if _BSD_SOURCE is defined
+// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0
+// 3) it seems older glibc need this to include the X/Open stuff
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE
+#endif
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+#include <features.h>
+#include <pthread.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+#include <signal.h>
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+
+#define QT_USE_XOPEN_LFS_EXTENSIONS
+#include "../../common/posix/qplatformdefs.h"
+
+#undef QT_SOCKLEN_T
+
+#if defined(__GLIBC__) && (__GLIBC__ >= 2)
+#define QT_SOCKLEN_T socklen_t
+#else
+#define QT_SOCKLEN_T int
+#endif
+
+#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
+#endif
+
+#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/unsupported/qnx-X11-g++/qplatformdefs.h b/mkspecs/unsupported/qnx-X11-g++/qplatformdefs.h
index b75598f12f..9e902ebfcd 100644
--- a/mkspecs/unsupported/qnx-X11-g++/qplatformdefs.h
+++ b/mkspecs/unsupported/qnx-X11-g++/qplatformdefs.h
@@ -84,8 +84,8 @@
#define QT_USE_XOPEN_LFS_EXTENSIONS
#include "../../common/posix/qplatformdefs.h"
-#define QT_SNPRINTF ::snprintf
-#define QT_VSNPRINTF ::vsnprintf
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
// QNX6 doesn't have getpagesize()
inline int getpagesize()
diff --git a/mkspecs/unsupported/win32-msvc2003/qplatformdefs.h b/mkspecs/unsupported/win32-msvc2003/qplatformdefs.h
index da924e4631..21f9399f33 100644
--- a/mkspecs/unsupported/win32-msvc2003/qplatformdefs.h
+++ b/mkspecs/unsupported/win32-msvc2003/qplatformdefs.h
@@ -68,49 +68,49 @@
#define Q_FS_FAT
#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct _stati64 // non-ANSI defs
-#define QT_STATBUF4TSTAT struct _stati64 // non-ANSI defs
-#define QT_STAT ::_stati64
-#define QT_FSTAT ::_fstati64
+#define QT_STATBUF struct _stati64 // non-ANSI defs
+#define QT_STATBUF4TSTAT struct _stati64 // non-ANSI defs
+#define QT_STAT ::_stati64
+#define QT_FSTAT ::_fstati64
#else
-#define QT_STATBUF struct _stat // non-ANSI defs
-#define QT_STATBUF4TSTAT struct _stat // non-ANSI defs
-#define QT_STAT ::_stat
-#define QT_FSTAT ::_fstat
+#define QT_STATBUF struct _stat // non-ANSI defs
+#define QT_STATBUF4TSTAT struct _stat // non-ANSI defs
+#define QT_STAT ::_stat
+#define QT_FSTAT ::_fstat
#endif
-#define QT_STAT_REG _S_IFREG
-#define QT_STAT_DIR _S_IFDIR
-#define QT_STAT_MASK _S_IFMT
+#define QT_STAT_REG _S_IFREG
+#define QT_STAT_DIR _S_IFDIR
+#define QT_STAT_MASK _S_IFMT
#if defined(_S_IFLNK)
-# define QT_STAT_LNK _S_IFLNK
+# define QT_STAT_LNK _S_IFLNK
#endif
-#define QT_FILENO _fileno
-#define QT_OPEN ::_open
-#define QT_CLOSE ::_close
+#define QT_FILENO _fileno
+#define QT_OPEN ::_open
+#define QT_CLOSE ::_close
#ifdef QT_LARGEFILE_SUPPORT
-#define QT_LSEEK ::_lseeki64
-#define QT_TSTAT ::_tstati64
+#define QT_LSEEK ::_lseeki64
+#define QT_TSTAT ::_tstati64
#else
-#define QT_LSEEK ::_lseek
-#define QT_TSTAT ::_tstat
+#define QT_LSEEK ::_lseek
+#define QT_TSTAT ::_tstat
#endif
-#define QT_READ ::_read
-#define QT_WRITE ::_write
-#define QT_ACCESS ::_access
-#define QT_GETCWD ::_getcwd
-#define QT_CHDIR ::_chdir
-#define QT_MKDIR ::_mkdir
-#define QT_RMDIR ::_rmdir
+#define QT_READ ::_read
+#define QT_WRITE ::_write
+#define QT_ACCESS ::_access
+#define QT_GETCWD ::_getcwd
+#define QT_CHDIR ::_chdir
+#define QT_MKDIR ::_mkdir
+#define QT_RMDIR ::_rmdir
#define QT_OPEN_LARGEFILE 0
-#define QT_OPEN_RDONLY _O_RDONLY
-#define QT_OPEN_WRONLY _O_WRONLY
-#define QT_OPEN_RDWR _O_RDWR
-#define QT_OPEN_CREAT _O_CREAT
-#define QT_OPEN_TRUNC _O_TRUNC
-#define QT_OPEN_APPEND _O_APPEND
+#define QT_OPEN_RDONLY _O_RDONLY
+#define QT_OPEN_WRONLY _O_WRONLY
+#define QT_OPEN_RDWR _O_RDWR
+#define QT_OPEN_CREAT _O_CREAT
+#define QT_OPEN_TRUNC _O_TRUNC
+#define QT_OPEN_APPEND _O_APPEND
#if defined(O_TEXT)
-# define QT_OPEN_TEXT _O_TEXT
-# define QT_OPEN_BINARY _O_BINARY
+# define QT_OPEN_TEXT _O_TEXT
+# define QT_OPEN_BINARY _O_BINARY
#endif
#include "../../common/c89/qplatformdefs.h"
@@ -125,15 +125,15 @@
#define QT_OFF_T __int64
#endif
-#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_ARGS int
#define QT_VSNPRINTF ::_vsnprintf
-#define QT_SNPRINTF ::_snprintf
+#define QT_SNPRINTF ::_snprintf
-# define F_OK 0
-# define X_OK 1
-# define W_OK 2
-# define R_OK 4
+# define F_OK 0
+# define X_OK 1
+# define W_OK 2
+# define R_OK 4
typedef int mode_t;
diff --git a/mkspecs/win32-g++/qplatformdefs.h b/mkspecs/win32-g++/qplatformdefs.h
index 4f339cbea6..a5401075ab 100644
--- a/mkspecs/win32-g++/qplatformdefs.h
+++ b/mkspecs/win32-g++/qplatformdefs.h
@@ -79,57 +79,57 @@ typedef enum {
#endif
#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct _stati64 // non-ANSI defs
-#define QT_STATBUF4TSTAT struct _stati64 // non-ANSI defs
-#define QT_STAT ::_stati64
-#define QT_FSTAT ::_fstati64
+#define QT_STATBUF struct _stati64 // non-ANSI defs
+#define QT_STATBUF4TSTAT struct _stati64 // non-ANSI defs
+#define QT_STAT ::_stati64
+#define QT_FSTAT ::_fstati64
#else
-#define QT_STATBUF struct _stat // non-ANSI defs
-#define QT_STATBUF4TSTAT struct _stat // non-ANSI defs
-#define QT_STAT ::_stat
-#define QT_FSTAT ::_fstat
+#define QT_STATBUF struct _stat // non-ANSI defs
+#define QT_STATBUF4TSTAT struct _stat // non-ANSI defs
+#define QT_STAT ::_stat
+#define QT_FSTAT ::_fstat
#endif
-#define QT_STAT_REG _S_IFREG
-#define QT_STAT_DIR _S_IFDIR
-#define QT_STAT_MASK _S_IFMT
+#define QT_STAT_REG _S_IFREG
+#define QT_STAT_DIR _S_IFDIR
+#define QT_STAT_MASK _S_IFMT
#if defined(_S_IFLNK)
-# define QT_STAT_LNK _S_IFLNK
+# define QT_STAT_LNK _S_IFLNK
#endif
-#define QT_FILENO _fileno
-#define QT_OPEN ::_open
-#define QT_CLOSE ::_close
+#define QT_FILENO _fileno
+#define QT_OPEN ::_open
+#define QT_CLOSE ::_close
#ifdef QT_LARGEFILE_SUPPORT
-#define QT_LSEEK ::_lseeki64
+#define QT_LSEEK ::_lseeki64
#ifndef UNICODE
-#define QT_TSTAT ::_stati64
+#define QT_TSTAT ::_stati64
#else
-#define QT_TSTAT ::_wstati64
+#define QT_TSTAT ::_wstati64
#endif
#else
-#define QT_LSEEK ::_lseek
+#define QT_LSEEK ::_lseek
#ifndef UNICODE
-#define QT_TSTAT ::_stat
+#define QT_TSTAT ::_stat
#else
-#define QT_TSTAT ::_wstat
+#define QT_TSTAT ::_wstat
#endif
#endif
-#define QT_READ ::_read
-#define QT_WRITE ::_write
-#define QT_ACCESS ::_access
-#define QT_GETCWD ::_getcwd
-#define QT_CHDIR ::_chdir
-#define QT_MKDIR ::_mkdir
-#define QT_RMDIR ::_rmdir
+#define QT_READ ::_read
+#define QT_WRITE ::_write
+#define QT_ACCESS ::_access
+#define QT_GETCWD ::_getcwd
+#define QT_CHDIR ::_chdir
+#define QT_MKDIR ::_mkdir
+#define QT_RMDIR ::_rmdir
#define QT_OPEN_LARGEFILE 0
-#define QT_OPEN_RDONLY _O_RDONLY
-#define QT_OPEN_WRONLY _O_WRONLY
-#define QT_OPEN_RDWR _O_RDWR
-#define QT_OPEN_CREAT _O_CREAT
-#define QT_OPEN_TRUNC _O_TRUNC
-#define QT_OPEN_APPEND _O_APPEND
+#define QT_OPEN_RDONLY _O_RDONLY
+#define QT_OPEN_WRONLY _O_WRONLY
+#define QT_OPEN_RDWR _O_RDWR
+#define QT_OPEN_CREAT _O_CREAT
+#define QT_OPEN_TRUNC _O_TRUNC
+#define QT_OPEN_APPEND _O_APPEND
#if defined(O_TEXT)
-# define QT_OPEN_TEXT _O_TEXT
-# define QT_OPEN_BINARY _O_BINARY
+# define QT_OPEN_TEXT _O_TEXT
+# define QT_OPEN_BINARY _O_BINARY
#endif
#include "../common/c89/qplatformdefs.h"
@@ -144,15 +144,15 @@ typedef enum {
#define QT_OFF_T off64_t
#endif
-#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_ARGS int
-#define QT_VSNPRINTF ::_vsnprintf
-#define QT_SNPRINTF ::_snprintf
+#define QT_VSNPRINTF ::_vsnprintf
+#define QT_SNPRINTF ::_snprintf
-# define F_OK 0
-# define X_OK 1
-# define W_OK 2
-# define R_OK 4
+# define F_OK 0
+# define X_OK 1
+# define W_OK 2
+# define R_OK 4
#endif // QPLATFORMDEFS_H
diff --git a/mkspecs/win32-msvc2005/qplatformdefs.h b/mkspecs/win32-msvc2005/qplatformdefs.h
index c7370f1c63..f621d08956 100644
--- a/mkspecs/win32-msvc2005/qplatformdefs.h
+++ b/mkspecs/win32-msvc2005/qplatformdefs.h
@@ -66,51 +66,51 @@
#include <stdlib.h>
#ifdef QT_LARGEFILE_SUPPORT
-#define QT_STATBUF struct _stati64 // non-ANSI defs
-#define QT_STATBUF4TSTAT struct _stati64 // non-ANSI defs
-#define QT_STAT ::_stati64
-#define QT_FSTAT ::_fstati64
+#define QT_STATBUF struct _stati64 // non-ANSI defs
+#define QT_STATBUF4TSTAT struct _stati64 // non-ANSI defs
+#define QT_STAT ::_stati64
+#define QT_FSTAT ::_fstati64
#else
-#define QT_STATBUF struct _stat // non-ANSI defs
-#define QT_STATBUF4TSTAT struct _stat // non-ANSI defs
-#define QT_STAT ::_stat
-#define QT_FSTAT ::_fstat
+#define QT_STATBUF struct _stat // non-ANSI defs
+#define QT_STATBUF4TSTAT struct _stat // non-ANSI defs
+#define QT_STAT ::_stat
+#define QT_FSTAT ::_fstat
#endif
-#define QT_STAT_REG _S_IFREG
-#define QT_STAT_DIR _S_IFDIR
-#define QT_STAT_MASK _S_IFMT
+#define QT_STAT_REG _S_IFREG
+#define QT_STAT_DIR _S_IFDIR
+#define QT_STAT_MASK _S_IFMT
#if defined(_S_IFLNK)
-# define QT_STAT_LNK _S_IFLNK
+# define QT_STAT_LNK _S_IFLNK
#else
-# define QT_STAT_LNK 0120000
+# define QT_STAT_LNK 0120000
#endif
-#define QT_FILENO _fileno
-#define QT_OPEN ::_open
-#define QT_CLOSE ::_close
+#define QT_FILENO _fileno
+#define QT_OPEN ::_open
+#define QT_CLOSE ::_close
#ifdef QT_LARGEFILE_SUPPORT
-#define QT_LSEEK ::_lseeki64
-#define QT_TSTAT ::_tstati64
+#define QT_LSEEK ::_lseeki64
+#define QT_TSTAT ::_tstati64
#else
-#define QT_LSEEK ::_lseek
-#define QT_TSTAT ::_tstat
+#define QT_LSEEK ::_lseek
+#define QT_TSTAT ::_tstat
#endif
-#define QT_READ ::_read
-#define QT_WRITE ::_write
-#define QT_ACCESS ::_access
-#define QT_GETCWD ::_getcwd
-#define QT_CHDIR ::_chdir
-#define QT_MKDIR ::_mkdir
-#define QT_RMDIR ::_rmdir
+#define QT_READ ::_read
+#define QT_WRITE ::_write
+#define QT_ACCESS ::_access
+#define QT_GETCWD ::_getcwd
+#define QT_CHDIR ::_chdir
+#define QT_MKDIR ::_mkdir
+#define QT_RMDIR ::_rmdir
#define QT_OPEN_LARGEFILE 0
-#define QT_OPEN_RDONLY _O_RDONLY
-#define QT_OPEN_WRONLY _O_WRONLY
-#define QT_OPEN_RDWR _O_RDWR
-#define QT_OPEN_CREAT _O_CREAT
-#define QT_OPEN_TRUNC _O_TRUNC
-#define QT_OPEN_APPEND _O_APPEND
+#define QT_OPEN_RDONLY _O_RDONLY
+#define QT_OPEN_WRONLY _O_WRONLY
+#define QT_OPEN_RDWR _O_RDWR
+#define QT_OPEN_CREAT _O_CREAT
+#define QT_OPEN_TRUNC _O_TRUNC
+#define QT_OPEN_APPEND _O_APPEND
#if defined(O_TEXT)
-# define QT_OPEN_TEXT _O_TEXT
-# define QT_OPEN_BINARY _O_BINARY
+# define QT_OPEN_TEXT _O_TEXT
+# define QT_OPEN_BINARY _O_BINARY
#endif
#include "../common/c89/qplatformdefs.h"
@@ -125,17 +125,17 @@
#define QT_OFF_T __int64
#endif
-#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_ARGS int
#define QT_VSNPRINTF(buffer, count, format, arg) \
vsnprintf_s(buffer, count, count-1, format, arg)
-#define QT_SNPRINTF ::_snprintf
+#define QT_SNPRINTF ::_snprintf
-# define F_OK 0
-# define X_OK 1
-# define W_OK 2
-# define R_OK 4
+# define F_OK 0
+# define X_OK 1
+# define W_OK 2
+# define R_OK 4
typedef int mode_t;
diff --git a/mkspecs/winphone-arm-msvc2012/qmake.conf b/mkspecs/winphone-arm-msvc2012/qmake.conf
index 1e31ac51d0..d5d26d2a96 100644
--- a/mkspecs/winphone-arm-msvc2012/qmake.conf
+++ b/mkspecs/winphone-arm-msvc2012/qmake.conf
@@ -5,6 +5,7 @@
#
include(../common/winrt_winphone/qmake.conf)
+QMAKE_COMPILER_DEFINES += _MSC_VER=1700
QMAKE_PLATFORM = winphone $$QMAKE_PLATFORM
DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP ARM __ARM__ __arm__ QT_NO_CURSOR
@@ -13,3 +14,6 @@ QMAKE_LFLAGS += /MACHINE:ARM
QMAKE_LIBS += WindowsPhoneCore.lib PhoneAppModelHost.lib ws2_32.lib
VCPROJ_ARCH = ARM
+MSVC_VER = 11.0
+WINSDK_VER = 8.0
+WINTARGET_VER = WP80
diff --git a/mkspecs/winphone-arm-msvc2012/qplatformdefs.h b/mkspecs/winphone-arm-msvc2012/qplatformdefs.h
index e03bce8e6c..781107b2dc 100644
--- a/mkspecs/winphone-arm-msvc2012/qplatformdefs.h
+++ b/mkspecs/winphone-arm-msvc2012/qplatformdefs.h
@@ -39,4 +39,4 @@
**
****************************************************************************/
-#include "../win32-msvc2005/qplatformdefs.h"
+#include "../common/winrt_winphone/qplatformdefs.h"
diff --git a/mkspecs/winphone-x86-msvc2012/qmake.conf b/mkspecs/winphone-x86-msvc2012/qmake.conf
index 8836de58cf..59e6fb45db 100644
--- a/mkspecs/winphone-x86-msvc2012/qmake.conf
+++ b/mkspecs/winphone-x86-msvc2012/qmake.conf
@@ -5,6 +5,7 @@
#
include(../common/winrt_winphone/qmake.conf)
+QMAKE_COMPILER_DEFINES += _MSC_VER=1700
QMAKE_PLATFORM = winphone $$QMAKE_PLATFORM
DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP X86 __X86__ __x86__ QT_NO_CURSOR
@@ -13,3 +14,6 @@ QMAKE_LFLAGS += /MACHINE:X86
QMAKE_LIBS += WindowsPhoneCore.lib PhoneAppModelHost.lib ws2_32.lib
VCPROJ_ARCH = x86
+MSVC_VER = 11.0
+WINSDK_VER = 8.0
+WINTARGET_VER = WP80
diff --git a/mkspecs/winphone-x86-msvc2012/qplatformdefs.h b/mkspecs/winphone-x86-msvc2012/qplatformdefs.h
index e03bce8e6c..781107b2dc 100644
--- a/mkspecs/winphone-x86-msvc2012/qplatformdefs.h
+++ b/mkspecs/winphone-x86-msvc2012/qplatformdefs.h
@@ -39,4 +39,4 @@
**
****************************************************************************/
-#include "../win32-msvc2005/qplatformdefs.h"
+#include "../common/winrt_winphone/qplatformdefs.h"
diff --git a/mkspecs/winrt-arm-msvc2012/qmake.conf b/mkspecs/winrt-arm-msvc2012/qmake.conf
index cafdbf4a93..951dc2db35 100644
--- a/mkspecs/winrt-arm-msvc2012/qmake.conf
+++ b/mkspecs/winrt-arm-msvc2012/qmake.conf
@@ -5,6 +5,7 @@
#
include(../common/winrt_winphone/qmake.conf)
+QMAKE_COMPILER_DEFINES += _MSC_VER=1700
DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_APP ARM __ARM__ __arm__
QMAKE_LFLAGS += /MACHINE:ARM
@@ -12,3 +13,6 @@ QMAKE_LFLAGS += /MACHINE:ARM
QMAKE_LIBS += windowscodecs.lib kernel32.lib ole32.lib
VCPROJ_ARCH = ARM
+MSVC_VER = 11.0
+WINSDK_VER = 8.0
+WINTARGET_VER = win8
diff --git a/mkspecs/winrt-arm-msvc2012/qplatformdefs.h b/mkspecs/winrt-arm-msvc2012/qplatformdefs.h
index e03bce8e6c..781107b2dc 100644
--- a/mkspecs/winrt-arm-msvc2012/qplatformdefs.h
+++ b/mkspecs/winrt-arm-msvc2012/qplatformdefs.h
@@ -39,4 +39,4 @@
**
****************************************************************************/
-#include "../win32-msvc2005/qplatformdefs.h"
+#include "../common/winrt_winphone/qplatformdefs.h"
diff --git a/mkspecs/winrt-arm-msvc2013/qmake.conf b/mkspecs/winrt-arm-msvc2013/qmake.conf
new file mode 100644
index 0000000000..5527a7a41c
--- /dev/null
+++ b/mkspecs/winrt-arm-msvc2013/qmake.conf
@@ -0,0 +1,20 @@
+#
+# qmake configuration for winrt-arm-msvc2013
+#
+# Written for Microsoft Visual C++ 2013
+#
+
+include(../common/winrt_winphone/qmake.conf)
+QMAKE_COMPILER_DEFINES += _MSC_VER=1800
+DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_APP ARM __ARM__ __arm__
+
+QMAKE_CFLAGS += -FS
+QMAKE_CXXFLAGS += -FS
+QMAKE_LFLAGS += /MACHINE:ARM
+
+QMAKE_LIBS += windowscodecs.lib kernel32.lib ole32.lib
+
+VCPROJ_ARCH = ARM
+MSVC_VER = 12.0
+WINSDK_VER = 8.1
+WINTARGET_VER = winv6.3
diff --git a/mkspecs/winrt-arm-msvc2013/qplatformdefs.h b/mkspecs/winrt-arm-msvc2013/qplatformdefs.h
new file mode 100644
index 0000000000..781107b2dc
--- /dev/null
+++ b/mkspecs/winrt-arm-msvc2013/qplatformdefs.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the qmake spec 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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "../common/winrt_winphone/qplatformdefs.h"
diff --git a/mkspecs/winrt-x64-msvc2012/qmake.conf b/mkspecs/winrt-x64-msvc2012/qmake.conf
index 784d0ccb7e..96806499bc 100644
--- a/mkspecs/winrt-x64-msvc2012/qmake.conf
+++ b/mkspecs/winrt-x64-msvc2012/qmake.conf
@@ -5,6 +5,7 @@
#
include(../common/winrt_winphone/qmake.conf)
+QMAKE_COMPILER_DEFINES += _MSC_VER=1700
DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_APP X64 __X64__ __x64__
QMAKE_LFLAGS += /MACHINE:X64
@@ -12,3 +13,6 @@ QMAKE_LFLAGS += /MACHINE:X64
QMAKE_LIBS += windowscodecs.lib kernel32.lib ole32.lib
VCPROJ_ARCH = x64
+MSVC_VER = 11.0
+WINSDK_VER = 8.0
+WINTARGET_VER = win8
diff --git a/mkspecs/winrt-x64-msvc2012/qplatformdefs.h b/mkspecs/winrt-x64-msvc2012/qplatformdefs.h
index e03bce8e6c..781107b2dc 100644
--- a/mkspecs/winrt-x64-msvc2012/qplatformdefs.h
+++ b/mkspecs/winrt-x64-msvc2012/qplatformdefs.h
@@ -39,4 +39,4 @@
**
****************************************************************************/
-#include "../win32-msvc2005/qplatformdefs.h"
+#include "../common/winrt_winphone/qplatformdefs.h"
diff --git a/mkspecs/winrt-x64-msvc2013/qmake.conf b/mkspecs/winrt-x64-msvc2013/qmake.conf
new file mode 100644
index 0000000000..e7d2432cc4
--- /dev/null
+++ b/mkspecs/winrt-x64-msvc2013/qmake.conf
@@ -0,0 +1,20 @@
+#
+# qmake configuration for winrt-x64-msvc2013
+#
+# Written for Microsoft Visual C++ 2013
+#
+
+include(../common/winrt_winphone/qmake.conf)
+QMAKE_COMPILER_DEFINES += _MSC_VER=1800
+DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_APP X64 __X64__ __x64__
+
+QMAKE_CFLAGS += -FS
+QMAKE_CXXFLAGS += -FS
+QMAKE_LFLAGS += /MACHINE:X64
+
+QMAKE_LIBS += windowscodecs.lib kernel32.lib ole32.lib
+
+VCPROJ_ARCH = x64
+MSVC_VER = 12.0
+WINSDK_VER = 8.1
+WINTARGET_VER = winv6.3
diff --git a/mkspecs/winrt-x64-msvc2013/qplatformdefs.h b/mkspecs/winrt-x64-msvc2013/qplatformdefs.h
new file mode 100644
index 0000000000..781107b2dc
--- /dev/null
+++ b/mkspecs/winrt-x64-msvc2013/qplatformdefs.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the qmake spec 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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "../common/winrt_winphone/qplatformdefs.h"
diff --git a/mkspecs/winrt-x86-msvc2012/qmake.conf b/mkspecs/winrt-x86-msvc2012/qmake.conf
index 559c9b5d05..9186ff2eb1 100644
--- a/mkspecs/winrt-x86-msvc2012/qmake.conf
+++ b/mkspecs/winrt-x86-msvc2012/qmake.conf
@@ -5,10 +5,14 @@
#
include(../common/winrt_winphone/qmake.conf)
+QMAKE_COMPILER_DEFINES += _MSC_VER=1700
DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_APP X86 __X86__ __x86__
-QMAKE_LFLAGS += /MACHINE:X86
+QMAKE_LFLAGS += /SAFESEH /MACHINE:X86
QMAKE_LIBS += windowscodecs.lib kernel32.lib ole32.lib
VCPROJ_ARCH = x86
+MSVC_VER = 11.0
+WINSDK_VER = 8.0
+WINTARGET_VER = win8
diff --git a/mkspecs/winrt-x86-msvc2012/qplatformdefs.h b/mkspecs/winrt-x86-msvc2012/qplatformdefs.h
index e03bce8e6c..781107b2dc 100644
--- a/mkspecs/winrt-x86-msvc2012/qplatformdefs.h
+++ b/mkspecs/winrt-x86-msvc2012/qplatformdefs.h
@@ -39,4 +39,4 @@
**
****************************************************************************/
-#include "../win32-msvc2005/qplatformdefs.h"
+#include "../common/winrt_winphone/qplatformdefs.h"
diff --git a/mkspecs/winrt-x86-msvc2013/qmake.conf b/mkspecs/winrt-x86-msvc2013/qmake.conf
new file mode 100644
index 0000000000..77083e9cbc
--- /dev/null
+++ b/mkspecs/winrt-x86-msvc2013/qmake.conf
@@ -0,0 +1,20 @@
+#
+# qmake configuration for winrt-x86-msvc2013
+#
+# Written for Microsoft Visual C++ 2013
+#
+
+include(../common/winrt_winphone/qmake.conf)
+QMAKE_COMPILER_DEFINES += _MSC_VER=1800 _WIN32
+DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_APP X86 __X86__ __x86__
+
+QMAKE_CFLAGS += -FS
+QMAKE_CXXFLAGS += -FS
+QMAKE_LFLAGS += /SAFESEH /MACHINE:X86
+
+QMAKE_LIBS += windowscodecs.lib kernel32.lib ole32.lib
+
+VCPROJ_ARCH = x86
+MSVC_VER = 12.0
+WINSDK_VER = 8.1
+WINTARGET_VER = winv6.3
diff --git a/mkspecs/winrt-x86-msvc2013/qplatformdefs.h b/mkspecs/winrt-x86-msvc2013/qplatformdefs.h
new file mode 100644
index 0000000000..781107b2dc
--- /dev/null
+++ b/mkspecs/winrt-x86-msvc2013/qplatformdefs.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the qmake spec 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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "../common/winrt_winphone/qplatformdefs.h"
diff --git a/qmake/Makefile.unix b/qmake/Makefile.unix
index ce83960884..ef1c542f57 100644
--- a/qmake/Makefile.unix
+++ b/qmake/Makefile.unix
@@ -12,7 +12,7 @@ OBJS=project.o option.o property.o main.o ioutils.o proitems.o \
gbuild.o cesdkhandler.o
#qt code
-QOBJS=qtextcodec.o qutfcodec.o qstring.o qstringbuilder.o qtextstream.o qiodevice.o qmalloc.o qglobal.o \
+QOBJS=qtextcodec.o qutfcodec.o qstring.o qstring_compat.o qstringbuilder.o qtextstream.o qiodevice.o qmalloc.o qglobal.o \
qarraydata.o qbytearray.o qbytearraymatcher.o qdatastream.o qbuffer.o qlist.o qfiledevice.o qfile.o \
qfilesystementry.o qfilesystemengine.o qfsfileengine.o qfsfileengine_iterator.o qregexp.o qvector.o \
qbitarray.o qdir.o qdiriterator.o quuid.o qhash.o qfileinfo.o qdatetime.o qstringlist.o \
@@ -40,6 +40,7 @@ DEPEND_SRC = \
$(QMKGENSRC)/win32/msvc_objectmodel.cpp $(QMKGENSRC)/win32/msbuild_objectmodel.cpp \
$(SOURCE_PATH)/src/corelib/codecs/qtextcodec.cpp $(SOURCE_PATH)/src/corelib/codecs/qutfcodec.cpp \
$(SOURCE_PATH)/src/corelib/tools/qstring.cpp $(SOURCE_PATH)/src/corelib/io/qfile.cpp \
+ $(SOURCE_PATH)/src/corelib/tools/qstring_compat.cpp \
$(SOURCE_PATH)/src/corelib/io/qfiledevice.cpp \
$(SOURCE_PATH)/src/corelib/io/qtextstream.cpp $(SOURCE_PATH)/src/corelib/io/qiodevice.cpp \
$(SOURCE_PATH)/src/corelib/global/qmalloc.cpp \
@@ -272,6 +273,9 @@ qtextcodec.o: $(SOURCE_PATH)/src/corelib/codecs/qtextcodec.cpp
qstring.o: $(SOURCE_PATH)/src/corelib/tools/qstring.cpp
$(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/tools/qstring.cpp
+qstring_compat.o: $(SOURCE_PATH)/src/corelib/tools/qstring_compat.cpp
+ $(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/tools/qstring_compat.cpp
+
qstringbuilder.o: $(SOURCE_PATH)/src/corelib/tools/qstringbuilder.cpp
$(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/tools/qstringbuilder.cpp
diff --git a/qmake/Makefile.win32 b/qmake/Makefile.win32
index af1da918c6..fd1ddc0b0d 100644
--- a/qmake/Makefile.win32
+++ b/qmake/Makefile.win32
@@ -48,7 +48,7 @@ CXXFLAGS_BARE = $(CFLAGS_BARE)
CXXFLAGS = $(CFLAGS)
LFLAGS =
-LIBS = ole32.lib advapi32.lib
+LIBS = ole32.lib advapi32.lib shell32.lib
LINKQMAKE = $(LINKER) $(LFLAGS) -OUT:qmake.exe $(OBJS) $(QTOBJS) $(LIBS)
ADDCLEAN = qmake.pdb qmake.ilk
@@ -105,6 +105,7 @@ QTOBJS= \
qtextcodec.obj \
qutfcodec.obj \
qstring.obj \
+ qstring_compat.obj \
qstringlist.obj \
qstringbuilder.obj \
qsystemerror.obj \
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index 946a1ee986..83d38d1b14 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -456,6 +456,8 @@ MakefileGenerator::init()
if (v["QMAKE_LINK_O_FLAG"].isEmpty())
v["QMAKE_LINK_O_FLAG"].append("-o ");
+ setSystemIncludes(v["QMAKE_DEFAULT_INCDIRS"]);
+
ProStringList &quc = v["QMAKE_EXTRA_COMPILERS"];
//make sure the COMPILERS are in the correct input/output chain order
@@ -1420,31 +1422,31 @@ MakefileGenerator::writeInstalls(QTextStream &t, bool noBuild)
}
QString
-MakefileGenerator::var(const ProKey &var)
+MakefileGenerator::var(const ProKey &var) const
{
return val(project->values(var));
}
QString
-MakefileGenerator::val(const ProStringList &varList)
+MakefileGenerator::val(const ProStringList &varList) const
{
return valGlue(varList, "", " ", "");
}
QString
-MakefileGenerator::val(const QStringList &varList)
+MakefileGenerator::val(const QStringList &varList) const
{
return valGlue(varList, "", " ", "");
}
QString
-MakefileGenerator::varGlue(const ProKey &var, const QString &before, const QString &glue, const QString &after)
+MakefileGenerator::varGlue(const ProKey &var, const QString &before, const QString &glue, const QString &after) const
{
return valGlue(project->values(var), before, glue, after);
}
QString
-MakefileGenerator::fileVarGlue(const ProKey &var, const QString &before, const QString &glue, const QString &after)
+MakefileGenerator::fileVarGlue(const ProKey &var, const QString &before, const QString &glue, const QString &after) const
{
ProStringList varList;
foreach (const ProString &val, project->values(var))
@@ -1453,7 +1455,7 @@ MakefileGenerator::fileVarGlue(const ProKey &var, const QString &before, const Q
}
QString
-MakefileGenerator::valGlue(const ProStringList &varList, const QString &before, const QString &glue, const QString &after)
+MakefileGenerator::valGlue(const ProStringList &varList, const QString &before, const QString &glue, const QString &after) const
{
QString ret;
for (ProStringList::ConstIterator it = varList.begin(); it != varList.end(); ++it) {
@@ -1467,7 +1469,7 @@ MakefileGenerator::valGlue(const ProStringList &varList, const QString &before,
}
QString
-MakefileGenerator::valGlue(const QStringList &varList, const QString &before, const QString &glue, const QString &after)
+MakefileGenerator::valGlue(const QStringList &varList, const QString &before, const QString &glue, const QString &after) const
{
QString ret;
for(QStringList::ConstIterator it = varList.begin(); it != varList.end(); ++it) {
@@ -1482,19 +1484,19 @@ MakefileGenerator::valGlue(const QStringList &varList, const QString &before, co
QString
-MakefileGenerator::varList(const ProKey &var)
+MakefileGenerator::varList(const ProKey &var) const
{
return valList(project->values(var));
}
QString
-MakefileGenerator::valList(const ProStringList &varList)
+MakefileGenerator::valList(const ProStringList &varList) const
{
return valGlue(varList, "", " \\\n\t\t", "");
}
QString
-MakefileGenerator::valList(const QStringList &varList)
+MakefileGenerator::valList(const QStringList &varList) const
{
return valGlue(varList, "", " \\\n\t\t", "");
}
@@ -2464,8 +2466,6 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT
t << "include " << (*qeui_it) << endl;
if (!(flags & SubTargetSkipDefaultVariables)) {
- /* Calling Option::fixPathToTargetOS() is necessary for MinGW/MSYS, which requires
- * back-slashes to be turned into slashes. */
t << "QMAKE = " << var("QMAKE_QMAKE") << endl;
t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl;
t << "CHK_DIR_EXISTS= " << var("QMAKE_CHK_DIR_EXISTS") << endl;
diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h
index 4b8a96c15f..a382ca6bf6 100644
--- a/qmake/generators/makefile.h
+++ b/qmake/generators/makefile.h
@@ -225,16 +225,16 @@ protected:
virtual bool findLibraries();
//for retrieving values and lists of values
- virtual QString var(const ProKey &var);
- QString varGlue(const ProKey &var, const QString &before, const QString &glue, const QString &after);
- QString fileVarGlue(const ProKey &var, const QString &before, const QString &glue, const QString &after);
- QString varList(const ProKey &var);
- QString val(const ProStringList &varList);
- QString val(const QStringList &varList);
- QString valGlue(const QStringList &varList, const QString &before, const QString &glue, const QString &after);
- QString valGlue(const ProStringList &varList, const QString &before, const QString &glue, const QString &after);
- QString valList(const QStringList &varList);
- QString valList(const ProStringList &varList);
+ virtual QString var(const ProKey &var) const;
+ QString varGlue(const ProKey &var, const QString &before, const QString &glue, const QString &after) const;
+ QString fileVarGlue(const ProKey &var, const QString &before, const QString &glue, const QString &after) const;
+ QString varList(const ProKey &var) const;
+ QString val(const ProStringList &varList) const;
+ QString val(const QStringList &varList) const;
+ QString valGlue(const QStringList &varList, const QString &before, const QString &glue, const QString &after) const;
+ QString valGlue(const ProStringList &varList, const QString &before, const QString &glue, const QString &after) const;
+ QString valList(const QStringList &varList) const;
+ QString valList(const ProStringList &varList) const;
QString filePrefixRoot(const QString &, const QString &);
diff --git a/qmake/generators/makefiledeps.cpp b/qmake/generators/makefiledeps.cpp
index df37957f9b..edc9a0ed7f 100644
--- a/qmake/generators/makefiledeps.cpp
+++ b/qmake/generators/makefiledeps.cpp
@@ -345,6 +345,30 @@ bool QMakeSourceFileInfo::containsSourceFile(const QString &f, SourceFileType ty
return false;
}
+bool QMakeSourceFileInfo::isSystemInclude(const QString &name)
+{
+ if (QDir::isRelativePath(name)) {
+ // if we got a relative path here, it's either an -I flag with a relative path
+ // or an include file we couldn't locate. Either way, conclude it's not
+ // a system include.
+ return false;
+ }
+
+ for (int i = 0; i < systemIncludes.size(); ++i) {
+ // check if name is located inside the system include dir:
+ QDir systemDir(systemIncludes.at(i));
+ QString relativePath = systemDir.relativeFilePath(name);
+
+ // the relative path might be absolute if we're crossing drives on Windows
+ if (QDir::isAbsolutePath(relativePath) || relativePath.startsWith("../"))
+ continue;
+ debug_msg(5, "File/dir %s is in system dir %s, skipping",
+ qPrintable(name), qPrintable(systemIncludes.at(i)));
+ return true;
+ }
+ return false;
+}
+
char *QMakeSourceFileInfo::getBuffer(int s) {
if(!spare_buffer || spare_buffer_size < s)
spare_buffer = (char *)realloc(spare_buffer, spare_buffer_size=s);
@@ -655,7 +679,7 @@ bool QMakeSourceFileInfo::findDeps(SourceFile *file)
} else {
exists = QFile::exists(lfn.real());
}
- if(!lfn.isNull()) {
+ if (!lfn.isNull() && !isSystemInclude(lfn.real())) {
dep = files->lookupFile(lfn);
if(!dep) {
dep = new SourceFile;
diff --git a/qmake/generators/makefiledeps.h b/qmake/generators/makefiledeps.h
index ba55c36998..516abd4afd 100644
--- a/qmake/generators/makefiledeps.h
+++ b/qmake/generators/makefiledeps.h
@@ -78,6 +78,7 @@ private:
SourceFiles *files, *includes;
bool files_changed;
QList<QMakeLocalFileName> depdirs;
+ QStringList systemIncludes;
//sleezy buffer code
char *spare_buffer;
@@ -98,6 +99,7 @@ protected:
virtual QFileInfo findFileInfo(const QMakeLocalFileName &);
public:
+
QMakeSourceFileInfo(const QString &cachefile="");
virtual ~QMakeSourceFileInfo();
@@ -108,11 +110,15 @@ public:
inline void setDependencyMode(DependencyMode mode) { dep_mode = mode; }
inline DependencyMode dependencyMode() const { return dep_mode; }
+ void setSystemIncludes(const ProStringList &list)
+ { systemIncludes = list.toQStringList(); }
+
enum SourceFileType { TYPE_UNKNOWN, TYPE_C, TYPE_UI, TYPE_QRC };
enum SourceFileSeek { SEEK_DEPS=0x01, SEEK_MOCS=0x02 };
void addSourceFiles(const ProStringList &, uchar seek, SourceFileType type=TYPE_C);
void addSourceFile(const QString &, uchar seek, SourceFileType type=TYPE_C);
bool containsSourceFile(const QString &, SourceFileType type=TYPE_C);
+ bool isSystemInclude(const QString &);
int included(const QString &file);
QStringList dependencies(const QString &file);
diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp
index ea6a6a6e90..cadd5cf316 100644
--- a/qmake/generators/unix/unixmake.cpp
+++ b/qmake/generators/unix/unixmake.cpp
@@ -94,6 +94,27 @@ UnixMakefileGenerator::init()
if(project->isEmpty("QMAKE_SYMBOLIC_LINK"))
project->values("QMAKE_SYMBOLIC_LINK").append("ln -f -s");
+ if (!project->isEmpty("TARGET"))
+ project->values("TARGET") = escapeFilePaths(project->values("TARGET"));
+ project->values("QMAKE_ORIG_TARGET") = project->values("TARGET");
+
+ //version handling
+ if (project->isEmpty("VERSION")) {
+ project->values("VERSION").append(
+ "1.0." + (project->isEmpty("VER_PAT") ? QString("0") : project->first("VER_PAT")));
+ }
+ QStringList l = project->first("VERSION").toQString().split('.');
+ l << "0" << "0"; //make sure there are three
+ project->values("VER_MAJ").append(l[0]);
+ project->values("VER_MIN").append(l[1]);
+ project->values("VER_PAT").append(l[2]);
+
+ QString sroot = project->sourceRoot();
+ foreach (const ProString &iif, project->values("QMAKE_INTERNAL_INCLUDED_FILES")) {
+ if (iif.startsWith(sroot) && iif.at(sroot.length()) == QLatin1Char('/'))
+ project->values("DISTFILES") += fileFixify(iif.toQString(), FileFixifyRelative);
+ }
+
/* this should probably not be here, but I'm using it to wrap the .t files */
if(project->first("TEMPLATE") == "app")
project->values("QMAKE_APP_FLAG").append("1");
@@ -106,10 +127,6 @@ UnixMakefileGenerator::init()
return; /* subdirs is done */
}
- if (!project->isEmpty("TARGET"))
- project->values("TARGET") = escapeFilePaths(project->values("TARGET"));
-
- project->values("QMAKE_ORIG_TARGET") = project->values("TARGET");
project->values("QMAKE_ORIG_DESTDIR") = project->values("DESTDIR");
project->values("QMAKE_LIBS") += escapeFilePaths(project->values("LIBS"));
project->values("QMAKE_LIBS_PRIVATE") += escapeFilePaths(project->values("LIBS_PRIVATE"));
@@ -304,10 +321,6 @@ UnixMakefileGenerator::init()
project->values("QMAKE_BUNDLE_LOCATION").clear();
}
- if(!project->isEmpty("QMAKE_INTERNAL_INCLUDED_FILES"))
- project->values("DISTFILES") += project->values("QMAKE_INTERNAL_INCLUDED_FILES");
- project->values("DISTFILES") += project->projectFile();
-
init2();
project->values("QMAKE_INTERNAL_PRL_LIBS") << "QMAKE_LIBS";
if(!project->isEmpty("QMAKE_MAX_FILES_PER_AR")) {
diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp
index 7ed89e23d7..eb68614fe6 100644
--- a/qmake/generators/unix/unixmake2.cpp
+++ b/qmake/generators/unix/unixmake2.cpp
@@ -125,10 +125,16 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
t << " -I" << pwd;
}
{
+ QString isystem = var("QMAKE_CFLAGS_ISYSTEM");
const ProStringList &incs = project->values("INCLUDEPATH");
for(int i = 0; i < incs.size(); ++i) {
ProString inc = escapeFilePath(incs.at(i));
- if(!inc.isEmpty())
+ if (inc.isEmpty())
+ continue;
+
+ if (!isystem.isEmpty() && isSystemInclude(inc.toQString()))
+ t << ' ' << isystem << ' ' << inc;
+ else
t << " -I" << inc;
}
}
@@ -210,7 +216,8 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
}
if(do_incremental && !src_incremental)
do_incremental = false;
- t << "DIST = " << valList(fileFixify(project->values("DISTFILES").toQStringList())) << endl;
+ t << "DIST = " << valList(fileFixify(project->values("DISTFILES").toQStringList())) << " "
+ << valList(escapeFilePaths(project->values("SOURCES"))) << endl;
t << "QMAKE_TARGET = " << var("QMAKE_ORIG_TARGET") << endl;
// The comment is important for mingw32-make.exe on Windows as otherwise trailing slashes
// would be interpreted as line continuation. The lack of spacing between the value and the
@@ -809,7 +816,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
Option::output_dir, Option::output_dir));
t << "dist: \n\t"
<< mkdir_p_asstring(ddir_c, false) << "\n\t"
- << "$(COPY_FILE) --parents $(SOURCES) $(DIST) " << ddir_c << Option::dir_sep << " && ";
+ << "$(COPY_FILE) --parents $(DIST) " << ddir_c << Option::dir_sep << " && ";
if(!project->isEmpty("QMAKE_EXTRA_COMPILERS")) {
const ProStringList &quc = project->values("QMAKE_EXTRA_COMPILERS");
for (ProStringList::ConstIterator it = quc.begin(); it != quc.end(); ++it) {
@@ -897,17 +904,6 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
t << varGlue("QMAKE_CLEAN","-$(DEL_FILE) "," ","\n\t")
<< "-$(DEL_FILE) *~ core *.core\n"
<< varGlue("CLEAN_FILES","\t-$(DEL_FILE) "," ","") << endl << endl;
- t << "####### Sub-libraries\n\n";
- if (!project->values("SUBLIBS").isEmpty()) {
- ProString libdir = "tmp/";
- if(!project->isEmpty("SUBLIBS_DIR"))
- libdir = project->first("SUBLIBS_DIR");
- const ProStringList &l = project->values("SUBLIBS");
- for(it = l.begin(); it != l.end(); ++it)
- t << libdir << project->first("QMAKE_PREFIX_STATICLIB") << (*it) << "."
- << project->first("QMAKE_EXTENSION_STATICLIB") << ":\n\t"
- << var(ProKey("MAKELIB" + *it)) << endl << endl;
- }
ProString destdir = project->first("DESTDIR");
if (!destdir.isEmpty() && !destdir.endsWith(Option::dir_sep))
@@ -934,9 +930,21 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
}
t << endl << endl;
+ t << "####### Sub-libraries\n\n";
+ if (!project->values("SUBLIBS").isEmpty()) {
+ ProString libdir = "tmp/";
+ if (!project->isEmpty("SUBLIBS_DIR"))
+ libdir = project->first("SUBLIBS_DIR");
+ const ProStringList &l = project->values("SUBLIBS");
+ for (it = l.begin(); it != l.end(); ++it)
+ t << libdir << project->first("QMAKE_PREFIX_STATICLIB") << (*it) << "."
+ << project->first("QMAKE_EXTENSION_STATICLIB") << ":\n\t"
+ << var(ProKey("MAKELIB" + *it)) << endl << endl;
+ }
+
if(doPrecompiledHeaders() && !project->isEmpty("PRECOMPILED_HEADER")) {
QString pchInput = project->first("PRECOMPILED_HEADER").toQString();
- t << "###### Prefix headers\n";
+ t << "###### Precompiled headers\n";
QString comps[] = { "C", "CXX", "OBJC", "OBJCXX", QString() };
for(int i = 0; !comps[i].isNull(); i++) {
QString pchFlags = var(ProKey("QMAKE_" + comps[i] + "FLAGS_PRECOMPILE"));
@@ -1013,16 +1021,6 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
void UnixMakefileGenerator::init2()
{
- //version handling
- if(project->isEmpty("VERSION"))
- project->values("VERSION").append("1.0." +
- (project->isEmpty("VER_PAT") ? QString("0") :
- project->first("VER_PAT")));
- QStringList l = project->first("VERSION").toQString().split('.');
- l << "0" << "0"; //make sure there are three
- project->values("VER_MAJ").append(l[0]);
- project->values("VER_MIN").append(l[1]);
- project->values("VER_PAT").append(l[2]);
if(project->isEmpty("QMAKE_FRAMEWORK_VERSION"))
project->values("QMAKE_FRAMEWORK_VERSION").append(project->values("VER_MAJ").first());
@@ -1231,8 +1229,10 @@ void UnixMakefileGenerator::init2()
}
if (include_deps && project->isActiveConfig("gcc_MD_depends")) {
- project->values("QMAKE_CFLAGS") += "-MD";
- project->values("QMAKE_CXXFLAGS") += "-MD";
+ // use -MMD if we know about -isystem too
+ ProString MD_flag(project->values("QMAKE_CFLAGS_ISYSTEM").isEmpty() ? "-MD" : "-MMD");
+ project->values("QMAKE_CFLAGS") += MD_flag;
+ project->values("QMAKE_CXXFLAGS") += MD_flag;
}
if(!project->isEmpty("QMAKE_BUNDLE")) {
@@ -1314,7 +1314,7 @@ UnixMakefileGenerator::writeLibtoolFile()
t << "# " << lname << " - a libtool library file\n";
t << "# Generated by qmake/libtool (" QMAKE_VERSION_STR ") (Qt "
<< QT_VERSION_STR << ") on: " << QDateTime::currentDateTime().toString();
- t << "\n";
+ t << "\n";
t << "# The name that we can dlopen(3).\n"
<< "dlname='" << var(project->isActiveConfig("plugin") ? "TARGET" : "TARGET_x")
diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp
index 29b27cb7d7..6d5764f59c 100644
--- a/qmake/generators/win32/mingw_make.cpp
+++ b/qmake/generators/win32/mingw_make.cpp
@@ -101,7 +101,7 @@ bool MingwMakefileGenerator::findLibraries()
}
if (!out.isEmpty()) // We assume if it never finds it that its correct
(*it) = out;
- } else if((*it).startsWith("-L")) {
+ } else if ((*it).startsWith("-L")) {
dirs.append(QMakeLocalFileName((*it).mid(2).toQString()));
}
@@ -159,7 +159,7 @@ void createLdObjectScriptFile(const QString &fileName, const ProStringList &objL
t << path << endl;
}
t << ");\n";
- t.flush();
+ t.flush();
file.close();
}
}
@@ -175,7 +175,7 @@ void createArObjectScriptFile(const QString &fileName, const QString &target, co
t << "ADDMOD " << *it << endl;
}
t << "SAVE\n";
- t.flush();
+ t.flush();
file.close();
}
}
@@ -204,16 +204,16 @@ void MingwMakefileGenerator::writeMingwParts(QTextStream &t)
if (!preCompHeaderOut.isEmpty()) {
QString header = project->first("PRECOMPILED_HEADER").toQString();
- QString cHeader = preCompHeaderOut + Option::dir_sep + "c";
- t << escapeDependencyPath(cHeader) << ": " << escapeDependencyPath(header) << " "
+ QString cHeader = preCompHeaderOut + Option::dir_sep + "c";
+ t << escapeDependencyPath(cHeader) << ": " << escapeDependencyPath(header) << " "
<< escapeDependencyPaths(findDependencies(header)).join(" \\\n\t\t")
- << "\n\t" << mkdir_p_asstring(preCompHeaderOut)
+ << "\n\t" << mkdir_p_asstring(preCompHeaderOut)
<< "\n\t$(CC) -x c-header -c $(CFLAGS) $(INCPATH) -o " << cHeader << " " << header
<< endl << endl;
- QString cppHeader = preCompHeaderOut + Option::dir_sep + "c++";
- t << escapeDependencyPath(cppHeader) << ": " << escapeDependencyPath(header) << " "
+ QString cppHeader = preCompHeaderOut + Option::dir_sep + "c++";
+ t << escapeDependencyPath(cppHeader) << ": " << escapeDependencyPath(header) << " "
<< escapeDependencyPaths(findDependencies(header)).join(" \\\n\t\t")
- << "\n\t" << mkdir_p_asstring(preCompHeaderOut)
+ << "\n\t" << mkdir_p_asstring(preCompHeaderOut)
<< "\n\t$(CXX) -x c++-header -c $(CXXFLAGS) $(INCPATH) -o " << cppHeader << " " << header
<< endl << endl;
}
@@ -269,7 +269,7 @@ void MingwMakefileGenerator::init()
destDir = Option::fixPathToTargetOS(project->first("DESTDIR") + Option::dir_sep, false, false);
project->values("MINGW_IMPORT_LIB").prepend(destDir + "lib" + project->first("TARGET")
+ project->first("TARGET_VERSION_EXT") + ".a");
- project->values("QMAKE_LFLAGS").append(QString("-Wl,--out-implib,") + project->first("MINGW_IMPORT_LIB"));
+ project->values("QMAKE_LFLAGS").append(QString("-Wl,--out-implib,") + project->first("MINGW_IMPORT_LIB"));
}
if (!project->values("DEF_FILE").isEmpty()) {
@@ -287,21 +287,21 @@ void MingwMakefileGenerator::init()
&& project->isActiveConfig("precompile_header")) {
QString preCompHeader = var("PRECOMPILED_DIR")
+ QFileInfo(project->first("PRECOMPILED_HEADER").toQString()).fileName();
- preCompHeaderOut = preCompHeader + ".gch";
- project->values("QMAKE_CLEAN").append(preCompHeaderOut + Option::dir_sep + "c");
- project->values("QMAKE_CLEAN").append(preCompHeaderOut + Option::dir_sep + "c++");
+ preCompHeaderOut = preCompHeader + ".gch";
+ project->values("QMAKE_CLEAN").append(preCompHeaderOut + Option::dir_sep + "c");
+ project->values("QMAKE_CLEAN").append(preCompHeaderOut + Option::dir_sep + "c++");
- project->values("QMAKE_RUN_CC").clear();
- project->values("QMAKE_RUN_CC").append("$(CC) -c -include " + preCompHeader +
+ project->values("QMAKE_RUN_CC").clear();
+ project->values("QMAKE_RUN_CC").append("$(CC) -c -include " + preCompHeader +
" $(CFLAGS) $(INCPATH) " + var("QMAKE_CC_O_FLAG") + "$obj $src");
project->values("QMAKE_RUN_CC_IMP").clear();
- project->values("QMAKE_RUN_CC_IMP").append("$(CC) -c -include " + preCompHeader +
+ project->values("QMAKE_RUN_CC_IMP").append("$(CC) -c -include " + preCompHeader +
" $(CFLAGS) $(INCPATH) " + var("QMAKE_CC_O_FLAG") + "$@ $<");
project->values("QMAKE_RUN_CXX").clear();
- project->values("QMAKE_RUN_CXX").append("$(CXX) -c -include " + preCompHeader +
+ project->values("QMAKE_RUN_CXX").append("$(CXX) -c -include " + preCompHeader +
" $(CXXFLAGS) $(INCPATH) " + var("QMAKE_CC_O_FLAG") + "$obj $src");
project->values("QMAKE_RUN_CXX_IMP").clear();
- project->values("QMAKE_RUN_CXX_IMP").append("$(CXX) -c -include " + preCompHeader +
+ project->values("QMAKE_RUN_CXX_IMP").append("$(CXX) -c -include " + preCompHeader +
" $(CXXFLAGS) $(INCPATH) " + var("QMAKE_CC_O_FLAG") + "$@ $<");
}
@@ -321,12 +321,18 @@ void MingwMakefileGenerator::writeIncPart(QTextStream &t)
t << "-I" << pwd << " ";
}
+ QString isystem = var("QMAKE_CFLAGS_ISYSTEM");
const ProStringList &incs = project->values("INCLUDEPATH");
for (ProStringList::ConstIterator incit = incs.begin(); incit != incs.end(); ++incit) {
QString inc = (*incit).toQString();
inc.replace(QRegExp("\\\\$"), "");
inc.replace(QRegExp("\""), "");
- t << "-I" << quote << inc << quote << " ";
+
+ if (!isystem.isEmpty() && isSystemInclude(inc))
+ t << isystem << ' ';
+ else
+ t << "-I";
+ t << quote << inc << quote << " ";
}
t << "-I" << quote << specdir() << quote
<< endl;
@@ -350,10 +356,10 @@ void MingwMakefileGenerator::writeObjectsPart(QTextStream &t)
if (project->values("OBJECTS").count() < var("QMAKE_LINK_OBJECT_MAX").toInt()) {
objectsLinkLine = "$(OBJECTS)";
} else if (project->isActiveConfig("staticlib") && project->first("TEMPLATE") == "lib") {
- QString ar_script_file = var("QMAKE_LINK_OBJECT_SCRIPT") + "." + var("TARGET");
- if (!var("BUILD_NAME").isEmpty()) {
- ar_script_file += "." + var("BUILD_NAME");
- }
+ QString ar_script_file = var("QMAKE_LINK_OBJECT_SCRIPT") + "." + var("TARGET");
+ if (!var("BUILD_NAME").isEmpty()) {
+ ar_script_file += "." + var("BUILD_NAME");
+ }
// QMAKE_LIB is used for win32, including mingw, whereas QMAKE_AR is used on Unix.
if (project->isActiveConfig("rvct_linker")) {
createRvctObjectScriptFile(ar_script_file, project->values("OBJECTS"));
@@ -371,9 +377,9 @@ void MingwMakefileGenerator::writeObjectsPart(QTextStream &t)
}
} else {
QString ld_script_file = var("QMAKE_LINK_OBJECT_SCRIPT") + "." + var("TARGET");
- if (!var("BUILD_NAME").isEmpty()) {
- ld_script_file += "." + var("BUILD_NAME");
- }
+ if (!var("BUILD_NAME").isEmpty()) {
+ ld_script_file += "." + var("BUILD_NAME");
+ }
if (project->isActiveConfig("rvct_linker")) {
createRvctObjectScriptFile(ld_script_file, project->values("OBJECTS"));
objectsLinkLine = QString::fromLatin1("--via ") + escapeFilePath(ld_script_file);
@@ -393,7 +399,7 @@ void MingwMakefileGenerator::writeBuildRulesPart(QTextStream &t)
if(!project->isEmpty("QMAKE_PRE_LINK"))
t << "\n\t" <<var("QMAKE_PRE_LINK");
if(project->isActiveConfig("staticlib") && project->first("TEMPLATE") == "lib") {
- if (project->values("OBJECTS").count() < var("QMAKE_LINK_OBJECT_MAX").toInt()) {
+ if (project->values("OBJECTS").count() < var("QMAKE_LINK_OBJECT_MAX").toInt()) {
t << "\n\t$(LIB) $(DESTDIR_TARGET) " << objectsLinkLine << " " ;
} else {
t << "\n\t" << objectsLinkLine << " " ;
diff --git a/qmake/generators/win32/msbuild_objectmodel.cpp b/qmake/generators/win32/msbuild_objectmodel.cpp
index d1420e95f6..75d3c4fa9c 100644
--- a/qmake/generators/win32/msbuild_objectmodel.cpp
+++ b/qmake/generators/win32/msbuild_objectmodel.cpp
@@ -614,12 +614,16 @@ void VCXProjectWriter::write(XmlOutput &xml, VCProject &tool)
<< tag("ItemGroup")
<< attrTag("Label", "ProjectConfigurations");
+ bool isWinRT = false;
+ bool isPhone = false;
for (int i = 0; i < tool.SingleProjects.count(); ++i) {
xml << tag("ProjectConfiguration")
<< attrTag("Include" , tool.SingleProjects.at(i).Configuration.Name)
<< tagValue("Configuration", tool.SingleProjects.at(i).Configuration.ConfigurationName)
<< tagValue("Platform", tool.SingleProjects.at(i).PlatformName)
<< closetag();
+ isWinRT = isWinRT || tool.SingleProjects.at(i).Configuration.WinRT;
+ isPhone = isPhone || tool.SingleProjects.at(i).Configuration.WinPhone;
}
xml << closetag()
@@ -629,18 +633,19 @@ void VCXProjectWriter::write(XmlOutput &xml, VCProject &tool)
<< tagValue("RootNamespace", tool.Name)
<< tagValue("Keyword", tool.Keyword);
- if (tool.SingleProjects.at(0).Configuration.WinRT) {
- xml << tagValue("MinimumVisualStudioVersion", "11.0");
- if (tool.SingleProjects.at(0).Configuration.WinPhone)
+ if (isWinRT) {
+ xml << tagValue("MinimumVisualStudioVersion", tool.Version);
+ if (isPhone) {
xml << tagValue("WinMDAssembly", "true");
- else
- xml << tagValue("AppContainerApplication", "true");
- }
-
- if (tool.SingleProjects.at(0).Configuration.WinPhone
- && tool.SingleProjects.at(0).Configuration.ConfigurationType == typeApplication) {
- xml << tagValue("XapOutputs", "true");
- xml << tagValue("XapFilename", "$(RootNamespace)_$(Configuration)_$(Platform).xap");
+ if (tool.SingleProjects.at(0).Configuration.ConfigurationType == typeApplication) {
+ xml << tagValue("XapOutputs", "true");
+ xml << tagValue("XapFilename", "$(RootNamespace)_$(Configuration)_$(Platform).xap");
+ }
+ } else {
+ xml << tagValue("AppContainerApplication", "true")
+ << tagValue("ApplicationType", "Windows Store")
+ << tagValue("ApplicationTypeRevision", tool.SdkVersion);
+ }
}
xml << closetag();
@@ -824,9 +829,43 @@ void VCXProjectWriter::write(XmlOutput &xml, VCProject &tool)
<< closetag();
}
+ // App manifest
+ if (isWinRT) {
+ QString manifest = isPhone ? QStringLiteral("WMAppManifest.xml") : QStringLiteral("Package.appxmanifest");
+
+ // Find all icons referenced in the manifest
+ QSet<QString> icons;
+ QFile manifestFile(manifest);
+ if (manifestFile.open(QFile::ReadOnly)) {
+ const QString contents = manifestFile.readAll();
+ QRegExp regexp("[\\\\/a-zA-Z0-9_\\-\\!]*\\.(png|jpg|jpeg)");
+ int pos = 0;
+ while (pos > -1) {
+ pos = regexp.indexIn(contents, pos);
+ if (pos >= 0) {
+ const QString match = regexp.cap(0);
+ icons.insert(match);
+ pos += match.length();
+ }
+ }
+ }
+
+ // Write out manifest + icons as content items
+ xml << tag(_ItemGroup)
+ << tag(isPhone ? "Xml" : "AppxManifest")
+ << attrTag("Include", manifest)
+ << closetag();
+ foreach (const QString &icon, icons) {
+ xml << tag("Image")
+ << attrTag("Include", icon)
+ << closetag();
+ }
+ xml << closetag();
+ }
+
xml << import("Project", "$(VCTargetsPath)\\Microsoft.Cpp.targets");
- if (tool.SingleProjects.at(0).Configuration.WinPhone)
+ if (isPhone)
xml << import("Project", "$(MSBuildExtensionsPath)\\Microsoft\\WindowsPhone\\v8.0\\Microsoft.Cpp.WindowsPhone.8.0.targets");
xml << tag("ImportGroup")
diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp
index 0abbd133cc..acccdc1bdc 100644
--- a/qmake/generators/win32/msvc_nmake.cpp
+++ b/qmake/generators/win32/msvc_nmake.cpp
@@ -124,28 +124,61 @@ NmakeMakefileGenerator::writeMakefile(QTextStream &t)
compiler = QStringLiteral("x86_amd64");
compilerArch = QStringLiteral("amd64");
}
+
+ const QString msvcVer = project->first("MSVC_VER").toQString();
+ if (msvcVer.isEmpty()) {
+ fprintf(stderr, "Mkspec does not specify MSVC_VER. Cannot continue.\n");
+ return false;
+ }
+ const QString winsdkVer = project->first("WINSDK_VER").toQString();
+ if (winsdkVer.isEmpty()) {
+ fprintf(stderr, "Mkspec does not specify WINSDK_VER. Cannot continue.\n");
+ return false;
+ }
+ const QString targetVer = project->first("WINTARGET_VER").toQString();
+ if (targetVer.isEmpty()) {
+ fprintf(stderr, "Mkspec does not specify WINTARGET_VER. Cannot continue.\n");
+ return false;
+ }
+
+ const bool isPhone = project->isActiveConfig(QStringLiteral("winphone"));
#ifdef Q_OS_WIN
-#ifdef Q_OS_WIN64
- const QString regKey = QStringLiteral("Software\\Wow6432Node\\Microsoft\\VisualStudio\\11.0\\Setup\\VC\\ProductDir");
-#else
- const QString regKey = QStringLiteral("Software\\Microsoft\\VisualStudio\\11.0\\Setup\\VC\\ProductDir");
+ QString regKeyPrefix;
+#if !defined(Q_OS_WIN64) && _WIN32_WINNT >= 0x0501
+ BOOL isWow64;
+ IsWow64Process(GetCurrentProcess(), &isWow64);
+ if (!isWow64)
+ regKeyPrefix = QStringLiteral("Software\\");
+ else
#endif
+ regKeyPrefix = QStringLiteral("Software\\Wow6432Node\\");
+
+ QString regKey = regKeyPrefix + QStringLiteral("Microsoft\\VisualStudio\\") + msvcVer + ("\\Setup\\VC\\ProductDir");
const QString vcInstallDir = qt_readRegistryKey(HKEY_LOCAL_MACHINE, regKey);
if (vcInstallDir.isEmpty()) {
- fprintf(stderr, "Failed to find the Visual Studio 2012 installation directory.\n"
- "Is it installed?.\n");
+ fprintf(stderr, "Failed to find the Visual Studio installation directory.\n");
+ return false;
+ }
+
+ regKey = regKeyPrefix
+ + (isPhone ? QStringLiteral("Microsoft\\Microsoft SDKs\\WindowsPhone\\v")
+ : QStringLiteral("Microsoft\\Microsoft SDKs\\Windows\\v"))
+ + winsdkVer + QStringLiteral("\\InstallationFolder");
+ const QString kitDir = qt_readRegistryKey(HKEY_LOCAL_MACHINE, regKey);
+ if (kitDir.isEmpty()) {
+ fprintf(stderr, "Failed to find the Windows Kit installation directory.\n");
return false;
}
#else
const QString vcInstallDir = "/fake/vc_install_dir";
+ const QString kitDir = "/fake/sdk_install_dir";
#endif // Q_OS_WIN
QStringList incDirs;
QStringList libDirs;
QStringList binDirs;
- const bool isPhone = project->isActiveConfig(QStringLiteral("winphone"));
if (isPhone) {
- QString sdkDir = vcInstallDir + QStringLiteral("/WPSDK/WP80");
+ QString sdkDir = vcInstallDir + QStringLiteral("/WPSDK/") + targetVer;
if (!QDir(sdkDir).exists()) {
fprintf(stderr, "Failed to find the Windows Phone SDK in %s.\n"
"Check that it is properly installed.\n",
@@ -155,14 +188,6 @@ NmakeMakefileGenerator::writeMakefile(QTextStream &t)
incDirs << sdkDir + QStringLiteral("/include");
libDirs << sdkDir + QStringLiteral("/lib/") + compilerArch;
binDirs << sdkDir + QStringLiteral("/bin/") + compiler;
-
- QString kitDir = vcInstallDir + QStringLiteral("/../../Windows Phone Kits/8.0");
- if (!QDir(kitDir).exists()) {
- fprintf(stderr, "Failed to find the Windows Phone Kit in %s.\n"
- "Check that it is properly installed.\n",
- qPrintable(QDir::toNativeSeparators(kitDir)));
- return false;
- }
libDirs << kitDir + QStringLiteral("/lib/") + arch;
incDirs << kitDir + QStringLiteral("/include")
<< kitDir + QStringLiteral("/include/abi")
@@ -170,18 +195,11 @@ NmakeMakefileGenerator::writeMakefile(QTextStream &t)
<< kitDir + QStringLiteral("/include/minwin");
} else {
incDirs << vcInstallDir + QStringLiteral("/include");
- libDirs << vcInstallDir + QStringLiteral("/lib/") + compilerArch;
+ libDirs << vcInstallDir + QStringLiteral("/lib/store/") + compilerArch
+ << vcInstallDir + QStringLiteral("/lib/") + compilerArch;
binDirs << vcInstallDir + QStringLiteral("/bin/") + compiler
<< vcInstallDir + QStringLiteral("/../Common7/IDE");
-
- QString kitDir = vcInstallDir + QStringLiteral("/../../Windows Kits/8.0");
- if (!QDir(kitDir).exists()) {
- fprintf(stderr, "Failed to find the Windows Kit in %s.\n"
- "Check that it is properly installed.\n",
- qPrintable(QDir::toNativeSeparators(kitDir)));
- return false;
- }
- libDirs << kitDir + QStringLiteral("/Lib/win8/um/") + arch;
+ libDirs << kitDir + QStringLiteral("/Lib/") + targetVer + ("/um/") + arch;
incDirs << kitDir + QStringLiteral("/include/um")
<< kitDir + QStringLiteral("/include/shared")
<< kitDir + QStringLiteral("/include/winrt");
@@ -285,7 +303,7 @@ void NmakeMakefileGenerator::writeNmakeParts(QTextStream &t)
}
}
-QString NmakeMakefileGenerator::var(const ProKey &value)
+QString NmakeMakefileGenerator::var(const ProKey &value) const
{
if (usePCH) {
if ((value == "QMAKE_RUN_CXX_IMP_BATCH"
diff --git a/qmake/generators/win32/msvc_nmake.h b/qmake/generators/win32/msvc_nmake.h
index 7a47bb8cec..4d3c69bdd6 100644
--- a/qmake/generators/win32/msvc_nmake.h
+++ b/qmake/generators/win32/msvc_nmake.h
@@ -62,7 +62,7 @@ protected:
virtual QString getPdbTarget();
virtual QString defaultInstall(const QString &t);
virtual QStringList &findDependencies(const QString &file);
- QString var(const ProKey &value);
+ QString var(const ProKey &value) const;
QString precompH, precompObj, precompPch;
bool usePCH;
diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp
index 8159cf58e2..3217500916 100644
--- a/qmake/generators/win32/msvc_objectmodel.cpp
+++ b/qmake/generators/win32/msvc_objectmodel.cpp
@@ -1532,7 +1532,7 @@ bool VCLinkerTool::parseOption(const char* option)
AdditionalOptions.append(option);
}
break;
- case 0x379ED25:
+ case 0x379ED25:
case 0x157cf65: // /MACHINE:{AM33|ARM|CEE|IA64|X86|M32R|MIPS|MIPS16|MIPSFPU|MIPSFPU16|MIPSR41XX|PPC|SH3|SH4|SH5|THUMB|TRICORE}
switch (elfHash(option+9)) {
// Very limited documentation on all options but X86,
@@ -1662,7 +1662,7 @@ bool VCLinkerTool::parseOption(const char* option)
else
AdditionalOptions += option;
break;
- case 0x9B3C00D:
+ case 0x9B3C00D:
case 0x78dc00d: // /SUBSYSTEM:{CONSOLE|EFI_APPLICATION|EFI_BOOT_SERVICE_DRIVER|EFI_ROM|EFI_RUNTIME_DRIVER|NATIVE|POSIX|WINDOWS|WINDOWSCE}[,major[.minor]]
{
// Split up in subsystem, and version number
@@ -2248,7 +2248,7 @@ bool VCFilter::addExtraCompiler(const VCFilterFile &info)
CustomBuildTool.Description.clear();
CustomBuildTool.Outputs.clear();
CustomBuildTool.ToolPath.clear();
- CustomBuildTool.ToolName = QLatin1String(_VCCustomBuildTool);
+ CustomBuildTool.ToolName = QLatin1String(_VCCustomBuildTool);
for (int x = 0; x < extraCompilers.count(); ++x) {
const QString &extraCompilerName = extraCompilers.at(x);
@@ -2286,13 +2286,13 @@ bool VCFilter::addExtraCompiler(const VCFilterFile &info)
}
// Dependency for the output
- if(!tmp_dep.isEmpty())
- deps = tmp_dep;
- if(!tmp_dep_cmd.isEmpty()) {
+ if (!tmp_dep.isEmpty())
+ deps = tmp_dep;
+ if (!tmp_dep_cmd.isEmpty()) {
// Execute dependency command, and add every line as a dep
- char buff[256];
- QString dep_cmd = Project->replaceExtraCompilerVariables(tmp_dep_cmd,
- Option::fixPathToLocalOS(inFile, true, false),
+ char buff[256];
+ QString dep_cmd = Project->replaceExtraCompilerVariables(tmp_dep_cmd,
+ Option::fixPathToLocalOS(inFile, true, false),
out);
if(Project->canExecute(dep_cmd)) {
dep_cmd.prepend(QLatin1String("cd ")
@@ -2319,7 +2319,7 @@ bool VCFilter::addExtraCompiler(const VCFilterFile &info)
}
}
for (int i = 0; i < deps.count(); ++i)
- deps[i] = Option::fixPathToTargetOS(
+ deps[i] = Option::fixPathToTargetOS(
Project->replaceExtraCompilerVariables(deps.at(i), inFile, out),
false).trimmed();
// Command for file
@@ -2348,18 +2348,18 @@ bool VCFilter::addExtraCompiler(const VCFilterFile &info)
out);
}
// Name for command
- if(!tmp_cmd_name.isEmpty()) {
- cmd_name = Project->replaceExtraCompilerVariables(tmp_cmd_name, inFile, out);
- } else {
- int space = cmd.indexOf(' ');
- if(space != -1)
- cmd_name = cmd.left(space);
- else
- cmd_name = cmd;
- if((cmd_name[0] == '\'' || cmd_name[0] == '"') &&
- cmd_name[0] == cmd_name[cmd_name.length()-1])
- cmd_name = cmd_name.mid(1,cmd_name.length()-2);
- }
+ if (!tmp_cmd_name.isEmpty()) {
+ cmd_name = Project->replaceExtraCompilerVariables(tmp_cmd_name, inFile, out);
+ } else {
+ int space = cmd.indexOf(' ');
+ if (space != -1)
+ cmd_name = cmd.left(space);
+ else
+ cmd_name = cmd;
+ if ((cmd_name[0] == '\'' || cmd_name[0] == '"') &&
+ cmd_name[0] == cmd_name[cmd_name.length()-1])
+ cmd_name = cmd_name.mid(1,cmd_name.length()-2);
+ }
// Fixify paths
for (int i = 0; i < deps.count(); ++i)
diff --git a/qmake/generators/win32/msvc_objectmodel.h b/qmake/generators/win32/msvc_objectmodel.h
index 58b528301c..7c51f6a67a 100644
--- a/qmake/generators/win32/msvc_objectmodel.h
+++ b/qmake/generators/win32/msvc_objectmodel.h
@@ -955,7 +955,7 @@ public:
VCConfiguration* Config;
QList<VCFilterFile> Files;
- customBuildCheck CustomBuild;
+ customBuildCheck CustomBuild;
bool useCustomBuildTool;
VCCustomBuildTool CustomBuildTool;
@@ -990,6 +990,7 @@ public:
QString SccProjectName;
QString SccLocalPath;
QString PlatformName;
+ QString SdkVersion;
// XML sub-parts
VCConfiguration Configuration;
@@ -1129,6 +1130,7 @@ public:
QString SccProjectName;
QString SccLocalPath;
QString PlatformName;
+ QString SdkVersion;
// Single projects
QList<VCProjectSingleConfig> SingleProjects;
diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp
index f86c8512d4..829be89097 100644
--- a/qmake/generators/win32/msvc_vcproj.cpp
+++ b/qmake/generators/win32/msvc_vcproj.cpp
@@ -111,9 +111,10 @@ QT_END_NAMESPACE
#endif
QT_BEGIN_NAMESPACE
-DotNET which_dotnet_version()
+DotNET which_dotnet_version(const QByteArray &preferredVersion = QByteArray())
{
#ifndef Q_OS_WIN32
+ Q_UNUSED(preferredVersion);
return NET2002; // Always generate 7.0 versions on other platforms
#else
// Only search for the version once
@@ -135,6 +136,10 @@ DotNET which_dotnet_version()
installPaths.insert(lowestInstalledVersion->version, path);
++installed;
current_version = lowestInstalledVersion->version;
+ if (QByteArray(lowestInstalledVersion->versionStr).contains(preferredVersion)) {
+ installed = 1;
+ break;
+ }
}
}
@@ -286,6 +291,7 @@ bool VcprojGenerator::writeProjectMakefile()
mergedProjects.at(0)->writePrlFile();
mergedProject.Name = project->first("QMAKE_PROJECT_NAME").toQString();
mergedProject.Version = mergedProjects.at(0)->vcProject.Version;
+ mergedProject.SdkVersion = mergedProjects.at(0)->vcProject.SdkVersion;
mergedProject.ProjectGUID = project->isEmpty("QMAKE_UUID") ? getProjectUUID().toString().toUpper() : project->first("QMAKE_UUID").toQString();
mergedProject.Keyword = project->first("VCPROJ_KEYWORD").toQString();
mergedProject.SccProjectName = mergedProjects.at(0)->vcProject.SccProjectName;
@@ -585,7 +591,7 @@ void VcprojGenerator::writeSubDirs(QTextStream &t)
return;
}
- switch(which_dotnet_version()) {
+ switch (which_dotnet_version(project->first("MSVC_VER").toLatin1())) {
case NET2013:
t << _slnHeader120;
break;
@@ -874,12 +880,12 @@ void VcprojGenerator::initProject()
// Own elements -----------------------------
vcProject.Name = unescapeFilePath(project->first("QMAKE_ORIG_TARGET").toQString());
- switch(which_dotnet_version()) {
+ switch (which_dotnet_version(project->first("MSVC_VER").toLatin1())) {
case NET2013:
- vcProject.Version = "13.00";
+ vcProject.Version = "12.00";
break;
case NET2012:
- vcProject.Version = "12.00";
+ vcProject.Version = "11.00";
break;
case NET2010:
vcProject.Version = "10.00";
@@ -912,6 +918,7 @@ void VcprojGenerator::initProject()
} else {
vcProject.PlatformName = project->values("CE_SDK").join(' ') + " (" + project->first("CE_ARCH") + ")";
}
+ vcProject.SdkVersion = project->first("WINSDK_VER").toQString();
// These are not used by Qt, but may be used by customers
vcProject.SccProjectName = project->first("SCCPROJECTNAME").toQString();
vcProject.SccLocalPath = project->first("SCCLOCALPATH").toQString();
@@ -924,7 +931,7 @@ void VcprojGenerator::initConfiguration()
// - Do this first since main configuration elements may need
// - to know of certain compiler/linker options
VCConfiguration &conf = vcProject.Configuration;
- conf.CompilerVersion = which_dotnet_version();
+ conf.CompilerVersion = which_dotnet_version(project->first("MSVC_VER").toLatin1());
initCompilerTool();
@@ -970,8 +977,13 @@ void VcprojGenerator::initConfiguration()
if (conf.CompilerVersion >= NET2012) {
conf.WinRT = project->isActiveConfig("winrt");
- if (conf.WinRT)
+ if (conf.WinRT) {
conf.WinPhone = project->isActiveConfig("winphone");
+ // Saner defaults
+ conf.compiler.UsePrecompiledHeader = pchNone;
+ conf.compiler.CompileAsWinRT = _False;
+ conf.linker.GenerateWindowsMetadata = _False;
+ }
}
conf.Name = project->values("BUILD_NAME").join(' ');
@@ -988,7 +1000,7 @@ void VcprojGenerator::initConfiguration()
conf.ATLMinimizesCRunTimeLibraryUsage = (project->first("ATLMinimizesCRunTimeLibraryUsage").isEmpty() ? _False : _True);
conf.BuildBrowserInformation = triState(temp.isEmpty() ? (short)unset : temp.toShort());
temp = project->first("CharacterSet");
- conf.CharacterSet = charSet(temp.isEmpty() ? (short)charSetNotSet : temp.toShort());
+ conf.CharacterSet = charSet(temp.isEmpty() ? short(conf.WinRT ? charSetUnicode : charSetNotSet) : temp.toShort());
conf.DeleteExtensionsOnClean = project->first("DeleteExtensionsOnClean").toQString();
conf.ImportLibrary = conf.linker.ImportLibrary;
conf.IntermediateDirectory = project->first("OBJECTS_DIR").toQString();
diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp
index 30d28e6e11..de243e4394 100644
--- a/qmake/generators/win32/winmakefile.cpp
+++ b/qmake/generators/win32/winmakefile.cpp
@@ -89,12 +89,12 @@ Win32MakefileGenerator::findHighestVersion(const QString &d, const QString &stem
QRegExp regx(QString("((lib)?%1([0-9]*)).(%2|prl)$").arg(stem).arg(ext), Qt::CaseInsensitive);
for(QStringList::Iterator it = entries.begin(); it != entries.end(); ++it) {
if(regx.exactMatch((*it))) {
- if (!regx.cap(3).isEmpty()) {
- bool ok = true;
- int num = regx.cap(3).toInt(&ok);
- biggest = qMax(biggest, (!ok ? -1 : num));
- }
- }
+ if (!regx.cap(3).isEmpty()) {
+ bool ok = true;
+ int num = regx.cap(3).toInt(&ok);
+ biggest = qMax(biggest, (!ok ? -1 : num));
+ }
+ }
}
}
if(libInfoRead
@@ -485,20 +485,20 @@ void Win32MakefileGenerator::processRcFileVar()
rcFile.close();
}
if (writeRcFile) {
- bool ok;
- ok = rcFile.open(QFile::WriteOnly);
- if (!ok) {
- // The file can't be opened... try creating the containing
- // directory first (needed for clean shadow builds)
- QDir().mkpath(QFileInfo(rcFile).path());
- ok = rcFile.open(QFile::WriteOnly);
- }
- if (!ok) {
- ::fprintf(stderr, "Cannot open for writing: %s", rcFile.fileName().toLatin1().constData());
- ::exit(1);
- }
- rcFile.write(rcString);
- rcFile.close();
+ bool ok;
+ ok = rcFile.open(QFile::WriteOnly);
+ if (!ok) {
+ // The file can't be opened... try creating the containing
+ // directory first (needed for clean shadow builds)
+ QDir().mkpath(QFileInfo(rcFile).path());
+ ok = rcFile.open(QFile::WriteOnly);
+ }
+ if (!ok) {
+ ::fprintf(stderr, "Cannot open for writing: %s", rcFile.fileName().toLatin1().constData());
+ ::exit(1);
+ }
+ rcFile.write(rcString);
+ rcFile.close();
}
if (project->values("QMAKE_WRITE_DEFAULT_RC").isEmpty())
project->values("RC_FILE").insert(0, rcFile.fileName());
@@ -530,7 +530,7 @@ void Win32MakefileGenerator::processRcFileVar()
}
project->values("RES_FILE").first() = Option::fixPathToTargetOS(
project->values("RES_FILE").first().toQString(), false, false);
- project->values("POST_TARGETDEPS") += project->values("RES_FILE");
+ project->values("POST_TARGETDEPS") += project->values("RES_FILE");
project->values("CLEAN_FILES") += project->values("RES_FILE");
}
}
diff --git a/qmake/option.cpp b/qmake/option.cpp
index 7b93144d82..a2bd938666 100644
--- a/qmake/option.cpp
+++ b/qmake/option.cpp
@@ -329,9 +329,9 @@ Option::init(int argc, char **argv)
globals->qmake_abslocation = argv0;
} else if (argv0.contains(QLatin1Char('/'))
#ifdef Q_OS_WIN
- || argv0.contains(QLatin1Char('\\'))
+ || argv0.contains(QLatin1Char('\\'))
#endif
- ) { //relative PWD
+ ) { //relative PWD
globals->qmake_abslocation = QDir::current().absoluteFilePath(argv0);
} else { //in the PATH
QByteArray pEnv = qgetenv("PATH");
diff --git a/qmake/project.h b/qmake/project.h
index 26037bb912..fc203c4d7d 100644
--- a/qmake/project.h
+++ b/qmake/project.h
@@ -57,6 +57,7 @@ public:
bool read(const QString &project, LoadFlags what = LoadAll);
QString projectFile() const { return m_projectFile; }
+ QString sourceRoot() const { return m_sourceRoot.isEmpty() ? m_buildRoot : m_sourceRoot; }
QString buildRoot() const { return m_buildRoot; }
QString confFile() const { return m_conffile; }
QString cacheFile() const { return m_cachefile; }
diff --git a/qmake/qmake.pri b/qmake/qmake.pri
index 661b787a55..acc9975843 100644
--- a/qmake/qmake.pri
+++ b/qmake/qmake.pri
@@ -67,6 +67,7 @@ bootstrap { #Qt code
qtextcodec.cpp \
qutfcodec.cpp \
qstring.cpp \
+ qstring_compat.cpp \
qstringlist.cpp \
qtemporaryfile.cpp \
qtextstream.cpp \
@@ -149,7 +150,7 @@ bootstrap { #Qt code
SOURCES += qfilesystemengine_win.cpp qfsfileengine_win.cpp qfilesystemiterator_win.cpp qsettings_win.cpp \
qsystemlibrary.cpp qlocale_win.cpp registry.cpp
win32-msvc*:LIBS += ole32.lib advapi32.lib
- win32-g++*:LIBS += -lole32 -luuid -ladvapi32 -lkernel32
+ mingw:LIBS += -lole32 -luuid -ladvapi32 -lkernel32
}
qnx {
diff --git a/src/3rdparty/angle/include/EGL/eglplatform.h b/src/3rdparty/angle/include/EGL/eglplatform.h
index 34283f2e90..eb15ae569d 100644
--- a/src/3rdparty/angle/include/EGL/eglplatform.h
+++ b/src/3rdparty/angle/include/EGL/eglplatform.h
@@ -67,7 +67,15 @@
* implementations.
*/
-#if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */
+#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY==WINAPI_FAMILY_APP || WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP) /* Windows Runtime */
+
+struct IUnknown;
+
+typedef int EGLNativeDisplayType;
+typedef void *EGLNativePixmapType;
+typedef IUnknown *EGLNativeWindowType;
+
+#elif defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN 1
#endif
diff --git a/src/3rdparty/angle/src/compiler/osinclude.h b/src/3rdparty/angle/src/compiler/osinclude.h
index d8bb1a797c..60177d5fe5 100644
--- a/src/3rdparty/angle/src/compiler/osinclude.h
+++ b/src/3rdparty/angle/src/compiler/osinclude.h
@@ -13,27 +13,26 @@
//
#if defined(_WIN32) || defined(_WIN64)
+#define STRICT
+#define VC_EXTRALEAN 1
+#include <windows.h>
+#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY==WINAPI_FAMILY_APP || WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP)
+#define ANGLE_OS_WINRT
+#else
#define ANGLE_OS_WIN
+#endif
#elif defined(__APPLE__) || defined(__linux__) || \
defined(__FreeBSD__) || defined(__OpenBSD__) || \
defined(__sun) || defined(ANDROID) || \
defined(__GLIBC__) || defined(__GNU__) || \
defined(__QNX__)
#define ANGLE_OS_POSIX
-#else
-#error Unsupported platform.
-#endif
-
-#if defined(ANGLE_OS_WIN)
-#define STRICT
-#define VC_EXTRALEAN 1
-#include <windows.h>
-#elif defined(ANGLE_OS_POSIX)
#include <pthread.h>
#include <semaphore.h>
#include <errno.h>
-#endif // ANGLE_OS_WIN
-
+#else
+#error Unsupported platform.
+#endif
#include "compiler/debug.h"
@@ -43,23 +42,17 @@
#if defined(ANGLE_OS_WIN)
typedef DWORD OS_TLSIndex;
#define OS_INVALID_TLS_INDEX (TLS_OUT_OF_INDEXES)
+#elif defined(ANGLE_OS_WINRT)
+typedef size_t OS_TLSIndex;
+#define OS_INVALID_TLS_INDEX ((DWORD)0xFFFFFF)
#elif defined(ANGLE_OS_POSIX)
typedef pthread_key_t OS_TLSIndex;
#define OS_INVALID_TLS_INDEX (static_cast<OS_TLSIndex>(-1))
#endif // ANGLE_OS_WIN
OS_TLSIndex OS_AllocTLSIndex();
+void *OS_GetTLSValue(OS_TLSIndex nIndex);
bool OS_SetTLSValue(OS_TLSIndex nIndex, void *lpvValue);
bool OS_FreeTLSIndex(OS_TLSIndex nIndex);
-inline void* OS_GetTLSValue(OS_TLSIndex nIndex)
-{
- ASSERT(nIndex != OS_INVALID_TLS_INDEX);
-#if defined(ANGLE_OS_WIN)
- return TlsGetValue(nIndex);
-#elif defined(ANGLE_OS_POSIX)
- return pthread_getspecific(nIndex);
-#endif // ANGLE_OS_WIN
-}
-
#endif // __OSINCLUDE_H
diff --git a/src/3rdparty/angle/src/compiler/ossource_posix.cpp b/src/3rdparty/angle/src/compiler/ossource_posix.cpp
index 1e1e699aeb..35510c1af5 100644
--- a/src/3rdparty/angle/src/compiler/ossource_posix.cpp
+++ b/src/3rdparty/angle/src/compiler/ossource_posix.cpp
@@ -33,6 +33,14 @@ OS_TLSIndex OS_AllocTLSIndex()
}
+void *OS_GetTLSValue(OS_TLSIndex nIndex)
+{
+ ASSERT(nIndex != OS_INVALID_TLS_INDEX);
+
+ return pthread_getspecific(nIndex);
+}
+
+
bool OS_SetTLSValue(OS_TLSIndex nIndex, void *lpvValue)
{
if (nIndex == OS_INVALID_TLS_INDEX) {
diff --git a/src/3rdparty/angle/src/compiler/ossource_win.cpp b/src/3rdparty/angle/src/compiler/ossource_win.cpp
index 89922fef3f..708a1ad311 100644
--- a/src/3rdparty/angle/src/compiler/ossource_win.cpp
+++ b/src/3rdparty/angle/src/compiler/ossource_win.cpp
@@ -29,6 +29,14 @@ OS_TLSIndex OS_AllocTLSIndex()
}
+void *OS_GetTLSValue(OS_TLSIndex nIndex)
+{
+ ASSERT(nIndex != OS_INVALID_TLS_INDEX);
+
+ return TlsGetValue(nIndex);
+}
+
+
bool OS_SetTLSValue(OS_TLSIndex nIndex, void *lpvValue)
{
if (nIndex == OS_INVALID_TLS_INDEX) {
diff --git a/src/3rdparty/angle/src/compiler/ossource_winrt.cpp b/src/3rdparty/angle/src/compiler/ossource_winrt.cpp
new file mode 100644
index 0000000000..84443abc02
--- /dev/null
+++ b/src/3rdparty/angle/src/compiler/ossource_winrt.cpp
@@ -0,0 +1,75 @@
+//
+// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+
+#include "compiler/osinclude.h"
+//
+// This file contains contains Windows Runtime specific functions
+//
+
+#if !defined(ANGLE_OS_WINRT)
+#error Trying to build a WinRT specific file in a non-WinRT build.
+#endif
+
+#include <vector>
+
+
+//
+// Thread Local Storage Operations
+//
+__declspec(thread) std::vector<void *> *tls = nullptr;
+__declspec(thread) std::vector<OS_TLSIndex> *freeIndices = nullptr;
+
+OS_TLSIndex OS_AllocTLSIndex()
+{
+ if (!tls)
+ tls = new std::vector<void*>;
+
+ if (freeIndices && !freeIndices->empty()) {
+ OS_TLSIndex index = freeIndices->back();
+ freeIndices->pop_back();
+ return index;
+ } else {
+ tls->push_back(nullptr);
+ return tls->size() - 1;
+ }
+}
+
+
+void *OS_GetTLSValue(OS_TLSIndex nIndex)
+{
+ ASSERT(nIndex != OS_INVALID_TLS_INDEX);
+ ASSERT(tls);
+
+ return tls->at(nIndex);
+}
+
+
+bool OS_SetTLSValue(OS_TLSIndex nIndex, void *lpvValue)
+{
+ if (!tls || nIndex >= tls->size() || nIndex == OS_INVALID_TLS_INDEX) {
+ ASSERT(0 && "OS_SetTLSValue(): Invalid TLS Index");
+ return false;
+ }
+
+ tls->at(nIndex) = lpvValue;
+ return true;
+}
+
+
+bool OS_FreeTLSIndex(OS_TLSIndex nIndex)
+{
+ if (!tls || nIndex >= tls->size() || nIndex == OS_INVALID_TLS_INDEX) {
+ ASSERT(0 && "OS_SetTLSValue(): Invalid TLS Index");
+ return false;
+ }
+
+ if (!freeIndices)
+ freeIndices = new std::vector<OS_TLSIndex>;
+
+ freeIndices->push_back(nIndex);
+
+ return true;
+}
diff --git a/src/3rdparty/angle/src/libEGL/Display.cpp b/src/3rdparty/angle/src/libEGL/Display.cpp
index a382c3b1eb..14973aff30 100644
--- a/src/3rdparty/angle/src/libEGL/Display.cpp
+++ b/src/3rdparty/angle/src/libEGL/Display.cpp
@@ -186,7 +186,7 @@ bool Display::getConfigAttrib(EGLConfig config, EGLint attribute, EGLint *value)
-EGLSurface Display::createWindowSurface(HWND window, EGLConfig config, const EGLint *attribList)
+EGLSurface Display::createWindowSurface(EGLNativeWindowType window, EGLConfig config, const EGLint *attribList)
{
const Config *configuration = mConfigSet.get(config);
EGLint postSubBufferSupported = EGL_FALSE;
@@ -456,7 +456,7 @@ bool Display::isValidSurface(egl::Surface *surface)
return mSurfaceSet.find(surface) != mSurfaceSet.end();
}
-bool Display::hasExistingWindowSurface(HWND window)
+bool Display::hasExistingWindowSurface(EGLNativeWindowType window)
{
for (SurfaceSet::iterator surface = mSurfaceSet.begin(); surface != mSurfaceSet.end(); surface++)
{
@@ -471,7 +471,6 @@ bool Display::hasExistingWindowSurface(HWND window)
void Display::initExtensionString()
{
- HMODULE swiftShader = GetModuleHandle(TEXT("swiftshader_d3d9.dll"));
bool shareHandleSupported = mRenderer->getShareHandleSupport();
mExtensionString = "";
@@ -487,10 +486,13 @@ void Display::initExtensionString()
mExtensionString += "EGL_ANGLE_query_surface_pointer ";
+#if !defined(ANGLE_OS_WINRT)
+ HMODULE swiftShader = GetModuleHandle(TEXT("swiftshader_d3d9.dll"));
if (swiftShader)
{
mExtensionString += "EGL_ANGLE_software_display ";
}
+#endif
if (shareHandleSupported)
{
diff --git a/src/3rdparty/angle/src/libEGL/Display.h b/src/3rdparty/angle/src/libEGL/Display.h
index 58c3940331..5d55410440 100644
--- a/src/3rdparty/angle/src/libEGL/Display.h
+++ b/src/3rdparty/angle/src/libEGL/Display.h
@@ -40,7 +40,7 @@ class Display
bool getConfigs(EGLConfig *configs, const EGLint *attribList, EGLint configSize, EGLint *numConfig);
bool getConfigAttrib(EGLConfig config, EGLint attribute, EGLint *value);
- EGLSurface createWindowSurface(HWND window, EGLConfig config, const EGLint *attribList);
+ EGLSurface createWindowSurface(EGLNativeWindowType window, EGLConfig config, const EGLint *attribList);
EGLSurface createOffscreenSurface(EGLConfig config, HANDLE shareHandle, const EGLint *attribList);
EGLContext createContext(EGLConfig configHandle, const gl::Context *shareContext, bool notifyResets, bool robustAccess);
@@ -51,7 +51,7 @@ class Display
bool isValidConfig(EGLConfig config);
bool isValidContext(gl::Context *context);
bool isValidSurface(egl::Surface *surface);
- bool hasExistingWindowSurface(HWND window);
+ bool hasExistingWindowSurface(EGLNativeWindowType window);
rx::Renderer *getRenderer() { return mRenderer; };
diff --git a/src/3rdparty/angle/src/libEGL/Surface.cpp b/src/3rdparty/angle/src/libEGL/Surface.cpp
index 83fbbf5b07..dbff159d0e 100644
--- a/src/3rdparty/angle/src/libEGL/Surface.cpp
+++ b/src/3rdparty/angle/src/libEGL/Surface.cpp
@@ -22,10 +22,15 @@
#include <algorithm>
+#if defined(ANGLE_OS_WINRT)
+#include <windows.foundation.h>
+#include <windows.ui.core.h>
+#endif
+
namespace egl
{
-Surface::Surface(Display *display, const Config *config, HWND window, EGLint postSubBufferSupported)
+Surface::Surface(Display *display, const Config *config, EGLNativeWindowType window, EGLint postSubBufferSupported)
: mDisplay(display), mConfig(config), mWindow(window), mPostSubBufferSupported(postSubBufferSupported)
{
mRenderer = mDisplay->getRenderer();
@@ -98,6 +103,7 @@ bool Surface::resetSwapChain()
if (mWindow)
{
+#if !defined(ANGLE_OS_WINRT)
RECT windowRect;
if (!GetClientRect(getWindowHandle(), &windowRect))
{
@@ -109,6 +115,19 @@ bool Surface::resetSwapChain()
width = windowRect.right - windowRect.left;
height = windowRect.bottom - windowRect.top;
+#else
+ ABI::Windows::Foundation::Rect windowRect;
+ ABI::Windows::UI::Core::ICoreWindow *window;
+ HRESULT result = mWindow->QueryInterface(IID_PPV_ARGS(&window));
+ if (FAILED(result))
+ {
+ ASSERT(false);
+ return false;
+ }
+ window->get_Bounds(&windowRect);
+ width = windowRect.Width;
+ height = windowRect.Height;
+#endif
}
else
{
@@ -228,7 +247,7 @@ bool Surface::swapRect(EGLint x, EGLint y, EGLint width, EGLint height)
return true;
}
-HWND Surface::getWindowHandle()
+EGLNativeWindowType Surface::getWindowHandle()
{
return mWindow;
}
@@ -237,6 +256,7 @@ HWND Surface::getWindowHandle()
#define kSurfaceProperty _TEXT("Egl::SurfaceOwner")
#define kParentWndProc _TEXT("Egl::SurfaceParentWndProc")
+#if !defined(ANGLE_OS_WINRT)
static LRESULT CALLBACK SurfaceWindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)
{
if (message == WM_SIZE)
@@ -250,9 +270,13 @@ static LRESULT CALLBACK SurfaceWindowProc(HWND hwnd, UINT message, WPARAM wparam
WNDPROC prevWndFunc = reinterpret_cast<WNDPROC >(GetProp(hwnd, kParentWndProc));
return CallWindowProc(prevWndFunc, hwnd, message, wparam, lparam);
}
+#endif
void Surface::subclassWindow()
{
+#if defined(ANGLE_OS_WINRT)
+ mWindowSubclassed = false;
+#else
if (!mWindow)
{
return;
@@ -276,10 +300,12 @@ void Surface::subclassWindow()
SetProp(mWindow, kSurfaceProperty, reinterpret_cast<HANDLE>(this));
SetProp(mWindow, kParentWndProc, reinterpret_cast<HANDLE>(oldWndProc));
mWindowSubclassed = true;
+#endif
}
void Surface::unsubclassWindow()
{
+#if !defined(ANGLE_OS_WINRT)
if(!mWindowSubclassed)
{
return;
@@ -302,10 +328,12 @@ void Surface::unsubclassWindow()
RemoveProp(mWindow, kSurfaceProperty);
RemoveProp(mWindow, kParentWndProc);
mWindowSubclassed = false;
+#endif
}
bool Surface::checkForOutOfDateSwapChain()
{
+#if !defined(ANGLE_OS_WINRT)
RECT client;
if (!GetClientRect(getWindowHandle(), &client))
{
@@ -316,6 +344,19 @@ bool Surface::checkForOutOfDateSwapChain()
// Grow the buffer now, if the window has grown. We need to grow now to avoid losing information.
int clientWidth = client.right - client.left;
int clientHeight = client.bottom - client.top;
+#else
+ ABI::Windows::Foundation::Rect windowRect;
+ ABI::Windows::UI::Core::ICoreWindow *window;
+ HRESULT result = mWindow->QueryInterface(IID_PPV_ARGS(&window));
+ if (FAILED(result))
+ {
+ ASSERT(false);
+ return false;
+ }
+ window->get_Bounds(&windowRect);
+ int clientWidth = windowRect.Width;
+ int clientHeight = windowRect.Height;
+#endif
bool sizeDirty = clientWidth != getWidth() || clientHeight != getHeight();
if (mSwapIntervalDirty)
diff --git a/src/3rdparty/angle/src/libEGL/Surface.h b/src/3rdparty/angle/src/libEGL/Surface.h
index 938b800cdd..ae9a380858 100644
--- a/src/3rdparty/angle/src/libEGL/Surface.h
+++ b/src/3rdparty/angle/src/libEGL/Surface.h
@@ -15,6 +15,7 @@
#include <EGL/egl.h>
#include "common/angleutils.h"
+#include "windows.h"
namespace gl
{
@@ -34,7 +35,7 @@ class Config;
class Surface
{
public:
- Surface(Display *display, const egl::Config *config, HWND window, EGLint postSubBufferSupported);
+ Surface(Display *display, const egl::Config *config, EGLNativeWindowType window, EGLint postSubBufferSupported);
Surface(Display *display, const egl::Config *config, HANDLE shareHandle, EGLint width, EGLint height, EGLenum textureFormat, EGLenum textureTarget);
~Surface();
@@ -43,7 +44,7 @@ class Surface
void release();
bool resetSwapChain();
- HWND getWindowHandle();
+ EGLNativeWindowType getWindowHandle();
bool swap();
bool postSubBuffer(EGLint x, EGLint y, EGLint width, EGLint height);
@@ -79,7 +80,7 @@ private:
bool resetSwapChain(int backbufferWidth, int backbufferHeight);
bool swapRect(EGLint x, EGLint y, EGLint width, EGLint height);
- const HWND mWindow; // Window that the surface is created for.
+ const EGLNativeWindowType mWindow; // Window that the surface is created for.
bool mWindowSubclassed; // Indicates whether we successfully subclassed mWindow for WM_RESIZE hooking
const egl::Config *mConfig; // EGL config surface was created with
EGLint mHeight; // Height of surface
diff --git a/src/3rdparty/angle/src/libEGL/libEGL.cpp b/src/3rdparty/angle/src/libEGL/libEGL.cpp
index 6e10c3926d..5bcb5d5959 100644
--- a/src/3rdparty/angle/src/libEGL/libEGL.cpp
+++ b/src/3rdparty/angle/src/libEGL/libEGL.cpp
@@ -308,14 +308,16 @@ EGLSurface __stdcall eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, EG
return EGL_NO_SURFACE;
}
+#if !defined(ANGLE_OS_WINRT)
HWND window = (HWND)win;
if (!IsWindow(window))
{
return egl::error(EGL_BAD_NATIVE_WINDOW, EGL_NO_SURFACE);
}
+#endif
- return display->createWindowSurface(window, config, attrib_list);
+ return display->createWindowSurface(win, config, attrib_list);
}
catch(std::bad_alloc&)
{
diff --git a/src/3rdparty/angle/src/libEGL/main.cpp b/src/3rdparty/angle/src/libEGL/main.cpp
index 7dea5fc74b..964b4b21fd 100644
--- a/src/3rdparty/angle/src/libEGL/main.cpp
+++ b/src/3rdparty/angle/src/libEGL/main.cpp
@@ -1,3 +1,4 @@
+#include "../libGLESv2/precompiled.h"
//
// Copyright (c) 2002-2012 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
@@ -12,7 +13,13 @@
#ifndef QT_OPENGL_ES_2_ANGLE_STATIC
+#if !defined(ANGLE_OS_WINRT)
static DWORD currentTLS = TLS_OUT_OF_INDEXES;
+#else
+static __declspec(thread) void *currentTLS = 0;
+#endif
+
+namespace egl { Current *getCurrent(); }
extern "C" BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved)
{
@@ -35,22 +42,25 @@ extern "C" BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved
}
#endif
+#if !defined(ANGLE_OS_WINRT)
currentTLS = TlsAlloc();
if (currentTLS == TLS_OUT_OF_INDEXES)
{
return FALSE;
}
+#endif
}
// Fall throught to initialize index
case DLL_THREAD_ATTACH:
{
- egl::Current *current = (egl::Current*)LocalAlloc(LPTR, sizeof(egl::Current));
+ egl::Current *current = egl::getCurrent();
if (current)
{
+#if !defined(ANGLE_OS_WINRT)
TlsSetValue(currentTLS, current);
-
+#endif
current->error = EGL_SUCCESS;
current->API = EGL_OPENGL_ES_API;
current->display = EGL_NO_DISPLAY;
@@ -61,24 +71,35 @@ extern "C" BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved
break;
case DLL_THREAD_DETACH:
{
- void *current = TlsGetValue(currentTLS);
+ egl::Current *current = egl::getCurrent();
if (current)
{
+#if !defined(ANGLE_OS_WINRT)
LocalFree((HLOCAL)current);
+#else
+ HeapFree(GetProcessHeap(), HEAP_GENERATE_EXCEPTIONS, current);
+ currentTLS = 0;
+#endif
}
}
break;
case DLL_PROCESS_DETACH:
{
- void *current = TlsGetValue(currentTLS);
+ egl::Current *current = egl::getCurrent();
if (current)
{
+#if !defined(ANGLE_OS_WINRT)
LocalFree((HLOCAL)current);
}
TlsFree(currentTLS);
+#else
+ HeapFree(GetProcessHeap(), HEAP_GENERATE_EXCEPTIONS, current);
+ currentTLS = 0;
+ }
+#endif
}
break;
default:
@@ -95,7 +116,16 @@ namespace egl
Current *getCurrent()
{
#ifndef QT_OPENGL_ES_2_ANGLE_STATIC
- return (Current*)TlsGetValue(currentTLS);
+#if !defined(ANGLE_OS_WINRT)
+ Current *current = (Current*)TlsGetValue(currentTLS);
+ if (!current)
+ current = (Current*)LocalAlloc(LPTR, sizeof(Current));
+ return current;
+#else
+ if (!currentTLS)
+ currentTLS = HeapAlloc(GetProcessHeap(), HEAP_GENERATE_EXCEPTIONS|HEAP_ZERO_MEMORY, sizeof(Current));
+ return (Current*)currentTLS;
+#endif
#else
// No precautions for thread safety taken as ANGLE is used single-threaded in Qt.
static Current curr = { EGL_SUCCESS, EGL_OPENGL_ES_API, EGL_NO_DISPLAY, EGL_NO_SURFACE, EGL_NO_SURFACE };
diff --git a/src/3rdparty/angle/src/libGLESv2/Buffer.cpp b/src/3rdparty/angle/src/libGLESv2/Buffer.cpp
index c007d5d9e9..40baa95760 100644
--- a/src/3rdparty/angle/src/libGLESv2/Buffer.cpp
+++ b/src/3rdparty/angle/src/libGLESv2/Buffer.cpp
@@ -37,11 +37,11 @@ Buffer::~Buffer()
delete mStaticIndexBuffer;
}
-void Buffer::bufferData(const void *data, GLsizeiptr size, GLenum usage)
+void Buffer::bufferData(const void *data, GLsizeiptr size, GLenum usage, GLenum target)
{
mBufferStorage->clear();
mIndexRangeCache.clear();
- mBufferStorage->setData(data, size, 0);
+ mBufferStorage->setData(data, size, 0, target);
mUsage = usage;
@@ -54,9 +54,9 @@ void Buffer::bufferData(const void *data, GLsizeiptr size, GLenum usage)
}
}
-void Buffer::bufferSubData(const void *data, GLsizeiptr size, GLintptr offset)
+void Buffer::bufferSubData(const void *data, GLsizeiptr size, GLintptr offset, GLenum target)
{
- mBufferStorage->setData(data, size, offset);
+ mBufferStorage->setData(data, size, offset, target);
mIndexRangeCache.invalidateRange(offset, size);
if ((mStaticVertexBuffer && mStaticVertexBuffer->getBufferSize() != 0) || (mStaticIndexBuffer && mStaticIndexBuffer->getBufferSize() != 0))
diff --git a/src/3rdparty/angle/src/libGLESv2/Buffer.h b/src/3rdparty/angle/src/libGLESv2/Buffer.h
index 4048f4b906..9b86b9791f 100644
--- a/src/3rdparty/angle/src/libGLESv2/Buffer.h
+++ b/src/3rdparty/angle/src/libGLESv2/Buffer.h
@@ -33,8 +33,8 @@ class Buffer : public RefCountObject
virtual ~Buffer();
- void bufferData(const void *data, GLsizeiptr size, GLenum usage);
- void bufferSubData(const void *data, GLsizeiptr size, GLintptr offset);
+ void bufferData(const void *data, GLsizeiptr size, GLenum usage, GLenum target);
+ void bufferSubData(const void *data, GLsizeiptr size, GLintptr offset, GLenum target);
GLenum usage() const;
diff --git a/src/3rdparty/angle/src/libGLESv2/libGLESv2.cpp b/src/3rdparty/angle/src/libGLESv2/libGLESv2.cpp
index 320bbccc27..91719f8e6d 100644
--- a/src/3rdparty/angle/src/libGLESv2/libGLESv2.cpp
+++ b/src/3rdparty/angle/src/libGLESv2/libGLESv2.cpp
@@ -758,7 +758,7 @@ void __stdcall glBufferData(GLenum target, GLsizeiptr size, const GLvoid* data,
return gl::error(GL_INVALID_OPERATION);
}
- buffer->bufferData(data, size, usage);
+ buffer->bufferData(data, size, usage, target);
}
}
catch(std::bad_alloc&)
@@ -812,7 +812,7 @@ void __stdcall glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size,
return gl::error(GL_INVALID_VALUE);
}
- buffer->bufferSubData(data, size, offset);
+ buffer->bufferSubData(data, size, offset, target);
}
}
catch(std::bad_alloc&)
diff --git a/src/3rdparty/angle/src/libGLESv2/main.cpp b/src/3rdparty/angle/src/libGLESv2/main.cpp
index 730a6ac022..defdf35f77 100644
--- a/src/3rdparty/angle/src/libGLESv2/main.cpp
+++ b/src/3rdparty/angle/src/libGLESv2/main.cpp
@@ -13,7 +13,13 @@
#ifndef QT_OPENGL_ES_2_ANGLE_STATIC
+#if !defined(ANGLE_OS_WINRT)
static DWORD currentTLS = TLS_OUT_OF_INDEXES;
+#else
+static __declspec(thread) void *currentTLS = 0;
+#endif
+
+namespace gl { Current *getCurrent(); }
extern "C" BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved)
{
@@ -21,22 +27,25 @@ extern "C" BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved
{
case DLL_PROCESS_ATTACH:
{
+#if !defined(ANGLE_OS_WINRT)
currentTLS = TlsAlloc();
if (currentTLS == TLS_OUT_OF_INDEXES)
{
return FALSE;
}
+#endif
}
// Fall throught to initialize index
case DLL_THREAD_ATTACH:
{
- gl::Current *current = (gl::Current*)LocalAlloc(LPTR, sizeof(gl::Current));
+ gl::Current *current = gl::getCurrent();
if (current)
{
+#if !defined(ANGLE_OS_WINRT)
TlsSetValue(currentTLS, current);
-
+#endif
current->context = NULL;
current->display = NULL;
}
@@ -44,24 +53,35 @@ extern "C" BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved
break;
case DLL_THREAD_DETACH:
{
- void *current = TlsGetValue(currentTLS);
+ gl::Current *current = gl::getCurrent();
if (current)
{
+#if !defined(ANGLE_OS_WINRT)
LocalFree((HLOCAL)current);
+#else
+ HeapFree(GetProcessHeap(), HEAP_GENERATE_EXCEPTIONS, current);
+ currentTLS = 0;
+#endif
}
}
break;
case DLL_PROCESS_DETACH:
{
- void *current = TlsGetValue(currentTLS);
+ gl::Current *current = gl::getCurrent();
if (current)
{
+#if !defined(ANGLE_OS_WINRT)
LocalFree((HLOCAL)current);
}
TlsFree(currentTLS);
+#else
+ HeapFree(GetProcessHeap(), HEAP_GENERATE_EXCEPTIONS, current);
+ currentTLS = 0;
+ }
+#endif
}
break;
default:
@@ -78,7 +98,16 @@ namespace gl
Current *getCurrent()
{
#ifndef QT_OPENGL_ES_2_ANGLE_STATIC
- return (Current*)TlsGetValue(currentTLS);
+#if !defined(ANGLE_OS_WINRT)
+ Current *current = (Current*)TlsGetValue(currentTLS);
+ if (!current)
+ current = (Current*)LocalAlloc(LPTR, sizeof(Current));
+ return current;
+#else
+ if (!currentTLS)
+ currentTLS = HeapAlloc(GetProcessHeap(), HEAP_GENERATE_EXCEPTIONS|HEAP_ZERO_MEMORY, sizeof(Current));
+ return (Current*)currentTLS;
+#endif
#else
// No precautions for thread safety taken as ANGLE is used single-threaded in Qt.
static gl::Current curr = { 0, 0 };
diff --git a/src/3rdparty/angle/src/libGLESv2/precompiled.h b/src/3rdparty/angle/src/libGLESv2/precompiled.h
index 50dec6b084..823d27bb60 100644
--- a/src/3rdparty/angle/src/libGLESv2/precompiled.h
+++ b/src/3rdparty/angle/src/libGLESv2/precompiled.h
@@ -32,13 +32,28 @@
#include <unordered_map>
#include <vector>
+#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY==WINAPI_FAMILY_APP || WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP)
+#define ANGLE_OS_WINRT
+#if WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP
+#define ANGLE_OS_WINPHONE
+#endif
+#endif
+
#ifndef ANGLE_ENABLE_D3D11
#include <d3d9.h>
#else
+#if !defined(ANGLE_OS_WINRT)
#include <D3D11.h>
+#else
+#include <d3d11_1.h>
+#define Sleep(x) WaitForSingleObjectEx(GetCurrentThread(), x, FALSE)
+#define GetVersion() WINVER
+#endif
#include <dxgi.h>
#endif
+#ifndef ANGLE_OS_WINPHONE
#include <D3Dcompiler.h>
+#endif
#ifdef _MSC_VER
#include <hash_map>
diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/BufferStorage.h b/src/3rdparty/angle/src/libGLESv2/renderer/BufferStorage.h
index ace1a11bae..14a8c2765b 100644
--- a/src/3rdparty/angle/src/libGLESv2/renderer/BufferStorage.h
+++ b/src/3rdparty/angle/src/libGLESv2/renderer/BufferStorage.h
@@ -22,7 +22,7 @@ class BufferStorage
// The data returned is only guaranteed valid until next non-const method.
virtual void *getData() = 0;
- virtual void setData(const void* data, unsigned int size, unsigned int offset) = 0;
+ virtual void setData(const void* data, unsigned int size, unsigned int offset, unsigned int target) = 0;
virtual void clear() = 0;
virtual unsigned int getSize() const = 0;
virtual bool supportsDirectBinding() const = 0;
diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/BufferStorage11.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/BufferStorage11.cpp
index 3647d8a898..2f694db061 100644
--- a/src/3rdparty/angle/src/libGLESv2/renderer/BufferStorage11.cpp
+++ b/src/3rdparty/angle/src/libGLESv2/renderer/BufferStorage11.cpp
@@ -131,7 +131,7 @@ void *BufferStorage11::getData()
return mResolvedData;
}
-void BufferStorage11::setData(const void* data, unsigned int size, unsigned int offset)
+void BufferStorage11::setData(const void* data, unsigned int size, unsigned int offset, unsigned int target)
{
ID3D11Device *device = mRenderer->getDevice();
ID3D11DeviceContext *context = mRenderer->getDeviceContext();
@@ -201,7 +201,10 @@ void BufferStorage11::setData(const void* data, unsigned int size, unsigned int
D3D11_BUFFER_DESC bufferDesc;
bufferDesc.ByteWidth = requiredBufferSize;
bufferDesc.Usage = D3D11_USAGE_DEFAULT;
- bufferDesc.BindFlags = D3D11_BIND_VERTEX_BUFFER | D3D11_BIND_INDEX_BUFFER;
+ if (mRenderer->getFeatureLevel() > D3D_FEATURE_LEVEL_9_3)
+ bufferDesc.BindFlags = D3D11_BIND_VERTEX_BUFFER | D3D11_BIND_INDEX_BUFFER;
+ else
+ bufferDesc.BindFlags = target == GL_ARRAY_BUFFER ? D3D11_BIND_VERTEX_BUFFER : D3D11_BIND_INDEX_BUFFER;
bufferDesc.CPUAccessFlags = 0;
bufferDesc.MiscFlags = 0;
bufferDesc.StructureByteStride = 0;
@@ -324,7 +327,7 @@ unsigned int BufferStorage11::getSize() const
bool BufferStorage11::supportsDirectBinding() const
{
- return true;
+ return mRenderer->getFeatureLevel() >= D3D_FEATURE_LEVEL_10_0;
}
void BufferStorage11::markBufferUsage()
diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/BufferStorage11.h b/src/3rdparty/angle/src/libGLESv2/renderer/BufferStorage11.h
index b62348b0c9..c9489627c3 100644
--- a/src/3rdparty/angle/src/libGLESv2/renderer/BufferStorage11.h
+++ b/src/3rdparty/angle/src/libGLESv2/renderer/BufferStorage11.h
@@ -24,7 +24,7 @@ class BufferStorage11 : public BufferStorage
static BufferStorage11 *makeBufferStorage11(BufferStorage *bufferStorage);
virtual void *getData();
- virtual void setData(const void* data, unsigned int size, unsigned int offset);
+ virtual void setData(const void* data, unsigned int size, unsigned int offset, unsigned int target);
virtual void clear();
virtual unsigned int getSize() const;
virtual bool supportsDirectBinding() const;
diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/BufferStorage9.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/BufferStorage9.cpp
index e69e7a8921..57fd29bf80 100644
--- a/src/3rdparty/angle/src/libGLESv2/renderer/BufferStorage9.cpp
+++ b/src/3rdparty/angle/src/libGLESv2/renderer/BufferStorage9.cpp
@@ -36,7 +36,7 @@ void *BufferStorage9::getData()
return mMemory;
}
-void BufferStorage9::setData(const void* data, unsigned int size, unsigned int offset)
+void BufferStorage9::setData(const void* data, unsigned int size, unsigned int offset, unsigned int)
{
if (!mMemory || offset + size > mAllocatedSize)
{
diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/BufferStorage9.h b/src/3rdparty/angle/src/libGLESv2/renderer/BufferStorage9.h
index 3e803969bc..82ae577e23 100644
--- a/src/3rdparty/angle/src/libGLESv2/renderer/BufferStorage9.h
+++ b/src/3rdparty/angle/src/libGLESv2/renderer/BufferStorage9.h
@@ -23,7 +23,7 @@ class BufferStorage9 : public BufferStorage
static BufferStorage9 *makeBufferStorage9(BufferStorage *bufferStorage);
virtual void *getData();
- virtual void setData(const void* data, unsigned int size, unsigned int offset);
+ virtual void setData(const void* data, unsigned int size, unsigned int offset, unsigned int target = 0);
virtual void clear();
virtual unsigned int getSize() const;
virtual bool supportsDirectBinding() const;
diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/Image11.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/Image11.cpp
index 09c8922d07..81e9e9ecb2 100644
--- a/src/3rdparty/angle/src/libGLESv2/renderer/Image11.cpp
+++ b/src/3rdparty/angle/src/libGLESv2/renderer/Image11.cpp
@@ -136,7 +136,7 @@ bool Image11::redefine(Renderer *renderer, GLint internalformat, GLsizei width,
mHeight = height;
mInternalFormat = internalformat;
// compute the d3d format that will be used
- mDXGIFormat = gl_d3d11::ConvertTextureFormat(internalformat);
+ mDXGIFormat = gl_d3d11::ConvertTextureFormat(internalformat, mRenderer->getFeatureLevel());
mActualFormat = d3d11_gl::ConvertTextureInternalFormat(mDXGIFormat);
if (mStagingTexture)
@@ -185,7 +185,10 @@ void Image11::loadData(GLint xoffset, GLint yoffset, GLsizei width, GLsizei heig
switch (mInternalFormat)
{
case GL_ALPHA8_EXT:
- loadAlphaDataToNative(width, height, inputPitch, input, mappedImage.RowPitch, offsetMappedData);
+ if (mRenderer->getFeatureLevel() >= D3D_FEATURE_LEVEL_10_0)
+ loadAlphaDataToNative(width, height, inputPitch, input, mappedImage.RowPitch, offsetMappedData);
+ else
+ loadAlphaDataToBGRA(width, height, inputPitch, input, mappedImage.RowPitch, offsetMappedData);
break;
case GL_LUMINANCE8_EXT:
loadLuminanceDataToNativeOrBGRA(width, height, inputPitch, input, mappedImage.RowPitch, offsetMappedData, false);
diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/IndexBuffer11.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/IndexBuffer11.cpp
index 66604c4558..36a62adc1c 100644
--- a/src/3rdparty/angle/src/libGLESv2/renderer/IndexBuffer11.cpp
+++ b/src/3rdparty/angle/src/libGLESv2/renderer/IndexBuffer11.cpp
@@ -170,7 +170,7 @@ DXGI_FORMAT IndexBuffer11::getIndexFormat() const
{
case GL_UNSIGNED_BYTE: return DXGI_FORMAT_R16_UINT;
case GL_UNSIGNED_SHORT: return DXGI_FORMAT_R16_UINT;
- case GL_UNSIGNED_INT: return DXGI_FORMAT_R32_UINT;
+ case GL_UNSIGNED_INT: return mRenderer->get32BitIndexSupport() ? DXGI_FORMAT_R32_UINT : DXGI_FORMAT_R16_UINT;
default: UNREACHABLE(); return DXGI_FORMAT_UNKNOWN;
}
}
@@ -180,4 +180,4 @@ ID3D11Buffer *IndexBuffer11::getBuffer() const
return mBuffer;
}
-} \ No newline at end of file
+}
diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/RenderStateCache.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/RenderStateCache.cpp
index b3111af72b..fd388dfe08 100644
--- a/src/3rdparty/angle/src/libGLESv2/renderer/RenderStateCache.cpp
+++ b/src/3rdparty/angle/src/libGLESv2/renderer/RenderStateCache.cpp
@@ -387,7 +387,8 @@ ID3D11SamplerState *RenderStateCache::getSamplerState(const gl::SamplerState &sa
samplerDesc.BorderColor[2] = 0.0f;
samplerDesc.BorderColor[3] = 0.0f;
samplerDesc.MinLOD = gl_d3d11::ConvertMinLOD(samplerState.minFilter, samplerState.lodOffset);
- samplerDesc.MaxLOD = gl_d3d11::ConvertMaxLOD(samplerState.minFilter, samplerState.lodOffset);
+ samplerDesc.MaxLOD = mDevice->GetFeatureLevel() >= D3D_FEATURE_LEVEL_10_0
+ ? gl_d3d11::ConvertMaxLOD(samplerState.minFilter, samplerState.lodOffset) : FLT_MAX;
ID3D11SamplerState *dx11SamplerState = NULL;
HRESULT result = mDevice->CreateSamplerState(&samplerDesc, &dx11SamplerState);
diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/Renderer.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/Renderer.cpp
index 21ad223467..39fd0f41f0 100644
--- a/src/3rdparty/angle/src/libGLESv2/renderer/Renderer.cpp
+++ b/src/3rdparty/angle/src/libGLESv2/renderer/Renderer.cpp
@@ -28,13 +28,18 @@
#define D3DERR_OUTOFVIDEOMEMORY MAKE_HRESULT(1, 0x876, 380)
#endif
-#ifdef __MINGW32__
-
#ifndef D3DCOMPILER_DLL
+#define D3DCOMPILER_DLL L"d3dcompiler_43.dll" // Lowest common denominator
+#endif
-//Add define + typedefs for older MinGW-w64 headers (pre 5783)
+#ifndef QT_D3DCOMPILER_DLL
+#define QT_D3DCOMPILER_DLL D3DCOMPILER_DLL
+#endif
-#define D3DCOMPILER_DLL L"d3dcompiler_43.dll"
+#if defined(__MINGW32__) || defined(ANGLE_OS_WINPHONE)
+
+//Add define + typedefs for older MinGW-w64 headers (pre 5783)
+//Also define these on Windows Phone, which doesn't have a shader compiler
HRESULT WINAPI D3DCompile(const void *data, SIZE_T data_size, const char *filename,
const D3D_SHADER_MACRO *defines, ID3DInclude *include, const char *entrypoint,
@@ -43,9 +48,7 @@ typedef HRESULT (WINAPI *pD3DCompile)(const void *data, SIZE_T data_size, const
const D3D_SHADER_MACRO *defines, ID3DInclude *include, const char *entrypoint,
const char *target, UINT sflags, UINT eflags, ID3DBlob **shader, ID3DBlob **error_messages);
-#endif // D3DCOMPILER_DLL
-
-#endif // __MINGW32__
+#endif // __MINGW32__ || ANGLE_OS_WINPHONE
namespace rx
{
@@ -80,8 +83,40 @@ bool Renderer::initializeCompiler()
}
}
#else
- // Load the version of the D3DCompiler DLL associated with the Direct3D version ANGLE was built with.
- mD3dCompilerModule = LoadLibrary(D3DCOMPILER_DLL);
+ // Load the compiler DLL specified by the environment, or default to QT_D3DCOMPILER_DLL
+#if !defined(ANGLE_OS_WINRT)
+ const wchar_t *defaultCompiler = _wgetenv(L"QT_D3DCOMPILER_DLL");
+ if (!defaultCompiler)
+ defaultCompiler = QT_D3DCOMPILER_DLL;
+#else // !ANGLE_OS_WINRT
+# ifdef _DEBUG
+ const wchar_t *defaultCompiler = L"d3dcompiler_qtd.dll";
+# else
+ const wchar_t *defaultCompiler = L"d3dcompiler_qt.dll";
+# endif
+#endif // ANGLE_OS_WINRT
+
+ const wchar_t *compilerDlls[] = {
+ defaultCompiler,
+ L"d3dcompiler_47.dll",
+ L"d3dcompiler_46.dll",
+ L"d3dcompiler_45.dll",
+ L"d3dcompiler_44.dll",
+ L"d3dcompiler_43.dll",
+ 0
+ };
+
+ // Load the first available known compiler DLL
+ for (int i = 0; compilerDlls[i]; ++i)
+ {
+#if !defined(ANGLE_OS_WINRT)
+ mD3dCompilerModule = LoadLibrary(compilerDlls[i]);
+#else
+ mD3dCompilerModule = LoadPackagedLibrary(compilerDlls[i], NULL);
+#endif
+ if (mD3dCompilerModule)
+ break;
+ }
#endif // ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES
if (!mD3dCompilerModule)
@@ -225,4 +260,4 @@ void glDestroyRenderer(rx::Renderer *renderer)
delete renderer;
}
-} \ No newline at end of file
+}
diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/Renderer.h b/src/3rdparty/angle/src/libGLESv2/renderer/Renderer.h
index 04e877ba9e..ac67c27e71 100644
--- a/src/3rdparty/angle/src/libGLESv2/renderer/Renderer.h
+++ b/src/3rdparty/angle/src/libGLESv2/renderer/Renderer.h
@@ -1,3 +1,4 @@
+#include "../precompiled.h"
//
// Copyright (c) 2012-2013 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
@@ -13,6 +14,30 @@
#include "libGLESv2/Uniform.h"
#include "libGLESv2/angletypes.h"
+#ifndef D3DCOMPILE_OPTIMIZATION_LEVEL0
+#define D3DCOMPILE_OPTIMIZATION_LEVEL0 (1 << 14)
+#endif
+#ifndef D3DCOMPILE_OPTIMIZATION_LEVEL1
+#define D3DCOMPILE_OPTIMIZATION_LEVEL1 0
+#endif
+#ifndef D3DCOMPILE_OPTIMIZATION_LEVEL2
+#define D3DCOMPILE_OPTIMIZATION_LEVEL2 ((1 << 14) | (1 << 15))
+#endif
+#ifndef D3DCOMPILE_OPTIMIZATION_LEVEL3
+#define D3DCOMPILE_OPTIMIZATION_LEVEL3 (1 << 15)
+#endif
+#ifndef D3DCOMPILE_DEBUG
+#define D3DCOMPILE_DEBUG (1 << 0)
+#endif
+#ifndef D3DCOMPILE_SKIP_OPTIMIZATION
+#define D3DCOMPILE_SKIP_OPTIMIZATION (1 << 2)
+#endif
+#ifndef D3DCOMPILE_AVOID_FLOW_CONTROL
+#define D3DCOMPILE_AVOID_FLOW_CONTROL (1 << 9)
+#endif
+#ifndef D3DCOMPILE_PREFER_FLOW_CONTROL
+#define D3DCOMPILE_PREFER_FLOW_CONTROL (1 << 10)
+#endif
#if !defined(ANGLE_COMPILE_OPTIMIZATION_LEVEL)
#define ANGLE_COMPILE_OPTIMIZATION_LEVEL D3DCOMPILE_OPTIMIZATION_LEVEL3
#endif
@@ -107,7 +132,7 @@ class Renderer
virtual void sync(bool block) = 0;
- virtual SwapChain *createSwapChain(HWND window, HANDLE shareHandle, GLenum backBufferFormat, GLenum depthBufferFormat) = 0;
+ virtual SwapChain *createSwapChain(EGLNativeWindowType window, HANDLE shareHandle, GLenum backBufferFormat, GLenum depthBufferFormat) = 0;
virtual void setSamplerState(gl::SamplerType type, int index, const gl::SamplerState &sampler) = 0;
virtual void setTexture(gl::SamplerType type, int index, gl::Texture *texture) = 0;
diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/Renderer11.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/Renderer11.cpp
index a43101807a..f83e9e91ce 100644
--- a/src/3rdparty/angle/src/libGLESv2/renderer/Renderer11.cpp
+++ b/src/3rdparty/angle/src/libGLESv2/renderer/Renderer11.cpp
@@ -137,6 +137,7 @@ EGLint Renderer11::initialize()
return EGL_NOT_INITIALIZED;
}
+#if !defined(ANGLE_OS_WINRT)
mDxgiModule = LoadLibrary(TEXT("dxgi.dll"));
mD3d11Module = LoadLibrary(TEXT("d3d11.dll"));
@@ -155,12 +156,17 @@ EGLint Renderer11::initialize()
ERR("Could not retrieve D3D11CreateDevice address - aborting!\n");
return EGL_NOT_INITIALIZED;
}
+#endif
D3D_FEATURE_LEVEL featureLevels[] =
{
+ D3D_FEATURE_LEVEL_11_1,
D3D_FEATURE_LEVEL_11_0,
D3D_FEATURE_LEVEL_10_1,
D3D_FEATURE_LEVEL_10_0,
+ D3D_FEATURE_LEVEL_9_3,
+ D3D_FEATURE_LEVEL_9_2,
+ D3D_FEATURE_LEVEL_9_1,
};
HRESULT result = S_OK;
@@ -203,8 +209,12 @@ EGLint Renderer11::initialize()
}
}
+#if !defined(ANGLE_OS_WINRT)
IDXGIDevice *dxgiDevice = NULL;
- result = mDevice->QueryInterface(__uuidof(IDXGIDevice), (void**)&dxgiDevice);
+#else
+ IDXGIDevice1 *dxgiDevice = NULL;
+#endif
+ result = mDevice->QueryInterface(IID_PPV_ARGS(&dxgiDevice));
if (FAILED(result))
{
@@ -524,7 +534,7 @@ void Renderer11::sync(bool block)
}
}
-SwapChain *Renderer11::createSwapChain(HWND window, HANDLE shareHandle, GLenum backBufferFormat, GLenum depthBufferFormat)
+SwapChain *Renderer11::createSwapChain(EGLNativeWindowType window, HANDLE shareHandle, GLenum backBufferFormat, GLenum depthBufferFormat)
{
return new rx::SwapChain11(this, window, shareHandle, backBufferFormat, depthBufferFormat);
}
@@ -1108,6 +1118,43 @@ void Renderer11::drawElements(GLenum mode, GLsizei count, GLenum type, const GLv
}
}
+template <typename T>
+static void drawLineLoopIndexed(T *data, GLenum type, const GLvoid *indices, GLsizei count)
+{
+ switch (type)
+ {
+ case GL_NONE: // Non-indexed draw
+ for (int i = 0; i < count; i++)
+ {
+ data[i] = i;
+ }
+ data[count] = 0;
+ break;
+ case GL_UNSIGNED_BYTE:
+ for (int i = 0; i < count; i++)
+ {
+ data[i] = static_cast<const GLubyte*>(indices)[i];
+ }
+ data[count] = static_cast<const GLubyte*>(indices)[0];
+ break;
+ case GL_UNSIGNED_SHORT:
+ for (int i = 0; i < count; i++)
+ {
+ data[i] = static_cast<const GLushort*>(indices)[i];
+ }
+ data[count] = static_cast<const GLushort*>(indices)[0];
+ break;
+ case GL_UNSIGNED_INT:
+ for (int i = 0; i < count; i++)
+ {
+ data[i] = static_cast<const GLuint*>(indices)[i];
+ }
+ data[count] = static_cast<const GLuint*>(indices)[0];
+ break;
+ default: UNREACHABLE();
+ }
+}
+
void Renderer11::drawLineLoop(GLsizei count, GLenum type, const GLvoid *indices, int minIndex, gl::Buffer *elementArrayBuffer)
{
// Get the raw indices for an indexed draw
@@ -1156,59 +1203,71 @@ void Renderer11::drawLineLoop(GLsizei count, GLenum type, const GLvoid *indices,
return gl::error(GL_OUT_OF_MEMORY);
}
- unsigned int *data = reinterpret_cast<unsigned int*>(mappedMemory);
+ if (get32BitIndexSupport())
+ drawLineLoopIndexed(reinterpret_cast<unsigned int*>(mappedMemory), type, indices, count);
+ else
+ drawLineLoopIndexed(reinterpret_cast<unsigned short*>(mappedMemory), type, indices, count);
+
unsigned int indexBufferOffset = offset;
+ if (!mLineLoopIB->unmapBuffer())
+ {
+ ERR("Could not unmap index buffer for GL_LINE_LOOP.");
+ return gl::error(GL_OUT_OF_MEMORY);
+ }
+
+ if (mAppliedIBSerial != mLineLoopIB->getSerial() || mAppliedIBOffset != indexBufferOffset)
+ {
+ IndexBuffer11 *indexBuffer = IndexBuffer11::makeIndexBuffer11(mLineLoopIB->getIndexBuffer());
+
+ mDeviceContext->IASetIndexBuffer(indexBuffer->getBuffer(), indexBuffer->getIndexFormat(), indexBufferOffset);
+ mAppliedIBSerial = mLineLoopIB->getSerial();
+ mAppliedStorageIBSerial = 0;
+ mAppliedIBOffset = indexBufferOffset;
+ }
+
+ mDeviceContext->DrawIndexed(count + 1, 0, -minIndex);
+}
+
+template <typename T>
+static void drawTriangleFanIndexed(T *data, GLenum type, const GLvoid *indices, unsigned int numTris)
+{
switch (type)
{
case GL_NONE: // Non-indexed draw
- for (int i = 0; i < count; i++)
+ for (unsigned int i = 0; i < numTris; i++)
{
- data[i] = i;
+ data[i*3 + 0] = 0;
+ data[i*3 + 1] = i + 1;
+ data[i*3 + 2] = i + 2;
}
- data[count] = 0;
break;
case GL_UNSIGNED_BYTE:
- for (int i = 0; i < count; i++)
+ for (unsigned int i = 0; i < numTris; i++)
{
- data[i] = static_cast<const GLubyte*>(indices)[i];
+ data[i*3 + 0] = static_cast<const GLubyte*>(indices)[0];
+ data[i*3 + 1] = static_cast<const GLubyte*>(indices)[i + 1];
+ data[i*3 + 2] = static_cast<const GLubyte*>(indices)[i + 2];
}
- data[count] = static_cast<const GLubyte*>(indices)[0];
break;
case GL_UNSIGNED_SHORT:
- for (int i = 0; i < count; i++)
+ for (unsigned int i = 0; i < numTris; i++)
{
- data[i] = static_cast<const GLushort*>(indices)[i];
+ data[i*3 + 0] = static_cast<const GLushort*>(indices)[0];
+ data[i*3 + 1] = static_cast<const GLushort*>(indices)[i + 1];
+ data[i*3 + 2] = static_cast<const GLushort*>(indices)[i + 2];
}
- data[count] = static_cast<const GLushort*>(indices)[0];
break;
case GL_UNSIGNED_INT:
- for (int i = 0; i < count; i++)
+ for (unsigned int i = 0; i < numTris; i++)
{
- data[i] = static_cast<const GLuint*>(indices)[i];
+ data[i*3 + 0] = static_cast<const GLuint*>(indices)[0];
+ data[i*3 + 1] = static_cast<const GLuint*>(indices)[i + 1];
+ data[i*3 + 2] = static_cast<const GLuint*>(indices)[i + 2];
}
- data[count] = static_cast<const GLuint*>(indices)[0];
break;
default: UNREACHABLE();
}
-
- if (!mLineLoopIB->unmapBuffer())
- {
- ERR("Could not unmap index buffer for GL_LINE_LOOP.");
- return gl::error(GL_OUT_OF_MEMORY);
- }
-
- if (mAppliedIBSerial != mLineLoopIB->getSerial() || mAppliedIBOffset != indexBufferOffset)
- {
- IndexBuffer11 *indexBuffer = IndexBuffer11::makeIndexBuffer11(mLineLoopIB->getIndexBuffer());
-
- mDeviceContext->IASetIndexBuffer(indexBuffer->getBuffer(), indexBuffer->getIndexFormat(), indexBufferOffset);
- mAppliedIBSerial = mLineLoopIB->getSerial();
- mAppliedStorageIBSerial = 0;
- mAppliedIBOffset = indexBufferOffset;
- }
-
- mDeviceContext->DrawIndexed(count + 1, 0, -minIndex);
}
void Renderer11::drawTriangleFan(GLsizei count, GLenum type, const GLvoid *indices, int minIndex, gl::Buffer *elementArrayBuffer, int instances)
@@ -1261,45 +1320,12 @@ void Renderer11::drawTriangleFan(GLsizei count, GLenum type, const GLvoid *indic
return gl::error(GL_OUT_OF_MEMORY);
}
- unsigned int *data = reinterpret_cast<unsigned int*>(mappedMemory);
- unsigned int indexBufferOffset = offset;
+ if (get32BitIndexSupport())
+ drawTriangleFanIndexed(reinterpret_cast<unsigned int*>(mappedMemory), type, indices, numTris);
+ else
+ drawTriangleFanIndexed(reinterpret_cast<unsigned short*>(mappedMemory), type, indices, numTris);
- switch (type)
- {
- case GL_NONE: // Non-indexed draw
- for (unsigned int i = 0; i < numTris; i++)
- {
- data[i*3 + 0] = 0;
- data[i*3 + 1] = i + 1;
- data[i*3 + 2] = i + 2;
- }
- break;
- case GL_UNSIGNED_BYTE:
- for (unsigned int i = 0; i < numTris; i++)
- {
- data[i*3 + 0] = static_cast<const GLubyte*>(indices)[0];
- data[i*3 + 1] = static_cast<const GLubyte*>(indices)[i + 1];
- data[i*3 + 2] = static_cast<const GLubyte*>(indices)[i + 2];
- }
- break;
- case GL_UNSIGNED_SHORT:
- for (unsigned int i = 0; i < numTris; i++)
- {
- data[i*3 + 0] = static_cast<const GLushort*>(indices)[0];
- data[i*3 + 1] = static_cast<const GLushort*>(indices)[i + 1];
- data[i*3 + 2] = static_cast<const GLushort*>(indices)[i + 2];
- }
- break;
- case GL_UNSIGNED_INT:
- for (unsigned int i = 0; i < numTris; i++)
- {
- data[i*3 + 0] = static_cast<const GLuint*>(indices)[0];
- data[i*3 + 1] = static_cast<const GLuint*>(indices)[i + 1];
- data[i*3 + 2] = static_cast<const GLuint*>(indices)[i + 2];
- }
- break;
- default: UNREACHABLE();
- }
+ unsigned int indexBufferOffset = offset;
if (!mTriangleFanIB->unmapBuffer())
{
@@ -1509,7 +1535,7 @@ void Renderer11::applyUniforms(gl::ProgramBinary *programBinary, gl::UniformArra
}
// needed for the point sprite geometry shader
- if (mCurrentGeometryConstantBuffer != mDriverConstantBufferPS)
+ if (mFeatureLevel >= D3D_FEATURE_LEVEL_10_0 && mCurrentGeometryConstantBuffer != mDriverConstantBufferPS)
{
mDeviceContext->GSSetConstantBuffers(0, 1, &mDriverConstantBufferPS);
mCurrentGeometryConstantBuffer = mDriverConstantBufferPS;
@@ -1923,9 +1949,13 @@ bool Renderer11::testDeviceResettable()
D3D_FEATURE_LEVEL featureLevels[] =
{
+ D3D_FEATURE_LEVEL_11_1,
D3D_FEATURE_LEVEL_11_0,
D3D_FEATURE_LEVEL_10_1,
D3D_FEATURE_LEVEL_10_0,
+ D3D_FEATURE_LEVEL_9_3,
+ D3D_FEATURE_LEVEL_9_2,
+ D3D_FEATURE_LEVEL_9_1,
};
ID3D11Device* dummyDevice;
@@ -2104,11 +2134,17 @@ float Renderer11::getTextureMaxAnisotropy() const
{
switch (mFeatureLevel)
{
+ case D3D_FEATURE_LEVEL_11_1:
case D3D_FEATURE_LEVEL_11_0:
return D3D11_MAX_MAXANISOTROPY;
case D3D_FEATURE_LEVEL_10_1:
case D3D_FEATURE_LEVEL_10_0:
return D3D10_MAX_MAXANISOTROPY;
+ case D3D_FEATURE_LEVEL_9_3:
+ case D3D_FEATURE_LEVEL_9_2:
+ return 16;
+ case D3D_FEATURE_LEVEL_9_1:
+ return D3D_FL9_1_DEFAULT_MAX_ANISOTROPY;
default: UNREACHABLE();
return 0;
}
@@ -2123,11 +2159,17 @@ Range Renderer11::getViewportBounds() const
{
switch (mFeatureLevel)
{
+ case D3D_FEATURE_LEVEL_11_1:
case D3D_FEATURE_LEVEL_11_0:
return Range(D3D11_VIEWPORT_BOUNDS_MIN, D3D11_VIEWPORT_BOUNDS_MAX);
case D3D_FEATURE_LEVEL_10_1:
case D3D_FEATURE_LEVEL_10_0:
return Range(D3D10_VIEWPORT_BOUNDS_MIN, D3D10_VIEWPORT_BOUNDS_MAX);
+ case D3D_FEATURE_LEVEL_9_3:
+ return Range(D3D_FL9_3_REQ_TEXTURE2D_U_OR_V_DIMENSION * -2, D3D_FL9_3_REQ_TEXTURE2D_U_OR_V_DIMENSION * 2);
+ case D3D_FEATURE_LEVEL_9_2:
+ case D3D_FEATURE_LEVEL_9_1:
+ return Range(D3D_FL9_1_REQ_TEXTURE2D_U_OR_V_DIMENSION * -2, D3D_FL9_1_REQ_TEXTURE2D_U_OR_V_DIMENSION * 2);
default: UNREACHABLE();
return Range(0, 0);
}
@@ -2138,10 +2180,15 @@ unsigned int Renderer11::getMaxVertexTextureImageUnits() const
META_ASSERT(MAX_TEXTURE_IMAGE_UNITS_VTF_SM4 <= gl::IMPLEMENTATION_MAX_VERTEX_TEXTURE_IMAGE_UNITS);
switch (mFeatureLevel)
{
+ case D3D_FEATURE_LEVEL_11_1:
case D3D_FEATURE_LEVEL_11_0:
case D3D_FEATURE_LEVEL_10_1:
case D3D_FEATURE_LEVEL_10_0:
return MAX_TEXTURE_IMAGE_UNITS_VTF_SM4;
+ case D3D_FEATURE_LEVEL_9_3:
+ case D3D_FEATURE_LEVEL_9_2:
+ case D3D_FEATURE_LEVEL_9_1:
+ return 0;
default: UNREACHABLE();
return 0;
}
@@ -2165,15 +2212,41 @@ unsigned int Renderer11::getReservedFragmentUniformVectors() const
unsigned int Renderer11::getMaxVertexUniformVectors() const
{
META_ASSERT(MAX_VERTEX_UNIFORM_VECTORS_D3D11 <= D3D10_REQ_CONSTANT_BUFFER_ELEMENT_COUNT);
- ASSERT(mFeatureLevel >= D3D_FEATURE_LEVEL_10_0);
- return MAX_VERTEX_UNIFORM_VECTORS_D3D11;
+ switch (mFeatureLevel)
+ {
+ case D3D_FEATURE_LEVEL_11_1:
+ case D3D_FEATURE_LEVEL_11_0:
+ case D3D_FEATURE_LEVEL_10_1:
+ case D3D_FEATURE_LEVEL_10_0:
+ return MAX_VERTEX_UNIFORM_VECTORS_D3D11;
+ case D3D_FEATURE_LEVEL_9_3:
+ case D3D_FEATURE_LEVEL_9_2:
+ case D3D_FEATURE_LEVEL_9_1:
+ return MAX_VERTEX_UNIFORM_VECTORS_D3D9;
+ default:
+ UNIMPLEMENTED();
+ return 0;
+ }
}
unsigned int Renderer11::getMaxFragmentUniformVectors() const
{
META_ASSERT(MAX_FRAGMENT_UNIFORM_VECTORS_D3D11 <= D3D10_REQ_CONSTANT_BUFFER_ELEMENT_COUNT);
- ASSERT(mFeatureLevel >= D3D_FEATURE_LEVEL_10_0);
- return MAX_FRAGMENT_UNIFORM_VECTORS_D3D11;
+ switch (mFeatureLevel)
+ {
+ case D3D_FEATURE_LEVEL_11_1:
+ case D3D_FEATURE_LEVEL_11_0:
+ case D3D_FEATURE_LEVEL_10_1:
+ case D3D_FEATURE_LEVEL_10_0:
+ return MAX_FRAGMENT_UNIFORM_VECTORS_D3D11;
+ case D3D_FEATURE_LEVEL_9_3:
+ return 221;
+ case D3D_FEATURE_LEVEL_9_2:
+ case D3D_FEATURE_LEVEL_9_1:
+ return 29;
+ default: UNREACHABLE();
+ return 0;
+ }
}
unsigned int Renderer11::getMaxVaryingVectors() const
@@ -2181,11 +2254,17 @@ unsigned int Renderer11::getMaxVaryingVectors() const
META_ASSERT(gl::IMPLEMENTATION_MAX_VARYING_VECTORS == D3D11_VS_OUTPUT_REGISTER_COUNT);
switch (mFeatureLevel)
{
+ case D3D_FEATURE_LEVEL_11_1:
case D3D_FEATURE_LEVEL_11_0:
return D3D11_VS_OUTPUT_REGISTER_COUNT;
case D3D_FEATURE_LEVEL_10_1:
+ return D3D10_1_VS_OUTPUT_REGISTER_COUNT;
case D3D_FEATURE_LEVEL_10_0:
return D3D10_VS_OUTPUT_REGISTER_COUNT;
+ case D3D_FEATURE_LEVEL_9_3:
+ case D3D_FEATURE_LEVEL_9_2:
+ case D3D_FEATURE_LEVEL_9_1:
+ return 8;
default: UNREACHABLE();
return 0;
}
@@ -2195,10 +2274,15 @@ bool Renderer11::getNonPower2TextureSupport() const
{
switch (mFeatureLevel)
{
+ case D3D_FEATURE_LEVEL_11_1:
case D3D_FEATURE_LEVEL_11_0:
case D3D_FEATURE_LEVEL_10_1:
case D3D_FEATURE_LEVEL_10_0:
return true;
+ case D3D_FEATURE_LEVEL_9_3:
+ case D3D_FEATURE_LEVEL_9_2:
+ case D3D_FEATURE_LEVEL_9_1:
+ return false;
default: UNREACHABLE();
return false;
}
@@ -2208,10 +2292,15 @@ bool Renderer11::getOcclusionQuerySupport() const
{
switch (mFeatureLevel)
{
+ case D3D_FEATURE_LEVEL_11_1:
case D3D_FEATURE_LEVEL_11_0:
case D3D_FEATURE_LEVEL_10_1:
case D3D_FEATURE_LEVEL_10_0:
+ case D3D_FEATURE_LEVEL_9_3:
+ case D3D_FEATURE_LEVEL_9_2:
return true;
+ case D3D_FEATURE_LEVEL_9_1:
+ return false;
default: UNREACHABLE();
return false;
}
@@ -2221,10 +2310,15 @@ bool Renderer11::getInstancingSupport() const
{
switch (mFeatureLevel)
{
+ case D3D_FEATURE_LEVEL_11_1:
case D3D_FEATURE_LEVEL_11_0:
case D3D_FEATURE_LEVEL_10_1:
case D3D_FEATURE_LEVEL_10_0:
+ case D3D_FEATURE_LEVEL_9_3:
return true;
+ case D3D_FEATURE_LEVEL_9_2:
+ case D3D_FEATURE_LEVEL_9_1:
+ return false;
default: UNREACHABLE();
return false;
}
@@ -2242,10 +2336,15 @@ bool Renderer11::getDerivativeInstructionSupport() const
{
switch (mFeatureLevel)
{
+ case D3D_FEATURE_LEVEL_11_1:
case D3D_FEATURE_LEVEL_11_0:
case D3D_FEATURE_LEVEL_10_1:
case D3D_FEATURE_LEVEL_10_0:
+ case D3D_FEATURE_LEVEL_9_3:
return true;
+ case D3D_FEATURE_LEVEL_9_2:
+ case D3D_FEATURE_LEVEL_9_1:
+ return false;
default: UNREACHABLE();
return false;
}
@@ -2261,9 +2360,13 @@ int Renderer11::getMajorShaderModel() const
{
switch (mFeatureLevel)
{
+ case D3D_FEATURE_LEVEL_11_1:
case D3D_FEATURE_LEVEL_11_0: return D3D11_SHADER_MAJOR_VERSION; // 5
case D3D_FEATURE_LEVEL_10_1: return D3D10_1_SHADER_MAJOR_VERSION; // 4
case D3D_FEATURE_LEVEL_10_0: return D3D10_SHADER_MAJOR_VERSION; // 4
+ case D3D_FEATURE_LEVEL_9_3:
+ case D3D_FEATURE_LEVEL_9_2:
+ case D3D_FEATURE_LEVEL_9_1: return 4; // SM4 level 9, but treat as 4
default: UNREACHABLE(); return 0;
}
}
@@ -2272,9 +2375,13 @@ int Renderer11::getMinorShaderModel() const
{
switch (mFeatureLevel)
{
+ case D3D_FEATURE_LEVEL_11_1:
case D3D_FEATURE_LEVEL_11_0: return D3D11_SHADER_MINOR_VERSION; // 0
case D3D_FEATURE_LEVEL_10_1: return D3D10_1_SHADER_MINOR_VERSION; // 1
case D3D_FEATURE_LEVEL_10_0: return D3D10_SHADER_MINOR_VERSION; // 0
+ case D3D_FEATURE_LEVEL_9_3:
+ case D3D_FEATURE_LEVEL_9_2:
+ case D3D_FEATURE_LEVEL_9_1: return 0;
default: UNREACHABLE(); return 0;
}
}
@@ -2295,11 +2402,17 @@ int Renderer11::getMaxViewportDimension() const
switch (mFeatureLevel)
{
- case D3D_FEATURE_LEVEL_11_0:
+ case D3D_FEATURE_LEVEL_11_1:
+ case D3D_FEATURE_LEVEL_11_0:
return D3D11_REQ_TEXTURE2D_U_OR_V_DIMENSION; // 16384
case D3D_FEATURE_LEVEL_10_1:
case D3D_FEATURE_LEVEL_10_0:
return D3D10_REQ_TEXTURE2D_U_OR_V_DIMENSION; // 8192
+ case D3D_FEATURE_LEVEL_9_3:
+ return D3D_FL9_3_REQ_TEXTURE2D_U_OR_V_DIMENSION; // 4096
+ case D3D_FEATURE_LEVEL_9_2:
+ case D3D_FEATURE_LEVEL_9_1:
+ return D3D_FL9_1_REQ_TEXTURE2D_U_OR_V_DIMENSION; // 2048
default: UNREACHABLE();
return 0;
}
@@ -2309,9 +2422,13 @@ int Renderer11::getMaxTextureWidth() const
{
switch (mFeatureLevel)
{
+ case D3D_FEATURE_LEVEL_11_1:
case D3D_FEATURE_LEVEL_11_0: return D3D11_REQ_TEXTURE2D_U_OR_V_DIMENSION; // 16384
case D3D_FEATURE_LEVEL_10_1:
case D3D_FEATURE_LEVEL_10_0: return D3D10_REQ_TEXTURE2D_U_OR_V_DIMENSION; // 8192
+ case D3D_FEATURE_LEVEL_9_3: return D3D_FL9_3_REQ_TEXTURE2D_U_OR_V_DIMENSION; // 4096
+ case D3D_FEATURE_LEVEL_9_2:
+ case D3D_FEATURE_LEVEL_9_1: return D3D_FL9_1_REQ_TEXTURE2D_U_OR_V_DIMENSION; // 2048
default: UNREACHABLE(); return 0;
}
}
@@ -2320,9 +2437,13 @@ int Renderer11::getMaxTextureHeight() const
{
switch (mFeatureLevel)
{
+ case D3D_FEATURE_LEVEL_11_1:
case D3D_FEATURE_LEVEL_11_0: return D3D11_REQ_TEXTURE2D_U_OR_V_DIMENSION; // 16384
case D3D_FEATURE_LEVEL_10_1:
case D3D_FEATURE_LEVEL_10_0: return D3D10_REQ_TEXTURE2D_U_OR_V_DIMENSION; // 8192
+ case D3D_FEATURE_LEVEL_9_3: return D3D_FL9_3_REQ_TEXTURE2D_U_OR_V_DIMENSION; // 4096
+ case D3D_FEATURE_LEVEL_9_2:
+ case D3D_FEATURE_LEVEL_9_1: return D3D_FL9_1_REQ_TEXTURE2D_U_OR_V_DIMENSION; // 2048
default: UNREACHABLE(); return 0;
}
}
@@ -2331,9 +2452,13 @@ bool Renderer11::get32BitIndexSupport() const
{
switch (mFeatureLevel)
{
- case D3D_FEATURE_LEVEL_11_0:
+ case D3D_FEATURE_LEVEL_11_1:
+ case D3D_FEATURE_LEVEL_11_0:
case D3D_FEATURE_LEVEL_10_1:
case D3D_FEATURE_LEVEL_10_0: return D3D10_REQ_DRAWINDEXED_INDEX_COUNT_2_TO_EXP >= 32; // true
+ case D3D_FEATURE_LEVEL_9_3:
+ case D3D_FEATURE_LEVEL_9_2:
+ case D3D_FEATURE_LEVEL_9_1: return false;
default: UNREACHABLE(); return false;
}
}
@@ -2380,14 +2505,22 @@ unsigned int Renderer11::getMaxRenderTargets() const
{
META_ASSERT(D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT <= gl::IMPLEMENTATION_MAX_DRAW_BUFFERS);
META_ASSERT(D3D10_SIMULTANEOUS_RENDER_TARGET_COUNT <= gl::IMPLEMENTATION_MAX_DRAW_BUFFERS);
+ META_ASSERT(D3D_FL9_3_SIMULTANEOUS_RENDER_TARGET_COUNT <= gl::IMPLEMENTATION_MAX_DRAW_BUFFERS);
+ META_ASSERT(D3D_FL9_1_SIMULTANEOUS_RENDER_TARGET_COUNT <= gl::IMPLEMENTATION_MAX_DRAW_BUFFE