Merge branch 'dev' into stable

This starts Qt 5.1 release cycle

Conflicts:
	src/gui/text/qfontdatabase.cpp
	src/gui/text/qharfbuzz_copy_p.h
	src/widgets/kernel/qapplication.cpp
	src/widgets/kernel/qcoreapplication.cpp

Change-Id: I72fbf83ab3c2206aeea1b089428b0fc2a89bd62b
This commit is contained in:
Oswald Buddenhagen 2013-03-20 13:46:57 +01:00
commit 76c0be34cd
2616 changed files with 204410 additions and 32108 deletions

2
.gitignore vendored
View File

@ -48,6 +48,7 @@ pcviewer.cfg
core
.qmake.cache
.qmake.vars
.device.vars
*.prl
tags
.DS_Store
@ -306,6 +307,7 @@ tests/auto/corelib/thread/qthreadstorage/crashOnExit
tests/auto/corelib/io/qresourceengine/qresourceengine
tests/auto/corelib/codecs/qtextcodec/echo/echo
tests/auto/corelib/plugin/quuid/testProcessUniqueness/testProcessUniqueness
tests/auto/corelib/io/qlockfile/qlockfiletesthelper/qlockfile_test_helper
tests/auto/dbus/qdbusabstractadaptor/qmyserver/qmyserver
tests/auto/dbus/qdbusabstractinterface/qpinger/qpinger
tests/auto/dbus/qdbusinterface/qmyserver/qmyserver

View File

@ -1,4 +1,4 @@
#!/usr/bin/perl
#!/usr/bin/env perl
#############################################################################
##
## Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
@ -771,7 +771,6 @@ my $class_lib_map_contents = "";
our @ignore_headers = ();
our @ignore_for_master_contents = ();
our @ignore_for_include_check = ();
our @ignore_for_qt_begin_header_check = ();
our @ignore_for_qt_begin_namespace_check = ();
our @ignore_for_qt_module_check = ();
our %inject_headers = ();
@ -1137,7 +1136,6 @@ if($check_includes) {
foreach my $subdir (@subdirs) {
my @headers = findFiles($subdir, "^[-a-z0-9_]*\\.h\$" , 0);
foreach my $header (@headers) {
my $header_skip_qt_begin_header_test = 0;
my $header_skip_qt_begin_namespace_test = 0;
$header = 0 if($header =~ /^ui_.*.h/);
foreach (@ignore_headers) {
@ -1157,9 +1155,6 @@ if($check_includes) {
foreach (@ignore_for_include_check) {
$public_header = 0 if($header eq $_);
}
foreach(@ignore_for_qt_begin_header_check) {
$header_skip_qt_begin_header_test = 1 if ($header eq $_);
}
foreach(@ignore_for_qt_begin_namespace_check) {
$header_skip_qt_begin_namespace_test = 1 if ($header eq $_);
}
@ -1169,10 +1164,9 @@ if($check_includes) {
my $iheader = $subdir . "/" . $header;
if($public_header) {
if(open(F, "<$iheader")) {
my $qt_begin_header_found = 0;
my $qt_end_header_found = 0;
my $qt_begin_namespace_found = 0;
my $qt_end_namespace_found = 0;
my $qt_namespace_suffix = "";
my $line;
my $stop_processing = 0;
while($line = <F>) {
@ -1197,25 +1191,13 @@ if($check_includes) {
}
}
}
} elsif ($header_skip_qt_begin_header_test == 0 and $line =~ /^QT_BEGIN_HEADER\s*$/) {
$qt_begin_header_found = 1;
} elsif ($header_skip_qt_begin_header_test == 0 and $line =~ /^QT_END_HEADER\s*$/) {
$qt_end_header_found = 1;
} elsif ($header_skip_qt_begin_namespace_test == 0 and $line =~ /^QT_BEGIN_NAMESPACE\s*$/) {
} elsif ($header_skip_qt_begin_namespace_test == 0 and $line =~ /^QT_BEGIN_NAMESPACE(_[A-Z_]+)?\s*$/) {
$qt_namespace_suffix = $1 // "";
$qt_begin_namespace_found = 1;
} elsif ($header_skip_qt_begin_namespace_test == 0 and $line =~ /^QT_END_NAMESPACE\s*$/) {
} elsif ($header_skip_qt_begin_namespace_test == 0 and $line =~ /^QT_END_NAMESPACE$qt_namespace_suffix\s*$/) {
$qt_end_namespace_found = 1;
}
}
if ($header_skip_qt_begin_header_test == 0 and $stop_processing == 0) {
if ($qt_begin_header_found == 0) {
print "$lib: WARNING: $iheader does not include QT_BEGIN_HEADER\n";
}
if ($qt_begin_header_found && $qt_end_header_found == 0) {
print "$lib: WARNING: $iheader has QT_BEGIN_HEADER but no QT_END_HEADER\n";
}
}
if ($header_skip_qt_begin_namespace_test == 0 and $stop_processing == 0) {
if ($qt_begin_namespace_found == 0) {
@ -1223,7 +1205,7 @@ if($check_includes) {
}
if ($qt_begin_namespace_found && $qt_end_namespace_found == 0) {
print "$lib: WARNING: $iheader has QT_BEGIN_NAMESPACE but no QT_END_NAMESPACE\n";
print "$lib: WARNING: $iheader has QT_BEGIN_NAMESPACE$qt_namespace_suffix but no QT_END_NAMESPACE$qt_namespace_suffix\n";
}
}

View File

@ -1,3 +1,4 @@
TARGET = arch
SOURCES = arch.cpp
CONFIG -= qt dylib release debug_and_release
CONFIG += debug console

View File

@ -0,0 +1,2 @@
option(host_build)
include(arch.pro)

View File

@ -40,6 +40,7 @@
****************************************************************************/
#include <linux/fb.h>
#include <sys/kd.h>
#include <sys/ioctl.h>
int main(int, char **)

View File

@ -5,26 +5,20 @@ VERBOSE=$2
SRCDIR=$3
OUTDIR=$4
RESULTFILE=$5
VARPREFIX=$6
TARGET=$6
shift 6
if [ "$TARGET" = "host" ]; then
VARPREFIX="CFG_HOST"
PROSUFFIX="_host"
else
VARPREFIX="CFG"
PROSUFFIX=""
fi
LFLAGS="$SYSROOT_FLAG"
CXXFLAGS="$SYSROOT_FLAG"
while [ "$#" -gt 0 ]; do
PARAM=$1
case $PARAM in
-sdk)
LFLAGS="$LFLAGS -Wl,-syslibroot,$2"
CXXFLAGS="$CXXFLAGS -isysroot $2"
shift
;;
*) ;;
esac
shift
done
# debuggery
[ "$VERBOSE" = "yes" ] && echo "Determining architecture... ($*)"
@ -32,7 +26,7 @@ done
test -d "$OUTDIR/config.tests/arch" || mkdir -p "$OUTDIR/config.tests/arch"
cd "$OUTDIR/config.tests/arch"
[ -f Makefile ] && $MAKE distclean >/dev/null 2>&1
OUTDIR=$OUTDIR "$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "QT_BUILD_TREE=$OUTDIR" "LIBS+=$LFLAGS" "QMAKE_CXXFLAGS+=$CXXFLAGS" "$SRCDIR/config.tests/arch/arch.pro" >/dev/null 2>&1 || echo "qmake is broken" >&2
OUTDIR=$OUTDIR "$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "QT_BUILD_TREE=$OUTDIR" "LIBS+=$LFLAGS" "QMAKE_CXXFLAGS+=$CXXFLAGS" "$SRCDIR/config.tests/arch/arch$PROSUFFIX.pro" >/dev/null 2>&1 || echo "qmake is broken" >&2
ARCH=""
@ -42,6 +36,8 @@ if [ -f ./arch.exe ]; then
binary=./arch.exe
elif [ -f ./arch ]; then
binary=./arch
elif [ -f ./libarch.so ]; then
binary=./libarch.so
else
[ "$VERBOSE" = "yes" ] && echo "Unable to determine architecture!"
exit 2

View File

@ -32,11 +32,6 @@ while [ "$#" -gt 0 ]; do
MAC_ARCH_LFLAGS="$MAC_ARCH_LFLAGS -arch $2"
shift
;;
-sdk)
LFLAGS="$LFLAGS -Wl,-syslibroot,$2"
CXXFLAGS="$CXXFLAGS -isysroot $2"
shift
;;
-F*|-m*|-x*)
LFLAGS="$LFLAGS $PARAM"
CXXFLAGS="$CXXFLAGS $PARAM"
@ -72,7 +67,7 @@ test -r Makefile && $MAKE distclean >/dev/null 2>&1
# Make sure output from possible previous tests is gone
rm -f "$EXE" "${EXE}.exe"
set -- "$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "CONFIG+=$QMAKE_CONFIG" "CONFIG-=debug_and_release" "LIBS*=$LFLAGS" "LIBS+=$MAC_ARCH_LFLAGS" "INCLUDEPATH*=$INCLUDEPATH" "QMAKE_CXXFLAGS*=$CXXFLAGS" "QMAKE_CXXFLAGS+=$MAC_ARCH_CXXFLAGS" "QT_BUILD_TREE=$OUTDIR" "$SRCDIR/$TEST/$EXE.pro" -o "$OUTDIR/$TEST/Makefile"
set -- "$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "CONFIG+=$QMAKE_CONFIG" "CONFIG+=android_app" "CONFIG-=debug_and_release" "LIBS*=$LFLAGS" "LIBS+=$MAC_ARCH_LFLAGS" "INCLUDEPATH*=$INCLUDEPATH" "QMAKE_CXXFLAGS*=$CXXFLAGS" "QMAKE_CXXFLAGS+=$MAC_ARCH_CXXFLAGS" "QT_BUILD_TREE=$OUTDIR" "$SRCDIR/$TEST/$EXE.pro" -o "$OUTDIR/$TEST/Makefile"
if [ "$VERBOSE" = "yes" ]; then
OUTDIR=$OUTDIR "$@"
$MAKE
@ -81,7 +76,7 @@ else
$MAKE >/dev/null 2>&1
fi
( [ -x "$EXE" ] || [ -x "${EXE}.exe" ] ) && SUCCESS=yes
( [ -f "$EXE" ] || [ -f "${EXE}.exe" ] ) && SUCCESS=yes
# done
if [ "$SUCCESS" != "yes" ]; then

View File

@ -0,0 +1,3 @@
SOURCES = main.cpp
CONFIG -= qt dylib
mac:CONFIG -= app_bundle

View File

@ -1,9 +1,9 @@
/****************************************************************************
**
** Copyright (C) 2012 Collabora Ltd, author <robin.burchell@collabora.co.uk>
** Copyright (C) 2012 Intel Corporation
** Contact: http://www.qt-project.org/legal
**
** This file is part of the QtCore module of the Qt Toolkit.
** This file is part of the config.tests of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@ -39,4 +39,13 @@
**
****************************************************************************/
#include "../../common/android/qplatformdefs.h"
#include <sys/eventfd.h>
int main()
{
eventfd_t value;
int fd = eventfd(0, EFD_CLOEXEC);
eventfd_read(fd, &value);
eventfd_write(fd, value);
return 0;
}

527
configure vendored
View File

@ -2,6 +2,7 @@
#############################################################################
##
## Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
## Copyright (C) 2013 Intel Corporation.
## Contact: http://www.qt-project.org/legal
##
## This file is the build configuration utility of the Qt Toolkit.
@ -125,7 +126,7 @@ shellArgumentListToQMakeList()
# Helper function for getQMakeConf. It parses include statements in
# qmake.conf and prints out the expanded file
getQMakeConf1()
expandQMakeConf()
{
while read line; do case "$line" in
include*)
@ -136,7 +137,7 @@ getQMakeConf1()
echo "WARNING: Unable to find file $conf_file" >&2
continue
fi
getQMakeConf1 "$conf_file"
expandQMakeConf "$conf_file"
;;
*load\(device_config\)*)
conf_file="$DEVICE_VARS_FILE"
@ -144,7 +145,7 @@ getQMakeConf1()
echo "WARNING: Unable to find file $conf_file" >&2
continue
fi
getQMakeConf1 "$conf_file"
expandQMakeConf "$conf_file"
;;
*)
echo "$line"
@ -152,13 +153,19 @@ getQMakeConf1()
esac; done < "$1"
}
getQMakeConf2()
extractQMakeVariables()
{
$AWK '
BEGIN {
values["LITERAL_WHITESPACE"] = " "
values["LITERAL_DOLLAR"] = "$"
}
/^!?host_build:/ {
scopeStart = index($0, ":") + 1
condition = substr($0, 0, scopeStart - 2)
if (condition != "'"$1"'") { next }
$0 = substr($0, scopeStart)
}
/^[_A-Z0-9.]+[ \t]*\+?=/ {
valStart = index($0, "=") + 1
@ -183,13 +190,26 @@ BEGIN {
}
ovalue = ovalue values[var]
}
ovalue = ovalue value
value = ovalue value
ovalue = ""
while (match(value, /\$\$system\(("[^"]*"|[^)]*)\)/)) {
ovalue = ovalue substr(value, 1, RSTART - 1)
cmd = substr(value, RSTART + 9, RLENGTH - 10)
gsub(/^"|"$/, "", cmd)
value = substr(value, RSTART + RLENGTH)
while ((cmd | getline line) > 0) {
ovalue = ovalue line
}
close(cmd)
}
value = ovalue value
combinedValue = values[variable]
if (append == 1 && length(combinedValue) > 0) {
combinedValue = combinedValue " " ovalue
combinedValue = combinedValue " " value
} else {
combinedValue = ovalue
combinedValue = value
}
values[variable] = combinedValue
}
@ -201,27 +221,76 @@ END {
'
}
getQMakeConf3()
getSingleQMakeVariable()
{
echo "$2" | $AWK "/^($1)=/ { print substr(\$0, index(\$0, \"=\") + 1) }"
}
macSDKify()
{
# Normally we take care of sysrootifying in sdk.prf, but configure extracts some
# values before qmake is even built, so we have to duplicate the logic here.
sdk=$(getSingleQMakeVariable "QMAKE_MAC_SDK" "$1")
if [ -z "$sdk" ]; then echo "QMAKE_MAC_SDK must be set when building on Mac" >&2; exit 1; fi
sysroot=$(xcodebuild -sdk $sdk -version Path 2>/dev/null)
if [ -z "$sysroot" ]; then echo "Failed to resolve SDK path for '$sdk'" >&2; exit 1; fi
case "$sdk" in
macosx*)
version_min_flag="-mmacosx-version-min=$(getSingleQMakeVariable QMAKE_MACOSX_DEPLOYMENT_TARGET "$1")"
;;
iphoneos*)
version_min_flag="-miphoneos-version-min=$(getSingleQMakeVariable QMAKE_IOS_DEPLOYMENT_TARGET "$1")"
;;
iphonesimulator*)
version_min_flag="-mios-simulator-version-min=$(getSingleQMakeVariable QMAKE_IOS_DEPLOYMENT_TARGET "$1")"
;;
*)
;;
esac
echo "$1" | while read line; do
case "$line" in
QMAKE_CC=*|QMAKE_CXX=*|QMAKE_FIX_RPATH=*|QMAKE_AR=*|QMAKE_RANLIB=*|QMAKE_LINK=*|QMAKE_LINK_SHLIB=*)
# Prefix tool with toolchain path
var=$(echo "$line" | cut -d '=' -f 1)
val=$(echo "$line" | cut -d '=' -f 2-)
sdk_val=$(xcrun -sdk $sdk -find $(echo $val | cut -d ' ' -f 1))
val=$(echo $sdk_val $(echo $val | cut -s -d ' ' -f 2-))
echo "$var=$val"
;;
QMAKE_CFLAGS=*|QMAKE_CXXFLAGS=*|QMAKE_OBJECTIVE_CFLAGS=*)
echo "$line -isysroot $sysroot $version_min_flag"
;;
QMAKE_LFLAGS=*)
echo "$line -Wl,-syslibroot,$sysroot $version_min_flag"
;;
*)
echo "$line"
;;
esac
done
}
# relies on $QMAKESPEC being set correctly. parses include statements in
# qmake.conf and prints out the expanded file
getQMakeConf()
{
if [ -z "$specvals" ]; then
specvals=`getQMakeConf1 "$QMAKESPEC/qmake.conf" | getQMakeConf2`
specvals=`expandQMakeConf "$QMAKESPEC/qmake.conf" | extractQMakeVariables "host_build"`
if [ "$BUILD_ON_MAC" = "yes" ]; then specvals=$(macSDKify "$specvals"); fi
fi
getQMakeConf3 "$1" "$specvals"
getSingleQMakeVariable "$1" "$specvals"
}
getXQMakeConf()
{
if [ -z "$xspecvals" ]; then
xspecvals=`getQMakeConf1 "$XQMAKESPEC/qmake.conf" | getQMakeConf2`
xspecvals=`expandQMakeConf "$XQMAKESPEC/qmake.conf" | extractQMakeVariables "!host_build"`
if [ "$BUILD_ON_MAC" = "yes" ]; then xspecvals=$(macSDKify "$xspecvals"); fi
fi
getQMakeConf3 "$1" "$xspecvals"
getSingleQMakeVariable "$1" "$xspecvals"
}
compilerSupportsFlag()
@ -369,6 +438,12 @@ if [ -d /System/Library/Frameworks/Carbon.framework ]; then
BUILD_ON_MAC=yes
PLATFORM_MAC=maybe
fi
BUILD_ON_MSYS=no
HOST_DIRLIST_SEP=":"
if [ "$OSTYPE" = "msys" ]; then
HOST_DIRLIST_SEP=";"
BUILD_ON_MSYS=yes
fi
#-----------------------------------------------------------------------------
# Qt version detection
@ -733,7 +808,7 @@ QMakeVar add styles "mac fusion windows"
unset QTDIR
# the minimum version of libdbus-1 that we require:
MIN_DBUS_1_VERSION=0.93
MIN_DBUS_1_VERSION=1.2
# initalize internal variables
CFG_CONFIGURE_EXIT_ON_ERROR=yes
@ -844,10 +919,10 @@ CFG_GETADDRINFO=auto
CFG_IPV6IFNAME=auto
CFG_GETIFADDRS=auto
CFG_INOTIFY=auto
CFG_EVENTFD=auto
CFG_RPATH=yes
CFG_FRAMEWORK=auto
CFG_MAC_HARFBUZZ=no
CFG_SDK=
DEFINES=
D_FLAGS=
I_FLAGS=
@ -856,6 +931,7 @@ RPATH_FLAGS=
W_FLAGS=
QCONFIG_FLAGS=
XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++"
XPLATFORM_ANDROID=no
XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
XPLATFORM_MAEMO=no
XPLATFORM_QNX=no
@ -876,6 +952,7 @@ CFG_PCRE=auto
QPA_PLATFORM_GUARD=yes
CFG_CXX11=auto
CFG_DIRECTWRITE=no
CFG_WERROR=auto
# initalize variables used for installation
QT_INSTALL_PREFIX=
@ -935,6 +1012,15 @@ CFG_SQL_oci=no
CFG_SQL_db2=no
CFG_SQL_AVAILABLE=
# Android vars
CFG_DEFAULT_ANDROID_NDK_ROOT=$ANDROID_NDK_ROOT
CFG_DEFAULT_ANDROID_SDK_ROOT=$ANDROID_SDK_ROOT
CFG_DEFAULT_ANDROID_PLATFORM=android-9
CFG_DEFAULT_ANDROID_TARGET_ARCH=armeabi-v7a
CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION=4.7
CFG_DEFAULT_ANDROID_NDK_HOST=$ANDROID_NDK_HOST
if [ -d "$relpath/src/plugins/sqldrivers" ]; then
for a in "$relpath/src/plugins/sqldrivers/"*; do
if [ -d "$a" ]; then
@ -996,7 +1082,7 @@ while [ "$#" -gt 0 ]; do
VAL=no
;;
#Qt style options that pass an argument
-prefix|-docdir|-headerdir|-plugindir|-importdir|-qmldir|-archdatadir|-datadir|-libdir|-bindir|-libexecdir|-translationdir|-sysconfdir|-examplesdir|-testsdir|-depths|-make|-nomake|-skip|-platform|-xplatform|-device|-device-option|-sdk|-arch|-host-arch|-mysql_config|-sysroot|-hostdatadir|-hostbindir|-qpa|-qconfig)
-prefix|-docdir|-headerdir|-plugindir|-importdir|-qmldir|-archdatadir|-datadir|-libdir|-bindir|-libexecdir|-translationdir|-sysconfdir|-examplesdir|-testsdir|-depths|-make|-nomake|-skip|-platform|-xplatform|-device|-device-option|-sdk|-arch|-host-arch|-mysql_config|-sysroot|-hostdatadir|-hostbindir|-qpa|-qconfig|-android-sdk|-android-ndk|-android-ndk-platform|-android-ndk-host|-android-arch|-android-toolchain-version)
VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
shift
VAL="$1"
@ -1299,8 +1385,7 @@ while [ "$#" -gt 0 ]; do
;;
sdk)
if [ "$BUILD_ON_MAC" = "yes" ]; then
CFG_SDK="$VAL"
DeviceVar set QMAKE_MAC_SDK "$VAL"
DeviceVar set !host_build:QMAKE_MAC_SDK "$VAL"
else
UNKNOWN_OPT=yes
fi
@ -2130,6 +2215,31 @@ while [ "$#" -gt 0 ]; do
UNKNOWN_OPT=yes
fi
;;
warnings-are-errors|Werror)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_WERROR="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
android-sdk)
CFG_DEFAULT_ANDROID_SDK_ROOT="$VAL"
;;
android-ndk)
CFG_DEFAULT_ANDROID_NDK_ROOT="$VAL"
;;
android-ndk-platform)
CFG_DEFAULT_ANDROID_PLATFORM="$VAL"
;;
android-ndk-host)
CFG_DEFAULT_ANDROID_NDK_HOST="$VAL"
;;
android-arch)
CFG_DEFAULT_ANDROID_TARGET_ARCH="$VAL"
;;
android-toolchain-version)
CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION="$VAL"
;;
*)
UNKNOWN_OPT=yes
;;
@ -2335,18 +2445,23 @@ if [ -z "$PLATFORM" ]; then
PLATFORM_NOTES=
case "$UNAME_SYSTEM:$UNAME_RELEASE" in
Darwin:*)
OSX_VERSION=`uname -r | cut -d. -f1`
# Select compiler. Use g++ unless we find a usable Clang version
PLATFORM=macx-g++
if [ "$OSX_VERSION" -ge 12 ]; then
# We're on Mountain Lion or above. Use Clang. Don't advertise gcc.
PLATFORM=macx-clang
elif [ "$OSX_VERSION" -eq 11 ]; then
# We're on Lion. Check if we have a supported Clang version
if [ "$(clang -v 2>&1 | grep -Po '(?<=version )[\d]')" -ge 3 ]; then
# Select compiler. Use g++ unless we find a usable Clang version. Note that
# we are checking the "Apple" clang/LLVM version number, not the actual
# clang/LLVM version number that the Apple version was based on. We look
# for Apple clang version 3.0 or higher, which was branched off LLVM 3.0
# from SVN, and first included in Xcode 4.2. Also note that we do not care
# about the OS version, since we're not using the clang version that comes
# with the system. We use 'xcrun' to check the clang version that's part of
# the Xcode installation.
if [ "$(xcrun -sdk macosx clang -v 2>&1 | sed -n 's/.*version \([0-9]\).*/\1/p')" -ge 3 ]; then
PLATFORM=macx-clang
# Advertise g++ as an alternative on Lion and below
if [ "$(uname -r | cut -d. -f1)" -le 11 ]; then
PLATFORM_NOTES="\n - Also available for Mac OS X: macx-g++\n"
fi
else
PLATFORM=macx-g++
fi
;;
AIX:*)
@ -2502,8 +2617,89 @@ fi
[ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
case "$XPLATFORM" in *-maemo*) XPLATFORM_MAEMO=yes;; esac
case "$XPLATFORM" in *qnx-*|*blackberry-*) XPLATFORM_QNX=yes;; esac
case "$XPLATFORM" in
*-maemo*)
XPLATFORM_MAEMO=yes
;;
*qnx-*|*blackberry-*)
XPLATFORM_QNX=yes
;;
*ios*)
XPLATFORM_IOS=yes
;;
# XPLATFORM_ANDROID should not be set for unsupported/android-g++
*unsupported*)
;;
*android-g++*)
XPLATFORM_ANDROID=yes
;;
esac
if [ "$XPLATFORM_ANDROID" = "yes" ]; then
if [ -z "$CFG_DEFAULT_ANDROID_NDK_HOST" ]; then
case $PLATFORM in
linux-*-64)
if [ -d "$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/prebuilt/linux-x86_64" ]; then
CFG_DEFAULT_ANDROID_NDK_HOST=linux-x86_64
else
CFG_DEFAULT_ANDROID_NDK_HOST=linux-x86
fi
;;
linux-*)
CFG_DEFAULT_ANDROID_NDK_HOST=linux-x86
;;
macx-*)
CFG_DEFAULT_ANDROID_NDK_HOST=darwin-x86
if [ ! -z "$NATIVE_64_ARCH" ] && [ -d "$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/prebuilt/darwin-x86_64" ]; then
CFG_DEFAULT_ANDROID_NDK_HOST=darwin-x86_64
fi
;;
win32-*)
CFG_DEFAULT_ANDROID_NDK_HOST=windows
if [ ! -z "$NATIVE_64_ARCH" ] && [ -d "$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/prebuilt/windows-x86_64" ]; then
CFG_DEFAULT_ANDROID_NDK_HOST=windows-x86_64
fi
;;
esac
fi
if [ "$OPT_HELP" != "yes" ]; then
if [ -z "$CFG_DEFAULT_ANDROID_NDK_ROOT" ]; then
echo
echo "Can not find Android NDK. Please use -android-ndk option to specify one"
exit 1
fi
if [ -z "$CFG_DEFAULT_ANDROID_SDK_ROOT" ]; then
echo
echo "Can not find Android SDK. Please use -android-sdk option to specify one"
exit 1
fi
if [ -z "CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION" ] || [ ! -d "$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/prebuilt" ]; then
echo
echo "Can not detect Android NDK toolchain. Please use -android-toolchain-version to specify"
exit 1
fi
if [ -z "$CFG_DEFAULT_ANDROID_NDK_HOST" ] || [ ! -d "$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/prebuilt/$CFG_DEFAULT_ANDROID_NDK_HOST" ]; then
echo
echo "Can not detect the android host. Please use -android-ndk-host option to specify one"
exit 1
fi
QT_QPA_DEFAULT_PLATFORM="android"
CFG_LARGEFILE="no"
# FIXME: Qt Creator requires this to be in the lib/ directory of Qt. This line can be removed
# once it's fixed to get the file directly from the NDK.
cp -f $CFG_DEFAULT_ANDROID_NDK_ROOT/sources/cxx-stl/gnu-libstdc++/$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/libs/$CFG_DEFAULT_ANDROID_TARGET_ARCH/libgnustl_shared.so $outpath/lib
DeviceVar set DEFAULT_ANDROID_SDK_ROOT "$CFG_DEFAULT_ANDROID_SDK_ROOT"
DeviceVar set DEFAULT_ANDROID_NDK_ROOT "$CFG_DEFAULT_ANDROID_NDK_ROOT"
DeviceVar set DEFAULT_ANDROID_PLATFORM "$CFG_DEFAULT_ANDROID_PLATFORM"
DeviceVar set DEFAULT_ANDROID_NDK_HOST "$CFG_DEFAULT_ANDROID_NDK_HOST"
DeviceVar set DEFAULT_ANDROID_TARGET_ARCH "$CFG_DEFAULT_ANDROID_TARGET_ARCH"
DeviceVar set DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION "$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION"
fi
fi
if [ -d "$PLATFORM" ]; then
QMAKESPEC="$PLATFORM"
@ -2612,25 +2808,9 @@ if [ "$CFG_FORCEDEBUGINFO" = "yes" ]; then
QMAKE_CONFIG="$QMAKE_CONFIG force_debug_info"
fi
# pass on $CFG_SDK to the arch/configure tests.
if [ -n "$CFG_SDK" ]; then
MAC_SDK_FLAG="-sdk $CFG_SDK"
else
MAC_SDK_FLAG=
fi
# find the default framework value
if [ "$BUILD_ON_MAC" = "yes" ]; then
if [ "$CFG_FRAMEWORK" = "auto" ]; then
CFG_FRAMEWORK="$CFG_SHARED"
elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
echo
echo "WARNING: Using static linking will disable the use of Mac frameworks."
echo
CFG_FRAMEWORK="no"
fi
else
CFG_FRAMEWORK=no
# iOS builds should be static to be able to submit to the App Store
if [ "$XPLATFORM_IOS" = "yes" ]; then
CFG_SHARED="no"
fi
# disable GTK style support auto-detection on Mac
@ -2641,6 +2821,32 @@ fi
QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX`
TEST_COMPILER=$QMAKE_CONF_COMPILER
if [ "$OPT_HELP" != "yes" ] && [ "$XPLATFORM_ANDROID" = "yes" ] ; then
ANDROID_NDK_TOOLS_PREFIX=
ANDROID_PLATFORM_ARCH=
case $CFG_DEFAULT_ANDROID_TARGET_ARCH in
armeabi*)
ANDROID_NDK_TOOLS_PREFIX=arm-linux-androideabi
ANDROID_PLATFORM_ARCH=arch-arm
;;
x86)
ANDROID_NDK_TOOLS_PREFIX=x86
ANDROID_PLATFORM_ARCH=arch-x86
;;
mips)
ANDROID_NDK_TOOLS_PREFIX=mipsel-linux-android
ANDROID_PLATFORM_ARCH=arch-mips
;;
*)
echo "ERROR: Unknown android arch $CFG_DEFAULT_ANDROID_TARGET_ARCH"
exit 1
;;
esac
QMAKE_CONF_COMPILER=$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/$ANDROID_NDK_TOOLS_PREFIX-$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/prebuilt/$CFG_DEFAULT_ANDROID_NDK_HOST/bin/$ANDROID_NDK_TOOLS_PREFIX-g++
TEST_COMPILER="$QMAKE_CONF_COMPILER --sysroot=$CFG_DEFAULT_ANDROID_NDK_ROOT/platforms/$CFG_DEFAULT_ANDROID_PLATFORM/$ANDROID_PLATFORM_ARCH/"
fi
if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
if [ -z "$TEST_COMPILER" ]; then
echo "ERROR: Cannot set the compiler for the configuration tests"
@ -2751,7 +2957,7 @@ fi
# auto-detect default include and library search paths
gccout=`$TEST_COMPILER $SYSROOT_FLAG $TEST_COMPILER_CXXFLAGS -xc++ -E -v - < /dev/null 2>&1 > /dev/null`
libdirs=`echo "$gccout" | sed -n -e 's/^LIBRARY_PATH=\(.*\)/\1/p'`
DEFAULT_LIBDIRS=`IFS=:; for i in $libdirs; do test -d "$i" && cd "$i" && pwd; done | sort -u`
DEFAULT_LIBDIRS=`IFS=${HOST_DIRLIST_SEP}; for i in $libdirs; do test -d "$i" && cd "$i" && pwd; done | sort -u`
DEFAULT_INCDIRS=`echo "$gccout" | awk '
/^End of search/ { yup=0 }
/ \(framework directory\)$/ { next }
@ -3308,6 +3514,10 @@ Additional options:
* -no-system-proxies .. Do not use system network proxies by default.
-system-proxies ..... Use system network proxies by default.
-no-warnings-are-errors Make warnings be treated normally
-warnings-are-errors Make warnings be treated as errors
(enabled if -developer-build is active)
$GBN -no-glib ........... Do not compile Glib support.
$GBY -glib .............. Compile Glib support.
EOF
@ -3344,14 +3554,39 @@ Qt/Mac only:
link tools against those frameworks.
-no-framework ...... Do not build Qt as a series of frameworks.
-sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. This option requires gcc 4.
To use a different SDK with gcc 3.3, set the SDKROOT environment variable.
-sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. The argument should be
one of the available SDKs as listed by 'xcodebuild -showsdks'.
-harfbuzz .......... Use HarfBuzz to do text layout instead of Core Text when possible.
* -no-harfbuzz ....... Disable HarfBuzz on Mac. It can still be enabled by setting
QT_ENABLE_HARFBUZZ environment variable.
EOF
fi
if [ "$XPLATFORM_ANDROID" = "yes" ]; then
cat << EOF
Android options:
-android-sdk path .............. The Android SDK root path.
(default $CFG_DEFAULT_ANDROID_SDK_ROOT)
-android-ndk path .............. The Android NDK root path.
(default $CFG_DEFAULT_ANDROID_NDK_ROOT)
-android-ndk-platform .......... Sets the android platform
(default $CFG_DEFAULT_ANDROID_PLATFORM)
-android-ndk-host .............. Sets the android NDK host (linux-x86, linux-x86_64, etc.)
(default $CFG_DEFAULT_ANDROID_NDK_HOST)
-android-arch .................. Sets the android architecture (armeabi, armeabi-v7a, x86, mips)
(default $CFG_DEFAULT_ANDROID_TARGET_ARCH)
-android-toolchain-version ..... Sets the android toolchain version
(default $CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION)
EOF
fi
[ "x$ERROR" = "xyes" ] && exit 1
@ -3662,10 +3897,6 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ];
setBootstrapVariable QMAKE_CXXFLAGS
setBootstrapVariable QMAKE_LFLAGS
if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
EXTRA_CFLAGS="$EXTRA_CFLAGS -DQMAKE_OPENSOURCE_EDITION"
EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DQMAKE_OPENSOURCE_EDITION"
fi
if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then
setBootstrapVariable QMAKE_CFLAGS_RELEASE
setBootstrapVariable QMAKE_CXXFLAGS_RELEASE
@ -3684,22 +3915,48 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ];
EXTRA_LFLAGS="\$(QMAKE_LFLAGS_RPATH)\"$rpath\" $EXTRA_LFLAGS"
done
fi
if [ "$BUILD_ON_MSYS" = "yes" ]; then
EXTRA_CFLAGS="-DUNICODE"
EXTRA_CXXFLAGS="-DUNICODE"
EXTRA_OBJS="qfilesystemengine_win.o \
qfilesystemiterator_win.o \
qfsfileengine_win.o \
qlocale_win.o \
qsettings_win.o \
qsystemlibrary.o \
registry.o"
EXTRA_SRCS="\"\$(SOURCE_PATH)/src/corelib/corelib/io/qfilesystemengine_win.cpp\" \
\"\$(SOURCE_PATH)/src/corelib/io/qfilesystemiterator_win.cpp\" \
\"\$(SOURCE_PATH)/src/corelib/io/qfsfileengine_win.cpp\" \
\"\$(SOURCE_PATH)/src/corelib/io/qsettings_win.cpp\" \
\"\$(SOURCE_PATH)/src/corelib/tools/qlocale_win.cpp\" \
\"\$(SOURCE_PATH)/src/corelib/plugin/qsystemlibrary.cpp\" \
\"\$(SOURCE_PATH)/tools/shared/windows/registry.cpp\""
EXTRA_LFLAGS="-static -s -lole32 -luuid -ladvapi32 -lkernel32"
EXEEXT=".exe"
else
EXTRA_OBJS="qfilesystemengine_unix.o \
qfilesystemiterator_unix.o \
qfsfileengine_unix.o \
qlocale_unix.o"
EXTRA_SRCS="\"\$(SOURCE_PATH)/src/corelib/io/qfilesystemengine_unix.cpp\" \
\"\$(SOURCE_PATH)/src/corelib/io/qfilesystemiterator_unix.cpp\" \
\"\$(SOURCE_PATH)/src/corelib/io/qfsfileengine_unix.cpp\" \
\"\$(SOURCE_PATH)/src/corelib/tools/qlocal_unix.cpp\""
EXEEXT=
fi
if [ "$BUILD_ON_MAC" = "yes" ]; then
echo "export MACOSX_DEPLOYMENT_TARGET = 10.6" >> "$mkfile"
echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
if [ '!' -z "$CFG_SDK" ]; then
echo "SDK_LFLAGS =-Wl,-syslibroot,$CFG_SDK" >>"$mkfile"
echo "SDK_CFLAGS =-isysroot $CFG_SDK" >>"$mkfile"
EXTRA_CFLAGS="$EXTRA_CFLAGS \$(SDK_CFLAGS)"
EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(SDK_CFLAGS)"
EXTRA_LFLAGS="$EXTRA_LFLAGS \$(SDK_LFLAGS)"
fi
EXTRA_OBJS="$EXTRA_OBJS \
qsettings_mac.o \
qcore_mac.o"
EXTRA_SRCS="$EXTRA_SRCS \
\"\$(SOURCE_PATH)/src/corelib/io/qsettings_mac.cpp\" \
\"\$(SOURCE_PATH)/src/corelib/kernel/qcore_mac.cpp\""
fi
if [ '!' -z "$D_FLAGS" ]; then
EXTRA_CFLAGS="$EXTRA_CFLAGS $D_FLAGS"
@ -3712,13 +3969,25 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ];
adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
sed -e "s,@SOURCE_PATH@,$adjrelpath,g" -e "s,@BUILD_PATH@,$adjoutpath,g" \
-e "s,@QMAKE_CFLAGS@,$EXTRA_CFLAGS,g" -e "s,@QMAKE_LFLAGS@,$EXTRA_LFLAGS,g" \
-e "s,@QMAKE_CXXFLAGS@,$EXTRA_CXXFLAGS,g" \
-e "s,@QT_INSTALL_BINS@,\$(INSTALL_ROOT)$QMAKE_BIN_DIR,g" \
-e "s,@QT_INSTALL_DATA@,\$(INSTALL_ROOT)$QMAKE_DATA_DIR,g" \
-e "s,@QMAKE_QTOBJS@,$EXTRA_OBJS,g" -e "s,@QMAKE_QTSRCS@,$EXTRA_SRCS,g" \
-e "s,@QMAKESPEC@,$adjqmakespec,g" -e "s,@QT_VERSION@,$QT_VERSION,g" "$in_mkfile" >>"$mkfile"
echo "BUILD_PATH = $adjoutpath" >> "$mkfile"
echo "SOURCE_PATH = $adjrelpath" >> "$mkfile"
echo "QMAKESPEC = $adjqmakespec" >> "$mkfile"
echo "QT_VERSION = $QT_VERSION" >> "$mkfile"
echo "EXTRA_CFLAGS = $EXTRA_CFLAGS" >> "$mkfile"
echo "EXTRA_CXXFLAGS = $EXTRA_CXXFLAGS" >> "$mkfile"
echo "QTOBJS = $EXTRA_OBJS" >> "$mkfile"
echo "QTSRCS = $EXTRA_SRCS" >> "$mkfile"
echo "LFLAGS = $EXTRA_LFLAGS" >> "$mkfile"
echo "QT_INSTALL_BINS = \$(INSTALL_ROOT)$QMAKE_BIN_DIR" >> "$mkfile"
echo "QT_INSTALL_DATA = \$(INSTALL_ROOT)$QMAKE_DATA_DIR" >> "$mkfile"
echo "EXEEXT = $EXEEXT" >> "$mkfile"
echo "RM_F = rm -f" >> "$mkfile"
echo "RM_RF = rm -rf" >> "$mkfile"
if [ $QT_EDITION = "QT_EDITION_OPENSOURCE" ]; then
echo "EXTRA_CPPFLAGS = -DQMAKE_OPENSOURCE_EDITION" >> "$mkfile"
fi
cat "$in_mkfile" >> "$mkfile"
if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then
(cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1
@ -3752,6 +4021,20 @@ else
DEVICE_VARS_FILE="$DEVICE_VARS_OUTFILE"
fi
#-------------------------------------------------------------------------------
# Verify makespec
#-------------------------------------------------------------------------------
QMAKE_OUTPUT=`$outpath/bin/qmake -E -nocache -spec "$XQMAKESPEC" "QT=" /dev/null 2>&1 >/dev/null`
if [ $? != "0" ]; then
echo "Failed to process makespec for platform '$XPLATFORM'"
if [ "$OPT_VERBOSE" = "yes" ]; then
echo "$QMAKE_OUTPUT"
else
echo "Turn on verbose messaging (-v) to see the final report."
fi
exit 101
fi
#-------------------------------------------------------------------------------
# Detect pkg-config
#-------------------------------------------------------------------------------
@ -3829,7 +4112,7 @@ compileTest()
path=config.tests/$1
name=$2
shift 2
"$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "$path" "$name" $I_FLAGS $D_FLAGS $L_FLAGS $MAC_SDK_FLAG "$@"
"$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "$path" "$name" $I_FLAGS $D_FLAGS $L_FLAGS "$@"
}
#-------------------------------------------------------------------------------
@ -3838,7 +4121,7 @@ compileTest()
# Use config.tests/arch/arch.pro to have the compiler tell us what the target architecture is
OUTFILE=$outpath/arch.result
"$unixtests/arch.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" "$OUTFILE" "CFG" $MAC_SDK_FLAG
"$unixtests/arch.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" "$OUTFILE" "target"
if [ $? -eq 0 ]; then
eval `cat "$OUTFILE"`
else
@ -3851,7 +4134,7 @@ rm -f "$OUTFILE" 2>/dev/null
if [ "$QMAKESPEC" != "$XQMAKESPEC" ]; then
# Do the same test again, using the host compiler
SYSROOT_FLAG= "$unixtests/arch.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" "$OUTFILE" "CFG_HOST" $MAC_SDK_FLAG
SYSROOT_FLAG= "$unixtests/arch.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" "$OUTFILE" "host"
if [ $? -eq 0 ]; then
eval `cat "$OUTFILE"`
else
@ -3951,7 +4234,7 @@ if [ "${CFG_AVX}" = "auto" ]; then
*g++*|*-clang*)
# Some clang versions produce internal compiler errors compiling Qt AVX code
case `$TEST_COMPILER --version` in
Apple\ clang\ version\ 2*|Apple\ clang\ version\ 3.0*)
Apple\ clang\ version\ [23]*)
CFG_AVX=no
if [ "$OPT_VERBOSE" = "yes" ]; then
echo 'AVX support disabled for blacklisted clang compiler'
@ -3995,7 +4278,8 @@ fi
# detect neon support
if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then
if compileTest unix/neon "neon"; then
# The iOS toolchain has trouble building the pixman NEON draw-helpers
if [ "$XPLATFORM_IOS" != "yes" ] && compileTest unix/neon "neon"; then
CFG_NEON=yes
else
CFG_NEON=no
@ -4027,6 +4311,7 @@ elif [ "$CFG_ARCH" != "mips" ]; then
fi
[ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista"
[ "$XPLATFORM_ANDROID" = "yes" ] && QMakeVar add styles "android"
# detect zlib
if [ "$CFG_ZLIB" = "no" ]; then
@ -4491,14 +4776,17 @@ fi
# auto-detect GTK style support
if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
if [ -n "$PKG_CONFIG" ]; then
QT_CFLAGS_QGTKSTYLE=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.18 atk 2>/dev/null`
QT_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
QT_CFLAGS_QGTK2=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.18 atk 2>/dev/null`
QT_LIBS_QGTK2=`$PKG_CONFIG --libs gtk+-2.0 2>/dev/null`
QT_LIBS_QGOBJECT=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
fi
if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
if [ -n "$QT_CFLAGS_QGTK2" ] ; then
CFG_QGTKSTYLE=yes
QT_CONFIG="$QT_CONFIG gtkstyle"
QMakeVar set QT_CFLAGS_QGTKSTYLE "$QT_CFLAGS_QGTKSTYLE"
QMakeVar set QT_LIBS_QGTKSTYLE "$QT_LIBS_QGTKSTYLE"
QT_CONFIG="$QT_CONFIG gtk2 gtkstyle"
QMakeVar set QT_CFLAGS_QGTKSTYLE "$QT_CFLAGS_QGTK2"
QMakeVar set QT_LIBS_QGTKSTYLE "$QT_LIBS_QGOBJECT"
QMakeVar set QT_CFLAGS_QGTK2 "$QT_CFLAGS_QGTK2"
QMakeVar set QT_LIBS_QGTK2 "$QT_LIBS_QGTK2"
else
if [ "$CFG_QGTKSTYLE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
echo "Gtk theme support cannot be enabled due to functionality tests!"
@ -4920,13 +5208,20 @@ if [ "$CFG_KMS" != "no" ]; then
fi
# Detect libxkbcommon
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "xkbcommon >= 0.2.0" 2>/dev/null; then
QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon 2>/dev/null`"
QMAKE_CFLAGS_XCB="$QMAKE_CFLAGS_XCB $QMAKE_CFLAGS_XKBCOMMON"
QMAKE_LIBS_XCB="$QMAKE_LIBS_XCB $QMAKE_LIBS_XKBCOMMON"
QT_CONFIG="$QT_CONFIG xkbcommon"
else
QMAKE_DEFINES_XCB=QT_NO_XCB_XKB
echo "WARNING: Qt requires the libxkbcommon version 0.2.0 (or higher)."
echo "Not satisfying this requirement will disable the compose key functionality,"
echo "which includes text input with dead keys."
QMakeVar add DEFINES QT_NO_XKBCOMMON
fi
if [ -n "$QMAKE_CFLAGS_XKBCOMMON" ] || [ -n "$QMAKE_LIBS_XKBCOMMON" ]; then
QMakeVar set QMAKE_CFLAGS_XKBCOMMON "$QMAKE_CFLAGS_XKBCOMMON"
QMakeVar set QMAKE_LIBS_XKBCOMMON "$QMAKE_LIBS_XKBCOMMON"
fi
# EGL Support
@ -5011,8 +5306,8 @@ fi
if [ -n "$QMAKE_CFLAGS_XCB" ] || [ -n "$QMAKE_LIBS_XCB" ]; then
QMakeVar set QMAKE_CFLAGS_XCB "$QMAKE_CFLAGS_XCB"
QMakeVar set QMAKE_LIBS_XCB "$QMAKE_LIBS_XCB"
QMakeVar set QMAKE_DEFINES_XCB "$QMAKE_DEFINES_XCB"
fi
if [ "$CFG_DIRECTFB" = "yes" ]; then
QT_CONFIG="$QT_CONFIG directfb"
QMakeVar set QMAKE_CFLAGS_DIRECTFB "$QMAKE_CFLAGS_DIRECTFB"
@ -5033,7 +5328,7 @@ if [ "$BUILD_ON_MAC" = "yes" ]; then
fi
fi
if [ "$BUILD_ON_MAC" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ] && [ "$XPLATFORM_QNX" = "no" ]; then
if [ "$BUILD_ON_MAC" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ] && [ "$XPLATFORM_QNX" = "no" ] && [ "$XPLATFORM_ANDROID" = "no" ]; then
if [ "$CFG_XCB" = "no" ] && [ "$CFG_EGLFS" = "no" ] && [ "$CFG_DIRECTFB" = "no" ] && [ "$CFG_LINUXFB" = "no" ] && [ "$CFG_KMS" = "no" ]; then
if [ "$QPA_PLATFORM_GUARD" = "yes" ] &&
( [ "$ORIG_CFG_XCB" = "auto" ] || [ "$ORIG_CFG_EGLFS" = "auto" ] || [ "$ORIG_CFG_DIRECTFB" = "auto" ] || [ "$ORIG_CFG_LINUXFB" = "auto" ] || [ "$ORIG_CFG_KMS" = "auto" ] ); then
@ -5129,6 +5424,23 @@ if [ "$CFG_INOTIFY" != "no" ]; then
fi
fi
# find if the platform provides eventfd
if [ "$CFG_EVENTFD" != "no" ]; then
if compileTest unix/eventfd "eventfd"; then
CFG_EVENTFD=yes
else
if [ "$CFG_EVENTFD" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
echo "eventfd support cannot be enabled due to functionality tests!"
echo " Turn on verbose messaging (-v) to $0 to see the final report."
echo " If you believe this message is in error you may use the continue"
echo " switch (-continue) to $0 to continue."
exit 101
else
CFG_EVENTFD=no
fi
fi
fi
# find if the platform provides if_nametoindex (ipv6 interface name support)
if [ "$CFG_IPV6IFNAME" != "no" ]; then
if compileTest unix/ipv6ifname "IPv6 interface name"; then
@ -5170,7 +5482,7 @@ if [ "$CFG_OPENSSL" != "no" ]; then
CFG_OPENSSL=yes
fi
else
if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ] && [ "$XPLATFORM_ANDROID" = "no" ]; then
echo "OpenSSL support cannot be enabled due to functionality tests!"
echo " Turn on verbose messaging (-v) to $0 to see the final report."
echo " If you believe this message is in error you may use the continue"
@ -5418,6 +5730,9 @@ fi
if [ "$CFG_INOTIFY" = "yes" ]; then
QT_CONFIG="$QT_CONFIG inotify"
fi
if [ "$CFG_EVENTFD" = "yes" ]; then
QT_CONFIG="$QT_CONFIG eventfd"
fi
if [ "$CFG_LIBJPEG" = "no" ]; then
CFG_JPEG="no"
elif [ "$CFG_LIBJPEG" = "system" ]; then
@ -5739,6 +6054,19 @@ if [ "$CFG_QML_DEBUG" = "no" ]; then
fi
case "$QMAKE_CONF_COMPILER" in
*clang++*)
# Clang
COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -v 2>&1 | sed -n '
/^Apple clang version /{s///; s/^\([0-9]*\)\.\([0-9]*\).*$/QT_APPLE_CLANG_MAJOR_VERSION=\1; QT_APPLE_CLANG_MINOR_VERSION=\2/;p;q;}
/^clang version /{s///; s/^\([0-9]*\)\.\([0-9]*\).*$/QT_CLANG_MAJOR_VERSION=\1; QT_CLANG_MINOR_VERSION=\2/;p;q;}'`
eval "$COMPILER_VERSION"
;;
*icpc)
# Intel CC
COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -v 2>&1 | sed -n '
s/icpc version \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\) .*$/QT_ICC_MAJOR_VERSION=\1; QT_ICC_MINOR_VERSION=\2; QT_ICC_PATCH_VERSION=\3/p'`
eval "$COMPILER_VERSION"
;;
*g++*)
# GNU C++
COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
@ -5894,6 +6222,7 @@ QMakeVar set sql-plugins "$SQL_PLUGINS"
[ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
[ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
[ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
[ "$CFG_EVENTFD" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EVENTFD"
[ "$CFG_NIS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NIS"
[ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL QT_NO_SSL"
[ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
@ -6023,6 +6352,11 @@ else
fi
if [ "$CFG_DEV" = "yes" ]; then
QT_CONFIG="$QT_CONFIG private_tests"
if [ "$CFG_WERROR" != "no" ]; then
QMAKE_CONFIG="$QMAKE_CONFIG warnings_are_errors"
fi
elif [ "$CFG_WERROR" = "yes" ]; then
QMAKE_CONFIG="$QMAKE_CONFIG warnings_are_errors"
fi
cat >>"$QTCONFIG.tmp" <<EOF
@ -6078,6 +6412,19 @@ if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp"
echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp"
fi
if [ -n "$QT_ICC_MAJOR_VERSION" ]; then
echo "QT_ICC_MAJOR_VERSION = $QT_ICC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
echo "QT_ICC_MINOR_VERSION = $QT_ICC_MINOR_VERSION" >> "$QTCONFIG.tmp"
echo "QT_ICC_PATCH_VERSION = $QT_ICC_PATCH_VERSION" >> "$QTCONFIG.tmp"
fi
if [ -n "$QT_CLANG_MAJOR_VERSION" ]; then
echo "QT_CLANG_MAJOR_VERSION = $QT_CLANG_MAJOR_VERSION" >> "$QTCONFIG.tmp"
echo "QT_CLANG_MINOR_VERSION = $QT_CLANG_MINOR_VERSION" >> "$QTCONFIG.tmp"
fi
if [ -n "$QT_APPLE_CLANG_MAJOR_VERSION" ]; then
echo "QT_APPLE_CLANG_MAJOR_VERSION = $QT_APPLE_CLANG_MAJOR_VERSION" >> "$QTCONFIG.tmp"
echo "QT_APPLE_CLANG_MINOR_VERSION = $QT_APPLE_CLANG_MINOR_VERSION" >> "$QTCONFIG.tmp"
fi
if [ -n "$QMAKE_INCDIR_OPENGL_ES2" ]; then
echo "#Qt opengl include path" >> "$QTCONFIG.tmp"
@ -6300,7 +6647,7 @@ echo "Xi support ............. $CFG_XINPUT"
echo "Xi2 support ............ $CFG_XINPUT2"
echo "MIT-SHM support ........ $CFG_MITSHM"
echo "FontConfig support ..... $CFG_FONTCONFIG"
echo "XKB Support ............ $CFG_XKB"
echo "XKB support ............ $CFG_XKB"
echo "GTK theme support ...... $CFG_QGTKSTYLE"
if [ "$XPLATFORM_MINGW" = "yes" ] ; then

129
dist/changes-5.1.0 vendored Normal file
View File

@ -0,0 +1,129 @@
Qt 5.1 introduces many new features and improvements as well as bugfixes
over the 5.0.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.1
The Qt version 5.1 series is binary compatible with the 5.0.x series.
Applications compiled for 5.0 will continue to run with 5.1.
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.
****************************************************************************
* General *
****************************************************************************
General Improvements
--------------------
- Q_PROPERTY gained a MEMBER attribute that let you associate a property to a
class member without requiring to explicitly writing a getter or a setter
Third party components
----------------------
-
****************************************************************************
* Important Behavior Changes *
****************************************************************************
- QtWidgets
* [QTBUG-8836] QAbstractItemView now allows manual deselect in
SingleSelection mode (with control modifier)
****************************************************************************
* Library *
****************************************************************************
QtCore
------
- QRect:
* Added marginsAdded(), marginsRemoved() and operators +, -, +=, -=
taking a QMargins object allowing for conveniently adding or removing
margins.
- QMargins:
* Added operators for adding and subtracting QMargins objects,
multiplication and division for int/qreal and unary minus.
- QMessageAuthenticationCode
* New class for hash-based message authentication code added to QtCore.
- QRegularExpression
* It's now possible to know the names of the named capturing groups
inside the pattern string, as well as the numerical index of each
named capturing group.
- QPointer
* It is now possible to create a QPointer with a const templated type.
-
QtGui
-----
- QOffscreenSurface
* New class for rendering graphics using OpenGL in an arbitrary thread
without needing to use a hidden QWindow.
QtNetwork
---------
-
QtWidgets
---------
- QGraphicsView:
* Added function rubberBandRect() and signal rubberBandChanged.
****************************************************************************
* Database Drivers *
****************************************************************************
****************************************************************************
* Platform Specific Changes *
****************************************************************************
Qt for Linux/X11
----------------
-
Qt for Windows
--------------
-
Qt for Mac OS X
---------------
-
Qt for Embedded Linux
---------------------
Qt for Windows CE
-----------------
****************************************************************************
* Compiler Specific Changes *
****************************************************************************
****************************************************************************
* Plugins *
****************************************************************************

View File

@ -75,12 +75,10 @@ Cpp.ignoretokens += \
QM_EXPORT_XML \
QT_ASCII_CAST_WARN \
QT_ASCII_CAST_WARN_CONSTRUCTOR \
QT_BEGIN_HEADER \
QT_BEGIN_INCLUDE_NAMESPACE \
QT_BEGIN_NAMESPACE \
QT_BOOTSTRAPPED \
QT_DESIGNER_STATIC \
QT_END_HEADER \
QT_END_INCLUDE_NAMESPACE \
QT_END_NAMESPACE \
QT_FASTCALL \

View File

@ -66,6 +66,11 @@ color: #44a51c;
text-align:left;
}
/*
-----------
offline viewing: HTML links display an icon
-----------
*/
a[href*="http://"], a[href*="ftp://"],a[href*="https://"]
{
text-decoration: none;
@ -127,7 +132,6 @@ Top navigation
.qtref{
display: block;
position: relative;
top: -76px;
height:15px;
z-index: 1;
font-size:11px;
@ -136,10 +140,11 @@ float:right;
}
.naviNextPrevious{
clear: both;
display: block;
position: relative;
text-align: right;
top: -53px;
top: -47px;
float:right;
height:20px;
z-index:1;
@ -167,6 +172,14 @@ padding-right:20px;
height:20px;
margin-left:30px;
}
/*
-----------
footer and license
-----------
*/
.footer{
text-align:center
}
/* table of content
no display
@ -390,10 +403,15 @@ text-align: left;
.cpp{
display: block;
margin: 10;
overflow: hidden;
overflow-x: hidden;
overflow-y: hidden;
margin: 10px;
overflow: auto;
padding: 20px 20px 20px 20px;
}
.js{
display: block;
margin: 10px;
overflow: auto;
padding: 20px 20px 20px 20px;
}
@ -424,9 +442,7 @@ padding: 3px 15px 3px 0;
.qml{
display: block;
margin: 10;
overflow: hidden;
overflow-x: hidden;
overflow-y: hidden;
overflow: auto;
padding: 20px 20px 20px 20px;
}
@ -459,6 +475,7 @@ Content table
@media print{
.toc {
float: right;
clear: right;
padding-bottom: 10px;
padding-top: 50px;
width: 100%;
@ -470,8 +487,8 @@ background-repeat:no-repeat;
@media screen{
.toc{
clear:both;
float:right;
clear: right;
vertical-align:top;
-moz-border-radius: 7px 7px 7px 7px;
-webkit-border-radius: 7px 7px 7px 7px;
@ -485,11 +502,7 @@ padding-bottom:10px;
height: auto;
width: 200px;
text-align:left;
z-index:2;
margin-left:20px;
margin-right:20px;
margin-top:0px;
padding-top:0px;
}
}

View File

@ -127,7 +127,6 @@ margin-left: 20px;
text-align:left
}
.nav-main-content{
font-weight:bold;
margin-right: 20px;
display:inline-block;
}
@ -156,9 +155,7 @@ left: 30px;
}
.qtref{
display: block;
position: relative;
top: -76px;
height:15px;
z-index: 1;
font-size:11px;
padding-right:10px;
@ -171,7 +168,7 @@ text-align: right;
float:right;
z-index:1;
padding-right:10px;
vertical-align:top;
padding-top:4px;
}
@ -196,16 +193,12 @@ margin-left:30px;
.breadcrumb{
display: block;
position: relative;
top:-20px;
/*border-top:2px solid #ffffff;*/
border-bottom: 1px solid #cecece;
background-color:#F2F2F2;
z-index:1;
height:20px;
padding:0px;
margin:0px;
padding-left:10px;
padding-top:2px;
padding-top:12px;
margin-left:-5px;
margin-right:-5px;
}
@ -216,7 +209,6 @@ margin-right:-5px;
}
.breadcrumb ul li{
background-color:#F2F2F2;
list-style-type:none;
padding:0;
margin:0;
@ -236,7 +228,6 @@ padding-left:20px;
.breadcrumb li a{
color:#2C418D;
display:block;
text-decoration:none;
background:url(../images/arrow.png);
@ -506,10 +497,15 @@ text-align: left;
.cpp{
display: block;
margin: 10;
overflow: hidden;
overflow-x: hidden;
overflow-y: hidden;
margin: 10px;
overflow: auto;
padding: 20px 20px 20px 20px;
}
.js{
display: block;
margin: 10px;
overflow: auto;
padding: 20px 20px 20px 20px;
}
@ -539,10 +535,8 @@ padding: 3px 15px 3px 0;
.qml{
display: block;
margin: 10;
overflow: hidden;
overflow-x: hidden;
overflow-y: hidden;
margin: 10px;
overflow: auto;
padding: 20px 20px 20px 20px;
}
@ -576,6 +570,7 @@ Content table
@media print{
.toc {
float: right;
clear: right;
padding-bottom: 10px;
padding-top: 50px;
width: 100%;
@ -588,6 +583,9 @@ background-repeat:no-repeat;
@media screen{
.toc{
clear: both;
clear: right;
position: relative;
top: 83px;
float:right;
vertical-align:top;
-moz-border-radius: 7px 7px 7px 7px;
@ -602,11 +600,7 @@ padding-bottom:10px;
height: auto;
width: 200px;
text-align:left;
z-index:2;
margin-left:20px;
margin-right:20px;
margin-top:0px;
padding-top:0px;
}
}

View File

@ -3,4 +3,4 @@ requires(qtHaveModule(widgets))
TEMPLATE = subdirs
# no QSharedMemory
!vxworks:!qnx:SUBDIRS = sharedmemory
!wince*: SUBDIRS += localfortuneserver localfortuneclient
!wince*:qtHaveModule(network): SUBDIRS += localfortuneserver localfortuneclient

View File

@ -1,3 +1,5 @@
requires(qtHaveModule(network))
TEMPLATE = subdirs
SUBDIRS = \
dnslookup \

View File

@ -56,7 +56,7 @@ PaintedWindow::PaintedWindow()
format.setSamples(4);
setSurfaceType(QWindow::OpenGLSurface);
setFlags(Qt::Window | Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint);
setFlags(Qt::Window | Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint);
setFormat(format);
create();

View File

@ -143,4 +143,3 @@ void Images::finished()
}
#endif // QT_NO_CONCURRENT

View File

@ -154,7 +154,7 @@ void ScribbleArea::resizeImage(QImage *image, const QSize &newSize)
//! [21]
void ScribbleArea::print()
{
#ifndef QT_NO_PRINTER
#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
QPrinter printer(QPrinter::HighResolution);
QPrintDialog printDialog(&printer, this);

View File

@ -68,7 +68,7 @@ class KeyStopTransition : public QKeyEventTransition
{
public:
KeyStopTransition(Boat *b, QEvent::Type t, int k)
: QKeyEventTransition(b, t, k), boat(b), key(k)
: QKeyEventTransition(b, t, k), boat(b)
{
}
protected:
@ -80,7 +80,6 @@ protected:
}
private:
Boat * boat;
int key;
};
//These transtion test if we have to move the boat (i.e current speed was 0 or another value)

View File

@ -50,8 +50,6 @@
# include "qabstractanimation.h"
#endif
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
@ -86,6 +84,4 @@ private:
QT_END_NAMESPACE
QT_END_HEADER
#endif // QANIMATIONSTATE_H

View File

@ -123,7 +123,7 @@ void PlayState::onEntry(QEvent *)
levelState->addTransition(winTransition);
//This state is an animation when the score changed
UpdateScoreState *scoreState = new UpdateScoreState(this, levelState);
UpdateScoreState *scoreState = new UpdateScoreState(levelState);
//This transition update the score when a submarine die
UpdateScoreTransition *scoreTransition = new UpdateScoreTransition(scene, this, levelState);
@ -275,7 +275,7 @@ void WinState::onExit(QEvent *)
}
/** UpdateScore State */
UpdateScoreState::UpdateScoreState(PlayState *g, QState *parent) : QState(parent), game(g)
UpdateScoreState::UpdateScoreState(QState *parent) : QState(parent)
{
}

View File

@ -70,7 +70,6 @@ private :
QStateMachine *machine;
int currentLevel;
int score;
QState *parallelChild;
friend class UpdateScoreState;
friend class UpdateScoreTransition;
@ -103,7 +102,6 @@ protected:
void onExit(QEvent *);
private :
GraphicsScene *scene;
Boat *boat;
};
class LostState : public QState
@ -135,10 +133,8 @@ private :
class UpdateScoreState : public QState
{
public:
UpdateScoreState(PlayState *game, QState *parent);
UpdateScoreState(QState *parent);
private:
QPropertyAnimation *scoreAnimation;
PlayState *game;
};
//These transtion is used to update the score
@ -174,7 +170,6 @@ protected:
virtual bool eventTest(QEvent *event);
private:
PlayState *game;
int key;
};
#endif // STATES_H

View File

@ -9,5 +9,6 @@ SUBDIRS = classwizard \
extension \
findfiles
!qtHaveModule(printsupport): SUBDIRS -= licensewizard
contains(DEFINES, QT_NO_WIZARD): SUBDIRS -= trivialwizard licensewizard classwizard
wince*: SUBDIRS += sipdialog

View File

@ -352,7 +352,7 @@ void ConclusionPage::setVisible(bool visible)
void ConclusionPage::printButtonClicked()
{
#ifndef QT_NO_PRINTER
#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
QPrinter printer;
QPrintDialog dialog(&printer, this);
if (dialog.exec())

View File

@ -32,7 +32,9 @@
\brief The Internationalization (I18N) example demonstrates Qt's support for translated
text. Developers can write the initial application text in one language, and
translations can be provided later without any modifications to the code.
translations can be provided later without any modifications to the code. It also
demonstrates how to detect the system language settings and show the UI in the appropriate
language.
\image i18n-example.png
*/

View File

@ -252,7 +252,7 @@ void View::toggleAntialiasing()
void View::print()
{
#ifndef QT_NO_PRINTER
#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
QPrinter printer;
QPrintDialog dialog(&printer, this);
if (dialog.exec() == QDialog::Accepted) {

View File

@ -154,7 +154,7 @@ void MainWindow::openImage(const QString &fileName)
void MainWindow::printImage()
{
#ifndef QT_NO_PRINTER
#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"),

View File

@ -627,7 +627,7 @@ QString encode_pos(int row, int col)
void SpreadSheet::print()
{
#ifndef QT_NO_PRINTER
#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
QPrinter printer(QPrinter::ScreenResolution);
QPrintPreviewDialog dlg(&printer);
PrintView view;

View File

@ -241,7 +241,7 @@ QMap<QString, StyleItems> MainWindow::currentPageMap()
return pageMap;
}
#ifndef QT_NO_PRINTER
#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
void MainWindow::on_printAction_triggered()
{
pageMap = currentPageMap();

View File

@ -62,12 +62,12 @@ public:
public slots:
void on_clearAction_triggered();
void on_markAction_triggered();
#ifndef QT_NO_PRINTER
#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
void on_printAction_triggered();
void on_printPreviewAction_triggered();
#endif
void on_unmarkAction_triggered();
#ifndef QT_NO_PRINTER
#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
void printDocument(QPrinter *printer);
void printPage(int index, QPainter *painter, QPrinter *printer);
#endif

View File

@ -1,6 +1,6 @@
INCLUDEPATH += $$PWD
qtHaveModule(opengl) {
qtHaveModule(opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2) {
DEFINES += QT_OPENGL_SUPPORT
QT += opengl widgets
}

View File

@ -235,7 +235,7 @@ void MainWindow::openDialog()
//! [17]
void MainWindow::printFile()
{
#ifndef QT_NO_PRINTER
#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
QTextEdit *editor = static_cast<QTextEdit*>(letters->currentWidget());
//! [18]
QPrinter printer;

View File

@ -511,7 +511,7 @@ bool TextEdit::fileSaveAs()
void TextEdit::filePrint()
{
#ifndef QT_NO_PRINTER
#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
QPrinter printer(QPrinter::HighResolution);
QPrintDialog *dlg = new QPrintDialog(&printer, this);
if (textEdit->textCursor().hasSelection())
@ -525,7 +525,7 @@ void TextEdit::filePrint()
void TextEdit::filePrintPreview()
{
#ifndef QT_NO_PRINTER
#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
QPrinter printer(QPrinter::HighResolution);
QPrintPreviewDialog preview(&printer, this);
connect(&preview, SIGNAL(paintRequested(QPrinter*)), SLOT(printPreview(QPrinter*)));

View File

@ -204,7 +204,7 @@ public:
Q_UNUSED(option);
Q_UNUSED(widget);
painter->setPen(QPen(QColor(100, 100, 100), 3.0));
painter->drawRect(QRect(1.5, 1.5, m_size.width() - 3, m_size.height() - 3));
painter->drawRect(QRectF(1.5, 1.5, m_size.width() - 3, m_size.height() - 3));
}
QSizeF m_size;

View File

@ -49,7 +49,7 @@ extern void qt_mac_set_menubar_merge(bool merge);
QT_END_NAMESPACE
#endif
LanguageChooser::LanguageChooser(QWidget *parent)
LanguageChooser::LanguageChooser(const QString& defaultLang, QWidget *parent)
: QDialog(parent, Qt::WindowStaysOnTopHint)
{
groupBox = new QGroupBox("Languages");
@ -61,6 +61,8 @@ LanguageChooser::LanguageChooser(QWidget *parent)
QCheckBox *checkBox = new QCheckBox(languageName(qmFiles[i]));
qmFileForCheckBoxMap.insert(checkBox, qmFiles[i]);
connect(checkBox, SIGNAL(toggled(bool)), this, SLOT(checkBoxToggled()));
if (languageMatch(defaultLang, qmFiles[i]))
checkBox->setCheckState(Qt::Checked);
groupBoxLayout->addWidget(checkBox, i / 2, i % 2);
}
groupBox->setLayout(groupBoxLayout);
@ -87,6 +89,14 @@ LanguageChooser::LanguageChooser(QWidget *parent)
setWindowTitle("I18N");
}
bool LanguageChooser::languageMatch(const QString& lang, const QString& qmFile)
{
//qmFile: i18n_xx.qm
const QString prefix = "i18n_";
const int langTokenLength = 2; /*FIXME: is checking two chars enough?*/
return qmFile.midRef(qmFile.indexOf(prefix) + prefix.length(), langTokenLength) == lang.leftRef(langTokenLength);
}
bool LanguageChooser::eventFilter(QObject *object, QEvent *event)
{
if (event->type() == QEvent::Close) {

View File

@ -58,7 +58,7 @@ class LanguageChooser : public QDialog
Q_OBJECT
public:
LanguageChooser(QWidget *parent = 0);
explicit LanguageChooser(const QString& defaultLang = QString(), QWidget *parent = 0);
protected:
bool eventFilter(QObject *object, QEvent *event);
@ -73,6 +73,7 @@ private:
QStringList findQmFiles();
QString languageName(const QString &qmFile);
QColor colorForLanguage(const QString &language);
static bool languageMatch(const QString& lang, const QString& qmFile);
QGroupBox *groupBox;
QDialogButtonBox *buttonBox;

View File

@ -39,7 +39,7 @@
****************************************************************************/
#include <QApplication>
#include <QLocale>
#include "languagechooser.h"
#include "mainwindow.h"
@ -48,7 +48,7 @@ int main(int argc, char *argv[])
Q_INIT_RESOURCE(i18n);
QApplication app(argc, argv);
LanguageChooser chooser;
LanguageChooser chooser(QLocale::system().name());
chooser.show();
return app.exec();
}

View File

@ -19,7 +19,8 @@ SUBDIRS = \
statemachine \
tools \
tutorials \
widgets
widgets \
windowcontainer
contains(DEFINES, QT_NO_CURSOR): SUBDIRS -= mainwindows
contains(DEFINES, QT_NO_DRAGANDDROP): SUBDIRS -= draganddrop

View File

@ -99,7 +99,7 @@ void ImageViewer::print()
//! [5] //! [6]
{
Q_ASSERT(imageLabel->pixmap());
#ifndef QT_NO_PRINTER
#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
//! [6] //! [7]
QPrintDialog dialog(&printer, this);
//! [7] //! [8]

View File

@ -55,6 +55,7 @@ Window::Window()
echoComboBox->addItem(tr("No Echo"));
echoLineEdit = new QLineEdit;
echoLineEdit->setPlaceholderText("Placeholder Text");
echoLineEdit->setFocus();
//! [0]
@ -68,6 +69,7 @@ Window::Window()
validatorComboBox->addItem(tr("Double validator"));
validatorLineEdit = new QLineEdit;
validatorLineEdit->setPlaceholderText("Placeholder Text");
//! [1]
//! [2]
@ -80,6 +82,7 @@ Window::Window()
alignmentComboBox->addItem(tr("Right"));
alignmentLineEdit = new QLineEdit;
alignmentLineEdit->setPlaceholderText("Placeholder Text");
//! [2]
//! [3]
@ -93,6 +96,7 @@ Window::Window()
inputMaskComboBox->addItem(tr("License key"));
inputMaskLineEdit = new QLineEdit;
inputMaskLineEdit->setPlaceholderText("Placeholder Text");
//! [3]
//! [4]
@ -104,6 +108,7 @@ Window::Window()
accessComboBox->addItem(tr("True"));
accessLineEdit = new QLineEdit;
accessLineEdit->setPlaceholderText("Placeholder Text");
//! [4]
//! [5]

View File

@ -200,7 +200,7 @@ void ScribbleArea::resizeImage(QImage *image, const QSize &newSize)
//! [21]
void ScribbleArea::print()
{
#ifndef QT_NO_PRINTER
#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
QPrinter printer(QPrinter::HighResolution);
QPrintDialog printDialog(&printer, this);

View File

@ -0,0 +1,170 @@
/****************************************************************************
**
** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
** of its contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "openglwindow.h"
#include <QPainter>
#include <QMouseEvent>
#include <QKeyEvent>
#include <QFocusEvent>
#include <QApplication>
#include <QWidget>
#include <QHBoxLayout>
#include <QLineEdit>
// Making use of the class from the opengl example in gui.
class Window : public OpenGLWindow
{
Q_OBJECT
public:
Window()
: m_mouseDown(false)
, m_focus(false)
{
}
void render(QPainter *p) {
QLinearGradient g(0, 0, 0, height());
g.setColorAt(0, QColor("lightsteelblue"));
g.setColorAt(1, Qt::black);
p->fillRect(0, 0, width(), height(), g);
p->setPen(Qt::white);
p->drawText(20, 30, QLatin1String("This is an OpenGL based QWindow"));
if (m_key.trimmed().length() > 0) {
QRect bounds = p->boundingRect(QRect(0, 0, width(), height()), Qt::AlignTop | Qt::AlignLeft, m_key);
p->save();
p->translate(width() / 2.0, height() / 2.0);
p->scale(10, 10);
p->translate(-bounds.width() / 2.0, -bounds.height() / 2.0);
p->drawText(bounds, Qt::AlignCenter, m_key);
p->restore();
}
if (m_focus) {
p->drawText(20, height() - 20, QLatin1String("Window has focus!"));
}
p->setRenderHint(QPainter::Antialiasing);
p->drawPolyline(m_polygon);
}
void mousePressEvent(QMouseEvent *e) {
m_mouseDown = true;
m_polygon.clear();
m_polygon.append(e->pos());
renderLater();
}
void mouseMoveEvent(QMouseEvent *e) {
if (m_mouseDown) {
m_polygon.append(e->pos());
renderLater();
}
}
void mouseReleaseEvent(QMouseEvent *e) {
m_mouseDown = false;
m_polygon.append(e->pos());
renderLater();
}
void focusInEvent(QFocusEvent *) {
m_focus = true;
renderLater();
}
void focusOutEvent(QFocusEvent *) {
m_focus = false;
m_polygon.clear();
renderLater();
}
void keyPressEvent(QKeyEvent *e) {
m_key = e->text();
renderLater();
}
void keyReleaseEvent(QKeyEvent *) {
m_key = QString();
renderLater();
}
private:
QPolygon m_polygon;
bool m_mouseDown;
bool m_focus;
QString m_key;
};
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QWidget *widget = new QWidget;
QHBoxLayout *layout = new QHBoxLayout(widget);
Window *window = new Window();
QWidget *container = QWidget::createWindowContainer(window);
container->setMinimumSize(300, 300);
container->setMaximumSize(600, 600);
container->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
container->setFocusPolicy(Qt::StrongFocus);
window->setGeometry(100, 100, 300, 200);
layout->addWidget(new QLineEdit(QLatin1String("A QLineEdit")));
layout->addWidget(container);
layout->addWidget(new QLineEdit(QLatin1String("A QLabel")));
widget->show();
return app.exec();
}
#include "windowcontainer.moc"

View File

@ -0,0 +1,9 @@
SOURCES = windowcontainer.cpp
QT += widgets
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/windowcontainer
INSTALLS += target
include(../../gui/openglwindow/openglwindow.pri)

View File

@ -4,7 +4,9 @@ SUBDIRS = htmlinfo \
qtHaveModule(widgets) {
SUBDIRS += dombookmarks \
rsslisting \
saxbookmarks \
streambookmarks
qtHaveModule(network): SUBDIRS += \
rsslisting
}

View File

@ -60,7 +60,6 @@ QMAKE_LIBS =
QMAKE_LIBS_DYNLOAD = -ldl
QMAKE_LIBS_X11 = -lXext -lX11 -lm
QMAKE_LIBS_OPENGL = -lGL
QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_LIBS_THREAD = -lpthreads
QMAKE_AR = ar -X64 cq

View File

@ -60,7 +60,6 @@ QMAKE_LIBS =
QMAKE_LIBS_DYNLOAD = -ldl
QMAKE_LIBS_X11 = -lXext -lX11 -lm
QMAKE_LIBS_OPENGL = -lGL
QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_LIBS_THREAD = -lpthreads
QMAKE_AR = ar cqs

View File

@ -59,7 +59,6 @@ QMAKE_LIBS =
QMAKE_LIBS_DYNLOAD = -ldl
QMAKE_LIBS_X11 = -lXext -lX11 -lm
QMAKE_LIBS_OPENGL = -lGL
QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_LIBS_THREAD = -lpthreads
QMAKE_AR = ar -X64 cq

View File

@ -60,7 +60,6 @@ QMAKE_LIBS =
QMAKE_LIBS_DYNLOAD = -ldl
QMAKE_LIBS_X11 = -lXext -lX11 -lm
QMAKE_LIBS_OPENGL = -lGL
QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_LIBS_THREAD = -lpthreads
QMAKE_AR = ar cq

View File

@ -0,0 +1,178 @@
# qmake configuration for building with android-g++
MAKEFILE_GENERATOR = UNIX
QMAKE_PLATFORM = android
QMAKE_COMPILER = gcc
CONFIG += android_install
DEFINES += QT_NO_PRINTDIALOG
include(../qdevice.pri)
include(../common/linux.conf)
include(../common/gcc-base-unix.conf)
# Passing in -win32 to qmake (from NQTC) causes this condition to pass, however
# qmake complains that -win32 is deprecated; should find another way, Q_OS_WIN
# should really be all QMAKE_HOST.os needs to depend on?
contains(QMAKE_HOST.os,Windows) {
# Not having sh.exe in your path causes this condition to pass
# To build Android Qt on Windows, this block must not be evaluated.
isEmpty(QMAKE_SH) {
include(../common/shell-win32.conf)
QMAKE_DEL_TREE = rmdir /s /q
QMAKE_INSTALL_FILE = copy /y
QMAKE_INSTALL_PROGRAM = copy /y
}
}
NDK_ROOT = $$(ANDROID_NDK_ROOT)
!exists($$NDK_ROOT) {
NDK_ROOT = $$DEFAULT_ANDROID_NDK_ROOT
!exists($$NDK_ROOT): error("You need to set the ANDROID_NDK_ROOT environment variable to point to your Android NDK.")
}
NDK_HOST = $$(ANDROID_NDK_HOST)
isEmpty(NDK_HOST): NDK_HOST = $$DEFAULT_ANDROID_NDK_HOST
ANDROID_PLATFORM = $$(ANDROID_NDK_PLATFORM)
isEmpty(ANDROID_PLATFORM): ANDROID_PLATFORM = $$DEFAULT_ANDROID_PLATFORM
ANDROID_TARGET_ARCH = $$(ANDROID_TARGET_ARCH)
isEmpty(ANDROID_TARGET_ARCH): ANDROID_TARGET_ARCH = $$DEFAULT_ANDROID_TARGET_ARCH
NDK_TOOLCHAIN_PREFIX = $$(ANDROID_NDK_TOOLCHAIN_PREFIX)
isEmpty(NDK_TOOLCHAIN_PREFIX) {
equals(ANDROID_TARGET_ARCH, x86): NDK_TOOLCHAIN_PREFIX = x86
else: equals(ANDROID_TARGET_ARCH, mips): NDK_TOOLCHAIN_PREFIX = mipsel-linux-android
else: NDK_TOOLCHAIN_PREFIX = arm-linux-androideabi
}
NDK_TOOLS_PREFIX = $$(ANDROID_NDK_TOOLS_PREFIX)
isEmpty(NDK_TOOLS_PREFIX) {
equals(ANDROID_TARGET_ARCH, x86): NDK_TOOLS_PREFIX = i686-linux-android
else: equals(ANDROID_TARGET_ARCH, mips): NDK_TOOLS_PREFIX = mipsel-linux-android
else: NDK_TOOLS_PREFIX = arm-linux-androideabi
}
NDK_TOOLCHAIN_VERSION = $$(ANDROID_NDK_TOOLCHAIN_VERSION)
isEmpty(NDK_TOOLCHAIN_VERSION): NDK_TOOLCHAIN_VERSION = $$DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION
equals(ANDROID_TARGET_ARCH, x86): ANDROID_ARCHITECTURE = x86
else: equals(ANDROID_TARGET_ARCH, mips): ANDROID_ARCHITECTURE = mips
else: ANDROID_ARCHITECTURE = arm
!equals(NDK_TOOLCHAIN_VERSION, 4.4.3): ANDROID_CXXSTL_SUFFIX = -$$NDK_TOOLCHAIN_VERSION
NDK_TOOLCHAIN = $$NDK_TOOLCHAIN_PREFIX-$$NDK_TOOLCHAIN_VERSION
NDK_TOOLCHAIN_PATH = $$NDK_ROOT/toolchains/$$NDK_TOOLCHAIN/prebuilt/$$NDK_HOST
CONFIG += $$ANDROID_PLATFORM
ANDROID_PLATFORM_ROOT_PATH = $$NDK_ROOT/platforms/$$ANDROID_PLATFORM/arch-$$ANDROID_ARCHITECTURE/
ANDROID_PLATFORM_PATH = $$ANDROID_PLATFORM_ROOT_PATH/usr
# used to compile platform plugins for android-4 and android-5
QMAKE_ANDROID_PLATFORM_INCDIR = $$NDK_ROOT/platforms/$$ANDROID_PLATFORM/arch-$$ANDROID_ARCHITECTURE/usr/include
QMAKE_ANDROID_PLATFORM_LIBDIR = $$NDK_ROOT/platforms/$$ANDROID_PLATFORM/arch-$$ANDROID_ARCHITECTURE/usr/lib
ANDROID_SOURCES_CXX_STL_LIBDIR = $$NDK_ROOT/sources/cxx-stl/gnu-libstdc++/$$NDK_TOOLCHAIN_VERSION/libs/$$ANDROID_TARGET_ARCH
ANDROID_SOURCES_CXX_STL_INCDIR = $$NDK_ROOT/sources/cxx-stl/gnu-libstdc++/$$NDK_TOOLCHAIN_VERSION/include $$ANDROID_SOURCES_CXX_STL_LIBDIR/include
# modifications to g++.conf
QMAKE_CC = $$NDK_TOOLCHAIN_PATH/bin/$$NDK_TOOLS_PREFIX-gcc
equals(ANDROID_TARGET_ARCH, armeabi-v7a): \
QMAKE_CFLAGS = -Wno-psabi -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -DANDROID -Wa,--noexecstack
else: equals(ANDROID_TARGET_ARCH, armeabi): \
QMAKE_CFLAGS = -Wno-psabi -march=armv5te -mtune=xscale -msoft-float -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -DANDROID -Wa,--noexecstack
else: equals(ANDROID_TARGET_ARCH, x86): \
QMAKE_CFLAGS = -ffunction-sections -funwind-tables -O2 -fomit-frame-pointer -fstrict-aliasing -funswitch-loops -finline-limit=300 -DANDROID -Wa,--noexecstack
else: equals(ANDROID_TARGET_ARCH, mips): \
QMAKE_CFLAGS = -fno-strict-aliasing -finline-functions -ffunction-sections -funwind-tables -fmessage-length=0 -fno-inline-functions-called-once -fgcse-after-reload -frerun-cse-after-loop -frename-registers -O2 -fomit-frame-pointer -funswitch-loops -finline-limit=300 -DANDROID -Wa,--noexecstack
QMAKE_CFLAGS_WARN_ON = -Wall -Wno-psabi -W
QMAKE_CFLAGS_WARN_OFF = -Wno-psabi
equals(ANDROID_TARGET_ARCH, x86) {
QMAKE_CFLAGS_RELEASE = -O2
QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO = -g -O2
QMAKE_CFLAGS_DEBUG = -g
} else: equals(ANDROID_TARGET_ARCH, mips) {
QMAKE_CFLAGS_RELEASE = -O2
QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO = -g -O2
QMAKE_CFLAGS_DEBUG = -g -fno-omit-frame-pointer
} else { # arm
QMAKE_CFLAGS_RELEASE = -mthumb -Os -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64
QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO = -g -mthumb -Os -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64
QMAKE_CFLAGS_DEBUG = -g -marm -O0 -fno-omit-frame-pointer
}
QMAKE_CFLAGS_SHLIB = -fPIC
QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
QMAKE_CFLAGS_THREAD = -D_REENTRANT
QMAKE_CFLAGS_HIDESYMS = -fvisibility=hidden
QMAKE_CXX = $$NDK_TOOLCHAIN_PATH/bin/$$NDK_TOOLS_PREFIX-g++
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -std=gnu++0x
QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE
QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO
QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG
QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
QMAKE_CXXFLAGS_HIDESYMS = $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden
QMAKE_LINK = $$QMAKE_CXX
QMAKE_LINK_SHLIB = $$QMAKE_LINK
# modifications to linux.conf
QMAKE_AR = $$NDK_TOOLCHAIN_PATH/bin/$$NDK_TOOLS_PREFIX-ar cqs
QMAKE_OBJCOPY = $$NDK_TOOLCHAIN_PATH/bin/$$NDK_TOOLS_PREFIX-objcopy
QMAKE_STRIP =
#$$NDK_TOOLCHAIN_PATH/bin/$$NDK_TOOLS_PREFIX-strip
QMAKE_RANLIB = $$NDK_TOOLCHAIN_PATH/bin/$$NDK_TOOLS_PREFIX-ranlib
QMAKE_INCDIR = $$ANDROID_SOURCES_CXX_STL_INCDIR $$ANDROID_PLATFORM_PATH/include
QMAKE_LIBDIR = $$ANDROID_SOURCES_CXX_STL_LIBDIR $$ANDROID_PLATFORM_PATH/lib $$LIBGCC_PATH
QMAKE_INCDIR_X11 =
QMAKE_LIBDIR_X11 =
QMAKE_INCDIR_OPENGL = $$ANDROID_PLATFORM_PATH/include
QMAKE_LIBDIR_OPENGL = $$ANDROID_PLATFORM_PATH/lib
equals(ANDROID_TARGET_ARCH, x86)|equals(ANDROID_TARGET_ARCH, mips): \
LIBGCC_PATH_FULL = $$system("$$QMAKE_CC -print-libgcc-file-name")
else: \
LIBGCC_PATH_FULL = $$system("$$QMAKE_CC -mthumb-interwork -print-libgcc-file-name")
LIBGCC_PATH = $$dirname(LIBGCC_PATH_FULL)
QMAKE_LINK = $$QMAKE_CXX
QMAKE_LINK_SHLIB = $$QMAKE_CXX
QMAKE_LFLAGS = --sysroot=$$ANDROID_PLATFORM_ROOT_PATH
QMAKE_RPATHLINK = $$ANDROID_PLATFORM_PATH/lib
QMAKE_LFLAGS_APP = -Wl,--no-undefined -Wl,-z,noexecstack -shared
QMAKE_LFLAGS_SHLIB = -Wl,--no-undefined -Wl,-z,noexecstack -shared
contains(NDK_ROOT, ".*r6")|contains(NDK_ROOT, ".*r5.*") {
!equals(ANDROID_PLATFORM, android-4):!equals(ANDROID_PLATFORM, android-5):!equals(ANDROID_PLATFORM, android-8) {
warning("Your NDK version is outdated. A workaround is enabled. Consider updating your NDK (workarounds are required until r6(a))")
QMAKE_LFLAGS_SHLIB += $$ANDROID_PLATFORM_PATH/lib/crtbegin_so.o $$ANDROID_PLATFORM_PATH/lib/crtend_so.o
}
}
QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
QMAKE_LFLAGS_SONAME =
QMAKE_LFLAGS_NOUNDEF = -Wl,--no-undefined
QMAKE_LFLAGS_RPATH = -Wl,-rpath=
QMAKE_LFLAGS_RPATHLINK = -Wl,-rpath-link=
QMAKE_LIBS = -lgnustl_shared -lsupc++ -llog -lz -lm -ldl -lc -lgcc
QMAKE_LIBS_X11 =
QMAKE_LIBS_THREAD =
QMAKE_LIBS_EGL = -lEGL
QMAKE_LIBS_OPENGL =
QMAKE_LIBS_OPENGL_ES1 = -lGLESv1_CM
QMAKE_LIBS_OPENGL_ES2 = -lGLESv2 $$QMAKE_LIBS
load(qt_config)

View File

@ -0,0 +1,187 @@
/****************************************************************************
**
** 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
#define QT_QPA_DEFAULT_PLATFORM_NAME "android"
// 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
#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 <dlfcn.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/ipc.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <sys/wait.h>
#ifndef QT_NO_IPV6IFNAME
#include <net/if.h>
#endif
#ifndef _GNU_SOURCE
# define _GNU_SOURCE
#endif
#ifdef QT_LARGEFILE_SUPPORT
#define QT_STATBUF struct stat64
#define QT_STATBUF4TSTAT struct stat64
#define QT_STAT ::stat64
#define QT_FSTAT ::fstat64
#define QT_LSTAT ::lstat64
#define QT_OPEN ::open64
#define QT_TRUNCATE ::truncate64
#define QT_FTRUNCATE ::ftruncate64
#define QT_LSEEK ::lseek64
#else
#define QT_STATBUF struct stat
#define QT_STATBUF4TSTAT struct stat
#define QT_STAT ::stat
#define QT_FSTAT ::fstat
#define QT_LSTAT ::lstat
#define QT_OPEN ::open
#define QT_TRUNCATE ::truncate
#define QT_FTRUNCATE ::ftruncate
#define QT_LSEEK ::lseek
#endif
#ifdef QT_LARGEFILE_SUPPORT
#define QT_FOPEN ::fopen64
#define QT_FSEEK ::fseeko64
#define QT_FTELL ::ftello64
#define QT_FGETPOS ::fgetpos64
#define QT_FSETPOS ::fsetpos64
#define QT_MMAP ::mmap64
#define QT_FPOS_T fpos64_t
#define QT_OFF_T off64_t
#else
#define QT_FOPEN ::fopen
#define QT_FSEEK ::fseek
#define QT_FTELL ::ftell
#define QT_FGETPOS ::fgetpos
#define QT_FSETPOS ::fsetpos
#define QT_MMAP ::mmap
#define QT_FPOS_T fpos_t
#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_CLOSE ::close
#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 O_LARGEFILE
#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
// Directory iteration
#define QT_DIR DIR
#define QT_OPENDIR ::opendir
#define QT_CLOSEDIR ::closedir
#if defined(QT_LARGEFILE_SUPPORT) \
&& defined(QT_USE_XOPEN_LFS_EXTENSIONS) \
&& !defined(QT_NO_READDIR64)
#define QT_DIRENT struct dirent64
#define QT_READDIR ::readdir64
#define QT_READDIR_R ::readdir64_r
#else
#define QT_DIRENT struct dirent
#define QT_READDIR ::readdir
#define QT_READDIR_R ::readdir_r
#endif
#define QT_SOCKET_CONNECT ::connect
#define QT_SOCKET_BIND ::bind
#define QT_SIGNAL_RETTYPE void
#define QT_SIGNAL_ARGS int
#define QT_SIGNAL_IGNORE SIG_IGN
#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

View File

@ -3,3 +3,5 @@ QMAKE_OBJCFLAGS_PRECOMPILE = -x objective-c-header -c ${QMAKE_PCH_INPUT} -
QMAKE_OBJCFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
QMAKE_OBJCXXFLAGS_PRECOMPILE = -x objective-c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
QMAKE_OBJCXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
QMAKE_XCODE_GCC_VERSION = com.apple.compilers.llvm.clang.1_0

View File

@ -1,33 +0,0 @@
#
# Base qmake configuration for GCC on iOS
#
# Before making changes to this file, please read the comment in
# gcc-base.conf, to make sure the change goes in the right place.
#
# To verify that your change has the desired effect on the final configuration
# you can use the manual test in tests/manual/mkspecs.
#
include(gcc-base.conf)
QMAKE_COMPILER_DEFINES += __APPLE__ __GNUC__=4
QMAKE_CFLAGS_DEBUG += -gdwarf-2
QMAKE_CXXFLAGS_DEBUG += -gdwarf-2
QMAKE_OBJECTIVE_CFLAGS = $$QMAKE_CFLAGS
QMAKE_OBJECTIVE_CFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
QMAKE_OBJECTIVE_CFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
QMAKE_OBJECTIVE_CFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
QMAKE_OBJECTIVE_CFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
QMAKE_OBJECTIVE_CFLAGS_HIDESYMS = $$QMAKE_CXXFLAGS_HIDESYMS
QMAKE_LFLAGS += -headerpad_max_install_names
QMAKE_LFLAGS_SHLIB += -single_module -dynamiclib
QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB
QMAKE_LFLAGS_INCREMENTAL += -undefined suppress -flat_namespace
QMAKE_LFLAGS_SONAME += -install_name$${LITERAL_WHITESPACE}@executable_path/
QMAKE_LFLAGS_VERSION += -current_version$${LITERAL_WHITESPACE}
QMAKE_LFLAGS_COMPAT_VERSION += -compatibility_version$${LITERAL_WHITESPACE}

View File

@ -1,5 +1,5 @@
#
# Base qmake configuration for GCC on Mac OS X
# Base qmake configuration for GCC on Mac OS X and iOS
#
# Before making changes to this file, please read the comment in
# gcc-base.conf, to make sure the change goes in the right place.

View File

@ -7,8 +7,7 @@
#
# Platform-specific options shared by these compilers are put into:
#
# - gcc-base-ios.conf
# - gcc-base-macx.conf
# - gcc-base-mac.conf
# - gcc-base-unix.conf
#
# These base files are then combined with configurations for each compiler:
@ -20,7 +19,7 @@
# - clang.conf
#
# The combination happens in the top level mkspec, by including a platform-
# specific version of the base-file, for example gcc-base-macx.conf, and then
# specific version of the base-file, for example gcc-base-mac.conf, and then
# a (possibly platform-specific) version of the actual compiler configuration,
# for example g++-macx.conf.
#

View File

@ -2,18 +2,7 @@
# qmake common configuration for iOS
#
MAKEFILE_GENERATOR = UNIX
CONFIG += ios reduce_exports incremental global_init_link_order lib_version_first plugin_no_soname
QMAKE_INCREMENTAL_STYLE = sublib
QMAKE_PLATFORM += ios
QMAKE_MAC_SDK = iphoneos
# Qt can't build iOS app bundle :(
CONFIG -= app_bundle
# Not deploying to Mac OSX
QMAKE_MACOSX_DEPLOYMENT_TARGET =
# Add iOS common folder to include path
INCLUDEPATH += $$PWD/ios
# iOS defines
DEFINES += DARWIN_NO_CARBON Q_OS_IOS QT_NO_CORESERVICES QT_NO_PRINTER QT_NO_PRINTDIALOG
include(mac.conf)

View File

@ -1,84 +0,0 @@
#
# Helper to set CPU architecture flags for iOS configurations
#
# Depends on:
#
# QMAKE_IPHONEOS_DEPLOYMENT_TARGET - set in mkspecs/common/ios/versions.conf
#
# Note:
#
# Must be included after load(qt_config) in mkspec for auto-detection based
# on GL/ES version (GL/ES 2.x implies armv7 on iOS).
#
# Target architecture for iOS devices (armv6, armv7 or leave blank for default)
QMAKE_IOS_TARGET_ARCH =
###########################################################################
# Device?
!*simulator* {
# Let mkspec specify archictecture
*armv6*: QMAKE_IOS_TARGET_ARCH = armv6
else:*armv7*: QMAKE_IOS_TARGET_ARCH = armv7
# ARMv7 architecture device (see below) is required for OpenGL/ES 2.x
isEmpty(QMAKE_IOS_TARGET_ARCH):contains(QT_CONFIG, opengles2): QMAKE_IOS_TARGET_ARCH = armv7
# No target architecture specified?
isEmpty(QMAKE_IOS_TARGET_ARCH) {
# iOS versions < 4.3 can be armv6 or armv7, so need armv6 for max. compatibility,
# assume that building for OpenGL/ES 1.x is targeting armv6
lessThan(QMAKE_IPHONEOS_DEPLOYMENT_TARGET, "4.3")|contains(QT_CONFIG, opengles1) {
QMAKE_IOS_TARGET_ARCH = armv6
} else: QMAKE_IOS_TARGET_ARCH = armv7
}
# Samsung S5PC100, Apple A4, A5, A5X
equals(QMAKE_IOS_TARGET_ARCH, "armv7") {
# iOS CPU architecture (armv7)
QMAKE_IOS_ARM_ARCH = __ARM_ARCH_7__
# Thumb2 instructions
QMAKE_IOS_ARM_FLAGS = -mthumb
QMAKE_IOS_ARM_ARCH += __MARM_THUMB__
# NEON instructions
*-g++*: QMAKE_IOS_ARM_FLAGS += -mfloat-abi=softfp -mfpu=neon
QMAKE_IOS_ARM_ARCH += __ARM_NEON__
} else {
# Samsung S5L8900
if(equals(QMAKE_IOS_TARGET_ARCH, "armv6")) {
# iOS CPU architecture (armv6)
QMAKE_IOS_ARM_ARCH = __ARM_ARCH_6__
# ARM instructions
QMAKE_IOS_ARM_FLAGS = -marm -mcpu=arm1176jzf-s
!*clang*: QMAKE_IOS_ARM_FLAGS += -march=armv6
} else {
# Unsupported architecture
error("Invalid iOS target $${QMAKE_IOS_TARGET_ARCH}! Edit mkspecs/common/ios/arch.conf to specify target architecture.")
}
}
# Simulator is i386 only
} else: QMAKE_IOS_TARGET_ARCH = i386
# iOS architecture build flags
QMAKE_IOS_ARCH_FLAGS = -arch $$QMAKE_IOS_TARGET_ARCH
QMAKE_CFLAGS += $$QMAKE_IOS_ARCH_FLAGS
QMAKE_CXXFLAGS += $$QMAKE_IOS_ARCH_FLAGS
QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_IOS_ARCH_FLAGS
QMAKE_LFLAGS += $$QMAKE_IOS_ARCH_FLAGS
QMAKE_IOS_TARGET_ARCH =
QMAKE_IOS_ARCH_FLAGS =
# Architecture specific defines/flags
!*simulator* {
DEFINES += $$QMAKE_IOS_ARM_ARCH
QMAKE_IOS_ARM_ARCH =
QMAKE_CFLAGS += $$QMAKE_IOS_ARM_FLAGS
QMAKE_CXXFLAGS += $$QMAKE_IOS_ARM_FLAGS
QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_IOS_ARM_FLAGS
QMAKE_IOS_ARM_FLAGS =
}

View File

@ -3,39 +3,29 @@
#
# Depends on:
#
# QMAKE_IOS_XCODE_VERSION - set in mkspecs/common/ios/versions.conf
# QMAKE_XCODE_VERSION - set in xcode.conf
#
# iOS build flags
QMAKE_IOS_CFLAGS = -fvisibility=hidden -fpascal-strings -fmessage-length=0
QMAKE_IOS_CFLAGS += -fvisibility=hidden -fpascal-strings -fmessage-length=0
QMAKE_IOS_CFLAGS += -Wno-trigraphs -Wreturn-type -Wparentheses -Wswitch -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-shorten-64-to-32 -Wno-sign-conversion
QMAKE_IOS_CXXFLAGS = -fvisibility-inlines-hidden
QMAKE_IOS_OBJ_CFLAGS = -Wno-arc-abi -Wc++0x-extensions
QMAKE_IOS_CXXFLAGS += -fvisibility-inlines-hidden
QMAKE_IOS_OBJ_CFLAGS += -Wno-arc-abi
# Device or simulator specific flags
*simulator* {
QMAKE_IOS_CFLAGS += -fexceptions -fasm-blocks
QMAKE_IOS_OBJ_CFLAGS += -fobjc-abi-version=2 -fobjc-legacy-dispatch
}
# Based on the following information, http://clang.llvm.org/doxygen/ObjCRuntime_8h_source.html,
# we can conclude that it's safe to always pass the following flags
QMAKE_IOS_OBJ_CFLAGS += -fobjc-nonfragile-abi -fobjc-legacy-dispatch
# Compiler version-specific flags
!lessThan(QMAKE_IOS_XCODE_VERSION, "4.3") {
# Clang 3.1 flags (will be used for later versions too)
# But these only apply to non-ARM targets
!contains(QT_ARCH, arm): QMAKE_IOS_CFLAGS += -fexceptions -fasm-blocks
# Clang 3.1 (and above) flags
QMAKE_IOS_CFLAGS += -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-implicit-atomic-properties -Wformat -Wno-missing-braces -Wno-unused-function -Wno-unused-label -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-sign-compare -Wpointer-sign -Wno-newline-eof -Wdeprecated-declarations -Winvalid-offsetof -Wno-conversion
QMAKE_IOS_CXXFLAGS += -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wc++11-extensions
QMAKE_IOS_CXXFLAGS += -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors
QMAKE_IOS_OBJ_CFLAGS += -Wno-deprecated-implementations -Wprotocol -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector
# Warn about unsupported (later than 4.5) Xcode versions
!lessThan(QMAKE_IOS_XCODE_VERSION, "4.6"): warning("The version of Xcode installed on this system is not recognised - custom compiler settings may be necessary")
} else {
if (!lessThan(QMAKE_IOS_XCODE_VERSION, "4.2")) {
# Clang 3.0 flags
QMAKE_IOS_CFLAGS += -fdiagnostics-print-source-range-info -fdiagnostics-show-category=id -fdiagnostics-parseable-fixits
} else {
# Older Clang versions are not supported
error("Unsupported Xcode version $${QMAKE_IOS_XCODE_VERSION}")
}
}
!lessThan(QMAKE_XCODE_VERSION, "4.7"): warning("The version of Xcode installed on this system is not recognised - custom compiler settings may be necessary")
# Set build flags
QMAKE_CFLAGS += $$QMAKE_IOS_CFLAGS

View File

@ -1,21 +0,0 @@
#
# compiler settings for iOS g++ compilers
#
# iOS build flags
QMAKE_IOS_CFLAGS = -fvisibility=hidden -fexceptions -fmessage-length=0
QMAKE_IOS_CFLAGS += -Wno-trigraphs -Wreturn-type -Wunused-variable
QMAKE_IOS_CXXFLAGS = -fvisibility-inlines-hidden
# Device or simulator specific flags
!*simulator*: QMAKE_IOS_OBJ_CFLAGS =
else: QMAKE_IOS_OBJ_CFLAGS = -fobjc-abi-version=2 -fobjc-legacy-dispatch
# Set build flags
QMAKE_CFLAGS += $$QMAKE_IOS_CFLAGS
QMAKE_CXXFLAGS += $$QMAKE_IOS_CFLAGS $$QMAKE_IOS_CXXFLAGS
QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_IOS_CFLAGS $$QMAKE_IOS_CXXFLAGS $$QMAKE_IOS_OBJ_CFLAGS
QMAKE_IOS_CFLAGS =
QMAKE_IOS_CXXFLAGS =
QMAKE_IOS_OBJ_CFLAGS =

View File

@ -1,31 +0,0 @@
#
# compiler settings for iOS llvm-g++ compilers
#
# Depends on:
#
# QMAKE_IOS_XCODE_VERSION - set in mkspecs/common/ios/versions.conf
#
# iOS build flags
QMAKE_IOS_CFLAGS = -fvisibility=hidden -fpascal-strings -fmessage-length=0
QMAKE_IOS_CFLAGS += -Wno-trigraphs -Wreturn-type -Wunused-variable
QMAKE_IOS_CXXFLAGS = -fvisibility-inlines-hidden
# Device or simulator specific flags
!*simulator*: QMAKE_IOS_OBJ_CFLAGS =
else: QMAKE_IOS_OBJ_CFLAGS = -fobjc-abi-version=2 -fobjc-legacy-dispatch
# Compiler version specific flags
!lessThan(QMAKE_IOS_XCODE_VERSION, "4.3") {
# Xcode 4.3+ specific flags
QMAKE_IOS_CFLAGS += -Wuninitialized
}
# Set build flags
QMAKE_CFLAGS += $$QMAKE_IOS_CFLAGS
QMAKE_CXXFLAGS += $$QMAKE_IOS_CFLAGS $$QMAKE_IOS_CXXFLAGS
QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_IOS_CFLAGS $$QMAKE_IOS_CXXFLAGS $$QMAKE_IOS_OBJ_CFLAGS
QMAKE_IOS_CFLAGS =
QMAKE_IOS_CXXFLAGS =
QMAKE_IOS_OBJ_CFLAGS =

View File

@ -1,66 +1,33 @@
#
# Common build settings for all iOS configurations
#
# Depends on:
#
# QMAKE_IOS_XCODE_VERSION - set in mkspecs/common/ios/versions.conf
# QMAKE_IOS_SDK_VERSION - set in mkspecs/common/ios/versions.conf
# QMAKE_IOSSIMULATOR_SDK_VERSION - set in mkspecs/common/ios/versions.conf
#
# iOS SDK device type
!*simulator*: QMAKE_IOS_DEVICE_TYPE = iPhoneOS
else {
QMAKE_IOS_DEVICE_TYPE = iPhoneSimulator
QT_QPA_DEFAULT_PLATFORM = ios
# Use simulator SDK version
QMAKE_IOS_SDK_VERSION = $$QMAKE_IOS_SIMULATOR_SDK_VERSION
QMAKE_IOS_SIMULATOR_SDK_VERSION =
}
QMAKE_XCODE_CODE_SIGN_IDENTITY = "iPhone Developer"
!lessThan(QMAKE_IOS_XCODE_VERSION, "4.3") {
# Xcode 4.3+ is stored in /Applications
QMAKE_IOS_XCODE_PATH = /Applications/Xcode.app/Contents
} else: QMAKE_IOS_XCODE_PATH =
# iOS platform /Developer path
QMAKE_IOS_DEV_PATH = $$QMAKE_IOS_XCODE_PATH/Developer/Platforms/$${QMAKE_IOS_DEVICE_TYPE}.platform/Developer
QMAKE_IOS_XCODE_PATH =
# iOS platform SDK path
QMAKE_IOS_SDK = $$QMAKE_IOS_DEV_PATH/SDKs/$${QMAKE_IOS_DEVICE_TYPE}$${QMAKE_IOS_SDK_VERSION}.sdk
QMAKE_IOS_DEV_PATH =
QMAKE_IOS_DEVICE_TYPE =
QMAKE_CFLAGS += -isysroot $$QMAKE_IOS_SDK
QMAKE_CXXFLAGS += -isysroot $$QMAKE_IOS_SDK
QMAKE_OBJECTIVE_CFLAGS += -isysroot $$QMAKE_IOS_SDK
QMAKE_LFLAGS += -Wl,-syslibroot,$$QMAKE_IOS_SDK
QMAKE_IOS_SDK =
# iOS build tools
QMAKE_CC = clang
QMAKE_CXX = clang++
QMAKE_FIX_RPATH = install_name_tool -id
QMAKE_AR = ar cq
QMAKE_RANLIB = ranlib -s
QMAKE_LINK = $$QMAKE_CXX
QMAKE_LINK_SHLIB = $$QMAKE_CXX
# Basic iOS frameworks needed for any GUI app
QMAKE_LFLAGS += -framework Foundation -framework UIKit -framework QuartzCore -lz
# OpenGL ES1
QMAKE_INCDIR_OPENGL_ES1 = $$QMAKE_IOS_SDK/System/Library/Frameworks/OpenGLES.framework/Headers
# No OpenGL ES1
QMAKE_INCDIR_OPENGL_ES1 =
QMAKE_LIBDIR_OPENGL_ES1 =
QMAKE_LIBS_OPENGL_ES1 = -framework OpenGLES
QMAKE_LIBS_OPENGL_ES1 =
# OpenGL ES2
QMAKE_INCDIR_OPENGL_ES2 = $$QMAKE_IOS_SDK/System/Library/Frameworks/OpenGLES.framework/Headers
QMAKE_INCDIR_OPENGL_ES2 =
QMAKE_LIBDIR_OPENGL_ES2 =
QMAKE_LIBS_OPENGL_ES2 = -framework OpenGLES
# No desktop OpenGL
QMAKE_INCDIR_OPENGL =
QMAKE_LIBS_OPENGL =
QMAKE_LIBS_OPENGL_QT =
# Compiler-specific flags
!*-g++* {
# Objective-C/C++ precompile flags
QMAKE_OBJCFLAGS_PRECOMPILE = -x objective-c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
QMAKE_OBJCFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
QMAKE_OBJCXXFLAGS_PRECOMPILE = -x objective-c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
QMAKE_OBJCXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
}

View File

@ -1,184 +0,0 @@
#
# Helper to set build tool & SDK versions for iOS configurations
#
# This file sets up the following configuration variables:
#
# QMAKE_IOS_XCODE_VERSION - version number of Xcode being used
# QMAKE_IOS_SDK_VERSION - version number of iOS device SDK
# QMAKE_IOS_SIMULATOR_SDK_VERSION - version number of iOS simulator SDK
#
# Used in:
#
# mkspecs/common/ios/clang.conf
# mkspecs/common/ios/llvm.conf
# mkspecs/common/ios/qmake.conf
# mkspecs/unsupported/macx-iosdevice-clang-legacy/qmake.conf
# mkspecs/unsupported/macx-iosdevice-clang/qmake.conf
# mkspecs/unsupported/macx-iosdevice-llvm-legacy/qmake.conf
# mkspecs/unsupported/macx-iosdevice-llvm/qmake.conf
# mkspecs/unsupported/macx-iosdevice-g++-legacy/qmake.conf
# mkspecs/unsupported/macx-iossimulator-llvm-legacy/qmake.conf
# mkspecs/unsupported/macx-iossimulator-llvm/qmake.conf
# mkspecs/unsupported/macx-iossimulator-g++-legacy/qmake.conf
#
#
# IMPORTANT:
#
# Xcode versions <= 4.2.x must be installed in /Developer.
# Xcode versions >= 4.3.x must be installed in /Applications
#
# Xcode versions >= 4.10 & < 5.0 and versions >= 10.0 are not supported due to
# the way the version checks are done here. As Apple (so far) has not used
# minor version numbers greater than 3 for Xcode, and the Xcode major version
# has only changed three times in the period 2003-2012, this is viewed as an
# acceptable limitation.
#
#
# Edit values below to match iOS build environment, or leave blank for
# autodetection (slower!)
#
# Xcode version used for cross-compiling
QMAKE_IOS_XCODE_VERSION =
# iOS SDK version used for cross-compiling for iOS devices
QMAKE_IOS_SDK_VERSION =
# iOS SDK version used for cross-compiling for the iOS simulator
QMAKE_IOS_SIMULATOR_SDK_VERSION =
#
# Do not edit values below here if using a pre-built SDK
#
# Minimum iOS version required on deployment target (if not specified, will
# default to minimum version that guarantees ARMv7 & OpenGL/ES 2.x).
#
# No part of Qt or any known plugin uses features that require iOS versions
# later than 4.0.
QMAKE_IPHONEOS_DEPLOYMENT_TARGET = 4.0
###########################################################################
# No Xcode version specified?
isEmpty(QMAKE_IOS_XCODE_VERSION) {
# Get version string from installed Xcode
exists(/Applications/Xcode.app/Contents/Developer) {
QMAKE_IOS_XCODE_INFO = $$system(/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -version)
} else: QMAKE_IOS_XCODE_INFO = $$system(/Developer/usr/bin/xcodebuild -version)
# Extract Xcode version number from output
QMAKE_IOS_XCODE_VERSION = $$member(QMAKE_IOS_XCODE_INFO, 1)
QMAKE_IOS_XCODE_INFO =
}
# Make sure Xcode version is valid
!lessThan(QMAKE_IOS_XCODE_VERSION, "4.3") {
# Xcode 4.3+ is stored in /Applications
QMAKE_IOS_PLATFORM_PATH = /Applications/Xcode.app/Contents/Developer/Platforms
# Make sure Xcode path is valid
!exists($$QMAKE_IOS_PLATFORM_PATH): error("Xcode is not installed in /Applications/Xcode.app! Edit mkspecs/common/ios/versions.conf to specify version installed.")
} else {
# Older Xcode versions are stored in /Developer
QMAKE_IOS_PLATFORM_PATH = /Developer/Platforms
# Make sure Xcode path is valid
!exists($$QMAKE_IOS_PLATFORM_PATH): error("Xcode is not installed in /Developer! Edit mkspecs/common/ios/versions.conf to specify version installed.")
}
# iOS 4.3 is the preferred version as it is the earliest version that is armv7/gles2 only
QMAKE_IPHONEOS_PREFERRED_TARGET = 4.3
# Building for iOS device?
!*simulator* {
# No iOS SDK version specified?
isEmpty(QMAKE_IOS_SDK_VERSION) {
# Get version string from installed Xcode
!lessThan(QMAKE_IOS_XCODE_VERSION, "4.3") {
QMAKE_IOS_SDK_INFO = $$system(/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -showsdks)
} else: QMAKE_IOS_SDK_INFO = $$system(/Developer/usr/bin/xcodebuild -showsdks)
# Get names of installed device SDKs
QMAKE_IOS_SDK_INFO = $$find(QMAKE_IOS_SDK_INFO, ^iphoneos)
for(v, QMAKE_IOS_SDK_INFO): {
# Extract SDK version number from output
v = $$replace(v,iphoneos,)
# Use latest SDK version
greaterThan(v, $$QMAKE_IOS_SDK_VERSION): QMAKE_IOS_SDK_VERSION = $$v
}
QMAKE_IOS_SDK_INFO =
}
# Make sure iOS SDK version is valid
!exists($$QMAKE_IOS_PLATFORM_PATH/iPhoneOS.platform/Developer/SDKs/iPhoneOS$${QMAKE_IOS_SDK_VERSION}.sdk) {
error("iOS $$QMAKE_IOS_SDK_VERSION SDK not found! Edit mkspecs/common/ios/versions.conf to specify version installed.")
}
# No deployment target specified?
isEmpty(QMAKE_IPHONEOS_DEPLOYMENT_TARGET) {
# Use SDK version for iOS versions < preferred
lessThan(QMAKE_IOS_SDK_VERSION, $$QMAKE_IPHONEOS_PREFERRED_TARGET) {
QMAKE_IPHONEOS_DEPLOYMENT_TARGET = $$QMAKE_IOS_SDK_VERSION
} else: QMAKE_IPHONEOS_DEPLOYMENT_TARGET = $$QMAKE_IPHONEOS_PREFERRED_TARGET
}
# Make sure iOS SDK version is >= iOS target version
!lessThan(QMAKE_IPHONEOS_DEPLOYMENT_TARGET, $$QMAKE_IOS_SDK_VERSION) {
error("Target iOS version is greater that iOS SDK version $$QMAKE_IOS_SDK_VERSION! Edit mkspecs/common/ios/versions.conf to specify target iOS version.")
}
# Building for iOS simulator
} else {
# No iOS simulator SDK version specified?
isEmpty(QMAKE_IOS_SIMULATOR_SDK_VERSION) {
# Get version string from installed Xcode
!lessThan(QMAKE_IOS_XCODE_VERSION, "4.3") {
QMAKE_IOS_SDK_INFO = $$system(/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -showsdks)
} else: QMAKE_IOS_SDK_INFO = $$system(/Developer/usr/bin/xcodebuild -showsdks)
# Get names of installed device SDKs
QMAKE_IOS_SDK_INFO = $$find(QMAKE_IOS_SDK_INFO, ^iphonesimulator)
for(v, QMAKE_IOS_SDK_INFO): {
# Extract SDK version number from output
v = $$replace(v,iphonesimulator,)
# Use latest SDK version
greaterThan(v, $$QMAKE_IOS_SIMULATOR_SDK_VERSION): QMAKE_IOS_SIMULATOR_SDK_VERSION = $$v
}
QMAKE_IOS_SDK_INFO =
}
# Make sure iOS simulator SDK version is valid
!exists($$QMAKE_IOS_PLATFORM_PATH/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator$${QMAKE_IOS_SIMULATOR_SDK_VERSION}.sdk) {
error("iOS $$QMAKE_IOS_SIMULATOR_SDK_VERSION simulator SDK not found! Edit mkspecs/common/ios/versions.conf to specify version installed.")
}
# No deployment target specified?
isEmpty(QMAKE_IPHONEOS_DEPLOYMENT_TARGET) {
# Use SDK version for iOS versions < preferred
lessThan(QMAKE_IOS_SIMULATOR_SDK_VERSION, $$QMAKE_IPHONEOS_PREFERRED_TARGET) {
QMAKE_IPHONEOS_DEPLOYMENT_TARGET = $$QMAKE_IOS_SIMULATOR_SDK_VERSION
} else: QMAKE_IPHONEOS_DEPLOYMENT_TARGET = $$QMAKE_IPHONEOS_PREFERRED_TARGET
}
# Make sure iOS simulator SDK version is >= iOS target version
!lessThan(QMAKE_IPHONEOS_DEPLOYMENT_TARGET, $$QMAKE_IOS_SIMULATOR_SDK_VERSION) {
error("Target iOS version is greater that iOS simulator SDK version $$QMAKE_IOS_SIMULATOR_SDK_VERSION! Edit mkspecs/common/ios/versions.conf to specify target iOS version.")
}
}
QMAKE_IPHONEOS_PREFERRED_TARGET =
QMAKE_IOS_PLATFORM_PATH =
# Set deployment target
QMAKE_IOS_VERSION_FLAGS = -miphoneos-version-min=$$QMAKE_IPHONEOS_DEPLOYMENT_TARGET
# Set build flags
QMAKE_CFLAGS += $$QMAKE_IOS_VERSION_FLAGS
QMAKE_CXXFLAGS += $$QMAKE_IOS_VERSION_FLAGS
QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_IOS_VERSION_FLAGS
QMAKE_LFLAGS += $$QMAKE_IOS_VERSION_FLAGS
QMAKE_IOS_VERSION_FLAGS =

View File

@ -6,7 +6,6 @@ QMAKE_PLATFORM += android
include(linux.conf)
include(gcc-base-unix.conf)
DEFINES += Q_OS_LINUX_ANDROID
DEFINES += QT_NO_PRINTER QT_NO_PRINTDIALOG
QT_QPA_DEFAULT_PLATFORM = minimal
@ -110,7 +109,6 @@ QMAKE_LIBS_QT_OPENGL =
QMAKE_LIBS_QTOPIA =
QMAKE_LIBS_THREAD =
QMAKE_LIBS_OPENGL =
QMAKE_LIBS_OPENGL_QT =
QMAKE_LIBS_OPENGL_ES1 = -lGLESv1_CM
QMAKE_LIBS_OPENGL_ES2 = -lGLESv2 $$QMAKE_LIBS

View File

@ -28,7 +28,6 @@ QMAKE_LIBS_X11 = -lXext -lX11 -lm
QMAKE_LIBS_NIS = -lnsl
QMAKE_LIBS_EGL = -lEGL
QMAKE_LIBS_OPENGL = -lGL
QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_LIBS_OPENGL_ES1 = -lGLESv1_CM
QMAKE_LIBS_OPENGL_ES2 = -lGLESv2
QMAKE_LIBS_OPENVG = -lOpenVG

View File

@ -1,5 +0,0 @@
# clang libc++ requires 10.7
QMAKE_CFLAGS += -mmacosx-version-min=10.7
QMAKE_CXXFLAGS += -mmacosx-version-min=10.7
QMAKE_OBJECTIVE_CFLAGS += -mmacosx-version-min=10.7
QMAKE_LFLAGS += -mmacosx-version-min=10.7

View File

@ -1,4 +0,0 @@
QMAKE_CFLAGS += -mmacosx-version-min=10.6
QMAKE_LFLAGS += -mmacosx-version-min=10.6
QMAKE_CXXFLAGS += -mmacosx-version-min=10.6
QMAKE_OBJECTIVE_CFLAGS += -mmacosx-version-min=10.6

View File

@ -1,19 +1,19 @@
#
# qmake configuration for common Mac OS X
# qmake configuration for common Mac OS (OSX and iOS)
#
!load(device_config) {
error(Could not successfully load device configuration)
}
QMAKE_PLATFORM += macx mac
!load(device_config): error(Could not successfully load device configuration)
QMAKE_PLATFORM += mac
QMAKE_RESOURCE = /Developer/Tools/Rez
QMAKE_EXTENSION_SHLIB = dylib
QMAKE_LIBDIR =
QMAKE_INCDIR_OPENGL = $$QMAKE_MAC_SDK/System/Library/Frameworks/OpenGL.framework/Headers \
$$QMAKE_MAC_SDK/System/Library/Frameworks/AGL.framework/Headers/
# sdk.prf will prefix the proper SDK sysroot
QMAKE_INCDIR_OPENGL = \
/System/Library/Frameworks/OpenGL.framework/Headers \
/System/Library/Frameworks/AGL.framework/Headers/
QMAKE_FIX_RPATH = install_name_tool -id
@ -21,7 +21,6 @@ QMAKE_LFLAGS_RPATH =
QMAKE_LIBS_DYNLOAD =
QMAKE_LIBS_OPENGL = -framework OpenGL -framework AGL
QMAKE_LIBS_OPENGL_QT = $$QMAKE_LIBS_OPENGL
QMAKE_LIBS_THREAD =
QMAKE_AR = ar cq

View File

@ -42,8 +42,6 @@
#ifndef QPLATFORMDEFS_H
#define QPLATFORMDEFS_H
#define QT_QPA_DEFAULT_PLATFORM_NAME "cocoa"
// Get Qt defines/settings
#include "qglobal.h"
@ -85,11 +83,7 @@
#define QT_OPEN_LARGEFILE 0
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4)
#define QT_SOCKLEN_T socklen_t
#else
#define QT_SOCKLEN_T int
#endif
#define QT_SIGNAL_IGNORE (void (*)(int))1

8
mkspecs/common/macx.conf Normal file
View File

@ -0,0 +1,8 @@
#
# qmake configuration for common Mac OS X
#
QMAKE_PLATFORM += macx
QMAKE_MAC_SDK = macosx
include(mac.conf)

17
mkspecs/common/xcode.conf Normal file
View File

@ -0,0 +1,17 @@
#
# qmake configuration for Xcode
#
# Get path of Xcode's Developer directory
QMAKE_XCODE_DEVELOPER_PATH = $$system("xcode-select --print-path")
isEmpty(QMAKE_XCODE_DEVELOPER_PATH): \
error("Xcode path is not set. Please use xcode-select to choose Xcode installation path.")
# Make sure Xcode path is valid
!exists($$QMAKE_XCODE_DEVELOPER_PATH): \
error("Xcode is not installed in $${QMAKE_XCODE_DEVELOPER_PATH}. Please use xcode-select to choose Xcode installation path.")
# Extract Xcode version using xcodebuild
xcode_version = $$system("xcodebuild -version")
QMAKE_XCODE_VERSION = $$member(xcode_version, 1)
unset(xcode_version)

View File

@ -63,7 +63,6 @@ QMAKE_LIBS =
QMAKE_LIBS_DYNLOAD = -ldl
QMAKE_LIBS_X11 = -lXext -lX11
QMAKE_LIBS_OPENGL = -lGL
QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_LIBS_THREAD = -lpthread
QMAKE_PREFIX_SHLIB = lib
QMAKE_PREFIX_STATICLIB = lib

View File

@ -72,7 +72,6 @@ QMAKE_LFLAGS_RPATH =
QMAKE_LIBS_DYNLOAD =
QMAKE_LIBS_X11 = -lXext -lX11 -lm
QMAKE_LIBS_OPENGL = -lGL
QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_LIBS_THREAD =
QMAKE_AR = ar cq

View File

@ -5,3 +5,4 @@
include(../../blackberry-armv7le-qcc/qmake.conf)
DEFINES += Q_OS_BLACKBERRY_TABLET
CONFIG += blackberry-playbook

View File

@ -5,3 +5,4 @@
include(../../blackberry-x86-qcc/qmake.conf)
DEFINES += Q_OS_BLACKBERRY_TABLET
CONFIG += blackberry-playbook

View File

@ -0,0 +1,14 @@
contains(TEMPLATE, ".*app") {
!android_app {
!contains(TARGET, ".so"): TARGET = lib$${TARGET}.so
QMAKE_LFLAGS += -Wl,-soname,$$TARGET
}
}
!QTDIR_build:android_install {
isEmpty(QT_BUILD_TREE) {
target.path=/libs/$$ANDROID_TARGET_ARCH/
} else {
target.path = /
}
INSTALLS *= target
}

View File

@ -7,6 +7,9 @@ equals(MAKEFILE_GENERATOR, UNIX) {
QMAKE_MAKE = mingw32-make
} else:if(equals(MAKEFILE_GENERATOR, MSVC.NET)|equals(MAKEFILE_GENERATOR, MSBUILD)) {
QMAKE_MAKE = nmake
} else:ios {
# iOS unsets MAKEFILE_GENERATOR in its default_pre.prf
QMAKE_MAKE = make
} else {
error("Configure tests are not supported with the $$MAKEFILE_GENERATOR Makefile generator.")
}

View File

@ -69,7 +69,7 @@ CMAKE_MKSPEC = $$[QMAKE_XSPEC]
CMAKE_QT_STEM = Qt$$eval(QT.$${MODULE}.MAJOR_VERSION)$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}
macx {
mac {
!isEmpty(CMAKE_STATIC_TYPE) {
CMAKE_LIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}_debug.a
CMAKE_LIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a

View File

@ -47,6 +47,14 @@ incredibuild_xge {
CONFIG = incredibuild_xge $$CONFIG
}
silent {
# Ensure that we process silent.prf last, as it will mangle QMAKE_CXX
# and friends in a way that some of the other features (sdk.prf and
# simd.prf eg) do not handle.
CONFIG -= silent
CONFIG = silent $$CONFIG
}
force_debug_info:win32 {
load(resolve_target)
QMAKE_CLEAN += $$replace(QMAKE_RESOLVED_TARGET, ...$, pdb) # for the debug case it is hardcoded in qmake

View File

@ -0,0 +1,69 @@
CONFIG(qt):contains(QT, gui):equals(TEMPLATE, app): CONFIG += gui_app
isEmpty(MAKEFILE_GENERATOR) {
gui_app:app_bundle: \
# For applications we want Xcode project files
MAKEFILE_GENERATOR = XCODE
else: \
# For libs, etc we still want regular Makefiles
MAKEFILE_GENERATOR = UNIX
}
gui_app {
# We have to do the link and dependency resolution for the platform plugin
# manually, since QTPLUGIN and the prl lookup logic does not support
# the -force_load link style. The -force_load option ensures that all
# symbols from the static library are included, not just the ones the
# linker have seen a use for so far. We need this because we load the platform
# plugin from the platform plugin itself, using Q_IMPORT_PLUGIN.
lib_path_and_base = $$[QT_INSTALL_PLUGINS/get]/platforms/libqios$$qtPlatformTargetSuffix()
LIBS += "-force_load $${lib_path_and_base}.$${QMAKE_EXTENSION_STATICLIB}"
LIBS += $$fromfile($${lib_path_and_base}.prl, QMAKE_PRL_LIBS)
# Which means we don't want the auto-generated import for the platform plugin
CONFIG -= import_qpa_plugin
!no_main_wrapper {
# We link the iosmain library manually as well, since it's not really a plugin
lib_name = qiosmain
lib_path_and_base = $$[QT_INSTALL_PLUGINS/get]/platforms/lib$${lib_name}$$qtPlatformTargetSuffix()
LIBS += -L$$[QT_INSTALL_PLUGINS/get]/platforms -l$${lib_name}$$qtPlatformTargetSuffix()
LIBS += $$fromfile($${lib_path_and_base}.prl, QMAKE_PRL_LIBS)
DEFINES += main=qt_main
}
}
contains(MAKEFILE_GENERATOR, XCODE) {
ios_device_family.name = TARGETED_DEVICE_FAMILY
ios_device_family.value = $$QMAKE_IOS_TARGETED_DEVICE_FAMILY
QMAKE_MAC_XCODE_SETTINGS += ios_device_family
}
isEmpty(QT_ARCH) {
# The iPhoneOS and iPhoneSimulator targets share the same toolchain,
# so when configure runs the arch tests it passes the correct sysroot,
# but we fail to pick up the architecture since we're not passing -arch
# yet. Xcode does not seem to have a way to run the shared toolchain
# in a way that will automatically do this (for example xcrun -sdk).
contains(QMAKE_MAC_SDK, iphoneos.*): QT_ARCH = armv7
else: QT_ARCH = i386 # Simulator
} else {
# Fix up the QT_ARCH to be more specific
equals(QT_ARCH, arm) {
# Samsung S5PC100, Apple A4, A5, A5X
QT_ARCH = armv7
# FIXME: How do we support armv7s when Qt can't do universal builds?
}
}
!equals(MAKEFILE_GENERATOR, XCODE) {
arch_flag = -arch $$QT_ARCH
QMAKE_CFLAGS += $$arch_flag
QMAKE_CXXFLAGS += $$arch_flag
QMAKE_OBJECTIVE_CFLAGS += $$arch_flag
QMAKE_LFLAGS += $$arch_flag
}
load(default_post)

View File

@ -0,0 +1,4 @@
# Unset makefile generator, so we can auto-detect value in default_post
unset(MAKEFILE_GENERATOR)
load(default_pre)

61
mkspecs/features/java.prf Normal file
View File

@ -0,0 +1,61 @@
TEMPLATE = lib
android {
isEmpty(SDK_ROOT): SDK_ROOT = $$(ANDROID_SDK_ROOT)
isEmpty(SDK_ROOT): SDK_ROOT = $$DEFAULT_ANDROID_SDK_ROOT
isEmpty(API_VERSION) {
API_VERSION = $$(ANDROID_API_VERSION)
isEmpty(API_VERSION): API_VERSION = android-10
}
!exists($$SDK_ROOT/platforms/$$API_VERSION/android.jar) {
error("The Path $$SDK_ROOT/platforms/$$API_VERSION/android.jar does not exist. Make sure the ANDROID_SDK_ROOT and ANDROID_API_VERSION environment variables are correctly set.")
}
JAVACLASSPATH += $$SDK_ROOT/platforms/$$API_VERSION/android.jar
# FIXME: This is a hack to work around some hardcoded values in the android.prf. The
# android.prf should be fixed and this should be removed.
CONFIG += android_app
}
isEmpty(CLASS_DIR): CLASS_DIR = .classes
CONFIG -= qt
# Without these, qmake adds a name prefix and versioning postfixes (as well as file
# links) to the target. This is hardcoded in the qmake code, so for now we use
# the plugin configs to get what we want.
CONFIG += plugin no_plugin_name_prefix
javac.input = JAVASOURCES
javac.output = $$CLASS_DIR
javac.CONFIG += combine
javac.commands = javac -source 6 -target 6 -cp $$shell_quote($$join(JAVACLASSPATH, ":")) -d $$shell_quote($$CLASS_DIR) ${QMAKE_FILE_IN}
# Force rebuild every time, because we don't know the paths of the destination files
# as they depend on the code.
javac.depends = FORCE
QMAKE_EXTRA_COMPILERS += javac
mkpath($$absolute_path($$CLASS_DIR, $$OUT_PWD)) | error("Aborting.")
# Disable all linker flags since we are overriding the regular linker
QMAKE_LFLAGS =
QMAKE_CFLAGS =
QMAKE_LFLAGS_RPATH =
QMAKE_LFLAGS_PLUGIN =
QMAKE_LIBS =
QMAKE_LIBS_OPENGL_ES2 =
QMAKE_LIBDIR =
QMAKE_EXTENSION_SHLIB = jar
# Override linker with dex (for Android) or jar (for other java builds)
android {
QMAKE_LINK_O_FLAG = --output=
QMAKE_LINK = $$SDK_ROOT/platform-tools/dx --dex
} else {
QMAKE_LINK_O_FLAG = "cf "
QMAKE_LINK = jar
}
# Force link step to always happen, since we are always updating the
# .class files
PRE_TARGETDEPS += FORCE

View File

@ -1,8 +1,53 @@
!isEmpty(QMAKE_MAC_SDK) {
!macx-xcode:!macx-pbuilder {
QMAKE_CFLAGS += -isysroot $$QMAKE_MAC_SDK
QMAKE_OBJECTIVE_CFLAGS += -isysroot $$QMAKE_MAC_SDK
QMAKE_CXXFLAGS += -isysroot $$QMAKE_MAC_SDK
QMAKE_LFLAGS += -Wl,-syslibroot,$$QMAKE_MAC_SDK
isEmpty(QMAKE_MAC_SDK): \
error("QMAKE_MAC_SDK must be set when using CONFIG += sdk.")
contains(QMAKE_MAC_SDK, .*/.*): \
error("QMAKE_MAC_SDK can only contain short-form SDK names (eg. macosx, iphoneos)")
QMAKE_MAC_SDK_PATH = $$system("xcodebuild -sdk $$QMAKE_MAC_SDK -version Path 2>/dev/null")
isEmpty(QMAKE_MAC_SDK_PATH): error("Could not resolve SDK path for \'$$QMAKE_MAC_SDK\'")
!equals(MAKEFILE_GENERATOR, XCODE) {
QMAKE_CFLAGS += -isysroot $$QMAKE_MAC_SDK_PATH
QMAKE_CXXFLAGS += -isysroot $$QMAKE_MAC_SDK_PATH
QMAKE_OBJECTIVE_CFLAGS += -isysroot $$QMAKE_MAC_SDK_PATH
QMAKE_LFLAGS += -Wl,-syslibroot,$$QMAKE_MAC_SDK_PATH
}
sysrootified =
for(val, QMAKE_INCDIR_OPENGL): sysrootified += $${QMAKE_MAC_SDK_PATH}$$val
QMAKE_INCDIR_OPENGL = $$sysrootified
# 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)) {
value = $$eval($$tool)
isEmpty(value): next()
sysrooted = $$system("xcrun -sdk $$QMAKE_MAC_SDK -find $$first(value)")
$$tool = $$sysrooted $$member(value, 1, -1)
}
# We use xml as the output format instead of json since plutil on 10.6 does not have that option
QMAKE_MAC_PLATFORM_NAME = $$system("plutil -convert xml1 \"$$QMAKE_MAC_SDK_PATH/SDKSettings.plist\" -o - | " \
"sed '/^<!DOCTYPE/d' | " \ # Don't look up http://www.apple.com/DTDs/PropertyList-1.0.dtd
"PERL5LIB= xpath 'string(//key[.=\"PLATFORM_NAME\"]/following-sibling::*[1])' 2>&1 | " \
"sed 's/.*Value: \\(.*\\)/\\1/'")
isEmpty(QMAKE_MAC_PLATFORM_NAME): error("Could not resolve platform name for SDK '$$QMAKE_MAC_SDK'")
!equals(MAKEFILE_GENERATOR, XCODE) {
# FIXME: Get the version_min_flag out of the platform's 'Native Build System.xcspec'
version_identifier = $$replace(QMAKE_MAC_PLATFORM_NAME, iphonesimulator, ios-simulator)
ios:!host_build: \
deployment_target = $$QMAKE_IOS_DEPLOYMENT_TARGET
else: \
deployment_target = $$QMAKE_MACOSX_DEPLOYMENT_TARGET
version_min_flag = -m$${version_identifier}-version-min=$$deployment_target
QMAKE_CFLAGS += $$version_min_flag
QMAKE_CXXFLAGS += $$version_min_flag
QMAKE_OBJECTIVE_CFLAGS += $$version_min_flag
QMAKE_LFLAGS += $$version_min_flag
}

View File

@ -18,12 +18,8 @@ if(win32|mac):!macx-xcode {
contains(QT_CONFIG, debug_and_release):CONFIG += debug_and_release
contains(QT_CONFIG, build_all):CONFIG += build_all
}
contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols
contains(QT_CONFIG, separate_debug_info):CONFIG += separate_debug_info
contains(QT_CONFIG, separate_debug_info_nocopy):CONFIG += separate_debug_info_nocopy
contains(QT_CONFIG, c++11):CONFIG += c++11
isEmpty(CXX_MODULE) {
!no_cxx_module:isEmpty(CXX_MODULE) {
CXX_MODULE = $$TARGET
TARGET = declarative_$${TARGET}
}
@ -34,11 +30,13 @@ exists($$QMLTYPEFILE): QML_FILES += $$QMLTYPEFILE
# Install rules
load(qt_build_paths)
qml1_target {
DESTDIR = $$eval(QT.$${CXX_MODULE}.imports)/$$TARGETPATH
DESTDIR = $$MODULE_BASE_OUTDIR/imports/$$TARGETPATH
instbase = $$[QT_INSTALL_IMPORTS]
} else {
DESTDIR = $$eval(QT.$${CXX_MODULE}.qml)/$$TARGETPATH
DESTDIR = $$MODULE_BASE_OUTDIR/qml/$$TARGETPATH
instbase = $$[QT_INSTALL_QML]
}
@ -50,6 +48,7 @@ INSTALLS += target
TARGET = $$qtLibraryTarget($$TARGET)
load(qt_targets)
load(qt_common)
# plugins.qmltypes is used by Qt Creator for syntax highlighting and the QML code model. It needs
# to be regenerated whenever the QML elements exported by the plugin change. This cannot be done
@ -61,7 +60,14 @@ load(qt_targets)
#
!cross_compile {
build_pass|!debug_and_release {
isEmpty(IMPORT_VERSION): IMPORT_VERSION = $$eval(QT.$${CXX_MODULE}.MAJOR_VERSION).$$eval(QT.$${CXX_MODULE}.MINOR_VERSION)
isEmpty(IMPORT_VERSION) {
no_cxx_module {
IMPORT_VERSION = $$replace(MODULE_VERSION, ^(\\d+\\.\\d+).*, \\1)
isEmpty(IMPORT_VERSION): error("Must set IMPORT_VERSION")
} else {
IMPORT_VERSION = $$eval(QT.$${CXX_MODULE}.MAJOR_VERSION).$$eval(QT.$${CXX_MODULE}.MINOR_VERSION)
}
}
load(resolve_target)
qml1_target: \
@ -94,7 +100,7 @@ unix|win32-g++* {
!isEmpty(_QMAKE_SUPER_CACHE_): \
lib_replace.match = $$dirname(_QMAKE_SUPER_CACHE_)/[^/][^/]*/lib
else: \
lib_replace.match = $$eval(QT.$${CXX_MODULE}.libs)
lib_replace.match = $$MODULE_BASE_OUTDIR
lib_replace.replace = $$[QT_INSTALL_LIBS/raw]
QMAKE_PRL_INSTALL_REPLACE += lib_replace
}

View File

@ -2,7 +2,7 @@ CONFIG += testcase
QT += qml qmltest
macx: CONFIG -= app_bundle
mac: CONFIG -= app_bundle
# If the .pro file specified an IMPORTPATH, then add that to
# the command-line when the test is run.

View File

@ -1,5 +1,3 @@
DEFINES += QT_COMPILES_IN_HARFBUZZ
contains(QT_CONFIG, system-freetype) {
LIBS += -lfreetype
}

View File

@ -2,7 +2,7 @@ CONFIG += qpa/basicunixfontdatabase
contains(QT_CONFIG, fontconfig) {
DEFINES += Q_FONTCONFIGDATABASE
LIBS += -lfontconfig
} else {
} else:!android {
fonts.path = $$[QT_INSTALL_LIBS]/fonts
fonts.files = $$QT_SOURCE_TREE/lib/fonts/*
INSTALLS += fonts

View File

@ -0,0 +1,53 @@
# 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.
#
# Generates an xml file to match the library in lib/ listing the dependencies
# of the module on JNI-based libraries etc. Used for deployment of an Android
# app.
ANDROID_DEPENDS_DIR = $$MODULE_QMAKE_OUTDIR/lib/
DEPENDENCY_FILE = $$ANDROID_DEPENDS_DIR$$TARGET-android-dependencies.xml
!build_pass {
!isEmpty(ANDROID_JAR_DEPENDENCIES) {
for(JAR_FILE, ANDROID_JAR_DEPENDENCIES) {
INIT_CLASS = $$section(JAR_FILE, ":", 1, 1)
!isEmpty(INIT_CLASS): INIT_CLASS = "initClass=\"$$INIT_CLASS\""
JAR_FILE = $$section(JAR_FILE, ":", 0, 0)
FILE_CONTENT += "<jar file=\"$$JAR_FILE\" $$INIT_CLASS />"
}
}
!isEmpty(ANDROID_LIB_DEPENDENCIES) {
for(LIB_FILE, ANDROID_LIB_DEPENDENCIES) {
FILE_CONTENT += "<lib file=\"$$LIB_FILE\" />"
}
}
!isEmpty(ANDROID_LIB_DEPENDENCY_REPLACEMENTS) {
for(REPLACEMENT, ANDROID_LIB_DEPENDENCY_REPLACEMENTS) {
REPLACEMENT_FILE = $$section(REPLACEMENT, ":", 0, 0)
LIB_FILE = $$section(REPLACEMENT, ":", 1, 1)
FILE_CONTENT += "<lib file=\"$$LIB_FILE\" replaces=\"$$REPLACEMENT_FILE\" />"
}
}
!isEmpty(FILE_CONTENT) {
FILE_CONTENT = "<rules><dependencies><lib name=\"$$TARGET\"><depends>" $$FILE_CONTENT "</depends></lib></dependencies></rules>"
write_file($$DEPENDENCY_FILE, FILE_CONTENT) | error("Aborting.")
}
}
!isEmpty(ANDROID_JAR_DEPENDENCIES)|!isEmpty(ANDROID_LIB_DEPENDENCIES)|!isEmpty(ANDROID_LIB_DEPENDENCY_REPLACEMENTS) {
install_dependencies_file.files = $$DEPENDENCY_FILE
install_dependencies_file.path = $$[QT_INSTALL_LIBS]
INSTALLS += install_dependencies_file
}

View File

@ -39,6 +39,9 @@ mac {
}
}
cross_compile: \
CONFIG += force_bootstrap
CONFIG += \
create_prl link_prl \
prepare_docs qt_docs_targets \

View File

@ -0,0 +1,54 @@
#
# 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.
#
contains(QT_CONFIG, c++11): CONFIG += c++11
contains(TEMPLATE, .*lib) {
# module and plugins
contains(QT_CONFIG, reduce_exports): CONFIG += hide_symbols
unix:contains(QT_CONFIG, reduce_relocations): CONFIG += bsymbolic_functions
contains(QT_CONFIG, largefile): CONFIG += largefile
contains(QT_CONFIG, separate_debug_info): CONFIG += separate_debug_info
contains(QT_CONFIG, separate_debug_info_nocopy): CONFIG += separate_debug_info_nocopy
}
warnings_are_errors:warning_clean {
# If the module declares that it has does its clean-up of warnings, enable -Werror.
# This setting is compiler-dependent anyway because it depends on the version of the
# compiler.
clang {
# Apple clang 4.0+ or clang 3.1+
greaterThan(QT_CLANG_MAJOR_VERSION, 3) | \
if(equals(QT_CLANG_MAJOR_VERSION, 3):greaterThan(QT_CLANG_MINOR_VERSION, 1)) | \
greaterThan(QT_APPLE_CLANG_MAJOR_VERSION, 3) {
QMAKE_CXXFLAGS += -Werror -Wno-error=\\$${LITERAL_HASH}warnings $$WERROR
}
} else:intel_icc {
# Intel CC 13.0+ (a.k.a. Intel Composer XE 2013)
greaterThan(QT_ICC_MAJOR_VERSION, 12) {
# 177: function "entity" was declared but never referenced
# (too aggressive; ICC reports even for functions created due to template instantiation)
# 1224: #warning directive
# 1881: argument must be a constant null pointer value
# (NULL in C++ is usually a literal 0)
QMAKE_CXXFLAGS += -Werror -ww177,1224,1881 $$WERROR
}
} else:gcc {
# GCC 4.6+
# note: there was no GCC 3.6 and this assumes no one is crazy enough to compile Qt with GCC 2.7
greaterThan(QT_GCC_MAJOR_VERSION, 4)|greaterThan(QT_GCC_MINOR_VERSION, 5) {
QMAKE_CXXFLAGS += -Werror -Wno-error=cpp $$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
}
}
}

View File

@ -27,6 +27,17 @@ isEmpty(VERSION): error("Module does not define version.")
# unless overridden. Host builds are always static
host_build|staticlib: CONFIG += static
host_build {
QT -= gui # no host module will ever use gui
force_bootstrap {
!build_pass: CONFIG += release
contains(QT, core(-private)?|xml) {
QT -= core core-private xml
QT += bootstrap-private
}
}
}
ucmodule = $$upper($$MODULE)
isEmpty(MODULE_INCNAME): MODULE_INCNAME = $$TARGET
@ -74,13 +85,6 @@ contains(TARGET, QtAddOn.*): \
else: \
DEFINES += QT_BUILD_$${ucmodule}_LIB
contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols
unix:contains(QT_CONFIG, reduce_relocations):CONFIG += bsymbolic_functions
contains(QT_CONFIG, largefile):CONFIG += largefile
contains(QT_CONFIG, separate_debug_info):CONFIG += separate_debug_info
contains(QT_CONFIG, separate_debug_info_nocopy):CONFIG += separate_debug_info_nocopy
contains(QT_CONFIG, c++11):CONFIG += c++11
#mac frameworks
mac:CONFIG(shared, static|shared):contains(QT_CONFIG, qt_framework) {
#QMAKE_FRAMEWORK_VERSION = 4.0
@ -115,6 +119,8 @@ aix-g++* {
QMAKE_CXXFLAGS += -mminimal-toc
}
android: CONFIG += qt_android_deps
#install directives
load(qt_installs)
@ -169,6 +175,7 @@ win32 {
TARGET = $$qtLibraryTarget($$TARGET$$QT_LIBINFIX) #do this towards the end
load(qt_targets)
load(qt_common)
win32:DEFINES+=_USE_MATH_DEFINES

View File

@ -13,13 +13,22 @@ load(qt_build_paths)
!build_pass {
qtPrepareTool(QMAKE_SYNCQT, syncqt)
minimal_syncqt {
QMAKE_SYNCQT += -minimal $$QMAKE_SYNCQT_OPTIONS
} else {
contains(QT_CONFIG, private_tests): \ # -developer-build
QMAKE_SYNCQT += -check-includes
QMAKE_SYNCQT += -module $$MODULE_INCNAME -mkspecsdir $$[QT_HOST_DATA/get]/mkspecs -outdir $$MODULE_BASE_OUTDIR $$MODULE_BASE_DIR
QMAKE_SYNCQT += -module $$MODULE_INCNAME
}
QMAKE_SYNCQT += \
-mkspecsdir $$[QT_HOST_DATA/get]/mkspecs \
-outdir $$MODULE_BASE_OUTDIR $$MODULE_BASE_DIR
!silent: message($$QMAKE_SYNCQT)
system($$QMAKE_SYNCQT)|error("Failed to run: $$QMAKE_SYNCQT")
}
minimal_syncqt: return()
#load up the headers info
include($$MODULE_BASE_OUTDIR/include/$$MODULE_INCNAME/headers.pri, "", true)

View File

@ -43,7 +43,7 @@ else: \
module_config = "QT.$${MODULE}.CONFIG = $$MODULE_CONFIG"
else: \
module_config =
!no_module_headers {
!no_module_headers:!minimal_syncqt {
MODULE_INCLUDES = "\$\$QT_MODULE_INCLUDE_BASE \$\$QT_MODULE_INCLUDE_BASE/$$MODULE_INCNAME"
MODULE_PRIVATE_INCLUDES = "\$\$QT_MODULE_INCLUDE_BASE/$$MODULE_INCNAME/$$VERSION \
\$\$QT_MODULE_INCLUDE_BASE/$$MODULE_INCNAME/$$VERSION/$$MODULE_INCNAME"

View File

@ -23,10 +23,6 @@ tool_plugin {
contains(QT_CONFIG, debug_and_release):CONFIG += debug_and_release
contains(QT_CONFIG, build_all):CONFIG += build_all
}
contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols
contains(QT_CONFIG, separate_debug_info):CONFIG += separate_debug_info
contains(QT_CONFIG, separate_debug_info_nocopy):CONFIG += separate_debug_info_nocopy
contains(QT_CONFIG, c++11):CONFIG += c++11
CONFIG(static, static|shared) {
isEmpty(MODULE): MODULE = $$basename(TARGET)
@ -52,6 +48,7 @@ INSTALLS += target
TARGET = $$qtLibraryTarget($$TARGET)
load(qt_targets)
load(qt_common)
wince*:LIBS += $$QMAKE_LIBS_GUI
QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF

View File

@ -17,9 +17,13 @@ DESTDIR = $$MODULE_BASE_OUTDIR/bin
CONFIG += console
isEmpty(QMAKE_INFO_PLIST): CONFIG -= app_bundle
host_build {
host_build: QT -= gui # no host tool will ever use gui
host_build:force_bootstrap {
!build_pass: CONFIG += release
QT = bootstrap-private
contains(QT, core(-private)?|xml) {
QT -= core core-private xml
QT += bootstrap-private
}
target.path = $$[QT_HOST_BINS]
} else {
!build_pass:contains(QT_CONFIG, build_all): CONFIG += release
@ -28,10 +32,12 @@ host_build {
INSTALLS += target
load(qt_targets)
load(qt_common)
# If we are doing a prefix build, create a "module" pri which enables
# qtPrepareTool() to work with the non-installed build.
!build_pass:prefix_build {
# Non-bootstrapped tools always need this because of the environment setup.
!build_pass:if(!host_build|!force_bootstrap|prefix_build) {
isEmpty(MODULE):MODULE = $$TARGET
@ -41,7 +47,7 @@ load(qt_targets)
load(resolve_target)
cmd = $$shell_path($$QMAKE_RESOLVED_TARGET)
!host_build: qtAddTargetEnv(cmd)
!host_build|!force_bootstrap: qtAddTargetEnv(cmd)
TOOL_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules/qt_tool_$${MODULE}.pri

View File

@ -28,7 +28,7 @@ win32 {
} else {
contains(TEMPLATE, .*lib):LIBPREFIX = lib
macx {
mac {
equals(TEMPLATE, lib) {
lib_bundle {
QMAKE_RESOLVED_TARGET = $${QMAKE_RESOLVED_TARGET}$${TARGET}.framework/$${TARGET}

View File

@ -32,7 +32,7 @@ contains(MUNGED_TARGET,.*/.*):check.commands = cd $(DESTDIR) &&
# Allow for a custom test runner script
check.commands += $(TESTRUNNER)
macx {
mac {
app_bundle: check.commands += ./$(QMAKE_TARGET).app/Contents/MacOS/$(QMAKE_TARGET)
else: check.commands += ./$(QMAKE_TARGET)
}

View File

@ -11,7 +11,7 @@ contains(QT_CONFIG, opengles1) {
} else {
INCLUDEPATH += $$QMAKE_INCDIR_OPENGL
!isEmpty(QMAKE_LIBDIR_OPENGL):QMAKE_LIBDIR += $$QMAKE_LIBDIR_OPENGL
target_qt:LIBS_PRIVATE += $$QMAKE_LIBS_OPENGL_QT
target_qt:LIBS_PRIVATE += $$QMAKE_LIBS_OPENGL
else:LIBS += $$QMAKE_LIBS_OPENGL
}

View File

@ -1,8 +1,15 @@
!separate_debug_info_nocopy:have_target:!static:!isEmpty(QMAKE_OBJCOPY) {
qnx:debug_info_suffix=sym
else:debug_info_suffix=debug
QMAKE_SEPARATE_DEBUG_INFO = test -z \"$(DESTDIR)\" || cd \"$(DESTDIR)\" ; targ=`basename $(TARGET)`; $$QMAKE_OBJCOPY --only-keep-debug \"\$\$targ\" \"\$\$targ.$$debug_info_suffix\" && $$QMAKE_OBJCOPY --strip-debug \"\$\$targ\" && $$QMAKE_OBJCOPY --add-gnu-debuglink=\"\$\$targ.$$debug_info_suffix\" \"\$\$targ\" && chmod -x \"\$\$targ.$$debug_info_suffix\"
qnx {
debug_info_suffix = sym
debug_info_keep = --keep-file-symbols
debug_info_strip = --strip-debug -R.ident
} else {
debug_info_suffix = debug
debug_info_keep = --only-keep-debug
debug_info_strip = --strip-debug
}
QMAKE_SEPARATE_DEBUG_INFO = test -z \"$(DESTDIR)\" || cd \"$(DESTDIR)\" ; targ=`basename $(TARGET)`; $$QMAKE_OBJCOPY $$debug_info_keep \"\$\$targ\" \"\$\$targ.$$debug_info_suffix\" && $$QMAKE_OBJCOPY $$debug_info_strip \"\$\$targ\" && $$QMAKE_OBJCOPY --add-gnu-debuglink=\"\$\$targ.$$debug_info_suffix\" \"\$\$targ\" && chmod -x \"\$\$targ.$$debug_info_suffix\"
QMAKE_INSTALL_SEPARATE_DEBUG_INFO = test -z \"$(DESTDIR)\" || cd \"$(DESTDIR)\" ; $(INSTALL_FILE) `basename $(TARGET)`.$$debug_info_suffix $(INSTALL_ROOT)/\$\$target_path/
!isEmpty(QMAKE_POST_LINK):QMAKE_POST_LINK = $$escape_expand(\\n\\t)$$QMAKE_POST_LINK

View File

@ -21,6 +21,7 @@ wince* {
QMAKE_LIBDIR += $$QMAKE_LIBDIR_OPENGL_ES2_RELEASE
}
DEFINES += QT_OPENGL_ES_2 QT_OPENGL_ES_2_ANGLE
contains(QT_CONFIG, static): DEFINES += QT_OPENGL_ES_2_ANGLE_STATIC
QT_CONFIG -= opengl
} else {
QMAKE_LIBS += $$QMAKE_LIBS_OPENGL

View File

@ -24,7 +24,6 @@ QMAKE_LIBS =
QMAKE_LIBS_DYNLOAD =
QMAKE_LIBS_X11 = -lXext -lX11 -lm
QMAKE_LIBS_OPENGL = -lGL
QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_LIBS_THREAD =
QMAKE_AR = ar cqs

Some files were not shown because too many files have changed in this diff Show More