Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/5.6' into 5.7
Browse files Browse the repository at this point in the history
This also reverts commit 0d2f016.

Conflicts:
	header.BSD-NEW
	qmake/Makefile.win32
	src/openglextensions/qopenglextensions.cpp
	src/openglextensions/qopenglextensions.h
	src/winmain/qtmain_win.cpp
	src/winmain/qtmain_winrt.cpp
	tools/configure/configureapp.cpp
	util/glgen/qopenglextensions.cpp.header
	util/glgen/qopenglextensions.h.header

Change-Id: If26c6f4111b342378dd88bbdc657e322d2ab6ad8
  • Loading branch information
liangqi committed Nov 23, 2016
2 parents 48d7db6 + e2b856d commit 38c1057
Show file tree
Hide file tree
Showing 43 changed files with 348 additions and 168 deletions.
2 changes: 1 addition & 1 deletion mkspecs/android-clang/qmake.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# qmake configuration for building with android-g++
# qmake configuration for building with android-clang
MAKEFILE_GENERATOR = UNIX
QMAKE_PLATFORM = android
QMAKE_COMPILER = gcc clang llvm
Expand Down
10 changes: 10 additions & 0 deletions mkspecs/win32-msvc2017/qmake.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#
# qmake configuration for win32-msvc2017
#
# Written for Microsoft Visual C++ 2017
#

MSC_VER = 1910
MSVC_VER = 15.0
include(../common/msvc-desktop.conf)
load(qt_config)
34 changes: 34 additions & 0 deletions mkspecs/win32-msvc2017/qplatformdefs.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the qmake spec of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see http://www.qt.io/terms-conditions. For further
** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** As a special exception, The Qt Company gives you certain additional
** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
**
****************************************************************************/

#include "../win32-msvc2005/qplatformdefs.h"
2 changes: 1 addition & 1 deletion qmake/Makefile.win32
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ LINKER = link
CFLAGS_EXTRA = /Zc:wchar_t-
! elseif "$(QMAKESPEC)" == "win32-msvc2008" || "$(QMAKESPEC)" == "win32-msvc2010" || "$(QMAKESPEC)" == "win32-msvc2012" || "$(QMAKESPEC)" == "win32-msvc2013"
CFLAGS_EXTRA = /MP /D_CRT_SECURE_NO_WARNINGS /D_SCL_SECURE_NO_WARNINGS $(CFLAGS_CRT)
! elseif "$(QMAKESPEC)" == "win32-msvc2015" || "$(QMAKESPEC)" == "win32-clang-msvc2015"
! elseif "$(QMAKESPEC)" == "win32-msvc2015" || "$(QMAKESPEC)" == "win32-msvc2017" || "$(QMAKESPEC)" == "win32-clang-msvc2015"
CFLAGS_EXTRA = /MP /D_CRT_SECURE_NO_WARNINGS /D_SCL_SECURE_NO_WARNINGS /Zc:strictStrings /w44456 /w44457 /w44458 /wd4577 $(CFLAGS_CRT)
! else
! error Unsupported compiler for this Makefile
Expand Down
6 changes: 6 additions & 0 deletions qmake/doc/src/qmake-manual.qdoc
Original file line number Diff line number Diff line change
Expand Up @@ -2057,6 +2057,12 @@
value of this variable is typically handled by qmake or
\l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.

\section1 QMAKE_OBJECTIVE_CFLAGS

Specifies the Objective C/C++ compiler flags for building
a project. These flags are used in addition to QMAKE_CFLAGS and
QMAKE_CXXFLAGS.

\section1 QMAKE_POST_LINK

Specifies the command to execute after linking the \l{TARGET}
Expand Down
3 changes: 2 additions & 1 deletion qmake/generators/win32/msvc_objectmodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ enum DotNET {
NET2010 = 0xa0,
NET2012 = 0xb0,
NET2013 = 0xc0,
NET2015 = 0xd0
NET2015 = 0xd0,
NET2017 = 0xe0
};

/*
Expand Down
11 changes: 11 additions & 0 deletions qmake/generators/win32/msvc_vcproj.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ struct DotNetCombo {
const char *versionStr;
const char *regKey;
} dotNetCombo[] = {
{NET2017, "MSVC.NET 2017 (15.0)", "Software\\Microsoft\\VisualStudio\\SxS\\VS7\\15.0"},
{NET2015, "MSVC.NET 2015 (14.0)", "Software\\Microsoft\\VisualStudio\\14.0\\Setup\\VC\\ProductDir"},
{NET2013, "MSVC.NET 2013 (12.0)", "Software\\Microsoft\\VisualStudio\\12.0\\Setup\\VC\\ProductDir"},
{NET2013, "MSVC.NET 2013 Express Edition (12.0)", "Software\\Microsoft\\VCExpress\\12.0\\Setup\\VC\\ProductDir"},
Expand Down Expand Up @@ -159,6 +160,8 @@ const char _slnHeader120[] = "Microsoft Visual Studio Solution File, Format
"\n# Visual Studio 2013";
const char _slnHeader140[] = "Microsoft Visual Studio Solution File, Format Version 12.00"
"\n# Visual Studio 2015";
const char _slnHeader141[] = "Microsoft Visual Studio Solution File, Format Version 12.00"
"\n# Visual Studio 2017";
// The following UUID _may_ change for later servicepacks...
// If so we need to search through the registry at
// HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.0\Projects
Expand Down Expand Up @@ -389,6 +392,8 @@ QString VcprojGenerator::retrievePlatformToolSet() const
return QStringLiteral("v120") + suffix;
case NET2015:
return QStringLiteral("v140") + suffix;
case NET2017:
return QStringLiteral("v141") + suffix;
default:
return QString();
}
Expand Down Expand Up @@ -615,6 +620,9 @@ void VcprojGenerator::writeSubDirs(QTextStream &t)
}

switch (which_dotnet_version(project->first("MSVC_VER").toLatin1())) {
case NET2017:
t << _slnHeader141;
break;
case NET2015:
t << _slnHeader140;
break;
Expand Down Expand Up @@ -945,6 +953,9 @@ void VcprojGenerator::initProject()
// Own elements -----------------------------
vcProject.Name = project->first("QMAKE_ORIG_TARGET").toQString();
switch (which_dotnet_version(project->first("MSVC_VER").toLatin1())) {
case NET2017:
vcProject.Version = "15.00";
break;
case NET2015:
vcProject.Version = "14.00";
break;
Expand Down
13 changes: 12 additions & 1 deletion qmake/library/qmakeevaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -971,6 +971,13 @@ static ProString msvcBinDirToQMakeArch(QString subdir)
subdir = subdir.toLower();
if (subdir == QLatin1String("amd64"))
return ProString("x86_64");
// Since 2017 the folder structure from here is HostX64|X86/x64|x86
idx = subdir.indexOf(QLatin1Char('\\'));
if (idx == -1)
return ProString("x86");
subdir.remove(0, idx + 1);
if (subdir == QLatin1String("x64"))
return ProString("x86_64");
return ProString(subdir);
}

Expand Down Expand Up @@ -1065,8 +1072,12 @@ void QMakeEvaluator::loadDefaults()
vars[ProKey("QMAKE_HOST.arch")] << archStr;

# if defined(Q_CC_MSVC) // ### bogus condition, but nobody x-builds for msvc with a different qmake
// Since VS 2017 we need VCToolsInstallDir instead of VCINSTALLDIR
QString vcInstallDir = m_option->getEnv(QLatin1String("VCToolsInstallDir"));
if (vcInstallDir.isEmpty())
vcInstallDir = m_option->getEnv(QLatin1String("VCINSTALLDIR"));
vars[ProKey("QMAKE_TARGET.arch")] = msvcArchitecture(
m_option->getEnv(QLatin1String("VCINSTALLDIR")),
vcInstallDir,
m_option->getEnv(QLatin1String("PATH")));
# endif
#elif defined(Q_OS_UNIX)
Expand Down
3 changes: 3 additions & 0 deletions src/corelib/global/qcompilerdetection.h
Original file line number Diff line number Diff line change
Expand Up @@ -994,6 +994,9 @@
# define Q_COMPILER_THREADSAFE_STATICS
# define Q_COMPILER_UNIFORM_INIT
# endif
# if _MSC_VER >= 1910
# define Q_COMPILER_CONSTEXPR
# endif
# endif /* __cplusplus */
#endif /* Q_CC_MSVC */

Expand Down
4 changes: 3 additions & 1 deletion src/corelib/global/qlibraryinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,10 @@ QLibraryInfo::buildDate()
# define COMPILER_STRING "MSVC 2012"
# elif _MSC_VER < 1900
# define COMPILER_STRING "MSVC 2013"
# elif _MSC_VER < 2000
# elif _MSC_VER < 1910
# define COMPILER_STRING "MSVC 2015"
# elif _MSC_VER < 2000
# define COMPILER_STRING "MSVC 2017"
# else
# define COMPILER_STRING "MSVC _MSC_VER " QT_STRINGIFY(_MSC_VER)
# endif
Expand Down
2 changes: 1 addition & 1 deletion src/corelib/global/qlogging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1781,7 +1781,7 @@ void qErrnoWarning(int code, const char *msg, ...)
\snippet code/src_corelib_global_qglobal.cpp 23
\sa QtMessageHandler, QtMsgType, qDebug(), qWarning(), qCritical(), qFatal(),
\sa QtMessageHandler, QtMsgType, qDebug(), qInfo(), qWarning(), qCritical(), qFatal(),
{Debugging Techniques}
*/

Expand Down
20 changes: 18 additions & 2 deletions src/corelib/io/qfilesystemengine_unix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@
#include <MobileCoreServices/MobileCoreServices.h>
#endif

#if defined(Q_OS_DARWIN)
// We cannot include <Foundation/Foundation.h> (it's an Objective-C header), but
// we need these declarations:
Q_FORWARD_DECLARE_OBJC_CLASS(NSString);
extern "C" NSString *NSTemporaryDirectory();
#endif

QT_BEGIN_NAMESPACE

#if defined(Q_OS_DARWIN)
Expand Down Expand Up @@ -702,8 +709,17 @@ QString QFileSystemEngine::tempPath()
return QLatin1String(QT_UNIX_TEMP_PATH_OVERRIDE);
#else
QString temp = QFile::decodeName(qgetenv("TMPDIR"));
if (temp.isEmpty())
temp = QLatin1String("/tmp");
if (temp.isEmpty()) {
#if defined(Q_OS_DARWIN) && !defined(QT_BOOTSTRAPPED)
if (NSString *nsPath = NSTemporaryDirectory()) {
temp = QString::fromCFString((CFStringRef)nsPath);
} else {
#else
{
#endif
temp = QLatin1String("/tmp");
}
}
return QDir::cleanPath(temp);
#endif
}
Expand Down
3 changes: 3 additions & 0 deletions src/corelib/io/qurl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3708,6 +3708,9 @@ bool QUrl::matches(const QUrl &url, FormattingOptions options) const
if ((d->sectionIsPresent & mask) != (url.d->sectionIsPresent & mask))
return false;

if (options & QUrl::RemovePath)
return true;

// Compare paths, after applying path-related options
QString path1;
d->appendPath(path1, options, QUrlPrivate::Path);
Expand Down
5 changes: 5 additions & 0 deletions src/corelib/thread/qbasicatomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@
# error "Qt requires C++11 support"
#endif

QT_WARNING_PUSH
QT_WARNING_DISABLE_MSVC(4522)

QT_BEGIN_NAMESPACE

#if 0
Expand Down Expand Up @@ -323,4 +326,6 @@ class QBasicAtomicPointer

QT_END_NAMESPACE

QT_WARNING_POP

#endif // QBASICATOMIC_H
Loading

0 comments on commit 38c1057

Please sign in to comment.