Merge remote-tracking branch 'gerrit/master' into containers
Conflicts: src/corelib/tools/qbytearray.h Change-Id: I03b1f3e05c9b7a45130887c522fcd9b7aa387129
This commit is contained in:
commit
31a0358afb
2
.gitignore
vendored
2
.gitignore
vendored
@ -112,6 +112,8 @@ tests/auto/qmake/testdata/quotedfilenames/*.exe
|
||||
tests/auto/compilerwarnings/*.exe
|
||||
tests/auto/qmake/testdata/quotedfilenames/test.cpp
|
||||
tests/auto/qprocess/fileWriterProcess.txt
|
||||
tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/mime/
|
||||
tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/mime/
|
||||
.com.apple.timemachine.supported
|
||||
tests/auto/qlibrary/libmylib.so*
|
||||
tests/auto/qresourceengine/runtime_resource.rcc
|
||||
|
21
bin/syncqt
21
bin/syncqt
@ -607,22 +607,14 @@ sub loadSyncProfile {
|
||||
sub locateSyncProfile
|
||||
{
|
||||
my ($directory) = @_;
|
||||
my $syncprofile;
|
||||
$directory = abs_path($directory);
|
||||
while(!defined $syncprofile) {
|
||||
local(*D);
|
||||
if (opendir(D, $directory)) {
|
||||
foreach my $file (sort readdir(D)) {
|
||||
next if ($file =~ /^\.\.?$/);
|
||||
$syncprofile = "$directory/$file" if ($file =~ /^sync\.profile$/);
|
||||
last if (defined $syncprofile);
|
||||
}
|
||||
closedir(D);
|
||||
}
|
||||
last if (defined $syncprofile || $directory eq "/" || $directory =~ /^?:[\/\\]$/);
|
||||
while (1) {
|
||||
my $file = $directory."/sync.profile";
|
||||
return $file if (-e $file);
|
||||
my $odir = $directory;
|
||||
$directory = dirname($directory);
|
||||
return undef if ($directory eq $odir);
|
||||
}
|
||||
return $syncprofile;
|
||||
}
|
||||
|
||||
# check if this is an in-source build, and if so use that as the basedir too
|
||||
@ -1138,6 +1130,9 @@ foreach my $lib (@modules_to_sync) {
|
||||
my $guard = "DEPRECATED_HEADER_" . $lib . "_" . $header;
|
||||
$guard =~ s/([^a-zA-Z0-9_])/_/g;
|
||||
|
||||
my $header_dir = dirname($header_path);
|
||||
make_path($header_dir, $lib, $verbose_level);
|
||||
|
||||
open HEADER, ">$header_path" || die "Could not open $header_path for writing!\n";
|
||||
print HEADER "#ifndef $guard\n";
|
||||
print HEADER "#define $guard\n";
|
||||
|
@ -1,71 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
SUCCESS=no
|
||||
QMKSPEC=$1
|
||||
XPLATFORM=`basename "$1"`
|
||||
QMAKE_CONFIG=$2
|
||||
VERBOSE=$3
|
||||
SRCDIR=$4
|
||||
OUTDIR=$5
|
||||
TEST=$6
|
||||
EXE=`basename "$6"`
|
||||
ARG=$7
|
||||
shift 7
|
||||
LFLAGS=""
|
||||
INCLUDEPATH=""
|
||||
CXXFLAGS=""
|
||||
while [ "$#" -gt 0 ]; do
|
||||
PARAM=$1
|
||||
case $PARAM in
|
||||
-framework)
|
||||
LFLAGS="$LFLAGS -framework \"$2\""
|
||||
shift
|
||||
;;
|
||||
-F*|-m*|-x*)
|
||||
LFLAGS="$LFLAGS $PARAM"
|
||||
CXXFLAGS="$CXXFLAGS $PARAM"
|
||||
;;
|
||||
-L*|-l*|-pthread)
|
||||
LFLAGS="$LFLAGS $PARAM"
|
||||
;;
|
||||
-I*)
|
||||
INC=`echo $PARAM | sed -e 's/^-I//'`
|
||||
INCLUDEPATH="$INCLUDEPATH $INC"
|
||||
;;
|
||||
-f*|-D*)
|
||||
CXXFLAGS="$CXXFLAGS $PARAM"
|
||||
;;
|
||||
-Qoption)
|
||||
# Two-argument form for the Sun Compiler
|
||||
CXXFLAGS="$CXXFLAGS $PARAM \"$2\""
|
||||
shift
|
||||
;;
|
||||
*) ;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
# debuggery
|
||||
[ "$VERBOSE" = "yes" ] && echo "$DESCRIPTION auto-detection... ($*)"
|
||||
|
||||
test -d "$OUTDIR/$TEST" || mkdir -p "$OUTDIR/$TEST"
|
||||
|
||||
cd "$OUTDIR/$TEST"
|
||||
|
||||
$MAKE distclean >/dev/null 2>&1
|
||||
"$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "CONFIG+=$QMAKE_CONFIG" "LIBS*=$LFLAGS" "INCLUDEPATH*=$INCLUDEPATH" "QMAKE_CXXFLAGS*=$CXXFLAGS" "QT_BUILD_TREE=$OUTDIR" "$SRCDIR/$TEST/$EXE.pro" -o "$OUTDIR/$TEST/Makefile"
|
||||
|
||||
if [ "$VERBOSE" = "yes" ]; then
|
||||
$MAKE
|
||||
else
|
||||
$MAKE >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
|
||||
if [ -x "$EXE" ]; then
|
||||
foo=`$OUTDIR/$TEST/$EXE $ARG`
|
||||
echo "$foo"
|
||||
else
|
||||
echo "'CUTE'" #1129665605 # == 'CUTE'
|
||||
fi
|
||||
|
@ -1,2 +0,0 @@
|
||||
SOURCES = main.cpp
|
||||
CONFIG -= app_bundle qt
|
@ -1,108 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** Contact: http://www.qt-project.org/
|
||||
**
|
||||
** This file is part of the config.tests of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** GNU Lesser General Public License Usage
|
||||
** 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, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia 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.
|
||||
**
|
||||
** Other Usage
|
||||
** Alternatively, this file may be used in accordance with the terms and
|
||||
** conditions contained in a signed written agreement between you and Nokia.
|
||||
**
|
||||
**
|
||||
**
|
||||
**
|
||||
**
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include <iostream>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
||||
|
||||
class CCRC32
|
||||
{
|
||||
public:
|
||||
CCRC32() { initialize(); }
|
||||
|
||||
unsigned long FullCRC(const unsigned char *sData, unsigned long ulDataLength)
|
||||
{
|
||||
unsigned long ulCRC = 0xffffffff;
|
||||
PartialCRC(&ulCRC, sData, ulDataLength);
|
||||
return(ulCRC ^ 0xffffffff);
|
||||
}
|
||||
|
||||
void PartialCRC(unsigned long *ulCRC, const unsigned char *sData, unsigned long ulDataLength)
|
||||
{
|
||||
while(ulDataLength--) {
|
||||
*ulCRC = (*ulCRC >> 8) ^ ulTable[(*ulCRC & 0xFF) ^ *sData++];
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
void initialize(void)
|
||||
{
|
||||
unsigned long ulPolynomial = 0x04C11DB7;
|
||||
memset(&ulTable, 0, sizeof(ulTable));
|
||||
for(int iCodes = 0; iCodes <= 0xFF; iCodes++) {
|
||||
ulTable[iCodes] = Reflect(iCodes, 8) << 24;
|
||||
for(int iPos = 0; iPos < 8; iPos++) {
|
||||
ulTable[iCodes] = ((ulTable[iCodes] << 1) & 0xffffffff)
|
||||
^ ((ulTable[iCodes] & (1 << 31)) ? ulPolynomial : 0);
|
||||
}
|
||||
|
||||
ulTable[iCodes] = Reflect(ulTable[iCodes], 32);
|
||||
}
|
||||
}
|
||||
unsigned long Reflect(unsigned long ulReflect, const char cChar)
|
||||
{
|
||||
unsigned long ulValue = 0;
|
||||
// Swap bit 0 for bit 7, bit 1 For bit 6, etc....
|
||||
for(int iPos = 1; iPos < (cChar + 1); iPos++) {
|
||||
if(ulReflect & 1) {
|
||||
ulValue |= (1ul << (cChar - iPos));
|
||||
}
|
||||
ulReflect >>= 1;
|
||||
}
|
||||
return ulValue;
|
||||
}
|
||||
unsigned long ulTable[256]; // CRC lookup table array.
|
||||
};
|
||||
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
CCRC32 crc;
|
||||
char *name;
|
||||
if (argc < 2) {
|
||||
std::cerr << "usage: crc <string>\n";
|
||||
return 0;
|
||||
} else {
|
||||
name = argv[1];
|
||||
}
|
||||
std::cout << crc.FullCRC((unsigned char *)name, strlen(name)) << std::endl;
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
COMPILER=$1
|
||||
VERBOSE=$2
|
||||
WORKDIR=$3
|
||||
QT_MAC_DEFAULT_ARCH=
|
||||
|
||||
touch defaultarch.c
|
||||
|
||||
# compile something and run 'file' on it.
|
||||
if "$COMPILER" -c defaultarch.c 2>/dev/null 1>&2; then
|
||||
FIlE_OUTPUT=`file defaultarch.o`
|
||||
[ "$VERBOSE" = "yes" ] && echo "'file' reports compiler ($COMPILER) default architechture as: $FIlE_OUTPUT"
|
||||
|
||||
fi
|
||||
rm -f defaultarch.c defaultarch.o
|
||||
|
||||
# detect our known archs.
|
||||
if echo "$FIlE_OUTPUT" | grep '\<i386\>' > /dev/null 2>&1; then
|
||||
QT_MAC_DEFAULT_ARCH=x86 # configure knows it as "x86" not "i386"
|
||||
fi
|
||||
if echo "$FIlE_OUTPUT" | grep '\<x86_64\>' > /dev/null 2>&1; then
|
||||
QT_MAC_DEFAULT_ARCH=x86_64
|
||||
fi
|
||||
if echo "$FIlE_OUTPUT" | grep '\<ppc\>' > /dev/null 2>&1; then
|
||||
QT_MAC_DEFAULT_ARCH=ppc
|
||||
fi
|
||||
if echo "$FIlE_OUTPUT" | grep '\<ppc64\>' > /dev/null 2>&1; then
|
||||
QT_MAC_DEFAULT_ARCH=ppc64
|
||||
fi
|
||||
|
||||
[ "$VERBOSE" = "yes" ] && echo "setting QT_MAC_DEFAULT_ARCH to \"$QT_MAC_DEFAULT_ARCH\""
|
||||
export QT_MAC_DEFAULT_ARCH
|
@ -1,26 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
XARCH_SUPPORT=no
|
||||
COMPILER=$1
|
||||
VERBOSE=$2
|
||||
WORKDIR=$3
|
||||
|
||||
touch xarch.c
|
||||
|
||||
if "$COMPILER" -c xarch.c -Xarch_i386 -mmmx 2>/dev/null 1>&2; then
|
||||
if "$COMPILER" -c xarch.c -Xarch_i386 -mmmx 2>&1 | grep "unrecognized" >/dev/null ; then
|
||||
true
|
||||
else
|
||||
XARCH_SUPPORT=yes
|
||||
fi
|
||||
fi
|
||||
rm -f xarch.c xarch.o
|
||||
|
||||
# done
|
||||
if [ "$XARCH_SUPPORT" != "yes" ]; then
|
||||
[ "$VERBOSE" = "yes" ] && echo "Xarch is not supported"
|
||||
exit 0
|
||||
else
|
||||
[ "$VERBOSE" = "yes" ] && echo "Xarch support detected"
|
||||
exit 1
|
||||
fi
|
@ -4,13 +4,14 @@ QMKSPEC=$1
|
||||
VERBOSE=$2
|
||||
SRCDIR=$3
|
||||
OUTDIR=$4
|
||||
QMFLAGS=$5
|
||||
|
||||
# debuggery
|
||||
[ "$VERBOSE" = "yes" ] && echo "Determining machine byte-order... ($*)"
|
||||
|
||||
# build and run a test program
|
||||
test -d "$OUTDIR/config.tests/unix/endian" || mkdir -p "$OUTDIR/config.tests/unix/endian"
|
||||
"$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "QT_BUILD_TREE=$OUTDIR" "QMAKE_LFLAGS+=$SYSROOT_FLAG" "$SRCDIR/config.tests/unix/endian/endiantest.pro" -o "$OUTDIR/config.tests/unix/endian/Makefile" >/dev/null 2>&1
|
||||
"$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "QT_BUILD_TREE=$OUTDIR" $QMFLAGS "$SRCDIR/config.tests/unix/endian/endiantest.pro" -o "$OUTDIR/config.tests/unix/endian/Makefile" >/dev/null 2>&1
|
||||
cd "$OUTDIR/config.tests/unix/endian"
|
||||
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** Contact: http://www.qt-project.org/
|
||||
**
|
||||
** 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$
|
||||
** GNU Lesser General Public License Usage
|
||||
@ -39,28 +39,21 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QATOMIC_ARM_H
|
||||
#define QATOMIC_ARM_H
|
||||
#include <linux/input.h>
|
||||
|
||||
#if defined(__ARM_ARCH_7__) \
|
||||
|| defined(__ARM_ARCH_7A__) \
|
||||
|| defined(__ARM_ARCH_7R__) \
|
||||
|| defined(__ARM_ARCH_7M__)
|
||||
# define QT_ARCH_ARMV7
|
||||
# include "QtCore/qatomic_armv7.h"
|
||||
#elif defined(__ARM_ARCH_6__) \
|
||||
|| defined(__ARM_ARCH_6J__) \
|
||||
|| defined(__ARM_ARCH_6T2__) \
|
||||
|| defined(__ARM_ARCH_6Z__) \
|
||||
|| defined(__ARM_ARCH_6K__) \
|
||||
|| defined(__ARM_ARCH_6ZK__) \
|
||||
|| defined(__ARM_ARCH_6M__) \
|
||||
|| (defined(__TARGET_ARCH_ARM) && (__TARGET_ARCH_ARM-0 >= 6))
|
||||
# define QT_ARCH_ARMV6
|
||||
# include "QtCore/qatomic_armv6.h"
|
||||
#else
|
||||
# define QT_ARCH_ARMV5
|
||||
# include "QtCore/qatomic_armv5.h"
|
||||
#endif
|
||||
enum {
|
||||
e1 = ABS_MT_POSITION_X,
|
||||
e2 = ABS_MT_TRACKING_ID,
|
||||
e3 = ABS_PRESSURE,
|
||||
e4 = ABS_X,
|
||||
e5 = REL_X,
|
||||
e6 = SYN_REPORT,
|
||||
e7 = SYN_MT_REPORT
|
||||
};
|
||||
|
||||
#endif // QATOMIC_ARM_H
|
||||
int main()
|
||||
{
|
||||
::input_event buf[32];
|
||||
(void) buf;
|
||||
return 0;
|
||||
}
|
2
config.tests/unix/evdev/evdev.pro
Normal file
2
config.tests/unix/evdev/evdev.pro
Normal file
@ -0,0 +1,2 @@
|
||||
SOURCES = evdev.cpp
|
||||
CONFIG -= qt
|
49
config.tests/unix/libudev/libudev.cpp
Normal file
49
config.tests/unix/libudev/libudev.cpp
Normal file
@ -0,0 +1,49 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** Contact: http://www.qt-project.org/
|
||||
**
|
||||
** This file is part of the config.tests of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** GNU Lesser General Public License Usage
|
||||
** 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, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia 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.
|
||||
**
|
||||
** Other Usage
|
||||
** Alternatively, this file may be used in accordance with the terms and
|
||||
** conditions contained in a signed written agreement between you and Nokia.
|
||||
**
|
||||
**
|
||||
**
|
||||
**
|
||||
**
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include <libudev.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
udev *u = udev_new();
|
||||
udev_unref(u);
|
||||
return 0;
|
||||
}
|
3
config.tests/unix/libudev/libudev.pro
Normal file
3
config.tests/unix/libudev/libudev.pro
Normal file
@ -0,0 +1,3 @@
|
||||
SOURCES = libudev.cpp
|
||||
CONFIG -= qt
|
||||
LIBS += -ludev
|
263
configure
vendored
263
configure
vendored
@ -278,12 +278,6 @@ earlyArgParse()
|
||||
VAL=$1
|
||||
fi
|
||||
;;
|
||||
-nacl)
|
||||
shift;
|
||||
VAR=nacl
|
||||
VAL=$1
|
||||
;;
|
||||
|
||||
-h|help|--help|-help)
|
||||
if [ "$VAL" = "yes" ]; then
|
||||
OPT_HELP="$VAL"
|
||||
@ -334,15 +328,6 @@ earlyArgParse()
|
||||
CFG_EMBEDDED=no
|
||||
fi
|
||||
;;
|
||||
nacl)
|
||||
echo "Using NaCl at $VAL."
|
||||
PLATFORM_X11=no
|
||||
PLATFORM_MAC=no
|
||||
PLATFORM_QWS=no
|
||||
CFG_NACL_PATH=$VAL
|
||||
CFG_EMBEDDED=nacl
|
||||
;;
|
||||
|
||||
developer-build)
|
||||
CFG_DEV="yes"
|
||||
;;
|
||||
@ -727,6 +712,8 @@ CFG_XKB=auto
|
||||
CFG_XCB=auto
|
||||
CFG_XCB_LIMITED=yes
|
||||
CFG_WAYLAND=auto
|
||||
CFG_LIBUDEV=auto
|
||||
CFG_EVDEV=auto
|
||||
CFG_NIS=auto
|
||||
CFG_CUPS=auto
|
||||
CFG_ICONV=auto
|
||||
@ -772,7 +759,6 @@ CFG_FRAMEWORK=auto
|
||||
CFG_MAC_ARCHS=
|
||||
MAC_CONFIG_TEST_COMMANDLINE= # used to make the configure tests run with the correct arch's and SDK settings
|
||||
CFG_MAC_DWARF2=auto
|
||||
CFG_MAC_XARCH=auto
|
||||
CFG_MAC_HARFBUZZ=no
|
||||
CFG_SXE=no
|
||||
CFG_PREFIX_INSTALL=yes
|
||||
@ -912,36 +898,6 @@ if [ -d "$relpath/src/plugins/imageformats" ]; then
|
||||
done
|
||||
fi
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Set Default NaCl options
|
||||
#-------------------------------------------------------------------------------
|
||||
if [ "$CFG_EMBEDDED" = "nacl" ]; then
|
||||
echo "Setting NaCl options:"
|
||||
echo "-static"
|
||||
CFG_SHARED=no
|
||||
echo "-qpa nacl"
|
||||
PLATFORM_QPA=yes
|
||||
echo "-fast"
|
||||
OPT_FAST=yes
|
||||
echo "-qconfig nacl"
|
||||
CFG_QCONFIG=nacl
|
||||
|
||||
if [ `uname` = "Linux" ]; then
|
||||
I_FLAGS="$I_FLAGS -I${CFG_NACL_PATH}/toolchain/linux_x86/sdk/nacl-sdk/include"
|
||||
L_FLAGS="$L_FLAGS -I${CFG_NACL_PATH}/toolchain/linux_x86/sdk/nacl-sdk/lib"
|
||||
else
|
||||
I_FLAGS="$I_FLAGS -I${CFG_NACL_PATH}/toolchain/mac_x86/sdk/nacl-sdk/include"
|
||||
L_FLAGS="$L_FLAGS -I${CFG_NACL_PATH}/toolchain/mac_x86/sdk/nacl-sdk/lib"
|
||||
fi
|
||||
|
||||
echo "-no-mediaservices -no-sql-sqlite -nomake tests"
|
||||
CFG_MEDIASERVICES=no
|
||||
CFG_SQLITE=no
|
||||
CFG_SQL_sqlite=no
|
||||
CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS tests"
|
||||
QT_CONFIG="$QT_CONFIG nacl"
|
||||
fi
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# parse command line arguments
|
||||
#-------------------------------------------------------------------------------
|
||||
@ -1039,10 +995,6 @@ while [ "$#" -gt 0 ]; do
|
||||
VAL=$1
|
||||
fi
|
||||
;;
|
||||
-nacl)
|
||||
VAR=nacl
|
||||
shift;
|
||||
;;
|
||||
-opengl)
|
||||
VAR=opengl
|
||||
# this option may or may not be followed by an argument
|
||||
@ -1269,8 +1221,6 @@ while [ "$#" -gt 0 ]; do
|
||||
PLATFORM_QWS=no
|
||||
PLATFORM_QPA=yes
|
||||
;;
|
||||
nacl)
|
||||
;;
|
||||
sse)
|
||||
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
||||
CFG_SSE="$VAL"
|
||||
@ -1355,7 +1305,7 @@ while [ "$#" -gt 0 ]; do
|
||||
PLATFORM_X11=yes
|
||||
;;
|
||||
sdk)
|
||||
if [ "$PLATFORM_MAC" = "yes" ]; then
|
||||
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
||||
CFG_SDK="$VAL"
|
||||
else
|
||||
UNKNOWN_OPT=yes
|
||||
@ -1381,7 +1331,7 @@ while [ "$#" -gt 0 ]; do
|
||||
CFG_HOST_ARCH=$VAL
|
||||
;;
|
||||
harfbuzz)
|
||||
if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
|
||||
if [ "$BUILD_ON_MAC" = "yes" ] && [ "$VAL" = "yes" ]; then
|
||||
CFG_MAC_HARFBUZZ="$VAL"
|
||||
else
|
||||
UNKNOWN_OPT=yes
|
||||
@ -1389,7 +1339,7 @@ while [ "$#" -gt 0 ]; do
|
||||
;;
|
||||
|
||||
framework)
|
||||
if [ "$PLATFORM_MAC" = "yes" ] || [ "$PLATFORM_QPA" = "yes" ]; then
|
||||
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
||||
CFG_FRAMEWORK="$VAL"
|
||||
else
|
||||
UNKNOWN_OPT=yes
|
||||
@ -1843,6 +1793,20 @@ while [ "$#" -gt 0 ]; do
|
||||
UNKNOWN_OPT=yes
|
||||
fi
|
||||
;;
|
||||
libudev)
|
||||
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
||||
CFG_LIBUDEV="$VAL"
|
||||
else
|
||||
UNKNOWN_OPT=yes
|
||||
fi
|
||||
;;
|
||||
evdev)
|
||||
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
||||
CFG_EVDEV="$VAL"
|
||||
else
|
||||
UNKNOWN_OPT=yes
|
||||
fi
|
||||
;;
|
||||
cups)
|
||||
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
|
||||
CFG_CUPS="$VAL"
|
||||
@ -2128,7 +2092,7 @@ while [ "$#" -gt 0 ]; do
|
||||
l_FLAGS="$l_FLAGS -l\"${VAL}\""
|
||||
;;
|
||||
add_fpath)
|
||||
if [ "$PLATFORM_MAC" = "yes" ]; then
|
||||
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
||||
L_FLAGS="$L_FLAGS -F\"${VAL}\""
|
||||
I_FLAGS="$I_FLAGS -F\"${VAL}\""
|
||||
else
|
||||
@ -2136,7 +2100,7 @@ while [ "$#" -gt 0 ]; do
|
||||
fi
|
||||
;;
|
||||
add_framework)
|
||||
if [ "$PLATFORM_MAC" = "yes" ]; then
|
||||
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
||||
l_FLAGS="$l_FLAGS -framework \"${VAL}\""
|
||||
else
|
||||
UNKNOWN_OPT=yes
|
||||
@ -2487,7 +2451,7 @@ if [ -z "$PLATFORM" ]; then
|
||||
PLATFORM_NOTES=
|
||||
case "$UNAME_SYSTEM:$UNAME_RELEASE" in
|
||||
Darwin:*)
|
||||
if [ "$PLATFORM_MAC" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
|
||||
if [ "$PLATFORM_QPA" = "yes" ]; then
|
||||
OSX_VERSION=`uname -r | cut -d. -f1`
|
||||
if [ "$OSX_VERSION" -ge 11 ]; then
|
||||
# We're on Lion or above. Check if we have a supported Clang version
|
||||
@ -2688,7 +2652,7 @@ if [ "$PLATFORM" != "$XPLATFORM" ]; then
|
||||
QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
|
||||
fi
|
||||
|
||||
if [ "$PLATFORM_MAC" = "yes" ]; then
|
||||
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
||||
if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
|
||||
echo >&2
|
||||
echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
|
||||
@ -3027,7 +2991,7 @@ if [ '!' -z "$CFG_SDK" ]; then
|
||||
fi
|
||||
|
||||
# find the default framework value
|
||||
if [ "$PLATFORM_MAC" = "yes" ]; then
|
||||
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
||||
if [ "$CFG_FRAMEWORK" = "auto" ]; then
|
||||
CFG_FRAMEWORK="$CFG_SHARED"
|
||||
elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
|
||||
@ -3041,9 +3005,8 @@ else
|
||||
fi
|
||||
|
||||
QMAKE_CONF_COMPILER=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_CXX[^_A-Z0-9]" | sed "s,.* *= *\(.*\)$,\1," | tail -1`
|
||||
TEST_COMPILER="$CXX"
|
||||
|
||||
[ -z "$TEST_COMPILER" ] && TEST_COMPILER=$QMAKE_CONF_COMPILER
|
||||
TEST_COMPILER=$QMAKE_CONF_COMPILER
|
||||
if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
|
||||
if [ -z "$TEST_COMPILER" ]; then
|
||||
echo "ERROR: Cannot set the compiler for the configuration tests"
|
||||
@ -3051,10 +3014,6 @@ if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CFG_EMBEDDED" = "nacl" ]; then
|
||||
TEST_COMPILER="nacl-gcc"
|
||||
fi
|
||||
|
||||
SYSROOT_FLAG=
|
||||
if [ -n "$CFG_SYSROOT" ]; then
|
||||
if compilerSupportsFlag --sysroot="$CFG_SYSROOT"; then
|
||||
@ -3077,7 +3036,7 @@ if [ "$CFG_PRECOMPILE" = "auto" ]; then
|
||||
fi
|
||||
|
||||
#auto-detect DWARF2 on the mac
|
||||
if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then
|
||||
if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then
|
||||
if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then
|
||||
CFG_MAC_DWARF2=no
|
||||
else
|
||||
@ -3141,15 +3100,8 @@ if [ "$PLATFORM_QWS" = "yes" ] && [ "$CFG_OPENGL" = "auto" ]; then
|
||||
CFG_OPENGL=no
|
||||
fi
|
||||
|
||||
# mac
|
||||
if [ "$PLATFORM_MAC" = "yes" ]; then
|
||||
if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
|
||||
CFG_OPENGL=desktop
|
||||
fi
|
||||
fi
|
||||
|
||||
# find the default framework value
|
||||
if [ "$PLATFORM_MAC" = "yes" ]; then
|
||||
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
||||
if [ "$CFG_FRAMEWORK" = "auto" ]; then
|
||||
CFG_FRAMEWORK="$CFG_SHARED"
|
||||
elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
|
||||
@ -3162,18 +3114,6 @@ else
|
||||
CFG_FRAMEWORK=no
|
||||
fi
|
||||
|
||||
# Print a warning if configure was called with the 10.4u SDK option on Snow Leopard
|
||||
# with the default mkspec. The 10.4u SDK does not support gcc 4.2.
|
||||
if [ "$PLATFORM_MAC" = "yes" ] && [ '!' -z "$CFG_SDK" ]; then
|
||||
# get the darwin version. 10.0.0 and up means snow leopard.
|
||||
VERSION=`uname -r | tr '.' ' ' | awk '{print $1}'`
|
||||
if [ "$VERSION" -gt 9 ] && [ "$CFG_SDK" == "/Developer/SDKs/MacOSX10.4u.sdk/" ] && [ "$PLATFORM" == "macx-g++" ]; then
|
||||
echo
|
||||
echo "WARNING: The 10.4u SDK does not support gcc 4.2. Configure with -platform macx-g++40. "
|
||||
echo
|
||||
fi
|
||||
fi
|
||||
|
||||
# x11 tests are done after qmake is built
|
||||
|
||||
|
||||
@ -3211,7 +3151,7 @@ QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
|
||||
|
||||
if [ -z "$QT_INSTALL_DOCS" ]; then #default
|
||||
if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
|
||||
if [ "$PLATFORM_MAC" = "yes" ]; then
|
||||
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
||||
QT_INSTALL_DOCS="/Developer/Documentation/Qt"
|
||||
fi
|
||||
fi
|
||||
@ -3222,7 +3162,7 @@ QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
|
||||
|
||||
if [ -z "$QT_INSTALL_HEADERS" ]; then #default
|
||||
if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
|
||||
if [ "$PLATFORM_MAC" = "yes" ]; then
|
||||
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
||||
if [ "$CFG_FRAMEWORK" = "yes" ]; then
|
||||
QT_INSTALL_HEADERS=
|
||||
fi
|
||||
@ -3235,7 +3175,7 @@ QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
|
||||
|
||||
if [ -z "$QT_INSTALL_LIBS" ]; then #default
|
||||
if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
|
||||
if [ "$PLATFORM_MAC" = "yes" ]; then
|
||||
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
||||
if [ "$CFG_FRAMEWORK" = "yes" ]; then
|
||||
QT_INSTALL_LIBS="/Libraries/Frameworks"
|
||||
fi
|
||||
@ -3247,7 +3187,7 @@ QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
|
||||
|
||||
if [ -z "$QT_INSTALL_BINS" ]; then #default
|
||||
if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
|
||||
if [ "$PLATFORM_MAC" = "yes" ]; then
|
||||
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
||||
QT_INSTALL_BINS="/Developer/Applications/Qt"
|
||||
fi
|
||||
fi
|
||||
@ -3257,7 +3197,7 @@ QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
|
||||
|
||||
if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
|
||||
if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
|
||||
if [ "$PLATFORM_MAC" = "yes" ]; then
|
||||
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
||||
QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
|
||||
fi
|
||||
fi
|
||||
@ -3267,7 +3207,7 @@ QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
|
||||
|
||||
if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
|
||||
if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
|
||||
if [ "$PLATFORM_MAC" = "yes" ]; then
|
||||
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
||||
QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
|
||||
fi
|
||||
fi
|
||||
@ -3286,7 +3226,7 @@ fi
|
||||
QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
|
||||
|
||||
if [ -z "$QT_INSTALL_SETTINGS" ]; then #default
|
||||
if [ "$PLATFORM_MAC" = "yes" ]; then
|
||||
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
||||
QT_INSTALL_SETTINGS=/Library/Preferences/Qt
|
||||
else
|
||||
QT_INSTALL_SETTINGS=/etc/xdg
|
||||
@ -3296,7 +3236,7 @@ QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"
|
||||
|
||||
if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
|
||||
if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
|
||||
if [ "$PLATFORM_MAC" = "yes" ]; then
|
||||
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
||||
QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
|
||||
fi
|
||||
fi
|
||||
@ -3307,7 +3247,7 @@ QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"
|
||||
#tests
|
||||
if [ -z "$QT_INSTALL_TESTS" ]; then #default
|
||||
if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
|
||||
if [ "$PLATFORM_MAC" = "yes" ]; then
|
||||
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
||||
QT_INSTALL_TESTS="/Developer/Tests/Qt"
|
||||
fi
|
||||
fi
|
||||
@ -4053,8 +3993,6 @@ if [ "$PLATFORM_QWS" = "yes" ]; then
|
||||
Platform="Qt for Embedded Linux"
|
||||
elif [ "$PLATFORM_QPA" = "yes" ]; then
|
||||
Platform="Qt Lighthouse"
|
||||
elif [ "$PLATFORM_MAC" = "yes" ]; then
|
||||
Platform="Qt for Mac OS X"
|
||||
elif [ "$XPLATFORM_MINGW" = "yes" ]; then
|
||||
Platform="Qt for Windows"
|
||||
elif [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ]; then
|
||||
@ -4478,14 +4416,12 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ];
|
||||
EXTRA_LFLAGS="$EXTRA_LFLAGS -lm"
|
||||
fi
|
||||
|
||||
[ -n "$CC" ] && echo "CC = $CC" >> "$mkfile"
|
||||
[ -n "$CXX" ] && echo "CXX = $CXX" >> "$mkfile"
|
||||
if [ "$CFG_SILENT" = "yes" ]; then
|
||||
[ -z "$CC" ] && setBootstrapVariable QMAKE_CC 's,QMAKE_CC.*=,CC=\@,'
|
||||
[ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX.*=,CXX=\@,'
|
||||
setBootstrapVariable QMAKE_CC 's,QMAKE_CC.*=,CC=\@,'
|
||||
setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX.*=,CXX=\@,'
|
||||
else
|
||||
[ -z "$CC" ] && setBootstrapVariable QMAKE_CC 's,QMAKE_CC,CC,'
|
||||
[ -z "$CXX" ] && setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX,CXX,'
|
||||
setBootstrapVariable QMAKE_CC 's,QMAKE_CC,CC,'
|
||||
setBootstrapVariable QMAKE_CXX 's,QMAKE_CXX,CXX,'
|
||||
fi
|
||||
setBootstrapVariable QMAKE_CFLAGS
|
||||
setBootstrapVariable QMAKE_CXXFLAGS 's,\$\$QMAKE_CFLAGS,\$(QMAKE_CFLAGS),'
|
||||
@ -4833,7 +4769,7 @@ for _SQLDR in $CFG_SQL_AVAILABLE; do
|
||||
;;
|
||||
odbc)
|
||||
if [ "$CFG_SQL_odbc" != "no" ]; then
|
||||
if ( [ "$PLATFORM_MAC" != "yes" ] || [ "$XPLATFORM_MINGW" = "yes" ] ) && "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/odbc "ODBC" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
|
||||
if ( [ "$BUILD_ON_MAC" != "yes" ] || [ "$XPLATFORM_MINGW" = "yes" ] ) && "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/odbc "ODBC" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
|
||||
if [ "$CFG_SQL_odbc" = "auto" ]; then
|
||||
CFG_SQL_odbc=plugin
|
||||
fi
|
||||
@ -5543,7 +5479,7 @@ if [ "$PLATFORM_X11" = "yes" ]; then
|
||||
fi # X11
|
||||
|
||||
|
||||
if [ "$PLATFORM_MAC" = "yes" ]; then
|
||||
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
||||
if [ "$CFG_PHONON" != "no" ]; then
|
||||
# Always enable Phonon (unless it was explicitly disabled)
|
||||
CFG_PHONON=yes
|
||||
@ -5561,9 +5497,7 @@ fi
|
||||
|
||||
if [ "$PLATFORM_QPA" = "yes" ]; then
|
||||
# auto-detect OpenGL support (es2 = OpenGL ES 2.x)
|
||||
if [ "$PLATFORM_MAC" = "yes" ]; then
|
||||
CFG_OPENGL=desktop
|
||||
elif [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
|
||||
if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
|
||||
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
|
||||
CFG_OPENGL=desktop
|
||||
elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS; then
|
||||
@ -5651,6 +5585,32 @@ if [ "$PLATFORM_QPA" = "yes" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CFG_LIBUDEV" != "no" ]; then
|
||||
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/libudev "libudev" $L_FLAGS $I_FLAGS $l_FLAGS; then
|
||||
CFG_LIBUDEV=yes
|
||||
QT_CONFIG="$QT_CONFIG libudev"
|
||||
elif [ "$CFG_LIBUDEV" = "yes" ]; then
|
||||
echo "The libudev functionality test failed!"
|
||||
exit 1
|
||||
else
|
||||
CFG_LIBUDEV=no
|
||||
QMakeVar add DEFINES QT_NO_LIBUDEV
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CFG_EVDEV" != "no" ]; then
|
||||
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/evdev "evdev" $L_FLAGS $I_FLAGS $l_FLAGS; then
|
||||
CFG_EVDEV=yes
|
||||
QT_CONFIG="$QT_CONFIG evdev"
|
||||
elif [ "$CFG_EVDEV" = "yes" ]; then
|
||||
echo "The evdev functionality test failed!"
|
||||
exit 1
|
||||
else
|
||||
CFG_EVDEV=no
|
||||
QMakeVar add DEFINES QT_NO_EVDEV
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check we actually have X11 :-)
|
||||
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
|
||||
QT_CONFIG="$QT_CONFIG xlib"
|
||||
@ -5675,18 +5635,22 @@ if [ "$PLATFORM_QPA" = "yes" ]; then
|
||||
fi
|
||||
|
||||
if [ "$CFG_XCB" != "no" ]; then
|
||||
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb "xcb" $L_FLAGS $I_FLAGS $l_FLAGS; then
|
||||
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xcb 2>/dev/null; then
|
||||
QMAKE_CFLAGS_XCB="`$PKG_CONFIG --cflags xcb 2>/dev/null`"
|
||||
QMAKE_LIBS_XCB="`$PKG_CONFIG --libs xcb 2>/dev/null`"
|
||||
fi
|
||||
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb "xcb" $L_FLAGS $I_FLAGS $l_FLAGS $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
|
||||
CFG_XCB=yes
|
||||
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb-render "xcb-render" $L_FLAGS $I_FLAGS $l_FLAGS; then
|
||||
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb-render "xcb-render" $L_FLAGS $I_FLAGS $l_FLAGS $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
|
||||
QT_CONFIG="$QT_CONFIG xcb-render"
|
||||
fi
|
||||
|
||||
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb-poll-for-queued-event "xcb-poll-for-queued-event" $L_FLAGS $I_FLAGS $l_FLAGS; then
|
||||
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb-poll-for-queued-event "xcb-poll-for-queued-event" $L_FLAGS $I_FLAGS $l_FLAGS $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
|
||||
CFG_XCB_LIMITED=no
|
||||
QT_CONFIG="$QT_CONFIG xcb-poll-for-queued-event"
|
||||
fi
|
||||
|
||||
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb-xlib "xcb-xlib" $L_FLAGS $I_FLAGS $l_FLAGS; then
|
||||
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb-xlib "xcb-xlib" $L_FLAGS $I_FLAGS $l_FLAGS $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
|
||||
QT_CONFIG="$QT_CONFIG xcb-xlib"
|
||||
fi
|
||||
|
||||
@ -5921,7 +5885,6 @@ fi
|
||||
|
||||
# freetype support
|
||||
[ "x$CFG_EMBEDDED" != "xno" ] && CFG_LIBFREETYPE="$CFG_QWS_FREETYPE"
|
||||
[ "x$PLATFORM_MAC" = "xyes" ] && CFG_LIBFREETYPE=no
|
||||
[ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_LIBFREETYPE" = "auto" ] && CFG_LIBFREETYPE=no
|
||||
if [ "$CFG_LIBFREETYPE" = "auto" ]; then
|
||||
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/freetype "FreeType" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
|
||||
@ -5934,10 +5897,8 @@ fi
|
||||
if [ "$CFG_ENDIAN" = "auto" ]; then
|
||||
if [ "$XPLATFORM_MINGW" = "yes" ]; then
|
||||
CFG_ENDIAN="Q_LITTLE_ENDIAN"
|
||||
elif [ "$PLATFORM_MAC" = "yes" ]; then
|
||||
true #leave as auto
|
||||
else
|
||||
"$unixtests/endian.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
|
||||
"$unixtests/endian.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" "QMAKE_LFLAGS+=$SYSROOT_FLAG"
|
||||
F="$?"
|
||||
if [ "$F" -eq 0 ]; then
|
||||
CFG_ENDIAN="Q_LITTLE_ENDIAN"
|
||||
@ -5955,7 +5916,7 @@ if [ "$CFG_ENDIAN" = "auto" ]; then
|
||||
fi
|
||||
|
||||
if [ "$CFG_HOST_ENDIAN" = "auto" ]; then
|
||||
if [ "$PLATFORM_MAC" = "yes" ]; then
|
||||
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
||||
true #leave as auto
|
||||
else
|
||||
"$unixtests/endian.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath"
|
||||
@ -6298,11 +6259,30 @@ if [ "$CFG_MAC_DWARF2" = "yes" ]; then
|
||||
QT_CONFIG="$QT_CONFIG dwarf2"
|
||||
fi
|
||||
|
||||
# Set the default arch if there are no "-arch" arguments on the configure line
|
||||
if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_ARCHS" = "" ]; then
|
||||
source "$mactests/defaultarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests"
|
||||
CFG_MAC_ARCHS=" $QT_MAC_DEFAULT_ARCH"
|
||||
[ "$OPT_VERBOSE" = "yes" ] && echo "Setting Mac architechture to$CFG_MAC_ARCHS."
|
||||
# Set the default Mac OS X arch if there are no "-arch" arguments on the configure line
|
||||
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
||||
DEFAULT_ARCH="$CFG_MAC_ARCHS"
|
||||
if [ -z "$DEFAULT_ARCH" ]; then
|
||||
case `file "${outpath}/bin/qmake"` in
|
||||
*i?86)
|
||||
DEFAULT_ARCH=x86
|
||||
;;
|
||||
*x86_64)
|
||||
DEFAULT_ARCH=x86_64
|
||||
;;
|
||||
*ppc|*ppc64|*)
|
||||
# unsupported/unknown
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ -n "$DEFAULT_ARCH" ]; then
|
||||
[ "$OPT_VERBOSE" = "yes" ] && echo "Setting default Mac OS X architechture to $DEFAULT_ARCH."
|
||||
QT_CONFIG="$QT_CONFIG $DEFAULT_ARCH"
|
||||
QMAKE_CONFIG="$QMAKE_CONFIG $DEFAULT_ARCH"
|
||||
# Make the application arch follow the Qt arch for single arch builds.
|
||||
# (for multiple-arch builds, set CONFIG manually in the application .pro file)
|
||||
[ `echo "$DEFAULT_ARCH" | wc -w` -eq 1 ] && QTCONFIG_CONFIG="$QTCONFIG_CONFIG $DEFAULT_ARCH"
|
||||
fi
|
||||
fi
|
||||
|
||||
# ### Vestige
|
||||
@ -6398,12 +6378,6 @@ if [ "$PLATFORM_QPA" = "yes" ]; then
|
||||
rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
|
||||
fi
|
||||
|
||||
if [ "$CFG_EMBEDDED" = "nacl" ]; then
|
||||
QMAKE_CONFIG="$QMAKE_CONFIG nacl pepper"
|
||||
QT_CONFIG="$QT_CONFIG nacl pepper"
|
||||
rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
|
||||
fi
|
||||
|
||||
if [ "$XPLATFORM_MINGW" != "yes" ]; then
|
||||
# Do not set this here for Windows. Let qmake do it so
|
||||
# debug and release precompiled headers are kept separate.
|
||||
@ -6446,7 +6420,6 @@ fi
|
||||
[ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
|
||||
[ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt"
|
||||
[ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
|
||||
[ "$PLATFORM_MAC" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG $CFG_MAC_ARCHS"
|
||||
if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
|
||||
QT_CONFIG="$QT_CONFIG clock-gettime"
|
||||
fi
|
||||
@ -6512,7 +6485,7 @@ else
|
||||
fi
|
||||
|
||||
|
||||
if [ "x$PLATFORM_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
|
||||
if [ "x$BUILD_ON_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
|
||||
#On Mac we implicitly link against libz, so we
|
||||
#never use the 3rdparty stuff.
|
||||
[ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
|
||||
@ -7011,7 +6984,7 @@ if [ "$CFG_FRAMEWORK" = "yes" ]; then
|
||||
echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
|
||||
fi
|
||||
|
||||
if [ "$PLATFORM_MAC" = "yes" ]; then
|
||||
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
||||
cat >>"$outpath/src/corelib/global/qconfig.h.new" <<EOF
|
||||
#if defined(__LP64__)
|
||||
# define QT_POINTER_SIZE 8
|
||||
@ -7024,6 +6997,11 @@ else
|
||||
echo "#define QT_POINTER_SIZE $?" >>"$outpath/src/corelib/global/qconfig.h.new"
|
||||
fi
|
||||
|
||||
#REDUCE_RELOCATIONS is a elf/unix only thing, so not in windows configure.exe
|
||||
if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
|
||||
echo "#define QT_REDUCE_RELOCATIONS" >>"$outpath/src/corelib/global/qconfig.h.new"
|
||||
fi
|
||||
|
||||
|
||||
echo "" >>"$outpath/src/corelib/global/qconfig.h.new"
|
||||
|
||||
@ -7257,19 +7235,10 @@ else
|
||||
QT_CONFIG="$QT_CONFIG qt_framework"
|
||||
QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
|
||||
fi
|
||||
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
||||
QT_CONFIG="$QT_CONFIG $CFG_MAC_ARCHS"
|
||||
fi
|
||||
if [ "$CFG_DEV" = "yes" ]; then
|
||||
QT_CONFIG="$QT_CONFIG private_tests"
|
||||
fi
|
||||
|
||||
# Make the application arch follow the Qt arch for single arch builds.
|
||||
# (for multiple-arch builds, set CONFIG manually in the application .pro file)
|
||||
if [ `echo "$CFG_MAC_ARCHS" | wc -w` -eq 1 ]; then
|
||||
QTCONFIG_CONFIG="$QTCONFIG_CONFIG $CFG_MAC_ARCHS"
|
||||
fi
|
||||
|
||||
cat >>"$QTCONFIG.tmp" <<EOF
|
||||
#configuration
|
||||
CONFIG += $QTCONFIG_CONFIG
|
||||
@ -7286,7 +7255,6 @@ QT_PATCH_VERSION = $QT_PATCH_VERSION
|
||||
#namespaces
|
||||
QT_LIBINFIX = $QT_LIBINFIX
|
||||
QT_NAMESPACE = $QT_NAMESPACE
|
||||
QT_NAMESPACE_MAC_CRC = $QT_NAMESPACE_MAC_CRC
|
||||
|
||||
EOF
|
||||
if [ -n "$CFG_SYSROOT" ]; then
|
||||
@ -7328,7 +7296,7 @@ QTMODULE="$outpath/mkspecs/qmodule.pri"
|
||||
echo "CONFIG += create_prl link_prl" >> "$QTMODULE.tmp"
|
||||
|
||||
# Ensure we can link to uninistalled libraries
|
||||
if [ "$XPLATFORM_MINGW" != "yes" ] && [ "$CFG_EMBEDDED" != "nacl" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
|
||||
if [ "$BUILD_ON_MAC" != "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then
|
||||
echo "QMAKE_LFLAGS = -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib \$\$QMAKE_LFLAGS" >> "$QTMODULE.tmp"
|
||||
fi
|
||||
if [ -n "$QT_CFLAGS_PSQL" ]; then
|
||||
@ -7372,11 +7340,6 @@ if [ '!' -z "$CFG_SDK" ]; then
|
||||
echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$QTMODULE.tmp"
|
||||
fi
|
||||
|
||||
# mac gcc -Xarch support
|
||||
if [ "$CFG_MAC_XARCH" = "no" ]; then
|
||||
echo "QMAKE_MAC_XARCH = no" >> "$QTMODULE.tmp"
|
||||
fi
|
||||
|
||||
# cmdline args
|
||||
cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp"
|
||||
rm -f "$QMAKE_VARS_FILE" 2>/dev/null
|
||||
@ -7655,7 +7618,7 @@ elif [ "$CFG_OPENSSL" = "linked" ]; then
|
||||
fi
|
||||
echo "OpenSSL support ........ $CFG_OPENSSL $OPENSSL_LINKAGE"
|
||||
echo "Alsa support ........... $CFG_ALSA"
|
||||
if [ "$PLATFORM_MAC" = "yes" ]; then
|
||||
if [ "$BUILD_ON_MAC" = "yes" ]; then
|
||||
echo "CoreWlan support ....... $CFG_COREWLAN"
|
||||
fi
|
||||
echo "libICU support ......... $CFG_ICU"
|
||||
@ -7687,7 +7650,7 @@ if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
|
||||
echo " OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
|
||||
echo
|
||||
fi
|
||||
if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
|
||||
if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
|
||||
echo
|
||||
echo "Error: debug-only framework builds are not supported. Configure with -no-framework"
|
||||
echo "if you want a pure debug build."
|
||||
|
121
configure.bat
Normal file
121
configure.bat
Normal file
@ -0,0 +1,121 @@
|
||||
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::
|
||||
:: Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
||||
:: Contact: http://www.qt-project.org/
|
||||
::
|
||||
:: This file is part of the tools applications of the Qt Toolkit.
|
||||
::
|
||||
:: $QT_BEGIN_LICENSE:LGPL$
|
||||
:: GNU Lesser General Public License Usage
|
||||
:: 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, Nokia gives you certain additional
|
||||
:: rights. These rights are described in the Nokia 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.
|
||||
::
|
||||
:: Other Usage
|
||||
:: Alternatively, this file may be used in accordance with the terms and
|
||||
:: conditions contained in a signed written agreement between you and Nokia.
|
||||
::
|
||||
::
|
||||
::
|
||||
::
|
||||
::
|
||||
::
|
||||
:: $QT_END_LICENSE$
|
||||
::
|
||||
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
|
||||
@echo off
|
||||
set QTSRC=%~dp0
|
||||
set QTDIR=%CD%
|
||||
if exist configure.exe goto conf
|
||||
echo Please wait while bootstrapping configure ...
|
||||
|
||||
for %%C in (cl.exe icl.exe g++.exe perl.exe) do set %%C=%%~$PATH:C
|
||||
|
||||
set nosyncqt=
|
||||
if not exist include (
|
||||
if "%perl.exe%" == "" (
|
||||
echo Perl not found in PATH. Aborting. >&2
|
||||
exit /b 1
|
||||
)
|
||||
if not exist mkspecs (
|
||||
md mkspecs
|
||||
if errorlevel 1 goto exit
|
||||
)
|
||||
perl %QTSRC%bin\syncqt -outdir %QTDIR% %QTSRC%
|
||||
if errorlevel 1 goto exit
|
||||
set nosyncqt=-no-syncqt
|
||||
)
|
||||
|
||||
if not exist src\corelib\global\qconfig.h (
|
||||
if not exist src\corelib\global (
|
||||
md src\corelib\global
|
||||
if errorlevel 1 goto exit
|
||||
)
|
||||
echo #define Q_BIG_ENDIAN 4321 > src\corelib\global\qconfig.h
|
||||
echo #define Q_LITTLE_ENDIAN 1234 >> src\corelib\global\qconfig.h
|
||||
echo #define Q_BYTE_ORDER Q_LITTLE_ENDIAN >> src\corelib\global\qconfig.h
|
||||
)
|
||||
|
||||
if not exist tools\configure (
|
||||
md tools\configure
|
||||
if errorlevel 1 goto exit
|
||||
)
|
||||
cd tools\configure
|
||||
if errorlevel 1 goto exit
|
||||
|
||||
echo #### Generated by configure.bat - DO NOT EDIT! ####> Makefile
|
||||
echo/>> Makefile
|
||||
for /f "tokens=3 usebackq" %%V in (`findstr QT_VERSION_STR %QTSRC%\src\corelib\global\qglobal.h`) do @echo QTVERSION = %%~V>> Makefile
|
||||
if not "%cl.exe%" == "" (
|
||||
echo CXX = cl>>Makefile
|
||||
echo EXTRA_CXXFLAGS =>>Makefile
|
||||
rem This must have a trailing space.
|
||||
echo QTSRC = %QTSRC% >> Makefile
|
||||
set tmpl=win32
|
||||
set make=nmake
|
||||
) else if not "%icl.exe%" == "" (
|
||||
echo CXX = icl>>Makefile
|
||||
echo EXTRA_CXXFLAGS = /Zc:forScope>>Makefile
|
||||
rem This must have a trailing space.
|
||||
echo QTSRC = %QTSRC% >> Makefile
|
||||
set tmpl=win32
|
||||
set make=nmake
|
||||
) else if not "%g++.exe%" == "" (
|
||||
echo CXX = g++>>Makefile
|
||||
echo EXTRA_CXXFLAGS =>>Makefile
|
||||
rem This must NOT have a trailing space.
|
||||
echo QTSRC = %QTSRC:\=/%>> Makefile
|
||||
set tmpl=mingw
|
||||
set make=mingw32-make
|
||||
) else (
|
||||
echo No suitable compiler found in PATH. Aborting. >&2
|
||||
cd ..\..
|
||||
exit /b 1
|
||||
)
|
||||
echo/>> Makefile
|
||||
type %QTSRC%tools\configure\Makefile.%tmpl% >> Makefile
|
||||
|
||||
%make%
|
||||
if errorlevel 1 (cd ..\.. & exit /b 1)
|
||||
|
||||
cd ..\..
|
||||
|
||||
:conf
|
||||
configure.exe -srcdir %QTSRC% %nosyncqt% %*
|
||||
:exit
|
BIN
configure.exe
BIN
configure.exe
Binary file not shown.
65
dist/changes-5.0.0
vendored
65
dist/changes-5.0.0
vendored
@ -52,9 +52,16 @@ information about a particular change.
|
||||
in Qt4, so these methods return a bool now. If your code used the undocumented
|
||||
QBool, simply replace it with bool.
|
||||
|
||||
- QMetaType::construct() has been renamed to QMetaType::create().
|
||||
- QMetaType:
|
||||
* QMetaType::construct() has been renamed to QMetaType::create().
|
||||
* QMetaType::unregisterType() has been removed.
|
||||
|
||||
- QTestLib:
|
||||
* The plain-text, xml and lightxml test output formats have been changed to
|
||||
show a test result for every row of test data in data-driven tests. In
|
||||
Qt4, only fails and skips were shown for individual data rows and passes
|
||||
were not shown for individual data rows, preventing accurate calculation
|
||||
of test run rates and pass rates.
|
||||
* The QTRY_VERIFY and QTRY_COMPARE macros have been moved into QTestLib.
|
||||
These macros formerly lived in tests/shared/util.h but are now provided
|
||||
by including the <QtTest/QtTest> header. In addition,
|
||||
@ -93,8 +100,9 @@ information about a particular change.
|
||||
text(Text t, int child) -> text(Text t), rect(int child) -> rect()
|
||||
setText(Text t, int child, const QString &text) -> setText(Text t, const QString &text)
|
||||
role(int child) -> role(), state(int child) -> state()
|
||||
relationTo(int child, const QAccessibleInterface *other, int otherChild) ->
|
||||
relationTo(const QAccessibleInterface *other)
|
||||
* parent() and child() was added in order to do hierarchical navigation.
|
||||
* relations() was added as a replacement to relationTo()
|
||||
* As a consequence of the above two points, navigate() was removed.
|
||||
* Accessible-Action related functions have been removed. QAccessibleInterface
|
||||
subclasses are expected to implement the QAccessibleActionInterface instead.
|
||||
These functions have been removed:
|
||||
@ -127,10 +135,16 @@ information about a particular change.
|
||||
* QWidget *widget() has been removed and is replaced by QObject
|
||||
*target() in order to avoid QWidget dependencies.
|
||||
|
||||
* QEvent::TouchCancel has been introduced. On systems where it makes
|
||||
sense this event type can be used to differentiate between a
|
||||
regular TouchEnd and abrupt touch sequence cancellations caused by
|
||||
the compositor, for example when a system gesture gets recognized.
|
||||
|
||||
- QMetaType
|
||||
|
||||
* It is no longer possible to use Q_DECLARE_METATYPE(Foo*) where Foo is only
|
||||
forward declared - it must be fully defined.
|
||||
* Q_DECLARE_METATYPE(Foo*) now requires that Foo is fully defined. In
|
||||
cases where a forward declared type should be used as a metatype,
|
||||
Q_DECLARE_OPAQUE_POINTER(Foo*) can be used to allow that.
|
||||
|
||||
- QItemEditorFactory
|
||||
|
||||
@ -207,6 +221,8 @@ information about a particular change.
|
||||
|
||||
- QSystemLocale has been removed from the public API.
|
||||
|
||||
- QSqlQueryModel::indexInQuery() is now virtual. See note below under QSql.
|
||||
|
||||
****************************************************************************
|
||||
* General *
|
||||
****************************************************************************
|
||||
@ -333,6 +349,38 @@ QTestLib
|
||||
* [QTBUG-20615] Autotests can now log test output to multiple destinations
|
||||
and log formats simultaneously.
|
||||
|
||||
QtSql
|
||||
-----
|
||||
QSqlTableModel/QSqlRelationalTableModel
|
||||
|
||||
* The dataChanged() signal is now emitted for changes made to an inserted
|
||||
record that has not yet been committed. Previously, dataChanged() was
|
||||
suppressed in this case for OnRowChange and OnFieldChange. This was probably
|
||||
an attempt to avoid trouble if setData() was called while handling
|
||||
primeInsert(). By emitting dataChanged(), we ensure that all views are aware
|
||||
of the change.
|
||||
|
||||
* While handling primeInsert() signal, the record must be manipulated using
|
||||
the provided reference. Do not attempt to manipulate the records using the
|
||||
model methods setData() or setRecord().
|
||||
|
||||
* removeRows() no longer emits extra beforeDelete signal for out of range row.
|
||||
|
||||
* removeRows() now requires the whole range of targetted rows to be valid
|
||||
before doing anything. Previously, it would remove what it could and
|
||||
ignore the rest of the range.
|
||||
|
||||
* setRecord() and insertRecord()
|
||||
-Only use fields where generated flag is set to true. This is
|
||||
is consistent with the meaning of the flag.
|
||||
-Require all fields to map correctly. Previously fields that didn't
|
||||
map were simply ignored.
|
||||
-For OnManualSubmit, insertRecord() no longer leaves behind an empty
|
||||
row if setRecord() fails.
|
||||
|
||||
* QSqlQueryModel::indexInQuery() is now virtual. See
|
||||
QSqlTableModel::indexInQuery() as example of how to implement in a
|
||||
subclass.
|
||||
|
||||
****************************************************************************
|
||||
* Database Drivers *
|
||||
@ -444,6 +492,13 @@ Qt for Windows CE
|
||||
cause an abort().
|
||||
|
||||
|
||||
- QVariant
|
||||
|
||||
* Definition of QVariant::UserType changed. Currently it is the same as
|
||||
QMetaType::User, which means that it points to the first registered custom
|
||||
type, instead of a nonexistent type.
|
||||
|
||||
|
||||
- QMessageBox
|
||||
|
||||
* The static function QMessageBox::question has changed the default argument
|
||||
|
@ -30,7 +30,7 @@
|
||||
\title Dir View Example
|
||||
|
||||
The Dir View example shows a tree view onto the local filing system. It uses the
|
||||
QDirModel class to provide supply file and directory information.
|
||||
QDirModel class to provide file and directory information.
|
||||
|
||||
\image dirview-example.png
|
||||
*/
|
||||
|
@ -48,14 +48,15 @@
|
||||
As described in the \l{Model Subclassing Reference}, models must
|
||||
provide implementations for the standard set of model functions:
|
||||
\l{QAbstractItemModel::}{flags()}, \l{QAbstractItemModel::}{data()},
|
||||
\l{QAbstractItemModel::}{headerData()}, and
|
||||
\l{QAbstractItemModel::}{headerData()},
|
||||
\l{QAbstractItemModel::}{columnCount()}, and
|
||||
\l{QAbstractItemModel::}{rowCount()}. In addition, hierarchical models,
|
||||
such as this one, need to provide implementations of
|
||||
\l{QAbstractItemModel::}{index()} and \l{QAbstractItemModel::}{parent()}.
|
||||
|
||||
An editable model needs to provide implementations of
|
||||
\l{QAbstractItemModel::}{setData()} and
|
||||
\l{QAbstractItemModel::}{headerData()}, and must return a suitable
|
||||
\l{QAbstractItemModel::}{setHeaderData()}, and must return a suitable
|
||||
combination of flags from its \l{QAbstractItemModel::}{flags()} function.
|
||||
|
||||
Since this example allows the dimensions of the model to be changed,
|
||||
|
@ -101,8 +101,8 @@
|
||||
In this case, the file is accessible as \c
|
||||
:/myresources/cut-img.png.
|
||||
|
||||
Some resources, such as translation files and icons, many need to
|
||||
change based on the user's locale. This is done by adding a \c lang
|
||||
Some resources need to change based on the user's locale,
|
||||
such as translation files or icons. This is done by adding a \c lang
|
||||
attribute to the \c qresource tag, specifying a suitable locale
|
||||
string. For example:
|
||||
|
||||
|
@ -73,7 +73,7 @@ MyStruct s2 = var.value<MyStruct>();
|
||||
|
||||
//! [3]
|
||||
int id = QMetaType::type("MyClass");
|
||||
if (id == 0) {
|
||||
if (id != 0) {
|
||||
void *myClassPtr = QMetaType::create(id);
|
||||
...
|
||||
QMetaType::destroy(id, myClassPtr);
|
||||
|
47
doc/src/snippets/code/src_corelib_mimetype_qmimedatabase.cpp
Normal file
47
doc/src/snippets/code/src_corelib_mimetype_qmimedatabase.cpp
Normal file
@ -0,0 +1,47 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** Contact: http://www.qt-project.org/
|
||||
**
|
||||
** This file is part of the documentation 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 Nokia Corporation 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$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
//! [0]
|
||||
QMimeDatabase db;
|
||||
QMimeType mime = db.mimeTypeForFile(fileName);
|
||||
if (mime.inherits("text/plain")) {
|
||||
// The file is plain text, we can display it in a QTextEdit
|
||||
}
|
||||
//! [0]
|
@ -114,8 +114,8 @@ int complexFunction(int flag)
|
||||
switch (flag) {
|
||||
case 0:
|
||||
case 1:
|
||||
mutex.unlock();
|
||||
return moreComplexFunction(flag);
|
||||
retVal = moreComplexFunction(flag);
|
||||
break;
|
||||
case 2:
|
||||
{
|
||||
int status = anotherFunction();
|
||||
|
@ -38,15 +38,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
//! [0]
|
||||
QAccessibleInterface *child = 0;
|
||||
int targetChild = object->navigate(Accessible::Child, 1, &child);
|
||||
if (child) {
|
||||
// ...
|
||||
delete child;
|
||||
}
|
||||
//! [0]
|
||||
|
||||
//! [1]
|
||||
typedef QAccessibleInterface* myFactoryFunction(const QString &key, QObject *);
|
||||
//! [1]
|
||||
|
@ -284,12 +284,12 @@ void QSqlTableModel_snippets()
|
||||
model->setTable("employee");
|
||||
model->setEditStrategy(QSqlTableModel::OnManualSubmit);
|
||||
model->select();
|
||||
model->removeColumn(0); // don't show the ID
|
||||
model->setHeaderData(0, Qt::Horizontal, tr("Name"));
|
||||
model->setHeaderData(1, Qt::Horizontal, tr("Salary"));
|
||||
|
||||
QTableView *view = new QTableView;
|
||||
view->setModel(model);
|
||||
view->hideColumn(0); // don't show the ID
|
||||
view->show();
|
||||
//! [24]
|
||||
|
||||
|
@ -494,7 +494,7 @@
|
||||
\snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 15
|
||||
|
||||
Users of MinGW may wish to consult the following online document:
|
||||
\l{Compiling PostgreSQL On Native Win32 FAQ}.
|
||||
\l{PostgreSQL MinGW/Native Windows}.
|
||||
|
||||
\bold{Note:} This database plugin is not supported for Windows CE.
|
||||
|
||||
|
@ -51,26 +51,35 @@ Client::Client(QWidget *parent)
|
||||
hostLabel = new QLabel(tr("&Server name:"));
|
||||
portLabel = new QLabel(tr("S&erver port:"));
|
||||
|
||||
// find out which IP to connect to
|
||||
QString ipAddress;
|
||||
QList<QHostAddress> ipAddressesList = QNetworkInterface::allAddresses();
|
||||
// use the first non-localhost IPv4 address
|
||||
for (int i = 0; i < ipAddressesList.size(); ++i) {
|
||||
if (ipAddressesList.at(i) != QHostAddress::LocalHost &&
|
||||
ipAddressesList.at(i).toIPv4Address()) {
|
||||
ipAddress = ipAddressesList.at(i).toString();
|
||||
break;
|
||||
}
|
||||
hostCombo = new QComboBox;
|
||||
hostCombo->setEditable(true);
|
||||
// find out name of this machine
|
||||
QString name = QHostInfo::localHostName();
|
||||
if (!name.isEmpty()) {
|
||||
hostCombo->addItem(name);
|
||||
QString domain = QHostInfo::localDomainName();
|
||||
if (!domain.isEmpty())
|
||||
hostCombo->addItem(name + QChar('.') + domain);
|
||||
}
|
||||
if (name != QString("localhost"))
|
||||
hostCombo->addItem(QString("localhost"));
|
||||
// find out IP addresses of this machine
|
||||
QList<QHostAddress> ipAddressesList = QNetworkInterface::allAddresses();
|
||||
// add non-localhost addresses
|
||||
for (int i = 0; i < ipAddressesList.size(); ++i) {
|
||||
if (!ipAddressesList.at(i).isLoopback())
|
||||
hostCombo->addItem(ipAddressesList.at(i).toString());
|
||||
}
|
||||
// add localhost addresses
|
||||
for (int i = 0; i < ipAddressesList.size(); ++i) {
|
||||
if (ipAddressesList.at(i).isLoopback())
|
||||
hostCombo->addItem(ipAddressesList.at(i).toString());
|
||||
}
|
||||
// if we did not find one, use IPv4 localhost
|
||||
if (ipAddress.isEmpty())
|
||||
ipAddress = QHostAddress(QHostAddress::LocalHost).toString();
|
||||
|
||||
hostLineEdit = new QLineEdit(ipAddress);
|
||||
portLineEdit = new QLineEdit;
|
||||
portLineEdit->setValidator(new QIntValidator(1, 65535, this));
|
||||
|
||||
hostLabel->setBuddy(hostLineEdit);
|
||||
hostLabel->setBuddy(hostCombo);
|
||||
portLabel->setBuddy(portLineEdit);
|
||||
|
||||
statusLabel = new QLabel(tr("This examples requires that you run the "
|
||||
@ -90,7 +99,7 @@ Client::Client(QWidget *parent)
|
||||
tcpSocket = new QTcpSocket(this);
|
||||
//! [1]
|
||||
|
||||
connect(hostLineEdit, SIGNAL(textChanged(QString)),
|
||||
connect(hostCombo, SIGNAL(editTextChanged(QString)),
|
||||
this, SLOT(enableGetFortuneButton()));
|
||||
connect(portLineEdit, SIGNAL(textChanged(QString)),
|
||||
this, SLOT(enableGetFortuneButton()));
|
||||
@ -107,7 +116,7 @@ Client::Client(QWidget *parent)
|
||||
|
||||
QGridLayout *mainLayout = new QGridLayout;
|
||||
mainLayout->addWidget(hostLabel, 0, 0);
|
||||
mainLayout->addWidget(hostLineEdit, 0, 1);
|
||||
mainLayout->addWidget(hostCombo, 0, 1);
|
||||
mainLayout->addWidget(portLabel, 1, 0);
|
||||
mainLayout->addWidget(portLineEdit, 1, 1);
|
||||
mainLayout->addWidget(statusLabel, 2, 0, 1, 2);
|
||||
@ -150,7 +159,7 @@ void Client::requestNewFortune()
|
||||
blockSize = 0;
|
||||
tcpSocket->abort();
|
||||
//! [7]
|
||||
tcpSocket->connectToHost(hostLineEdit->text(),
|
||||
tcpSocket->connectToHost(hostCombo->currentText(),
|
||||
portLineEdit->text().toInt());
|
||||
//! [7]
|
||||
}
|
||||
@ -224,7 +233,7 @@ void Client::displayError(QAbstractSocket::SocketError socketError)
|
||||
void Client::enableGetFortuneButton()
|
||||
{
|
||||
getFortuneButton->setEnabled((!networkSession || networkSession->isOpen()) &&
|
||||
!hostLineEdit->text().isEmpty() &&
|
||||
!hostCombo->currentText().isEmpty() &&
|
||||
!portLineEdit->text().isEmpty());
|
||||
|
||||
}
|
||||
|
@ -45,6 +45,7 @@
|
||||
#include <QTcpSocket>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QComboBox;
|
||||
class QDialogButtonBox;
|
||||
class QLabel;
|
||||
class QLineEdit;
|
||||
@ -71,7 +72,7 @@ private slots:
|
||||
private:
|
||||
QLabel *hostLabel;
|
||||
QLabel *portLabel;
|
||||
QLineEdit *hostLineEdit;
|
||||
QComboBox *hostCombo;
|
||||
QLineEdit *portLineEdit;
|
||||
QLabel *statusLabel;
|
||||
QPushButton *getFortuneButton;
|
||||
|
@ -39,6 +39,7 @@ QMAKE_CFLAGS_RELEASE += -O2
|
||||
QMAKE_CFLAGS_DEBUG += -g
|
||||
QMAKE_CFLAGS_SHLIB += -fPIC
|
||||
QMAKE_CFLAGS_STATIC_LIB += -fPIC
|
||||
QMAKE_CFLAGS_APP += -fPIE
|
||||
QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses
|
||||
QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden
|
||||
|
||||
@ -50,6 +51,7 @@ QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE
|
||||
QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG
|
||||
QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB
|
||||
QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB
|
||||
QMAKE_CXXFLAGS_APP += $$QMAKE_CFLAGS_APP
|
||||
QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC
|
||||
QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden
|
||||
|
||||
|
@ -7,12 +7,12 @@ QMAKE_CXXFLAGS_THREAD += $$QMAKE_CFLAGS_THREAD
|
||||
|
||||
QMAKE_INCDIR =
|
||||
QMAKE_LIBDIR =
|
||||
QMAKE_INCDIR_X11 = /usr/X11R6/include
|
||||
QMAKE_LIBDIR_X11 = /usr/X11R6/lib
|
||||
QMAKE_INCDIR_X11 =
|
||||
QMAKE_LIBDIR_X11 =
|
||||
QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
|
||||
QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
|
||||
QMAKE_INCDIR_OPENGL = /usr/X11R6/include
|
||||
QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib
|
||||
QMAKE_INCDIR_OPENGL =
|
||||
QMAKE_LIBDIR_OPENGL =
|
||||
QMAKE_INCDIR_OPENGL_ES1 = $$QMAKE_INCDIR_OPENGL
|
||||
QMAKE_LIBDIR_OPENGL_ES1 = $$QMAKE_LIBDIR_OPENGL
|
||||
QMAKE_INCDIR_OPENGL_ES2 = $$QMAKE_INCDIR_OPENGL
|
||||
@ -42,6 +42,10 @@ QMAKE_LIBDIR_WAYLAND =
|
||||
QMAKE_DEFINES_WAYLAND =
|
||||
QMAKE_WAYLAND_SCANNER = wayland-scanner
|
||||
|
||||
QMAKE_CFLAGS_XCB =
|
||||
QMAKE_LIBS_XCB =
|
||||
QMAKE_DEFINES_XCB =
|
||||
|
||||
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
|
||||
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
|
||||
|
||||
|
@ -29,13 +29,17 @@ CMAKE_BIN_DIR = $$replace(CMAKE_BINS, ^.*/, )
|
||||
|
||||
CMAKE_RELATIVE_INSTALL_DIR = "../../../"
|
||||
|
||||
static|staticlib:CMAKE_STATIC_TYPE = true
|
||||
|
||||
contains(QT_CONFIG, reduce_relocations):CMAKE_ADD_FPIE_FLAGS = "true"
|
||||
|
||||
macx {
|
||||
CONFIG(qt_framework, qt_framework|qt_no_framework) {
|
||||
CMAKE_LIB_FILE_LOCATION_DEBUG = Qt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.framework/Qt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}
|
||||
CMAKE_LIB_FILE_LOCATION_RELEASE = Qt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.framework/Qt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}
|
||||
CMAKE_BUILD_IS_FRAMEWORK = "true"
|
||||
} else {
|
||||
static {
|
||||
!isEmpty(CMAKE_STATIC_TYPE) {
|
||||
CMAKE_LIB_FILE_LOCATION_DEBUG = libQt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.a
|
||||
CMAKE_LIB_FILE_LOCATION_RELEASE = libQt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.a
|
||||
} else {
|
||||
@ -44,7 +48,7 @@ macx {
|
||||
}
|
||||
}
|
||||
} else:win32 {
|
||||
static {
|
||||
!isEmpty(CMAKE_STATIC_TYPE) {
|
||||
CMAKE_IMPLIB_FILE_LOCATION_DEBUG = Qt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}d.lib
|
||||
CMAKE_IMPLIB_FILE_LOCATION_RELEASE = Qt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.lib
|
||||
} else {
|
||||
@ -55,7 +59,7 @@ macx {
|
||||
}
|
||||
CMAKE_BIN_SUFFIX = ".exe"
|
||||
} else {
|
||||
static {
|
||||
!isEmpty(CMAKE_STATIC_TYPE) {
|
||||
CMAKE_LIB_FILE_LOCATION_DEBUG = libQt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.a
|
||||
CMAKE_LIB_FILE_LOCATION_RELEASE = libQt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.a
|
||||
} else {
|
||||
@ -72,8 +76,6 @@ debug_and_release|release:release_type = release
|
||||
|
||||
INSTALLS += cmake_qt5_module_files
|
||||
|
||||
static:CMAKE_STATIC_TYPE = true
|
||||
|
||||
cmake_config_file.input = $$PWD/../cmake/Qt5BasicConfig.cmake.in
|
||||
cmake_config_file.output = $$eval(QT.$${MODULE}.libs)/cmake/Qt5$${CMAKE_MODULE_NAME}/Qt5$${CMAKE_MODULE_NAME}Config.cmake
|
||||
|
||||
@ -100,19 +102,16 @@ exists($$cmake_extras_file.input) {
|
||||
$$cmake_extras_file.output
|
||||
}
|
||||
|
||||
cmake_macros_file = $$_PRO_FILE_PWD_/Qt5$${CMAKE_MODULE_NAME}Macros.cmake
|
||||
exists($$cmake_macros_file) {
|
||||
cmake_macros_file.input = $$_PRO_FILE_PWD_/Qt5$${CMAKE_MODULE_NAME}Macros.cmake
|
||||
exists($$cmake_macros_file.input) {
|
||||
CMAKE_MODULE_MACROS = "true"
|
||||
cmake_qt5_module_files.files += $$cmake_macros_file
|
||||
|
||||
CMAKE_MACROS_FILE_SOURCE = $$_PRO_FILE_PWD_/Qt5$${CMAKE_MODULE_NAME}Macros.cmake
|
||||
CMAKE_MACROS_FILE_DESTINATION = $$eval(QT.$${MODULE}.libs)/cmake/Qt5$${CMAKE_MODULE_NAME}
|
||||
cmake_macros_file.output = $$eval(QT.$${MODULE}.libs)/cmake/Qt5$${CMAKE_MODULE_NAME}/Qt5$${CMAKE_MODULE_NAME}Macros.cmake
|
||||
cmake_macros_file.config = verbatim
|
||||
|
||||
CMAKE_MACROS_FILE_SOURCE ~= s,[/\\\\],$$QMAKE_DIR_SEP,
|
||||
CMAKE_MACROS_FILE_DESTINATION ~= s,[/\\\\],$$QMAKE_DIR_SEP,
|
||||
QMAKE_SUBSTITUTES += cmake_macros_file
|
||||
|
||||
system($$QMAKE_MKDIR \"$$CMAKE_MACROS_FILE_DESTINATION\")
|
||||
system($$QMAKE_COPY \"$$CMAKE_MACROS_FILE_SOURCE\" \"$$CMAKE_MACROS_FILE_DESTINATION\")
|
||||
cmake_qt5_module_files.files += $$cmake_macros_file.output
|
||||
}
|
||||
|
||||
cmake_qt5_module_files.path = $$[QT_INSTALL_LIBS]/cmake/Qt5$${CMAKE_MODULE_NAME}
|
||||
|
@ -11,8 +11,7 @@ qt_install_headers {
|
||||
INSTALL_HEADERS = $$SYNCQT.HEADER_FILES
|
||||
equals(TARGET, QtCore) {
|
||||
#headers created by configure
|
||||
INSTALL_HEADERS *= $$QT_BUILD_TREE/src/corelib/global/qconfig.h \
|
||||
$$QT_SOURCE_TREE/src/corelib/arch/$$QT_ARCH/arch
|
||||
INSTALL_HEADERS *= $$QT_BUILD_TREE/src/corelib/global/qconfig.h
|
||||
}
|
||||
|
||||
equals(TARGET, phonon) {
|
||||
|
@ -17,7 +17,6 @@ INCLUDEPATH *= $$MODULE_PRIVATE_INCLUDES
|
||||
INCLUDEPATH *= $$MODULE_PRIVATE_INCLUDES/$$TARGET
|
||||
INCLUDEPATH *= $$MODULE_INCLUDES $$MODULE_INCLUDES/.. #just for today to have some compat
|
||||
!isEmpty(RCC_DIR): INCLUDEPATH += $$RCC_DIR
|
||||
isEmpty(QT_ARCH):!isEmpty(ARCH):QT_ARCH=$$ARCH #another compat that will rot for change #215700
|
||||
TEMPLATE = lib
|
||||
isEmpty(QT_MAJOR_VERSION) {
|
||||
VERSION=5.0.0
|
||||
|
@ -49,11 +49,11 @@ QMAKE_EXTRA_TARGETS *= check
|
||||
} else {
|
||||
check.CONFIG = recursive
|
||||
# In debug and release mode, only run the test once.
|
||||
# Run debug if available, release otherwise.
|
||||
# Run debug if that is the preferred config, release otherwise.
|
||||
debug_and_release {
|
||||
check.target = dummy_check
|
||||
check.recurse_target = check
|
||||
debug {
|
||||
CONFIG(debug, debug|release) {
|
||||
real_check.depends = debug-check
|
||||
real_check.target = check
|
||||
QMAKE_EXTRA_TARGETS += real_check
|
||||
|
@ -38,12 +38,12 @@ QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
|
||||
|
||||
QMAKE_INCDIR =
|
||||
QMAKE_LIBDIR =
|
||||
QMAKE_INCDIR_X11 = /usr/X11R6/include
|
||||
QMAKE_LIBDIR_X11 = /usr/X11R6/lib
|
||||
QMAKE_INCDIR_X11 =
|
||||
QMAKE_LIBDIR_X11 =
|
||||
QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
|
||||
QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
|
||||
QMAKE_INCDIR_OPENGL = /usr/X11R6/include
|
||||
QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib
|
||||
QMAKE_INCDIR_OPENGL =
|
||||
QMAKE_LIBDIR_OPENGL =
|
||||
|
||||
QMAKE_LINK = cxx
|
||||
QMAKE_LINK_SHLIB = cxx
|
||||
|
@ -40,12 +40,12 @@ QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
|
||||
|
||||
QMAKE_INCDIR =
|
||||
QMAKE_LIBDIR =
|
||||
QMAKE_INCDIR_X11 = /usr/X11R6/include
|
||||
QMAKE_LIBDIR_X11 = /usr/X11R6/lib
|
||||
QMAKE_INCDIR_X11 =
|
||||
QMAKE_LIBDIR_X11 =
|
||||
QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
|
||||
QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
|
||||
QMAKE_INCDIR_OPENGL = /usr/X11R6/include
|
||||
QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib
|
||||
QMAKE_INCDIR_OPENGL =
|
||||
QMAKE_LIBDIR_OPENGL =
|
||||
|
||||
QMAKE_LINK = ecpc
|
||||
QMAKE_LINK_SHLIB = ecpc
|
||||
|
@ -10,19 +10,5 @@ CONFIG += nostrip
|
||||
QT += core gui
|
||||
QMAKE_INCREMENTAL_STYLE = sublib
|
||||
|
||||
include(../common/linux.conf)
|
||||
include(../common/gcc-base-unix.conf)
|
||||
include(../common/g++-unix.conf)
|
||||
include(../linux-arm-gnueabi-g++/qmake.conf)
|
||||
|
||||
|
||||
# Override the default lib/include directories for scratchbox:
|
||||
QMAKE_INCDIR_X11 = /usr/include/X11
|
||||
QMAKE_INCDIR_OPENGL = /usr/include
|
||||
QMAKE_LIBDIR_X11 = /usr/lib
|
||||
QMAKE_LIBDIR_OPENGL = /usr/lib
|
||||
|
||||
# We still need to generate debug symbols in release mode to put into the *-dbg packages:
|
||||
QMAKE_CFLAGS_RELEASE += -g -Wno-psabi
|
||||
QMAKE_CXXFLAGS_RELEASE += -g -Wno-psabi
|
||||
|
||||
load(qt_config)
|
||||
|
@ -46,12 +46,12 @@ QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
|
||||
|
||||
QMAKE_INCDIR =
|
||||
QMAKE_LIBDIR =
|
||||
QMAKE_INCDIR_X11 = /usr/X11R6/include
|
||||
QMAKE_LIBDIR_X11 = /usr/X11R6/lib
|
||||
QMAKE_INCDIR_X11 =
|
||||
QMAKE_LIBDIR_X11 =
|
||||
QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
|
||||
QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
|
||||
QMAKE_INCDIR_OPENGL = /usr/X11R6/include
|
||||
QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib
|
||||
QMAKE_INCDIR_OPENGL =
|
||||
QMAKE_LIBDIR_OPENGL =
|
||||
|
||||
QMAKE_LINK = icpc
|
||||
QMAKE_LINK_SHLIB = icpc
|
||||
|
@ -49,12 +49,12 @@ QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
|
||||
|
||||
QMAKE_INCDIR =
|
||||
QMAKE_LIBDIR =
|
||||
QMAKE_INCDIR_X11 = /usr/X11R6/include
|
||||
QMAKE_LIBDIR_X11 = /usr/X11R6/lib
|
||||
QMAKE_INCDIR_X11 =
|
||||
QMAKE_LIBDIR_X11 =
|
||||
QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
|
||||
QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
|
||||
QMAKE_INCDIR_OPENGL = /usr/X11R6/include
|
||||
QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib
|
||||
QMAKE_INCDIR_OPENGL =
|
||||
QMAKE_LIBDIR_OPENGL =
|
||||
|
||||
QMAKE_LINK = KCC
|
||||
QMAKE_LINK_SHLIB = KCC
|
||||
|
@ -2,96 +2,18 @@
|
||||
# qmake configuration for linux-g++
|
||||
#
|
||||
|
||||
MAKEFILE_GENERATOR = UNIX
|
||||
TARGET_PLATFORM = unix
|
||||
TEMPLATE = app
|
||||
CONFIG += qt warn_on release incremental link_prl gdb_dwarf_index
|
||||
QT += core gui
|
||||
MAKEFILE_GENERATOR = UNIX
|
||||
TARGET_PLATFORM = unix
|
||||
TEMPLATE = app
|
||||
CONFIG += qt warn_on release incremental link_prl gdb_dwarf_index
|
||||
QT += core gui
|
||||
QMAKE_INCREMENTAL_STYLE = sublib
|
||||
|
||||
QMAKE_CC = lsbcc
|
||||
QMAKE_LEX = flex
|
||||
QMAKE_LEXFLAGS =
|
||||
QMAKE_YACC = yacc
|
||||
QMAKE_YACCFLAGS = -d
|
||||
QMAKE_YACCFLAGS_MANGLE = -p $base -b $base
|
||||
QMAKE_YACC_HEADER = $base.tab.h
|
||||
QMAKE_YACC_SOURCE = $base.tab.c
|
||||
QMAKE_CFLAGS = -pipe
|
||||
QMAKE_CFLAGS_DEPS = -M
|
||||
QMAKE_CFLAGS_WARN_ON = -Wall -W
|
||||
QMAKE_CFLAGS_WARN_OFF = -w
|
||||
QMAKE_CFLAGS_RELEASE = -O2
|
||||
QMAKE_CFLAGS_DEBUG = -g
|
||||
QMAKE_CFLAGS_SHLIB = -fPIC
|
||||
QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
|
||||
QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
|
||||
QMAKE_CFLAGS_THREAD = -D_REENTRANT
|
||||
QMAKE_CFLAGS_HIDESYMS = -fvisibility=hidden
|
||||
include(../common/linux.conf)
|
||||
include(../common/gcc-base-unix.conf)
|
||||
include(../common/g++-unix.conf)
|
||||
load(qt_config)
|
||||
|
||||
QMAKE_LSB = 1
|
||||
|
||||
QMAKE_CC = lsbcc
|
||||
QMAKE_CXX = lsbc++
|
||||
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
|
||||
QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
|
||||
QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
|
||||
QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
|
||||
QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
|
||||
QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
|
||||
QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
|
||||
QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
|
||||
QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
|
||||
QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
|
||||
QMAKE_CXXFLAGS_HIDESYMS = $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden
|
||||
|
||||
QMAKE_INCDIR =
|
||||
QMAKE_LIBDIR =
|
||||
QMAKE_INCDIR_X11 = /opt/lsb/include
|
||||
QMAKE_LIBDIR_X11 = /opt/lsb/lib
|
||||
QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
|
||||
QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
|
||||
QMAKE_INCDIR_OPENGL = /opt/lsb/include
|
||||
QMAKE_LIBDIR_OPENGL = /opt/lsb/lib
|
||||
|
||||
QMAKE_LINK = lsbc++
|
||||
QMAKE_LINK_SHLIB = lsbc++
|
||||
QMAKE_LFLAGS =
|
||||
QMAKE_LFLAGS_RELEASE =
|
||||
QMAKE_LFLAGS_DEBUG =
|
||||
QMAKE_LFLAGS_SHLIB = -shared
|
||||
QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
|
||||
QMAKE_LFLAGS_SONAME = -Wl,-soname,
|
||||
QMAKE_LFLAGS_THREAD =
|
||||
QMAKE_LFLAGS_RPATH = -Wl,-rpath,
|
||||
|
||||
QMAKE_LIBS =
|
||||
QMAKE_LIBS_DYNLOAD = -ldl
|
||||
QMAKE_LIBS_X11 = -lXext -lX11 -lm
|
||||
QMAKE_LIBS_X11SM = -lSM -lICE
|
||||
QMAKE_LIBS_NIS = -lnsl
|
||||
QMAKE_LIBS_OPENGL = -lGL
|
||||
QMAKE_LIBS_OPENGL_QT = -lGL
|
||||
QMAKE_LIBS_THREAD = -lpthread
|
||||
|
||||
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
|
||||
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
|
||||
|
||||
QMAKE_AR = ar cqs
|
||||
QMAKE_OBJCOPY = objcopy
|
||||
QMAKE_RANLIB =
|
||||
|
||||
QMAKE_TAR = tar -cf
|
||||
QMAKE_GZIP = gzip -9f
|
||||
|
||||
QMAKE_COPY = cp -f
|
||||
QMAKE_COPY_FILE = $(COPY)
|
||||
QMAKE_COPY_DIR = $(COPY) -r
|
||||
QMAKE_MOVE = mv -f
|
||||
QMAKE_DEL_FILE = rm -f
|
||||
QMAKE_DEL_DIR = rmdir
|
||||
QMAKE_STRIP = strip
|
||||
QMAKE_STRIPFLAGS_LIB += --strip-unneeded
|
||||
QMAKE_CHK_DIR_EXISTS = test -d
|
||||
QMAKE_MKDIR = mkdir -p
|
||||
include(../common/unix.conf)
|
||||
load(qt_config)
|
||||
|
@ -40,12 +40,12 @@ QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
|
||||
|
||||
QMAKE_INCDIR =
|
||||
QMAKE_LIBDIR =
|
||||
QMAKE_INCDIR_X11 = /usr/X11R6/include
|
||||
QMAKE_LIBDIR_X11 = /usr/X11R6/lib
|
||||
QMAKE_INCDIR_X11 =
|
||||
QMAKE_LIBDIR_X11 =
|
||||
QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
|
||||
QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
|
||||
QMAKE_INCDIR_OPENGL = /usr/X11R6/include
|
||||
QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib
|
||||
QMAKE_INCDIR_OPENGL =
|
||||
QMAKE_LIBDIR_OPENGL =
|
||||
|
||||
QMAKE_LINK = pgCC
|
||||
QMAKE_LINK_SHLIB = pgCC
|
||||
|
@ -80,12 +80,12 @@ QMAKE_CXXFLAGS_THREAD += $$QMAKE_CFLAGS_THREAD
|
||||
|
||||
QMAKE_INCDIR =
|
||||
QMAKE_LIBDIR =
|
||||
QMAKE_INCDIR_X11 = /usr/X11R6/include
|
||||
QMAKE_LIBDIR_X11 = /usr/X11R6/lib
|
||||
QMAKE_INCDIR_X11 =
|
||||
QMAKE_LIBDIR_X11 =
|
||||
QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
|
||||
QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
|
||||
QMAKE_INCDIR_OPENGL = /usr/X11R6/include
|
||||
QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib
|
||||
QMAKE_INCDIR_OPENGL =
|
||||
QMAKE_LIBDIR_OPENGL =
|
||||
QMAKE_INCDIR_OPENGL_ES1 = $$QMAKE_INCDIR_OPENGL
|
||||
QMAKE_LIBDIR_OPENGL_ES1 = $$QMAKE_LIBDIR_OPENGL
|
||||
QMAKE_INCDIR_OPENGL_ES2 = $$QMAKE_INCDIR_OPENGL
|
||||
|
@ -8,7 +8,7 @@ include(../common/wince/qmake.conf)
|
||||
CE_SDK = WEC7_SDK_NAME # replace with actual SDK name
|
||||
CE_ARCH = armv4i
|
||||
|
||||
DEFINES += QT_NO_GESTURES QT_NOSTANDARDSHELL_UI_MODEL _CRT_SECURE_NO_DEPRECATE _WIN32_WCE=0x700 $$CE_ARCH _AMRV7_ armv7 _ARM_
|
||||
DEFINES += QT_NO_NATIVE_GESTURES QT_NOSTANDARDSHELL_UI_MODEL _CRT_SECURE_NO_DEPRECATE _WIN32_WCE=0x700 $$CE_ARCH _AMRV7_ armv7 _ARM_
|
||||
|
||||
QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:WINDOWSCE,7.00 /MACHINE:THUMB /ENTRY:mainACRTStartup
|
||||
QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWSCE,7.00 /MACHINE:THUMB
|
||||
|
@ -7,7 +7,7 @@ include(../common/wince/qmake.conf)
|
||||
CE_SDK = Platform Builder
|
||||
CE_ARCH = _TGTCPU
|
||||
|
||||
DEFINES += QT_NO_GESTURES QT_NOSTANDARDSHELL_UI_MODEL _CRT_SECURE_NO_DEPRECATE _WIN32_WCE=0x700 $$CE_ARCH _X86_ _M_IX86
|
||||
DEFINES += QT_NO_NATIVE_GESTURES QT_NOSTANDARDSHELL_UI_MODEL _CRT_SECURE_NO_DEPRECATE _WIN32_WCE=0x700 $$CE_ARCH _X86_ _M_IX86
|
||||
|
||||
QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:WINDOWSCE,7.00 /MACHINE:X86 /ENTRY:mainACRTStartup
|
||||
QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWSCE,7.00 /MACHINE:X86
|
||||
|
@ -22,7 +22,7 @@ QOBJS=qtextcodec.o qutfcodec.o qstring.o qtextstream.o qiodevice.o qmalloc.o qgl
|
||||
qfileinfo.o qdatetime.o qstringlist.o qabstractfileengine.o qtemporaryfile.o \
|
||||
qmap.o qmetatype.o qsettings.o qsystemerror.o qlibraryinfo.o qvariant.o qvsnprintf.o \
|
||||
qlocale.o qlocale_tools.o qlocale_unix.o qlinkedlist.o qurl.o qnumeric.o qcryptographichash.o \
|
||||
qxmlstream.o qxmlutils.o \
|
||||
qxmlstream.o qxmlutils.o qlogging.o \
|
||||
$(QTOBJS)
|
||||
|
||||
|
||||
@ -66,6 +66,7 @@ DEPEND_SRC=project.cpp property.cpp meta.cpp main.cpp generators/makefile.cpp ge
|
||||
$(SOURCE_PATH)/src/corelib/xml/qxmlstream.cpp \
|
||||
$(SOURCE_PATH)/src/corelib/xml/qxmlutils.cpp \
|
||||
$(SOURCE_PATH)/src/corelib/kernel/qsystemerror.cpp \
|
||||
$(SOURCE_PATH)/src/corelib/global/qlogging.cpp \
|
||||
$(QTSRCS)
|
||||
|
||||
CPPFLAGS = -g -I. -Igenerators -Igenerators/unix -Igenerators/win32 \
|
||||
@ -316,6 +317,9 @@ qxmlstream.o: $(SOURCE_PATH)/src/corelib/xml/qxmlstream.cpp
|
||||
qxmlutils.o: $(SOURCE_PATH)/src/corelib/xml/qxmlutils.cpp
|
||||
$(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/xml/qxmlutils.cpp
|
||||
|
||||
qlogging.o: $(SOURCE_PATH)/src/corelib/global/qlogging.cpp
|
||||
$(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/global/qlogging.cpp
|
||||
|
||||
#default rules
|
||||
.cpp.o:
|
||||
$(CXX) -c -o $@ $(CXXFLAGS) $<
|
||||
|
@ -29,7 +29,7 @@ CFLAGS_EXTRA = /MP
|
||||
!endif
|
||||
|
||||
CFLAGS_BARE = -c -Fo./ \
|
||||
-W3 -nologo -O2 \
|
||||
-W3 -nologo -O1 \
|
||||
$(CFLAGS_EXTRA) \
|
||||
-I. -Igenerators -Igenerators\unix -Igenerators\win32 -Igenerators\mac -Igenerators\integrity \
|
||||
-I$(BUILD_PATH)\include -I$(BUILD_PATH)\include\QtCore -I$(BUILD_PATH)\include\QtCore\$(QT_VERSION) -I$(BUILD_PATH)\include\QtCore\$(QT_VERSION)\QtCore \
|
||||
@ -118,8 +118,8 @@ QTOBJS= \
|
||||
qmetatype.obj \
|
||||
qxmlstream.obj \
|
||||
qxmlutils.obj \
|
||||
qnumeric.obj
|
||||
|
||||
qnumeric.obj \
|
||||
qlogging.obj
|
||||
|
||||
first all: qmake.exe
|
||||
|
||||
|
@ -95,7 +95,8 @@ QTOBJS= \
|
||||
qmetatype.o \
|
||||
qxmlstream.o \
|
||||
qxmlutils.o \
|
||||
qnumeric.o
|
||||
qnumeric.o \
|
||||
qlogging.o
|
||||
|
||||
|
||||
qmake.exe: $(OBJS) $(QTOBJS)
|
||||
@ -339,3 +340,5 @@ qxmlstream.o: $(SOURCE_PATH)/src/corelib/xml/qxmlstream.cpp
|
||||
qxmlutils.o: $(SOURCE_PATH)/src/corelib/xml/qxmlutils.cpp
|
||||
$(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/xml/qxmlutils.cpp
|
||||
|
||||
qlogging.o: $(SOURCE_PATH)/src/corelib/global/qlogging.cpp
|
||||
$(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/global/qlogging.cpp
|
||||
|
@ -95,7 +95,8 @@ QTOBJS= \
|
||||
qmetatype.o \
|
||||
qxmlstream.o \
|
||||
qxmlutils.o \
|
||||
qnumeric.o
|
||||
qnumeric.o \
|
||||
qlogging.o
|
||||
|
||||
qmake.exe: $(OBJS) $(QTOBJS)
|
||||
$(LINKQMAKE)
|
||||
@ -337,3 +338,6 @@ qxmlstream.o: $(SOURCE_PATH)/src/corelib/xml/qxmlstream.cpp
|
||||
|
||||
qxmlutils.o: $(SOURCE_PATH)/src/corelib/xml/qxmlutils.cpp
|
||||
$(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/xml/qxmlutils.cpp
|
||||
|
||||
qlogging.o: $(SOURCE_PATH)/src/corelib/global/qlogging.cpp
|
||||
$(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/global/qlogging.cpp
|
||||
|
@ -498,62 +498,74 @@ MakefileGenerator::init()
|
||||
}
|
||||
outn = fileFixify(inn.left(inn.length()-3), qmake_getpwd(), Option::output_dir);
|
||||
}
|
||||
|
||||
QString confign = subs.at(i) + ".config";
|
||||
bool verbatim = false;
|
||||
if (v.contains(confign))
|
||||
verbatim = v[confign].contains(QLatin1String("verbatim"));
|
||||
|
||||
QFile in(inn);
|
||||
if(in.open(QFile::ReadOnly)) {
|
||||
QString contents;
|
||||
QStack<int> state;
|
||||
enum { IN_CONDITION, MET_CONDITION, PENDING_CONDITION };
|
||||
for(int count = 1; !in.atEnd(); ++count) {
|
||||
QString line = QString::fromUtf8(in.readLine());
|
||||
if(line.startsWith("!!IF ")) {
|
||||
if(state.isEmpty() || state.top() == IN_CONDITION) {
|
||||
QString test = line.mid(5, line.length()-(5+1));
|
||||
if(project->test(test))
|
||||
state.push(IN_CONDITION);
|
||||
else
|
||||
state.push(PENDING_CONDITION);
|
||||
} else {
|
||||
state.push(MET_CONDITION);
|
||||
}
|
||||
} else if(line.startsWith("!!ELIF ")) {
|
||||
if(state.isEmpty()) {
|
||||
warn_msg(WarnLogic, "(%s:%d): Unexpected else condition",
|
||||
in.fileName().toLatin1().constData(), count);
|
||||
} else if(state.top() == PENDING_CONDITION) {
|
||||
QString test = line.mid(7, line.length()-(7+1));
|
||||
if(project->test(test)) {
|
||||
if (in.open(QFile::ReadOnly)) {
|
||||
QByteArray contentBytes;
|
||||
if (verbatim) {
|
||||
contentBytes = in.readAll();
|
||||
} else {
|
||||
QString contents;
|
||||
QStack<int> state;
|
||||
enum { IN_CONDITION, MET_CONDITION, PENDING_CONDITION };
|
||||
for (int count = 1; !in.atEnd(); ++count) {
|
||||
QString line = QString::fromUtf8(in.readLine());
|
||||
if (line.startsWith("!!IF ")) {
|
||||
if (state.isEmpty() || state.top() == IN_CONDITION) {
|
||||
QString test = line.mid(5, line.length()-(5+1));
|
||||
if (project->test(test))
|
||||
state.push(IN_CONDITION);
|
||||
else
|
||||
state.push(PENDING_CONDITION);
|
||||
} else {
|
||||
state.push(MET_CONDITION);
|
||||
}
|
||||
} else if (line.startsWith("!!ELIF ")) {
|
||||
if (state.isEmpty()) {
|
||||
warn_msg(WarnLogic, "(%s:%d): Unexpected else condition",
|
||||
in.fileName().toLatin1().constData(), count);
|
||||
} else if (state.top() == PENDING_CONDITION) {
|
||||
QString test = line.mid(7, line.length()-(7+1));
|
||||
if (project->test(test)) {
|
||||
state.pop();
|
||||
state.push(IN_CONDITION);
|
||||
}
|
||||
} else if (state.top() == IN_CONDITION) {
|
||||
state.pop();
|
||||
state.push(MET_CONDITION);
|
||||
}
|
||||
} else if (line.startsWith("!!ELSE")) {
|
||||
if (state.isEmpty()) {
|
||||
warn_msg(WarnLogic, "(%s:%d): Unexpected else condition",
|
||||
in.fileName().toLatin1().constData(), count);
|
||||
} else if (state.top() == PENDING_CONDITION) {
|
||||
state.pop();
|
||||
state.push(IN_CONDITION);
|
||||
} else if (state.top() == IN_CONDITION) {
|
||||
state.pop();
|
||||
state.push(MET_CONDITION);
|
||||
}
|
||||
} else if(state.top() == IN_CONDITION) {
|
||||
state.pop();
|
||||
state.push(MET_CONDITION);
|
||||
} else if (line.startsWith("!!ENDIF")) {
|
||||
if (state.isEmpty())
|
||||
warn_msg(WarnLogic, "(%s:%d): Unexpected endif",
|
||||
in.fileName().toLatin1().constData(), count);
|
||||
else
|
||||
state.pop();
|
||||
} else if (state.isEmpty() || state.top() == IN_CONDITION) {
|
||||
contents += project->expand(line, in.fileName(), count);
|
||||
}
|
||||
} else if(line.startsWith("!!ELSE")) {
|
||||
if(state.isEmpty()) {
|
||||
warn_msg(WarnLogic, "(%s:%d): Unexpected else condition",
|
||||
in.fileName().toLatin1().constData(), count);
|
||||
} else if(state.top() == PENDING_CONDITION) {
|
||||
state.pop();
|
||||
state.push(IN_CONDITION);
|
||||
} else if(state.top() == IN_CONDITION) {
|
||||
state.pop();
|
||||
state.push(MET_CONDITION);
|
||||
}
|
||||
} else if(line.startsWith("!!ENDIF")) {
|
||||
if(state.isEmpty())
|
||||
warn_msg(WarnLogic, "(%s:%d): Unexpected endif",
|
||||
in.fileName().toLatin1().constData(), count);
|
||||
else
|
||||
state.pop();
|
||||
} else if(state.isEmpty() || state.top() == IN_CONDITION) {
|
||||
contents += project->expand(line, in.fileName(), count);
|
||||
}
|
||||
contentBytes = contents.toUtf8();
|
||||
}
|
||||
QFile out(outn);
|
||||
if(out.exists() && out.open(QFile::ReadOnly)) {
|
||||
QString old = QString::fromUtf8(out.readAll());
|
||||
if(contents == old) {
|
||||
if (out.exists() && out.open(QFile::ReadOnly)) {
|
||||
QByteArray old = out.readAll();
|
||||
if (contentBytes == old) {
|
||||
v["QMAKE_INTERNAL_INCLUDED_FILES"].append(in.fileName());
|
||||
continue;
|
||||
}
|
||||
@ -567,7 +579,7 @@ MakefileGenerator::init()
|
||||
mkdir(QFileInfo(out).absolutePath());
|
||||
if(out.open(QFile::WriteOnly)) {
|
||||
v["QMAKE_INTERNAL_INCLUDED_FILES"].append(in.fileName());
|
||||
out.write(contents.toUtf8());
|
||||
out.write(contentBytes);
|
||||
} else {
|
||||
warn_msg(WarnLogic, "Cannot open substitute for output '%s'",
|
||||
out.fileName().toLatin1().constData());
|
||||
@ -2496,10 +2508,10 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT
|
||||
if(!in_directory.isEmpty()) {
|
||||
t << mkdir_p_asstring(out_directory)
|
||||
<< out_directory_cdin
|
||||
<< "$(QMAKE) " << in << buildArgs(in_directory) << " -o " << out
|
||||
<< "$(QMAKE) " << escapeFilePath(in) << buildArgs(in_directory) << " -o " << out
|
||||
<< in_directory_cdout << endl;
|
||||
} else {
|
||||
t << "$(QMAKE) " << in << buildArgs(in_directory) << " -o " << out << endl;
|
||||
t << "$(QMAKE) " << escapeFilePath(in) << buildArgs(in_directory) << " -o " << out << endl;
|
||||
}
|
||||
t << subtarget->target << "-qmake_all: ";
|
||||
if(project->isEmpty("QMAKE_NOFORCE"))
|
||||
@ -2508,10 +2520,10 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT
|
||||
if(!in_directory.isEmpty()) {
|
||||
t << mkdir_p_asstring(out_directory)
|
||||
<< out_directory_cdin
|
||||
<< "$(QMAKE) " << in << buildArgs(in_directory) << " -o " << out
|
||||
<< "$(QMAKE) " << escapeFilePath(in) << buildArgs(in_directory) << " -o " << out
|
||||
<< in_directory_cdout << endl;
|
||||
} else {
|
||||
t << "$(QMAKE) " << in << buildArgs(in_directory) << " -o " << out << endl;
|
||||
t << "$(QMAKE) " << escapeFilePath(in) << buildArgs(in_directory) << " -o " << out << endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -158,7 +158,7 @@ void NmakeMakefileGenerator::writeNmakeParts(QTextStream &t)
|
||||
// precompiled header
|
||||
if(usePCH) {
|
||||
QString precompRule = QString("-c -Yc -Fp%1 -Fo%2").arg(precompPch).arg(precompObj);
|
||||
t << precompObj << ": " << precompH << " " << findDependencies(precompH).join(" \\\n\t\t")
|
||||
t << precompObj << ": " << precompH << " " << escapeDependencyPaths(findDependencies(precompH)).join(" \\\n\t\t")
|
||||
<< "\n\t" << "$(CXX) " + precompRule +" $(CXXFLAGS) $(INCPATH) -TP " << precompH << endl << endl;
|
||||
}
|
||||
}
|
||||
|
@ -1284,7 +1284,7 @@ QMakeProject::read(uchar cmd)
|
||||
if(!Option::user_template_prefix.isEmpty())
|
||||
base_vars["TEMPLATE_PREFIX"] = QStringList(Option::user_template_prefix);
|
||||
|
||||
if(cmd & ReadCache && Option::mkfile::do_cache) { // parse the cache
|
||||
if ((cmd & ReadSetup) && Option::mkfile::do_cache) { // parse the cache
|
||||
int cache_depth = -1;
|
||||
QString qmake_cache = Option::mkfile::cachefile;
|
||||
if(qmake_cache.isEmpty()) { //find it as it has not been specified
|
||||
@ -1315,7 +1315,7 @@ QMakeProject::read(uchar cmd)
|
||||
}
|
||||
}
|
||||
}
|
||||
if(cmd & ReadConf) { // parse mkspec
|
||||
if (cmd & ReadSetup) { // parse mkspec
|
||||
QString qmakespec = fixEnvVariables(Option::mkfile::qmakespec);
|
||||
QStringList mkspec_roots = qmake_mkspec_paths();
|
||||
debug_msg(2, "Looking for mkspec %s in (%s)", qmakespec.toLatin1().constData(),
|
||||
@ -1389,7 +1389,7 @@ QMakeProject::read(uchar cmd)
|
||||
vars["TARGET"].append(QFileInfo(pfile).baseName());
|
||||
|
||||
//before commandline
|
||||
if(cmd & ReadCmdLine) {
|
||||
if (cmd & ReadSetup) {
|
||||
cfile = pfile;
|
||||
parser.file = "(internal)";
|
||||
parser.from_file = false;
|
||||
@ -1406,7 +1406,7 @@ QMakeProject::read(uchar cmd)
|
||||
}
|
||||
|
||||
//commandline configs
|
||||
if(cmd & ReadConfigs && !Option::user_configs.isEmpty()) {
|
||||
if ((cmd & ReadSetup) && !Option::user_configs.isEmpty()) {
|
||||
parser.file = "(configs)";
|
||||
parser.from_file = false;
|
||||
parser.line_no = 1; //really arg count now.. duh
|
||||
@ -1421,7 +1421,7 @@ QMakeProject::read(uchar cmd)
|
||||
return false;
|
||||
}
|
||||
|
||||
if(cmd & ReadCmdLine) {
|
||||
if (cmd & ReadSetup) {
|
||||
parser.file = "(internal)";
|
||||
parser.from_file = false;
|
||||
parser.line_no = 1; //really arg count now.. duh
|
||||
@ -1437,7 +1437,7 @@ QMakeProject::read(uchar cmd)
|
||||
}
|
||||
|
||||
//after configs (set in BUILDS)
|
||||
if(cmd & ReadConfigs && !Option::after_user_configs.isEmpty()) {
|
||||
if ((cmd & ReadSetup) && !Option::after_user_configs.isEmpty()) {
|
||||
parser.file = "(configs)";
|
||||
parser.from_file = false;
|
||||
parser.line_no = 1; //really arg count now.. duh
|
||||
@ -1447,7 +1447,7 @@ QMakeProject::read(uchar cmd)
|
||||
if(pfile != "-" && vars["TARGET"].isEmpty())
|
||||
vars["TARGET"].append(QFileInfo(pfile).baseName());
|
||||
|
||||
if(cmd & ReadConfigs && !Option::user_configs.isEmpty()) {
|
||||
if ((cmd & ReadSetup) && !Option::user_configs.isEmpty()) {
|
||||
parser.file = "(configs)";
|
||||
parser.from_file = false;
|
||||
parser.line_no = 1; //really arg count now.. duh
|
||||
@ -3165,8 +3165,14 @@ QStringList &QMakeProject::values(const QString &_var, QHash<QString, QStringLis
|
||||
QString ret, type = var.mid(13);
|
||||
if(type == "arch") {
|
||||
QString paths = qgetenv("PATH");
|
||||
QString vcBin64 = qgetenv("VCINSTALLDIR").append("\\bin\\amd64");
|
||||
QString vcBinX86_64 = qgetenv("VCINSTALLDIR").append("\\bin\\x86_amd64");
|
||||
QString vcBin64 = qgetenv("VCINSTALLDIR");
|
||||
if (!vcBin64.endsWith('\\'))
|
||||
vcBin64.append('\\');
|
||||
vcBin64.append("bin\\amd64");
|
||||
QString vcBinX86_64 = qgetenv("VCINSTALLDIR");
|
||||
if (!vcBinX86_64.endsWith('\\'))
|
||||
vcBinX86_64.append('\\');
|
||||
vcBinX86_64.append("bin\\x86_amd64");
|
||||
if(paths.contains(vcBin64,Qt::CaseInsensitive) || paths.contains(vcBinX86_64,Qt::CaseInsensitive))
|
||||
ret = "x86_64";
|
||||
else
|
||||
|
@ -117,8 +117,7 @@ public:
|
||||
QMakeProject(QMakeProperty *p, const QHash<QString, QStringList> &nvars) { init(p, &nvars); }
|
||||
~QMakeProject();
|
||||
|
||||
enum { ReadCache=0x01, ReadConf=0x02, ReadCmdLine=0x04, ReadProFile=0x08,
|
||||
ReadFeatures=0x20, ReadConfigs=0x40, ReadAll=0xFF };
|
||||
enum { ReadProFile=0x01, ReadSetup=0x02, ReadFeatures=0x04, ReadAll=0xFF };
|
||||
inline bool parse(const QString &text) { return parse(text, vars); }
|
||||
bool read(const QString &project, uchar cmd=ReadAll);
|
||||
bool read(uchar cmd=ReadAll);
|
||||
|
@ -76,7 +76,8 @@ bootstrap { #Qt code
|
||||
qvector.cpp \
|
||||
qvsnprintf.cpp \
|
||||
qxmlstream.cpp \
|
||||
qxmlutils.cpp
|
||||
qxmlutils.cpp \
|
||||
qlogging.cpp
|
||||
|
||||
HEADERS+= \
|
||||
qbitarray.h \
|
||||
|
@ -132,3 +132,11 @@ win32:!equals(QT_BUILD_TREE, $$QT_SOURCE_TREE) {
|
||||
mkspecs.files += $$QT_BUILD_TREE/mkspecs/default
|
||||
}
|
||||
INSTALLS += mkspecs
|
||||
|
||||
OTHER_FILES += \
|
||||
configure \
|
||||
header.BSD \
|
||||
header.FDL \
|
||||
header.LGPL \
|
||||
header.LGPL-ONLY \
|
||||
sync.profile
|
||||
|
@ -39,6 +39,10 @@ HB_BEGIN_HEADER
|
||||
#define VR_X_ADVANCE_DEVICE 2
|
||||
#define VR_Y_ADVANCE_DEVICE 3
|
||||
|
||||
#ifndef HB_SUPPORT_MULTIPLE_MASTER
|
||||
# define HB_USE_FLEXIBLE_VALUE_RECORD
|
||||
#endif
|
||||
|
||||
struct HB_ValueRecord_
|
||||
{
|
||||
HB_Short XPlacement; /* horizontal adjustment for
|
||||
@ -242,7 +246,11 @@ typedef struct HB_Class2Record_ HB_Class2Record;
|
||||
|
||||
struct HB_Class1Record_
|
||||
{
|
||||
HB_Class2Record* Class2Record; /* array of Class2Record tables */
|
||||
hb_uint8 IsFlexible;
|
||||
union {
|
||||
HB_Class2Record* Class2Record; /* array of Class2Record tables */
|
||||
HB_Short* ValueRecords;
|
||||
} c2r;
|
||||
};
|
||||
|
||||
typedef struct HB_Class1Record_ HB_Class1Record;
|
||||
|
203
src/3rdparty/harfbuzz/src/harfbuzz-gpos.c
vendored
203
src/3rdparty/harfbuzz/src/harfbuzz-gpos.c
vendored
@ -194,6 +194,43 @@ HB_Error HB_Done_GPOS_Table( HB_GPOSHeader* gpos )
|
||||
|
||||
/* ValueRecord */
|
||||
|
||||
static HB_Error Get_FlexibleValueRecord( GPOS_Instance* gpi,
|
||||
HB_Short* vr,
|
||||
HB_UShort format,
|
||||
HB_Position gd )
|
||||
{
|
||||
HB_Error error = HB_Err_Ok;
|
||||
|
||||
HB_16Dot16 x_scale, y_scale;
|
||||
|
||||
if ( !format )
|
||||
return HB_Err_Ok;
|
||||
|
||||
x_scale = gpi->font->x_scale;
|
||||
y_scale = gpi->font->y_scale;
|
||||
|
||||
/* design units -> fractional pixel */
|
||||
|
||||
if ( format & HB_GPOS_FORMAT_HAVE_X_PLACEMENT ) {
|
||||
gd->x_pos += *vr * x_scale / 0x10000;
|
||||
vr++;
|
||||
}
|
||||
if ( format & HB_GPOS_FORMAT_HAVE_Y_PLACEMENT ) {
|
||||
gd->y_pos += *vr * y_scale / 0x10000;
|
||||
vr++;
|
||||
}
|
||||
if ( format & HB_GPOS_FORMAT_HAVE_X_ADVANCE ) {
|
||||
gd->x_advance += *vr * x_scale / 0x10000;
|
||||
vr++;
|
||||
}
|
||||
if ( format & HB_GPOS_FORMAT_HAVE_Y_ADVANCE ) {
|
||||
gd->y_advance += *vr * y_scale / 0x10000;
|
||||
vr++;
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
/* There is a subtle difference in the specs between a `table' and a
|
||||
`record' -- offsets for device tables in ValueRecords are taken from
|
||||
the parent table and not the parent record. */
|
||||
@ -1245,6 +1282,19 @@ static void Free_PairPos1( HB_PairPosFormat1* ppf1,
|
||||
}
|
||||
}
|
||||
|
||||
static HB_UInt Calculate_Class2RecordSize(HB_UShort format1, HB_UShort format2)
|
||||
{
|
||||
// Return number of 16 bit values in two value records with given formats
|
||||
return (format1 & 0x01) + (format2 & 0x01)
|
||||
+ ((format1 & 0x02) >> 1) + ((format2 & 0x02) >> 1)
|
||||
+ ((format1 & 0x04) >> 2) + ((format2 & 0x04) >> 2)
|
||||
+ ((format1 & 0x08) >> 3) + ((format2 & 0x08) >> 3)
|
||||
+ ((format1 & 0x10) >> 4) + ((format2 & 0x10) >> 4)
|
||||
+ ((format1 & 0x20) >> 5) + ((format2 & 0x20) >> 5)
|
||||
+ ((format1 & 0x40) >> 6) + ((format2 & 0x40) >> 6)
|
||||
+ ((format1 & 0x80) >> 7) + ((format2 & 0x80) >> 7);
|
||||
}
|
||||
|
||||
|
||||
/* PairPosFormat2 */
|
||||
|
||||
@ -1256,11 +1306,14 @@ static HB_Error Load_PairPos2( HB_PairPosFormat2* ppf2,
|
||||
HB_Error error;
|
||||
|
||||
HB_UShort m, n, k, count1, count2;
|
||||
HB_UInt cur_offset, new_offset1, new_offset2, base_offset;
|
||||
HB_UInt cur_offset, new_offset1, new_offset2, base_offset, cls2_record_size = 0;
|
||||
|
||||
HB_Class1Record* c1r;
|
||||
HB_Class2Record* c2r;
|
||||
|
||||
HB_Short* vr;
|
||||
|
||||
hb_uint8 use_flexible_value_records;
|
||||
|
||||
base_offset = FILE_Pos() - 8L;
|
||||
|
||||
@ -1276,6 +1329,13 @@ static HB_Error Load_PairPos2( HB_PairPosFormat2* ppf2,
|
||||
count1 = ppf2->Class1Count = GET_UShort();
|
||||
count2 = ppf2->Class2Count = GET_UShort();
|
||||
|
||||
#ifndef HB_USE_FLEXIBLE_VALUE_RECORD
|
||||
use_flexible_value_records = 0;
|
||||
#else
|
||||
use_flexible_value_records = !((format1 & HB_GPOS_FORMAT_HAVE_DEVICE_TABLES) ||
|
||||
(format2 & HB_GPOS_FORMAT_HAVE_DEVICE_TABLES));
|
||||
#endif
|
||||
|
||||
FORGET_Frame();
|
||||
|
||||
cur_offset = FILE_Pos();
|
||||
@ -1296,35 +1356,55 @@ static HB_Error Load_PairPos2( HB_PairPosFormat2* ppf2,
|
||||
|
||||
c1r = ppf2->Class1Record;
|
||||
|
||||
if ( use_flexible_value_records )
|
||||
cls2_record_size = Calculate_Class2RecordSize(format1, format2);
|
||||
|
||||
for ( m = 0; m < count1; m++ )
|
||||
{
|
||||
c1r[m].Class2Record = NULL;
|
||||
c1r[m].IsFlexible = use_flexible_value_records;
|
||||
if ( use_flexible_value_records ) {
|
||||
c1r[m].c2r.ValueRecords = NULL;
|
||||
|
||||
if ( ALLOC_ARRAY( c1r[m].Class2Record, count2, HB_Class2Record ) )
|
||||
goto Fail1;
|
||||
if ( ALLOC_ARRAY( c1r[m].c2r.ValueRecords, count2 * cls2_record_size, HB_UShort ) )
|
||||
goto Fail1;
|
||||
|
||||
c2r = c1r[m].Class2Record;
|
||||
vr = c1r[m].c2r.ValueRecords;
|
||||
|
||||
for ( n = 0; n < count2; n++ )
|
||||
{
|
||||
if ( format1 )
|
||||
{
|
||||
error = Load_ValueRecord( &c2r[n].Value1, format1,
|
||||
base_offset, stream );
|
||||
if ( error )
|
||||
goto Fail0;
|
||||
}
|
||||
if ( format2 )
|
||||
{
|
||||
error = Load_ValueRecord( &c2r[n].Value2, format2,
|
||||
base_offset, stream );
|
||||
if ( error )
|
||||
{
|
||||
if ( format1 )
|
||||
Free_ValueRecord( &c2r[n].Value1, format1 );
|
||||
goto Fail0;
|
||||
}
|
||||
}
|
||||
if ( ACCESS_Frame( count2 * cls2_record_size * 2L ))
|
||||
goto Fail1;
|
||||
|
||||
for ( n = 0; n < count2 * cls2_record_size; n++ )
|
||||
vr[n] = GET_Short();
|
||||
|
||||
FORGET_Frame();
|
||||
} else {
|
||||
c1r[m].c2r.Class2Record = NULL;
|
||||
|
||||
if ( ALLOC_ARRAY( c1r[m].c2r.Class2Record, count2, HB_Class2Record ) )
|
||||
goto Fail1;
|
||||
|
||||
c2r = c1r[m].c2r.Class2Record;
|
||||
for ( n = 0; n < count2; n++ )
|
||||
{
|
||||
if ( format1 )
|
||||
{
|
||||
error = Load_ValueRecord( &c2r[n].Value1, format1,
|
||||
base_offset, stream );
|
||||
if ( error )
|
||||
goto Fail0;
|
||||
}
|
||||
if ( format2 )
|
||||
{
|
||||
error = Load_ValueRecord( &c2r[n].Value2, format2,
|
||||
base_offset, stream );
|
||||
if ( error )
|
||||
{
|
||||
if ( format1 )
|
||||
Free_ValueRecord( &c2r[n].Value1, format1 );
|
||||
goto Fail0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
continue;
|
||||
@ -1345,17 +1425,21 @@ static HB_Error Load_PairPos2( HB_PairPosFormat2* ppf2,
|
||||
Fail1:
|
||||
for ( k = 0; k < m; k++ )
|
||||
{
|
||||
c2r = c1r[k].Class2Record;
|
||||
if ( !use_flexible_value_records ) {
|
||||
c2r = c1r[k].c2r.Class2Record;
|
||||
|
||||
for ( n = 0; n < count2; n++ )
|
||||
{
|
||||
if ( format1 )
|
||||
Free_ValueRecord( &c2r[n].Value1, format1 );
|
||||
if ( format2 )
|
||||
Free_ValueRecord( &c2r[n].Value2, format2 );
|
||||
}
|
||||
for ( n = 0; n < count2; n++ )
|
||||
{
|
||||
if ( format1 )
|
||||
Free_ValueRecord( &c2r[n].Value1, format1 );
|
||||
if ( format2 )
|
||||
Free_ValueRecord( &c2r[n].Value2, format2 );
|
||||
}
|
||||
|
||||
FREE( c2r );
|
||||
FREE( c2r );
|
||||
} else {
|
||||
FREE( c1r[k].c2r.ValueRecords );
|
||||
}
|
||||
}
|
||||
|
||||
FREE( c1r );
|
||||
@ -1387,17 +1471,21 @@ static void Free_PairPos2( HB_PairPosFormat2* ppf2,
|
||||
|
||||
for ( m = 0; m < count1; m++ )
|
||||
{
|
||||
c2r = c1r[m].Class2Record;
|
||||
if ( !c1r[m].IsFlexible ) {
|
||||
c2r = c1r[m].c2r.Class2Record;
|
||||
|
||||
for ( n = 0; n < count2; n++ )
|
||||
{
|
||||
if ( format1 )
|
||||
Free_ValueRecord( &c2r[n].Value1, format1 );
|
||||
if ( format2 )
|
||||
Free_ValueRecord( &c2r[n].Value2, format2 );
|
||||
}
|
||||
for ( n = 0; n < count2; n++ )
|
||||
{
|
||||
if ( format1 )
|
||||
Free_ValueRecord( &c2r[n].Value1, format1 );
|
||||
if ( format2 )
|
||||
Free_ValueRecord( &c2r[n].Value2, format2 );
|
||||
}
|
||||
|
||||
FREE( c2r );
|
||||
FREE( c2r );
|
||||
} else {
|
||||
FREE( c1r[m].c2r.ValueRecords );
|
||||
}
|
||||
}
|
||||
|
||||
FREE( c1r );
|
||||
@ -1544,6 +1632,10 @@ static HB_Error Lookup_PairPos2( GPOS_Instance* gpi,
|
||||
|
||||
HB_Class1Record* c1r;
|
||||
HB_Class2Record* c2r;
|
||||
HB_Short* vr;
|
||||
|
||||
HB_UShort vr1_size;
|
||||
HB_UShort vr2_size;
|
||||
|
||||
|
||||
error = _HB_OPEN_Get_Class( &ppf2->ClassDef1, IN_GLYPH( first_pos ),
|
||||
@ -1558,15 +1650,28 @@ static HB_Error Lookup_PairPos2( GPOS_Instance* gpi,
|
||||
c1r = &ppf2->Class1Record[cl1];
|
||||
if ( !c1r )
|
||||
return ERR(HB_Err_Invalid_SubTable);
|
||||
c2r = &c1r->Class2Record[cl2];
|
||||
|
||||
error = Get_ValueRecord( gpi, &c2r->Value1, format1, POSITION( first_pos ) );
|
||||
if ( error )
|
||||
return error;
|
||||
return Get_ValueRecord( gpi, &c2r->Value2, format2, POSITION( buffer->in_pos ) );
|
||||
if ( !c1r->IsFlexible ) {
|
||||
c2r = &c1r->c2r.Class2Record[cl2];
|
||||
|
||||
error = Get_ValueRecord( gpi, &c2r->Value1, format1, POSITION( first_pos ) );
|
||||
if ( error )
|
||||
return error;
|
||||
return Get_ValueRecord( gpi, &c2r->Value2, format2, POSITION( buffer->in_pos ) );
|
||||
} else {
|
||||
vr1_size = Calculate_Class2RecordSize( format1, 0 );
|
||||
vr2_size = Calculate_Class2RecordSize( format2, 0 );
|
||||
|
||||
vr = c1r->c2r.ValueRecords + (cl2 * ( vr1_size + vr2_size ));
|
||||
|
||||
error = Get_FlexibleValueRecord( gpi, vr, format1, POSITION( first_pos ) );
|
||||
if ( error )
|
||||
return error;
|
||||
vr += vr1_size; // Skip to second record
|
||||
return Get_FlexibleValueRecord( gpi, vr, format2, POSITION( buffer->in_pos ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static HB_Error Lookup_PairPos( GPOS_Instance* gpi,
|
||||
HB_GPOS_SubTable* st,
|
||||
HB_Buffer buffer,
|
||||
|
1
src/3rdparty/libpng.pri
vendored
1
src/3rdparty/libpng.pri
vendored
@ -1,5 +1,4 @@
|
||||
DEFINES *= QT_USE_BUNDLED_LIBPNG
|
||||
!isEqual(QT_ARCH, i386):!isEqual(QT_ARCH, x86_64):DEFINES += PNG_NO_ASSEMBLER_CODE
|
||||
INCLUDEPATH += $$PWD/libpng
|
||||
SOURCES += $$PWD/libpng/png.c \
|
||||
$$PWD/libpng/pngerror.c \
|
||||
|
9
src/3rdparty/pcre.pri
vendored
9
src/3rdparty/pcre.pri
vendored
@ -1,14 +1,5 @@
|
||||
DEFINES += PCRE_HAVE_CONFIG_H
|
||||
|
||||
# man 3 pcrejit for a list of supported platforms;
|
||||
# as PCRE 8.30, stable JIT support is available for:
|
||||
# - ARM v5, v7, and Thumb2
|
||||
# - x86/x86-64
|
||||
# - MIPS 32bit
|
||||
equals(QT_ARCH, "i386")|equals(QT_ARCH, "x86_64")|equals(QT_ARCH, "arm")|if(equals(QT_ARCH, "mips"):!*-64) {
|
||||
DEFINES += SUPPORT_JIT
|
||||
}
|
||||
|
||||
win32:DEFINES += PCRE_STATIC
|
||||
|
||||
INCLUDEPATH += $$PWD/pcre
|
||||
|
17
src/3rdparty/pcre/config.h
vendored
17
src/3rdparty/pcre/config.h
vendored
@ -13,3 +13,20 @@
|
||||
#define SUPPORT_UCP
|
||||
#define SUPPORT_UTF16
|
||||
|
||||
/*
|
||||
man 3 pcrejit for a list of supported platforms;
|
||||
as PCRE 8.30, stable JIT support is available for:
|
||||
- ARM v5, v7, and Thumb2
|
||||
- x86/x86-64
|
||||
- MIPS 32bit
|
||||
*/
|
||||
#if \
|
||||
/* ARM */ \
|
||||
defined(__arm__) || defined(__TARGET_ARCH_ARM) \
|
||||
/* x86 32/64 */ \
|
||||
|| defined(__i386) || defined(__i386__) || defined(_M_IX86) \
|
||||
|| defined(__x86_64) || defined(__x86_64__) || defined(__amd64) || defined(_M_X64) \
|
||||
/* MIPS32 */ \
|
||||
|| defined(__mips) || defined(__mips__) || defined(_M_MRX000) && !(defined(_MIPS_ARCH_MIPS64) || defined(__mips64))
|
||||
# define SUPPORT_JIT
|
||||
#endif
|
||||
|
9
src/3rdparty/zlib/gzguts.h
vendored
9
src/3rdparty/zlib/gzguts.h
vendored
@ -32,7 +32,10 @@
|
||||
# include <limits.h>
|
||||
#endif
|
||||
#if !defined(_WIN32_WCE)
|
||||
#include <fcntl.h>
|
||||
# include <fcntl.h>
|
||||
#else
|
||||
# include <qglobal.h>
|
||||
# include <qfunctions_wince.h>
|
||||
#endif
|
||||
|
||||
#ifdef NO_DEFLATE /* for compatibility with old definition */
|
||||
@ -40,7 +43,9 @@
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# include <io.h>
|
||||
# if !defined(_WIN32_WCE)
|
||||
# include <io.h>
|
||||
# endif
|
||||
# define vsnprintf _vsnprintf
|
||||
#endif
|
||||
|
||||
|
8
src/3rdparty/zlib/zutil.c
vendored
8
src/3rdparty/zlib/zutil.c
vendored
@ -136,14 +136,6 @@ const char * ZEXPORT zError(err)
|
||||
return ERR_MSG(err);
|
||||
}
|
||||
|
||||
#if defined(_WIN32_WCE)
|
||||
/* The Microsoft C Run-Time Library for Windows CE doesn't have
|
||||
* errno. We define it as a global variable to simplify porting.
|
||||
* Its value is always 0 and should not be used.
|
||||
*/
|
||||
int errno = 0;
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_MEMCPY
|
||||
|
||||
void ZLIB_INTERNAL zmemcpy(dest, source, len)
|
||||
|
@ -1,3 +1,5 @@
|
||||
load(qt_module)
|
||||
|
||||
TARGET = QtConcurrent
|
||||
QPRO_PWD = $$PWD
|
||||
QT = core-private
|
||||
@ -12,7 +14,7 @@ unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES = QtCore
|
||||
|
||||
load(qt_module_config)
|
||||
|
||||
HEADERS += $$QT_SOURCE_TREE/src/xml/qtconcurrentversion.h
|
||||
HEADERS += $$QT_SOURCE_TREE/src/concurrent/qtconcurrentversion.h
|
||||
|
||||
PRECOMPILED_HEADER = ../corelib/global/qt_pch.h
|
||||
|
||||
@ -29,6 +31,7 @@ SOURCES += \
|
||||
qtconcurrentexception.cpp
|
||||
|
||||
HEADERS += \
|
||||
qtconcurrent_global.h \
|
||||
qfuture.h \
|
||||
qfutureinterface.h \
|
||||
qfuturesynchronizer.h \
|
||||
|
@ -42,7 +42,7 @@
|
||||
#ifndef QFUTURE_H
|
||||
#define QFUTURE_H
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
#include <QtConcurrent/qtconcurrent_global.h>
|
||||
|
||||
#ifndef QT_NO_QFUTURE
|
||||
|
||||
|
@ -42,7 +42,8 @@
|
||||
#ifndef QFUTUREINTERFACE_H
|
||||
#define QFUTUREINTERFACE_H
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
#include <QtConcurrent/qtconcurrent_global.h>
|
||||
|
||||
#include <QtCore/qrunnable.h>
|
||||
|
||||
#ifndef QT_NO_QFUTURE
|
||||
@ -60,7 +61,7 @@ class QFutureInterfaceBasePrivate;
|
||||
class QFutureWatcherBase;
|
||||
class QFutureWatcherBasePrivate;
|
||||
|
||||
class Q_CORE_EXPORT QFutureInterfaceBase
|
||||
class Q_CONCURRENT_EXPORT QFutureInterfaceBase
|
||||
{
|
||||
public:
|
||||
enum State {
|
||||
|
@ -53,6 +53,8 @@
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QtConcurrent/qtconcurrent_global.h>
|
||||
|
||||
#include <QtCore/qelapsedtimer.h>
|
||||
#include <QtCore/qcoreevent.h>
|
||||
#include <QtCore/qlist.h>
|
||||
|
@ -42,6 +42,8 @@
|
||||
#ifndef QFUTRUESYNCHRONIZER_H
|
||||
#define QFUTRUESYNCHRONIZER_H
|
||||
|
||||
#include <QtConcurrent/qtconcurrent_global.h>
|
||||
|
||||
#include <QtConcurrent/qfuture.h>
|
||||
|
||||
#ifndef QT_NO_CONCURRENT
|
||||
|
@ -42,6 +42,8 @@
|
||||
#ifndef QFUTUREWATCHER_H
|
||||
#define QFUTUREWATCHER_H
|
||||
|
||||
#include <QtConcurrent/qtconcurrent_global.h>
|
||||
|
||||
#include <QtConcurrent/qfuture.h>
|
||||
|
||||
#ifndef QT_NO_QFUTURE
|
||||
@ -55,7 +57,7 @@ QT_BEGIN_NAMESPACE
|
||||
class QEvent;
|
||||
|
||||
class QFutureWatcherBasePrivate;
|
||||
class Q_CORE_EXPORT QFutureWatcherBase : public QObject
|
||||
class Q_CONCURRENT_EXPORT QFutureWatcherBase : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DECLARE_PRIVATE(QFutureWatcherBase)
|
||||
|
@ -53,6 +53,8 @@
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QtConcurrent/qtconcurrent_global.h>
|
||||
|
||||
#include "qfutureinterface_p.h"
|
||||
#include <qlist.h>
|
||||
|
||||
|
@ -39,39 +39,46 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QATOMIC_ARCH_H
|
||||
#define QATOMIC_ARCH_H
|
||||
#ifndef QTCONCURRENT_GLOBAL_H
|
||||
#define QTCONCURRENT_GLOBAL_H
|
||||
|
||||
QT_BEGIN_HEADER
|
||||
#include <QtCore/qglobal.h>
|
||||
|
||||
#include "QtCore/qglobal.h"
|
||||
|
||||
#if defined(QT_ARCH_INTEGRITY)
|
||||
# include "QtCore/qatomic_integrity.h"
|
||||
#elif defined(QT_ARCH_VXWORKS)
|
||||
# include "QtCore/qatomic_vxworks.h"
|
||||
#elif defined(QT_ARCH_ALPHA)
|
||||
# include "QtCore/qatomic_alpha.h"
|
||||
#elif defined(QT_ARCH_BFIN)
|
||||
# include "QtCore/qatomic_bfin.h"
|
||||
#elif defined(QT_ARCH_GENERIC)
|
||||
# include "QtCore/qatomic_generic.h"
|
||||
#elif defined(QT_ARCH_PARISC)
|
||||
# include "QtCore/qatomic_parisc.h"
|
||||
#elif defined(QT_ARCH_POWERPC)
|
||||
# include "QtCore/qatomic_powerpc.h"
|
||||
#elif defined(QT_ARCH_S390)
|
||||
# include "QtCore/qatomic_s390.h"
|
||||
#elif defined(QT_ARCH_SPARC)
|
||||
# include "QtCore/qatomic_sparc.h"
|
||||
#elif defined(QT_ARCH_SH)
|
||||
# include "QtCore/qatomic_sh.h"
|
||||
#elif defined(QT_ARCH_SH4A)
|
||||
# include "QtCore/qatomic_sh4a.h"
|
||||
#else
|
||||
# error "Qt has not been ported to this architecture"
|
||||
#ifdef QT_NO_CONCURRENT
|
||||
# define QT_NO_QFUTURE
|
||||
#endif
|
||||
|
||||
QT_END_HEADER
|
||||
#if defined(Q_OS_WIN) && !defined(QT_NODLL)
|
||||
# if defined(QT_MAKEDLL)
|
||||
# if defined(QT_BUILD_CONCURRENT_LIB)
|
||||
# define Q_CONCURRENT_EXPORT Q_DECL_EXPORT
|
||||
# else
|
||||
# define Q_CONCURRENT_EXPORT Q_DECL_IMPORT
|
||||
# endif
|
||||
# elif defined(QT_DLL)
|
||||
# define Q_CONCURRENT_EXPORT Q_DECL_IMPORT
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif // QATOMIC_ARCH_H
|
||||
#if !defined(Q_CONCURRENT_EXPORT)
|
||||
# if defined(QT_SHARED)
|
||||
# define Q_CONCURRENT_EXPORT Q_DECL_EXPORT
|
||||
# else
|
||||
# define Q_CONCURRENT_EXPORT
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// gcc 3 version has problems with some of the
|
||||
// map/filter overloads.
|
||||
#if defined(Q_CC_GNU) && (__GNUC__ < 4)
|
||||
# define QT_NO_CONCURRENT_MAP
|
||||
# define QT_NO_CONCURRENT_FILTER
|
||||
#endif
|
||||
|
||||
#if defined (Q_CC_MSVC) && (_MSC_VER < 1300)
|
||||
# define QT_TYPENAME
|
||||
#else
|
||||
# define QT_TYPENAME typename
|
||||
#endif
|
||||
|
||||
#endif // include guard
|
@ -42,20 +42,13 @@
|
||||
#ifndef QTCONCURRENT_COMPILERTEST_H
|
||||
#define QTCONCURRENT_COMPILERTEST_H
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
#include <QtConcurrent/qtconcurrent_global.h>
|
||||
|
||||
#ifndef QT_NO_CONCURRENT
|
||||
|
||||
QT_BEGIN_HEADER
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
#if defined (Q_CC_MSVC) && (_MSC_VER < 1300)
|
||||
# define QT_TYPENAME
|
||||
#else
|
||||
# define QT_TYPENAME typename
|
||||
#endif
|
||||
|
||||
namespace QtPrivate {
|
||||
|
||||
template<class T>
|
||||
|
@ -42,7 +42,7 @@
|
||||
#ifndef QTCONCURRENT_EXCEPTION_H
|
||||
#define QTCONCURRENT_EXCEPTION_H
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
#include <QtConcurrent/qtconcurrent_global.h>
|
||||
|
||||
#ifndef QT_NO_QFUTURE
|
||||
|
||||
@ -62,14 +62,14 @@ namespace QtConcurrent
|
||||
|
||||
#ifndef QT_NO_EXCEPTIONS
|
||||
|
||||
class Q_CORE_EXPORT Exception : public std::exception
|
||||
class Q_CONCURRENT_EXPORT Exception : public std::exception
|
||||
{
|
||||
public:
|
||||
virtual void raise() const;
|
||||
virtual Exception *clone() const;
|
||||
};
|
||||
|
||||
class Q_CORE_EXPORT UnhandledException : public Exception
|
||||
class Q_CONCURRENT_EXPORT UnhandledException : public Exception
|
||||
{
|
||||
public:
|
||||
void raise() const;
|
||||
@ -90,7 +90,7 @@ public:
|
||||
QExplicitlySharedDataPointer<Base> base;
|
||||
};
|
||||
|
||||
class Q_CORE_EXPORT ExceptionStore
|
||||
class Q_CONCURRENT_EXPORT ExceptionStore
|
||||
{
|
||||
public:
|
||||
void setException(const Exception &e);
|
||||
@ -107,7 +107,7 @@ public:
|
||||
|
||||
namespace internal {
|
||||
|
||||
class Q_CORE_EXPORT ExceptionStore
|
||||
class Q_CONCURRENT_EXPORT ExceptionStore
|
||||
{
|
||||
public:
|
||||
ExceptionStore() { }
|
||||
|
@ -42,7 +42,7 @@
|
||||
#ifndef QTCONCURRENT_FILTER_H
|
||||
#define QTCONCURRENT_FILTER_H
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
#include <QtConcurrent/qtconcurrent_global.h>
|
||||
|
||||
#ifndef QT_NO_CONCURRENT
|
||||
|
||||
|
@ -42,7 +42,7 @@
|
||||
#ifndef QTCONCURRENT_FILTERKERNEL_H
|
||||
#define QTCONCURRENT_FILTERKERNEL_H
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
#include <QtConcurrent/qtconcurrent_global.h>
|
||||
|
||||
#ifndef QT_NO_CONCURRENT
|
||||
|
||||
|
@ -42,7 +42,7 @@
|
||||
#ifndef QTCONCURRENT_FUNCTIONWRAPPERS_H
|
||||
#define QTCONCURRENT_FUNCTIONWRAPPERS_H
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
#include <QtConcurrent/qtconcurrent_global.h>
|
||||
|
||||
#ifndef QT_NO_CONCURRENT
|
||||
|
||||
|
@ -42,7 +42,7 @@
|
||||
#ifndef QTCONCURRENT_ITERATEKERNEL_H
|
||||
#define QTCONCURRENT_ITERATEKERNEL_H
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
#include <QtConcurrent/qtconcurrent_global.h>
|
||||
|
||||
#ifndef QT_NO_CONCURRENT
|
||||
|
||||
@ -80,7 +80,7 @@ namespace QtConcurrent {
|
||||
management is done on the basis of the median of several timing measuremens,
|
||||
and it is done induvidualy for each thread.
|
||||
*/
|
||||
class Q_CORE_EXPORT BlockSizeManager
|
||||
class Q_CONCURRENT_EXPORT BlockSizeManager
|
||||
{
|
||||
public:
|
||||
BlockSizeManager(int iterationCount);
|
||||
|
@ -42,7 +42,7 @@
|
||||
#ifndef QTCONCURRENT_MAP_H
|
||||
#define QTCONCURRENT_MAP_H
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
#include <QtConcurrent/qtconcurrent_global.h>
|
||||
|
||||
#ifndef QT_NO_CONCURRENT
|
||||
|
||||
|
@ -42,7 +42,7 @@
|
||||
#ifndef QTCONCURRENT_MAPKERNEL_H
|
||||
#define QTCONCURRENT_MAPKERNEL_H
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
#include <QtConcurrent/qtconcurrent_global.h>
|
||||
|
||||
#ifndef QT_NO_CONCURRENT
|
||||
|
||||
|
@ -42,7 +42,7 @@
|
||||
#ifndef QTCONCURRENT_MEDIAN_H
|
||||
#define QTCONCURRENT_MEDIAN_H
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
#include <QtConcurrent/qtconcurrent_global.h>
|
||||
|
||||
#ifndef QT_NO_CONCURRENT
|
||||
|
||||
|
@ -42,7 +42,7 @@
|
||||
#ifndef QTCONCURRENT_REDUCEKERNEL_H
|
||||
#define QTCONCURRENT_REDUCEKERNEL_H
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
#include <QtConcurrent/qtconcurrent_global.h>
|
||||
|
||||
#ifndef QT_NO_CONCURRENT
|
||||
|
||||
|
@ -42,7 +42,7 @@
|
||||
#ifndef QTCONCURRENT_RESULTSTORE_H
|
||||
#define QTCONCURRENT_RESULTSTORE_H
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
#include <QtConcurrent/qtconcurrent_global.h>
|
||||
|
||||
#ifndef QT_NO_QFUTURE
|
||||
|
||||
@ -78,7 +78,7 @@ public:
|
||||
const void *result; // if count is 0 it's a result, otherwise it's a vector.
|
||||
};
|
||||
|
||||
class Q_CORE_EXPORT ResultIteratorBase
|
||||
class Q_CONCURRENT_EXPORT ResultIteratorBase
|
||||
{
|
||||
public:
|
||||
ResultIteratorBase();
|
||||
@ -119,7 +119,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class Q_CORE_EXPORT ResultStoreBase
|
||||
class Q_CONCURRENT_EXPORT ResultStoreBase
|
||||
{
|
||||
public:
|
||||
ResultStoreBase();
|
||||
|
@ -43,7 +43,7 @@
|
||||
#ifndef QTCONCURRENT_RUN_H
|
||||
#define QTCONCURRENT_RUN_H
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
#include <QtConcurrent/qtconcurrent_global.h>
|
||||
|
||||
#ifndef QT_NO_CONCURRENT
|
||||
|
||||
|
@ -42,7 +42,7 @@
|
||||
#ifndef QTCONCURRENT_RUNBASE_H
|
||||
#define QTCONCURRENT_RUNBASE_H
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
#include <QtConcurrent/qtconcurrent_global.h>
|
||||
|
||||
#ifndef QT_NO_CONCURRENT
|
||||
|
||||
|
@ -43,7 +43,7 @@
|
||||
#ifndef QTCONCURRENT_STOREDFUNCTIONCALL_H
|
||||
#define QTCONCURRENT_STOREDFUNCTIONCALL_H
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
#include <QtConcurrent/qtconcurrent_global.h>
|
||||
|
||||
#ifndef QT_NO_CONCURRENT
|
||||
#include <QtConcurrent/qtconcurrentrunbase.h>
|
||||
|
@ -42,7 +42,7 @@
|
||||
#ifndef QTCONCURRENT_THREADENGINE_H
|
||||
#define QTCONCURRENT_THREADENGINE_H
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
#include <QtConcurrent/qtconcurrent_global.h>
|
||||
|
||||
#ifndef QT_NO_CONCURRENT
|
||||
|
||||
@ -93,7 +93,7 @@ enum ThreadFunctionResult { ThrottleThread, ThreadFinished };
|
||||
// Can be run in three modes: single threaded, multi-threaded blocking
|
||||
// and multi-threaded asynchronous.
|
||||
// The code for the single threaded mode is
|
||||
class Q_CORE_EXPORT ThreadEngineBase: public QRunnable
|
||||
class Q_CONCURRENT_EXPORT ThreadEngineBase: public QRunnable
|
||||
{
|
||||
public:
|
||||
// Public API:
|
||||
|
@ -5,3 +5,14 @@ get_filename_component(_qt5_corelib_install_prefix ${CMAKE_CURRENT_LIST_DIR}/$${
|
||||
set(QT_QMAKE_EXECUTABLE \"${_qt5_corelib_install_prefix}/$$CMAKE_BIN_DIR/qmake$$CMAKE_BIN_SUFFIX\")
|
||||
set(QT_MOC_EXECUTABLE \"${_qt5_corelib_install_prefix}/$$CMAKE_BIN_DIR/moc$$CMAKE_BIN_SUFFIX\")
|
||||
set(QT_RCC_EXECUTABLE \"${_qt5_corelib_install_prefix}/$$CMAKE_BIN_DIR/rcc$$CMAKE_BIN_SUFFIX\")
|
||||
|
||||
list(APPEND Qt5Core_INCLUDE_DIRS \"${_qt5_corelib_install_prefix}/mkspecs/default\")
|
||||
|
||||
if (NOT \"$${CMAKE_ADD_FPIE_FLAGS}\" STREQUAL \"\")
|
||||
set(Qt5Core_COMPILE_FLAGS "-fPIE")
|
||||
endif()
|
||||
|
||||
if (NOT \"$$QT_NAMESPACE\" STREQUAL \"\")
|
||||
list(APPEND Qt5Core_DEFINITIONS -DQT_NAMESPACE=$$QT_NAMESPACE)
|
||||
list(APPEND Qt5Core_COMPILE_DEFINITIONS QT_NAMESPACE=$$QT_NAMESPACE)
|
||||
endif()
|
||||
|
@ -248,6 +248,12 @@ QUnifiedTimer *QUnifiedTimer::instance()
|
||||
return instance(true);
|
||||
}
|
||||
|
||||
void QUnifiedTimer::maybeUpdateAnimationsToCurrentTime()
|
||||
{
|
||||
if (time.elapsed() - lastTick > 50)
|
||||
updateAnimationTimers(driver->elapsed());
|
||||
}
|
||||
|
||||
void QUnifiedTimer::updateAnimationTimers(qint64 currentTick)
|
||||
{
|
||||
//setCurrentTime can get this called again while we're the for loop. At least with pauseAnimations
|
||||
@ -590,7 +596,7 @@ void QAnimationTimer::startAnimations()
|
||||
startAnimationPending = false;
|
||||
//force timer to update, which prevents large deltas for our newly added animations
|
||||
if (!animations.isEmpty())
|
||||
QUnifiedTimer::instance()->updateAnimationTimers(-1);
|
||||
QUnifiedTimer::instance()->maybeUpdateAnimationsToCurrentTime();
|
||||
|
||||
//we transfer the waiting animations into the "really running" state
|
||||
animations += animationsToStart;
|
||||
|
@ -149,7 +149,7 @@ public:
|
||||
|
||||
bool isRunning() const;
|
||||
|
||||
qint64 elapsed() const;
|
||||
virtual qint64 elapsed() const;
|
||||
|
||||
Q_SIGNALS:
|
||||
void started();
|
||||
|
@ -185,6 +185,7 @@ public:
|
||||
bool canUninstallAnimationDriver(QAnimationDriver *driver);
|
||||
|
||||
void restart();
|
||||
void maybeUpdateAnimationsToCurrentTime();
|
||||
void updateAnimationTimers(qint64 currentTick);
|
||||
|
||||
//useful for profiling/debugging
|
||||
|
@ -1,4 +0,0 @@
|
||||
#
|
||||
# Alpha architecture
|
||||
#
|
||||
!*-g++*:SOURCES += $$QT_ARCH_CPP/qatomic_alpha.s
|
@ -1,239 +0,0 @@
|
||||
;/****************************************************************************
|
||||
;**
|
||||
;** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
||||
;** Contact: http://www.qt-project.org/
|
||||
;**
|
||||
;** This file is part of the QtGui module of the Qt Toolkit.
|
||||
;**
|
||||
;** $QT_BEGIN_LICENSE:LGPL$
|
||||
;** GNU Lesser General Public License Usage
|
||||
;** 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, Nokia gives you certain additional
|
||||
;** rights. These rights are described in the Nokia 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.
|
||||
;**
|
||||
;** Other Usage
|
||||
;** Alternatively, this file may be used in accordance with the terms and
|
||||
;** conditions contained in a signed written agreement between you and Nokia.
|
||||
;**
|
||||
;**
|
||||
;**
|
||||
;**
|
||||
;**
|
||||
;**
|
||||
;** $QT_END_LICENSE$
|
||||
;**
|
||||
;****************************************************************************/
|
||||
.set noreorder
|
||||
.set volatile
|
||||
.set noat
|
||||
.arch ev4
|
||||
.text
|
||||
.align 2
|
||||
.align 4
|
||||
.globl q_atomic_test_and_set_int
|
||||
.ent q_atomic_test_and_set_int
|
||||
q_atomic_test_and_set_int:
|
||||
.frame $30,0,$26,0
|
||||
.prologue 0
|
||||
1: ldl_l $0,0($16)
|
||||
cmpeq $0,$17,$0
|
||||
beq $0,3f
|
||||
mov $18,$0
|
||||
stl_c $0,0($16)
|
||||
beq $0,2f
|
||||
br 3f
|
||||
2: br 1b
|
||||
3: addl $31,$0,$0
|
||||
ret $31,($26),1
|
||||
.end q_atomic_test_and_set_int
|
||||
.align 2
|
||||
.align 4
|
||||
.globl q_atomic_test_and_set_acquire_int
|
||||
.ent q_atomic_test_and_set_acquire_int
|
||||
q_atomic_test_and_set_acquire_int:
|
||||
.frame $30,0,$26,0
|
||||
.prologue 0
|
||||
1: ldl_l $0,0($16)
|
||||
cmpeq $0,$17,$0
|
||||
beq $0,3f
|
||||
mov $18,$0
|
||||
stl_c $0,0($16)
|
||||
beq $0,2f
|
||||
br 3f
|
||||
2: br 1b
|
||||
3: mb
|
||||
addl $31,$0,$0
|
||||
ret $31,($26),1
|
||||
.end q_atomic_test_and_set_acquire_int
|
||||
.align 2
|
||||
.align 4
|
||||
.globl q_atomic_test_and_set_release_int
|
||||
.ent q_atomic_test_and_set_release_int
|
||||
q_atomic_test_and_set_release_int:
|
||||
.frame $30,0,$26,0
|
||||
.prologue 0
|
||||
mb
|
||||
1: ldl_l $0,0($16)
|
||||
cmpeq $0,$17,$0
|
||||
beq $0,3f
|
||||
mov $18,$0
|
||||
stl_c $0,0($16)
|
||||
beq $0,2f
|
||||
br 3f
|
||||
2: br 1b
|
||||
3: addl $31,$0,$0
|
||||
ret $31,($26),1
|
||||
.end q_atomic_test_and_set_release_int
|
||||
.align 2
|
||||
.align 4
|
||||
.globl q_atomic_test_and_set_ptr
|
||||
.ent q_atomic_test_and_set_ptr
|
||||
q_atomic_test_and_set_ptr:
|
||||
.frame $30,0,$26,0
|
||||
.prologue 0
|
||||
1: ldq_l $0,0($16)
|
||||
cmpeq $0,$17,$0
|
||||
beq $0,3f
|
||||
mov $18,$0
|
||||
stq_c $0,0($16)
|
||||
beq $0,2f
|
||||
br 3f
|
||||
2: br 1b
|
||||
3: addl $31,$0,$0
|
||||
ret $31,($26),1
|
||||
.end q_atomic_test_and_set_ptr
|
||||
.align 2
|
||||
.align 4
|
||||
.globl q_atomic_increment
|
||||
.ent q_atomic_increment
|
||||
q_atomic_increment:
|
||||
.frame $30,0,$26,0
|
||||
.prologue 0
|
||||
1: ldl_l $0,0($16)
|
||||
addl $0,1,$1
|
||||
stl_c $1,0($16)
|
||||
beq $1,2f
|
||||
br 3f
|
||||
2: br 1b
|
||||
3: addl $31,$0,$0
|
||||
cmpeq $0,$1,$0
|
||||
xor $0,1,$0
|
||||
ret $31,($26),1
|
||||
.end q_atomic_increment
|
||||
.align 2
|
||||
.align 4
|
||||
.globl q_atomic_decrement
|
||||
.ent q_atomic_decrement
|
||||
q_atomic_decrement:
|
||||
.frame $30,0,$26,0
|
||||
.prologue 0
|
||||
1: ldl_l $0,0($16)
|
||||
subl $0,1,$1
|
||||
stl_c $1,0($16)
|
||||
beq $1,2f
|
||||
br 3f
|
||||
2: br 1b
|
||||
3: addl $31,$0,$0
|
||||
cmpeq $0,1,$0
|
||||
xor $0,1,$0
|
||||
ret $31,($26),1
|
||||
.end q_atomic_decrement
|
||||
.align 2
|
||||
.align 4
|
||||
.globl q_atomic_set_int
|
||||
.ent q_atomic_set_int
|
||||
q_atomic_set_int:
|
||||
.frame $30,0,$26,0
|
||||
.prologue 0
|
||||
1: ldl_l $0,0($16)
|
||||
mov $17,$1
|
||||
stl_c $1,0($16)
|
||||
beq $1,2f
|
||||
br 3f
|
||||
2: br 1b
|
||||
3: addl $31,$0,$0
|
||||
ret $31,($26),1
|
||||
.end q_atomic_set_int
|
||||
.align 2
|
||||
.align 4
|
||||
.globl q_atomic_set_ptr
|
||||
.ent q_atomic_set_ptr
|
||||
q_atomic_set_ptr:
|
||||
.frame $30,0,$26,0
|
||||
.prologue 0
|
||||
1: ldq_l $0,0($16)
|
||||
mov $17,$1
|
||||
stq_c $1,0($16)
|
||||
beq $1,2f
|
||||
br 3f
|
||||
2: br 1b
|
||||
3: ret $31,($26),1
|
||||
.end q_atomic_set_ptr
|
||||
|
||||
.align 2
|
||||
.align 4
|
||||
.globl q_atomic_fetch_and_add_int
|
||||
.ent q_atomic_fetch_and_add_int
|
||||
q_atomic_fetch_and_add_int:
|
||||
.frame $30,0,$26,0
|
||||
.prologue 0
|
||||
1: ldl_l $0,0($16)
|
||||
addl $0,$17,$1
|
||||
stl_c $1,0($16)
|
||||
beq $1,2f
|
||||
br 3f
|
||||
2: br 1b
|
||||
3: addl $31,$0,$0
|
||||
ret $31,($26),1
|
||||
.end q_atomic_fetch_and_add_int
|
||||
|
||||
.align 2
|
||||
.align 4
|
||||
.globl q_atomic_fetch_and_add_acquire_int
|
||||
.ent q_atomic_fetch_and_add_acquire_int
|
||||
q_atomic_fetch_and_add_acquire_int:
|
||||
.frame $30,0,$26,0
|
||||
.prologue 0
|
||||
1: ldl_l $0,0($16)
|
||||
addl $0,$17,$1
|
||||
stl_c $1,0($16)
|
||||
beq $1,2f
|
||||
br 3f
|
||||
2: br 1b
|
||||
3: mb
|
||||
addl $31,$0,$0
|
||||
ret $31,($26),1
|
||||
.end q_atomic_fetch_and_add_acquire_int
|
||||
|
||||
.align 2
|
||||
.align 4
|
||||
.globl q_atomic_fetch_and_add_release_int
|
||||
.ent q_atomic_fetch_and_add_release_int
|
||||
q_atomic_fetch_and_add_release_int:
|
||||
.frame $30,0,$26,0
|
||||
.prologue 0
|
||||
mb
|
||||
1: ldl_l $0,0($16)
|
||||
addl $0,$17,$1
|
||||
stl_c $1,0($16)
|
||||
beq $1,2f
|
||||
br 3f
|
||||
2: br 1b
|
||||
3: addl $31,$0,$0
|
||||
ret $31,($26),1
|
||||
.end q_atomic_fetch_and_add_release_int
|
@ -1,39 +1,27 @@
|
||||
win32:HEADERS += arch/qatomic_msvc.h \
|
||||
arch/qatomic_generic.h
|
||||
|
||||
win32-g++*:HEADERS += arch/qatomic_i386.h \
|
||||
arch/qatomic_x86_64.h
|
||||
|
||||
mac:HEADERS += arch/qatomic_i386.h \
|
||||
arch/qatomic_x86_64.h \
|
||||
arch/qatomic_generic.h
|
||||
|
||||
win32|wince:HEADERS += arch/qatomic_msvc.h
|
||||
vxworks:HEADERS += arch/qatomic_vxworks.h
|
||||
|
||||
integrity:HEADERS += arch/qatomic_integrity.h
|
||||
|
||||
!wince*:!win32:!mac:HEADERS += arch/qatomic_alpha.h \
|
||||
arch/qatomic_ia64.h \
|
||||
arch/qatomic_parisc.h \
|
||||
arch/qatomic_sparc.h \
|
||||
arch/qatomic_arch.h \
|
||||
arch/qatomic_generic.h \
|
||||
arch/qatomic_powerpc.h \
|
||||
arch/qatomic_arm.h \
|
||||
arch/qatomic_armv5.h \
|
||||
arch/qatomic_armv6.h \
|
||||
arch/qatomic_armv7.h \
|
||||
arch/qatomic_i386.h \
|
||||
arch/qatomic_mips.h \
|
||||
arch/qatomic_s390.h \
|
||||
arch/qatomic_x86_64.h \
|
||||
arch/qatomic_sh.h \
|
||||
arch/qatomic_sh4a.h \
|
||||
arch/qatomic_gcc.h \
|
||||
arch/qatomic_cxx11.h
|
||||
HEADERS += \
|
||||
arch/qatomic_alpha.h \
|
||||
arch/qatomic_armv5.h \
|
||||
arch/qatomic_armv6.h \
|
||||
arch/qatomic_armv7.h \
|
||||
arch/qatomic_bfin.h \
|
||||
arch/qatomic_bootstrap.h \
|
||||
arch/qatomic_i386.h \
|
||||
arch/qatomic_ia64.h \
|
||||
arch/qatomic_mips.h \
|
||||
arch/qatomic_power.h \
|
||||
arch/qatomic_s390.h \
|
||||
arch/qatomic_sh4a.h \
|
||||
arch/qatomic_sparc.h \
|
||||
arch/qatomic_x86_64.h \
|
||||
arch/qatomic_gcc.h \
|
||||
arch/qatomic_cxx11.h
|
||||
|
||||
QT_ARCH_CPP = $$QT_SOURCE_TREE/src/corelib/arch/$$QT_ARCH
|
||||
exists($$QT_ARCH_CPP) {
|
||||
DEPENDPATH += $$QT_ARCH_CPP
|
||||
include($$QT_ARCH_CPP/arch.pri, "", true)
|
||||
unix {
|
||||
# fallback implementation when no other appropriate qatomic_*.h exists
|
||||
HEADERS += arch/qatomic_unix.h
|
||||
SOURCES += arch/qatomic_unix.cpp
|
||||
}
|
||||
|
@ -1,6 +0,0 @@
|
||||
#
|
||||
# 'generic' architecture
|
||||
#
|
||||
|
||||
unix:SOURCES += qatomic_generic_unix.cpp
|
||||
win32:SOURCES += qatomic_generic_windows.cpp
|
@ -1,120 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** Contact: http://www.qt-project.org/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** GNU Lesser General Public License Usage
|
||||
** 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, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia 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.
|
||||
**
|
||||
** Other Usage
|
||||
** Alternatively, this file may be used in accordance with the terms and
|
||||
** conditions contained in a signed written agreement between you and Nokia.
|
||||
**
|
||||
**
|
||||
**
|
||||
**
|
||||
**
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "qplatformdefs.h"
|
||||
|
||||
#include <QtCore/qatomic.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
static pthread_mutex_t qAtomicMutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
|
||||
Q_CORE_EXPORT
|
||||
bool QBasicAtomicInt_testAndSetOrdered(volatile int *_q_value, int expectedValue, int newValue)
|
||||
{
|
||||
bool returnValue = false;
|
||||
pthread_mutex_lock(&qAtomicMutex);
|
||||
if (*_q_value == expectedValue) {
|
||||
*_q_value = newValue;
|
||||
returnValue = true;
|
||||
}
|
||||
pthread_mutex_unlock(&qAtomicMutex);
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
Q_CORE_EXPORT
|
||||
int QBasicAtomicInt_fetchAndStoreOrdered(volatile int *_q_value, int newValue)
|
||||
{
|
||||
int returnValue;
|
||||
pthread_mutex_lock(&qAtomicMutex);
|
||||
returnValue = *_q_value;
|
||||
*_q_value = newValue;
|
||||
pthread_mutex_unlock(&qAtomicMutex);
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
Q_CORE_EXPORT
|
||||
int QBasicAtomicInt_fetchAndAddOrdered(volatile int *_q_value, int valueToAdd)
|
||||
{
|
||||
int returnValue;
|
||||
pthread_mutex_lock(&qAtomicMutex);
|
||||
returnValue = *_q_value;
|
||||
*_q_value += valueToAdd;
|
||||
pthread_mutex_unlock(&qAtomicMutex);
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
Q_CORE_EXPORT
|
||||
bool QBasicAtomicPointer_testAndSetOrdered(void * volatile *_q_value,
|
||||
void *expectedValue,
|
||||
void *newValue)
|
||||
{
|
||||
bool returnValue = false;
|
||||
pthread_mutex_lock(&qAtomicMutex);
|
||||
if (*_q_value == expectedValue) {
|
||||
*_q_value = newValue;
|
||||
returnValue = true;
|
||||
}
|
||||
pthread_mutex_unlock(&qAtomicMutex);
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
Q_CORE_EXPORT
|
||||
void *QBasicAtomicPointer_fetchAndStoreOrdered(void * volatile *_q_value, void *newValue)
|
||||
{
|
||||
void *returnValue;
|
||||
pthread_mutex_lock(&qAtomicMutex);
|
||||
returnValue = *_q_value;
|
||||
*_q_value = newValue;
|
||||
pthread_mutex_unlock(&qAtomicMutex);
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
Q_CORE_EXPORT
|
||||
void *QBasicAtomicPointer_fetchAndAddOrdered(void * volatile *_q_value, qptrdiff valueToAdd)
|
||||
{
|
||||
void *returnValue;
|
||||
pthread_mutex_lock(&qAtomicMutex);
|
||||
returnValue = *_q_value;
|
||||
*_q_value = reinterpret_cast<char *>(returnValue) + valueToAdd;
|
||||
pthread_mutex_unlock(&qAtomicMutex);
|
||||
return returnValue;
|
||||
}
|
||||
QT_END_NAMESPACE
|
@ -1,131 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** Contact: http://www.qt-project.org/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** GNU Lesser General Public License Usage
|
||||
** 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, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia 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.
|
||||
**
|
||||
** Other Usage
|
||||
** Alternatively, this file may be used in accordance with the terms and
|
||||
** conditions contained in a signed written agreement between you and Nokia.
|
||||
**
|
||||
**
|
||||
**
|
||||
**
|
||||
**
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "qplatformdefs.h"
|
||||
|
||||
#include <QtCore/qatomic.h>
|
||||
|
||||
|
||||
class QCriticalSection
|
||||
{
|
||||
public:
|
||||
QCriticalSection() { InitializeCriticalSection(§ion); }
|
||||
~QCriticalSection() { DeleteCriticalSection(§ion); }
|
||||
void lock() { EnterCriticalSection(§ion); }
|
||||
void unlock() { LeaveCriticalSection(§ion); }
|
||||
|
||||
private:
|
||||
CRITICAL_SECTION section;
|
||||
};
|
||||
|
||||
static QCriticalSection qAtomicCriticalSection;
|
||||
|
||||
Q_CORE_EXPORT
|
||||
bool QBasicAtomicInt_testAndSetOrdered(volatile int *_q_value, int expectedValue, int newValue)
|
||||
{
|
||||
bool returnValue = false;
|
||||
qAtomicCriticalSection.lock();
|
||||
if (*_q_value == expectedValue) {
|
||||
*_q_value = newValue;
|
||||
returnValue = true;
|
||||
}
|
||||
qAtomicCriticalSection.unlock();
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
Q_CORE_EXPORT
|
||||
int QBasicAtomicInt_fetchAndStoreOrdered(volatile int *_q_value, int newValue)
|
||||
{
|
||||
int returnValue;
|
||||
qAtomicCriticalSection.lock();
|
||||
returnValue = *_q_value;
|
||||
*_q_value = newValue;
|
||||
qAtomicCriticalSection.unlock();
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
Q_CORE_EXPORT
|
||||
int QBasicAtomicInt_fetchAndAddOrdered(volatile int *_q_value, int valueToAdd)
|
||||
{
|
||||
int returnValue;
|
||||
qAtomicCriticalSection.lock();
|
||||
returnValue = *_q_value;
|
||||
*_q_value += valueToAdd;
|
||||
qAtomicCriticalSection.unlock();
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
Q_CORE_EXPORT
|
||||
bool QBasicAtomicPointer_testAndSetOrdered(void * volatile *_q_value,
|
||||
void *expectedValue,
|
||||
void *newValue)
|
||||
{
|
||||
bool returnValue = false;
|
||||
qAtomicCriticalSection.lock();
|
||||
if (*_q_value == expectedValue) {
|
||||
*_q_value = newValue;
|
||||
returnValue = true;
|
||||
}
|
||||
qAtomicCriticalSection.unlock();
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
Q_CORE_EXPORT
|
||||
void *QBasicAtomicPointer_fetchAndStoreOrdered(void * volatile *_q_value, void *newValue)
|
||||
{
|
||||
void *returnValue;
|
||||
qAtomicCriticalSection.lock();
|
||||
returnValue = *_q_value;
|
||||
*_q_value = newValue;
|
||||
qAtomicCriticalSection.unlock();
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
Q_CORE_EXPORT
|
||||
void *QBasicAtomicPointer_fetchAndAddOrdered(void * volatile *_q_value, qptrdiff valueToAdd)
|
||||
{
|
||||
void *returnValue;
|
||||
qAtomicCriticalSection.lock();
|
||||
returnValue = *_q_value;
|
||||
*_q_value = reinterpret_cast<char *>(returnValue) + valueToAdd;
|
||||
qAtomicCriticalSection.unlock();
|
||||
return returnValue;
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
#
|
||||
# HP PA-RISC architecture
|
||||
#
|
||||
SOURCES += $$QT_ARCH_CPP/q_ldcw.s \
|
||||
$$QT_ARCH_CPP/qatomic_parisc.cpp
|
@ -1,62 +0,0 @@
|
||||
;/****************************************************************************
|
||||
;**
|
||||
;** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
||||
;** Contact: http://www.qt-project.org/
|
||||
;**
|
||||
;** This file is part of the QtGui module of the Qt Toolkit.
|
||||
;**
|
||||
;** $QT_BEGIN_LICENSE:LGPL$
|
||||
;** GNU Lesser General Public License Usage
|
||||
;** 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, Nokia gives you certain additional
|
||||
;** rights. These rights are described in the Nokia 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.
|
||||
;**
|
||||
;** Other Usage
|
||||
;** Alternatively, this file may be used in accordance with the terms and
|
||||
;** conditions contained in a signed written agreement between you and Nokia.
|
||||
;**
|
||||
;**
|
||||
;**
|
||||
;**
|
||||
;**
|
||||
;**
|
||||
;** $QT_END_LICENSE$
|
||||
;**
|
||||
;****************************************************************************/
|
||||
.SPACE $PRIVATE$
|
||||
.SUBSPA $DATA$,QUAD=1,ALIGN=8,ACCESS=31
|
||||
.SUBSPA $BSS$,QUAD=1,ALIGN=8,ACCESS=31,ZERO,SORT=82
|
||||
.SPACE $TEXT$
|
||||
.SUBSPA $LIT$,QUAD=0,ALIGN=8,ACCESS=44
|
||||
.SUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY
|
||||
.IMPORT $global$,DATA
|
||||
.IMPORT $$dyncall,MILLICODE
|
||||
.SPACE $TEXT$
|
||||
.SUBSPA $CODE$
|
||||
|
||||
.align 4
|
||||
.EXPORT q_ldcw,ENTRY,PRIV_LEV=3,ARGW0=GR,RTNVAL=GR
|
||||
q_ldcw
|
||||
.PROC
|
||||
.CALLINFO FRAME=0,CALLS,SAVE_RP
|
||||
.ENTRY
|
||||
ldcw 0(%r26),%r1
|
||||
bv %r0(%r2)
|
||||
copy %r1,%r28
|
||||
.EXIT
|
||||
.PROCEND
|
@ -1,10 +0,0 @@
|
||||
#
|
||||
# PowerPC architecture
|
||||
#
|
||||
!*-g++* {
|
||||
*-64 {
|
||||
SOURCES += $$QT_ARCH_CPP/qatomic64.s
|
||||
} else {
|
||||
SOURCES += $$QT_ARCH_CPP/qatomic32.s
|
||||
}
|
||||
}
|
@ -1,525 +0,0 @@
|
||||
############################################################################
|
||||
##
|
||||
## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
||||
## Contact: http://www.qt-project.org/
|
||||
##
|
||||
## This file is part of the QtGui module of the Qt Toolkit.
|
||||
##
|
||||
## $QT_BEGIN_LICENSE:LGPL$
|
||||
## GNU Lesser General Public License Usage
|
||||
## 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, Nokia gives you certain additional
|
||||
## rights. These rights are described in the Nokia 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.
|
||||
##
|
||||
## Other Usage
|
||||
## Alternatively, this file may be used in accordance with the terms and
|
||||
## conditions contained in a signed written agreement between you and Nokia.
|
||||
##
|
||||
##
|
||||
##
|
||||
##
|
||||
##
|
||||
##
|
||||
## $QT_END_LICENSE$
|
||||
##
|
||||
############################################################################
|
||||
.machine "ppc"
|
||||
.toc
|
||||
.csect .text[PR]
|
||||
|
||||
.align 2
|
||||
.globl q_atomic_test_and_set_int
|
||||
.globl .q_atomic_test_and_set_int
|
||||
.csect q_atomic_test_and_set_int[DS],3
|
||||
q_atomic_test_and_set_int:
|
||||
.long .q_atomic_test_and_set_int,TOC[tc0],0
|
||||
.csect .text[PR]
|
||||
.q_atomic_test_and_set_int:
|
||||
lwarx 6,0,3
|
||||
xor. 6,6,4
|
||||
bne $+12
|
||||
stwcx. 5,0,3
|
||||
bne- $-16
|
||||
subfic 3,6,0
|
||||
adde 3,3,6
|
||||
blr
|
||||
LT..q_atomic_test_and_set_int:
|
||||
.long 0
|
||||
.byte 0,9,32,64,0,0,3,0
|
||||
.long 0
|
||||
.long LT..q_atomic_test_and_set_int-.q_atomic_test_and_set_int
|
||||
.short 25
|
||||
.byte "q_atomic_test_and_set_int"
|
||||
.align 2
|
||||
|
||||
.align 2
|
||||
.globl q_atomic_test_and_set_acquire_int
|
||||
.globl .q_atomic_test_and_set_acquire_int
|
||||
.csect q_atomic_test_and_set_acquire_int[DS],3
|
||||
q_atomic_test_and_set_acquire_int:
|
||||
.long .q_atomic_test_and_set_acquire_int,TOC[tc0],0
|
||||
.csect .text[PR]
|
||||
.q_atomic_test_and_set_acquire_int:
|
||||
lwarx 6,0,3
|
||||
xor. 6,6,4
|
||||
bne $+16
|
||||
stwcx. 5,0,3
|
||||
bne- $-16
|
||||
isync
|
||||
subfic 3,6,0
|
||||
adde 3,3,6
|
||||
blr
|
||||
LT..q_atomic_test_and_set_acquire_int:
|
||||
.long 0
|
||||
.byte 0,9,32,64,0,0,3,0
|
||||
.long 0
|
||||
.long LT..q_atomic_test_and_set_acquire_int-.q_atomic_test_and_set_acquire_int
|
||||
.short 33
|
||||
.byte "q_atomic_test_and_set_acquire_int"
|
||||
.align 2
|
||||
|
||||
.align 2
|
||||
.globl q_atomic_test_and_set_release_int
|
||||
.globl .q_atomic_test_and_set_release_int
|
||||
.csect q_atomic_test_and_set_release_int[DS],3
|
||||
q_atomic_test_and_set_release_int:
|
||||
.long .q_atomic_test_and_set_release_int,TOC[tc0],0
|
||||
.csect .text[PR]
|
||||
.q_atomic_test_and_set_release_int:
|
||||
eieio
|
||||
lwarx 6,0,3
|
||||
xor. 6,6,4
|
||||
bne $+12
|
||||
stwcx. 5,0,3
|
||||
bne- $-16
|
||||
subfic 3,6,0
|
||||
adde 3,3,6
|
||||
blr
|
||||
LT..q_atomic_test_and_set_release_int:
|
||||
.long 0
|
||||
.byte 0,9,32,64,0,0,3,0
|
||||
.long 0
|
||||
.long LT..q_atomic_test_and_set_release_int-.q_atomic_test_and_set_release_int
|
||||
.short 33
|
||||
.byte "q_atomic_test_and_set_release_int"
|
||||
.align 2
|
||||
|
||||
.align 2
|
||||
.globl q_atomic_test_and_set_ptr
|
||||
.globl .q_atomic_test_and_set_ptr
|
||||
.csect q_atomic_test_and_set_ptr[DS],3
|
||||
q_atomic_test_and_set_ptr:
|
||||
.long .q_atomic_test_and_set_ptr,TOC[tc0],0
|
||||
.csect .text[PR]
|
||||
.q_atomic_test_and_set_ptr:
|
||||
lwarx 6,0,3
|
||||
xor. 6,6,4
|
||||
bne $+12
|
||||
stwcx. 5,0,3
|
||||
bne- $-16
|
||||
subfic 3,6,0
|
||||
adde 3,3,6
|
||||
blr
|
||||
LT..q_atomic_test_and_set_ptr:
|
||||
.long 0
|
||||
.byte 0,9,32,64,0,0,3,0
|
||||
.long 0
|
||||
.long LT..q_atomic_test_and_set_ptr-.q_atomic_test_and_set_ptr
|
||||
.short 25
|
||||
.byte "q_atomic_test_and_set_ptr"
|
||||
.align 2
|
||||
|
||||
.align 2
|
||||
.globl q_atomic_test_and_set_acquire_ptr
|
||||
.globl .q_atomic_test_and_set_acquire_ptr
|
||||
.csect q_atomic_test_and_set_acquire_ptr[DS],3
|
||||
q_atomic_test_and_set_acquire_ptr:
|
||||
.long .q_atomic_test_and_set_acquire_ptr,TOC[tc0],0
|
||||
.csect .text[PR]
|
||||
.q_atomic_test_and_set_acquire_ptr:
|
||||
lwarx 6,0,3
|
||||
xor. 6,6,4
|
||||
bne $+16
|
||||
stwcx. 5,0,3
|
||||
bne- $-16
|
||||
isync
|
||||
subfic 3,6,0
|
||||
adde 3,3,6
|
||||
blr
|
||||
LT..q_atomic_test_and_set_acquire_ptr:
|
||||
.long 0
|
||||
.byte 0,9,32,64,0,0,3,0
|
||||
.long 0
|
||||
.long LT..q_atomic_test_and_set_acquire_ptr-.q_atomic_test_and_set_acquire_ptr
|
||||
.short 25
|
||||
.byte "q_atomic_test_and_set_acquire_ptr"
|
||||
.align 2
|
||||
|
||||
.align 2
|
||||
.globl q_atomic_test_and_set_release_ptr
|
||||
.globl .q_atomic_test_and_set_release_ptr
|
||||
.csect q_atomic_test_and_set_release_ptr[DS],3
|
||||
q_atomic_test_and_set_release_ptr:
|
||||
.long .q_atomic_test_and_set_release_ptr,TOC[tc0],0
|
||||
.csect .text[PR]
|
||||
.q_atomic_test_and_set_release_ptr:
|
||||
eieio
|
||||
lwarx 6,0,3
|
||||
xor. 6,6,4
|
||||
bne $+12
|
||||
stwcx. 5,0,3
|
||||
bne- $-16
|
||||
subfic 3,6,0
|
||||
adde 3,3,6
|
||||
blr
|
||||
LT..q_atomic_test_and_set_release_ptr:
|
||||
.long 0
|
||||
.byte 0,9,32,64,0,0,3,0
|
||||
.long 0
|
||||
.long LT..q_atomic_test_and_set_release_ptr-.q_atomic_test_and_set_release_ptr
|
||||
.short 33
|
||||
.byte "q_atomic_test_and_set_release_ptr"
|
||||
.align 2
|
||||
|
||||
.align 2
|
||||
.globl q_atomic_increment
|
||||
.globl .q_atomic_increment
|
||||
.csect q_atomic_increment[DS],3
|
||||
q_atomic_increment:
|
||||
.long .q_atomic_increment,TOC[tc0],0
|
||||
.csect .text[PR]
|
||||
.q_atomic_increment:
|
||||
lwarx 4,0,3
|
||||
addi 4,4,1
|
||||
stwcx. 4,0,3
|
||||
bne- $-12
|
||||
mr 3,4
|
||||
blr
|
||||
LT..q_atomic_increment:
|
||||
.long 0
|
||||
.byte 0,9,32,64,0,0,1,0
|
||||
.long 0
|
||||
.long LT..q_atomic_increment-.q_atomic_increment
|
||||
.short 18
|
||||
.byte "q_atomic_increment"
|
||||
.align 2
|
||||
|
||||
.align 2
|
||||
.globl q_atomic_decrement
|
||||
.globl .q_atomic_decrement
|
||||
.csect q_atomic_decrement[DS],3
|
||||
q_atomic_decrement:
|
||||
.long .q_atomic_decrement,TOC[tc0],0
|
||||
.csect .text[PR]
|
||||
.q_atomic_decrement:
|
||||
lwarx 4,0,3
|
||||
subi 4,4,1
|
||||
stwcx. 4,0,3
|
||||
bne- $-12
|
||||
mr 3,4
|
||||
blr
|
||||
LT..q_atomic_decrement:
|
||||
.long 0
|
||||
.byte 0,9,32,64,0,0,1,0
|
||||
.long 0
|
||||
.long LT..q_atomic_decrement-.q_atomic_decrement
|
||||
.short 18
|
||||
.byte "q_atomic_decrement"
|
||||
.align 2
|
||||
|
||||
.align 2
|
||||
.globl q_atomic_set_int
|
||||
.globl .q_atomic_set_int
|
||||
.csect q_atomic_set_int[DS],3
|
||||
q_atomic_set_int:
|
||||
.long .q_atomic_set_int,TOC[tc0],0
|
||||
.csect .text[PR]
|
||||
.q_atomic_set_int:
|
||||
lwarx 5,0,3
|
||||
stwcx. 4,0,3
|
||||
bne- $-8
|
||||
mr 3,5
|
||||
blr
|
||||
LT..q_atomic_set_int:
|
||||
.long 0
|
||||
.byte 0,9,32,64,0,0,2,0
|
||||
.long 0
|
||||
.long LT..q_atomic_set_int-.q_atomic_set_int
|
||||
.short 16
|
||||
.byte "q_atomic_set_int"
|
||||
.align 2
|
||||
|
||||
.align 2
|
||||
.globl q_atomic_fetch_and_store_acquire_int
|
||||
.globl .q_atomic_fetch_and_store_acquire_int
|
||||
.csect q_atomic_fetch_and_store_acquire_int[DS],3
|
||||
q_atomic_fetch_and_store_acquire_int:
|
||||
.long .q_atomic_fetch_and_store_acquire_int,TOC[tc0],0
|
||||
.csect .text[PR]
|
||||
.q_atomic_fetch_and_store_acquire_int:
|
||||
lwarx 5,0,3
|
||||
stwcx. 4,0,3
|
||||
bne- $-8
|
||||
isync
|
||||
mr 3,5
|
||||
blr
|
||||
LT..q_atomic_fetch_and_store_acquire_int:
|
||||
.long 0
|
||||
.byte 0,9,32,64,0,0,2,0
|
||||
.long 0
|
||||
.long LT..q_atomic_fetch_and_store_acquire_int-.q_atomic_fetch_and_store_acquire_int
|
||||
.short 16
|
||||
.byte "q_atomic_fetch_and_store_acquire_int"
|
||||
.align 2
|
||||
|
||||
.align 2
|
||||
.globl q_atomic_fetch_and_store_release_int
|
||||
.globl .q_atomic_fetch_and_store_release_int
|
||||
.csect q_atomic_fetch_and_store_release_int[DS],3
|
||||
q_atomic_fetch_and_store_release_int:
|
||||
.long .q_atomic_fetch_and_store_release_int,TOC[tc0],0
|
||||
.csect .text[PR]
|
||||
.q_atomic_fetch_and_store_release_int:
|
||||
eieio
|
||||
lwarx 5,0,3
|
||||
stwcx. 4,0,3
|
||||
bne- $-8
|
||||
mr 3,5
|
||||
blr
|
||||
LT..q_atomic_fetch_and_store_release_int:
|
||||
.long 0
|
||||
.byte 0,9,32,64,0,0,2,0
|
||||
.long 0
|
||||
.long LT..q_atomic_fetch_and_store_release_int-.q_atomic_fetch_and_store_release_int
|
||||
.short 16
|
||||
.byte "q_atomic_fetch_and_store_release_int"
|
||||
.align 2
|
||||
|
||||
.align 2
|
||||
.globl q_atomic_set_ptr
|
||||
.globl .q_atomic_set_ptr
|
||||
.csect q_atomic_set_ptr[DS],3
|
||||
q_atomic_set_ptr:
|
||||
.long .q_atomic_set_ptr,TOC[tc0],0
|
||||
.csect .text[PR]
|
||||
.q_atomic_set_ptr:
|
||||
lwarx 5,0,3
|
||||
stwcx. 4,0,3
|
||||
bne- $-8
|
||||
mr 3,5
|
||||
blr
|
||||
LT..q_atomic_set_ptr:
|
||||
.long 0
|
||||
.byte 0,9,32,64,0,0,2,0
|
||||
.long 0
|
||||
.long LT..q_atomic_set_ptr-.q_atomic_set_ptr
|
||||
.short 16
|
||||
.byte "q_atomic_set_ptr"
|
||||
.align 2
|
||||
|
||||
.align 2
|
||||
.globl q_atomic_fetch_and_store_acquire_ptr
|
||||
.globl .q_atomic_fetch_and_store_acquire_ptr
|
||||
.csect q_atomic_fetch_and_store_acquire_ptr[DS],3
|
||||
q_atomic_fetch_and_store_acquire_ptr:
|
||||
.long .q_atomic_fetch_and_store_acquire_ptr,TOC[tc0],0
|
||||
.csect .text[PR]
|
||||
.q_atomic_fetch_and_store_acquire_ptr:
|
||||
lwarx 5,0,3
|
||||
stwcx. 4,0,3
|
||||
bne- $-8
|
||||
isync
|
||||
mr 3,5
|
||||
blr
|
||||
LT..q_atomic_fetch_and_store_acquire_ptr:
|
||||
.long 0
|
||||
.byte 0,9,32,64,0,0,2,0
|
||||
.long 0
|
||||
.long LT..q_atomic_fetch_and_store_acquire_ptr-.q_atomic_fetch_and_store_acquire_ptr
|
||||
.short 16
|
||||
.byte "q_atomic_fetch_and_store_acquire_ptr"
|
||||
.align 2
|
||||
|
||||
.align 2
|
||||
.globl q_atomic_fetch_and_store_release_ptr
|
||||
.globl .q_atomic_fetch_and_store_release_ptr
|
||||
.csect q_atomic_fetch_and_store_release_ptr[DS],3
|
||||
q_atomic_fetch_and_store_release_ptr:
|
||||
.long .q_atomic_fetch_and_store_release_ptr,TOC[tc0],0
|
||||
.csect .text[PR]
|
||||
.q_atomic_fetch_and_store_release_ptr:
|
||||
eieio
|
||||
lwarx 5,0,3
|
||||
stwcx. 4,0,3
|
||||
bne- $-8
|
||||
mr 3,5
|
||||
blr
|
||||
LT..q_atomic_fetch_and_store_release_ptr:
|
||||
.long 0
|
||||
.byte 0,9,32,64,0,0,2,0
|
||||
.long 0
|
||||
.long LT..q_atomic_fetch_and_store_release_ptr-.q_atomic_fetch_and_store_release_ptr
|
||||
.short 16
|
||||
.byte "q_atomic_fetch_and_store_release_ptr"
|
||||
.align 2
|
||||
|
||||
.align 2
|
||||
.globl q_atomic_fetch_and_add_int
|
||||
.globl .q_atomic_fetch_and_add_int
|
||||
.csect q_atomic_fetch_and_add_int[DS],3
|
||||
q_atomic_fetch_and_add_int:
|
||||
.long .q_atomic_fetch_and_add_int,TOC[tc0],0
|
||||
.csect .text[PR]
|
||||
.q_atomic_fetch_and_add_int:
|
||||
lwarx 5,0,3
|
||||
add 6,4,5
|
||||
stwcx. 6,0,3
|
||||
bne- $-12
|
||||
mr 3,5
|
||||
blr
|
||||
LT..q_atomic_fetch_and_add_int:
|
||||
.long 0
|
||||
.byte 0,9,32,64,0,0,1,0
|
||||
.long 0
|
||||
.long LT..q_atomic_fetch_and_add_int-.q_atomic_fetch_and_add_int
|
||||
.short 18
|
||||
.byte "q_atomic_fetch_and_add_int"
|
||||
.align 2
|
||||
|
||||
.align 2
|
||||
.globl q_atomic_fetch_and_add_acquire_int
|
||||
.globl .q_atomic_fetch_and_add_acquire_int
|
||||
.csect q_atomic_fetch_and_add_acquire_int[DS],3
|
||||
q_atomic_fetch_and_add_acquire_int:
|
||||
.long .q_atomic_fetch_and_add_acquire_int,TOC[tc0],0
|
||||
.csect .text[PR]
|
||||
.q_atomic_fetch_and_add_acquire_int:
|
||||
lwarx 5,0,3
|
||||
add 6,4,5
|
||||
stwcx. 6,0,3
|
||||
bne- $-12
|
||||
isync
|
||||
mr 3,5
|
||||
blr
|
||||
LT..q_atomic_fetch_and_add_acquire_int:
|
||||
.long 0
|
||||
.byte 0,9,32,64,0,0,1,0
|
||||
.long 0
|
||||
.long LT..q_atomic_fetch_and_add_acquire_int-.q_atomic_fetch_and_add_acquire_int
|
||||
.short 18
|
||||
.byte "q_atomic_fetch_and_add_acquire_int"
|
||||
.align 2
|
||||
|
||||
.align 2
|
||||
.globl q_atomic_fetch_and_add_release_int
|
||||
.globl .q_atomic_fetch_and_add_release_int
|
||||
.csect q_atomic_fetch_and_add_release_int[DS],3
|
||||
q_atomic_fetch_and_add_release_int:
|
||||
.long .q_atomic_fetch_and_add_release_int,TOC[tc0],0
|
||||
.csect .text[PR]
|
||||
.q_atomic_fetch_and_add_release_int:
|
||||
eieio
|
||||
lwarx 5,0,3
|
||||
add 6,4,5
|
||||
stwcx. 6,0,3
|
||||
bne- $-12
|
||||
mr 3,5
|
||||
blr
|
||||
LT..q_atomic_fetch_and_add_release_int:
|
||||
.long 0
|
||||
.byte 0,9,32,64,0,0,1,0
|
||||
.long 0
|
||||
.long LT..q_atomic_fetch_and_add_release_int-.q_atomic_fetch_and_add_release_int
|
||||
.short 34
|
||||
.byte "q_atomic_fetch_and_add_release_int"
|
||||
.align 2
|
||||
|
||||
.align 2
|
||||
.globl q_atomic_fetch_and_add_ptr
|
||||
.globl .q_atomic_fetch_and_add_ptr
|
||||
.csect q_atomic_fetch_and_add_ptr[DS],3
|
||||
q_atomic_fetch_and_add_ptr:
|
||||
.long .q_atomic_fetch_and_add_ptr,TOC[tc0],0
|
||||
.csect .text[PR]
|
||||
.q_atomic_fetch_and_add_ptr:
|
||||
lwarx 5,0,3
|
||||
add 6,4,5
|
||||
stwcx. 6,0,3
|
||||
bne- $-12
|
||||
mr 3,5
|
||||
blr
|
||||
LT..q_atomic_fetch_and_add_ptr:
|
||||
.long 0
|
||||
.byte 0,9,32,64,0,0,1,0
|
||||
.long 0
|
||||
.long LT..q_atomic_fetch_and_add_ptr-.q_atomic_fetch_and_add_ptr
|
||||
.short 26
|
||||
.byte "q_atomic_fetch_and_add_ptr"
|
||||
.align 2
|
||||
|
||||
.align 2
|
||||
.globl q_atomic_fetch_and_add_acquire_ptr
|
||||
.globl .q_atomic_fetch_and_add_acquire_ptr
|
||||
.csect q_atomic_fetch_and_add_acquire_ptr[DS],3
|
||||
q_atomic_fetch_and_add_acquire_ptr:
|
||||
.long .q_atomic_fetch_and_add_acquire_ptr,TOC[tc0],0
|
||||
.csect .text[PR]
|
||||
.q_atomic_fetch_and_add_acquire_ptr:
|
||||
lwarx 5,0,3
|
||||
add 6,4,5
|
||||
stwcx. 6,0,3
|
||||
bne- $-12
|
||||
isync
|
||||
mr 3,5
|
||||
blr
|
||||
LT..q_atomic_fetch_and_add_acquire_ptr:
|
||||
.long 0
|
||||
.byte 0,9,32,64,0,0,1,0
|
||||
.long 0
|
||||
.long LT..q_atomic_fetch_and_add_acquire_ptr-.q_atomic_fetch_and_add_acquire_ptr
|
||||
.short 34
|
||||
.byte "q_atomic_fetch_and_add_acquire_ptr"
|
||||
.align 2
|
||||
|
||||
.align 2
|
||||
.globl q_atomic_fetch_and_add_release_ptr
|
||||
.globl .q_atomic_fetch_and_add_release_ptr
|
||||
.csect q_atomic_fetch_and_add_release_ptr[DS],3
|
||||
q_atomic_fetch_and_add_release_ptr:
|
||||
.long .q_atomic_fetch_and_add_release_ptr,TOC[tc0],0
|
||||
.csect .text[PR]
|
||||
.q_atomic_fetch_and_add_release_ptr:
|
||||
eieio
|
||||
lwarx 5,0,3
|
||||
add 6,4,5
|
||||
stwcx. 6,0,3
|
||||
bne- $-12
|
||||
mr 3,5
|
||||
blr
|
||||
LT..q_atomic_fetch_and_add_release_ptr:
|
||||
.long 0
|
||||
.byte 0,9,32,64,0,0,1,0
|
||||
.long 0
|
||||
.long LT..q_atomic_fetch_and_add_release_ptr-.q_atomic_fetch_and_add_release_ptr
|
||||
.short 34
|
||||
.byte "q_atomic_fetch_and_add_release_ptr"
|
||||
.align 2
|
||||
|
||||
_section_.text:
|
||||
.csect .data[RW],3
|
||||
.long _section_.text
|
@ -1,533 +0,0 @@
|
||||
############################################################################
|
||||
##
|
||||
## Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
||||
## Contact: http://www.qt-project.org/
|
||||
##
|
||||
## This file is part of the QtGui module of the Qt Toolkit.
|
||||
##
|
||||
## $QT_BEGIN_LICENSE:LGPL$
|
||||
## GNU Lesser General Public License Usage
|
||||
## 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, Nokia gives you certain additional
|
||||
## rights. These rights are described in the Nokia 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.
|
||||
##
|
||||
## Other Usage
|
||||
## Alternatively, this file may be used in accordance with the terms and
|
||||
## conditions contained in a signed written agreement between you and Nokia.
|
||||
##
|
||||
##
|
||||
##
|
||||
##
|
||||
##
|
||||
##
|
||||
## $QT_END_LICENSE$
|
||||
##
|
||||
############################################################################
|
||||
.machine "ppc64"
|
||||
.toc
|
||||
.csect .text[PR]
|
||||
|
||||
.align 2
|
||||
.globl q_atomic_test_and_set_int
|
||||
.globl .q_atomic_test_and_set_int
|
||||
.csect q_atomic_test_and_set_int[DS],3
|
||||
q_atomic_test_and_set_int:
|
||||
.llong .q_atomic_test_and_set_int,TOC[tc0],0
|
||||
.csect .text[PR]
|
||||
.q_atomic_test_and_set_int:
|
||||
lwarx 6,0,3
|
||||
xor. 6,6,4
|
||||
bne $+12
|
||||
stwcx. 5,0,3
|
||||
bne- $-16
|
||||
subfic 3,6,0
|
||||
adde 3,3,6
|
||||
extsw 3,3
|
||||
blr
|
||||
LT..q_atomic_test_and_set_int:
|
||||
.long 0
|
||||
.byte 0,9,32,64,0,0,3,0
|
||||
.long 0
|
||||
.long LT..q_atomic_test_and_set_int-.q_atomic_test_and_set_int
|
||||
.short 25
|
||||
.byte "q_atomic_test_and_set_int"
|
||||
.align 2
|
||||
|
||||
.align 2
|
||||
.globl q_atomic_test_and_set_acquire_int
|
||||
.globl .q_atomic_test_and_set_acquire_int
|
||||
.csect q_atomic_test_and_set_acquire_int[DS],3
|
||||
q_atomic_test_and_set_acquire_int:
|
||||
.llong .q_atomic_test_and_set_acquire_int,TOC[tc0],0
|
||||
.csect .text[PR]
|
||||
.q_atomic_test_and_set_acquire_int:
|
||||
lwarx 6,0,3
|
||||
xor. 6,6,4
|
||||
bne $+16
|
||||
stwcx. 5,0,3
|
||||
bne- $-16
|
||||
isync
|
||||
subfic 3,6,0
|
||||
adde 3,3,6
|
||||
extsw 3,3
|
||||
blr
|
||||
LT..q_atomic_test_and_set_acquire_int:
|
||||
.long 0
|
||||
.byte 0,9,32,64,0,0,3,0
|
||||
.long 0
|
||||
.long LT..q_atomic_test_and_set_acquire_int-.q_atomic_test_and_set_acquire_int
|
||||
.short 33
|
||||
.byte "q_atomic_test_and_set_acquire_int"
|
||||
.align 2
|
||||
|
||||
.align 2
|
||||
.globl q_atomic_test_and_set_release_int
|
||||
.globl .q_atomic_test_and_set_release_int
|
||||
.csect q_atomic_test_and_set_release_int[DS],3
|
||||
q_atomic_test_and_set_release_int:
|
||||
.llong .q_atomic_test_and_set_release_int,TOC[tc0],0
|
||||
.csect .text[PR]
|
||||
.q_atomic_test_and_set_release_int:
|
||||
eieio
|
||||
lwarx 6,0,3
|
||||
xor. 6,6,4
|
||||
bne $+12
|
||||
stwcx. 5,0,3
|
||||
bne- $-16
|
||||
subfic 3,6,0
|
||||
adde 3,3,6
|
||||
extsw 3,3
|
||||
blr
|
||||
LT..q_atomic_test_and_set_release_int:
|
||||
.long 0
|
||||
.byte 0,9,32,64,0,0,3,0
|
||||
.long 0
|
||||
.long LT..q_atomic_test_and_set_release_int-.q_atomic_test_and_set_release_int
|
||||
.short 33
|
||||
.byte "q_atomic_test_and_set_release_int"
|
||||
.align 2
|
||||
|
||||
.align 2
|
||||
.globl q_atomic_test_and_set_ptr
|
||||
.globl .q_atomic_test_and_set_ptr
|
||||
.csect q_atomic_test_and_set_ptr[DS],3
|
||||
q_atomic_test_and_set_ptr:
|
||||
.llong .q_atomic_test_and_set_ptr,TOC[tc0],0
|
||||
.csect .text[PR]
|
||||
.q_atomic_test_and_set_ptr:
|
||||
ldarx 6,0,3
|
||||
xor. 6,6,4
|
||||
bne $+12
|
||||
stdcx. 5,0,3
|
||||
bne- $-16
|
||||
subfic 3,6,0
|
||||
adde 3,3,6
|
||||
blr
|
||||
LT..q_atomic_test_and_set_ptr:
|
||||
.long 0
|
||||
.byte 0,9,32,64,0,0,3,0
|
||||
.long 0
|
||||
.long LT..q_atomic_test_and_set_ptr-.q_atomic_test_and_set_ptr
|
||||
.short 25
|
||||
.byte "q_atomic_test_and_set_ptr"
|
||||
.align 2
|
||||
|
||||
.align 2
|
||||
.globl q_atomic_test_and_set_acquire_ptr
|
||||
.globl .q_atomic_test_and_set_acquire_ptr
|
||||
.csect q_atomic_test_and_set_acquire_ptr[DS],3
|
||||
q_atomic_test_and_set_acquire_ptr:
|
||||
.llong .q_atomic_test_and_set_acquire_ptr,TOC[tc0],0
|
||||
.csect .text[PR]
|
||||
.q_atomic_test_and_set_acquire_ptr:
|
||||
ldarx 6,0,3
|
||||
xor. 6,6,4
|
||||
bne $+16
|
||||
stdcx. 5,0,3
|
||||
bne- $-16
|
||||
isync
|
||||
subfic 3,6,0
|
||||
adde 3,3,6
|
||||
blr
|
||||
LT..q_atomic_test_and_set_acquire_ptr:
|
||||
.long 0
|
||||
.byte 0,9,32,64,0,0,3,0
|
||||
.long 0
|
||||
.long LT..q_atomic_test_and_set_acquire_ptr-.q_atomic_test_and_set_acquire_ptr
|
||||
.short 33
|
||||
.byte "q_atomic_test_and_set_acquire_ptr"
|
||||
.align 2
|
||||
|
||||
.align 2
|
||||
.globl q_atomic_test_and_set_release_ptr
|
||||
.globl .q_atomic_test_and_set_release_ptr
|
||||
.csect q_atomic_test_and_set_release_ptr[DS],3
|
||||
q_atomic_test_and_set_release_ptr:
|
||||
.llong .q_atomic_test_and_set_release_ptr,TOC[tc0],0
|
||||
.csect .text[PR]
|
||||
.q_atomic_test_and_set_release_ptr:
|
||||
eieio
|
||||
ldarx 6,0,3
|
||||
xor. 6,6,4
|
||||
bne $+12
|
||||
stdcx. 5,0,3
|
||||
bne- $-16
|
||||
subfic 3,6,0
|
||||
adde 3,3,6
|
||||
blr
|
||||
LT..q_atomic_test_and_set_release_ptr:
|
||||
.long 0
|
||||
.byte 0,9,32,64,0,0,3,0
|
||||
.long 0
|
||||
.long LT..q_atomic_test_and_set_release_ptr-.q_atomic_test_and_set_release_ptr
|
||||
.short 33
|
||||
.byte "q_atomic_test_and_set_release_ptr"
|
||||
.align 2
|
||||
|
||||
.align 2
|
||||
.globl q_atomic_increment
|
||||
.globl .q_atomic_increment
|
||||
.csect q_atomic_increment[DS],3
|
||||
q_atomic_increment:
|
||||
.llong .q_atomic_increment,TOC[tc0],0
|
||||
.csect .text[PR]
|
||||
.q_atomic_increment:
|
||||
lwarx 4,0,3
|
||||
addi 5,4,1
|
||||
extsw 4,5
|
||||
stwcx. 4,0,3
|
||||
bne- $-16
|
||||
mr 3,4
|
||||
blr
|
||||
LT..q_atomic_increment:
|
||||
.long 0
|
||||
.byte 0,9,32,64,0,0,1,0
|
||||
.long 0
|
||||
.long LT..q_atomic_increment-.q_atomic_increment
|
||||
.short 18
|
||||
.byte "q_atomic_increment"
|
||||
.align 2
|
||||
|
||||
.align 2
|
||||
.globl q_atomic_decrement
|
||||
.globl .q_atomic_decrement
|
||||
.csect q_atomic_decrement[DS],3
|
||||
q_atomic_decrement:
|
||||
.llong .q_atomic_decrement,TOC[tc0],0
|
||||
.csect .text[PR]
|
||||
.q_atomic_decrement:
|
||||
lwarx 4,0,3
|
||||
subi 5,4,1
|
||||
extsw 4,5
|
||||
stwcx. 4,0,3
|
||||
bne- $-16
|
||||
mr 3,4
|
||||
blr
|
||||
LT..q_atomic_decrement:
|
||||
.long 0
|
||||
.byte 0,9,32,64,0,0,1,0
|
||||
.long 0
|
||||
.long LT..q_atomic_decrement-.q_atomic_decrement
|
||||
.short 18
|
||||
.byte "q_atomic_decrement"
|
||||
.align 2
|
||||
|
||||
.align 2
|
||||
.globl q_atomic_set_int
|
||||
.globl .q_atomic_set_int
|
||||
.csect q_atomic_set_int[DS],3
|
||||
q_atomic_set_int:
|
||||
.llong .q_atomic_set_int,TOC[tc0],0
|
||||
.csect .text[PR]
|
||||
.q_atomic_set_int:
|
||||
lwarx 5,0,3
|
||||
stwcx. 4,0,3
|
||||
bne- $-8
|
||||
extsw 3,5
|
||||
blr
|
||||
LT..q_atomic_set_int:
|
||||
.long 0
|
||||
.byte 0,9,32,64,0,0,2,0
|
||||
.long 0
|
||||
.long LT..q_atomic_set_int-.q_atomic_set_int
|
||||
.short 16
|
||||
.byte "q_atomic_set_int"
|
||||
.align 2
|
||||
|
||||
.align 2
|
||||
.globl q_atomic_fetch_and_store_acquire_int
|
||||
.globl .q_atomic_fetch_and_store_acquire_int
|
||||
.csect q_atomic_fetch_and_store_acquire_int[DS],3
|
||||
q_atomic_fetch_and_store_acquire_int:
|
||||
.llong .q_atomic_fetch_and_store_acquire_int,TOC[tc0],0
|
||||
.csect .text[PR]
|
||||
.q_atomic_fetch_and_store_acquire_int:
|
||||
lwarx 5,0,3
|
||||
stwcx. 4,0,3
|
||||
bne- $-8
|
||||
isync
|
||||
extsw 3,5
|
||||
blr
|
||||
LT..q_atomic_fetch_and_store_acquire_int:
|
||||
.long 0
|
||||
.byte 0,9,32,64,0,0,2,0
|
||||
.long 0
|
||||
.long LT..q_atomic_fetch_and_store_acquire_int-.q_atomic_fetch_and_store_acquire_int
|
||||
.short 36
|
||||
.byte "q_atomic_fetch_and_store_acquire_int"
|
||||
.align 2
|
||||
|
||||
.align 2
|
||||
.globl q_atomic_fetch_and_store_release_int
|
||||
.globl .q_atomic_fetch_and_store_release_int
|
||||
.csect q_atomic_fetch_and_store_release_int[DS],3
|
||||
q_atomic_fetch_and_store_release_int:
|
||||
.llong .q_atomic_fetch_and_store_release_int,TOC[tc0],0
|
||||
.csect .text[PR]
|
||||
.q_atomic_fetch_and_store_release_int:
|
||||
eieio
|
||||
lwarx 5,0,3
|
||||
stwcx. 4,0,3
|
||||
bne- $-8
|
||||
extsw 3,5
|
||||
blr
|
||||
LT..q_atomic_fetch_and_store_release_int:
|
||||
.long 0
|
||||
.byte 0,9,32,64,0,0,2,0
|
||||
.long 0
|
||||
.long LT..q_atomic_fetch_and_store_release_int-.q_atomic_fetch_and_store_release_int
|
||||
.short 36
|
||||
.byte "q_atomic_fetch_and_store_release_int"
|
||||
.align 2
|
||||
|
||||
.align 2
|
||||
.globl q_atomic_set_ptr
|
||||
.globl .q_atomic_set_ptr
|
||||
.csect q_atomic_set_ptr[DS],3
|
||||
q_atomic_set_ptr:
|
||||
.llong .q_atomic_set_ptr,TOC[tc0],0
|
||||
.csect .text[PR]
|
||||
.q_atomic_set_ptr:
|
||||
ldarx 5,0,3
|
||||
stdcx. 4,0,3
|
||||
bne- $-8
|
||||
mr 3,5
|
||||
blr
|
||||
LT..q_atomic_set_ptr:
|
||||
.long 0
|
||||
.byte 0,9,32,64,0,0,2,0
|
||||
.long 0
|
||||
.long LT..q_atomic_set_ptr-.q_atomic_set_ptr
|
||||
.short 16
|
||||
.byte "q_atomic_set_ptr"
|
||||
.align 2
|
||||
|
||||
.align 2
|
||||
.globl q_atomic_fetch_and_store_acquire_ptr
|
||||
.globl .q_atomic_fetch_and_store_acquire_ptr
|
||||
.csect q_atomic_fetch_and_store_acquire_ptr[DS],3
|
||||
q_atomic_fetch_and_store_acquire_ptr:
|
||||
.llong .q_atomic_fetch_and_store_acquire_ptr,TOC[tc0],0
|
||||
.csect .text[PR]
|
||||
.q_atomic_fetch_and_store_acquire_ptr:
|
||||
ldarx 5,0,3
|
||||
stdcx. 4,0,3
|
||||
bne- $-8
|
||||
isync
|
||||
mr 3,5
|
||||
blr
|
||||
LT..q_atomic_fetch_and_store_acquire_ptr:
|
||||
.long 0
|
||||
.byte 0,9,32,64,0,0,2,0
|
||||
.long 0
|
||||
.long LT..q_atomic_fetch_and_store_acquire_ptr-.q_atomic_fetch_and_store_acquire_ptr
|
||||
.short 36
|
||||
.byte "q_atomic_fetch_and_store_acquire_ptr"
|
||||
.align 2
|
||||
|
||||
.align 2
|
||||
.globl q_atomic_fetch_and_store_release_ptr
|
||||
.globl .q_atomic_fetch_and_store_release_ptr
|
||||
.csect q_atomic_fetch_and_store_release_ptr[DS],3
|
||||
q_atomic_fetch_and_store_release_ptr:
|
||||
.llong .q_atomic_fetch_and_store_release_ptr,TOC[tc0],0
|
||||
.csect .text[PR]
|
||||
.q_atomic_fetch_and_store_release_ptr:
|
||||
eieio
|
||||
ldarx 5,0,3
|
||||
stdcx. 4,0,3
|
||||
bne- $-8
|
||||
mr 3,5
|
||||
blr
|
||||
LT..q_atomic_fetch_and_store_release_ptr:
|
||||
.long 0
|
||||
.byte 0,9,32,64,0,0,2,0
|
||||
.long 0
|
||||
.long LT..q_atomic_fetch_and_store_release_ptr-.q_atomic_fetch_and_store_release_ptr
|
||||
.short 36
|
||||
.byte "q_atomic_fetch_and_store_release_ptr"
|
||||
.align 2
|
||||
|
||||
.align 2
|
||||
.globl q_atomic_fetch_and_add_int
|
||||
.globl .q_atomic_fetch_and_add_int
|
||||
.csect q_atomic_fetch_and_add_int[DS],3
|
||||
q_atomic_fetch_and_add_int:
|
||||
.llong .q_atomic_fetch_and_add_int,TOC[tc0],0
|
||||
.csect .text[PR]
|
||||
.q_atomic_fetch_and_add_int:
|
||||
lwarx 5,0,3
|
||||
add 6,4,5
|
||||
extsw 7,6
|
||||
stwcx. 7,0,3
|
||||
bne- $-16
|
||||
extsw 3,5
|
||||
blr
|
||||
LT..q_atomic_fetch_and_add_int:
|
||||
.long 0
|
||||
.byte 0,9,32,64,0,0,1,0
|
||||
.long 0
|
||||
.long LT..q_atomic_fetch_and_add_int-.q_atomic_fetch_and_add_int
|
||||
.short 26
|
||||
.byte "q_atomic_fetch_and_add_int"
|
||||
.align 2
|
||||
|
||||
.align 2
|
||||
.globl q_atomic_fetch_and_add_acquire_int
|
||||
.globl .q_atomic_fetch_and_add_acquire_int
|
||||
.csect q_atomic_fetch_and_add_acquire_int[DS],3
|
||||
q_atomic_fetch_and_add_acquire_int:
|
||||
.llong .q_atomic_fetch_and_add_acquire_int,TOC[tc0],0
|
||||
.csect .text[PR]
|
||||
.q_atomic_fetch_and_add_acquire_int:
|
||||
lwarx 5,0,3
|
||||
add 6,4,5
|
||||
extsw 7,6
|
||||
stwcx. 7,0,3
|
||||
bne- $-16
|
||||
isync
|
||||
extsw 3,5
|
||||
blr
|
||||
LT..q_atomic_fetch_and_add_acquire_int:
|
||||
.long 0
|
||||
.byte 0,9,32,64,0,0,1,0
|
||||
.long 0
|
||||
.long LT..q_atomic_fetch_and_add_acquire_int-.q_atomic_fetch_and_add_acquire_int
|
||||
.short 34
|
||||
.byte "q_atomic_fetch_and_add_acquire_int"
|
||||
.align 2
|
||||
|
||||
.align 2
|
||||
.globl q_atomic_fetch_and_add_release_int
|
||||
.globl .q_atomic_fetch_and_add_release_int
|
||||
.csect q_atomic_fetch_and_add_release_int[DS],3
|
||||
q_atomic_fetch_and_add_release_int:
|
||||
.llong .q_atomic_fetch_and_add_release_int,TOC[tc0],0
|
||||
.csect .text[PR]
|
||||
.q_atomic_fetch_and_add_release_int:
|
||||
eieio
|
||||
lwarx 5,0,3
|
||||
add 6,4,5
|
||||
extsw 7,6
|
||||
stwcx. 7,0,3
|
||||
bne- $-16
|
||||
extsw 3,5
|
||||
blr
|
||||
LT..q_atomic_fetch_and_add_release_int:
|
||||
.long 0
|
||||
.byte 0,9,32,64,0,0,1,0
|
||||
.long 0
|
||||
.long LT..q_atomic_fetch_and_add_release_int-.q_atomic_fetch_and_add_release_int
|
||||
.short 34
|
||||
.byte "q_atomic_fetch_and_add_release_int"
|
||||
.align 2
|
||||
|
||||
.align 2
|
||||
.globl q_atomic_fetch_and_add_ptr
|
||||
.globl .q_atomic_fetch_and_add_ptr
|
||||
.csect q_atomic_fetch_and_add_ptr[DS],3
|
||||
q_atomic_fetch_and_add_ptr:
|
||||
.llong .q_atomic_fetch_and_add_ptr,TOC[tc0],0
|
||||
.csect .text[PR]
|
||||
.q_atomic_fetch_and_add_ptr:
|
||||
ldarx 5,0,3
|
||||
add 6,4,5
|
||||
stdcx. 6,0,3
|
||||
bne- $-12
|
||||
mr 3,5
|
||||
blr
|
||||
LT..q_atomic_fetch_and_add_ptr:
|
||||
.long 0
|
||||
.byte 0,9,32,64,0,0,1,0
|
||||
.long 0
|
||||
.long LT..q_atomic_fetch_and_add_ptr-.q_atomic_fetch_and_add_ptr
|
||||
.short 26
|
||||
.byte "q_atomic_fetch_and_add_ptr"
|
||||
.align 2
|
||||
|
||||
.align 2
|
||||
.globl q_atomic_fetch_and_add_acquire_ptr
|
||||
.globl .q_atomic_fetch_and_add_acquire_ptr
|
||||
.csect q_atomic_fetch_and_add_acquire_ptr[DS],3
|
||||
q_atomic_fetch_and_add_acquire_ptr:
|
||||
.llong .q_atomic_fetch_and_add_acquire_ptr,TOC[tc0],0
|
||||
.csect .text[PR]
|
||||
.q_atomic_fetch_and_add_acquire_ptr:
|
||||
ldarx 5,0,3
|
||||
add 6,4,5
|
||||
stdcx. 6,0,3
|
||||
bne- $-12
|
||||
isync
|
||||
mr 3,5
|
||||
blr
|
||||
LT..q_atomic_fetch_and_add_acquire_ptr:
|
||||
.long 0
|
||||
.byte 0,9,32,64,0,0,1,0
|
||||
.long 0
|
||||
.long LT..q_atomic_fetch_and_add_acquire_ptr-.q_atomic_fetch_and_add_acquire_ptr
|
||||
.short 34
|
||||
.byte "q_atomic_fetch_and_add_acquire_ptr"
|
||||
.align 2
|
||||
|
||||
.align 2
|
||||
.globl q_atomic_fetch_and_add_release_ptr
|
||||
.globl .q_atomic_fetch_and_add_release_ptr
|
||||
.csect q_atomic_fetch_and_add_release_ptr[DS],3
|
||||
q_atomic_fetch_and_add_release_ptr:
|
||||
.llong .q_atomic_fetch_and_add_release_ptr,TOC[tc0],0
|
||||
.csect .text[PR]
|
||||
.q_atomic_fetch_and_add_release_ptr:
|
||||
eieio
|
||||
ldarx 5,0,3
|
||||
add 6,4,5
|
||||
stdcx. 6,0,3
|
||||
bne- $-12
|
||||
mr 3,5
|
||||
blr
|
||||
LT..q_atomic_fetch_and_add_release_ptr:
|
||||
.long 0
|
||||
.byte 0,9,32,64,0,0,1,0
|
||||
.long 0
|
||||
.long LT..q_atomic_fetch_and_add_release_ptr-.q_atomic_fetch_and_add_release_ptr
|
||||
.short 34
|
||||
.byte "q_atomic_fetch_and_add_release_ptr"
|
||||
.align 2
|
||||
|
||||
_section_.text:
|
||||
.csect .data[RW],3
|
||||
.llong _section_.text
|
@ -42,6 +42,8 @@
|
||||
#ifndef QATOMIC_ALPHA_H
|
||||
#define QATOMIC_ALPHA_H
|
||||
|
||||
#include <QtCore/qoldbasicatomic.h>
|
||||
|
||||
QT_BEGIN_HEADER
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
@ -476,130 +478,8 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelease(qptrdiff valueTo
|
||||
return reinterpret_cast<T *>(old);
|
||||
}
|
||||
|
||||
#else // !Q_CC_GNU
|
||||
|
||||
extern "C" {
|
||||
Q_CORE_EXPORT int q_atomic_test_and_set_int(volatile int *ptr, int expected, int newval);
|
||||
Q_CORE_EXPORT int q_atomic_test_and_set_acquire_int(volatile int *ptr, int expected, int newval);
|
||||
Q_CORE_EXPORT int q_atomic_test_and_set_release_int(volatile int *ptr, int expected, int newval);
|
||||
Q_CORE_EXPORT int q_atomic_test_and_set_ptr(volatile void *ptr, void *expected, void *newval);
|
||||
Q_CORE_EXPORT int q_atomic_increment(volatile int *ptr);
|
||||
Q_CORE_EXPORT int q_atomic_decrement(volatile int *ptr);
|
||||
Q_CORE_EXPORT int q_atomic_set_int(volatile int *ptr, int newval);
|
||||
Q_CORE_EXPORT void *q_atomic_set_ptr(volatile void *ptr, void *newval);
|
||||
Q_CORE_EXPORT int q_atomic_fetch_and_add_int(volatile int *ptr, int value);
|
||||
Q_CORE_EXPORT int q_atomic_fetch_and_add_acquire_int(volatile int *ptr, int value);
|
||||
Q_CORE_EXPORT int q_atomic_fetch_and_add_release_int(volatile int *ptr, int value);
|
||||
} // extern "C"
|
||||
|
||||
inline bool QBasicAtomicInt::ref()
|
||||
{
|
||||
return q_atomic_increment(&_q_value) != 0;
|
||||
}
|
||||
|
||||
inline bool QBasicAtomicInt::deref()
|
||||
{
|
||||
return q_atomic_decrement(&_q_value) != 0;
|
||||
}
|
||||
|
||||
inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue)
|
||||
{
|
||||
return q_atomic_test_and_set_int(&_q_value, expectedValue, newValue) != 0;
|
||||
}
|
||||
|
||||
inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue)
|
||||
{
|
||||
return q_atomic_test_and_set_acquire_int(&_q_value, expectedValue, newValue) != 0;
|
||||
}
|
||||
|
||||
inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue)
|
||||
{
|
||||
return q_atomic_test_and_set_release_int(&_q_value, expectedValue, newValue) != 0;
|
||||
}
|
||||
|
||||
inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue)
|
||||
{
|
||||
return q_atomic_set_int(&_q_value, newValue);
|
||||
}
|
||||
|
||||
inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue)
|
||||
{
|
||||
return q_atomic_fetch_and_store_acquire_int(&_q_value, newValue);
|
||||
}
|
||||
|
||||
inline int QBasicAtomicInt::fetchAndStoreRelease(int newValue)
|
||||
{
|
||||
return q_atomic_fetch_and_store_release_int(&_q_value, newValue);
|
||||
}
|
||||
|
||||
inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd)
|
||||
{
|
||||
return q_atomic_fetch_and_add_int(&_q_value, valueToAdd);
|
||||
}
|
||||
|
||||
inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd)
|
||||
{
|
||||
return q_atomic_fetch_and_add_acquire_int(&_q_value, valueToAdd);
|
||||
}
|
||||
|
||||
inline int QBasicAtomicInt::fetchAndAddRelease(int valueToAdd)
|
||||
{
|
||||
return q_atomic_fetch_and_add_release_int(&_q_value, valueToAdd);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValue, T *newValue)
|
||||
{
|
||||
return q_atomic_test_and_set_ptr(&_q_value, expectedValue, newValue) != 0;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetAcquire(T *expectedValue, T *newValue)
|
||||
{
|
||||
return q_atomic_test_and_set_acquire_ptr(&_q_value, expectedValue, newValue) != 0;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelease(T *expectedValue, T *newValue)
|
||||
{
|
||||
return q_atomic_test_and_set_release_ptr(&_q_value, expectedValue, newValue) != 0;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue)
|
||||
{
|
||||
return reinterpret_cast<T *>(q_atomic_set_ptr(&_q_value, newValue));
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreAcquire(T *newValue)
|
||||
{
|
||||
return reinterpret_cast<T *>(q_atomic_fetch_and_store_acquire_ptr(&_q_value, newValue));
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelease(T *newValue)
|
||||
{
|
||||
return reinterpret_cast<T *>(q_atomic_fetch_and_store_release_ptr(&_q_value, newValue));
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelaxed(qptrdiff valueToAdd)
|
||||
{
|
||||
return reinterpret_cast<T *>(q_atomic_fetch_and_add_ptr(&_q_value, newValue));
|
||||
}
|
||||
template <typename T>
|
||||
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddAcquire(qptrdiff valueToAdd)
|
||||
{
|
||||
return reinterpret_cast<T *>(q_atomic_fetch_and_add_acquire_ptr(&_q_value, newValue));
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelease(qptrdiff valueToAdd)
|
||||
{
|
||||
return reinterpret_cast<T *>(q_atomic_fetch_and_add_release_ptr(&_q_value, newValue));
|
||||
}
|
||||
|
||||
#else
|
||||
# error "This compiler for Alpha is not supported"
|
||||
#endif // Q_CC_GNU
|
||||
|
||||
inline bool QBasicAtomicInt::testAndSetOrdered(int expectedValue, int newValue)
|
||||
|
@ -50,6 +50,10 @@ QT_BEGIN_HEADER
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
#if 0
|
||||
// silence syncqt warnings
|
||||
QT_END_NAMESPACE
|
||||
QT_END_HEADER
|
||||
|
||||
#pragma qt_sync_stop_processing
|
||||
#endif
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user