Merge remote-tracking branch 'origin/5.8' into dev

Conflicts:
	mkspecs/features/mac/default_post.prf
	mkspecs/features/uikit/default_post.prf

Change-Id: I2a6f783451f2ac9eb4c1a050f605435d2dacf218
This commit is contained in:
Liang Qi 2016-11-17 14:15:53 +01:00
commit e5ac4afbf9
265 changed files with 2197 additions and 2794 deletions

View File

@ -37,8 +37,8 @@
**
****************************************************************************/
#if __cplusplus >= 201103L
#error "compiler uses c++11 or higher by default"
#if __cplusplus < 201103L
#error "compiler does not use c++11 or higher by default"
#endif
int main(int, char **) {}

View File

@ -1,2 +0,0 @@
SOURCES = alsatest.cpp
CONFIG -= qt dylib

View File

@ -1,48 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include <alsa/asoundlib.h>
#if SND_LIB_VERSION < 0x1000a // 1.0.10
#error "Alsa version found too old, require >= 1.0.10"
#endif
int main(int argc,char **argv)
{
}

View File

@ -1,47 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Toolkit
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#define GST_USE_UNSTABLE_API
#include <gst/gst.h>
int main(int, char**)
{
return 0;
}

View File

@ -1,4 +0,0 @@
SOURCES += gstreamer.cpp
CONFIG -= qt

View File

@ -40,6 +40,7 @@
#ifdef __APPLE__
#include <OpenGL/gl.h>
#else
#define GL_GLEXT_PROTOTYPES
#include <GL/gl.h>
#endif

View File

@ -40,6 +40,7 @@
#ifdef BUILD_ON_MAC
#include <OpenGLES/ES2/gl.h>
#else
#define GL_GLEXT_PROTOTYPES
#include <GLES2/gl2.h>
#endif

View File

@ -40,6 +40,7 @@
#ifdef BUILD_ON_MAC
#include <OpenGLES/ES3/gl.h>
#else
#define GL_GLEXT_PROTOTYPES
#include <GLES3/gl3.h>
#endif

View File

@ -1,56 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the config.tests of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include <pulse/pulseaudio.h>
#include <pulse/glib-mainloop.h>
#if !defined(PA_API_VERSION) || PA_API_VERSION-0 != 12
# error "Incompatible PulseAudio API version"
#endif
#if !PA_CHECK_VERSION(0,9,0)
# error "PulseAudio version too old"
#endif
int main(int, char **)
{
const char *headers = pa_get_headers_version();
const char *library = pa_get_library_version();
pa_glib_mainloop_new(0);
return (headers - library) * 0;
}

View File

@ -1,2 +0,0 @@
SOURCES = pulseaudio.cpp
CONFIG -= qt

View File

@ -252,6 +252,7 @@ Gui, printing, widget options:
-xcb-xlib............. Enable Xcb-Xlib support [auto]
Platform backends:
-direct2d .......... Enable Direct2D support [auto] (Windows only)
-directfb .......... Enable DirectFB support [no] (Unix only)
-eglfs ............. Enable EGLFS support [auto; no on Android and Windows]
-gbm ............... Enable backends for GBM [auto] (Linux only)
@ -288,12 +289,3 @@ Database options:
[all auto]
MYSQL_PATH= PSQL_LIBS= SYBASE= SYBASE_LIBS=
-sqlite .............. Select used sqlite3 [system/qt]
Multimedia options:
-pulseaudio .......... Enable PulseAudio support [auto]
-alsa ................ Enable ALSA support [auto]
-no-gstreamer ........ Disable support for GStreamer
-gstreamer [version] . Enable GStreamer support [auto]
With no parameter, 1.0 is tried first, then 0.10.
-wmf-backend ......... Enable WMF support [no] (Windows only)

34
configure vendored
View File

@ -1122,14 +1122,14 @@ if [ "$Edition" = "OpenSource" ]; then
while true; do
if [ "$CFG_ANDROID_STYLE_ASSETS" = "no" ] || [ "$XPLATFORM_ANDROID" = "no" ]; then
echo "You are licensed to use this software under the terms of"
echo "the GNU Lesser General Public License (LGPL) versions 3."
echo "the GNU Lesser General Public License (LGPL) version 3."
echo "You are also licensed to use this software under the terms of"
echo "the GNU General Public License (GPL) versions 2."
echo "the GNU General Public License (GPL) version 2."
affix="either"
showGPL2="yes"
else
echo "You are licensed to use this software under the terms of"
echo "the GNU Lesser General Public License (LGPL) versions 3."
echo "the GNU Lesser General Public License (LGPL) version 3."
showGPL2="no"
affix="the"
fi
@ -1823,15 +1823,9 @@ fi # Build qmake
# create a qt.conf for the Qt build tree itself
#-------------------------------------------------------------------------------
QTCONFFILE="$outpath/bin/qt.conf"
cat > "$QTCONFFILE" <<EOF
[EffectivePaths]
Prefix=..
EOF
if [ -n "$CFG_HOST_QT_TOOLS_PATH" ]; then
cat >> "$QTCONFFILE" <<EOF
[Paths]
Prefix=$QT_EXT_PREFIX
printInstallPaths()
{
cat <<EOF
Documentation=$QT_REL_INSTALL_DOCS
Headers=$QT_REL_INSTALL_HEADERS
Libraries=$QT_REL_INSTALL_LIBS
@ -1845,6 +1839,22 @@ Data=$QT_REL_INSTALL_DATA
Translations=$QT_REL_INSTALL_TRANSLATIONS
Examples=$QT_REL_INSTALL_EXAMPLES
Tests=$QT_REL_INSTALL_TESTS
EOF
}
QTCONFFILE="$outpath/bin/qt.conf"
cat > "$QTCONFFILE" <<EOF
[EffectivePaths]
Prefix=..
EOF
if [ -n "$CFG_HOST_QT_TOOLS_PATH" ]; then
cat >> "$QTCONFFILE" <<EOF
[DevicePaths]
Prefix=$QT_INSTALL_PREFIX
`printInstallPaths`
[Paths]
Prefix=$QT_EXT_PREFIX
`printInstallPaths`
HostPrefix=$QT_HOST_PREFIX
HostBinaries=$QT_REL_HOST_BINS
HostLibraries=$QT_REL_HOST_LIBS

View File

@ -25,7 +25,7 @@
"custom": "qmakeArgs",
"options": {
"prefix": "string",
"hostprefix": "string",
"hostprefix": "optionalString",
"extprefix": "string",
"archdatadir": "string",
@ -56,8 +56,6 @@
"android-toolchain-version": "string",
"accessibility": "boolean",
"alsa": "boolean",
"audio-backend": "boolean",
"avx": "boolean",
"avx2": "boolean",
"avx512": { "type": "boolean", "name": "avx512f" },
@ -81,7 +79,6 @@
"gcc-sysroot": "boolean",
"gcov": "boolean",
"gnumake": { "type": "boolean", "name": "GNUmake" },
"gstreamer": { "type": "optionalString", "values": [ "no", "yes", "0.10", "1.0" ] },
"gui": "boolean",
"headersclean": "boolean",
"host-option": "string",
@ -102,7 +99,6 @@
"platform": "string",
"plugin-manifests": "boolean",
"profile": "boolean",
"pulseaudio": "boolean",
"qml-debug": "boolean",
"qreal": "string",
"qtlibinfix": { "type": "string", "name": "qt_libinfix" },
@ -133,7 +129,6 @@
"warnings-are-errors": { "type": "boolean", "name": "warnings_are_errors" },
"Werror": { "type": "boolean", "name": "warnings_are_errors" },
"widgets": "boolean",
"wmf-backend": "boolean",
"xplatform": "string",
"zlib": { "type": "enum", "name": "system-zlib", "values": { "system": "yes", "qt": "no" } }
},
@ -157,39 +152,6 @@
{ "libs": "-lz", "condition": "!config.msvc" }
]
},
"alsa": {
"label": "ALSA",
"export": "",
"test": "unix/alsa",
"sources": [
"-lasound"
]
},
"pulseaudio": {
"label": "PulseAudio >= 0.9.10",
"test": "unix/pulseaudio",
"sources": [
{ "type": "pkgConfig", "args": "libpulse >= 0.9.10 libpulse-mainloop-glib" }
]
},
"gstreamer_1_0": {
"label": "GStreamer 1.0",
"export": "",
"test": "unix/gstreamer",
"sources": [
{ "type": "pkgConfig",
"args": "gstreamer-1.0 gstreamer-base-1.0 gstreamer-audio-1.0 gstreamer-video-1.0 gstreamer-pbutils-1.0" }
]
},
"gstreamer_0_10": {
"label": "GStreamer 0.10",
"export": "",
"test": "unix/gstreamer",
"sources": [
{ "type": "pkgConfig",
"args": "gstreamer-0.10 gstreamer-base-0.10 gstreamer-audio-0.10 gstreamer-video-0.10 gstreamer-pbutils-0.10" }
]
},
"dbus": {
"label": "D-Bus >= 1.2",
"test": "unix/dbus",
@ -281,8 +243,8 @@
"type": "compile",
"test": "common/c++1z"
},
"cxx98default": {
"label": "compiler defaulting to C++98",
"cxx11default": {
"label": "compiler defaulting to C++11 or higher",
"type": "compile",
"test": "common/c++98default"
},
@ -451,11 +413,6 @@
"label": "IncrediBuild",
"type": "files",
"files": [ "BuildConsole.exe", "xgConsole.exe" ]
},
"wmf": {
"label": "WMF",
"type": "files",
"files": [ "mfapi.h", "mf.lib" ]
}
},
@ -484,9 +441,9 @@
"condition": "call.crossCompile",
"output": [ "publicConfig", "privateConfig" ]
},
"cxx98default": {
"label": "Compiler defaults to C++98",
"condition": "tests.cxx98default",
"cxx11default": {
"label": "Compiler defaults to C++11 or higher",
"condition": "!tests.cxx11default",
"output": [ { "type": "publicConfig", "name": "c++11" } ]
},
"compiler-flags": {
@ -559,6 +516,7 @@
},
"release_tools": {
"label": "Compile tools in release mode",
"autoDetect": "!features.debug",
"output": [ "privateFeature", "publicQtConfig" ]
},
"simulator_and_device": {
@ -899,11 +857,6 @@
{ "type": "define", "name": "QT_COMPILER_SUPPORTS_NEON", "value": 1 }
]
},
"alsa": {
"label": "ALSA",
"condition": "libs.alsa",
"output": [ "feature" ]
},
"mremap": {
"label": "mremap()",
"condition": "tests.mremap",
@ -923,11 +876,6 @@
"label": "Accessibility",
"output": [ "publicFeature", "feature" ]
},
"pulseaudio": {
"label": "PulseAudio",
"condition": "libs.pulseaudio",
"output": [ "feature" ]
},
"system-zlib": {
"label": "Using system zlib",
"condition": "libs.zlib",
@ -986,24 +934,6 @@
"condition": "libs.libudev",
"output": [ "privateFeature" ]
},
"gstreamer-1_0": {
"label": "GStreamer 1.0",
"disable": "input.gstreamer == '0.10' || input.gstreamer == 'no'",
"enable": "input.gstreamer == '1.0'",
"condition": "libs.gstreamer_1_0",
"output": [ { "type": "publicQtConfig", "name": "gstreamer-1.0" } ]
},
"gstreamer-0_10": {
"label": "GStreamer 0.10",
"disable": "input.gstreamer == 'no'",
"enable": "input.gstreamer == '0.10'",
"condition": "!features.gstreamer-1_0 && libs.gstreamer_0_10",
"output": [ { "type": "publicQtConfig", "name": "gstreamer-0.10" } ]
},
"audio-backend": {
"label": "Audio backend",
"output": [ "publicQtConfig" ]
},
"qml-debug": {
"label": "QML debugging",
"output": [ { "type": "publicQtConfig", "negative": true } ]
@ -1030,13 +960,6 @@
"autoDetect": false,
"condition": "!features.shared",
"output": [ "publicConfig", "publicQtConfig" ]
},
"wmf-backend": {
"label": "Windows Media Foundation backend for Qt Multimedia",
"emitIf": "config.win32",
"autoDetect": false,
"condition": "tests.wmf",
"output": [ "publicQtConfig" ]
}
},
@ -1075,7 +998,7 @@ or compile needed modules into the library."
},
{
"type": "note",
"condition": "features.release_tools && (!features.debug || features.debug_and_release)",
"condition": "features.release_tools && !features.debug",
"message": "-optimized-tools is not useful in -release mode."
},
{
@ -1182,11 +1105,7 @@ Configure with '-qreal float' to create a build that is binary-compatible with 5
"section": "Support enabled for",
"entries": [
"accessibility",
"alsa",
"gstreamer-0_10",
"gstreamer-1_0",
"pkg-config",
"pulseaudio",
"qml-debug",
"libudev",
"system-zlib"

View File

@ -57,6 +57,7 @@ defineTest(qtConfCommandline_sanitize) {
# callbacks
defineReplace(qtConfFunc_crossCompile) {
!isEmpty(config.input.sysroot): return(true)
spec = $$[QMAKE_SPEC]
!equals(spec, $$[QMAKE_XSPEC]): return(true)
return(false)
@ -225,6 +226,7 @@ defineTest(qtConfTest_buildParts) {
defineTest(qtConfTest_checkCompiler) {
contains(QMAKE_CXX, ".*clang.*") {
qtRunLoggedCommand("$$QMAKE_CXX -v 2>&1", versionstr)|return(false)
versionstr = "$$versionstr"
contains(versionstr, "^Apple (clang|LLVM) version .*") {
$${1}.compilerDescription = "Apple Clang"
$${1}.compilerId = "apple_clang"
@ -241,11 +243,11 @@ defineTest(qtConfTest_checkCompiler) {
$${1}.compilerDescription = "GCC"
$${1}.compilerId = "gcc"
$${1}.compilerVersion = $$version
} else: contains(QMAKE_CXX, ".*icpc" ) {
qtRunLoggedCommand("$$QMAKE_CXX -v", version)|return(false)
} else: contains(QMAKE_CXX, ".*icpc") {
qtRunLoggedCommand("$$QMAKE_CXX -dumpversion", version)|return(false)
$${1}.compilerDescription = "ICC"
$${1}.compilerId = "icc"
$${1}.compilerVersion = $$replace(version, "icpc version ([0-9.]+).*", "\\1")
$${1}.compilerVersion = $$version
} else: msvc {
command = $$QMAKE_CXX /EP /nologo $$source $$system_quote($$QMAKE_CONFIG_TESTS_DIR/win/msvc_version.cpp)
qtRunLoggedCommand("$$command", version)|return(false)
@ -455,9 +457,10 @@ defineTest(qtConfOutput_qmakeArgs) {
export($${currentConfig}.output.privatePro)
}
defineTest(qtConfOutputPostProcess_publicPro) {
defineReplace(qtConfOutputPostProcess_publicPro) {
qt_version = $$[QT_VERSION]
output = \
$$1 \
"QT_VERSION = $$qt_version" \
"QT_MAJOR_VERSION = $$section(qt_version, '.', 0, 0)" \
"QT_MINOR_VERSION = $$section(qt_version, '.', 1, 1)" \
@ -474,13 +477,13 @@ defineTest(qtConfOutputPostProcess_publicPro) {
"QT_RELEASE_DATE = $$config.input.qt_release_date"
}
$${currentConfig}.output.publicPro += $$output
export($${currentConfig}.output.publicPro)
return($$output)
}
defineTest(qtConfOutputPostProcess_publicHeader) {
defineReplace(qtConfOutputPostProcess_publicHeader) {
qt_version = $$[QT_VERSION]
output = \
$$1 \
"$${LITERAL_HASH}define QT_VERSION_STR \"$$qt_version\"" \
"$${LITERAL_HASH}define QT_VERSION_MAJOR $$section(qt_version, '.', 0, 0)" \
"$${LITERAL_HASH}define QT_VERSION_MINOR $$section(qt_version, '.', 1, 1)" \
@ -497,8 +500,7 @@ defineTest(qtConfOutputPostProcess_publicHeader) {
!isEmpty(config.input.qt_libinfix): \
output += "$${LITERAL_HASH}define QT_LIBINFIX \"$$eval(config.input.qt_libinfix)\""
$${currentConfig}.output.publicHeader += $$output
export($${currentConfig}.output.publicHeader)
return($$output)
}
@ -526,13 +528,16 @@ defineTest(qtConfReport_buildMode) {
else: \
release = "release"
$$qtConfEvaluate("features.debug"): \
$$qtConfEvaluate("features.debug") {
build_mode = "debug"
else: \
raw_build_mode = "debug"
} else {
build_mode = $$release
raw_build_mode = "release"
}
$$qtConfEvaluate("features.debug_and_release"): \
build_mode = "debug and $$release; default link: $$build_mode"
build_mode = "debug and $$release; default link: $$raw_build_mode"
$$qtConfEvaluate("features.release_tools"): \
build_mode = "$$build_mode; optimized tools"

View File

@ -177,11 +177,7 @@ void GLWidget::resizeGL(int width, int height)
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
#ifdef QT_OPENGL_ES_1
glOrthof(-0.5, +0.5, -0.5, +0.5, 4.0, 15.0);
#else
glOrtho(-0.5, +0.5, -0.5, +0.5, 4.0, 15.0);
#endif
glMatrixMode(GL_MODELVIEW);
}
//! [8]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -34,7 +34,7 @@
The Books example shows how Qt's SQL classes can be used with the model/view
framework to create rich user interfaces for information stored in a database.
\image books-demo.png
\borderedimage books-demo.png
Information about a collection of books is held in a database. The books are
catalogued by author, title, genre, and year of publication. Although each of

View File

@ -34,7 +34,7 @@
caching any changes to the data until the user explicitly submits them using a
push button.
\image cachedtable-example.png
\borderedimage cachedtable-example.png
The example consists of a single class, \c TableEditor, which is a
custom dialog widget that allows the user to modify data stored in

View File

@ -34,7 +34,7 @@
well as submit changes, using the QSqlRelationalTableModel and
QDataWidgetMapper classes.
\image drilldown-example.png Screenshot of the Drill Down Example
\borderedimage drilldown-example.png Screenshot of the Drill Down Example
When running the example application, a user can retrieve
information about each item by clicking the corresponding image.

View File

@ -40,5 +40,5 @@
the database and the associated XML file using the API provided by
the Qt SQL and Qt XML modules, respectively.
\image masterdetail-example.png
\borderedimage masterdetail-example.png
*/

View File

@ -34,5 +34,5 @@
data obtained from a SQL query, using a model that encapsulates
the query and table views to display the results.
\image querymodel-example.png
\borderedimage querymodel-example.png
*/

View File

@ -33,5 +33,5 @@
\brief The Relational Table Model example shows how to use table views with a relational
model to visualize the relations between items in a database.
\image relationaltablemodel-example.png
\borderedimage relationaltablemodel-example.png
*/

View File

@ -33,5 +33,5 @@
\brief The SQL Browser example shows how a data browser can be used to visualize
the results of SQL statements on a live database.
\image sqlbrowser-demo.png
\borderedimage sqlbrowser-demo.png
*/

View File

@ -33,7 +33,7 @@
\brief The SQL Widget Mapper example shows how to use a map information from a
database to widgets on a form.
\image sql-widget-mapper.png
\borderedimage sql-widget-mapper.png
In the \l{Combo Widget Mapper Example}, we showed how to use a named
mapping between a widget mapper and a QComboBox widget with a special
@ -74,7 +74,7 @@
including values for the address types that correspond to the address
types are stored in a separate table.
\image widgetmapper-sql-mapping-table.png
\borderedimage widgetmapper-sql-mapping-table.png
We create an "addresstype" table containing the identifiers used in the
"person" table and the corresponding strings:
@ -93,7 +93,7 @@
used wherever the "typeid" is presented to the user. (See the
QSqlRelationalTableModel::setRelation() documentation for details.)
\image widgetmapper-sql-mapping.png
\borderedimage widgetmapper-sql-mapping.png
The constructor of the \c Window class can be explained in three parts.
In the first part, we set up the model used to hold the data, then we set

View File

@ -33,5 +33,5 @@
\brief The Table Model example shows how to use a specialized SQL table model with table
views to edit information in a database.
\image tablemodel-example.png
\borderedimage tablemodel-example.png
*/

View File

@ -22,11 +22,9 @@ SUBDIRS = \
tutorials \
widgets
qtConfig(opengl(es2)?) {
qtConfig(opengl): \
SUBDIRS += windowcontainer
}
!qtConfig(opengl(es2)?): SUBDIRS -= windowcontainer
contains(DEFINES, QT_NO_CURSOR): SUBDIRS -= mainwindows
contains(DEFINES, QT_NO_DRAGANDDROP): SUBDIRS -= draganddrop
mac:SUBDIRS += mac

View File

@ -1,230 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xbel>
<xbel version="1.0">
<folder folded="yes">
<title>Literate Programming</title>
<bookmark href="http://www.vivtek.com/litprog.html">
<title>Synopsis of Literate Programming</title>
</bookmark>
<bookmark href="http://vasc.ri.cmu.edu/old_help/Programming/Literate/literate.html">
<title>Literate Programming: Propaganda and Tools</title>
</bookmark>
<bookmark href="http://www.isy.liu.se/%7Eturbell/litprog/">
<title>Literate Programming by Henrik Turbell</title>
</bookmark>
<bookmark href="http://www.desy.de/user/projects/LitProg.html">
<title>Literate Programming Library</title>
</bookmark>
<bookmark href="http://www.loria.fr/services/tex/english/litte.html">
<title>Literate Programming Basics</title>
</bookmark>
<bookmark href="http://ei.cs.vt.edu/%7Ecs5014/courseNotes/4.LiterateProgramming/literate_prog.html">
<title>Literate Programming Overview</title>
</bookmark>
<bookmark href="http://www.perl.com/pub/a/tchrist/litprog.html">
<title>POD is not Literate Programming</title>
</bookmark>
<bookmark href="http://www.cornellcollege.edu/%7Eltabak/publications/articles/swsafety.html">
<title>Computers That We Can Count On</title>
</bookmark>
<bookmark href="http://www.cs.auc.dk/%7Enormark/litpro/issues-and-problems.html">
<title>Literate Programming - Issues and Problems</title>
</bookmark>
<bookmark href="http://c2.com/cgi/wiki?LiterateProgramming">
<title>Literate Programming - Wiki Pages</title>
</bookmark>
<bookmark href="http://developers.slashdot.org/developers/02/05/19/2216233.shtml">
<title>What is well-commented code?</title>
</bookmark>
<bookmark href="http://liinwww.ira.uka.de/bibliography/SE/litprog.html">
<title>Bibliography on literate programming - A searchable bibliography</title>
</bookmark>
<bookmark href="http://www2.umassd.edu/SWPI/ProcessBibliography/bib-codereading.html">
<title>Program comprehension and code reading bibliography</title>
</bookmark>
<bookmark href="http://www.cs.auc.dk/%7Enormark/elucidative-programming/">
<title>Elucidative Programming</title>
</bookmark>
<bookmark href="http://www.msu.edu/%7Epfaffben/avl/index.html">
<title>AVL Trees (TexiWeb)</title>
</bookmark>
<bookmark href="http://literate-programming.wikiverse.org/">
<title>Literate Programming on Wikiverse</title>
</bookmark>
<bookmark href="http://www.pbrt.org/">
<title>Physically Based Rendering: From Theory to Implementation</title>
</bookmark>
</folder>
<folder folded="no">
<title>Useful C++ Links</title>
<folder folded="no">
<title>STL</title>
<bookmark href="http://www.sgi.com/tech/stl/table_of_contents.html">
<title>STL Reference Documentation</title>
</bookmark>
<bookmark href="http://www.yrl.co.uk/~phil/stl/stl.htmlx">
<title>STL Tutorial</title>
</bookmark>
<bookmark href="http://www.cppreference.com/cpp_stl.html">
<title>STL Reference</title>
</bookmark>
</folder>
<folder folded="no">
<title>Qt</title>
<bookmark href="http://doc.qt.digia.com/2.3/">
<title>Qt 2.3 Reference</title>
</bookmark>
<bookmark href="http://doc.qt.digia.com/3.3/">
<title>Qt 3.3 Reference</title>
</bookmark>
<bookmark href="http://doc.qt.digia.com/4.0/">
<title>Qt 4.0 Reference</title>
</bookmark>
<bookmark href="http://qt-project.org/">
<title>Qt Home Page</title>
</bookmark>
</folder>
<folder folded="yes">
<title>IOStreams</title>
<bookmark href="http://www.cplusplus.com/ref/iostream/index.html">
<title>IO Stream Library</title>
</bookmark>
<bookmark href="http://courses.cs.vt.edu/~cs2604/fall01/binio.html">
<title>Binary I/O</title>
</bookmark>
<bookmark href="http://www.parashift.com/c++-faq-lite/input-output.html">
<title>I/O Stream FAQ</title>
</bookmark>
</folder>
<folder folded="yes">
<title>gdb</title>
<bookmark href="http://www.cs.princeton.edu/~benjasik/gdb/gdbtut.html">
<title>GDB Tutorial</title>
</bookmark>
<bookmark href="http://www.gnu.org/manual/gdb-4.17/html_mono/gdb.html">
<title>Debugging with GDB</title>
</bookmark>
<bookmark href="http://www.cs.washington.edu/orgs/acm/tutorials/dev-in-unix/gdb-refcard.pdf">
<title>GDB Quick Reference Page (PDF) (Handy)</title>
</bookmark>
</folder>
<folder folded="yes">
<title>Classes and Constructors</title>
<bookmark href="http://www.parashift.com/c++-faq-lite/ctors.html">
<title>Constructor FAQ</title>
</bookmark>
<bookmark href="http://www.juicystudio.com/tutorial/cpp/index.html">
<title>Organizing Classes</title>
</bookmark>
</folder>
</folder>
<folder folded="yes">
<title>Software Documentation or System Documentation</title>
<bookmark href="http://www.martinfowler.com/distributedComputing/thud.html">
<title>The Almighty Thud</title>
</bookmark>
<bookmark href="http://msdn.microsoft.com/library/techart/cfr.htm">
<title>Microsoft Coding Techniques and Programming Practices</title>
</bookmark>
<bookmark href="http://www.bearcave.com/software/prog_docs.html">
<title>Software and Documentation</title>
</bookmark>
<bookmark href="http://c2.com/cgi/wiki?TheSourceCodeIsTheDesign">
<title>The Source Code is the Design</title>
</bookmark>
<bookmark href="http://www.bleading-edge.com/Publications/C++Journal/Cpjour2.htm">
<title>What is Software Design?</title>
</bookmark>
<bookmark href="http://www.mindprod.com/unmain.html">
<title>How To Write Unmaintainable Code</title>
</bookmark>
<bookmark href="http://www.idinews.com/selfDoc.html">
<title>Self Documenting Program Code Remains a Distant Goal</title>
</bookmark>
<bookmark href="http://www.sdmagazine.com/documents/s=730/sdm0106m/0106m.htm">
<title>Place Tab A in Slot B</title>
</bookmark>
<bookmark href="http://www.holub.com/class/uml/uml.html">
<title>UML Reference Card</title>
</bookmark>
</folder>
<folder folded="yes">
<title>TeX Resources</title>
<bookmark href="http://www.tug.org/">
<title>The TeX User's Group</title>
</bookmark>
<bookmark href="http://www.miktex.org/">
<title>MikTeX website</title>
</bookmark>
<bookmark href="http://cm.bell-labs.com/who/hobby/MetaPost.html">
<title>MetaPost website</title>
</bookmark>
<bookmark href="http://pauillac.inria.fr/%7Emaranget/hevea/">
<title>HEVEA is a quite complete and fast LATEX to HTML translator</title>
</bookmark>
</folder>
<folder folded="no">
<title>Portable Document Format (PDF)</title>
<bookmark href="http://www.adobe.com/">
<title>Adobe - The postscript and PDF standards</title>
</bookmark>
<bookmark href="http://partners.adobe.com/asn/developer/technotes/acrobatpdf.html">
<title>Reference Manual Portable Document Format</title>
</bookmark>
<bookmark href="http://partners.adobe.com/asn/developer/acrosdk/main.html">
<title>Adobe Acrobat Software Development Kit</title>
</bookmark>
</folder>
<folder folded="yes">
<title>Literature Sites</title>
<bookmark href="http://www.cc.columbia.edu/cu/libraries/subjects/speccol.html">
<title>Guide to Special Collections (Columbia University)</title>
</bookmark>
<bookmark href="http://www.ipl.org/ref/litcrit/">
<title>Literary Criticism on the Web from the Internet Public Library</title>
</bookmark>
<bookmark href="http://www.victorianweb.org/">
<title>Victorian Web.</title>
</bookmark>
<bookmark href="http://vos.ucsb.edu/">
<title>Voice of the Shuttle.</title>
</bookmark>
<bookmark href="http://www.modjourn.brown.edu/">
<title>Modernist Journals Project</title>
</bookmark>
<bookmark href="http://www.poetspath.com">
<title>Museum of American Poetics</title>
</bookmark>
<bookmark href="http://www.english.uiuc.edu/maps/">
<title>Modern American Poetry</title>
</bookmark>
<bookmark href="http://www.findarticles.com/">
<title>FindArticles.com</title>
</bookmark>
<bookmark href="http://www.literaryhistory.com">
<title>Literary History</title>
</bookmark>
<bookmark href="http://www.litencyc.com/LitEncycFrame.htm">
<title>Literary Encyclopedia</title>
</bookmark>
<separator/>
<bookmark href="http://texts.cdlib.org/ucpress/">
<title>The University of California Press</title>
</bookmark>
<bookmark href="http://www.letrs.indiana.edu/web/w/wright2/">
<title>Wright American Fiction, 1851-1875</title>
</bookmark>
<bookmark href="http://docsouth.unc.edu/">
<title>Documenting the American South: Beginnings to 1920</title>
</bookmark>
<bookmark href="http://etext.lib.virginia.edu/eng-on.html">
<title>Electronic Text Center at the University of Virginia</title>
</bookmark>
<bookmark href="http://digital.nypl.org/schomburg/writers_aa19/">
<title>The Schomburg Center for Research in Black Culture</title>
</bookmark>
<bookmark href="http://www.infomotions.com/alex2/">
<title>Alex Catalogue of Electronic Texts.</title>
</bookmark>
</folder>
</xbel>

View File

@ -3,60 +3,42 @@
<xbel version="1.0">
<folder folded="no">
<title>Qt Resources</title>
<folder folded="yes">
<bookmark href="http://qt.io/">
<title>Qt home page</title>
</bookmark>
<bookmark href="https://www.qt.io/partners/">
<title>Qt Partners</title>
<bookmark href="http://partners.trolltech.com/partners/training.html">
<title>Training Partners</title>
</bookmark>
<bookmark href="http://partners.trolltech.com/partners/service.html">
<title>Consultants and System Integrators</title>
</bookmark>
<bookmark href="http://partners.trolltech.com/partners/tech.html">
<title>Technology Partners</title>
</bookmark>
<bookmark href="http://partners.trolltech.com/partners/resellers.html">
<title>Value Added Resellers (VARs)</title>
</bookmark>
</folder>
</bookmark>
<bookmark href="https://www.qt.io/qt-training/">
<title>Training</title>
</bookmark>
<bookmark href="http://doc.qt.io/">
<title>Qt 5 documentation</title>
</bookmark>
<bookmark href="http://qt-project.org/faq/">
<title>Frequently Asked Questions</title>
</bookmark>
<folder folded="yes">
<title>Community Resources</title>
<bookmark href="http://www.qtcentre.org/content/">
<title>Qt Centre</title>
</bookmark>
<bookmark href="http://www.qtforum.org/">
<title>QtForum.org</title>
</bookmark>
<bookmark href="http://www.digitalfanatics.org/projects/qt_tutorial/">
<bookmark href="http://digitalfanatics.org/projects/qt_tutorial/">
<title>The Independent Qt Tutorial</title>
</bookmark>
<bookmark href="http://prog.qt.free.fr/">
<title>French PROG.Qt</title>
</bookmark>
<bookmark href="http://www.qtforum.de/">
<title>German Qt Forum</title>
</bookmark>
<bookmark href="http://www.korone.net/">
<title>Korean Qt Community Site</title>
</bookmark>
<bookmark href="http://prog.org.ru/forum/forum_14.html">
<bookmark href="http://prog.org.ru/">
<title>Russian Qt Forum</title>
</bookmark>
<bookmark href="http://qt4.digitalfanatics.org/">
<title>Digitalfanatics: The QT 4 Resource Center</title>
</bookmark>
<bookmark href="http://www.qtquestions.org/">
<title>QtQuestions</title>
</bookmark>
</folder>
<bookmark href="http://doc.qt.digia.com/qq/">
<title>Qt Quarterly</title>
</bookmark>
<bookmark href="http://qt-project.org/">
<title>Qt home page</title>
</bookmark>
<bookmark href="http://doc.qt.digia.com/4.0/">
<title>Qt 4.0 documentation</title>
</bookmark>
<bookmark href="http://qt-project.org/faq/">
<title>Frequently Asked Questions</title>
</bookmark>
</folder>
<folder folded="no">
<title>Online Dictionaries</title>
@ -73,9 +55,6 @@
<title>OneLook Dictionary Search</title>
</bookmark>
<separator/>
<bookmark href="www.iee.et.tu-dresden.de/">
<title>The New English-German Dictionary</title>
</bookmark>
<bookmark href="http://dict.tu-chemnitz.de/">
<title>TU Chemnitz German-English Dictionary</title>
</bookmark>
@ -86,8 +65,5 @@
<bookmark href="http://dictionnaires.atilf.fr/dictionnaires/ACADEMIE/">
<title>Dictionnaire de l'Académie Française</title>
</bookmark>
<bookmark href="http://elsap1.unicaen.fr/cgi-bin/cherches.cgi">
<title>Dictionnaire des synonymes</title>
</bookmark>
</folder>
</xbel>

View File

@ -1,230 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xbel>
<xbel version="1.0">
<folder folded="yes">
<title>Literate Programming</title>
<bookmark href="http://www.vivtek.com/litprog.html">
<title>Synopsis of Literate Programming</title>
</bookmark>
<bookmark href="http://vasc.ri.cmu.edu/old_help/Programming/Literate/literate.html">
<title>Literate Programming: Propaganda and Tools</title>
</bookmark>
<bookmark href="http://www.isy.liu.se/%7Eturbell/litprog/">
<title>Literate Programming by Henrik Turbell</title>
</bookmark>
<bookmark href="http://www.desy.de/user/projects/LitProg.html">
<title>Literate Programming Library</title>
</bookmark>
<bookmark href="http://www.loria.fr/services/tex/english/litte.html">
<title>Literate Programming Basics</title>
</bookmark>
<bookmark href="http://ei.cs.vt.edu/%7Ecs5014/courseNotes/4.LiterateProgramming/literate_prog.html">
<title>Literate Programming Overview</title>
</bookmark>
<bookmark href="http://www.perl.com/pub/a/tchrist/litprog.html">
<title>POD is not Literate Programming</title>
</bookmark>
<bookmark href="http://www.cornellcollege.edu/%7Eltabak/publications/articles/swsafety.html">
<title>Computers That We Can Count On</title>
</bookmark>
<bookmark href="http://www.cs.auc.dk/%7Enormark/litpro/issues-and-problems.html">
<title>Literate Programming - Issues and Problems</title>
</bookmark>
<bookmark href="http://c2.com/cgi/wiki?LiterateProgramming">
<title>Literate Programming - Wiki Pages</title>
</bookmark>
<bookmark href="http://developers.slashdot.org/developers/02/05/19/2216233.shtml">
<title>What is well-commented code?</title>
</bookmark>
<bookmark href="http://liinwww.ira.uka.de/bibliography/SE/litprog.html">
<title>Bibliography on literate programming - A searchable bibliography</title>
</bookmark>
<bookmark href="http://www2.umassd.edu/SWPI/ProcessBibliography/bib-codereading.html">
<title>Program comprehension and code reading bibliography</title>
</bookmark>
<bookmark href="http://www.cs.auc.dk/%7Enormark/elucidative-programming/">
<title>Elucidative Programming</title>
</bookmark>
<bookmark href="http://www.msu.edu/%7Epfaffben/avl/index.html">
<title>AVL Trees (TexiWeb)</title>
</bookmark>
<bookmark href="http://literate-programming.wikiverse.org/">
<title>Literate Programming on Wikiverse</title>
</bookmark>
<bookmark href="http://www.pbrt.org/">
<title>Physically Based Rendering: From Theory to Implementation</title>
</bookmark>
</folder>
<folder folded="no">
<title>Useful C++ Links</title>
<folder folded="no">
<title>STL</title>
<bookmark href="http://www.sgi.com/tech/stl/table_of_contents.html">
<title>STL Reference Documentation</title>
</bookmark>
<bookmark href="http://www.yrl.co.uk/~phil/stl/stl.htmlx">
<title>STL Tutorial</title>
</bookmark>
<bookmark href="http://www.cppreference.com/cpp_stl.html">
<title>STL Reference</title>
</bookmark>
</folder>
<folder folded="no">
<title>Qt</title>
<bookmark href="http://doc.qt.digia.com/2.3/">
<title>Qt 2.3 Reference</title>
</bookmark>
<bookmark href="http://doc.qt.digia.com/3.3/">
<title>Qt 3.3 Reference</title>
</bookmark>
<bookmark href="http://doc.qt.digia.com/4.0/">
<title>Qt 4.0 Reference</title>
</bookmark>
<bookmark href="http://qt-project.org/">
<title>Qt Home Page</title>
</bookmark>
</folder>
<folder folded="yes">
<title>IOStreams</title>
<bookmark href="http://www.cplusplus.com/ref/iostream/index.html">
<title>IO Stream Library</title>
</bookmark>
<bookmark href="http://courses.cs.vt.edu/~cs2604/fall01/binio.html">
<title>Binary I/O</title>
</bookmark>
<bookmark href="http://www.parashift.com/c++-faq-lite/input-output.html">
<title>I/O Stream FAQ</title>
</bookmark>
</folder>
<folder folded="yes">
<title>gdb</title>
<bookmark href="http://www.cs.princeton.edu/~benjasik/gdb/gdbtut.html">
<title>GDB Tutorial</title>
</bookmark>
<bookmark href="http://www.gnu.org/manual/gdb-4.17/html_mono/gdb.html">
<title>Debugging with GDB</title>
</bookmark>
<bookmark href="http://www.cs.washington.edu/orgs/acm/tutorials/dev-in-unix/gdb-refcard.pdf">
<title>GDB Quick Reference Page (PDF) (Handy)</title>
</bookmark>
</folder>
<folder folded="yes">
<title>Classes and Constructors</title>
<bookmark href="http://www.parashift.com/c++-faq-lite/ctors.html">
<title>Constructor FAQ</title>
</bookmark>
<bookmark href="http://www.juicystudio.com/tutorial/cpp/index.html">
<title>Organizing Classes</title>
</bookmark>
</folder>
</folder>
<folder folded="yes">
<title>Software Documentation or System Documentation</title>
<bookmark href="http://www.martinfowler.com/distributedComputing/thud.html">
<title>The Almighty Thud</title>
</bookmark>
<bookmark href="http://msdn.microsoft.com/library/techart/cfr.htm">
<title>Microsoft Coding Techniques and Programming Practices</title>
</bookmark>
<bookmark href="http://www.bearcave.com/software/prog_docs.html">
<title>Software and Documentation</title>
</bookmark>
<bookmark href="http://c2.com/cgi/wiki?TheSourceCodeIsTheDesign">
<title>The Source Code is the Design</title>
</bookmark>
<bookmark href="http://www.bleading-edge.com/Publications/C++Journal/Cpjour2.htm">
<title>What is Software Design?</title>
</bookmark>
<bookmark href="http://www.mindprod.com/unmain.html">
<title>How To Write Unmaintainable Code</title>
</bookmark>
<bookmark href="http://www.idinews.com/selfDoc.html">
<title>Self Documenting Program Code Remains a Distant Goal</title>
</bookmark>
<bookmark href="http://www.sdmagazine.com/documents/s=730/sdm0106m/0106m.htm">
<title>Place Tab A in Slot B</title>
</bookmark>
<bookmark href="http://www.holub.com/class/uml/uml.html">
<title>UML Reference Card</title>
</bookmark>
</folder>
<folder folded="yes">
<title>TeX Resources</title>
<bookmark href="http://www.tug.org/">
<title>The TeX User's Group</title>
</bookmark>
<bookmark href="http://www.miktex.org/">
<title>MikTeX website</title>
</bookmark>
<bookmark href="http://cm.bell-labs.com/who/hobby/MetaPost.html">
<title>MetaPost website</title>
</bookmark>
<bookmark href="http://pauillac.inria.fr/%7Emaranget/hevea/">
<title>HEVEA is a quite complete and fast LATEX to HTML translator</title>
</bookmark>
</folder>
<folder folded="no">
<title>Portable Document Format (PDF)</title>
<bookmark href="http://www.adobe.com/">
<title>Adobe - The postscript and PDF standards</title>
</bookmark>
<bookmark href="http://partners.adobe.com/asn/developer/technotes/acrobatpdf.html">
<title>Reference Manual Portable Document Format</title>
</bookmark>
<bookmark href="http://partners.adobe.com/asn/developer/acrosdk/main.html">
<title>Adobe Acrobat Software Development Kit</title>
</bookmark>
</folder>
<folder folded="yes">
<title>Literature Sites</title>
<bookmark href="http://www.cc.columbia.edu/cu/libraries/subjects/speccol.html">
<title>Guide to Special Collections (Columbia University)</title>
</bookmark>
<bookmark href="http://www.ipl.org/ref/litcrit/">
<title>Literary Criticism on the Web from the Internet Public Library</title>
</bookmark>
<bookmark href="http://www.victorianweb.org/">
<title>Victorian Web.</title>
</bookmark>
<bookmark href="http://vos.ucsb.edu/">
<title>Voice of the Shuttle.</title>
</bookmark>
<bookmark href="http://www.modjourn.brown.edu/">
<title>Modernist Journals Project</title>
</bookmark>
<bookmark href="http://www.poetspath.com">
<title>Museum of American Poetics</title>
</bookmark>
<bookmark href="http://www.english.uiuc.edu/maps/">
<title>Modern American Poetry</title>
</bookmark>
<bookmark href="http://www.findarticles.com/">
<title>FindArticles.com</title>
</bookmark>
<bookmark href="http://www.literaryhistory.com">
<title>Literary History</title>
</bookmark>
<bookmark href="http://www.litencyc.com/LitEncycFrame.htm">
<title>Literary Encyclopedia</title>
</bookmark>
<separator/>
<bookmark href="http://texts.cdlib.org/ucpress/">
<title>The University of California Press</title>
</bookmark>
<bookmark href="http://www.letrs.indiana.edu/web/w/wright2/">
<title>Wright American Fiction, 1851-1875</title>
</bookmark>
<bookmark href="http://docsouth.unc.edu/">
<title>Documenting the American South: Beginnings to 1920</title>
</bookmark>
<bookmark href="http://etext.lib.virginia.edu/eng-on.html">
<title>Electronic Text Center at the University of Virginia</title>
</bookmark>
<bookmark href="http://digital.nypl.org/schomburg/writers_aa19/">
<title>The Schomburg Center for Research in Black Culture</title>
</bookmark>
<bookmark href="http://www.infomotions.com/alex2/">
<title>Alex Catalogue of Electronic Texts.</title>
</bookmark>
</folder>
</xbel>

View File

@ -3,60 +3,42 @@
<xbel version="1.0">
<folder folded="no">
<title>Qt Resources</title>
<folder folded="yes">
<bookmark href="http://qt.io/">
<title>Qt home page</title>
</bookmark>
<bookmark href="https://www.qt.io/partners/">
<title>Qt Partners</title>
<bookmark href="http://partners.trolltech.com/partners/training.html">
<title>Training Partners</title>
</bookmark>
<bookmark href="http://partners.trolltech.com/partners/service.html">
<title>Consultants and System Integrators</title>
</bookmark>
<bookmark href="http://partners.trolltech.com/partners/tech.html">
<title>Technology Partners</title>
</bookmark>
<bookmark href="http://partners.trolltech.com/partners/resellers.html">
<title>Value Added Resellers (VARs)</title>
</bookmark>
</folder>
</bookmark>
<bookmark href="https://www.qt.io/qt-training/">
<title>Training</title>
</bookmark>
<bookmark href="http://doc.qt.io/">
<title>Qt 5 documentation</title>
</bookmark>
<bookmark href="http://qt-project.org/faq/">
<title>Frequently Asked Questions</title>
</bookmark>
<folder folded="yes">
<title>Community Resources</title>
<bookmark href="http://www.qtcentre.org/content/">
<title>Qt Centre</title>
</bookmark>
<bookmark href="http://www.qtforum.org/">
<title>QtForum.org</title>
</bookmark>
<bookmark href="http://www.digitalfanatics.org/projects/qt_tutorial/">
<bookmark href="http://digitalfanatics.org/projects/qt_tutorial/">
<title>The Independent Qt Tutorial</title>
</bookmark>
<bookmark href="http://prog.qt.free.fr/">
<title>French PROG.Qt</title>
</bookmark>
<bookmark href="http://www.qtforum.de/">
<title>German Qt Forum</title>
</bookmark>
<bookmark href="http://www.korone.net/">
<title>Korean Qt Community Site</title>
</bookmark>
<bookmark href="http://prog.org.ru/forum/forum_14.html">
<bookmark href="http://prog.org.ru/">
<title>Russian Qt Forum</title>
</bookmark>
<bookmark href="http://qt4.digitalfanatics.org/">
<title>Digitalfanatics: The QT 4 Resource Center</title>
</bookmark>
<bookmark href="http://www.qtquestions.org/">
<title>QtQuestions</title>
</bookmark>
</folder>
<bookmark href="http://doc.qt.digia.com/qq/">
<title>Qt Quarterly</title>
</bookmark>
<bookmark href="http://qt-project.org/">
<title>qt home page</title>
</bookmark>
<bookmark href="http://doc.qt.digia.com/4.0/">
<title>Qt 4.0 documentation</title>
</bookmark>
<bookmark href="http://qt-project.org/faq/">
<title>Frequently Asked Questions</title>
</bookmark>
</folder>
<folder folded="no">
<title>Online Dictionaries</title>
@ -73,9 +55,6 @@
<title>OneLook Dictionary Search</title>
</bookmark>
<separator/>
<bookmark href="www.iee.et.tu-dresden.de/">
<title>The New English-German Dictionary</title>
</bookmark>
<bookmark href="http://dict.tu-chemnitz.de/">
<title>TU Chemnitz German-English Dictionary</title>
</bookmark>
@ -86,8 +65,5 @@
<bookmark href="http://dictionnaires.atilf.fr/dictionnaires/ACADEMIE/">
<title>Dictionnaire de l'Académie Française</title>
</bookmark>
<bookmark href="http://elsap1.unicaen.fr/cgi-bin/cherches.cgi">
<title>Dictionnaire des synonymes</title>
</bookmark>
</folder>
</xbel>

View File

@ -1,230 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xbel>
<xbel version="1.0">
<folder folded="yes">
<title>Literate Programming</title>
<bookmark href="http://www.vivtek.com/litprog.html">
<title>Synopsis of Literate Programming</title>
</bookmark>
<bookmark href="http://vasc.ri.cmu.edu/old_help/Programming/Literate/literate.html">
<title>Literate Programming: Propaganda and Tools</title>
</bookmark>
<bookmark href="http://www.isy.liu.se/%7Eturbell/litprog/">
<title>Literate Programming by Henrik Turbell</title>
</bookmark>
<bookmark href="http://www.desy.de/user/projects/LitProg.html">
<title>Literate Programming Library</title>
</bookmark>
<bookmark href="http://www.loria.fr/services/tex/english/litte.html">
<title>Literate Programming Basics</title>
</bookmark>
<bookmark href="http://ei.cs.vt.edu/%7Ecs5014/courseNotes/4.LiterateProgramming/literate_prog.html">
<title>Literate Programming Overview</title>
</bookmark>
<bookmark href="http://www.perl.com/pub/a/tchrist/litprog.html">
<title>POD is not Literate Programming</title>
</bookmark>
<bookmark href="http://www.cornellcollege.edu/%7Eltabak/publications/articles/swsafety.html">
<title>Computers That We Can Count On</title>
</bookmark>
<bookmark href="http://www.cs.auc.dk/%7Enormark/litpro/issues-and-problems.html">
<title>Literate Programming - Issues and Problems</title>
</bookmark>
<bookmark href="http://c2.com/cgi/wiki?LiterateProgramming">
<title>Literate Programming - Wiki Pages</title>
</bookmark>
<bookmark href="http://developers.slashdot.org/developers/02/05/19/2216233.shtml">
<title>What is well-commented code?</title>
</bookmark>
<bookmark href="http://liinwww.ira.uka.de/bibliography/SE/litprog.html">
<title>Bibliography on literate programming - A searchable bibliography</title>
</bookmark>
<bookmark href="http://www2.umassd.edu/SWPI/ProcessBibliography/bib-codereading.html">
<title>Program comprehension and code reading bibliography</title>
</bookmark>
<bookmark href="http://www.cs.auc.dk/%7Enormark/elucidative-programming/">
<title>Elucidative Programming</title>
</bookmark>
<bookmark href="http://www.msu.edu/%7Epfaffben/avl/index.html">
<title>AVL Trees (TexiWeb)</title>
</bookmark>
<bookmark href="http://literate-programming.wikiverse.org/">
<title>Literate Programming on Wikiverse</title>
</bookmark>
<bookmark href="http://www.pbrt.org/">
<title>Physically Based Rendering: From Theory to Implementation</title>
</bookmark>
</folder>
<folder folded="no">
<title>Useful C++ Links</title>
<folder folded="no">
<title>STL</title>
<bookmark href="http://www.sgi.com/tech/stl/table_of_contents.html">
<title>STL Reference Documentation</title>
</bookmark>
<bookmark href="http://www.yrl.co.uk/~phil/stl/stl.htmlx">
<title>STL Tutorial</title>
</bookmark>
<bookmark href="http://www.cppreference.com/cpp_stl.html">
<title>STL Reference</title>
</bookmark>
</folder>
<folder folded="no">
<title>Qt</title>
<bookmark href="http://doc.qt.digia.com/2.3/">
<title>Qt 2.3 Reference</title>
</bookmark>
<bookmark href="http://doc.qt.digia.com/3.3/">
<title>Qt 3.3 Reference</title>
</bookmark>
<bookmark href="http://doc.qt.digia.com/4.0/">
<title>Qt 4.0 Reference</title>
</bookmark>
<bookmark href="http://qt-project.org/">
<title>Qt Home Page</title>
</bookmark>
</folder>
<folder folded="yes">
<title>IOStreams</title>
<bookmark href="http://www.cplusplus.com/ref/iostream/index.html">
<title>IO Stream Library</title>
</bookmark>
<bookmark href="http://courses.cs.vt.edu/~cs2604/fall01/binio.html">
<title>Binary I/O</title>
</bookmark>
<bookmark href="http://www.parashift.com/c++-faq-lite/input-output.html">
<title>I/O Stream FAQ</title>
</bookmark>
</folder>
<folder folded="yes">
<title>gdb</title>
<bookmark href="http://www.cs.princeton.edu/~benjasik/gdb/gdbtut.html">
<title>GDB Tutorial</title>
</bookmark>
<bookmark href="http://www.gnu.org/manual/gdb-4.17/html_mono/gdb.html">
<title>Debugging with GDB</title>
</bookmark>
<bookmark href="http://www.cs.washington.edu/orgs/acm/tutorials/dev-in-unix/gdb-refcard.pdf">
<title>GDB Quick Reference Page (PDF) (Handy)</title>
</bookmark>
</folder>
<folder folded="yes">
<title>Classes and Constructors</title>
<bookmark href="http://www.parashift.com/c++-faq-lite/ctors.html">
<title>Constructor FAQ</title>
</bookmark>
<bookmark href="http://www.juicystudio.com/tutorial/cpp/index.html">
<title>Organizing Classes</title>
</bookmark>
</folder>
</folder>
<folder folded="yes">
<title>Software Documentation or System Documentation</title>
<bookmark href="http://www.martinfowler.com/distributedComputing/thud.html">
<title>The Almighty Thud</title>
</bookmark>
<bookmark href="http://msdn.microsoft.com/library/techart/cfr.htm">
<title>Microsoft Coding Techniques and Programming Practices</title>
</bookmark>
<bookmark href="http://www.bearcave.com/software/prog_docs.html">
<title>Software and Documentation</title>
</bookmark>
<bookmark href="http://c2.com/cgi/wiki?TheSourceCodeIsTheDesign">
<title>The Source Code is the Design</title>
</bookmark>
<bookmark href="http://www.bleading-edge.com/Publications/C++Journal/Cpjour2.htm">
<title>What is Software Design?</title>
</bookmark>
<bookmark href="http://www.mindprod.com/unmain.html">
<title>How To Write Unmaintainable Code</title>
</bookmark>
<bookmark href="http://www.idinews.com/selfDoc.html">
<title>Self Documenting Program Code Remains a Distant Goal</title>
</bookmark>
<bookmark href="http://www.sdmagazine.com/documents/s=730/sdm0106m/0106m.htm">
<title>Place Tab A in Slot B</title>
</bookmark>
<bookmark href="http://www.holub.com/class/uml/uml.html">
<title>UML Reference Card</title>
</bookmark>
</folder>
<folder folded="yes">
<title>TeX Resources</title>
<bookmark href="http://www.tug.org/">
<title>The TeX User's Group</title>
</bookmark>
<bookmark href="http://www.miktex.org/">
<title>MikTeX website</title>
</bookmark>
<bookmark href="http://cm.bell-labs.com/who/hobby/MetaPost.html">
<title>MetaPost website</title>
</bookmark>
<bookmark href="http://pauillac.inria.fr/%7Emaranget/hevea/">
<title>HEVEA is a quite complete and fast LATEX to HTML translator</title>
</bookmark>
</folder>
<folder folded="no">
<title>Portable Document Format (PDF)</title>
<bookmark href="http://www.adobe.com/">
<title>Adobe - The postscript and PDF standards</title>
</bookmark>
<bookmark href="http://partners.adobe.com/asn/developer/technotes/acrobatpdf.html">
<title>Reference Manual Portable Document Format</title>
</bookmark>
<bookmark href="http://partners.adobe.com/asn/developer/acrosdk/main.html">
<title>Adobe Acrobat Software Development Kit</title>
</bookmark>
</folder>
<folder folded="yes">
<title>Literature Sites</title>
<bookmark href="http://www.cc.columbia.edu/cu/libraries/subjects/speccol.html">
<title>Guide to Special Collections (Columbia University)</title>
</bookmark>
<bookmark href="http://www.ipl.org/ref/litcrit/">
<title>Literary Criticism on the Web from the Internet Public Library</title>
</bookmark>
<bookmark href="http://www.victorianweb.org/">
<title>Victorian Web.</title>
</bookmark>
<bookmark href="http://vos.ucsb.edu/">
<title>Voice of the Shuttle.</title>
</bookmark>
<bookmark href="http://www.modjourn.brown.edu/">
<title>Modernist Journals Project</title>
</bookmark>
<bookmark href="http://www.poetspath.com">
<title>Museum of American Poetics</title>
</bookmark>
<bookmark href="http://www.english.uiuc.edu/maps/">
<title>Modern American Poetry</title>
</bookmark>
<bookmark href="http://www.findarticles.com/">
<title>FindArticles.com</title>
</bookmark>
<bookmark href="http://www.literaryhistory.com">
<title>Literary History</title>
</bookmark>
<bookmark href="http://www.litencyc.com/LitEncycFrame.htm">
<title>Literary Encyclopedia</title>
</bookmark>
<separator/>
<bookmark href="http://texts.cdlib.org/ucpress/">
<title>The University of California Press</title>
</bookmark>
<bookmark href="http://www.letrs.indiana.edu/web/w/wright2/">
<title>Wright American Fiction, 1851-1875</title>
</bookmark>
<bookmark href="http://docsouth.unc.edu/">
<title>Documenting the American South: Beginnings to 1920</title>
</bookmark>
<bookmark href="http://etext.lib.virginia.edu/eng-on.html">
<title>Electronic Text Center at the University of Virginia</title>
</bookmark>
<bookmark href="http://digital.nypl.org/schomburg/writers_aa19/">
<title>The Schomburg Center for Research in Black Culture</title>
</bookmark>
<bookmark href="http://www.infomotions.com/alex2/">
<title>Alex Catalogue of Electronic Texts.</title>
</bookmark>
</folder>
</xbel>

View File

@ -3,60 +3,42 @@
<xbel version="1.0">
<folder folded="no">
<title>Qt Resources</title>
<folder folded="yes">
<bookmark href="http://qt.io/">
<title>Qt home page</title>
</bookmark>
<bookmark href="https://www.qt.io/partners/">
<title>Qt Partners</title>
<bookmark href="http://partners.trolltech.com/partners/training.html">
<title>Training Partners</title>
</bookmark>
<bookmark href="http://partners.trolltech.com/partners/service.html">
<title>Consultants and System Integrators</title>
</bookmark>
<bookmark href="http://partners.trolltech.com/partners/tech.html">
<title>Technology Partners</title>
</bookmark>
<bookmark href="http://partners.trolltech.com/partners/resellers.html">
<title>Value Added Resellers (VARs)</title>
</bookmark>
</folder>
</bookmark>
<bookmark href="https://www.qt.io/qt-training/">
<title>Training</title>
</bookmark>
<bookmark href="http://doc.qt.io/">
<title>Qt 5 documentation</title>
</bookmark>
<bookmark href="http://qt-project.org/faq/">
<title>Frequently Asked Questions</title>
</bookmark>
<folder folded="yes">
<title>Community Resources</title>
<bookmark href="http://www.qtcentre.org/content/">
<title>Qt Centre</title>
</bookmark>
<bookmark href="http://www.qtforum.org/">
<title>QtForum.org</title>
</bookmark>
<bookmark href="http://www.digitalfanatics.org/projects/qt_tutorial/">
<bookmark href="http://digitalfanatics.org/projects/qt_tutorial/">
<title>The Independent Qt Tutorial</title>
</bookmark>
<bookmark href="http://prog.qt.free.fr/">
<title>French PROG.Qt</title>
</bookmark>
<bookmark href="http://www.qtforum.de/">
<title>German Qt Forum</title>
</bookmark>
<bookmark href="http://www.korone.net/">
<title>Korean Qt Community Site</title>
</bookmark>
<bookmark href="http://prog.org.ru/forum/forum_14.html">
<bookmark href="http://prog.org.ru/">
<title>Russian Qt Forum</title>
</bookmark>
<bookmark href="http://qt4.digitalfanatics.org/">
<title>Digitalfanatics: The QT 4 Resource Center</title>
</bookmark>
<bookmark href="http://www.qtquestions.org/">
<title>QtQuestions</title>
</bookmark>
</folder>
<bookmark href="http://doc.qt.digia.com/qq/">
<title>Qt Quarterly</title>
</bookmark>
<bookmark href="http://qt-project.org/">
<title>Qt home page</title>
</bookmark>
<bookmark href="http://doc.qt.digia.com/4.0/">
<title>Qt 4.0 documentation</title>
</bookmark>
<bookmark href="http://qt-project.org/faq/">
<title>Frequently Asked Questions</title>
</bookmark>
</folder>
<folder folded="no">
<title>Online Dictionaries</title>
@ -73,9 +55,6 @@
<title>OneLook Dictionary Search</title>
</bookmark>
<separator/>
<bookmark href="www.iee.et.tu-dresden.de/">
<title>The New English-German Dictionary</title>
</bookmark>
<bookmark href="http://dict.tu-chemnitz.de/">
<title>TU Chemnitz German-English Dictionary</title>
</bookmark>
@ -86,8 +65,5 @@
<bookmark href="http://dictionnaires.atilf.fr/dictionnaires/ACADEMIE/">
<title>Dictionnaire de l'Académie Française</title>
</bookmark>
<bookmark href="http://elsap1.unicaen.fr/cgi-bin/cherches.cgi">
<title>Dictionnaire des synonymes</title>
</bookmark>
</folder>
</xbel>

View File

@ -1,113 +0,0 @@
MAKEFILE_GENERATOR = UNIX
QMAKE_INCREMENTAL_STYLE = sublib
QMAKE_PLATFORM += android
include(linux.conf)
include(gcc-base-unix.conf)
QT_QPA_DEFAULT_PLATFORM = minimal
NDK_ROOT = $$(ANDROID_NDK_ROOT)
isEmpty(NDK_ROOT): error("$ANDROID_NDK_ROOT is empty, please set it to something like ~/android/ndk-r7c")
NDK_HOST = $$(ANDROID_NDK_HOST)
isEmpty(NDK_HOST): error("$ANDROID_NDK_HOST is empty, please set it to something like linux-x86 or darwin-x86")
ANDROID_PLATFORM = $$(ANDROID_NDK_PLATFORM)
isEmpty(ANDROID_PLATFORM): ANDROID_PLATFORM = android-5
NDK_TOOLCHAIN_VERSION = $$(ANDROID_NDK_TOOLCHAIN_VERSION)
isEmpty(NDK_TOOLCHAIN_VERSION): NDK_TOOLCHAIN_VERSION = 4.4.3
!contains(NDK_TOOLCHAIN_VERSION, 4.4.3): ANDROID_CXXSTL_SUFFIX = -$$NDK_TOOLCHAIN_VERSION
NDK_TOOLCHAIN = $$ANDROID_NDK_TOOLCHAIN_PREFIX-$$NDK_TOOLCHAIN_VERSION
NDK_TOOLCHAIN_PATH = $$NDK_ROOT/toolchains/$$NDK_TOOLCHAIN/prebuilt/$$NDK_HOST
CONFIG += $$ANDROID_PLATFORM $$ANDROID_TARGET_ARCH
ANDROID_PLATFORM_ROOT_PATH = $$NDK_ROOT/platforms/$$ANDROID_PLATFORM/arch-$$ANDROID_ARCHITECTURE/
ANDROID_PLATFORM_PATH = $$ANDROID_PLATFORM_ROOT_PATH/usr
# used to compile platform plugins for android-4 and android-5
QMAKE_ANDROID_PLATFORM_INCDIR = $$NDK_ROOT/platforms/$$ANDROID_PLATFORM/arch-$$ANDROID_ARCHITECTURE/usr/include
QMAKE_ANDROID_PLATFORM_LIBDIR = $$NDK_ROOT/platforms/$$ANDROID_PLATFORM/arch-$$ANDROID_ARCHITECTURE/usr/lib
ANDROID_SOURCES_CXX_STL_LIBDIR = $$NDK_ROOT/sources/cxx-stl$$ANDROID_CXXSTL_SUFFIX/gnu-libstdc++/libs/$$ANDROID_TARGET_ARCH
ANDROID_SOURCES_CXX_STL_INCDIR = $$NDK_ROOT/sources/cxx-stl$$ANDROID_CXXSTL_SUFFIX/gnu-libstdc++/include $$ANDROID_SOURCES_CXX_STL_LIBDIR/include
# modifications to g++.conf
QMAKE_CC = $$NDK_TOOLCHAIN_PATH/bin/$$ANDROID_NDK_TOOLS_PREFIX-gcc
QMAKE_CFLAGS_WARN_ON = -Wall -Wextra
QMAKE_CFLAGS_WARN_OFF = -Wno-psabi
QMAKE_CFLAGS_SHLIB = -fPIC
QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
QMAKE_CFLAGS_THREAD = -D_REENTRANT
QMAKE_CFLAGS_HIDESYMS = -fvisibility=hidden
QMAKE_CXX = $$NDK_TOOLCHAIN_PATH/bin/$$ANDROID_NDK_TOOLS_PREFIX-g++
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
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_YACC = $$QMAKE_CFLAGS_YACC
QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
QMAKE_CXXFLAGS_HIDESYMS = $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden
QMAKE_LINK = $$QMAKE_CXX
QMAKE_LINK_SHLIB = $$QMAKE_LINK
# modifications to linux.conf
QMAKE_AR = $$NDK_TOOLCHAIN_PATH/bin/$$ANDROID_NDK_TOOLS_PREFIX-ar cqs
QMAKE_OBJCOPY = $$NDK_TOOLCHAIN_PATH/bin/$$ANDROID_NDK_TOOLS_PREFIX-objcopy
QMAKE_NM = $$NDK_TOOLCHAIN_PATH/bin/$$ANDROID_NDK_TOOLS_PREFIX-nm -P
QMAKE_STRIP = $$NDK_TOOLCHAIN_PATH/bin/$$ANDROID_NDK_TOOLS_PREFIX-strip
QMAKE_RANLIB = $$NDK_TOOLCHAIN_PATH/bin/$$ANDROID_NDK_TOOLS_PREFIX-ranlib
QMAKE_INCDIR = $$ANDROID_PLATFORM_PATH/include $$ANDROID_SOURCES_CXX_STL_INCDIR
QMAKE_LIBDIR = $$ANDROID_SOURCES_CXX_STL_LIBDIR $$ANDROID_PLATFORM_PATH/lib
QMAKE_INCDIR_X11 =
QMAKE_LIBDIR_X11 =
QMAKE_INCDIR_OPENGL =
QMAKE_INCDIR_OPENGL_ES2 =
QMAKE_LIBDIR_OPENGL_ES2 =
contains(ANDROID_TARGET_ARCH, x86): LIBGCC_PATH_FULL = $$system($$QMAKE_CC -print-libgcc-file-name)
else: LIBGCC_PATH_FULL = $$system($$QMAKE_CC -mthumb-interwork -print-libgcc-file-name)
QMAKE_LINK = $$QMAKE_CXX
QMAKE_LINK_SHLIB = $$QMAKE_CXX
QMAKE_LFLAGS = --sysroot=$$ANDROID_PLATFORM_ROOT_PATH -L$$dirname(LIBGCC_PATH_FULL) -Wl,-rpath-link=$$ANDROID_PLATFORM_PATH/lib
QMAKE_LFLAGS_APP =
QMAKE_LFLAGS_SHLIB = -Wl,--no-undefined -Wl,-z,noexecstack -shared
contains(NDK_ROOT, ".*r[56].*") {
!contains(ANDROID_PLATFORM, ".*android-[458].*") {
message("Your NDK-version is out-dated. A work-around is enabled. Consider updating your NDK (workarounds are required until r6(a))")
QMAKE_LFLAGS_SHLIB += $$ANDROID_PLATFORM_PATH/lib/crtbegin_so.o $$ANDROID_PLATFORM_PATH/lib/crtend_so.o
}
}
QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
QMAKE_LFLAGS_SONAME =
QMAKE_LFLAGS_NOUNDEF = -Wl,--no-undefined
QMAKE_LFLAGS_RPATH = -Wl,-rpath=
# TODO: -lgnustl_static was -lstdc++, but that leads to undefined reference to
# std::__throw_bad_alloc during configure.
QMAKE_LIBS = -lsupc++ -llog -lz -lm -ldl -lc -lgcc -lgnustl_static
QMAKE_LIBS_X11 =
QMAKE_LIBS_X11SM =
QMAKE_LIBS_QT_THREAD =
QMAKE_LIBS_QT_OPENGL =
QMAKE_LIBS_QTOPIA =
QMAKE_LIBS_THREAD =
QMAKE_LIBS_OPENGL =
QMAKE_LIBS_OPENGL_ES2 = -lGLESv2 $$QMAKE_LIBS
load(qt_config)

View File

@ -1,5 +1,12 @@
# Ensure that a cache is present. If none was found on startup, this will create
# one in the build directory of the project which loads this feature.
cache()
load(configure_base)
QMAKE_CONFIG_LOG = $$dirname(_QMAKE_CACHE_)/config.log
recheck: write_file($$QMAKE_CONFIG_LOG, "")
isEmpty(QMAKE_CONFIG_TESTS_DIR): QMAKE_CONFIG_TESTS_DIR = $$_PRO_FILE_PWD_/config.tests
# Try to build the test project in $$QMAKE_CONFIG_TESTS_DIR/$$1
@ -25,7 +32,7 @@ defineTest(qtCompileTest) {
test_dir = $$QMAKE_CONFIG_TESTS_DIR/$$1
test_out_dir = $$shadowed($$test_dir)
test_cmd_base = "cd $$system_quote($$system_path($$test_out_dir)) &&"
test_cmd_base = "$$QMAKE_CD $$system_quote($$system_path($$test_out_dir)) &&"
# Disable qmake features which are typically counterproductive for tests
qmake_configs = "\"CONFIG -= qt debug_and_release app_bundle lib_bundle\""

View File

@ -33,7 +33,10 @@ defineTest(qtRunLoggedCommand) {
qtLog("+ $$1")
output = $$system("( $$1 ) 2>&1", lines, result)
qtLog($$output)
lg =
for (l, output): \
lg += "> $$l"
qtLog($$lg)
!isEmpty(2) {
$$2 = $$output
export($$2)
@ -42,10 +45,3 @@ defineTest(qtRunLoggedCommand) {
!equals(result, 0): return(false)
return(true)
}
# Ensure that a cache is present. If none was found on startup, this will create
# one in the build directory of the project which loads this feature.
cache()
QMAKE_CONFIG_LOG = $$dirname(_QMAKE_CACHE_)/config.log
write_file($$QMAKE_CONFIG_LOG, "")

View File

@ -86,7 +86,7 @@ for (MODULE_UNDER_TEST, CMAKE_QT_MODULES_UNDER_TEST) {
CMAKE_MODULES_UNDER_TEST = $$join(CMAKE_MODULES_UNDER_TEST, ;)
check.commands = \
$(MKDIR) $$BUILD_DIR && cd $$BUILD_DIR && \
$(MKDIR) $$BUILD_DIR && $$QMAKE_CD $$BUILD_DIR && \
cmake $$CMAKE_TEST_LOCATION $$CMAKE_GENERATOR \
-DCMAKE_C_COMPILER=$$QMAKE_CC \
-DCMAKE_CXX_COMPILER=$$QMAKE_CXX \

View File

@ -5,6 +5,7 @@
{
lex.name = Lex ${QMAKE_FILE_IN}
lex.input = LEXSOURCES
lex.dependency_type = TYPE_C
lex_included {
lex.CONFIG += no_link
} else {

View File

@ -65,7 +65,7 @@
actool_output_files = $$system(\
mkdir -p $$system_quote($$QMAKE_ASSET_CATALOGS_BUILD_PATH) && \
/usr/libexec/PlistBuddy -c \'Print :com.apple.actool.compilation-results:output-files\' \
/dev/stdin <<< $($${asset_catalog_compiler.commands} 2>/dev/null) | grep \'^ .*$\', lines)
/dev/stdin <<< $($${asset_catalog_compiler.commands} 2>/dev/null) | sed -Ene \'s/^ +//p\', lines)
for (output_file, actool_output_files) {
!equals(output_file, $$asset_catalog_compiler.target): \

View File

@ -69,6 +69,9 @@ macx-xcode {
device|!simulator: VALID_ARCHS += $$QMAKE_APPLE_DEVICE_ARCHS
simulator: VALID_ARCHS += $$QMAKE_APPLE_SIMULATOR_ARCHS
isEmpty(VALID_ARCHS): \
error("QMAKE_APPLE_DEVICE_ARCHS or QMAKE_APPLE_SIMULATOR_ARCHS must contain at least one architecture")
single_arch: VALID_ARCHS = $$first(VALID_ARCHS)
ACTIVE_ARCHS = $(filter $(EXPORT_VALID_ARCHS), $(ARCHS))

View File

@ -32,7 +32,7 @@ if(gcc|intel_icl|msvc):!rim_qcc:!uikit:if(!macos|count(QMAKE_APPLE_DEVICE_ARCHS,
gcc: moc_predefs.commands = $$QMAKE_CXX $$QMAKE_CXXFLAGS -dM -E -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_IN}
else:intel_icl: moc_predefs.commands = $$QMAKE_CXX $$QMAKE_CXXFLAGS -QdM -P -Fi${QMAKE_FILE_OUT} ${QMAKE_FILE_IN}
else:msvc {
moc_predefs.commands += $$QMAKE_CXX -Bx$$shell_quote($$shell_path($$[QT_INSTALL_BINS/get]/qmake)) $$QMAKE_CXXFLAGS -E ${QMAKE_FILE_IN} 2>NUL >${QMAKE_FILE_OUT}
moc_predefs.commands += $$QMAKE_CXX -Bx$$QMAKE_QMAKE $$QMAKE_CXXFLAGS -E ${QMAKE_FILE_IN} 2>NUL >${QMAKE_FILE_OUT}
} else: error("Oops, I messed up")
moc_predefs.output = $$MOC_DIR/moc_predefs.h
moc_predefs.input = MOC_PREDEF_FILE

View File

@ -10,14 +10,17 @@ for(ever) {
else: \
libs = $$eval(QMAKE_LIBS_$${nu}_RELEASE)
libs += $$eval(QMAKE_LIBS_$$nu)
libdir = $$eval(QMAKE_LIBDIR_$$nu)
defines = $$eval(QMAKE_DEFINES_$${nu})
includes = $$eval(QMAKE_INCDIR_$${nu})
isEmpty(libs):isEmpty(defines):isEmpty(includes): \
error("Library '$$name' is not defined.")
!contains(use, nolink): \
!contains(use, nolink) {
QMAKE_LIBDIR += $$libdir
LIBS$${suffix} += $$libs
}
!contains(use, linkonly) {
DEFINES += $$defines
INCLUDEPATH += $$includes

View File

@ -324,7 +324,7 @@ defineTest(qtConfParseCommandLine) {
defineReplace(qtConfToolchainSupportsFlag) {
test_out_dir = $$shadowed($$QMAKE_CONFIG_TESTS_DIR)
test_cmd_base = "cd $$system_quote($$system_path($$test_out_dir)) &&"
test_cmd_base = "$$QMAKE_CD $$system_quote($$system_path($$test_out_dir)) &&"
conftest = "int main() { return 0; }"
write_file("$$test_out_dir/conftest.cpp", conftest)|error()
@ -611,9 +611,7 @@ defineTest(qtConfHandleLibrary) {
return()
}
qtLogTestIntro($${lpfx})
msg = "looking for library $${1}"
write_file($$QMAKE_CONFIG_LOG, msg, append)
qtLogTestIntro($${lpfx}, "looking for library $${1}")
result = false
for (s, $${lpfx}.sources._KEYS_) {
@ -649,7 +647,7 @@ defineTest(qtConfHandleLibrary) {
qtLog(" => source accepted.")
$${lpfx}.cache += source
for (v, $$list(libs includes cflags version export)): \
for (v, $$list(libs includedir cflags version export)): \
$${lpfx}.cache += sources.$${s}.$${v}
for (b, $${spfx}.builds._KEYS_): \
$${lpfx}.cache += sources.$${s}.builds.$${b}
@ -677,13 +675,33 @@ defineTest(qtConfTest_library) {
defineTest(qtConfTestPrepare_compile) {
for (u, $$list($$eval($${1}.use))) {
!contains($${currentConfig}.libraries._KEYS_, $$u): \
error("Test $$1 tries to use undeclared library '$$u'")
qtConfHandleLibrary($$u)
lpfx = $${currentConfig}.libraries.$${u}
isEmpty($${lpfx}.source): \
return(false)
$${1}.literal_args += $$qtConfLibraryArgs($${lpfx}.sources.$$eval($${lpfx}.source))
libConfig =
contains($${currentConfig}.libraries._KEYS_, $$u) {
libConfig = $${currentConfig}
qtConfHandleLibrary($$u)
} else {
for (d, QMAKE_CONFIG_DEPS) {
contains($${d}.libraries._KEYS_, $$u) {
libConfig = $$d
break()
}
}
}
isEmpty(libConfig) {
nu = $$upper($$u)
libs = $$eval(QMAKE_LIBS_$$nu) $$eval(QMAKE_LIBS_$${nu}_DEBUG) $$eval(QMAKE_LIBS_$${nu}_RELEASE)
defines = $$eval(QMAKE_DEFINES_$${nu})
includes = $$eval(QMAKE_INCDIR_$${nu})
isEmpty(libs):isEmpty(defines):isEmpty(includes): \
error("Test $$1 tries to use undeclared library '$$u'")
$${1}.literal_args += $$system_quote(QMAKE_USE += $$u)
} else {
lpfx = $${libConfig}.libraries.$${u}
isEmpty($${lpfx}.source): \
return(false)
$${1}.literal_args += $$qtConfLibraryArgs($${lpfx}.sources.$$eval($${lpfx}.source))
}
}
export($${1}.literal_args)
return(true)
@ -698,7 +716,7 @@ defineTest(qtConfTest_compile) {
test_out_dir = $$shadowed($$test_dir)
!isEmpty($${1}.pro): \
test_dir = $$test_dir/$$eval($${1}.pro)
test_cmd_base = "cd $$system_quote($$system_path($$test_out_dir)) &&"
test_cmd_base = "$$QMAKE_CD $$system_quote($$system_path($$test_out_dir)) &&"
qmake_args = $$qtConfPkgConfigEnv()$$system_quote($$system_path($$QMAKE_QMAKE))
!isEmpty(QMAKE_QTCONF): \
@ -798,10 +816,9 @@ defineTest(qtLogTestIntro) {
label = $$eval($${1}.label)
isEmpty(label): return()
msg = "Checking for $${label}... "
log($$msg)
log("Checking for $${label}... ")
$$QMAKE_CONFIG_VERBOSE: log("$$escape_expand(\\n)")
write_file($$QMAKE_CONFIG_LOG, msg, append)
write_file($$QMAKE_CONFIG_LOG, 2, append)
}
defineTest(qtLogTestResult) {
@ -927,9 +944,7 @@ defineTest(qtRunSingleTest) {
qtConfLoadResult($${tpfx}, $$1): \
return()
qtLogTestIntro($${tpfx})
msg = "executing config test $${1}"
write_file($$QMAKE_CONFIG_LOG, msg, append)
qtLogTestIntro($${tpfx}, "executing config test $${1}")
result = false
$${call}($${tpfx}): result = true
@ -941,6 +956,15 @@ defineTest(qtRunSingleTest) {
qtConfSaveResult($${tpfx}, $$1)
}
defineTest(qtConfHaveModule) {
module = $$replace(1, -, _)
!isEmpty(QT.$${module}.skip):$$eval(QT.$${module}.skip): \
return(false)
!isEmpty(QT.$${module}.name): \
return(true)
return(false)
}
defineReplace(qtConfEvaluate) {
isEmpty(1): return(true)
@ -1024,6 +1048,10 @@ defineReplace(qtConfEvaluateSingleExpression) {
var = $$replace(e, "^config\.", "")
result = false
contains(CONFIG, $$var): result = true
} else: contains(e, "^module\..*") {
var = $$replace(e, "^module\.", "")
result = false
qtConfHaveModule($$var): result = true
} else: contains(e, "^arch\..*") {
var = $$replace(e, "^arch\.", "")
result = false
@ -1186,12 +1214,23 @@ defineTest(qtConfCheckFeature) {
$${fpfx}.available = $$result
export($${fpfx}.available)
for (i, $${currentConfig}.features.$${feature}.output._KEYS_): \
qtConfProcessOneOutput($$feature, $$i)
for (i, $${fpfx}.output._KEYS_): \
qtConfProcessOneOutput($${1}, $$i)
return(true)
}
defineTest(qtConfCheckModuleCondition) {
QT.$${currentModule}.skip = false
!$$qtConfEvaluate($$eval($${currentConfig}.condition)): \
QT.$${currentModule}.skip = true
export(QT.$${currentModule}.skip)
# ensure qtConfHaveModule() works
QT.$${currentModule}.name = -
export(QT.$${currentModule}.name)
}
defineTest(qtConfProcessFeatures) {
for (feature, $${currentConfig}.features._KEYS_): \
@ -1556,9 +1595,6 @@ defineTest(qtConfOutput_publicFeature) {
}
}
# currently this is somewhat inconsistent, as the feature is output to the public pro file,
# whereas the define is being added to the private pro file.
# This should get cleaned up to add to the private pro and header instead.
defineTest(qtConfOutput_privateFeature) {
name = "$$eval($${1}.name)"
isEmpty(name): \
@ -1640,13 +1676,17 @@ defineTest(qtConfProcessOutput) {
}
}
ppScope =
!isEmpty(module): ppScope = $${module}_
defined(qtConfOutputPostProcess_$${ppScope}$${type}, test): \
qtConfOutputPostProcess_$${ppScope}$${type}()
content = $$eval($${currentConfig}.output.$${type})
!isEmpty(module): \
call = qtConfOutputPostProcess_$${module}_$${type}
else: \
call = qtConfOutputPostProcess_$${type}
defined($$call, replace): \
eval(content = \$\$"$$call"(\$\$content))
file = $$eval($${currentConfig}.files.$${type})
fileCont.$$file += $$eval($${currentConfig}.output.$${type})
fileCont.$$file += $$content
fileCont._KEYS_ *= $$file
}
@ -1737,6 +1777,10 @@ equals(QMAKE_CONFIG_CACHE_USE, none) {
write_file($$QMAKE_CONFIG_CACHE, cont)
}
QMAKE_CONFIG_LOG = $$OUT_PWD/config.log
!equals(QMAKE_CONFIG_CACHE_USE, all): \
write_file($$QMAKE_CONFIG_LOG, "")
for (currentConfig, allConfigs) {
qtConfSetModuleName()
qtConfSetupModuleOutputs()
@ -1768,15 +1812,28 @@ for (currentConfig, allConfigs) {
}
}
# process all features
qtConfProcessFeatures()
qtConfCheckModuleCondition()
qtConfHaveModule($$currentModule) {
# process all features
qtConfProcessFeatures()
} else {
qtConfOutputVar(assign, "privatePro", "QT.$${currentModule}.skip", "true")
}
# generate files and reports
qtConfProcessOutput()
qtConfCreateReport()
qtConfCreateSummary()
qtConfHaveModule($$currentModule) {
qtConfCreateReport()
qtConfCreateSummary()
} else {
QT_CONFIGURE_SKIPPED_MODULES += " $$currentModule"
}
}
!isEmpty(QT_CONFIGURE_SKIPPED_MODULES): \
qtConfAddNote("The following modules are not being compiled in this configuration:" $$QT_CONFIGURE_SKIPPED_MODULES)
# these come from the pri files loaded above.
for (p, QMAKE_POST_CONFIGURE): \
eval($$p)

View File

@ -27,6 +27,8 @@ qtConfig(build_all): CONFIG += build_all
DESTDIR = $$MODULE_BASE_OUTDIR/lib
DLLDESTDIR = $$MODULE_BASE_OUTDIR/bin
THE_TARGET = $$qt5LibraryTarget($$TARGET)
!build_pass {
MODULE = $$replace(TARGET, ^qt, )
MODULE_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules/qt_ext_$${MODULE}.pri
@ -35,22 +37,23 @@ DLLDESTDIR = $$MODULE_BASE_OUTDIR/bin
MODULE_PRI_CONT = \
"QMAKE_INCDIR_$${ucmodule} = $$val_escape(MODULE_INCLUDEPATH)" \
"QMAKE_DEFINES_$${ucmodule} = $$val_escape(MODULE_DEFINES)"
MODULE_LIBS = -L$$DESTDIR -l$$TARGET
debug_and_release {
win32: MODULE_DEBUG_LIBS = -L$$DESTDIR -l$${TARGET}d
darwin: MODULE_DEBUG_LIBS = -L$$DESTDIR -l$${TARGET}_debug
MODULE_RELEASE_LIBS = -L$$DESTDIR -l$$TARGET
MODULE_PRI_CONT += \
"QMAKE_LIBS_$${ucmodule}_DEBUG = $$val_escape(MODULE_DEBUG_LIBS)" \
"QMAKE_LIBS_$${ucmodule}_RELEASE = $$val_escape(MODULE_LIBS)"
"QMAKE_LIBS_$${ucmodule}_RELEASE = $$val_escape(MODULE_RELEASE_LIBS)"
} else {
MODULE_LIBS = -L$$DESTDIR -l$$THE_TARGET
MODULE_PRI_CONT += \
"QMAKE_LIBS_$${ucmodule} = $$val_escape(MODULE_LIBS)"
}
write_file($$MODULE_PRI, MODULE_PRI_CONT)|error()
}
TARGET = $$THE_TARGET
# In static builds of Qt, convenience libraries must be installed,
# as in this case they are not linked to the final library/plugin.
installed|if(!not_installed:qtConfig(static)): load(qt_installs)
TARGET = $$qt5LibraryTarget($$TARGET)

View File

@ -18,6 +18,10 @@ exists($$OUT_PWD/qt$${MODULE}-config.pri) {
CONFIG += generated_privates
}
skip = $$eval(QT.$${MODULE}.skip)
isEmpty(skip): skip = false
requires(!$$skip)
# Compile as shared/DLL or static according to the option given to configure
# unless overridden. Host builds are always static
host_build|staticlib: CONFIG += static
@ -64,7 +68,9 @@ load(qt_build_paths)
header_module {
TEMPLATE = aux
CONFIG += force_qt # Needed for the headers_clean tests.
CONFIG += \
force_qt \ # Needed for the headers_clean tests.
qt_no_install_library
} else {
TEMPLATE = lib
}

View File

@ -88,7 +88,7 @@ for (t, tests): \
testdirs = $$unique(testdirs)
for (td, testdirs) {
t = $$basename(td)-distclean
$${t}.commands = -cd $$shell_path($$td) && $(MAKE) distclean
$${t}.commands = -$$QMAKE_CD $$shell_path($$td) && $(MAKE) distclean
QMAKE_EXTRA_TARGETS += $$t
DISTCLEAN_DEPS += $$t
}

View File

@ -67,6 +67,7 @@ equals(MAKEFILE_GENERATOR, MSBUILD) \
|isEmpty(QMAKE_SH) {
QMAKE_ZIP = zip -r -9
QMAKE_CD = cd /d
QMAKE_COPY = copy /y
QMAKE_COPY_FILE = $$QMAKE_COPY
QMAKE_COPY_DIR = xcopy /s /q /y /i
@ -87,6 +88,7 @@ equals(MAKEFILE_GENERATOR, MSBUILD) \
QMAKE_TAR = tar -cf
QMAKE_GZIP = gzip -9f
QMAKE_CD = cd
QMAKE_COPY = cp -f
QMAKE_COPY_FILE = $$QMAKE_COPY
QMAKE_COPY_DIR = $$QMAKE_COPY -R

View File

@ -52,7 +52,7 @@ unix {
$${type}.commands += $(TESTARGS)
!isEmpty(TESTRUN_CWD):!contains(TESTRUN_CWD, ^\\./?): \
$${type}.commands = cd $$shell_path($$TESTRUN_CWD) && $$eval($${type}.commands)
$${type}.commands = $$QMAKE_CD $$shell_path($$TESTRUN_CWD) && $$eval($${type}.commands)
# If the test is marked as insignificant, discard the exit code
insignificant_test: $${type}.commands = -$$eval($${type}.commands)

View File

@ -27,7 +27,7 @@ for(arg, QMAKE_ARGS) {
cmd = "$$QMAKE_QMAKE $$system_quote($$_PRO_FILE_) -spec macx-xcode $$args"
debug(1, "Generating Xcode project in $$OUT_PWD using '$$cmd'")
system("cd $$system_quote($$OUT_PWD) && $$cmd")
system("$$QMAKE_CD $$system_quote($$OUT_PWD) && $$cmd")
# Subtargets

View File

@ -35,6 +35,7 @@
yacc_impl.name = source for ${QMAKE_FILE_IN}
yacc_impl.input = YACCSOURCES
yacc_impl.variable_out = GENERATED_SOURCES
yacc_impl.dependency_type = TYPE_C
yacc_impl.commands = $$escape_expand(\\n) # We don't want any commands where, but if command is empty no rules are created
yacc_impl.depends += $${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}$${QMAKE_MOD_YACC}$${first(QMAKE_EXT_H)} # Make sure we depend on the step above
yacc_impl.output = $${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}$${QMAKE_MOD_YACC}$${first(QMAKE_EXT_CPP)} # Faked output from this step, output really created in step above

View File

@ -0,0 +1,9 @@
load(default_post)
!xcodebuild:equals(TEMPLATE, app):!isEmpty(QMAKE_INFO_PLIST) {
# Only link in photo library support if Info.plist contains
# NSPhotoLibraryUsageDescription. Otherwise it will be rejected from AppStore.
plist_path = $$absolute_path($$QMAKE_INFO_PLIST, $$_PRO_FILE_PWD_)
system("/usr/libexec/PlistBuddy -c 'Print NSPhotoLibraryUsageDescription' $$system_quote($$plist_path) &>/dev/null"): \
QTPLUGIN += qiosnsphotolibrarysupport
}

View File

@ -53,7 +53,6 @@ CXXFLAGS = $(CFLAGS)
LFLAGS =
LIBS = ole32.lib advapi32.lib shell32.lib
LINKQMAKE = $(LINKER) $(LFLAGS) -OUT:qmake.exe $(OBJS) $(QTOBJS) $(LIBS)
ADDCLEAN = qmake.pdb qmake.ilk
#qmake code
@ -132,11 +131,10 @@ QTOBJS= \
qjsonobject.obj \
qjsonvalue.obj
first all: qmake.exe
first all: $(BUILD_PATH)\bin\qmake.exe
qmake.exe: $(OBJS) $(QTOBJS)
$(LINKQMAKE) $(PCH_OBJECT)
-copy qmake.exe $(BUILD_PATH)\bin\qmake.exe
$(BUILD_PATH)\bin\qmake.exe: $(OBJS) $(QTOBJS)
$(LINKER) $(LFLAGS) /OUT:$(BUILD_PATH)\bin\qmake.exe $(OBJS) $(QTOBJS) $(PCH_OBJECT) $(LIBS)
clean::
-del $(QTOBJS)
@ -148,7 +146,6 @@ clean::
-del qmake.tds
distclean:: clean
-del qmake.exe
-del $(BUILD_PATH)\bin\qmake.exe
-del Makefile

View File

@ -2595,6 +2595,10 @@
\li capabilities_device
\li Specifies device capabilities to add to the capability list
(location, webcam, and so on).
\row
\li CONFIG
\li Specifies additional flags for processing the input manifest file.
Currently, \c{verbatim} is the only available option.
\row
\li default_language
\li The default language code of the application. Defaults to "en".
@ -2727,6 +2731,14 @@
WINRT_MANIFEST = someManifest.xml.in
\endcode
In case the input manifest file should not be processed and only copied to
the target directory, the verbatim configuration needs to be set.
\code
WINRT_MANIFEST = someManifest.xml.in
WINRT_MANIFEST.CONFIG += verbatim
\endcode
\note The required image sizes of \e logo_small, \e logo_medium, and \e logo_large
depend on the target platform. The general descriptions are overwritten if a
description that specifies the size is provided.
@ -3006,10 +3018,13 @@
sum = $$num_add($$first, $$second_neg)
\endcode
\section2 prompt(question)
\section2 prompt(question [, decorate])
Displays the specified \c question, and returns a value read from stdin.
If \c decorate is \e true (the default), the question gets a generic
prefix and suffix identifying it as a prompt.
\section2 quote(string)
Converts a whole \c string into a single entity and returns the result.

View File

@ -2623,8 +2623,8 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT
for (ProStringList::ConstIterator dep_it = deplist.begin(); dep_it != deplist.end(); ++dep_it) {
QString dep = var(ProKey(*dep_it + ".target"));
if(dep.isEmpty())
dep = Option::fixPathToTargetOS((*dep_it).toQString(), false);
deps += ' ' + escapeDependencyPath(dep);
dep = (*dep_it).toQString();
deps += ' ' + escapeDependencyPath(Option::fixPathToTargetOS(dep, false));
}
if (config.indexOf("recursive") != -1) {
QSet<QString> recurse;
@ -2690,7 +2690,7 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT
}
if (config.indexOf("phony") != -1)
deps += " FORCE";
t << targ << ":" << deps << "\n";
t << escapeDependencyPath(Option::fixPathToTargetOS(targ, false)) << ":" << deps << "\n";
if(!cmd.isEmpty())
t << "\t" << cmd << endl;
}

View File

@ -1158,6 +1158,21 @@ static inline QString toString(subSystemOption option)
return QString();
}
static inline QString toString(triState genDebugInfo, linkerDebugOption option)
{
switch (genDebugInfo) {
case unset:
break;
case _False:
return "false";
case _True:
if (option == linkerDebugOptionFastLink)
return "DebugFastLink";
return "true";
}
return QString();
}
static inline QString toString(machineTypeOption option)
{
switch (option) {
@ -1536,7 +1551,7 @@ void VCXProjectWriter::write(XmlOutput &xml, const VCLinkerTool &tool)
<< attrTagS(_EntryPointSymbol, tool.EntryPointSymbol)
<< attrTagX(_ForceSymbolReferences, tool.ForceSymbolReferences, ";")
<< attrTagS(_FunctionOrder, tool.FunctionOrder)
<< attrTagT(_GenerateDebugInformation, tool.GenerateDebugInformation)
<< attrTagS(_GenerateDebugInformation, toString(tool.GenerateDebugInformation, tool.DebugInfoOption))
<< attrTagT(_GenerateManifest, tool.GenerateManifest)
<< attrTagT(_GenerateWindowsMetadata, tool.GenerateWindowsMetadata)
<< attrTagS(_WindowsMetadataFile, tool.GenerateWindowsMetadata == _True ? tool.WindowsMetadataFile : QString())

View File

@ -1454,8 +1454,10 @@ bool VCLinkerTool::parseOption(const char* option)
}else
EnableUAC = _True;
break;
case 0x3389797: // /DEBUG
case 0x3389797: // /DEBUG[:FASTLINK]
GenerateDebugInformation = _True;
if (config->CompilerVersion >= NET2015 && strcmp(option + 7, "FASTLINK") == 0)
DebugInfoOption = linkerDebugOptionFastLink;
break;
case 0x0033896: // /DEF:filename
ModuleDefinitionFile = option+5;

View File

@ -278,6 +278,10 @@ enum inlineExpansionOption {
expandAnySuitable,
expandDefault // Not useful number, but stops the output
};
enum linkerDebugOption {
linkerDebugOptionNone,
linkerDebugOptionFastLink
};
enum linkIncrementalType {
linkIncrementalDefault,
linkIncrementalNo,
@ -591,6 +595,7 @@ public:
QStringList ForceSymbolReferences;
QString FunctionOrder;
triState GenerateDebugInformation;
linkerDebugOption DebugInfoOption;
triState GenerateMapFile;
qlonglong HeapCommitSize;
qlonglong HeapReserveSize;

View File

@ -396,14 +396,47 @@ static void addJsonValue(const QJsonValue &value, const QString &keyPrefix, ProV
}
}
struct ErrorPosition {
int line;
int column;
};
static ErrorPosition calculateErrorPosition(const QByteArray &json, int offset)
{
ErrorPosition pos = { 0, 0 };
offset--; // offset is 1-based, switching to 0-based
for (int i = 0; i < offset; ++i) {
switch (json.at(i)) {
case '\n':
pos.line++;
pos.column = 0;
break;
case '\r':
break;
case '\t':
pos.column = (pos.column + 8) & ~7;
break;
default:
pos.column++;
break;
}
}
// Lines and columns in text editors are 1-based:
pos.line++;
pos.column++;
return pos;
}
QMakeEvaluator::VisitReturn QMakeEvaluator::parseJsonInto(const QByteArray &json, const QString &into, ProValueMap *value)
{
QJsonParseError error;
QJsonDocument document = QJsonDocument::fromJson(json, &error);
if (document.isNull()) {
if (error.error != QJsonParseError::NoError)
evalError(fL1S("Error parsing json at offset %1: %2")
.arg(error.offset).arg(error.errorString()));
if (error.error != QJsonParseError::NoError) {
ErrorPosition errorPos = calculateErrorPosition(json, error.offset);
evalError(fL1S("Error parsing JSON at %1:%2: %3")
.arg(errorPos.line).arg(errorPos.column).arg(error.errorString()));
}
return QMakeEvaluator::ReturnFalse;
}
@ -545,8 +578,7 @@ ProStringList QMakeEvaluator::evaluateBuiltinExpand(
int end = -1;
if (func_t == E_SECTION) {
if (args.count() != 3 && args.count() != 4) {
evalError(fL1S("%1(var) section(var, sep, begin, end) requires"
" three or four arguments.").arg(func.toQString(m_tmp1)));
evalError(fL1S("section(var, sep, begin, end) requires three or four arguments."));
} else {
var = args[0];
sep = args.at(1).toQString();
@ -1058,16 +1090,22 @@ ProStringList QMakeEvaluator::evaluateBuiltinExpand(
break;
#ifdef PROEVALUATOR_FULL
case E_PROMPT: {
if (args.count() != 1) {
evalError(fL1S("prompt(question) requires one argument."));
if (args.count() != 1 && args.count() != 2) {
evalError(fL1S("prompt(question, [decorate=true]) requires one or two arguments."));
// } else if (currentFileName() == QLatin1String("-")) {
// evalError(fL1S("prompt(question) cannot be used when '-o -' is used"));
} else {
QString msg = m_option->expandEnvVars(args.at(0).toQString(m_tmp1));
if (!msg.endsWith(QLatin1Char('?')))
msg += QLatin1Char('?');
fprintf(stderr, "Project PROMPT: %s ", qPrintable(msg));
bool decorate = true;
if (args.count() == 2)
decorate = isTrue(args.at(1));
if (decorate) {
if (!msg.endsWith(QLatin1Char('?')))
msg += QLatin1Char('?');
fprintf(stderr, "Project PROMPT: %s ", qPrintable(msg));
} else {
fputs(qPrintable(msg), stderr);
}
QFile qfile;
if (qfile.open(stdin, QIODevice::ReadOnly)) {
QTextStream t(&qfile);
@ -1326,7 +1364,23 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinConditional(
}
++vit;
}
for (auto fit = m_functionDefs.testFunctions.begin(); fit != m_functionDefs.testFunctions.end(); ) {
if (fit->pro() == pro)
fit = m_functionDefs.testFunctions.erase(fit);
else
++fit;
}
for (auto fit = m_functionDefs.replaceFunctions.begin(); fit != m_functionDefs.replaceFunctions.end(); ) {
if (fit->pro() == pro)
fit = m_functionDefs.replaceFunctions.erase(fit);
else
++fit;
}
pro->deref();
ProStringList &iif = m_valuemapStack.first()[ProKey("QMAKE_INTERNAL_INCLUDED_FILES")];
int idx = iif.indexOf(ProString(fn));
if (idx >= 0)
iif.removeAt(idx);
return ReturnTrue;
}
case T_INFILE:

View File

@ -313,6 +313,10 @@ Option::init(int argc, char **argv)
if(argc && argv) {
QString argv0 = argv[0];
#ifdef Q_OS_WIN
if (!argv0.endsWith(QLatin1String(".exe"), Qt::CaseInsensitive))
argv0 += QLatin1String(".exe");
#endif
if(Option::qmake_mode == Option::QMAKE_GENERATE_NOTHING)
Option::qmake_mode = default_mode(argv0);
if(!argv0.isEmpty() && !QFileInfo(argv0).isRelative()) {
@ -336,10 +340,6 @@ Option::init(int argc, char **argv)
if ((*p).isEmpty())
continue;
QString candidate = currentDir.absoluteFilePath(*p + QLatin1Char('/') + argv0);
#ifdef Q_OS_WIN
if (!candidate.endsWith(QLatin1String(".exe")))
candidate += QLatin1String(".exe");
#endif
if (QFile::exists(candidate)) {
globals->qmake_abslocation = candidate;
break;

View File

@ -40,7 +40,7 @@
QT_BEGIN_NAMESPACE
#define QMAKE_VERSION_STR "3.0"
#define QMAKE_VERSION_STR "3.1"
QString qmake_getpwd();
bool qmake_setpwd(const QString &p);

View File

@ -41,38 +41,41 @@ static const struct {
const char *name;
QLibraryInfo::LibraryLocation loc;
bool raw;
bool singular;
} propList[] = {
{ "QT_SYSROOT", QLibraryInfo::SysrootPath, true },
{ "QT_INSTALL_PREFIX", QLibraryInfo::PrefixPath, false },
{ "QT_INSTALL_ARCHDATA", QLibraryInfo::ArchDataPath, false },
{ "QT_INSTALL_DATA", QLibraryInfo::DataPath, false },
{ "QT_INSTALL_DOCS", QLibraryInfo::DocumentationPath, false },
{ "QT_INSTALL_HEADERS", QLibraryInfo::HeadersPath, false },
{ "QT_INSTALL_LIBS", QLibraryInfo::LibrariesPath, false },
{ "QT_INSTALL_LIBEXECS", QLibraryInfo::LibraryExecutablesPath, false },
{ "QT_INSTALL_BINS", QLibraryInfo::BinariesPath, false },
{ "QT_INSTALL_TESTS", QLibraryInfo::TestsPath, false },
{ "QT_INSTALL_PLUGINS", QLibraryInfo::PluginsPath, false },
{ "QT_INSTALL_IMPORTS", QLibraryInfo::ImportsPath, false },
{ "QT_INSTALL_QML", QLibraryInfo::Qml2ImportsPath, false },
{ "QT_INSTALL_TRANSLATIONS", QLibraryInfo::TranslationsPath, false },
{ "QT_INSTALL_CONFIGURATION", QLibraryInfo::SettingsPath, false },
{ "QT_INSTALL_EXAMPLES", QLibraryInfo::ExamplesPath, false },
{ "QT_INSTALL_DEMOS", QLibraryInfo::ExamplesPath, false }, // Just backwards compat
{ "QT_HOST_PREFIX", QLibraryInfo::HostPrefixPath, true },
{ "QT_HOST_DATA", QLibraryInfo::HostDataPath, true },
{ "QT_HOST_BINS", QLibraryInfo::HostBinariesPath, true },
{ "QT_HOST_LIBS", QLibraryInfo::HostLibrariesPath, true },
{ "QMAKE_SPEC", QLibraryInfo::HostSpecPath, true },
{ "QMAKE_XSPEC", QLibraryInfo::TargetSpecPath, true },
{ "QT_SYSROOT", QLibraryInfo::SysrootPath, true, true },
{ "QT_INSTALL_PREFIX", QLibraryInfo::PrefixPath, false, false },
{ "QT_INSTALL_ARCHDATA", QLibraryInfo::ArchDataPath, false, false },
{ "QT_INSTALL_DATA", QLibraryInfo::DataPath, false, false },
{ "QT_INSTALL_DOCS", QLibraryInfo::DocumentationPath, false, false },
{ "QT_INSTALL_HEADERS", QLibraryInfo::HeadersPath, false, false },
{ "QT_INSTALL_LIBS", QLibraryInfo::LibrariesPath, false, false },
{ "QT_INSTALL_LIBEXECS", QLibraryInfo::LibraryExecutablesPath, false, false },
{ "QT_INSTALL_BINS", QLibraryInfo::BinariesPath, false, false },
{ "QT_INSTALL_TESTS", QLibraryInfo::TestsPath, false, false },
{ "QT_INSTALL_PLUGINS", QLibraryInfo::PluginsPath, false, false },
{ "QT_INSTALL_IMPORTS", QLibraryInfo::ImportsPath, false, false },
{ "QT_INSTALL_QML", QLibraryInfo::Qml2ImportsPath, false, false },
{ "QT_INSTALL_TRANSLATIONS", QLibraryInfo::TranslationsPath, false, false },
{ "QT_INSTALL_CONFIGURATION", QLibraryInfo::SettingsPath, false, false },
{ "QT_INSTALL_EXAMPLES", QLibraryInfo::ExamplesPath, false, false },
{ "QT_INSTALL_DEMOS", QLibraryInfo::ExamplesPath, false, false }, // Just backwards compat
{ "QT_HOST_PREFIX", QLibraryInfo::HostPrefixPath, true, false },
{ "QT_HOST_DATA", QLibraryInfo::HostDataPath, true, false },
{ "QT_HOST_BINS", QLibraryInfo::HostBinariesPath, true, false },
{ "QT_HOST_LIBS", QLibraryInfo::HostLibrariesPath, true, false },
{ "QMAKE_SPEC", QLibraryInfo::HostSpecPath, true, true },
{ "QMAKE_XSPEC", QLibraryInfo::TargetSpecPath, true, true },
};
QMakeProperty::QMakeProperty() : settings(0)
{
for (unsigned i = 0; i < sizeof(propList)/sizeof(propList[0]); i++) {
QString name = QString::fromLatin1(propList[i].name);
m_values[ProKey(name + "/src")] = QLibraryInfo::rawLocation(propList[i].loc, QLibraryInfo::EffectiveSourcePaths);
m_values[ProKey(name + "/get")] = QLibraryInfo::rawLocation(propList[i].loc, QLibraryInfo::EffectivePaths);
if (!propList[i].singular) {
m_values[ProKey(name + "/src")] = QLibraryInfo::rawLocation(propList[i].loc, QLibraryInfo::EffectiveSourcePaths);
m_values[ProKey(name + "/get")] = QLibraryInfo::rawLocation(propList[i].loc, QLibraryInfo::EffectivePaths);
}
QString val = QLibraryInfo::rawLocation(propList[i].loc, QLibraryInfo::FinalPaths);
if (!propList[i].raw) {
m_values[ProKey(name + "/dev")] = QLibraryInfo::rawLocation(propList[i].loc, QLibraryInfo::DevicePaths);

View File

@ -162,7 +162,7 @@ static ProcessInfo *tryAllocateInSection(Header *header, ProcessInfo entries[],
}
/* there isn't an available entry, undo our increment */
ffd_atomic_add_fetch(&header->busyCount, -1, FFD_ATOMIC_RELAXED);
(void)ffd_atomic_add_fetch(&header->busyCount, -1, FFD_ATOMIC_RELAXED);
return NULL;
}
@ -267,7 +267,7 @@ static void freeInfo(Header *header, ProcessInfo *entry)
entry->deathPipe = -1;
entry->pid = 0;
ffd_atomic_add_fetch(&header->busyCount, -1, FFD_ATOMIC_RELEASE);
(void)ffd_atomic_add_fetch(&header->busyCount, -1, FFD_ATOMIC_RELEASE);
assert(header->busyCount >= 0);
}

View File

@ -59,7 +59,7 @@ HB_BEGIN_HEADER
#endif
#ifndef HB_UNUSED
# define HB_UNUSED(arg) ((arg) = (arg))
# define HB_UNUSED(arg) ((void)(arg))
#endif
#define HB_LIKELY(cond) (cond)

View File

@ -109,6 +109,11 @@
the \l{GNU General Public License, version 2}.
See \l{Qt Licensing} for further details.
Executables on Windows potentially link
against \l{The qtmain Library}. This library is available
under commercial licenses, and in addition under the
\l{BSD 3-clause "New" or "Revised" License}.
Furthermore Qt Core potentially contains third party
modules under following permissive licenses:

View File

@ -102,8 +102,8 @@ public:
// the definition below is too complex for qdoc
typedef int Int;
#else
typedef typename QtPrivate::if_<
QtPrivate::is_unsigned<Enum>::value,
typedef typename std::conditional<
QtPrivate::QIsUnsignedEnum<Enum>::value,
unsigned int,
signed int
>::type Int;

View File

@ -42,6 +42,7 @@
#define QGLOBAL_H
#ifdef __cplusplus
# include <type_traits>
# include <cstddef>
#endif
@ -963,7 +964,7 @@ public:
// - if there was a break inside the inner loop, it will exit with control still
// set to 1; in that case, the outer loop will invert it to 0 and will exit too
#define Q_FOREACH(variable, container) \
for (QForeachContainer<typename QtPrivate::remove_reference<decltype(container)>::type> _container_((container)); \
for (QForeachContainer<typename std::remove_reference<decltype(container)>::type> _container_((container)); \
_container_.control && _container_.i != _container_.e; \
++_container_.i, _container_.control ^= 1) \
for (variable = *_container_.i; _container_.control; _container_.control = 0)

View File

@ -42,22 +42,8 @@
#ifndef QISENUM_H
#define QISENUM_H
#ifndef Q_IS_ENUM
# if defined(Q_CC_GNU) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
# define Q_IS_ENUM(x) __is_enum(x)
# elif defined(Q_CC_MSVC) && defined(_MSC_FULL_VER) && (_MSC_FULL_VER >=140050215)
# define Q_IS_ENUM(x) __is_enum(x)
# elif defined(Q_CC_CLANG)
# if __has_extension(is_enum)
# define Q_IS_ENUM(x) __is_enum(x)
# endif
# endif
#endif
#ifndef Q_IS_ENUM
# include <QtCore/qtypetraits.h>
# define Q_IS_ENUM(x) QtPrivate::is_enum<x>::value
#endif
// Use of Q_IS_ENUM is deprecated since 5.8
#define Q_IS_ENUM(x) std::is_enum<x>::value
// shut up syncqt
QT_BEGIN_NAMESPACE

View File

@ -163,14 +163,14 @@ void QLibrarySettings::load()
QSettings *QLibraryInfoPrivate::findConfiguration()
{
QString qtconfig = QStringLiteral(":/qt/etc/qt.conf");
if (QFile::exists(qtconfig))
return new QSettings(qtconfig, QSettings::IniFormat);
#ifdef QT_BUILD_QMAKE
qtconfig = qmake_libraryInfoFile();
QString qtconfig = qmake_libraryInfoFile();
if (QFile::exists(qtconfig))
return new QSettings(qtconfig, QSettings::IniFormat);
#else
QString qtconfig = QStringLiteral(":/qt/etc/qt.conf");
if (QFile::exists(qtconfig))
return new QSettings(qtconfig, QSettings::IniFormat);
#ifdef Q_OS_DARWIN
CFBundleRef bundleRef = CFBundleGetMainBundle();
if (bundleRef) {
@ -449,6 +449,8 @@ QLibraryInfo::rawLocation(LibraryLocation loc, PathGroup group)
{
#endif // QT_BUILD_QMAKE, started inside location !
QString ret;
bool fromConf = false;
#ifndef QT_NO_SETTINGS
#ifdef QT_BUILD_QMAKE
// Logic for choosing the right data source: if EffectivePaths are requested
// and qt.conf with that section is present, use it, otherwise fall back to
@ -457,40 +459,18 @@ QLibraryInfo::rawLocation(LibraryLocation loc, PathGroup group)
// EffectiveSourcePaths falls back to EffectivePaths.
// DevicePaths falls back to FinalPaths.
PathGroup orig_group = group;
if (!QLibraryInfoPrivate::haveGroup(group)
&& !(group == EffectiveSourcePaths
&& (group = EffectivePaths, QLibraryInfoPrivate::haveGroup(group)))
&& !((group == EffectivePaths || group == DevicePaths)
&& (group = FinalPaths, QLibraryInfoPrivate::haveGroup(group)))
&& (group = orig_group, true))
#elif !defined(QT_NO_SETTINGS)
if (!QLibraryInfoPrivate::configuration())
if (QLibraryInfoPrivate::haveGroup(group)
|| (group == EffectiveSourcePaths
&& (group = EffectivePaths, QLibraryInfoPrivate::haveGroup(group)))
|| ((group == EffectivePaths || group == DevicePaths)
&& (group = FinalPaths, QLibraryInfoPrivate::haveGroup(group)))
|| (group = orig_group, false))
#else
if (QLibraryInfoPrivate::configuration())
#endif
{
const char * volatile path = 0;
if (loc == PrefixPath) {
path =
#ifdef QT_BUILD_QMAKE
(group != DevicePaths) ?
QT_CONFIGURE_EXT_PREFIX_PATH :
#endif
QT_CONFIGURE_PREFIX_PATH;
} else if (unsigned(loc) <= sizeof(qt_configure_str_offsets)/sizeof(qt_configure_str_offsets[0])) {
path = qt_configure_strs + qt_configure_str_offsets[loc - 1];
#ifndef Q_OS_WIN // On Windows we use the registry
} else if (loc == SettingsPath) {
path = QT_CONFIGURE_SETTINGS_PATH;
#endif
#ifdef QT_BUILD_QMAKE
} else if (loc == HostPrefixPath) {
path = QT_CONFIGURE_HOST_PREFIX_PATH;
#endif
}
fromConf = true;
if (path)
ret = QString::fromLocal8Bit(path);
#ifndef QT_NO_SETTINGS
} else {
QString key;
QString defaultValue;
if (unsigned(loc) < sizeof(qtConfEntries)/sizeof(qtConfEntries[0])) {
@ -522,7 +502,9 @@ QLibraryInfo::rawLocation(LibraryLocation loc, PathGroup group)
ret = config->value(QLatin1String(qtConfEntries[PrefixPath].key),
QLatin1String(qtConfEntries[PrefixPath].value)).toString();
else if (loc == TargetSpecPath || loc == HostSpecPath)
ret = QString::fromLocal8Bit(qt_configure_strs + qt_configure_str_offsets[loc - 1]);
fromConf = false;
// The last case here is SysrootPath, which can be legitimately empty.
// All other keys have non-empty fallbacks to start with.
}
#endif
@ -540,7 +522,32 @@ QLibraryInfo::rawLocation(LibraryLocation loc, PathGroup group)
ret = QDir::fromNativeSeparators(ret);
}
}
#endif // QT_NO_SETTINGS
if (!fromConf) {
const char * volatile path = 0;
if (loc == PrefixPath) {
path =
#ifdef QT_BUILD_QMAKE
(group != DevicePaths) ?
QT_CONFIGURE_EXT_PREFIX_PATH :
#endif
QT_CONFIGURE_PREFIX_PATH;
} else if (unsigned(loc) <= sizeof(qt_configure_str_offsets)/sizeof(qt_configure_str_offsets[0])) {
path = qt_configure_strs + qt_configure_str_offsets[loc - 1];
#ifndef Q_OS_WIN // On Windows we use the registry
} else if (loc == SettingsPath) {
path = QT_CONFIGURE_SETTINGS_PATH;
#endif
#ifdef QT_BUILD_QMAKE
} else if (loc == HostPrefixPath) {
path = QT_CONFIGURE_HOST_PREFIX_PATH;
#endif
}
if (path)
ret = QString::fromLocal8Bit(path);
}
#ifdef QT_BUILD_QMAKE

View File

@ -1679,6 +1679,7 @@ public:
QT_Q_ENUM(Orientation)
QT_Q_ENUM(DropAction)
QT_Q_FLAG(Alignment)
QT_Q_ENUM(TextFlag)
QT_Q_FLAG(Orientations)
QT_Q_FLAG(DropActions)
QT_Q_FLAG(Edges)

View File

@ -172,7 +172,7 @@ static inline bool qt_is_finite(float f)
// Unsigned overflow math
//
namespace {
template <typename T> inline typename QtPrivate::QEnableIf<QtPrivate::is_unsigned<T>::value, bool>::Type
template <typename T> inline typename QtPrivate::QEnableIf<std::is_unsigned<T>::value, bool>::Type
add_overflow(T v1, T v2, T *r)
{
// unsigned additions are well-defined
@ -180,7 +180,7 @@ add_overflow(T v1, T v2, T *r)
return v1 > T(v1 + v2);
}
template <typename T> inline typename QtPrivate::QEnableIf<QtPrivate::is_unsigned<T>::value, bool>::Type
template <typename T> inline typename QtPrivate::QEnableIf<std::is_unsigned<T>::value, bool>::Type
mul_overflow(T v1, T v2, T *r)
{
// use the next biggest type

View File

@ -53,6 +53,9 @@
# ifndef _WIN32_WINNT
# define _WIN32_WINNT 0x600
# endif
# ifndef NTDDI_VERSION
# define NTDDI_VERSION 0x06000000
# endif
#endif
#ifndef NOMINMAX

View File

@ -38,8 +38,7 @@
**
****************************************************************************/
#include <QtCore/qtypetraits.h>
#include <QtCore/qisenum.h>
#include <QtCore/qglobal.h>
#ifndef QTYPEINFO_H
#define QTYPEINFO_H
@ -60,10 +59,10 @@ class QTypeInfo
public:
enum {
isPointer = false,
isIntegral = QtPrivate::is_integral<T>::value,
isIntegral = std::is_integral<T>::value,
isComplex = true,
isStatic = true,
isRelocatable = Q_IS_ENUM(T),
isRelocatable = std::is_enum<T>::value,
isLarge = (sizeof(T)>sizeof(void*)),
isDummy = false, //### Qt6: remove
sizeOf = sizeof(T)
@ -247,7 +246,7 @@ public: \
isRelocatable = !isStatic || ((FLAGS) & Q_RELOCATABLE_TYPE), \
isLarge = (sizeof(TYPE)>sizeof(void*)), \
isPointer = false, \
isIntegral = QtPrivate::is_integral< TYPE >::value, \
isIntegral = std::is_integral< TYPE >::value, \
isDummy = (((FLAGS) & Q_DUMMY_TYPE) != 0), \
sizeOf = sizeof(TYPE) \
}; \

View File

@ -37,501 +37,58 @@
**
****************************************************************************/
// BEGIN Google Code
// Copyright (c) 2006, Google Inc.
// All rights reserved.
//
// 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 Google Inc. 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.
// ----
//
// This code is compiled directly on many platforms, including client
// platforms like Windows, Mac, and embedded systems. Before making
// any changes here, make sure that you're not breaking any platforms.
//
// Define a small subset of tr1 type traits. The traits we define are:
// is_integral
// is_floating_point
// is_pointer
// is_enum
// is_reference
// is_const
// is_volatile
// is_pod
// has_trivial_constructor
// has_trivial_copy
// has_trivial_assign
// has_trivial_destructor
// is_signed
// is_unsigned
// remove_const
// remove_volatile
// remove_cv
// remove_reference
// add_reference
// remove_pointer
// is_same
// is_convertible
// We can add more type traits as required.
// Changes from the original implementation:
// - Move base types from template_util.h directly into this header.
// - Use Qt macros for long long type differences on Windows.
// - Enclose in QtPrivate namespace.
#include "QtCore/qglobal.h"
#ifndef QTYPETRAITS_H
#define QTYPETRAITS_H
#include <utility> // For pair
QT_BEGIN_NAMESPACE
namespace QtPrivate {
// Types small_ and big_ are guaranteed such that sizeof(small_) <
// sizeof(big_)
typedef char small_;
struct big_ {
char dummy[2];
};
// Identity metafunction.
template <class T>
struct identity_ {
typedef T type;
};
// integral_constant, defined in tr1, is a wrapper for an integer
// value. We don't really need this generality; we could get away
// with hardcoding the integer type to bool. We use the fully
// general integer_constant for compatibility with tr1.
template<class T, T v>
struct integral_constant {
static const T value = v;
typedef T value_type;
typedef integral_constant<T, v> type;
};
template <class T, T v> const T integral_constant<T, v>::value;
// Abbreviations: true_type and false_type are structs that represent boolean
// true and false values. Also define the boost::mpl versions of those names,
// true_ and false_.
typedef integral_constant<bool, true> true_type;
typedef integral_constant<bool, false> false_type;
typedef true_type true_;
typedef false_type false_;
// if_ is a templatized conditional statement.
// if_<cond, A, B> is a compile time evaluation of cond.
// if_<>::type contains A if cond is true, B otherwise.
template<bool cond, typename A, typename B>
struct if_{
typedef A type;
};
template<typename A, typename B>
struct if_<false, A, B> {
typedef B type;
};
// type_equals_ is a template type comparator, similar to Loki IsSameType.
// type_equals_<A, B>::value is true iff "A" is the same type as "B".
//
// New code should prefer base::is_same, defined in base/type_traits.h.
// It is functionally identical, but is_same is the standard spelling.
template<typename A, typename B>
struct type_equals_ : public false_ {
};
template<typename A>
struct type_equals_<A, A> : public true_ {
};
// and_ is a template && operator.
// and_<A, B>::value evaluates "A::value && B::value".
template<typename A, typename B>
struct and_ : public integral_constant<bool, (A::value && B::value)> {
};
// or_ is a template || operator.
// or_<A, B>::value evaluates "A::value || B::value".
template<typename A, typename B>
struct or_ : public integral_constant<bool, (A::value || B::value)> {
};
template <class T> struct is_integral;
template <class T> struct is_floating_point;
template <class T> struct is_pointer;
// MSVC can't compile this correctly, and neither can gcc 3.3.5 (at least)
#if !defined(_MSC_VER) && !(defined(__GNUC__) && __GNUC__ <= 3)
// is_enum uses is_convertible, which is not available on MSVC.
template <class T> struct is_enum;
#endif
template <class T> struct is_reference;
template <class T> struct is_pod;
template <class T> struct has_trivial_constructor;
template <class T> struct has_trivial_copy;
template <class T> struct has_trivial_assign;
template <class T> struct has_trivial_destructor;
template <class T> struct remove_const;
template <class T> struct remove_volatile;
template <class T> struct remove_cv;
template <class T> struct remove_reference;
template <class T> struct add_reference;
template <class T> struct remove_pointer;
template <class T, class U> struct is_same;
#if !defined(_MSC_VER) && !(defined(__GNUC__) && __GNUC__ <= 3)
template <class From, class To> struct is_convertible;
#endif
// is_integral is false except for the built-in integer types. A
// cv-qualified type is integral if and only if the underlying type is.
template <class T> struct is_integral : false_type { };
template<> struct is_integral<bool> : true_type { };
template<> struct is_integral<char> : true_type { };
template<> struct is_integral<unsigned char> : true_type { };
template<> struct is_integral<signed char> : true_type { };
#if defined(_MSC_VER)
// wchar_t is not by default a distinct type from unsigned short in
// Microsoft C.
// See http://msdn2.microsoft.com/en-us/library/dh8che7s(VS.80).aspx
template<> struct is_integral<__wchar_t> : true_type { };
#else
template<> struct is_integral<wchar_t> : true_type { };
#endif
template<> struct is_integral<short> : true_type { };
template<> struct is_integral<unsigned short> : true_type { };
template<> struct is_integral<int> : true_type { };
template<> struct is_integral<unsigned int> : true_type { };
template<> struct is_integral<long> : true_type { };
template<> struct is_integral<unsigned long> : true_type { };
#if defined(Q_OS_WIN) && !defined(Q_CC_GNU)
template<> struct is_integral<__int64> : true_type { };
template<> struct is_integral<unsigned __int64> : true_type { };
#else
template<> struct is_integral<long long> : true_type { };
template<> struct is_integral<unsigned long long> : true_type { };
#endif
template <class T> struct is_integral<const T> : is_integral<T> { };
template <class T> struct is_integral<volatile T> : is_integral<T> { };
template <class T> struct is_integral<const volatile T> : is_integral<T> { };
#if defined (Q_COMPILER_UNICODE_STRINGS)
template<> struct is_integral<char16_t> : true_type { };
template<> struct is_integral<char32_t> : true_type { };
#endif
// is_floating_point is false except for the built-in floating-point types.
// A cv-qualified type is integral if and only if the underlying type is.
template <class T> struct is_floating_point : false_type { };
template<> struct is_floating_point<float> : true_type { };
template<> struct is_floating_point<double> : true_type { };
template<> struct is_floating_point<long double> : true_type { };
template <class T> struct is_floating_point<const T>
: is_floating_point<T> { };
template <class T> struct is_floating_point<volatile T>
: is_floating_point<T> { };
template <class T> struct is_floating_point<const volatile T>
: is_floating_point<T> { };
// is_pointer is false except for pointer types. A cv-qualified type (e.g.
// "int* const", as opposed to "int const*") is cv-qualified if and only if
// the underlying type is.
template <class T> struct is_pointer : false_type { };
template <class T> struct is_pointer<T*> : true_type { };
template <class T> struct is_pointer<const T> : is_pointer<T> { };
template <class T> struct is_pointer<volatile T> : is_pointer<T> { };
template <class T> struct is_pointer<const volatile T> : is_pointer<T> { };
#if !defined(_MSC_VER) && !(defined(__GNUC__) && __GNUC__ <= 3)
namespace internal {
template <class T> struct is_class_or_union {
template <class U> static small_ tester(void (U::*)());
template <class U> static big_ tester(...);
static const bool value = sizeof(tester<T>(0)) == sizeof(small_);
};
// is_convertible chokes if the first argument is an array. That's why
// we use add_reference here.
template <bool NotUnum, class T> struct is_enum_impl
: is_convertible<typename add_reference<T>::type, int> { };
template <class T> struct is_enum_impl<true, T> : false_type { };
} // namespace internal
// Specified by TR1 [4.5.1] primary type categories.
// Implementation note:
// Define QIsUnsignedEnum, QIsSignedEnum -
// std::is_signed, std::is_unsigned does not work for enum's
//
// Each type is either void, integral, floating point, array, pointer,
// reference, member object pointer, member function pointer, enum,
// union or class. Out of these, only integral, floating point, reference,
// class and enum types are potentially convertible to int. Therefore,
// if a type is not a reference, integral, floating point or class and
// is convertible to int, it's a enum. Adding cv-qualification to a type
// does not change whether it's an enum.
//
// Is-convertible-to-int check is done only if all other checks pass,
// because it can't be used with some types (e.g. void or classes with
// inaccessible conversion operators).
template <class T> struct is_enum
: internal::is_enum_impl<
is_same<T, void>::value ||
is_integral<T>::value ||
is_floating_point<T>::value ||
is_reference<T>::value ||
internal::is_class_or_union<T>::value,
T> { };
template <class T> struct is_enum<const T> : is_enum<T> { };
template <class T> struct is_enum<volatile T> : is_enum<T> { };
template <class T> struct is_enum<const volatile T> : is_enum<T> { };
#endif
// is_reference is false except for reference types.
template<typename T> struct is_reference : false_type {};
template<typename T> struct is_reference<T&> : true_type {};
// Specified by TR1 [4.5.3] Type Properties
template <typename T> struct is_const : false_type {};
template <typename T> struct is_const<const T> : true_type {};
template <typename T> struct is_volatile : false_type {};
template <typename T> struct is_volatile<volatile T> : true_type {};
// We can't get is_pod right without compiler help, so fail conservatively.
// We will assume it's false except for arithmetic types, enumerations,
// pointers and cv-qualified versions thereof. Note that std::pair<T,U>
// is not a POD even if T and U are PODs.
template <class T> struct is_pod
: integral_constant<bool, (is_integral<T>::value ||
is_floating_point<T>::value ||
#if !defined(_MSC_VER) && !(defined(__GNUC__) && __GNUC__ <= 3)
// is_enum is not available on MSVC.
is_enum<T>::value ||
#endif
is_pointer<T>::value)> { };
template <class T> struct is_pod<const T> : is_pod<T> { };
template <class T> struct is_pod<volatile T> : is_pod<T> { };
template <class T> struct is_pod<const volatile T> : is_pod<T> { };
// We can't get has_trivial_constructor right without compiler help, so
// fail conservatively. We will assume it's false except for: (1) types
// for which is_pod is true. (2) std::pair of types with trivial
// constructors. (3) array of a type with a trivial constructor.
// (4) const versions thereof.
template <class T> struct has_trivial_constructor : is_pod<T> { };
template <class T, class U> struct has_trivial_constructor<std::pair<T, U> >
: integral_constant<bool,
(has_trivial_constructor<T>::value &&
has_trivial_constructor<U>::value)> { };
template <class A, int N> struct has_trivial_constructor<A[N]>
: has_trivial_constructor<A> { };
template <class T> struct has_trivial_constructor<const T>
: has_trivial_constructor<T> { };
// We can't get has_trivial_copy right without compiler help, so fail
// conservatively. We will assume it's false except for: (1) types
// for which is_pod is true. (2) std::pair of types with trivial copy
// constructors. (3) array of a type with a trivial copy constructor.
// (4) const versions thereof.
template <class T> struct has_trivial_copy : is_pod<T> { };
template <class T, class U> struct has_trivial_copy<std::pair<T, U> >
: integral_constant<bool,
(has_trivial_copy<T>::value &&
has_trivial_copy<U>::value)> { };
template <class A, int N> struct has_trivial_copy<A[N]>
: has_trivial_copy<A> { };
template <class T> struct has_trivial_copy<const T> : has_trivial_copy<T> { };
// We can't get has_trivial_assign right without compiler help, so fail
// conservatively. We will assume it's false except for: (1) types
// for which is_pod is true. (2) std::pair of types with trivial copy
// constructors. (3) array of a type with a trivial assign constructor.
template <class T> struct has_trivial_assign : is_pod<T> { };
template <class T, class U> struct has_trivial_assign<std::pair<T, U> >
: integral_constant<bool,
(has_trivial_assign<T>::value &&
has_trivial_assign<U>::value)> { };
template <class A, int N> struct has_trivial_assign<A[N]>
: has_trivial_assign<A> { };
// We can't get has_trivial_destructor right without compiler help, so
// fail conservatively. We will assume it's false except for: (1) types
// for which is_pod is true. (2) std::pair of types with trivial
// destructors. (3) array of a type with a trivial destructor.
// (4) const versions thereof.
template <class T> struct has_trivial_destructor : is_pod<T> { };
template <class T, class U> struct has_trivial_destructor<std::pair<T, U> >
: integral_constant<bool,
(has_trivial_destructor<T>::value &&
has_trivial_destructor<U>::value)> { };
template <class A, int N> struct has_trivial_destructor<A[N]>
: has_trivial_destructor<A> { };
template <class T> struct has_trivial_destructor<const T>
: has_trivial_destructor<T> { };
// Specified by TR1 [4.7.1]
template<typename T> struct remove_const { typedef T type; };
template<typename T> struct remove_const<T const> { typedef T type; };
template<typename T> struct remove_volatile { typedef T type; };
template<typename T> struct remove_volatile<T volatile> { typedef T type; };
template<typename T> struct remove_cv {
typedef typename remove_const<typename remove_volatile<T>::type>::type type;
};
// Specified by TR1 [4.7.2] Reference modifications.
template<typename T> struct remove_reference { typedef T type; };
template<typename T> struct remove_reference<T&> { typedef T type; };
template <typename T> struct add_reference { typedef T& type; };
template <typename T> struct add_reference<T&> { typedef T& type; };
// Specified by TR1 [4.7.4] Pointer modifications.
template<typename T> struct remove_pointer { typedef T type; };
template<typename T> struct remove_pointer<T*> { typedef T type; };
template<typename T> struct remove_pointer<T* const> { typedef T type; };
template<typename T> struct remove_pointer<T* volatile> { typedef T type; };
template<typename T> struct remove_pointer<T* const volatile> {
typedef T type; };
// Specified by TR1 [4.6] Relationships between types
template<typename T, typename U> struct is_same : public false_type { };
template<typename T> struct is_same<T, T> : public true_type { };
// Specified by TR1 [4.6] Relationships between types
#if !defined(_MSC_VER) && !(defined(__GNUC__) && __GNUC__ <= 3)
namespace internal {
// This class is an implementation detail for is_convertible, and you
// don't need to know how it works to use is_convertible. For those
// who care: we declare two different functions, one whose argument is
// of type To and one with a variadic argument list. We give them
// return types of different size, so we can use sizeof to trick the
// compiler into telling us which function it would have chosen if we
// had called it with an argument of type From. See Alexandrescu's
// _Modern C++ Design_ for more details on this sort of trick.
template <typename From, typename To>
struct ConvertHelper {
static small_ Test(To);
static big_ Test(...);
static From Create();
};
} // namespace internal
// Inherits from true_type if From is convertible to To, false_type otherwise.
template <typename From, typename To>
struct is_convertible
: integral_constant<bool,
sizeof(internal::ConvertHelper<From, To>::Test(
internal::ConvertHelper<From, To>::Create()))
== sizeof(small_)> {
};
#endif
// END Google Code
// a metafunction to invert an integral_constant:
template <typename T>
struct not_
: integral_constant<bool, !T::value> {};
// same, with a bool argument:
template <bool B>
struct not_c
: integral_constant<bool, !B> {};
: std::integral_constant<bool, !T::value> {};
// Checks whether a type is unsigned (T must be convertible to unsigned int):
template <typename T>
struct is_unsigned
: integral_constant<bool, (T(0) < T(-1))> {};
struct QIsUnsignedEnum
: std::integral_constant<bool, (T(0) < T(-1))> {};
// Checks whether a type is signed (T must be convertible to int):
template <typename T>
struct is_signed
: not_< is_unsigned<T> > {};
struct QIsSignedEnum
: not_< QIsUnsignedEnum<T> > {};
Q_STATIC_ASSERT(( is_unsigned<quint8>::value));
Q_STATIC_ASSERT((!is_unsigned<qint8>::value));
Q_STATIC_ASSERT(( QIsUnsignedEnum<quint8>::value));
Q_STATIC_ASSERT((!QIsUnsignedEnum<qint8>::value));
Q_STATIC_ASSERT((!is_signed<quint8>::value));
Q_STATIC_ASSERT(( is_signed<qint8>::value));
Q_STATIC_ASSERT((!QIsSignedEnum<quint8>::value));
Q_STATIC_ASSERT(( QIsSignedEnum<qint8>::value));
Q_STATIC_ASSERT(( is_unsigned<quint16>::value));
Q_STATIC_ASSERT((!is_unsigned<qint16>::value));
Q_STATIC_ASSERT(( QIsUnsignedEnum<quint16>::value));
Q_STATIC_ASSERT((!QIsUnsignedEnum<qint16>::value));
Q_STATIC_ASSERT((!is_signed<quint16>::value));
Q_STATIC_ASSERT(( is_signed<qint16>::value));
Q_STATIC_ASSERT((!QIsSignedEnum<quint16>::value));
Q_STATIC_ASSERT(( QIsSignedEnum<qint16>::value));
Q_STATIC_ASSERT(( is_unsigned<quint32>::value));
Q_STATIC_ASSERT((!is_unsigned<qint32>::value));
Q_STATIC_ASSERT(( QIsUnsignedEnum<quint32>::value));
Q_STATIC_ASSERT((!QIsUnsignedEnum<qint32>::value));
Q_STATIC_ASSERT((!is_signed<quint32>::value));
Q_STATIC_ASSERT(( is_signed<qint32>::value));
Q_STATIC_ASSERT((!QIsSignedEnum<quint32>::value));
Q_STATIC_ASSERT(( QIsSignedEnum<qint32>::value));
Q_STATIC_ASSERT(( is_unsigned<quint64>::value));
Q_STATIC_ASSERT((!is_unsigned<qint64>::value));
Q_STATIC_ASSERT((!is_signed<quint64>::value));
Q_STATIC_ASSERT(( is_signed<qint64>::value));
template<class T = void> struct is_default_constructible;
template<> struct is_default_constructible<void>
{
protected:
template<bool> struct test { typedef char type; };
public:
static bool const value = false;
};
template<> struct is_default_constructible<>::test<true> { typedef double type; };
template<class T> struct is_default_constructible : is_default_constructible<>
{
private:
template<class U> static typename test<!!sizeof(::new U())>::type sfinae(U*);
template<class U> static char sfinae(...);
public:
static bool const value = sizeof(sfinae<T>(0)) > 1;
};
Q_STATIC_ASSERT(( QIsUnsignedEnum<quint64>::value));
Q_STATIC_ASSERT((!QIsUnsignedEnum<qint64>::value));
Q_STATIC_ASSERT((!QIsSignedEnum<quint64>::value));
Q_STATIC_ASSERT(( QIsSignedEnum<qint64>::value));
} // namespace QtPrivate

View File

@ -222,7 +222,7 @@ bool QFileSystemEngine::fillMetaData(int fd, QFileSystemMetaData &data)
return false;
}
#if defined(QT_EXT_QNX_READDIR_R)
#if defined(_DEXTRA_FIRST)
static void fillStat64fromStat32(struct stat64 *statBuf64, const struct stat &statBuf32)
{
statBuf64->st_mode = statBuf32.st_mode;
@ -308,7 +308,7 @@ void QFileSystemMetaData::fillFromStatBuf(const QT_STATBUF &statBuffer)
void QFileSystemMetaData::fillFromDirEnt(const QT_DIRENT &entry)
{
#if defined(QT_EXT_QNX_READDIR_R)
#if defined(_DEXTRA_FIRST)
knownFlagsMask = 0;
entryFlags = 0;
for (dirent_extra *extra = _DEXTRA_FIRST(&entry); _DEXTRA_VALID(extra, &entry);

View File

@ -93,14 +93,6 @@ private:
#else
QT_DIR *dir;
QT_DIRENT *dirEntry;
#if defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(Q_OS_CYGWIN) || defined(QT_EXT_QNX_READDIR_R)
// for readdir_r
QScopedPointer<QT_DIRENT, QScopedPointerPodDeleter> mt_file;
#if defined(QT_EXT_QNX_READDIR_R)
// for _readdir_r
size_t direntSize;
#endif
#endif
int lastError;
#endif

View File

@ -52,9 +52,6 @@ QFileSystemIterator::QFileSystemIterator(const QFileSystemEntry &entry, QDir::Fi
: nativePath(entry.nativeFilePath())
, dir(0)
, dirEntry(0)
#if defined(Q_OS_QNX) && defined(__EXT_QNX__READDIR_R)
, direntSize(0)
#endif
, lastError(0)
{
Q_UNUSED(filters)
@ -64,32 +61,8 @@ QFileSystemIterator::QFileSystemIterator(const QFileSystemEntry &entry, QDir::Fi
if ((dir = QT_OPENDIR(nativePath.constData())) == 0) {
lastError = errno;
} else {
if (!nativePath.endsWith('/'))
nativePath.append('/');
#if defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(Q_OS_CYGWIN) || defined(QT_EXT_QNX_READDIR_R)
// ### Race condition; we should use fpathconf and dirfd().
size_t maxPathName = ::pathconf(nativePath.constData(), _PC_NAME_MAX);
if (maxPathName == size_t(-1))
maxPathName = FILENAME_MAX;
maxPathName += sizeof(QT_DIRENT) + 1;
QT_DIRENT *p = reinterpret_cast<QT_DIRENT*>(::malloc(maxPathName));
Q_CHECK_PTR(p);
mt_file.reset(p);
#if defined(QT_EXT_QNX_READDIR_R)
direntSize = maxPathName;
// Include extra stat information in the readdir() call (d_stat member of
// dirent_extra_stat). This is used in QFileSystemMetaData::fillFromDirEnt() to
// avoid extra stat() calls when iterating over directories
int flags = dircntl(dir, D_GETFLAG) | D_FLAG_STAT | D_FLAG_FILTER;
if (dircntl(dir, D_SETFLAG, flags) == -1)
lastError = errno;
#endif
#endif
}
}
@ -104,18 +77,7 @@ bool QFileSystemIterator::advance(QFileSystemEntry &fileEntry, QFileSystemMetaDa
if (!dir)
return false;
#if defined(QT_EXT_QNX_READDIR_R)
lastError = QT_EXT_QNX_READDIR_R(dir, mt_file.data(), &dirEntry, direntSize);
if (lastError)
return false;
#elif defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(Q_OS_CYGWIN)
lastError = QT_READDIR_R(dir, mt_file.data(), &dirEntry);
if (lastError)
return false;
#else
// ### add local lock to prevent breaking reentrancy
dirEntry = QT_READDIR(dir);
#endif // _POSIX_THREAD_SAFE_FUNCTIONS
if (dirEntry) {
fileEntry = QFileSystemEntry(nativePath + QByteArray(dirEntry->d_name), QFileSystemEntry::FromNativePath());

View File

@ -47,17 +47,10 @@
#include <qcoreapplication.h>
#endif
const GUID qCLSID_FOLDERID_Downloads = { 0x374de290, 0x123f, 0x4565, { 0x91, 0x64, 0x39, 0xc4, 0x92, 0x5e, 0x46, 0x7b } };
#include <qt_windows.h>
#include <shlobj.h>
#include <intshcut.h>
#ifndef CSIDL_MYMUSIC
#define CSIDL_MYMUSIC 13
#define CSIDL_MYVIDEO 14
#endif
#ifndef QT_NO_STANDARDPATHS
QT_BEGIN_NAMESPACE
@ -108,47 +101,31 @@ static inline void appendTestMode(QString &path)
path += QLatin1String("/qttest");
}
// Map QStandardPaths::StandardLocation to CLSID of SHGetSpecialFolderPath()
static int writableSpecialFolderClsid(QStandardPaths::StandardLocation type)
// Map QStandardPaths::StandardLocation to KNOWNFOLDERID of SHGetKnownFolderPath()
static GUID writableSpecialFolderId(QStandardPaths::StandardLocation type)
{
static const int clsids[] = {
CSIDL_DESKTOPDIRECTORY, // DesktopLocation
CSIDL_PERSONAL, // DocumentsLocation
CSIDL_FONTS, // FontsLocation
CSIDL_PROGRAMS, // ApplicationsLocation
CSIDL_MYMUSIC, // MusicLocation
CSIDL_MYVIDEO, // MoviesLocation
CSIDL_MYPICTURES, // PicturesLocation
-1, -1, // TempLocation/HomeLocation
CSIDL_LOCAL_APPDATA, // AppLocalDataLocation ("Local" path), AppLocalDataLocation = DataLocation
-1, // CacheLocation
CSIDL_LOCAL_APPDATA, // GenericDataLocation ("Local" path)
-1, // RuntimeLocation
CSIDL_LOCAL_APPDATA, // ConfigLocation ("Local" path)
-1, -1, // DownloadLocation/GenericCacheLocation
CSIDL_LOCAL_APPDATA, // GenericConfigLocation ("Local" path)
CSIDL_APPDATA, // AppDataLocation ("Roaming" path)
CSIDL_LOCAL_APPDATA, // AppConfigLocation ("Local" path)
static const GUID folderIds[] = {
FOLDERID_Desktop, // DesktopLocation
FOLDERID_Documents, // DocumentsLocation
FOLDERID_Fonts, // FontsLocation
FOLDERID_Programs, // ApplicationsLocation
FOLDERID_Music, // MusicLocation
FOLDERID_Videos, // MoviesLocation
FOLDERID_Pictures, // PicturesLocation
GUID(), GUID(), // TempLocation/HomeLocation
FOLDERID_LocalAppData, // AppLocalDataLocation ("Local" path), AppLocalDataLocation = DataLocation
GUID(), // CacheLocation
FOLDERID_LocalAppData, // GenericDataLocation ("Local" path)
GUID(), // RuntimeLocation
FOLDERID_LocalAppData, // ConfigLocation ("Local" path)
GUID(), GUID(), // DownloadLocation/GenericCacheLocation
FOLDERID_LocalAppData, // GenericConfigLocation ("Local" path)
FOLDERID_RoamingAppData,// AppDataLocation ("Roaming" path)
FOLDERID_LocalAppData, // AppConfigLocation ("Local" path)
};
Q_STATIC_ASSERT(sizeof(clsids) / sizeof(clsids[0]) == size_t(QStandardPaths::AppConfigLocation + 1));
return size_t(type) < sizeof(clsids) / sizeof(clsids[0]) ? clsids[type] : -1;
};
// Convenience for SHGetSpecialFolderPath().
static QString sHGetSpecialFolderPath(int clsid, QStandardPaths::StandardLocation type, bool warn = false)
{
QString result;
wchar_t path[MAX_PATH];
if (Q_LIKELY(clsid >= 0 && SHGetSpecialFolderPath(0, path, clsid, FALSE))) {
result = convertCharArray(path);
} else {
if (warn) {
qErrnoWarning("SHGetSpecialFolderPath() failed for standard location \"%s\", clsid=0x%x.",
qPrintable(displayName(type)), clsid);
}
}
return result;
Q_STATIC_ASSERT(sizeof(folderIds) / sizeof(folderIds[0]) == size_t(QStandardPaths::AppConfigLocation + 1));
return size_t(type) < sizeof(folderIds) / sizeof(folderIds[0]) ? folderIds[type] : GUID();
}
// Convenience for SHGetKnownFolderPath().
@ -161,7 +138,7 @@ static QString sHGetKnownFolderPath(const GUID &clsid, QStandardPaths::StandardL
reinterpret_cast<GetKnownFolderPath>(QSystemLibrary::resolve(QLatin1String("shell32"), "SHGetKnownFolderPath"));
LPWSTR path;
if (Q_LIKELY(sHGetKnownFolderPath && SUCCEEDED(sHGetKnownFolderPath(clsid, 0, 0, &path)))) {
if (Q_LIKELY(sHGetKnownFolderPath && SUCCEEDED(sHGetKnownFolderPath(clsid, KF_FLAG_DONT_VERIFY, 0, &path)))) {
result = convertCharArray(path);
CoTaskMemFree(path);
} else {
@ -178,7 +155,7 @@ QString QStandardPaths::writableLocation(StandardLocation type)
QString result;
switch (type) {
case DownloadLocation:
result = sHGetKnownFolderPath(qCLSID_FOLDERID_Downloads, type);
result = sHGetKnownFolderPath(FOLDERID_Downloads, type);
if (result.isEmpty())
result = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation);
break;
@ -187,7 +164,7 @@ QString QStandardPaths::writableLocation(StandardLocation type)
// Although Microsoft has a Cache key it is a pointer to IE's cache, not a cache
// location for everyone. Most applications seem to be using a
// cache directory located in their AppData directory
result = sHGetSpecialFolderPath(writableSpecialFolderClsid(AppLocalDataLocation), type, /* warn */ true);
result = sHGetKnownFolderPath(writableSpecialFolderId(AppLocalDataLocation), type, /* warn */ true);
if (!result.isEmpty()) {
appendTestMode(result);
appendOrganizationAndApp(result);
@ -196,7 +173,7 @@ QString QStandardPaths::writableLocation(StandardLocation type)
break;
case GenericCacheLocation:
result = sHGetSpecialFolderPath(writableSpecialFolderClsid(GenericDataLocation), type, /* warn */ true);
result = sHGetKnownFolderPath(writableSpecialFolderId(GenericDataLocation), type, /* warn */ true);
if (!result.isEmpty()) {
appendTestMode(result);
result += QLatin1String("/cache");
@ -213,7 +190,7 @@ QString QStandardPaths::writableLocation(StandardLocation type)
break;
default:
result = sHGetSpecialFolderPath(writableSpecialFolderClsid(type), type, /* warn */ isConfigLocation(type));
result = sHGetKnownFolderPath(writableSpecialFolderId(type), type, /* warn */ isConfigLocation(type));
if (!result.isEmpty() && isConfigLocation(type)) {
appendTestMode(result);
if (!isGenericConfigLocation(type))
@ -233,7 +210,7 @@ QStringList QStandardPaths::standardLocations(StandardLocation type)
// type-specific handling goes here
if (isConfigLocation(type)) {
QString programData = sHGetSpecialFolderPath(CSIDL_COMMON_APPDATA, type);
QString programData = sHGetKnownFolderPath(FOLDERID_ProgramData, type);
if (!programData.isEmpty()) {
if (!isGenericConfigLocation(type))
appendOrganizationAndApp(programData);

View File

@ -410,7 +410,9 @@
#include "qhash.h"
#include "qdir.h" // for QDir::fromNativeSeparators
#include "qdatastream.h"
#if QT_CONFIG(topleveldomain)
#include "qtldurl_p.h"
#endif
#include "private/qipaddress_p.h"
#include "qurlquery.h"

View File

@ -135,10 +135,12 @@ bool Data::valid() const
return false;
bool res = false;
if (header->root()->is_object)
res = static_cast<Object *>(header->root())->isValid();
Base *root = header->root();
int maxSize = alloc - sizeof(Header);
if (root->is_object)
res = static_cast<Object *>(root)->isValid(maxSize);
else
res = static_cast<Array *>(header->root())->isValid();
res = static_cast<Array *>(root)->isValid(maxSize);
return res;
}
@ -223,9 +225,9 @@ int Object::indexOf(QLatin1String key, bool *exists) const
return min;
}
bool Object::isValid() const
bool Object::isValid(int maxSize) const
{
if (tableOffset + length*sizeof(offset) > size)
if (size > (uint)maxSize || tableOffset + length*sizeof(offset) > size)
return false;
QString lastKey;
@ -234,8 +236,7 @@ bool Object::isValid() const
if (entryOffset + sizeof(Entry) >= tableOffset)
return false;
Entry *e = entryAt(i);
int s = e->size();
if (table()[i] + s > tableOffset)
if (!e->isValid(tableOffset - table()[i]))
return false;
QString key = e->key();
if (key < lastKey)
@ -249,9 +250,9 @@ bool Object::isValid() const
bool Array::isValid() const
bool Array::isValid(int maxSize) const
{
if (tableOffset + length*sizeof(offset) > size)
if (size > (uint)maxSize || tableOffset + length*sizeof(offset) > size)
return false;
for (uint i = 0; i < length; ++i) {
@ -359,12 +360,12 @@ bool Value::isValid(const Base *b) const
int s = usedStorage(b);
if (!s)
return true;
if (s < 0 || offset + s > (int)b->tableOffset)
if (s < 0 || s > (int)b->tableOffset - offset)
return false;
if (type == QJsonValue::Array)
return static_cast<Array *>(base(b))->isValid();
return static_cast<Array *>(base(b))->isValid(s);
if (type == QJsonValue::Object)
return static_cast<Object *>(base(b))->isValid();
return static_cast<Object *>(base(b))->isValid(s);
return true;
}

View File

@ -326,12 +326,19 @@ public:
explicit String(const char *data) { d = (Data *)data; }
struct Data {
qle_int length;
qle_uint length;
qle_ushort utf16[1];
};
Data *d;
int byteSize() const { return sizeof(uint) + sizeof(ushort) * d->length; }
bool isValid(int maxSize) const {
// Check byteSize() <= maxSize, avoiding integer overflow
maxSize -= sizeof(uint);
return maxSize >= 0 && uint(d->length) <= maxSize / sizeof(ushort);
}
inline String &operator=(const QString &str)
{
d->length = str.length();
@ -400,11 +407,16 @@ public:
explicit Latin1String(const char *data) { d = (Data *)data; }
struct Data {
qle_short length;
qle_ushort length;
char latin1[1];
};
Data *d;
int byteSize() const { return sizeof(ushort) + sizeof(char)*(d->length); }
bool isValid(int maxSize) const {
return byteSize() <= maxSize;
}
inline Latin1String &operator=(const QString &str)
{
int len = d->length = str.length();
@ -606,7 +618,7 @@ public:
int indexOf(const QString &key, bool *exists) const;
int indexOf(QLatin1String key, bool *exists) const;
bool isValid() const;
bool isValid(int maxSize) const;
};
@ -616,7 +628,7 @@ public:
inline Value at(int i) const;
inline Value &operator [](int i);
bool isValid() const;
bool isValid(int maxSize) const;
};
@ -671,12 +683,12 @@ public:
// key
// value data follows key
int size() const {
uint size() const {
int s = sizeof(Entry);
if (value.latinKey)
s += sizeof(ushort) + qFromLittleEndian(*(ushort *) ((const char *)this + sizeof(Entry)));
s += shallowLatin1Key().byteSize();
else
s += sizeof(uint) + sizeof(ushort)*qFromLittleEndian(*(int *) ((const char *)this + sizeof(Entry)));
s += shallowKey().byteSize();
return alignedSize(s);
}
@ -702,6 +714,15 @@ public:
return shallowKey().toString();
}
bool isValid(int maxSize) const {
if (maxSize < (int)sizeof(Entry))
return false;
maxSize -= sizeof(Entry);
if (value.latinKey)
return shallowLatin1Key().isValid(maxSize);
return shallowKey().isValid(maxSize);
}
bool operator ==(const QString &key) const;
inline bool operator !=(const QString &key) const { return !operator ==(key); }
inline bool operator >=(const QString &key) const;
@ -714,8 +735,6 @@ public:
bool operator >=(const Entry &other) const;
};
inline bool operator!=(const Entry &lhs, const Entry &rhs) { return !(lhs == rhs); }
inline bool Entry::operator >=(const QString &key) const
{
if (value.latinKey)

View File

@ -599,8 +599,8 @@ bool QJsonObject::operator==(const QJsonObject &other) const
for (uint i = 0; i < o->length; ++i) {
QJsonPrivate::Entry *e = o->entryAt(i);
QJsonPrivate::Entry *oe = other.o->entryAt(i);
if (*e != *oe || QJsonValue(d, o, e->value) != QJsonValue(other.d, other.o, oe->value))
QJsonValue v(d, o, e->value);
if (other.value(e->key()) != v)
return false;
}

View File

@ -283,7 +283,6 @@ char Parser::nextToken()
case ValueSeparator:
case EndArray:
case EndObject:
eatSpace();
case Quote:
break;
default:
@ -391,6 +390,8 @@ bool Parser::parseObject()
}
int objectOffset = reserveSpace(sizeof(QJsonPrivate::Object));
if (objectOffset < 0)
return false;
BEGIN << "parseObject pos=" << objectOffset << current << json;
ParsedObject parsedObject(this, objectOffset);
@ -423,6 +424,9 @@ bool Parser::parseObject()
if (parsedObject.offsets.size()) {
int tableSize = parsedObject.offsets.size()*sizeof(uint);
table = reserveSpace(tableSize);
if (table < 0)
return false;
#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
memcpy(data + table, parsedObject.offsets.constData(), tableSize);
#else
@ -452,6 +456,8 @@ bool Parser::parseObject()
bool Parser::parseMember(int baseOffset)
{
int entryOffset = reserveSpace(sizeof(QJsonPrivate::Entry));
if (entryOffset < 0)
return false;
BEGIN << "parseMember pos=" << entryOffset;
bool latin1;
@ -462,6 +468,10 @@ bool Parser::parseMember(int baseOffset)
lastError = QJsonParseError::MissingNameSeparator;
return false;
}
if (!eatSpace()) {
lastError = QJsonParseError::UnterminatedObject;
return false;
}
QJsonPrivate::Value val;
if (!parseValue(&val, baseOffset))
return false;
@ -475,6 +485,42 @@ bool Parser::parseMember(int baseOffset)
return true;
}
namespace {
struct ValueArray {
static const int prealloc = 128;
ValueArray() : data(stackValues), alloc(prealloc), size(0) {}
~ValueArray() { if (data != stackValues) free(data); }
inline bool grow() {
alloc *= 2;
if (data == stackValues) {
QJsonPrivate::Value *newValues = static_cast<QJsonPrivate::Value *>(malloc(alloc*sizeof(QJsonPrivate::Value)));
if (!newValues)
return false;
memcpy(newValues, data, size*sizeof(QJsonPrivate::Value));
data = newValues;
} else {
data = static_cast<QJsonPrivate::Value *>(realloc(data, alloc*sizeof(QJsonPrivate::Value)));
if (!data)
return false;
}
return true;
}
bool append(const QJsonPrivate::Value &v) {
if (alloc == size && !grow())
return false;
data[size] = v;
++size;
return true;
}
QJsonPrivate::Value stackValues[prealloc];
QJsonPrivate::Value *data;
int alloc;
int size;
};
}
/*
array = begin-array [ value *( value-separator value ) ] end-array
*/
@ -488,8 +534,10 @@ bool Parser::parseArray()
}
int arrayOffset = reserveSpace(sizeof(QJsonPrivate::Array));
if (arrayOffset < 0)
return false;
QVarLengthArray<QJsonPrivate::Value, 64> values;
ValueArray values;
if (!eatSpace()) {
lastError = QJsonParseError::UnterminatedArray;
@ -499,10 +547,17 @@ bool Parser::parseArray()
nextToken();
} else {
while (1) {
if (!eatSpace()) {
lastError = QJsonParseError::UnterminatedArray;
return false;
}
QJsonPrivate::Value val;
if (!parseValue(&val, arrayOffset))
return false;
values.append(val);
if (!values.append(val)) {
lastError = QJsonParseError::DocumentTooLarge;
return false;
}
char token = nextToken();
if (token == EndArray)
break;
@ -516,20 +571,22 @@ bool Parser::parseArray()
}
}
DEBUG << "size =" << values.size();
DEBUG << "size =" << values.size;
int table = arrayOffset;
// finalize the object
if (values.size()) {
int tableSize = values.size()*sizeof(QJsonPrivate::Value);
if (values.size) {
int tableSize = values.size*sizeof(QJsonPrivate::Value);
table = reserveSpace(tableSize);
memcpy(data + table, values.constData(), tableSize);
if (table < 0)
return false;
memcpy(data + table, values.data, tableSize);
}
QJsonPrivate::Array *a = (QJsonPrivate::Array *)(data + arrayOffset);
a->tableOffset = table - arrayOffset;
a->size = current - arrayOffset;
a->is_object = false;
a->length = values.size();
a->length = values.size;
DEBUG << "current=" << current;
END;
@ -636,6 +693,12 @@ bool Parser::parseValue(QJsonPrivate::Value *val, int baseOffset)
DEBUG << "value: object";
END;
return true;
case ValueSeparator:
// Essentially missing value, but after a colon, not after a comma
// like the other MissingObject errors.
lastError = QJsonParseError::IllegalValue;
return false;
case EndObject:
case EndArray:
lastError = QJsonParseError::MissingObject;
return false;
@ -738,6 +801,8 @@ bool Parser::parseNumber(QJsonPrivate::Value *val, int baseOffset)
}
int pos = reserveSpace(sizeof(double));
if (pos < 0)
return false;
qToLittleEndian(ui, data + pos);
if (current - baseOffset >= Value::MaxSize) {
lastError = QJsonParseError::DocumentTooLarge;
@ -856,6 +921,9 @@ bool Parser::parseString(bool *latin1)
// try to write out a latin1 string
int stringPos = reserveSpace(2);
if (stringPos < 0)
return false;
BEGIN << "parse string stringPos=" << stringPos << json;
while (json < end) {
uint ch = 0;
@ -878,6 +946,8 @@ bool Parser::parseString(bool *latin1)
break;
}
int pos = reserveSpace(1);
if (pos < 0)
return false;
DEBUG << " " << ch << (char)ch;
data[pos] = (uchar)ch;
}
@ -893,6 +963,8 @@ bool Parser::parseString(bool *latin1)
// write string length
*(QJsonPrivate::qle_ushort *)(data + stringPos) = ushort(current - outStart - sizeof(ushort));
int pos = reserveSpace((4 - current) & 3);
if (pos < 0)
return false;
while (pos & 3)
data[pos++] = 0;
END;
@ -922,10 +994,14 @@ bool Parser::parseString(bool *latin1)
}
if (QChar::requiresSurrogates(ch)) {
int pos = reserveSpace(4);
if (pos < 0)
return false;
*(QJsonPrivate::qle_ushort *)(data + pos) = QChar::highSurrogate(ch);
*(QJsonPrivate::qle_ushort *)(data + pos + 2) = QChar::lowSurrogate(ch);
} else {
int pos = reserveSpace(2);
if (pos < 0)
return false;
*(QJsonPrivate::qle_ushort *)(data + pos) = (ushort)ch;
}
}
@ -939,6 +1015,8 @@ bool Parser::parseString(bool *latin1)
// write string length
*(QJsonPrivate::qle_int *)(data + stringPos) = (current - outStart - sizeof(int))/2;
int pos = reserveSpace((4 - current) & 3);
if (pos < 0)
return false;
while (pos & 3)
data[pos++] = 0;
END;

View File

@ -109,6 +109,10 @@ private:
if (current + space >= dataLength) {
dataLength = 2*dataLength + space;
data = (char *)realloc(data, dataLength);
if (!data) {
lastError = QJsonParseError::DocumentTooLarge;
return -1;
}
}
int pos = current;
current += space;

View File

@ -346,6 +346,12 @@ QJsonValue &QJsonValue::operator =(const QJsonValue &other)
\header
\li Source type
\li Destination type
\row
\li
\list
\li QMetaType::Nullptr
\endlist
\li QJsonValue::Null
\row
\li
\list
@ -393,6 +399,8 @@ QJsonValue &QJsonValue::operator =(const QJsonValue &other)
QJsonValue QJsonValue::fromVariant(const QVariant &variant)
{
switch (variant.userType()) {
case QMetaType::Nullptr:
return QJsonValue(Null);
case QVariant::Bool:
return QJsonValue(variant.toBool());
case QVariant::Int:

View File

@ -2048,7 +2048,7 @@ QString QCoreApplication::translate(const char *context, const char *sourceText,
return ret;
}
#endif //QT_NO_TRANSLATE
#endif //QT_NO_TRANSLATION
// Makes it possible to point QCoreApplication to a custom location to ensure
// the directory is added to the patch, and qt.conf and deployed plugins are

View File

@ -42,6 +42,7 @@
#include <QtCore/QCoreApplication>
#include <QtCore/QThread>
#include <QtCore/QHash>
#include <QtCore/QMutex>
#include <QtCore/qfunctions_winrt.h>
#include <private/qabstracteventdispatcher_p.h>
#include <private/qcoreapplication_p.h>
@ -151,6 +152,7 @@ public:
private:
QHash<int, QObject *> timerIdToObject;
QVector<WinRTTimerInfo> timerInfos;
mutable QMutex timerInfoLock;
QHash<HANDLE, int> timerHandleToId;
QHash<int, HANDLE> timerIdToHandle;
QHash<int, HANDLE> timerIdToCancelHandle;
@ -167,6 +169,7 @@ private:
timerIdToObject.insert(id, obj);
const quint64 targetTime = qt_msectime() + interval;
const WinRTTimerInfo info(id, interval, type, obj, targetTime);
QMutexLocker locker(&timerInfoLock);
if (id >= timerInfos.size())
timerInfos.resize(id + 1);
timerInfos[id] = info;
@ -175,6 +178,7 @@ private:
bool removeTimer(int id)
{
QMutexLocker locker(&timerInfoLock);
if (id >= timerInfos.size())
return false;
@ -312,14 +316,18 @@ bool QEventDispatcherWinRT::processEvents(QEventLoop::ProcessEventsFlags flags)
if (timerId == INTERRUPT_HANDLE)
break;
WinRTTimerInfo &info = d->timerInfos[timerId];
Q_ASSERT(info.timerId != INVALID_TIMER_ID);
{
QMutexLocker locker(&d->timerInfoLock);
QCoreApplication::postEvent(this, new QTimerEvent(timerId));
WinRTTimerInfo &info = d->timerInfos[timerId];
Q_ASSERT(info.timerId != INVALID_TIMER_ID);
// Update timer's targetTime
const quint64 targetTime = qt_msectime() + info.interval;
info.targetTime = targetTime;
QCoreApplication::postEvent(this, new QTimerEvent(timerId));
// Update timer's targetTime
const quint64 targetTime = qt_msectime() + info.interval;
info.targetTime = targetTime;
}
waitResult = WaitForMultipleObjectsEx(timerHandles.count(), timerHandles.constData(), FALSE, 0, TRUE);
}
emit awake();
@ -487,6 +495,7 @@ QList<QAbstractEventDispatcher::TimerInfo> QEventDispatcherWinRT::registeredTime
}
Q_D(const QEventDispatcherWinRT);
QMutexLocker locker(&d->timerInfoLock);
QList<TimerInfo> timerInfos;
for (const WinRTTimerInfo &info : d->timerInfos) {
if (info.object == object && info.timerId != INVALID_TIMER_ID)
@ -518,6 +527,7 @@ int QEventDispatcherWinRT::remainingTime(int timerId)
}
Q_D(QEventDispatcherWinRT);
QMutexLocker locker(&d->timerInfoLock);
const WinRTTimerInfo timerInfo = d->timerInfos.at(timerId);
if (timerInfo.timerId == INVALID_TIMER_ID) {
#ifndef QT_NO_DEBUG
@ -566,6 +576,9 @@ bool QEventDispatcherWinRT::event(QEvent *e)
case QEvent::Timer: {
QTimerEvent *timerEvent = static_cast<QTimerEvent *>(e);
const int id = timerEvent->timerId();
QMutexLocker locker(&d->timerInfoLock);
Q_ASSERT(id < d->timerInfos.size());
WinRTTimerInfo &info = d->timerInfos[id];
Q_ASSERT(info.timerId != INVALID_TIMER_ID);
@ -574,17 +587,17 @@ bool QEventDispatcherWinRT::event(QEvent *e)
break;
info.inEvent = true;
locker.unlock();
QTimerEvent te(id);
QCoreApplication::sendEvent(d->timerIdToObject.value(id), &te);
locker.relock();
// The timer might have been removed in the meanwhile
if (id >= d->timerInfos.size())
break;
info = d->timerInfos[id];
if (info.timerId == INVALID_TIMER_ID)
break;
if (info.interval == 0 && info.inEvent) {
// post the next zero timer event as long as the timer was not restarted
QCoreApplication::postEvent(this, new QTimerEvent(id));

View File

@ -45,8 +45,6 @@
#include <QtCore/qatomic.h>
#include <QtCore/qbytearray.h>
#include <QtCore/qvarlengtharray.h>
#include <QtCore/qisenum.h>
#include <QtCore/qtypetraits.h>
#ifndef QT_NO_QOBJECT
#include <QtCore/qobjectdefs.h>
#endif
@ -887,7 +885,7 @@ private:
// is void* to avoid overloads conflicts. We do it by injecting unaccessible Dummy
// type as part of the overload signature.
struct Dummy {};
typedef typename QtPrivate::if_<QtPrivate::is_same<value_type, void*>::value, Dummy, value_type>::type value_type_OR_Dummy;
typedef typename std::conditional<std::is_same<value_type, void*>::value, Dummy, value_type>::type value_type_OR_Dummy;
public:
static void assign(void **ptr, const value_type_OR_Dummy *iterator )
{
@ -1092,7 +1090,7 @@ struct QSequentialIterableConvertFunctor
}
namespace QtMetaTypePrivate {
template<typename T, bool = QtPrivate::is_same<typename T::const_iterator::value_type, typename T::mapped_type>::value>
template<typename T, bool = std::is_same<typename T::const_iterator::value_type, typename T::mapped_type>::value>
struct AssociativeContainerAccessor
{
static const typename T::key_type& getKey(const typename T::const_iterator &it)
@ -1106,7 +1104,7 @@ struct AssociativeContainerAccessor
}
};
template<typename T, bool = QtPrivate::is_same<typename T::const_iterator::value_type, std::pair<const typename T::key_type, typename T::mapped_type> >::value>
template<typename T, bool = std::is_same<typename T::const_iterator::value_type, std::pair<const typename T::key_type, typename T::mapped_type> >::value>
struct StlStyleAssociativeContainerAccessor;
template<typename T>
@ -1636,7 +1634,7 @@ namespace QtPrivate {
| (IsSharedPointerToTypeDerivedFromQObject<T>::Value ? QMetaType::SharedPointerToQObject : 0)
| (IsWeakPointerToTypeDerivedFromQObject<T>::Value ? QMetaType::WeakPointerToQObject : 0)
| (IsTrackingPointerToTypeDerivedFromQObject<T>::Value ? QMetaType::TrackingPointerToQObject : 0)
| (Q_IS_ENUM(T) ? QMetaType::IsEnumeration : 0)
| (std::is_enum<T>::value ? QMetaType::IsEnumeration : 0)
| (IsGadgetHelper<T>::Value ? QMetaType::IsGadget : 0)
};
};
@ -1787,7 +1785,7 @@ template <typename T>
struct QMetaTypeIdQObject<T, QMetaType::IsGadget>
{
enum {
Defined = QtPrivate::is_default_constructible<T>::value
Defined = std::is_default_constructible<T>::value
};
static int qt_metatype_id()

View File

@ -155,14 +155,14 @@ public:
template<typename T>
inline T findChild(const QString &aName = QString(), Qt::FindChildOptions options = Qt::FindChildrenRecursively) const
{
typedef typename QtPrivate::remove_cv<typename QtPrivate::remove_pointer<T>::type>::type ObjType;
typedef typename std::remove_cv<typename std::remove_pointer<T>::type>::type ObjType;
return static_cast<T>(qt_qFindChild_helper(this, aName, ObjType::staticMetaObject, options));
}
template<typename T>
inline QList<T> findChildren(const QString &aName = QString(), Qt::FindChildOptions options = Qt::FindChildrenRecursively) const
{
typedef typename QtPrivate::remove_cv<typename QtPrivate::remove_pointer<T>::type>::type ObjType;
typedef typename std::remove_cv<typename std::remove_pointer<T>::type>::type ObjType;
QList<T> list;
qt_qFindChildren_helper(this, aName, ObjType::staticMetaObject,
reinterpret_cast<QList<void *> *>(&list), options);
@ -173,7 +173,7 @@ public:
template<typename T>
inline QList<T> findChildren(const QRegExp &re, Qt::FindChildOptions options = Qt::FindChildrenRecursively) const
{
typedef typename QtPrivate::remove_cv<typename QtPrivate::remove_pointer<T>::type>::type ObjType;
typedef typename std::remove_cv<typename std::remove_pointer<T>::type>::type ObjType;
QList<T> list;
qt_qFindChildren_helper(this, re, ObjType::staticMetaObject,
reinterpret_cast<QList<void *> *>(&list), options);
@ -185,7 +185,7 @@ public:
template<typename T>
inline QList<T> findChildren(const QRegularExpression &re, Qt::FindChildOptions options = Qt::FindChildrenRecursively) const
{
typedef typename QtPrivate::remove_cv<typename QtPrivate::remove_pointer<T>::type>::type ObjType;
typedef typename std::remove_cv<typename std::remove_pointer<T>::type>::type ObjType;
QList<T> list;
qt_qFindChildren_helper(this, re, ObjType::staticMetaObject,
reinterpret_cast<QList<void *> *>(&list), options);
@ -497,7 +497,7 @@ inline QT_DEPRECATED QList<T> qFindChildren(const QObject *o, const QRegExp &re)
template <class T>
inline T qobject_cast(QObject *object)
{
typedef typename QtPrivate::remove_cv<typename QtPrivate::remove_pointer<T>::type>::type ObjType;
typedef typename std::remove_cv<typename std::remove_pointer<T>::type>::type ObjType;
Q_STATIC_ASSERT_X(QtPrivate::HasQ_OBJECT_Macro<ObjType>::Value,
"qobject_cast requires the type to have a Q_OBJECT macro");
return static_cast<T>(ObjType::staticMetaObject.cast(object));
@ -506,7 +506,7 @@ inline T qobject_cast(QObject *object)
template <class T>
inline T qobject_cast(const QObject *object)
{
typedef typename QtPrivate::remove_cv<typename QtPrivate::remove_pointer<T>::type>::type ObjType;
typedef typename std::remove_cv<typename std::remove_pointer<T>::type>::type ObjType;
Q_STATIC_ASSERT_X(QtPrivate::HasQ_OBJECT_Macro<ObjType>::Value,
"qobject_cast requires the type to have a Q_OBJECT macro");
return static_cast<T>(ObjType::staticMetaObject.cast(object));

View File

@ -52,7 +52,7 @@ class QVariant;
template <class T>
class QPointer
{
Q_STATIC_ASSERT_X(!QtPrivate::is_pointer<T>::value, "QPointer's template type must not be a pointer type");
Q_STATIC_ASSERT_X(!std::is_pointer<T>::value, "QPointer's template type must not be a pointer type");
template<typename U>
struct TypeSelector

View File

@ -119,14 +119,14 @@ public:
// singleShot to a functor or function pointer (without context)
template <typename Duration, typename Func1>
static inline typename QtPrivate::QEnableIf<!QtPrivate::FunctionPointer<Func1>::IsPointerToMemberFunction &&
!QtPrivate::is_same<const char*, Func1>::value, void>::Type
!std::is_same<const char*, Func1>::value, void>::Type
singleShot(Duration interval, Func1 slot)
{
singleShot(interval, defaultTypeFor(interval), nullptr, slot);
}
template <typename Duration, typename Func1>
static inline typename QtPrivate::QEnableIf<!QtPrivate::FunctionPointer<Func1>::IsPointerToMemberFunction &&
!QtPrivate::is_same<const char*, Func1>::value, void>::Type
!std::is_same<const char*, Func1>::value, void>::Type
singleShot(Duration interval, Qt::TimerType timerType, Func1 slot)
{
singleShot(interval, timerType, nullptr, slot);
@ -134,14 +134,14 @@ public:
// singleShot to a functor or function pointer (with context)
template <typename Duration, typename Func1>
static inline typename QtPrivate::QEnableIf<!QtPrivate::FunctionPointer<Func1>::IsPointerToMemberFunction &&
!QtPrivate::is_same<const char*, Func1>::value, void>::Type
!std::is_same<const char*, Func1>::value, void>::Type
singleShot(Duration interval, QObject *context, Func1 slot)
{
singleShot(interval, defaultTypeFor(interval), context, slot);
}
template <typename Duration, typename Func1>
static inline typename QtPrivate::QEnableIf<!QtPrivate::FunctionPointer<Func1>::IsPointerToMemberFunction &&
!QtPrivate::is_same<const char*, Func1>::value, void>::Type
!std::is_same<const char*, Func1>::value, void>::Type
singleShot(Duration interval, Qt::TimerType timerType, QObject *context, Func1 slot)
{
//compilation error if the slot has arguments.

View File

@ -3085,6 +3085,7 @@ bool QVariant::canConvert(int targetTypeId) const
if (currentType == QMetaType::QJsonValue) {
switch (targetTypeId) {
case QMetaType::Nullptr:
case QMetaType::QString:
case QMetaType::Bool:
case QMetaType::Int:

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