Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable

This commit is contained in:
Frederik Gladhorn 2013-06-15 22:39:25 +02:00 committed by The Qt Project
commit e5bcf68d30
46 changed files with 325 additions and 185 deletions

View File

@ -805,7 +805,9 @@ foreach my $lib (@modules_to_sync) {
die "No such module: $lib" unless(defined $modules{$lib});
#iteration info
my @dirs = split(/;/, $modules{$lib});
my $module = $modules{$lib};
my $is_qt = !($module =~ s/^!//);
my @dirs = split(/;/, $module);
my $dir = $dirs[0];
my $pathtoheaders = "";
@ -914,7 +916,7 @@ foreach my $lib (@modules_to_sync) {
}
my $iheader = $subdir . "/" . $header;
my @classes = $public_header && !$minimal ? classNames($iheader) : ();
my @classes = $public_header && (!$minimal && $is_qt) ? classNames($iheader) : ();
if($showonly) {
print "$header [$lib]\n";
foreach(@classes) {
@ -1024,7 +1026,7 @@ foreach my $lib (@modules_to_sync) {
"#include \"".lc($lib)."version.h\"\n" .
"#endif\n";
unless ($showonly || $minimal) {
unless ($showonly || $minimal || !$is_qt) {
# create deprecated headers
my $first = 1;
while (my ($header, $include) = each %{$deprecatedheaders{$lib}}) {
@ -1112,7 +1114,9 @@ foreach my $lib (@modules_to_sync) {
my $master_include = "$out_basedir/include/$lib/$lib";
$pri_install_files .= fixPaths($master_include, $dir) . " ";
writeFile($master_include, $master_contents, $lib, "master header");
}
unless ($showonly || $minimal) {
#handle the headers.pri for each module
my $headers_pri_contents = "";
$headers_pri_contents .= "SYNCQT.HEADER_FILES = $pri_install_files\n";
@ -1126,6 +1130,7 @@ foreach my $lib (@modules_to_sync) {
if($check_includes) {
foreach my $lib (@modules_to_sync) {
next if ($modules{$lib} =~ /^!/);
#calc subdirs
my @subdirs = listSubdirs(map { s/^\^//; $_ } split(/;/, $modules{$lib}));

View File

@ -45,7 +45,7 @@ defineReplace(cmakePortablePaths) {
variable = $$1
out =
for(v, variable) {
out += ${CMAKE_FIND_ROOT_PATH}$$cmakeTargetPath($$v)
out += $$[QT_SYSROOT]$$cmakeTargetPath($$v)
}
return ($$join(out, ";"))
}

View File

@ -104,7 +104,11 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS)
!!ENDIF
foreach(_dir ${_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS} ${Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS})
foreach(_dir ${_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS}
!!IF isEmpty(CMAKE_BUILD_IS_FRAMEWORK)
${Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS}
!!ENDIF
)
_qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${_dir})
endforeach()

View File

@ -86,7 +86,7 @@ load(qt_common)
qtAddToolEnv(QMLPLUGINDUMP, importpath)
TARGETPATHBASE = $$replace(TARGETPATH, \\.\\d+\$, )
qmltypes.target = qmltypes
qmltypes.commands = $$QMLPLUGINDUMP $$replace(TARGETPATHBASE, /, .) $$IMPORT_VERSION > $$QMLTYPEFILE
qmltypes.commands = $$QMLPLUGINDUMP -nonrelocatable $$replace(TARGETPATHBASE, /, .) $$IMPORT_VERSION > $$QMLTYPEFILE
qmltypes.depends = $$QMAKE_RESOLVED_TARGET
} else {
qmltypes.CONFIG += recursive

View File

@ -13,7 +13,7 @@
# of the module on JNI-based libraries etc. Used for deployment of an Android
# app.
ANDROID_DEPENDS_DIR = $$MODULE_QMAKE_OUTDIR/lib/
ANDROID_DEPENDS_DIR = $$MODULE_BASE_OUTDIR/lib/
DEPENDENCY_FILE = $$ANDROID_DEPENDS_DIR$$TARGET-android-dependencies.xml
!build_pass {

View File

@ -11,12 +11,13 @@
# Find the module's source root dir.
isEmpty(_QMAKE_CONF_): error("Project has no top-level .qmake.conf file.")
MODULE_PROFILE_DIR = $$dirname(_QMAKE_CONF_)
isEmpty(MODULE_BASE_DIR): MODULE_BASE_DIR = $$MODULE_PROFILE_DIR
isEmpty(MODULE_BASE_OUTDIR): MODULE_BASE_OUTDIR = $$shadowed($$MODULE_BASE_DIR)
MODULE_BASE_INDIR = $$dirname(_QMAKE_CONF_)
MODULE_BASE_OUTDIR = $$shadowed($$MODULE_BASE_INDIR)
!isEmpty(MODULE_BASE_DIR): MODULE_SYNCQT_DIR = $$MODULE_BASE_DIR # compat for webkit
isEmpty(MODULE_SYNCQT_DIR): MODULE_SYNCQT_DIR = $$MODULE_BASE_INDIR
isEmpty(MODULE_QMAKE_OUTDIR): MODULE_QMAKE_OUTDIR = $$MODULE_BASE_OUTDIR
exists($$MODULE_PROFILE_DIR/.git): \
exists($$MODULE_BASE_INDIR/.git): \
CONFIG += git_build
!prefix_build {

View File

@ -15,9 +15,9 @@ QMAKE_QT_CONFIG = $$[QT_HOST_DATA/get]/mkspecs/qconfig.pri
for(dir, QMAKE_MODULE_PATH) {
debug(1, "Loading modules from $${dir}")
for(mod, $$list($$files($$dir/qt_*.pri))) {
# For installed Qt these paths will be common for all modules
# For development these will vary per module, and syncqt will override the value in the
# qt_<module>.pri forwarding file
# For installed Qt these paths will be common for all modules.
# For uninstalled prefix builds these will vary per module, via the
# forwarding module pri files. Keep qt_module_pris.prf in sync with this!
QT_MODULE_INCLUDE_BASE = $$[QT_INSTALL_HEADERS]
QT_MODULE_LIB_BASE = $$[QT_INSTALL_LIBS]
QT_MODULE_HOST_LIB_BASE = $$[QT_HOST_LIBS]

View File

@ -21,7 +21,7 @@ load(qt_build_paths)
QMAKE_SYNCQT += -module $$MODULE_INCNAME -version $$VERSION
}
QMAKE_SYNCQT += \
-outdir $$MODULE_BASE_OUTDIR $$MODULE_BASE_DIR
-outdir $$MODULE_BASE_OUTDIR $$MODULE_SYNCQT_DIR
!silent: message($$QMAKE_SYNCQT)
system($$QMAKE_SYNCQT)|error("Failed to run: $$QMAKE_SYNCQT")
}
@ -32,11 +32,11 @@ minimal_syncqt: return()
git_build: \
INC_PATH = $$MODULE_BASE_OUTDIR
else: \
INC_PATH = $$MODULE_BASE_DIR
INC_PATH = $$MODULE_BASE_INDIR
include($$INC_PATH/include/$$MODULE_INCNAME/headers.pri, "", true)
autogen_warning = \
"/* This file was generated by qmake with the info from <root>/$$relative_path($$_PRO_FILE_, $$MODULE_BASE_DIR). */"
"/* This file was generated by qmake with the info from <root>/$$relative_path($$_PRO_FILE_, $$MODULE_BASE_INDIR). */"
# Create a module master depends header
MODULE_MASTER_DEPS_HEADER = $$MODULE_BASE_OUTDIR/include/$$MODULE_INCNAME/$${MODULE_INCNAME}Depends

View File

@ -10,8 +10,17 @@
#
load(qt_build_paths)
# Pre-generated headers in the source tree and
# - shadow build or
# - non-shadow non-prefix build of a module which is not qtbase (because the build-time
# generated headers all end up in qtbase).
!git_build:if(!equals(_PRO_FILE_PWD_, $$OUT_PWD) \
|if(!prefix_build:!equals(MODULE_BASE_INDIR, $$[QT_HOST_PREFIX]))): \
CONFIG += split_incpath
force_independent|split_incpath: \
CONFIG += need_fwd_pri
MODULE_FWD_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules/qt_lib_$${MODULE}.pri
force_independent: \
need_fwd_pri: \
MODULE_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules-inst/qt_lib_$${MODULE}.pri
else: \
MODULE_PRI = $$MODULE_FWD_PRI
@ -56,18 +65,22 @@ else: \
MODULE_PRIVATE_INCLUDES = \$\$QT_MODULE_INCLUDE_BASE/$$MODULE_INCNAME/$$VERSION \
\$\$QT_MODULE_INCLUDE_BASE/$$MODULE_INCNAME/$$VERSION/$$MODULE_INCNAME
}
!git_build:if(!equals(_PRO_FILE_PWD_, $$OUT_PWD) \
|if(!prefix_build:!equals(MODULE_BASE_DIR, $$[QT_HOST_PREFIX]))) {
pub_inc = $$replace(MODULE_INCLUDES, ^\\\$\\\$QT_MODULE_INCLUDE_BASE, $$MODULE_BASE_DIR/include)
priv_inc = $$replace(MODULE_PRIVATE_INCLUDES, ^\\\$\\\$QT_MODULE_INCLUDE_BASE, $$MODULE_BASE_DIR/include)
force_independent {
MODULE_FWD_PRI_CONT_SUFFIX = \
"QT.$${MODULE}.includes += $$pub_inc" \
"QT.$${MODULE}.private_includes = $$priv_inc"
} else {
MODULE_INCLUDES += $$pub_inc
MODULE_PRIVATE_INCLUDES = $$priv_inc
}
split_incpath: \
MODULE_SHADOW_INCLUDES = $$replace(MODULE_INCLUDES, ^\\\$\\\$QT_MODULE_INCLUDE_BASE, \
$$MODULE_BASE_OUTDIR/include)
MODULE_INCLUDES += $$MODULE_AUX_INCLUDES
MODULE_PRIVATE_INCLUDES += $$MODULE_PRIVATE_AUX_INCLUDES
internal_module {
MODULE_PRIVATE_INCLUDES = $$MODULE_INCLUDES $$MODULE_PRIVATE_INCLUDES
MODULE_INCLUDES =
MODULE_PRIVATE_SHADOW_INCLUDES = $$MODULE_SHADOW_INCLUDES
MODULE_SHADOW_INCLUDES =
}
split_incpath {
!isEmpty(MODULE_SHADOW_INCLUDES): \
MODULE_FWD_PRI_CONT_SUFFIX += "QT.$${MODULE}.includes += $$MODULE_SHADOW_INCLUDES"
!isEmpty(MODULE_PRIVATE_SHADOW_INCLUDES): \
MODULE_FWD_PRI_CONT_SUFFIX += "QT.$${MODULE}.private_includes += $$MODULE_PRIVATE_SHADOW_INCLUDES"
}
MODULE_PRI_CONT = \
"QT.$${MODULE}.VERSION = $${VERSION}" \
@ -98,12 +111,17 @@ else: \
write_file($$MODULE_PRI, MODULE_PRI_CONT)|error("Aborting.")
MODULE_PRI_FILES = $$MODULE_PRI
force_independent {
need_fwd_pri {
split_incpath: \
MODULE_BASE_INCDIR = $$MODULE_BASE_INDIR
else: \
MODULE_BASE_INCDIR = $$MODULE_BASE_OUTDIR
# Create a forwarding module .pri file
MODULE_FWD_PRI_CONT = \
"QT_MODULE_BIN_BASE = $$MODULE_BASE_OUTDIR/bin" \
"QT_MODULE_INCLUDE_BASE = $$MODULE_BASE_OUTDIR/include" \
"QT_MODULE_INCLUDE_BASE = $$MODULE_BASE_INCDIR/include" \
"QT_MODULE_IMPORT_BASE = $$MODULE_BASE_OUTDIR/imports" \
"QT_MODULE_QML_BASE = $$MODULE_BASE_OUTDIR/qml" \
"QT_MODULE_LIB_BASE = $$MODULE_BASE_OUTDIR/lib" \
@ -116,9 +134,9 @@ else: \
touch($$MODULE_FWD_PRI, $$MODULE_PRI)
MODULE_PRI_FILES += $$MODULE_FWD_PRI
} else { # prefix_build
} else {
# This is needed for the direct include() below.
# This is needed for the direct include() below. Mirrors qt_config.prf
QT_MODULE_BIN_BASE = $$[QT_INSTALL_BINS]
QT_MODULE_INCLUDE_BASE = $$[QT_INSTALL_HEADERS]
QT_MODULE_IMPORT_BASE = $$[QT_INSTALL_IMPORTS]

View File

@ -18,11 +18,11 @@ resource_combine {
QMAKE_RESOURCE_FLAGS += -name ${QMAKE_FILE_BASE}
}
}
rcc.commands = "$$QMAKE_RCC" $$QMAKE_RESOURCE_FLAGS "${QMAKE_FILE_IN}" -o "${QMAKE_FILE_OUT}"
rcc.depend_command = "$$QMAKE_RCC" -list $$QMAKE_RESOURCE_FLAGS "${QMAKE_FILE_IN}"
rcc.commands = $$QMAKE_RCC $$QMAKE_RESOURCE_FLAGS ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
rcc.depend_command = $$QMAKE_RCC -list $$QMAKE_RESOURCE_FLAGS ${QMAKE_FILE_IN}
rcc.CONFIG += add_inputs_as_makefile_deps
rcc.input = RESOURCES
rcc.variable_out = SOURCES
rcc.name = RCC ${QMAKE_FILE_IN}
silent:rcc.commands = @echo rcc "${QMAKE_FILE_IN}" && $$rcc.commands
silent:rcc.commands = @echo rcc ${QMAKE_FILE_IN} && $$rcc.commands
QMAKE_EXTRA_COMPILERS += rcc

View File

@ -42,7 +42,7 @@ isEmpty(QMAKE_COMPILER) {
else:*-llvm*: \
QMAKE_COMPILER = gcc llvm
else:*-clang*: \
QMAKE_COMPILER = clang llvm
QMAKE_COMPILER = gcc clang llvm
else:*-msvc*: \
QMAKE_COMPILER = msvc
else: \

View File

@ -4,7 +4,7 @@ isEmpty(UI_DIR):UI_DIR = .
isEmpty(QMAKE_MOD_UIC):QMAKE_MOD_UIC = ui_
uic.commands = $$QMAKE_UIC ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
uic.depend_command = "$$QMAKE_UIC" -d "${QMAKE_FILE_IN}"
uic.depend_command = $$QMAKE_UIC -d ${QMAKE_FILE_IN}
uic.output = $$UI_DIR/$${QMAKE_MOD_UIC}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)}
uic.input = FORMS
uic.variable_out = GENERATED_FILES

View File

@ -1,4 +1,4 @@
QMAKE_CFLAGS = -std=gnu99 -w
QMAKE_CFLAGS += -std=gnu99 -w
INCLUDEPATH += $$PWD/xkbcommon $$PWD/xkbcommon/src $$PWD/xkbcommon/src/xkbcomp
DEFINES += DFLT_XKB_CONFIG_ROOT='\\"/usr/share/X11/xkb\\"'

View File

@ -6,5 +6,5 @@ SUBDIRS += src
# 2) If we made a 'QtANGLE' module, the include directory would be flattened which won't work since
# we need to support "#include <GLES2/gl2.h>"
CONFIG += minimal_syncqt
QMAKE_SYNCQT_OPTIONS = -module KHR -module EGL -module GLES2 -version none
QMAKE_SYNCQT_OPTIONS = -module QtANGLE/KHR -module QtANGLE/EGL -module QtANGLE/GLES2 -version none
load(qt_module_headers)

View File

@ -40,5 +40,5 @@ egl_headers.files = \
$$ANGLE_DIR/include/EGL/egl.h \
$$ANGLE_DIR/include/EGL/eglext.h \
$$ANGLE_DIR/include/EGL/eglplatform.h
egl_headers.path = $$[QT_INSTALL_HEADERS]/EGL
egl_headers.path = $$[QT_INSTALL_HEADERS]/QtANGLE/EGL
INSTALLS += egl_headers

View File

@ -235,12 +235,12 @@ for (vs, CLEAR_SHADERS) {
load(qt_installs)
khr_headers.files = $$ANGLE_DIR/include/KHR/khrplatform.h
khr_headers.path = $$[QT_INSTALL_HEADERS]/KHR
khr_headers.path = $$[QT_INSTALL_HEADERS]/QtANGLE/KHR
gles2_headers.files = \
$$ANGLE_DIR/include/GLES2/gl2.h \
$$ANGLE_DIR/include/GLES2/gl2ext.h \
$$ANGLE_DIR/include/GLES2/gl2platform.h
gles2_headers.path = $$[QT_INSTALL_HEADERS]/GLES2
gles2_headers.path = $$[QT_INSTALL_HEADERS]/QtANGLE/GLES2
INSTALLS += khr_headers gles2_headers

View File

@ -38,10 +38,6 @@ foreach(module ${CMAKE_MODULES_UNDER_TEST})
)
endforeach()
if(CMAKE_CROSSCOMPILING AND CMAKE_FIND_ROOT_PATH)
list(APPEND BUILD_OPTIONS_LIST "-DCMAKE_CXX_LINK_FLAGS=--sysroot=\"${CMAKE_FIND_ROOT_PATH}\"")
endif()
macro(expect_pass _dir)
string(REPLACE "(" "_" testname "${_dir}")
string(REPLACE ")" "_" testname "${testname}")

View File

@ -1050,9 +1050,9 @@ bool qSharedBuild() Q_DECL_NOTHROW
\value MV_10_0 Mac OS X 10.0 (unsupported)
\value MV_10_1 Mac OS X 10.1 (unsupported)
\value MV_10_2 Mac OS X 10.2 (unsupported)
\value MV_10_3 Mac OS X 10.3
\value MV_10_4 Mac OS X 10.4
\value MV_10_5 Mac OS X 10.5
\value MV_10_3 Mac OS X 10.3 (unsupported)
\value MV_10_4 Mac OS X 10.4 (unsupported)
\value MV_10_5 Mac OS X 10.5 (unsupported)
\value MV_10_6 Mac OS X 10.6
\value MV_10_7 Mac OS X 10.7
\value MV_10_8 Mac OS X 10.8

View File

@ -2,13 +2,15 @@
!!IF !isEmpty(CMAKE_ANGLE_EGL_DLL_RELEASE)
!!IF isEmpty(CMAKE_INCLUDE_DIR_IS_ABSOLUTE)
set(Qt5Gui_EGL_INCLUDE_DIRS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$$CMAKE_INCLUDE_DIR\")
set(Qt5Gui_EGL_INCLUDE_DIRS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$$CMAKE_INCLUDE_DIR/QtANGLE\")
!!ELSE
set(Qt5Gui_EGL_INCLUDE_DIRS \"$$CMAKE_INCLUDE_DIR\")
set(Qt5Gui_EGL_INCLUDE_DIRS \"$$CMAKE_INCLUDE_DIR/QtANGLE\")
!!ENDIF
_qt5_Gui_check_file_exists(${Qt5Gui_EGL_INCLUDE_DIRS})
list(APPEND Qt5Gui_INCLUDE_DIRS ${Qt5Gui_EGL_INCLUDE_DIRS})
set_property(TARGET Qt5::Gui APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${Qt5Gui_EGL_INCLUDE_DIRS})
set(Qt5Gui_OPENGL_INCLUDE_DIRS ${Qt5Gui_EGL_INCLUDE_DIRS})
macro(_populate_qt5gui_gl_target_properties TargetName Configuration LIB_LOCATION IMPLIB_LOCATION)
@ -55,7 +57,7 @@ find_path(_qt5gui_OPENGL_INCLUDE_DIR $$CMAKE_GL_HEADER_NAME
PATHS $$CMAKE_GL_INCDIRS
NO_DEFAULT_PATH)
if (NOT _qt5gui_OPENGL_INCLUDE_DIR)
message(FATAL_ERROR \"Failed to find \\\"$$CMAKE_GL_HEADER_NAME\\\" in \\\"$$CMAKE_GL_INCDIRS\\\", using the CMAKE_FIND_ROOT_PATH \\\"${CMAKE_FIND_ROOT_PATH}\\\".\")
message(FATAL_ERROR \"Failed to find \\\"$$CMAKE_GL_HEADER_NAME\\\" in \\\"$$CMAKE_GL_INCDIRS\\\".\")
endif()
_qt5_Gui_check_file_exists(${_qt5gui_OPENGL_INCLUDE_DIR})
@ -85,7 +87,7 @@ macro(_qt5gui_find_extra_libs Name Libs LibDir IncDirs)
if (\"${ARGN}\" STREQUAL \"OPTIONAL\")
break()
else()
message(FATAL_ERROR \"Failed to find \\\"${_lib}\\\" in \\\"${LibDir}\\\", using the CMAKE_FIND_ROOT_PATH \\\"${CMAKE_FIND_ROOT_PATH}\\\".\")
message(FATAL_ERROR \"Failed to find \\\"${_lib}\\\" in \\\"${LibDir}\\\".\")
endif()
endif()
add_library(Qt5::Gui_${_cmake_lib_name} SHARED IMPORTED)
@ -114,9 +116,11 @@ macro(_qt5gui_find_extra_libs Name Libs LibDir IncDirs)
endif()
list(APPEND Qt5Gui_${Name}_LIBRARIES Qt5::Gui_${_cmake_lib_name})
endforeach()
foreach(_dir ${IncDirs})
_qt5_Gui_check_file_exists(${_dir})
endforeach()
if (NOT CMAKE_CROSSCOMPILING)
foreach(_dir ${IncDirs})
_qt5_Gui_check_file_exists(${_dir})
endforeach()
endif()
endmacro()

View File

@ -12,6 +12,12 @@ MODULE_PLUGIN_TYPES = \
platforms \
imageformats
# This is here only because the platform plugin is no module, obviously.
win32:contains(QT_CONFIG, angle) {
MODULE_AUX_INCLUDES = \
\$\$QT_MODULE_INCLUDE_BASE/QtANGLE
}
load(qt_module)
# Code coverage with TestCocoon

View File

@ -57,6 +57,7 @@ QT_BEGIN_NAMESPACE
\class QOpenGLFunctions_4_1_Core
\inmodule QtGui
\since 5.1
\wrapper
\brief The QOpenGLFunctions_4_1_Core class provides all functions for this version and profile of OpenGL.
\sa QAbstractOpenGLFunctions

View File

@ -133,10 +133,15 @@ struct NoDasher {
};
/*
* The return value is the result of the clipLine() call performed at the start
* of each of the two functions, aka "false" means completely outside the devices
* rect.
*/
template<DrawPixel drawPixel, class Dasher>
static void drawLine(QCosmeticStroker *stroker, qreal x1, qreal y1, qreal x2, qreal y2, int caps);
static bool drawLine(QCosmeticStroker *stroker, qreal x1, qreal y1, qreal x2, qreal y2, int caps);
template<DrawPixel drawPixel, class Dasher>
static void drawLineAA(QCosmeticStroker *stroker, qreal x1, qreal y1, qreal x2, qreal y2, int caps);
static bool drawLineAA(QCosmeticStroker *stroker, qreal x1, qreal y1, qreal x2, qreal y2, int caps);
inline void drawPixel(QCosmeticStroker *stroker, int x, int y, int coverage)
{
@ -602,17 +607,20 @@ void QCosmeticStroker::drawPath(const QVectorPath &path)
caps |= CapEnd;
QCosmeticStroker::Point last = this->lastPixel;
stroke(this, p.x(), p.y(), p2.x(), p2.y(), caps);
bool unclipped = stroke(this, p.x(), p.y(), p2.x(), p2.y(), caps);
/* fix for gaps in polylines with fastpen and aliased in a sequence
of points with small distances: if current point p2 has been dropped
out, keep last non dropped point p. */
if (fastPenAliased) {
if (last.x != lastPixel.x || last.y != lastPixel.y ||
points == begin + 2 || points == end - 2 ) {
{
p = p2;
}
out, keep last non dropped point p.
However, if the line was completely outside the devicerect, we
still need to update p to avoid drawing the line after this one from
a bad starting position.
*/
if (fastPenAliased && unclipped) {
if (last.x != lastPixel.x || last.y != lastPixel.y
|| points == begin + 2 || points == end - 2) {
p = p2;
}
} else {
p = p2;
@ -720,10 +728,10 @@ static inline void capAdjust(int caps, int &x1, int &x2, int &y, int yinc)
the drawing shifts from horizontal to vertical or back.
*/
template<DrawPixel drawPixel, class Dasher>
static void drawLine(QCosmeticStroker *stroker, qreal rx1, qreal ry1, qreal rx2, qreal ry2, int caps)
static bool drawLine(QCosmeticStroker *stroker, qreal rx1, qreal ry1, qreal rx2, qreal ry2, int caps)
{
if (stroker->clipLine(rx1, ry1, rx2, ry2))
return;
return false;
const int half = stroker->legacyRounding ? 31 : 0;
int x1 = toF26Dot6(rx1) + half;
@ -813,7 +821,7 @@ static void drawLine(QCosmeticStroker *stroker, qreal rx1, qreal ry1, qreal rx2,
} else {
// horizontal
if (!dx)
return;
return true;
QCosmeticStroker::Direction dir = QCosmeticStroker::LeftToRight;
@ -886,14 +894,15 @@ static void drawLine(QCosmeticStroker *stroker, qreal rx1, qreal ry1, qreal rx2,
}
}
stroker->lastPixel = last;
return true;
}
template<DrawPixel drawPixel, class Dasher>
static void drawLineAA(QCosmeticStroker *stroker, qreal rx1, qreal ry1, qreal rx2, qreal ry2, int caps)
static bool drawLineAA(QCosmeticStroker *stroker, qreal rx1, qreal ry1, qreal rx2, qreal ry2, int caps)
{
if (stroker->clipLine(rx1, ry1, rx2, ry2))
return;
return false;
int x1 = toF26Dot6(rx1);
int y1 = toF26Dot6(ry1);
@ -967,7 +976,7 @@ static void drawLineAA(QCosmeticStroker *stroker, qreal rx1, qreal ry1, qreal rx
} else {
// horizontal
if (!dx)
return;
return true;
int yinc = F16Dot16FixedDiv(dy, dx);
@ -1029,6 +1038,7 @@ static void drawLineAA(QCosmeticStroker *stroker, qreal rx1, qreal ry1, qreal rx
drawPixel(stroker, x, (y>>16) + 1, alpha * alphaEnd >> 6);
}
}
return true;
}
QT_END_NAMESPACE

View File

@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE
class QCosmeticStroker;
typedef void (*StrokeLine)(QCosmeticStroker *stroker, qreal x1, qreal y1, qreal x2, qreal y2, int caps);
typedef bool (*StrokeLine)(QCosmeticStroker *stroker, qreal x1, qreal y1, qreal x2, qreal y2, int caps);
class QCosmeticStroker
{

View File

@ -734,6 +734,35 @@ static inline QPointF snapTo26Dot6Grid(const QPointF &p)
qFloorF(p.y() * 64) * (1 / qreal(64)));
}
/*
The rasterize line function relies on some div by zero which should
result in +/-inf values. However, when floating point exceptions are
enabled, this will cause crashes, so we return high numbers instead.
As the returned value is used in further arithmetic, returning
FLT_MAX/DBL_MAX will also cause values, so instead return a value
that is well outside the int-range.
*/
static inline qreal qSafeDivide(qreal x, qreal y)
{
if (y == 0)
return x > 0 ? 1e20 : -1e20;
return x / y;
}
/* Conversion to int fails if the value is too large to fit into INT_MAX or
too small to fit into INT_MIN, so we need this slightly safer conversion
when floating point exceptions are enabled
*/
static inline int qSafeFloatToQ16Dot16(qreal x)
{
qreal tmp = x * 65536.;
if (tmp > qreal(INT_MAX))
return INT_MAX;
else if (tmp < qreal(INT_MIN))
return -INT_MAX;
return int(tmp);
}
void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width, bool squareCap)
{
if (a == b || width == 0 || d->clipRect.isEmpty())
@ -946,23 +975,23 @@ void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width,
const QPointF bottomLeftEdge = bottom - left;
const QPointF bottomRightEdge = bottom - right;
const qreal topLeftSlope = topLeftEdge.x() / topLeftEdge.y();
const qreal bottomLeftSlope = bottomLeftEdge.x() / bottomLeftEdge.y();
const qreal topLeftSlope = qSafeDivide(topLeftEdge.x(), topLeftEdge.y());
const qreal bottomLeftSlope = qSafeDivide(bottomLeftEdge.x(), bottomLeftEdge.y());
const qreal topRightSlope = topRightEdge.x() / topRightEdge.y();
const qreal bottomRightSlope = bottomRightEdge.x() / bottomRightEdge.y();
const qreal topRightSlope = qSafeDivide(topRightEdge.x(), topRightEdge.y());
const qreal bottomRightSlope = qSafeDivide(bottomRightEdge.x(), bottomRightEdge.y());
const Q16Dot16 topLeftSlopeFP = FloatToQ16Dot16(topLeftSlope);
const Q16Dot16 topRightSlopeFP = FloatToQ16Dot16(topRightSlope);
const Q16Dot16 topLeftSlopeFP = qSafeFloatToQ16Dot16(topLeftSlope);
const Q16Dot16 topRightSlopeFP = qSafeFloatToQ16Dot16(topRightSlope);
const Q16Dot16 bottomLeftSlopeFP = FloatToQ16Dot16(bottomLeftSlope);
const Q16Dot16 bottomRightSlopeFP = FloatToQ16Dot16(bottomRightSlope);
const Q16Dot16 bottomLeftSlopeFP = qSafeFloatToQ16Dot16(bottomLeftSlope);
const Q16Dot16 bottomRightSlopeFP = qSafeFloatToQ16Dot16(bottomRightSlope);
const Q16Dot16 invTopLeftSlopeFP = FloatToQ16Dot16(1 / topLeftSlope);
const Q16Dot16 invTopRightSlopeFP = FloatToQ16Dot16(1 / topRightSlope);
const Q16Dot16 invTopLeftSlopeFP = qSafeFloatToQ16Dot16(qSafeDivide(1, topLeftSlope));
const Q16Dot16 invTopRightSlopeFP = qSafeFloatToQ16Dot16(qSafeDivide(1, topRightSlope));
const Q16Dot16 invBottomLeftSlopeFP = FloatToQ16Dot16(1 / bottomLeftSlope);
const Q16Dot16 invBottomRightSlopeFP = FloatToQ16Dot16(1 / bottomRightSlope);
const Q16Dot16 invBottomLeftSlopeFP = qSafeFloatToQ16Dot16(qSafeDivide(1, bottomLeftSlope));
const Q16Dot16 invBottomRightSlopeFP = qSafeFloatToQ16Dot16(qSafeDivide(1, bottomRightSlope));
if (d->antialiased) {
const Q16Dot16 iTopFP = IntToQ16Dot16(int(topBound));
@ -1137,10 +1166,10 @@ void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width,
int iBottom = bottom.y() < 0.5f? -1 : int(bottom.y() - 0.5f);
int iMiddle = qMin(iLeft, iRight);
Q16Dot16 leftIntersectAf = FloatToQ16Dot16(top.x() + 0.5f + (iTop + 0.5f - top.y()) * topLeftSlope);
Q16Dot16 leftIntersectBf = FloatToQ16Dot16(left.x() + 0.5f + (iLeft + 1.5f - left.y()) * bottomLeftSlope);
Q16Dot16 rightIntersectAf = FloatToQ16Dot16(top.x() - 0.5f + (iTop + 0.5f - top.y()) * topRightSlope);
Q16Dot16 rightIntersectBf = FloatToQ16Dot16(right.x() - 0.5f + (iRight + 1.5f - right.y()) * bottomRightSlope);
Q16Dot16 leftIntersectAf = qSafeFloatToQ16Dot16(top.x() + 0.5f + (iTop + 0.5f - top.y()) * topLeftSlope);
Q16Dot16 leftIntersectBf = qSafeFloatToQ16Dot16(left.x() + 0.5f + (iLeft + 1.5f - left.y()) * bottomLeftSlope);
Q16Dot16 rightIntersectAf = qSafeFloatToQ16Dot16(top.x() - 0.5f + (iTop + 0.5f - top.y()) * topRightSlope);
Q16Dot16 rightIntersectBf = qSafeFloatToQ16Dot16(right.x() - 0.5f + (iRight + 1.5f - right.y()) * bottomRightSlope);
int ny;
int y = iTop;

View File

@ -1122,7 +1122,6 @@ QPaintEngine *QGLFramebufferObject::paintEngine() const
/*!
\fn bool QGLFramebufferObject::bindDefault()
\internal
Switches rendering back to the default, windowing system provided
framebuffer.

View File

@ -163,6 +163,10 @@ namespace QtAndroidInput
static void longPress(JNIEnv */*env*/, jobject /*thiz*/, jint /*winId*/, jint x, jint y)
{
//### TODO: add proper API for Qt 5.2
static bool rightMouseFromLongPress = qgetenv("QT_NECESSITAS_COMPATIBILITY_LONG_PRESS").toInt();
if (!rightMouseFromLongPress)
return;
m_ignoreMouseEvents = true;
QPoint globalPos(x,y);
QWindow *tlw = topLevelWindowAt(globalPos);

View File

@ -113,6 +113,7 @@ static void cleanupCocoaApplicationDelegate()
- (void)updateScreens:(NSNotification *)notification
{
Q_UNUSED(notification);
if (QCocoaIntegration *ci = dynamic_cast<QCocoaIntegration *>(QGuiApplicationPrivate::platformIntegration()))
ci->updateScreens();
}

View File

@ -136,6 +136,8 @@ public:
bool windowShouldClose();
bool windowIsPopupType(Qt::WindowType type = Qt::Widget) const;
void setSynchedWindowStateFromWindow();
NSInteger windowLevel(Qt::WindowFlags flags);
NSUInteger windowStyleMask(Qt::WindowFlags flags);
void setWindowShadow(Qt::WindowFlags flags);

View File

@ -486,7 +486,7 @@ void QCocoaWindow::setWindowFlags(Qt::WindowFlags flags)
void QCocoaWindow::setWindowState(Qt::WindowState state)
{
if ([m_nsWindow isVisible])
if (window()->isVisible())
syncWindowState(state); // Window state set for hidden windows take effect when show() is called.
}
@ -725,6 +725,12 @@ bool QCocoaWindow::windowShouldClose()
return accepted;
}
void QCocoaWindow::setSynchedWindowStateFromWindow()
{
if (QWindow *w = window())
m_synchedWindowState = w->windowState();
}
bool QCocoaWindow::windowIsPopupType(Qt::WindowType type) const
{
if (type == Qt::Widget)

View File

@ -81,7 +81,9 @@ QT_END_NAMESPACE
- (void)invalidateWindowShadowIfNeeded;
- (void)drawRect:(NSRect)dirtyRect;
- (void)updateGeometry;
- (void)notifyWindowStateChanged:(Qt::WindowState)newState;
- (void)windowNotification : (NSNotification *) windowNotification;
- (void)notifyWindowWillZoom:(BOOL)willZoom;
- (void)viewDidHide;
- (void)viewDidUnhide;

View File

@ -253,6 +253,15 @@ static QTouchDevice *touchDevice = 0;
}
}
- (void)notifyWindowStateChanged:(Qt::WindowState)newState
{
QWindowSystemInterface::handleWindowStateChanged(m_window, newState);
// We want to read the window state back from the window,
// but the event we just sent may be asynchronous.
QWindowSystemInterface::flushWindowSystemEvents();
m_platformWindow->setSynchedWindowStateFromWindow();
}
- (void)windowNotification : (NSNotification *) windowNotification
{
//qDebug() << "windowNotification" << QCFString::toQString([windowNotification name]);
@ -271,10 +280,11 @@ static QTouchDevice *touchDevice = 0;
if (!m_platformWindow->windowIsPopupType())
QWindowSystemInterface::handleWindowActivated(0);
}
} else if (notificationName == NSWindowDidMiniaturizeNotification) {
QWindowSystemInterface::handleWindowStateChanged(m_window, Qt::WindowMinimized);
} else if (notificationName == NSWindowDidDeminiaturizeNotification) {
QWindowSystemInterface::handleWindowStateChanged(m_window, Qt::WindowNoState);
} else if (notificationName == NSWindowDidMiniaturizeNotification
|| notificationName == NSWindowDidDeminiaturizeNotification) {
Qt::WindowState newState = notificationName == NSWindowDidMiniaturizeNotification ?
Qt::WindowMinimized : Qt::WindowNoState;
[self notifyWindowStateChanged:newState];
} else if ([notificationName isEqualToString: @"NSWindowDidOrderOffScreenNotification"]) {
m_platformWindow->obscureWindow();
} else if ([notificationName isEqualToString: @"NSWindowDidOrderOnScreenAndFinishAnimatingNotification"]) {
@ -292,10 +302,11 @@ static QTouchDevice *touchDevice = 0;
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
if (QSysInfo::QSysInfo::MacintoshVersion >= QSysInfo::MV_10_7) {
if (notificationName == NSWindowDidEnterFullScreenNotification) {
QWindowSystemInterface::handleWindowStateChanged(m_window, Qt::WindowFullScreen);
} else if (notificationName == NSWindowDidExitFullScreenNotification) {
QWindowSystemInterface::handleWindowStateChanged(m_window, Qt::WindowNoState);
if (notificationName == NSWindowDidEnterFullScreenNotification
|| notificationName == NSWindowDidExitFullScreenNotification) {
Qt::WindowState newState = notificationName == NSWindowDidEnterFullScreenNotification ?
Qt::WindowFullScreen : Qt::WindowNoState;
[self notifyWindowStateChanged:newState];
}
}
#endif
@ -303,6 +314,12 @@ static QTouchDevice *touchDevice = 0;
}
}
- (void)notifyWindowWillZoom:(BOOL)willZoom
{
Qt::WindowState newState = willZoom ? Qt::WindowMaximized : Qt::WindowNoState;
[self notifyWindowStateChanged:newState];
}
- (void)viewDidHide
{
m_platformWindow->obscureWindow();
@ -919,13 +936,13 @@ static QTouchDevice *touchDevice = 0;
// we will send a key event unless the input method sets m_sendKeyEvent to false
m_sendKeyEvent = true;
QString text;
// ignore text for the U+F700-U+F8FF range. This is used by Cocoa when
// delivering function keys (e.g. arrow keys, backspace, F1-F35, etc.)
if (ch.unicode() < 0xf700 || ch.unicode() > 0xf8ff)
text = QCFString::toQString(characters);
if (eventType == QEvent::KeyPress) {
// ignore text for the U+F700-U+F8FF range. This is used by Cocoa when
// delivering function keys (e.g. arrow keys, backspace, F1-F35, etc.)
if (ch.unicode() < 0xf700 || ch.unicode() > 0xf8ff)
text = QCFString::toQString(characters);
if (m_composingText.isEmpty())
m_sendKeyEvent = !QWindowSystemInterface::tryHandleShortcutEvent(m_window, timestamp, keyCode, modifiers, text);

View File

@ -57,6 +57,7 @@
- (void)windowDidMove:(NSNotification *)notification;
- (void)windowWillMove:(NSNotification *)notification;
- (BOOL)windowShouldClose:(NSNotification *)notification;
- (BOOL)windowShouldZoom:(NSWindow *)window toFrame:(NSRect)newFrame;
@end

View File

@ -90,4 +90,12 @@
return YES;
}
- (BOOL)windowShouldZoom:(NSWindow *)window toFrame:(NSRect)newFrame
{
Q_UNUSED(newFrame);
if (m_cocoaWindow && m_cocoaWindow->m_qtView)
[m_cocoaWindow->m_qtView notifyWindowWillZoom:![window isZoomed]];
return YES;
}
@end

View File

@ -63,7 +63,7 @@ QT_BEGIN_NAMESPACE
bool debug_accessibility();
# define accessibleDebug !debug_accessibility() ? (void)0 : qDebug
#else
# define accessibleDebug
# define accessibleDebug while (false) qDebug
#endif
#ifndef QT_NO_DEBUG_OUTPUT

View File

@ -825,7 +825,7 @@ public:
inline void updateDirectory() { setDirectory(m_data.directory()); }
inline QString directory() const;
virtual void exec(HWND owner = 0);
inline void setNameFilters(const QStringList &f);
virtual void setNameFilters(const QStringList &f);
inline void selectNameFilter(const QString &filter);
inline void updateSelectedNameFilter() { selectNameFilter(m_data.selectedNameFilter()); }
inline QString selectedNameFilter() const;
@ -1335,12 +1335,11 @@ class QWindowsNativeSaveFileDialog : public QWindowsNativeFileDialogBase
{
Q_OBJECT
public:
explicit QWindowsNativeSaveFileDialog(const QWindowsFileDialogSharedData &data);
explicit QWindowsNativeSaveFileDialog(const QWindowsFileDialogSharedData &data)
: QWindowsNativeFileDialogBase(data) {}
virtual void setNameFilters(const QStringList &f);
virtual QStringList selectedFiles() const;
virtual QStringList dialogResult() const;
private slots:
void slotFilterSelected(const QString &);
};
// Return the first suffix from the name filter "Foo files (*.foo;*.bar)" -> "foo".
@ -1358,20 +1357,21 @@ static inline QString suffixFromFilter(const QString &filter)
return endPos >= 0 ? filter.mid(suffixPos, endPos - suffixPos) : QString();
}
QWindowsNativeSaveFileDialog::QWindowsNativeSaveFileDialog(const QWindowsFileDialogSharedData &data)
: QWindowsNativeFileDialogBase(data)
void QWindowsNativeSaveFileDialog::setNameFilters(const QStringList &f)
{
connect(this, &QWindowsNativeFileDialogBase::filterSelected,
this, &QWindowsNativeSaveFileDialog::slotFilterSelected);
}
void QWindowsNativeSaveFileDialog::slotFilterSelected(const QString &filter)
{
// Cause the dialog to append the suffix of the current filter unless a default
// suffix is set (Note: Qt 4.8 sets the selected filter's suffix before
// calling GetSaveFileName()).
if (!hasDefaultSuffix())
setDefaultSuffixSys(suffixFromFilter(filter));
QWindowsNativeFileDialogBase::setNameFilters(f);
// QTBUG-31381, QTBUG-30748: IFileDialog will update the suffix of the selected name
// filter only if a default suffix is set (see docs). Set the first available
// suffix unless we have a defaultSuffix.
if (!hasDefaultSuffix()) {
foreach (const QString &filter, f) {
const QString suffix = suffixFromFilter(filter);
if (!suffix.isEmpty()) {
setDefaultSuffixSys(suffix);
break;
}
}
} // m_hasDefaultSuffix
}
QStringList QWindowsNativeSaveFileDialog::dialogResult() const

View File

@ -7,8 +7,9 @@ CONFIG += no_module_headers internal_module force_bootstrap
DEFINES += \
QT_NO_CAST_FROM_ASCII
MODULE_INCLUDES = \
\$\$QT_MODULE_INCLUDE_BASE/QtDBus
MODULE_PRIVATE_INCLUDES = \
\$\$QT_MODULE_INCLUDE_BASE/QtDBus \
\$\$QT_MODULE_INCLUDE_BASE/QtDBus/$$QT_VERSION \
\$\$QT_MODULE_INCLUDE_BASE/QtDBus/$$QT_VERSION/QtDBus

View File

@ -30,12 +30,13 @@ DEFINES += \
DEFINES -= QT_EVAL
MODULE_PRIVATE_INCLUDES = \
MODULE_INCLUDES = \
\$\$QT_MODULE_INCLUDE_BASE \
\$\$QT_MODULE_INCLUDE_BASE/QtCore \
\$\$QT_MODULE_INCLUDE_BASE/QtXml
MODULE_PRIVATE_INCLUDES = \
\$\$QT_MODULE_INCLUDE_BASE/QtCore/$$QT_VERSION \
\$\$QT_MODULE_INCLUDE_BASE/QtCore/$$QT_VERSION/QtCore \
\$\$QT_MODULE_INCLUDE_BASE/QtXml \
\$\$QT_MODULE_INCLUDE_BASE/QtXml/$$QT_VERSION \
\$\$QT_MODULE_INCLUDE_BASE/QtXml/$$QT_VERSION/QtXml

View File

@ -0,0 +1,50 @@
include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
project = QtGui
description = Qt GUI Reference Documentation
url = http://qt-project.org/doc/qt-$QT_VER/qtgui
version = $QT_VERSION
examplesinstallpath = gui
qhp.projects = QtGui
qhp.QtGui.file = qtgui.qhp
qhp.QtGui.namespace = org.qt-project.qtgui.$QT_VERSION_TAG
qhp.QtGui.virtualFolder = qtgui
qhp.QtGui.indexTitle = Qt GUI
qhp.QtGui.indexRoot =
qhp.QtGui.filterAttributes = qtgui $QT_VERSION qtrefdoc
qhp.QtGui.customFilters.Qt.name = Qtgui $QT_VERSION
qhp.QtGui.customFilters.Qt.filterAttributes = qtgui $QT_VERSION
qhp.QtGui.subprojects = classes
qhp.QtGui.subprojects.classes.title = C++ Classes
qhp.QtGui.subprojects.classes.indexTitle = Qt GUI C++ Classes
qhp.QtGui.subprojects.classes.selectors = class fake:headerfile
qhp.QtGui.subprojects.classes.sortPages = true
tagfile = ../../../doc/qtgui/qtgui.tags
depends += \
qtcore \
qtnetwork \
qtopengl \
qtsvg \
qtqml \
qtquick \
qtwidgets \
qtdoc
headerdirs += ..
sourcedirs += .. \
../../../examples/gui/doc/src
exampledirs += ../../../examples/gui \
snippets
imagedirs += images \
../../../examples/gui/doc/images \
../../../doc/src/images \

View File

@ -41,7 +41,7 @@ Note that the documentation must be in the implementation files such as \c .cpp.
Class documentation is generated using the \l{class-command}{\\class} command and
the name of the class as the first argument.
\snippet examples/cpp.qdoc class
\snippet examples/cpp.qdoc.sample class
\l{Context commands} add information about the class, such as its module or
which version the class was added.
@ -79,7 +79,7 @@ Typically, function documentation immediately precedes the implementation of the
function in the \c .cpp file. For function documentation that is not immediately
above the implementation, the \l{fn-command}{\\fn} is needed.
\snippet examples/cpp.qdoc function
\snippet examples/cpp.qdoc.sample function
The function documentation starts with a verb, indicating the operation the
function performs. This also applies to constructors and destructors.
@ -102,7 +102,7 @@ The \l{a-command}{\\a} command marks the parameter in the documentation.
The return type documentation should link to the type documentation or be
marked with the \l{c-command}{\\c} command in the case of boolean values.
\snippet examples/cpp.qdoc return
\snippet examples/cpp.qdoc.sample return
\section1 Properties
@ -110,7 +110,7 @@ The property documentation resides immediately above the read function's
implementation. The \l{topic-commands}{topic command} for properties is
\l{property-command}{\\property}.
\snippet examples/cpp.qdoc property
\snippet examples/cpp.qdoc.sample property
Property documentation usually starts with "This property...", but these are
alternate expressions:
@ -142,7 +142,7 @@ The \l{topic-commands}{topic command} for signals, notifiers, and slots
is \l{fn-command}{\\fn}. Signal documentation state when they are triggered
or emitted.
\snippet examples/cpp.qdoc signals
\snippet examples/cpp.qdoc.sample signals
Signal documentation typically begin with "This signal is triggered when...".
Here are alternate styles:
@ -164,7 +164,7 @@ notifiers together. To refer to a specifc version of a notifier or signal,
simply refer to the property and mention that there are different versions of
the notifier.
\snippet examples/cpp.qdoc overloaded notifier
\snippet examples/cpp.qdoc.sample overloaded notifier
\section1 Enums, Namespaces, and other Types
@ -181,7 +181,7 @@ continues with the type description.
For enumerations, the \l{value-command}{\\value} command is for listing the
values. QDoc creates a table of values for the enum.
\snippet examples/cpp.qdoc enums
\snippet examples/cpp.qdoc.sample enums
*/

View File

@ -60,7 +60,7 @@ does not exist. The class documentation may be marked as
The \l{qmltype-command}{\\qmltype} command is for QML type documentation.
\snippet examples/qml.qdoc qmltype
\snippet examples/qml.qdoc.sample qmltype
The \l{instantiates-command}{\\instantiates} accepts the C++ class which
implements the QML type as the argument. For types implemented in QML, this
@ -108,7 +108,7 @@ with the \l{qmlsignal-command}{\\qmlsignal} command. Signal documentation
must include the condition for emitting the signal, mention the corresponding
signal handler, and document whether the signal accepts a parameter.
\snippet examples/qml.qdoc signals
\snippet examples/qml.qdoc.sample signals
These are the possible documentation styles for signals:
\list
@ -127,7 +127,7 @@ documentation must reside immediately above the function declaration.
The function documentation starts with a verb, indicating the operation the
function performs.
\snippet examples/qml.qdoc function
\snippet examples/qml.qdoc.sample function
Some common verbs for function documentation:
\list
@ -153,7 +153,7 @@ QML enumerations are documented as QML properties with the
\l{qmlproperty-command}{\\qmlproperty} command. The type of the property
is \c enumeration.
\snippet examples/qml.qdoc enums
\snippet examples/qml.qdoc.sample enums
The QDoc comment lists the values of the enumeration. If the enumeration is
implemented in C++, the documentation may link to the corresponding C++

View File

@ -66,7 +66,7 @@
\li \l {HTML Specific Configuration Variables}
\li \l {Supporting Derived Projects}
\li \l {Example Manifest Files}
\li \l {qt.qdocconf}
\li \l {qtgui.qdocconf}
\li \l {minimum.qdocconf}
\li \l {Generating DITA XML Output}
\endlist
@ -7179,13 +7179,13 @@
\list
\li A minimum configuration file: \l minimum.qdocconf
\li The Qt configuration file: \l qt.qdocconf
\li The Qt configuration file: \l qtgui.qdocconf
\endlist
*/
/*!
\page 21-1-minimum-qdocconf.html
\previouspage qt.qdocconf
\previouspage qtgui.qdocconf
\contentspage QDoc Manual
\nextpage Generating DITA XML Output
@ -7195,14 +7195,14 @@
*/
/*!
\page 21-2-qt-qdocconf.html
\page 21-2-qtgui-qdocconf.html
\previouspage Supporting Derived Projects
\contentspage QDoc Manual
\nextpage minimum.qdocconf
\title qt.qdocconf
\title qtgui.qdocconf
\quotefile files/qt.qdocconf
\quotefile files/qtgui.qdocconf
*/
/*!
@ -7548,10 +7548,9 @@
The general syntax is \tt {extraimages.\e{format} = \e image}. The
file extension is optional.
For example, in \l qt.qdocconf we use a couple of images within
the HTML.postheader variable which value is pure HTML. For that
reason, these images are specified using the \c extraimages
variable:
For example, if additional images are used within the HTML.postheader
value, then these images must also be specified using the \c
extraimages variable:
\code
extraimages.HTML = qt-logo
@ -7819,7 +7818,7 @@
Currently, C++ is the only language that QDoc understands. It is
also the default language, and doesn't really need to be
specified. But for example in \l qt.qdocconf:
specified.
\code
language = Cpp
@ -7889,7 +7888,7 @@
The \c outputdir variable specifies the directory where QDoc will
put the generated documentation.
In qt.qdocconf:
For example:
\code
outputdir = $QTDIR/doc/html
@ -7972,8 +7971,6 @@
The \c sourcedirs variable specifies the directories containing
the \c .cpp or \c .qdoc files used in the documentation.
For example in \l qt.qdocconf
\code
sourcedirs = $QTDIR/src \
$QTDIR/doc/src \
@ -8157,7 +8154,7 @@
The \c versionsym variable specifies a C++ preprocessor symbol
that defines the version number of the documented software.
For example in \l qt.qdocconf:
For example:
\code
versionsym = QT_VERSION_STR
@ -8270,7 +8267,7 @@
Cpp.ignoredirectives} variables, non-standard constructs
(typically macros) can result in erroneous documentation.
In \l qt.qdocconf:
For example:
\code
Cpp.ignoredirectives = Q_DECLARE_INTERFACE \
@ -8324,8 +8321,6 @@
Cpp.ignoredirectives} variables, non-standard constructs
(typically macros) can result in erroneous documentation.
In \l qt.qdocconf:
\code
Cpp.ignoretokens = QAXFACTORY_EXPORT \
QM_EXPORT_CANVAS \
@ -8389,18 +8384,12 @@
quotation marks. Note that if the value spans several lines, each
line needs to be enclosed by quotation marks.
For example in \l qt.qdocconf:
\code
HTML.footer = "<p /><address><hr /><div align=\"center\">\n" \
...
"</tr></table></div></address>"
\endcode
The complete variable entry in \l qt.qdocconf provides the
standard footer of the \l {http://doc.qt.digia.com/4.0/index.html}
{Qt Reference Documentation}.
\target HTML.postheader-variable
\section1 HTML.postheader
@ -8414,8 +8403,6 @@
marks. Note that if the value spans several lines, each line needs
to be enclosed by quotation marks.
For example in \l qt.qdocconf:
\code
HTML.postheader = "<table border=\"0\"..." \
...
@ -8426,8 +8413,6 @@
"</table>"
\endcode
The complete variable entry in \l qt.qdocconf provides the
standard header of the \l {http://doc.qt.digia.com/}
{Qt Reference Documentation}.
\target HTML.style-variable
@ -8440,8 +8425,6 @@
marks. Note that if the value spans several lines, each line needs
to be enclosed by quotation marks.
For example in \l qt.qdocconf:
\code
HTML.style = "h3.fn,span.fn" \
"{ margin-left: 1cm; text-indent: -1cm; }\n" \
@ -8473,7 +8456,7 @@
\endcode
QDoc expects to find stylesheets in the directory containing the
\l qt.qdocconf file, and it will copy those specified to the output
\l qtgui.qdocconf file, and it will copy those specified to the output
directory alongside the HTML pages.
*/
@ -8565,7 +8548,7 @@
This feature makes use of the comprehensive indexes generated by
QDoc when it creates the Qt reference documentation.
For example, \l qt.qdocconf (the configuration file for Qt)
For example, \l qtgui.qdocconf (the configuration file for Qt)
contains the following variable definitions:
\code
@ -8585,9 +8568,6 @@
In a mini-project, you can use an index file by defining an \l
indexes configuration variable in your \c .qdocconf file.
For example, you can create a \c qtcreator.qdocconf file to help you
check the Qt Creator documentation:
\code
project = QtCreator
description = Qt Creator Manual

View File

@ -11,10 +11,10 @@
"QtDBus" => "$basedir/src/dbus",
"QtConcurrent" => "$basedir/src/concurrent",
"QtPlatformSupport" => "$basedir/src/platformsupport",
"KHR" => "$basedir/src/3rdparty/angle/include/KHR",
"GLES2" => "$basedir/src/3rdparty/angle/include/GLES2",
"EGL" => "$basedir/src/3rdparty/angle/include/EGL",
"QtZlib" => "$basedir/src/3rdparty/zlib",
"QtANGLE/KHR" => "!$basedir/src/3rdparty/angle/include/KHR",
"QtANGLE/GLES2" => "!$basedir/src/3rdparty/angle/include/GLES2",
"QtANGLE/EGL" => "!$basedir/src/3rdparty/angle/include/EGL",
"QtZlib" => "!$basedir/src/3rdparty/zlib",
"QtOpenGLExtensions" => "$basedir/src/openglextensions",
);
%moduleheaders = ( # restrict the module headers to those found in relative path

View File

@ -47,7 +47,7 @@
#define slots Baz
#define emit Yoyodyne
#include <QtGui/QtGui>
#include <QtConcurrent/QtConcurrent>
#include <QtCore>
#include <QtNetwork/QtNetwork>
#include <QtSql/QtSql>

View File

@ -151,12 +151,6 @@ Configure::Configure(int& argc, char** argv)
const QString installPath = buildPath;
#endif
if (sourceDir != buildDir) { //shadow builds!
if (QStandardPaths::findExecutable(QStringLiteral("perl.exe")).isEmpty()) {
cout << "Error: Creating a shadow build of Qt requires" << endl
<< "perl to be in the PATH environment";
exit(0); // Exit cleanly for Ctrl+C
}
cout << "Preparing build tree..." << endl;
QDir(buildPath).mkpath("bin");