Skip to content

Commit

Permalink
Merge "Merge remote-tracking branch 'origin/5.8' into dev" into refs/…
Browse files Browse the repository at this point in the history
…staging/dev
  • Loading branch information
liangqi authored and The Qt Project committed Oct 13, 2016
2 parents 8b07d2c + dfc177e commit 60e3bfe
Show file tree
Hide file tree
Showing 329 changed files with 193,122 additions and 2,590 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ src/3rdparty/webkit/includes2.txt
# generated files in configure.exe bootstrapping
tools/configure/configure.intermediate.manifest
tools/configure/configure_pch.pch
/configure.exe
/configureapp.exe

# Symlinks generated by configure
tools/qvfb/qvfbhdr.h
Expand Down
1 change: 0 additions & 1 deletion config.tests/unix/fontconfig/fontconfig.pro
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
SOURCES = fontconfig.cpp
CONFIG -= qt
include(../../unix/freetype/freetype.pri)
15 changes: 0 additions & 15 deletions config.tests/unix/freetype/freetype.pri

This file was deleted.

1 change: 0 additions & 1 deletion config.tests/unix/freetype/freetype.pro
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
SOURCES = freetype.cpp
CONFIG -= qt
include(freetype.pri)
46 changes: 46 additions & 0 deletions config.tests/unix/libinput_axis_api/libinput_axis_api.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** 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 The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/

#include <libinput.h>

int main()
{
libinput_event_pointer_has_axis(nullptr, LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL);
return 0;
}
2 changes: 2 additions & 0 deletions config.tests/unix/libinput_axis_api/libinput_axis_api.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
SOURCES = libinput_axis_api.cpp
CONFIG -= qt
2 changes: 1 addition & 1 deletion config_help.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Conventions for the remaining options: When an option's description is
followed by a list of values in brackets, the interpretation is as follows:
'yes' represents the bare option; all other values are possible prefixes to
the option, e.g., -no-gui. Alternatively, the value can be assigned, e.g.,
-gui=yes. Values are listed in the order they are tried if not specified;
--gui=yes. Values are listed in the order they are tried if not specified;
'auto' is a shorthand for 'yes/no'. Solitary 'yes' and 'no' represent binary
options without auto-detection.

Expand Down
2 changes: 1 addition & 1 deletion configure.bat
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ if errorlevel 1 (cd ..\.. & exit /b 1)
cd ..\..

:conf
configure.exe -srcdir %QTSRC% %ARGS%
configureapp.exe -srcdir %QTSRC% %ARGS%
goto exit

:help
Expand Down
7 changes: 7 additions & 0 deletions doc/doc.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
TEMPLATE = aux

global_docs.files = $$PWD/global
global_docs.path = $$[QT_INSTALL_DOCS]
INSTALLS += global_docs
!prefix_build:!equals(OUT_PWD, $$PWD): \
COPIES += global_docs
5 changes: 3 additions & 2 deletions examples/corelib/ipc/localfortuneclient/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,13 @@ void Client::readFortune()
in.setVersion(QDataStream::Qt_4_0);

if (blockSize == 0) {
if (socket->bytesAvailable() < (int)sizeof(quint16))
// Relies on the fact that QDataStream format streams a quint32 into sizeof(quint32) bytes
if (socket->bytesAvailable() < (int)sizeof(quint32))
return;
in >> blockSize;
}

if (in.atEnd())
if (socket->bytesAvailable() < blockSize || in.atEnd())
return;

QString nextFortune;
Expand Down
2 changes: 1 addition & 1 deletion examples/corelib/ipc/localfortuneclient/client.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ private slots:

QLocalSocket *socket;
QString currentFortune;
quint16 blockSize;
quint32 blockSize;
};

#endif
4 changes: 2 additions & 2 deletions examples/corelib/ipc/localfortuneserver/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ void Server::sendFortune()
QByteArray block;
QDataStream out(&block, QIODevice::WriteOnly);
out.setVersion(QDataStream::Qt_4_0);
out << (quint16)0;
out << (quint32)0;
out << fortunes.at(qrand() % fortunes.size());
out.device()->seek(0);
out << (quint16)(block.size() - sizeof(quint16));
out << (quint32)(block.size() - sizeof(quint32));

QLocalSocket *clientConnection = server->nextPendingConnection();
connect(clientConnection, SIGNAL(disconnected()),
Expand Down
2 changes: 1 addition & 1 deletion examples/examples.pro
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ SUBDIRS = \
widgets \
xml

qtConfig(opengl): SUBDIRS += opengl
qtHaveModule(gui):qtConfig(opengl): SUBDIRS += opengl

aggregate.files = aggregate/examples.pro
aggregate.path = $$[QT_INSTALL_EXAMPLES]
Expand Down
2 changes: 1 addition & 1 deletion mkspecs/android-clang/qmake.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ MAKEFILE_GENERATOR = UNIX
QMAKE_PLATFORM = android
QMAKE_COMPILER = gcc clang llvm

CONFIG += android_install unversioned_soname unversioned_libname android_deployment_settings
CONFIG += android_install unversioned_soname unversioned_libname plugin_with_soname android_deployment_settings

include(../common/linux.conf)
include(../common/clang.conf)
Expand Down
2 changes: 0 additions & 2 deletions mkspecs/android-clang/qplatformdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H

#define QT_QPA_DEFAULT_PLATFORM_NAME "android"

// Get Qt defines/settings

#include "qglobal.h"
Expand Down
2 changes: 1 addition & 1 deletion mkspecs/android-g++/qmake.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ MAKEFILE_GENERATOR = UNIX
QMAKE_PLATFORM = android
QMAKE_COMPILER = gcc

CONFIG += android_install unversioned_soname unversioned_libname android_deployment_settings
CONFIG += android_install unversioned_soname unversioned_libname plugin_with_soname android_deployment_settings

include(../common/linux.conf)
include(../common/gcc-base-unix.conf)
Expand Down
2 changes: 0 additions & 2 deletions mkspecs/android-g++/qplatformdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H

#define QT_QPA_DEFAULT_PLATFORM_NAME "android"

// Get Qt defines/settings

#include "qglobal.h"
Expand Down
1 change: 0 additions & 1 deletion mkspecs/common/linux.conf
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ QMAKE_LIBS_OPENGL_ES2 = -lGLESv2
QMAKE_LIBS_OPENVG = -lOpenVG
QMAKE_LIBS_THREAD = -lpthread

QMAKE_CFLAGS_WAYLAND =
QMAKE_INCDIR_WAYLAND =
QMAKE_LIBS_WAYLAND_CLIENT = -lwayland-client
QMAKE_LIBS_WAYLAND_SERVER = -lwayland-server
Expand Down
2 changes: 2 additions & 0 deletions mkspecs/common/mac.conf
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ QMAKE_LIBS_DYNLOAD =
QMAKE_LIBS_OPENGL = -framework OpenGL -framework AGL
QMAKE_LIBS_THREAD =

QMAKE_ACTOOL = actool

QMAKE_DSYMUTIL = dsymutil
QMAKE_STRIP = strip
QMAKE_STRIPFLAGS_LIB += -S -x
Expand Down
3 changes: 0 additions & 3 deletions mkspecs/common/qcc-base-qnx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ include(qcc-base.conf)

QMAKE_PLATFORM = qnx $$QMAKE_PLATFORM

#Choose qnx QPA Plugin as default
QT_QPA_DEFAULT_PLATFORM = qnx

QMAKE_LFLAGS_SHLIB += -shared
QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB
QMAKE_LFLAGS_SONAME += -Wl,-soname,
Expand Down
2 changes: 0 additions & 2 deletions mkspecs/common/uikit/qmake.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
# Common build settings for all iOS/tvOS/watchOS configurations
#

QT_QPA_DEFAULT_PLATFORM = ios

QMAKE_XCODE_CODE_SIGN_IDENTITY = "iPhone Developer"

# iOS build tools
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version=\"1.0\" encoding=\"utf-8\"?>
<Package xmlns=\"http://schemas.microsoft.com/appx/2010/manifest\" xmlns:m3=\"http://schemas.microsoft.com/appx/2014/manifest\" xmlns:mp=\"http://schemas.microsoft.com/appx/2014/phone/manifest\">
<Package xmlns=\"http://schemas.microsoft.com/appx/2010/manifest\" xmlns:m2=\"http://schemas.microsoft.com/appx/2013/manifest\" xmlns:m3=\"http://schemas.microsoft.com/appx/2014/manifest\" xmlns:mp=\"http://schemas.microsoft.com/appx/2014/phone/manifest\">
<Identity
Name=\"$${WINRT_MANIFEST.identity}\"
ProcessorArchitecture=\"$${WINRT_MANIFEST.architecture}\"
Expand Down
23 changes: 0 additions & 23 deletions mkspecs/features/default_post.prf
Original file line number Diff line number Diff line change
Expand Up @@ -116,29 +116,6 @@ c++11|c++14|c++1z {
unset(cxxstd)
}

suffix =
for(ever) {
QMAKE_USE$${suffix} = $$unique(QMAKE_USE$${suffix})
for(name, QMAKE_USE$${suffix}) {
nu = $$upper($$name)
CONFIG(debug, debug|release): \
libs = $$eval(QMAKE_LIBS_$${nu}_DEBUG)
else: \
libs = $$eval(QMAKE_LIBS_$${nu}_RELEASE)
libs += $$eval(QMAKE_LIBS_$$nu)
cflags = $$eval(QMAKE_CFLAGS_$${nu})

isEmpty(libs):isEmpty(cflags): \
error("Library '$$name' is not defined.")

LIBS$${suffix} += $$libs
QMAKE_CFLAGS += $$cflags
QMAKE_CXXFLAGS += $$cflags
}
!isEmpty(suffix): break()
suffix = "_PRIVATE"
}

!precompile_header: SOURCES += $$NO_PCH_SOURCES

QMAKE_INCDIR += $$QMAKE_INCDIR_POST
Expand Down
109 changes: 109 additions & 0 deletions mkspecs/features/mac/asset_catalogs.prf
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# QMAKE_ASSET_CATALOGS
# Paths to xcassets directories to be compiled
#
# QMAKE_ASSET_CATALOGS_BUILD_PATH
# Location which asset catalogs will be compiled to.
# If the current target is an app bundle, defaults to its Resources directory.
# Otherwise, this value must be set manually.
#
# QMAKE_ASSET_CATALOGS_APP_ICON
# Name of the icon resource in the asset catalogs that will be used as the app icon.
# Defaults to AppIcon.
#
# QMAKE_ASSET_CATALOGS_INSTALL_PATH
# Base path to install files to. Falls back to a path relative to the target install path,
# based on QMAKE_ASSET_CATALOGS_BUILD_PATH.

!have_target|if(!build_pass:!isEmpty(BUILDS)): \
return()

!isEmpty(QMAKE_ASSET_CATALOGS) {
load(resolve_target)

isEmpty(QMAKE_ASSET_CATALOGS_BUILD_PATH) {
!isEmpty(QMAKE_RESOLVED_BUNDLE):equals(TEMPLATE, app):app_bundle {
macos: \
QMAKE_ASSET_CATALOGS_BUILD_PATH = $$QMAKE_RESOLVED_BUNDLE/Contents/Resources
else: \
QMAKE_ASSET_CATALOGS_BUILD_PATH = $$QMAKE_RESOLVED_BUNDLE
} else {
error("QMAKE_ASSET_CATALOGS_BUILD_PATH must be set when using QMAKE_ASSET_CATALOGS.")
}
}

QMAKE_ASSET_CATALOGS_BUILD_PATH = $$clean_path($$QMAKE_ASSET_CATALOGS_BUILD_PATH)

macx-xcode {
!isEmpty(QMAKE_ASSET_CATALOGS_APP_ICON) {
asset_catalog_appicon.name = "ASSETCATALOG_COMPILER_APPICON_NAME"
asset_catalog_appicon.value = $$QMAKE_ASSET_CATALOGS_APP_ICON
QMAKE_MAC_XCODE_SETTINGS += asset_catalog_appicon
}

asset_catalog_compiler.files = $$QMAKE_ASSET_CATALOGS
macos: asset_catalog_compiler.path = Contents/Resources
QMAKE_BUNDLE_DATA += asset_catalog_compiler
} else {
!isEmpty(QMAKE_ASSET_CATALOGS_APP_ICON) {
asset_catalog_app_icon_arg = \
--app-icon $$shell_quote($$QMAKE_ASSET_CATALOGS_APP_ICON)
}

asset_catalog_compiler.target = $$OUT_PWD/asset_catalog_compiler.Info.plist
asset_catalog_compiler.commands = $$shell_quote($$QMAKE_ACTOOL) \
$$asset_catalog_app_icon_arg \
--output-partial-info-plist $$shell_quote($$asset_catalog_compiler.target) \
--platform $${version_identifier} \
--minimum-deployment-target $${deployment_target} \
--compile $$shell_quote($$QMAKE_ASSET_CATALOGS_BUILD_PATH)

for (catalog, QMAKE_ASSET_CATALOGS) {
asset_catalog_compiler.commands += $${catalog}
asset_catalog_compiler.depends += $$files($$catalog/*, true)
}

actool_output_files = $$system(\
mkdir -p $$system_quote($$QMAKE_ASSET_CATALOGS_BUILD_PATH) && \
/usr/libexec/PlistBuddy -c \'Print :com.apple.actool.compilation-results:output-files\' \
/dev/stdin <<< $($${asset_catalog_compiler.commands} 2>/dev/null) | grep \'^ .*$\', lines)

for (output_file, actool_output_files) {
!equals(output_file, $$asset_catalog_compiler.target): \
actool_output_files_rel += $$relative_path($$output_file, $$QMAKE_ASSET_CATALOGS_BUILD_PATH)
}

QMAKE_EXTRA_TARGETS += asset_catalog_compiler
PRE_TARGETDEPS += $$asset_catalog_compiler.target

isEmpty(QMAKE_ASSET_CATALOGS_INSTALL_PATH) {
!isEmpty(target.path): \
QMAKE_ASSET_CATALOGS_INSTALL_PATH = $${target.path}/
QMAKE_ASSET_CATALOGS_INSTALL_PATH = $${QMAKE_ASSET_CATALOGS_INSTALL_PATH}$$relative_path(\
$$QMAKE_ASSET_CATALOGS_BUILD_PATH, $$absolute_path($$DESTDIR, $$OUT_PWD))
}

for (ac_install_file, actool_output_files_rel) {
asset_catalogs_files.files += \
$$QMAKE_ASSET_CATALOGS_BUILD_PATH/$$ac_install_file
}
contains(INSTALLS, target): asset_catalogs_files.depends += install_target
asset_catalogs_files.path = $$QMAKE_ASSET_CATALOGS_INSTALL_PATH
asset_catalogs_files.CONFIG += no_check_exist
INSTALLS += asset_catalogs_files
}
} else: macx-xcode {
# Backwards compatibility
for (bundle_data, QMAKE_BUNDLE_DATA) {
for (bundle_file, $${bundle_data}.files) {
!contains(bundle_file, .*\.xcassets$): next()
warning("*.xcassets in QMAKE_BUNDLE_DATA is deprecated. Use QMAKE_ASSET_CATALOGS instead.")
!exists($$absolute_path($$bundle_file/AppIcon.appiconset, $$_PRO_FILE_PWD_)): next()

asset_catalog_appicon.name = "ASSETCATALOG_COMPILER_APPICON_NAME"
asset_catalog_appicon.value = "AppIcon"
QMAKE_MAC_XCODE_SETTINGS += asset_catalog_appicon
break()
}
!isEmpty(asset_catalog_appicon.name): break()
}
}
4 changes: 3 additions & 1 deletion mkspecs/features/mac/default_pre.prf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CONFIG = sdk rez $$CONFIG
CONFIG = asset_catalogs sdk rez $$CONFIG
load(default_pre)

isEmpty(QMAKE_XCODE_DEVELOPER_PATH) {
Expand Down Expand Up @@ -33,6 +33,8 @@ isEmpty(QMAKE_TARGET_BUNDLE_PREFIX) {
cache(QMAKE_TARGET_BUNDLE_PREFIX)
}

QMAKE_ASSET_CATALOGS_APP_ICON = AppIcon

# Make the default debug info format for static debug builds
# DWARF instead of DWARF with dSYM. This cuts down build times
# for application debug builds significantly, as Xcode doesn't
Expand Down
2 changes: 1 addition & 1 deletion mkspecs/features/mac/sdk.prf
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ QMAKE_INCDIR_OPENGL = $$sysrootified
QMAKESPEC_NAME = $$basename(QMAKESPEC)

# Resolve SDK version of various tools
for(tool, $$list(QMAKE_CC QMAKE_CXX QMAKE_FIX_RPATH QMAKE_AR QMAKE_RANLIB QMAKE_LINK QMAKE_LINK_SHLIB)) {
for(tool, $$list(QMAKE_CC QMAKE_CXX QMAKE_FIX_RPATH QMAKE_AR QMAKE_RANLIB QMAKE_LINK QMAKE_LINK_SHLIB QMAKE_ACTOOL)) {
tool_variable = QMAKE_MAC_SDK.$${QMAKESPEC_NAME}.$${QMAKE_MAC_SDK}.$${tool}
!isEmpty($$tool_variable) {
$$tool = $$eval($$tool_variable)
Expand Down
Loading

0 comments on commit 60e3bfe

Please sign in to comment.