Source

Target

Commits (34)
Showing with 47 additions and 227 deletions
......@@ -36,7 +36,7 @@
int main(int, char **)
{
#if defined(_POSIX_TIMERS) && (_POSIX_TIMERS > 0)
#if (defined(_POSIX_TIMERS) && (_POSIX_TIMERS > 0)) || defined(__OpenBSD__)
timespec ts;
clock_gettime(CLOCK_REALTIME, &ts);
#else
......
......@@ -3422,8 +3422,7 @@ if [ "$XPLATFORM_IOS" = "yes" ]; then
# If the user passes -sdk on the command line we build a SDK-specific Qt build.
# Otherwise we build a joined simulator and device build, which is the default.
if [ -z "$OPT_MAC_SDK" ]; then
QT_CONFIG="$QT_CONFIG build_all"
QTCONFIG_CONFIG="$QTCONFIG_CONFIG iphonesimulator_and_iphoneos"
QT_CONFIG="$QT_CONFIG build_all simulator_and_device"
fi
fi
......
......@@ -15,7 +15,9 @@ TEMPLATE = lib
CONFIG += plugin
if(win32|mac):!macx-xcode {
contains(QT_CONFIG, debug_and_release): CONFIG += debug_and_release build_all
contains(QT_CONFIG, simulator_and_device): CONFIG += iphonesimulator_and_iphoneos
contains(QT_CONFIG, debug_and_release): CONFIG += debug_and_release
contains(QT_CONFIG, build_all): CONFIG += build_all
}
CONFIG += relative_qt_rpath # Qt's QML plugins should be relocatable
......
......@@ -18,7 +18,9 @@ QT = # In case qt is re-added.
CONFIG -= warning_clean # Don't presume 3rd party code to be clean
load(qt_common)
contains(QT_CONFIG, debug_and_release): CONFIG += debug_and_release build_all
contains(QT_CONFIG, simulator_and_device): CONFIG += iphonesimulator_and_iphoneos
contains(QT_CONFIG, debug_and_release): CONFIG += debug_and_release
contains(QT_CONFIG, build_all): CONFIG += build_all
DESTDIR = $$MODULE_BASE_OUTDIR/lib
DLLDESTDIR = $$MODULE_BASE_OUTDIR/bin
......
......@@ -89,7 +89,9 @@ INCLUDEPATH *= $$eval(QT.$${MODULE}.includes) $$eval(QT.$${MODULE}_private.inclu
# If Qt was configured with -debug-and-release then build the module the same way
# - unless this is a host library
!host_build:if(win32|mac):!macx-xcode {
contains(QT_CONFIG, debug_and_release): CONFIG += debug_and_release build_all
contains(QT_CONFIG, simulator_and_device): CONFIG += iphonesimulator_and_iphoneos
contains(QT_CONFIG, debug_and_release): CONFIG += debug_and_release
contains(QT_CONFIG, build_all): CONFIG += build_all
}
QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF
......
......@@ -26,7 +26,9 @@ win32:CONFIG(shared, static|shared) {
tool_plugin {
!build_pass:contains(QT_CONFIG, debug_and_release): CONFIG += release
} else:if(win32|mac):!macx-xcode {
contains(QT_CONFIG, debug_and_release): CONFIG += debug_and_release build_all
contains(QT_CONFIG, simulator_and_device): CONFIG += iphonesimulator_and_iphoneos
contains(QT_CONFIG, debug_and_release): CONFIG += debug_and_release
contains(QT_CONFIG, build_all): CONFIG += build_all
}
CONFIG += relative_qt_rpath # Qt's plugins should be relocatable
......
......@@ -7,7 +7,7 @@ QMAKE_PLATFORM = freebsd bsd
include(../common/unix.conf)
QMAKE_CFLAGS_THREAD = -pthread -D_THREAD_SAFE
QMAKE_CFLAGS_THREAD = -pthread
QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
......
......@@ -7,7 +7,7 @@ QMAKE_PLATFORM = freebsd bsd
include(../common/unix.conf)
QMAKE_CFLAGS_THREAD = -pthread -D_THREAD_SAFE
QMAKE_CFLAGS_THREAD = -pthread
QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
......
......@@ -2,14 +2,14 @@
load(default_pre)
# In case Qt was built for a specific SDK
!iphonesimulator_and_iphoneos:contains(QMAKE_MAC_SDK, ^iphonesimulator.*): \
!contains(QT_CONFIG, simulator_and_device):contains(QMAKE_MAC_SDK, ^iphonesimulator.*): \
CONFIG += iphonesimulator
# Check for supported Xcode versions
lessThan(QMAKE_XCODE_VERSION, "4.3"): \
error("This mkspec requires Xcode 4.3 or later")
iphonesimulator_and_iphoneos:iphonesimulator {
build_pass:iphonesimulator {
# For a iphonesimulator_and_iphoneos build all the config tests
# are based on the iPhoneOS ARM SDK, but we know that the simulator
# is i386 and that we support SSE/SSE2.
......
# In case the user sets the SDK manually
contains(QMAKE_MAC_SDK, ^iphonesimulator.*) {
iphonesimulator_and_iphoneos: \
contains(QT_CONFIG, simulator_and_device): \
error("iOS simulator is handled automatically for iphonesimulator_and_iphoneos")
CONFIG += iphonesimulator
}
iphonesimulator_and_iphoneos:iphonesimulator: \
build_pass:iphonesimulator: \
QMAKE_MAC_SDK ~= s,^iphoneos,iphonesimulator,
load(sdk)
......
......@@ -6,58 +6,21 @@ MAKEFILE_GENERATOR = UNIX
QMAKE_PLATFORM = netbsd bsd
include(../common/unix.conf)
include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)
QMAKE_COMPILER = gcc
QMAKE_CC = gcc
QMAKE_LEX = flex
QMAKE_LEXFLAGS =
QMAKE_YACC = yacc
QMAKE_YACCFLAGS = -d
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 = -pthread
QMAKE_CXX = g++
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_INCDIR = /usr/local/include
QMAKE_LIBDIR = /usr/local/lib
QMAKE_INCDIR_X11 = /usr/X11R6/include
QMAKE_LIBDIR_X11 = /usr/X11R6/lib
QMAKE_INCDIR_OPENGL = /usr/X11R6/include
QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib
QMAKE_INCDIR = /usr/pkg/include
QMAKE_LIBDIR = /usr/pkg/lib
QMAKE_INCDIR_X11 = /usr/X11R7/include
QMAKE_LIBDIR_X11 = /usr/X11R7/lib
QMAKE_INCDIR_OPENGL = /usr/X11R7/include
QMAKE_LIBDIR_OPENGL = /usr/X11R7/lib
QMAKE_LINK = g++
QMAKE_LINK_SHLIB = g++
QMAKE_LINK_C = gcc
QMAKE_LINK_C_SHLIB = gcc
QMAKE_LINK_SHLIB_CMD = $$QMAKE_LINK_SHLIB $$QMAKE_LFLAGS_SHLIB $(LFLAGS) $$QMAKE_LFLAGS -o $(TARGETD) $(OBJECTS) $(OBJMOC) $(LIBS)
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 = -pthread
QMAKE_LFLAGS_NOUNDEF = -Wl,-no_unresolved
QMAKE_LFLAGS_RPATH = -Wl,-rpath,
QMAKE_LIBS =
QMAKE_LIBS_DYNLOAD =
......@@ -69,6 +32,6 @@ QMAKE_LIBS_THREAD =
QMAKE_AR = ar cqs
QMAKE_OBJCOPY = objcopy
QMAKE_NM = nm -P
QMAKE_RANLIB = ranlib
QMAKE_RANLIB =
load(qt_config)
......@@ -72,16 +72,7 @@
#undef QT_OPEN_LARGEFILE
#define QT_OPEN_LARGEFILE 0
// QT_SOCKLEN_T
// NetBSD 1.0 - 1.3.3 int
// NetBSD 1.4 - 1.5 socklen_t
#define QT_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
// Older NetBSD versions may still use the a.out format instead of ELF.
#ifndef __ELF__
#define QT_AOUT_UNDERSCORE
#endif
#endif // QPLATFORMDEFS_H
......@@ -6,35 +6,11 @@ MAKEFILE_GENERATOR = UNIX
QMAKE_PLATFORM = openbsd bsd
include(../common/unix.conf)
include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)
QMAKE_COMPILER = gcc
QMAKE_CC = gcc
QMAKE_LEX = flex
QMAKE_LEXFLAGS =
QMAKE_YACC = yacc
QMAKE_YACCFLAGS = -d
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 = -pthread
QMAKE_CXX = g++
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_INCDIR = /usr/local/include
......@@ -44,21 +20,8 @@ QMAKE_LIBDIR_X11 = /usr/X11R6/lib
QMAKE_INCDIR_OPENGL = /usr/X11R6/include
QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib
QMAKE_LINK = g++
QMAKE_LINK_SHLIB = g++
QMAKE_LINK_C = gcc
QMAKE_LINK_C_SHLIB = gcc
QMAKE_LINK_SHLIB_CMD = $$QMAKE_LINK_SHLIB $(LFLAGS) \
$$QMAKE_CFLAGS_SHLIB $$QMAKE_LFLAGS \
-o $(TARGETD) $(OBJECTS) $(OBJMOC) $(LIBS)
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 = -pthread
QMAKE_LFLAGS_NOUNDEF = -Wl,-no_unresolved
QMAKE_LFLAGS_NOUNDEF =
QMAKE_LIBS =
QMAKE_LIBS_DYNLOAD =
......@@ -67,9 +30,9 @@ QMAKE_LIBS_X11 = -lXext -lX11 -lm
QMAKE_LIBS_OPENGL = -lGL
QMAKE_LIBS_THREAD =
QMAKE_AR = ar q
QMAKE_AR = ar cqs
QMAKE_OBJCOPY = objcopy
QMAKE_NM = nm -P
QMAKE_RANLIB = ranlib
QMAKE_RANLIB =
load(qt_config)
......@@ -73,31 +73,7 @@
#undef QT_OPEN_LARGEFILE
#define QT_OPEN_LARGEFILE 0
// QT_SOCKLEN_T
// OpenBSD 2.2 - 2.4 int
// OpenBSD 2.5 - 2.8 socklen_t
#define QT_SNPRINTF ::snprintf
#define QT_VSNPRINTF ::vsnprintf
// 1003.1c-1995 says on page 38 (2.9.3, paragraph 3) that if _POSIX_THREADS
// is defined, then _POSIX_THREAD_SAFE_FUNCTIONS must also be defined.
// However this looks like a well-known typo (reversed dependency).
//
// On the other hand _POSIX_THREAD_SAFE_FUNCTIONS should be defined only
// if the Thread-Safe Functions option is implemented. OpenBSD does not
// support all of the required _r() interfaces, especially getpwuid_r(),
// which means it should not define _POSIX_THREAD_SAFE_FUNCTIONS.
//
// Since OpenBSD does define _POSIX_THREAD_SAFE_FUNCTIONS, we have to
// undefine it behind its back.
#ifdef _POSIX_THREAD_SAFE_FUNCTIONS
#undef _POSIX_THREAD_SAFE_FUNCTIONS
#endif
// Older OpenBSD versions may still use the a.out format instead of ELF.
#ifndef __ELF__
#define QT_AOUT_UNDERSCORE
#endif
#endif // QPLATFORMDEFS_H
#
# qmake configuration for freebsd-g++46 (using g++46 from ports/lang/gcc)
#
MAKEFILE_GENERATOR = UNIX
QMAKE_PLATFORM = freebsd bsd
include(../../common/unix.conf)
QMAKE_CFLAGS_THREAD = -pthread -D_THREAD_SAFE
QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
# Addon software goes into /usr/local on the BSDs, by default we will look there
QMAKE_INCDIR = /usr/local/include
QMAKE_LIBDIR = /usr/local/lib
QMAKE_LFLAGS_THREAD = -pthread
QMAKE_LIBS =
QMAKE_LIBS_DYNLOAD =
QMAKE_LIBS_EXECINFO = -lexecinfo
QMAKE_LIBS_X11 = -lXext -lX11 -lm
QMAKE_LIBS_OPENGL = -lGL
QMAKE_LIBS_THREAD =
QMAKE_AR = ar cqs
QMAKE_OBJCOPY = objcopy
QMAKE_NM = nm -P
QMAKE_RANLIB =
include(../../common/gcc-base-unix.conf)
include(../../common/g++-unix.conf)
# Redefined here because g++-base.conf sets QMAKE_CC and QMAKE_CXX
# to gcc and g++, respectively.
QMAKE_CC = gcc46
QMAKE_CXX = g++46
QMAKE_LINK_C = $$QMAKE_CC
QMAKE_LINK_C_SHLIB = $$QMAKE_CC
QMAKE_LINK = $$QMAKE_CXX
QMAKE_LINK_SHLIB = $$QMAKE_CXX
load(qt_config)
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the qmake spec of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see http://www.qt.io/terms-conditions. For further
** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** As a special exception, The Qt Company gives you certain additional
** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "../../freebsd-clang/qplatformdefs.h"
......@@ -71,7 +71,7 @@ static qint64 getticks()
static qint64 getticks()
{
#if defined(_POSIX_TIMERS) && (_POSIX_TIMERS > 0)
#if (defined(_POSIX_TIMERS) && (_POSIX_TIMERS > 0)) || defined(Q_OS_OPENBSD)
clockid_t clockId;
#ifndef _POSIX_THREAD_CPUTIME
......
......@@ -48,15 +48,13 @@ QT_BEGIN_NAMESPACE
\class QVariantAnimation
\inmodule QtCore
\ingroup animation
\brief The QVariantAnimation class provides an abstract base class for animations.
\brief The QVariantAnimation class provides a base class for animations.
\since 4.6
This class is part of \l{The Animation Framework}. It serves as a
base class for property and item animations, with functions for
shared functionality.
QVariantAnimation cannot be used directly as it is an abstract
class; it has a pure virtual method called updateCurrentValue().
The class performs interpolation over
\l{QVariant}s, but leaves using the interpolated values to its
subclasses. Currently, Qt provides QPropertyAnimation, which
......@@ -69,7 +67,7 @@ QT_BEGIN_NAMESPACE
start the animation. QVariantAnimation will interpolate the
property of the target object and emit valueChanged(). To react to
a change in the current value you have to reimplement the
updateCurrentValue() virtual function.
updateCurrentValue() virtual function or connect to said signal.
It is also possible to set values at specified steps situated
between the start and end value. The interpolation will then
......
......@@ -118,11 +118,12 @@
\section1 Animating Qt Properties
As mentioned in the previous section, the QPropertyAnimation class
can interpolate over Qt properties. It is this class that should
be used for animation of values; in fact, its superclass,
QVariantAnimation, is an abstract class, and cannot be used
directly.
As mentioned in the previous section, the QPropertyAnimation class can
interpolate over Qt properties. It is often this class that should be used
for animation of values; in fact, its superclass, QVariantAnimation, has an
empty implementation of \l{QAbstractAnimation::}{updateCurrentValue()}, and
does not change any value unless we change it ourselves on the
\l{QVariantAnimation::valueChanged()}{valueChanged signal}.
A major reason we chose to animate Qt properties is that it
presents us with freedom to animate already existing classes in
......
......@@ -160,16 +160,15 @@ void QDebug::putUcs4(uint ucs4)
{
maybeQuote('\'');
if (ucs4 < 0x20) {
stream->ts << hex << "\\x" << ucs4 << reset;
stream->ts << "\\x" << hex << ucs4 << reset;
} else if (ucs4 < 0x80) {
stream->ts << char(ucs4);
} else {
stream->ts << hex << qSetPadChar(QLatin1Char('0'));
if (ucs4 < 0x10000)
stream->ts << qSetFieldWidth(4) << "\\u";
stream->ts << "\\u" << qSetFieldWidth(4);
else
stream->ts << qSetFieldWidth(8) << "\\U";
stream->ts << ucs4 << reset;
stream->ts << "\\U" << qSetFieldWidth(8);
stream->ts << hex << qSetPadChar(QLatin1Char('0')) << ucs4 << reset;
}
maybeQuote('\'');
}
......