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

Conflicts:
	src/corelib/global/qnamespace.qdoc
	src/corelib/io/qwindowspipereader.cpp
	src/corelib/io/qwindowspipereader_p.h
	src/corelib/statemachine/qstatemachine.cpp
	src/corelib/statemachine/qstatemachine_p.h
	src/plugins/platforms/xcb/qxcbconnection.h
	tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
	tests/auto/tools/qmake/tst_qmake.cpp
	tests/manual/touch/main.cpp

Change-Id: I917d694890e79ee3da7d65134b5b085e23e0dd62
This commit is contained in:
Simon Hausmann 2015-06-03 10:23:56 +02:00
commit e2f66f9215
530 changed files with 11966 additions and 5862 deletions

View File

@ -4,4 +4,8 @@ CONFIG -= qt
INCLUDEPATH += $$QMAKE_INCDIR_EGL
LIBS += -L$$QMAKE_LIBDIR_EGL -lEGL -lGLESv2 -lbcm_host
for(p, QMAKE_LIBDIR_EGL) {
exists($$p):LIBS += -L$$p
}
LIBS += -lEGL -lGLESv2 -lbcm_host

51
configure vendored
View File

@ -728,6 +728,7 @@ CFG_EVENTFD=auto
CFG_RPATH=yes
CFG_FRAMEWORK=auto
CFG_USE_GOLD_LINKER=auto
CFG_ENABLE_NEW_DTAGS=auto
DEFINES=
INCLUDES=
D_FLAGS=
@ -2961,8 +2962,20 @@ if [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL ] && [ $COMMERCIAL_USER = "yes" ];
Edition="Preview"
EditionString="Technology Preview"
elif [ $COMMERCIAL_USER = "yes" ]; then
if test -x "$relpath/bin/licheck"; then
LicheckOutput=`$relpath/bin/licheck $OPT_CONFIRM_LICENSE $relpath $outpath\
if [ $UNAME_SYSTEM = "Linux" ]; then
if file -L /bin/sh | grep -q "64-bit" ; then
Licheck=licheck64
else
Licheck=licheck32
fi
elif [ $UNAME_SYSTEM = "Darwin" ]; then
Licheck=licheck_mac
else
echo >&2 "Host operating system not supported by this edition of Qt."
exit 1
fi
if [ -x "$relpath/bin/$Licheck" ]; then
LicheckOutput=`$relpath/bin/$Licheck $OPT_CONFIRM_LICENSE $relpath $outpath\
$PLATFORM $XPLATFORM`
if [ $? -ne 0 ]; then
exit 1
@ -2973,7 +2986,7 @@ elif [ $COMMERCIAL_USER = "yes" ]; then
echo
echo "Error: This is the Open Source version of Qt."
echo "If you want to use Enterprise features of Qt,"
echo "information use the contact form at http://www.qt.io/contact-us"
echo "use the contact form at http://www.qt.io/contact-us"
echo "to purchase a license."
echo
exit 1
@ -3305,7 +3318,7 @@ if [ "$XPLATFORM_IOS" = "yes" ]; then
CFG_RPATH="no"
CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS examples"
CFG_SHARED="no" # iOS builds should be static to be able to submit to the App Store
CFG_SKIP_MODULES="$CFG_SKIP_MODULES qtconnectivity qtdoc qtmacextras qtserialport qtwebkit qtwebkit-examples"
CFG_SKIP_MODULES="$CFG_SKIP_MODULES qtdoc qtmacextras qtserialport qtwebkit qtwebkit-examples"
CFG_PRECOMPILE="no" # Precompiled headers not supported with multiple -arch arguments
# If the user passes -sdk on the command line we build a SDK-specific Qt build.
@ -3442,6 +3455,13 @@ if [ "$CFG_USE_GOLD_LINKER" != "no" ]; then
fi
fi
# auto-detect --enable-new-dtags support
if linkerSupportsFlag $TEST_COMPILER --enable-new-dtags; then
CFG_ENABLE_NEW_DTAGS=yes
else
CFG_ENABLE_NEW_DTAGS=no
fi
# auto-detect -fstack-protector-strong support (for QNX only currently)
if [ "$XPLATFORM_QNX" = "yes" ]; then
if compilerSupportsFlag $TEST_COMPILER -fstack-protector-strong; then
@ -5338,6 +5358,14 @@ fi
# auto-detect XInput2 support
if [ "$CFG_XINPUT2" != "no" ]; then
if compileTest x11/xinput2 "XInput2"; then
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xi 2>/dev/null; then
QMAKE_LIBXI_VERSION_MAJOR=`$PKG_CONFIG --modversion xi 2>/dev/null | cut -d . -f 1`
QMAKE_LIBXI_VERSION_MINOR=`$PKG_CONFIG --modversion xi 2>/dev/null | cut -d . -f 2`
QMAKE_LIBXI_VERSION_PATCH=`$PKG_CONFIG --modversion xi 2>/dev/null | cut -d . -f 3`
QMakeVar set QMAKE_LIBXI_VERSION_MAJOR "$QMAKE_LIBXI_VERSION_MAJOR"
QMakeVar set QMAKE_LIBXI_VERSION_MINOR "$QMAKE_LIBXI_VERSION_MINOR"
QMakeVar set QMAKE_LIBXI_VERSION_PATCH "$QMAKE_LIBXI_VERSION_PATCH"
fi
CFG_XINPUT2=yes
CFG_XINPUT=no
else
@ -6067,6 +6095,7 @@ fi
[ "$CFG_STRIP" = "no" ] && QMAKE_CONFIG="$QMAKE_CONFIG nostrip"
[ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
[ "$CFG_USE_GOLD_LINKER" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG use_gold_linker"
[ "$CFG_ENABLE_NEW_DTAGS" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG enable_new_dtags"
if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
QT_CONFIG="$QT_CONFIG separate_debug_info"
fi
@ -6196,11 +6225,7 @@ fi
[ '!' -z "$INCLUDES" ] && QMakeVar add INCLUDEPATH "$INCLUDES"
[ '!' -z "$L_FLAGS" ] && QMakeVar add LIBS "$L_FLAGS"
if [ "$XPLATFORM_MAC" = "yes" ] && [ "$QT_CROSS_COMPILE" = "no" ]; then
if [ "$CFG_RPATH" = "yes" ]; then
QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
fi
elif [ -z "`getXQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
if [ -z "`getXQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
if [ -n "$RPATH_FLAGS" ]; then
echo
echo "ERROR: -R cannot be used on this platform as \$QMAKE_LFLAGS_RPATH is"
@ -6758,8 +6783,15 @@ QT_PATCH_VERSION = $QT_PATCH_VERSION
QT_LIBINFIX = $QT_LIBINFIX
QT_NAMESPACE = $QT_NAMESPACE
QT_EDITION = $Edition
EOF
if [ "$Edition" != "OpenSource" ] && [ "$Edition" != "Preview" ]; then
echo "QT_LICHECK = $Licheck" >> "$QTCONFIG.tmp"
echo "QT_RELEASE_DATE = $ReleaseDate" >> "$QTCONFIG.tmp"
fi
echo >> "$QTCONFIG.tmp"
if [ "$CFG_SHARED" = "no" ]; then
echo "QT_DEFAULT_QPA_PLUGIN = q$QT_QPA_DEFAULT_PLATFORM" >> "$QTCONFIG.tmp"
echo >> "$QTCONFIG.tmp"
@ -6980,6 +7012,7 @@ unset build_mode release
echo " Using sanitizer(s)...... $CFG_SANITIZERS"
echo " Using C++11 ............ $CFG_CXX11"
echo " Using gold linker....... $CFG_USE_GOLD_LINKER"
echo " Using new DTAGS ........ $CFG_ENABLE_NEW_DTAGS"
echo " Using PCH .............. $CFG_PRECOMPILE"
echo " Target compiler supports:"
if [ "$CFG_ARCH" = "i386" -o "$CFG_ARCH" = "x86_64" ]; then

124
dist/changes-5.4.2 vendored Normal file
View File

@ -0,0 +1,124 @@
Qt 5.4.2 is a bug-fix release. It maintains both forward and backward
compatibility (source and binary) with Qt 5.4.1. Compatibility with Qt
5.4.0 is also retained, except on Windows when using MSVC 2012 or MSVC
2013. See note below.
For more details, refer to the online documentation included in this
distribution. The documentation is also available online:
http://doc.qt.io/qt-5.4/
The Qt version 5.4 series is binary compatible with the 5.3.x series.
Applications compiled for 5.3 will continue to run with 5.4 with the
exception of on Windows when using MSVC 2012 or MSVC 2013. See note
below.
Some of the changes listed in this file include issue tracking numbers
corresponding to tasks in the Qt Bug Tracker:
http://bugreports.qt.io/
Each of these identifiers can be entered in the bug tracker to obtain more
information about a particular change.
****************************************************************************
* Important Behavior Changes *
****************************************************************************
- Restored binary compatibility with Qt 5.3.2 on Windows when using MSVC
2012 or MSVC 2013. This means that Qt 5.4.1 and 5.4.2 are no longer
binary compatible with Qt 5.4.0 when using either of those compilers.
- [QTBUG-42594] OS X binary package: fixed incorrect linking to libraries in
/opt/local/lib
- EXIF orientation is no longer applied to JPEG images on read. EXIF
orientation on JPEG was introduced in 5.4.0, but due to a bug the most
common EXIF-format (big-endian) was not working until 5.4.1. 5.4.2 restores the
behavior of 5.4.0 and earlier for most EXIF-tagged JPEGs.
EXIF orientation will be an opt-in starting with Qt 5.5.
- On x86 and x86-64 systems with ELF binaries (especially Linux), due to
a new optimization in GCC 5.x in combination with a recent version of
GNU binutils, compiling Qt applications with -fPIE is no longer
enough with GCC 5.x. Applications now need to be compiled with
the -fPIC option if Qt's option "reduce relocations" is active. For
backward compatibility only, Qt accepts the use of -fPIE for GCC 4.x
versions.
Note that Clang is known to generate incompatible code even with -fPIC if
the -flto option is active.
Applications using qmake or cmake >= 2.8.12 as their build system will
adapt automatically. Applications using an older release of cmake in
combination with GCC 5.x need to change their CMakeLists.txt to add
Qt5Core_EXECUTABLE_COMPILE_FLAGS to CMAKE_CXX_FLAGS. In particular,
applications using cmake >= 2.8.9 and < 2.8.11 will continue to build
with the -fPIE option and invoke the special compatibility mode if using
GCC 4.x.
****************************************************************************
* Library *
****************************************************************************
QtCore
------
- [QTBUG-43893] Fixed memory leak in qSetMessagePattern
- [QTBUG-43513] QXmlStreamReader: Correctly parse XML containing NUL bytes
in the input stream
- [QTBUG-43352] QTemporaryDirectory: Properly clean up in case of a failure
- [QTBUG-43827] Fixed regression in QSortFilterProxyModel which crashed when
sorting a tree model
QtGui
-----
- [QTBUG-44273] Fixed misplacement of outlined text with native text rendering
- [QTBUG-44147] Fixed VNC not working on some VNC servers
- [QTBUG-43850] Fixed crash with multi-threaded font usage
- [QTBUG-43850] Made the old harfbuzz fallback available at runtime
- Improvements to the experimental high-dpi support
- [QTBUG-43318] Better resolution of GLES 3 functions to avoid issues when
deploying on systems with GLES 2.0 only
QtWidgets
---------
- [QTBUG-43830] Fixed crash in stylesheets when styling QProgressBar
- [QTBUG-43663] QColorDialog: Don't lose focus while color picking
QtNetwork
---------
- [QTBUG-43793] Fixed disconnects of QSSLSocket after starting encryption
QtPrintSupport
--------------
- [QTBUG-43124] Fixed QPrinter::{width,height} return values
****************************************************************************
* Platform Specific Changes *
****************************************************************************
Android
-------
- [QTBUG-44648] Fixed rendering Chinese text on Android 5
Linux/XCB
---------
- [QTBUG-45071] Don't crash when resizing windows to bigger than 3840x2160
****************************************************************************
* Tools *
****************************************************************************
configure & build system
------------------------
- CMake-based projects using Qt will now always be built with -fPIE,
which fixes function pointer based QObject::connect() on ARM. This
is consistent with qmake
- [Android] Fixed compilation on armv5 with 4.9 toolchain
qmake
-----
- [VS] Fixed handling of files that are excluded from build
- [QTBUG-44413][VS] Fixed vcxproj generation for CONFIG-=flat, again
- [QTBUG-44595] Restored Qt 4 behavior of qtLibraryTarget()
- [QTBUG-45118][Windows] Fixed parallel build when using TYPELIBS
- [OS X/iOS] Fixed QMAKE_INFO_PLIST path resolution for shadow builds

View File

@ -110,3 +110,7 @@
\externalpage http://wiki.qt.io/BlackBerry
\title Qt for BlackBerry
*/
/*!
\externalpage http://wiki.qt.io/Qt_Multimedia_Backends
\title Qt Multimedia Backends
*/

View File

@ -5,11 +5,7 @@ RESOURCES += framebufferobject2.qrc
QT += opengl widgets
# install
target.path = $$[QT_INSTALL_EXAMPLES]/opengl/framebufferobject2
target.path = $$[QT_INSTALL_EXAMPLES]/opengl/legacy/framebufferobject2
INSTALLS += target
contains(QT_CONFIG, opengles.) {
contains(QT_CONFIG, angle): \
warning("Qt was built with ANGLE, which provides only OpenGL ES 2.0 on top of DirectX 9.0c")
error("This example requires Qt to be configured with -opengl desktop")
}
contains(QT_CONFIG, opengles.|angle|dynamicgl):error("This example requires Qt to be configured with -opengl desktop")

View File

@ -6,11 +6,7 @@ SOURCES = glwidget.cpp \
QT += opengl widgets
# install
target.path = $$[QT_INSTALL_EXAMPLES]/opengl/grabber
target.path = $$[QT_INSTALL_EXAMPLES]/opengl/legacy/grabber
INSTALLS += target
contains(QT_CONFIG, opengles.) {
contains(QT_CONFIG, angle): \
warning("Qt was built with ANGLE, which provides only OpenGL ES 2.0 on top of DirectX 9.0c")
error("This example requires Qt to be configured with -opengl desktop")
}
contains(QT_CONFIG, opengles.|angle|dynamicgl):error("This example requires Qt to be configured with -opengl desktop")

View File

@ -128,6 +128,8 @@ void GLWidget::setZRotation(int angle)
//! [6]
void GLWidget::initializeGL()
{
initializeOpenGLFunctions();
qglClearColor(qtPurple.dark());
logo = new QtLogo(this, 64);
@ -153,7 +155,7 @@ void GLWidget::paintGL()
glRotatef(xRot / 16.0, 1.0, 0.0, 0.0);
glRotatef(yRot / 16.0, 0.0, 1.0, 0.0);
glRotatef(zRot / 16.0, 0.0, 0.0, 1.0);
logo->draw();
logo->draw(static_cast<QOpenGLFunctions_1_1 *>(this));
}
//! [7]

View File

@ -42,11 +42,12 @@
#define GLWIDGET_H
#include <QGLWidget>
#include <QOpenGLFunctions_1_1>
class QtLogo;
//! [0]
class GLWidget : public QGLWidget
class GLWidget : public QGLWidget, public QOpenGLFunctions_1_1
{
Q_OBJECT

View File

@ -11,11 +11,7 @@ SOURCES = glwidget.cpp \
QT += opengl widgets
# install
target.path = $$[QT_INSTALL_EXAMPLES]/opengl/hellogl
target.path = $$[QT_INSTALL_EXAMPLES]/opengl/legacy/hellogl
INSTALLS += target
contains(QT_CONFIG, opengles.) {
contains(QT_CONFIG, angle): \
warning("Qt was built with ANGLE, which provides only OpenGL ES 2.0 on top of DirectX 9.0c")
error("This example requires Qt to be configured with -opengl desktop")
}
contains(QT_CONFIG, opengles.|angle):error("This example requires Qt to be configured with -opengl desktop")

View File

@ -115,6 +115,8 @@ void GLWidget::setZRotation(int angle)
//! [2]
void GLWidget::initializeGL()
{
initializeOpenGLFunctions();
glEnable(GL_MULTISAMPLE);
logo = new QtLogo(this);
@ -173,7 +175,7 @@ void GLWidget::paintEvent(QPaintEvent *event)
glRotatef(yRot / 16.0, 0.0, 1.0, 0.0);
glRotatef(zRot / 16.0, 0.0, 0.0, 1.0);
logo->draw();
logo->draw(static_cast<QOpenGLFunctions_1_1 *>(this));
//! [7]
//! [8]

View File

@ -42,13 +42,14 @@
#define GLWIDGET_H
#include <QGLWidget>
#include <QOpenGLFunctions_1_1>
#include <QTimer>
class Bubble;
class QtLogo;
//! [0]
class GLWidget : public QGLWidget
class GLWidget : public QGLWidget, public QOpenGLFunctions_1_1
{
Q_OBJECT

View File

@ -13,11 +13,7 @@ SOURCES = bubble.cpp \
qtlogo.cpp
# install
target.path = $$[QT_INSTALL_EXAMPLES]/opengl/overpainting
target.path = $$[QT_INSTALL_EXAMPLES]/opengl/legacy/overpainting
INSTALLS += target
contains(QT_CONFIG, opengles.) {
contains(QT_CONFIG, angle): \
warning("Qt was built with ANGLE, which provides only OpenGL ES 2.0 on top of DirectX 9.0c")
error("This example requires Qt to be configured with -opengl desktop")
}
contains(QT_CONFIG, opengles.|angle):error("This example requires Qt to be configured with -opengl desktop")

View File

@ -7,11 +7,7 @@ RESOURCES += pbuffers.qrc
QT += opengl widgets
# install
target.path = $$[QT_INSTALL_EXAMPLES]/opengl/pbuffers
target.path = $$[QT_INSTALL_EXAMPLES]/opengl/legacy/pbuffers
INSTALLS += target
contains(QT_CONFIG, opengles.) {
contains(QT_CONFIG, angle): \
warning("Qt was built with ANGLE, which provides only OpenGL ES 2.0 on top of DirectX 9.0c")
error("This example requires Qt to be configured with -opengl desktop")
}
contains(QT_CONFIG, opengles.|angle|dynamicgl):error("This example requires Qt to be configured with -opengl desktop")

View File

@ -5,11 +5,7 @@ SOURCES += glwidget.cpp main.cpp
RESOURCES += pbuffers2.qrc
# install
target.path = $$[QT_INSTALL_EXAMPLES]/opengl/pbuffers2
target.path = $$[QT_INSTALL_EXAMPLES]/opengl/legacy/pbuffers2
INSTALLS += target
contains(QT_CONFIG, opengles.) {
contains(QT_CONFIG, angle): \
warning("Qt was built with ANGLE, which provides only OpenGL ES 2.0 on top of DirectX 9.0c")
error("This example requires Qt to be configured with -opengl desktop")
}
contains(QT_CONFIG, opengles.|angle|dynamicgl):error("This example requires Qt to be configured with -opengl desktop")

View File

@ -4,11 +4,7 @@ SOURCES += glwidget.cpp main.cpp
QT += opengl widgets
# install
target.path = $$[QT_INSTALL_EXAMPLES]/opengl/samplebuffers
target.path = $$[QT_INSTALL_EXAMPLES]/opengl/legacy/samplebuffers
INSTALLS += target
contains(QT_CONFIG, opengles.) {
contains(QT_CONFIG, angle): \
warning("Qt was built with ANGLE, which provides only OpenGL ES 2.0 on top of DirectX 9.0c")
error("This example requires Qt to be configured with -opengl desktop")
}
contains(QT_CONFIG, opengles.|angle|dynamicgl):error("This example requires Qt to be configured with -opengl desktop")

View File

@ -43,6 +43,7 @@
#include <QGLWidget>
#include <QMatrix4x4>
#include <QVector3D>
#include <QOpenGLFunctions_1_1>
#include <qmath.h>
@ -60,7 +61,7 @@ struct Geometry
void appendSmooth(const QVector3D &a, const QVector3D &n, int from);
void appendFaceted(const QVector3D &a, const QVector3D &n);
void finalize();
void loadArrays() const;
void loadArrays(QOpenGLFunctions_1_1 *functions) const;
};
//! [0]
@ -73,7 +74,7 @@ public:
void setSmoothing(Smoothing s) { sm = s; }
void translate(const QVector3D &t);
void rotate(qreal deg, QVector3D axis);
void draw() const;
void draw(QOpenGLFunctions_1_1 *functions) const;
void addTri(const QVector3D &a, const QVector3D &b, const QVector3D &c, const QVector3D &n);
void addQuad(const QVector3D &a, const QVector3D &b, const QVector3D &c, const QVector3D &d);
@ -96,10 +97,10 @@ static inline void qSetColor(float colorVec[], QColor c)
colorVec[3] = c.alphaF();
}
void Geometry::loadArrays() const
void Geometry::loadArrays(QOpenGLFunctions_1_1 *functions) const
{
glVertexPointer(3, GL_FLOAT, 0, vertices.constData());
glNormalPointer(GL_FLOAT, 0, normals.constData());
functions->glVertexPointer(3, GL_FLOAT, 0, vertices.constData());
functions->glNormalPointer(GL_FLOAT, 0, normals.constData());
}
void Geometry::finalize()
@ -170,15 +171,15 @@ void Patch::translate(const QVector3D &t)
}
//! [2]
void Patch::draw() const
void Patch::draw(QOpenGLFunctions_1_1 *functions) const
{
glPushMatrix();
glMultMatrixf(mat.constData());
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, faceColor);
functions->glPushMatrix();
functions->glMultMatrixf(mat.constData());
functions->glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, faceColor);
const GLushort *indices = geom->faces.constData();
glDrawElements(GL_TRIANGLES, count, GL_UNSIGNED_SHORT, indices + start);
glPopMatrix();
functions->glDrawElements(GL_TRIANGLES, count, GL_UNSIGNED_SHORT, indices + start);
functions->glPopMatrix();
}
//! [2]
@ -371,17 +372,17 @@ void QtLogo::buildGeometry(int divisions, qreal scale)
//! [3]
//! [4]
void QtLogo::draw() const
void QtLogo::draw(QOpenGLFunctions_1_1 *functions) const
{
geom->loadArrays();
geom->loadArrays(functions);
glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_NORMAL_ARRAY);
functions->glEnableClientState(GL_VERTEX_ARRAY);
functions->glEnableClientState(GL_NORMAL_ARRAY);
for (int i = 0; i < parts.count(); ++i)
parts[i]->draw();
parts[i]->draw(functions);
glDisableClientState(GL_VERTEX_ARRAY);
glDisableClientState(GL_NORMAL_ARRAY);
functions->glDisableClientState(GL_VERTEX_ARRAY);
functions->glDisableClientState(GL_NORMAL_ARRAY);
}
//! [4]

View File

@ -44,6 +44,7 @@
#include <QObject>
#include <QColor>
class QOpenGLFunctions_1_1;
class Patch;
struct Geometry;
@ -54,7 +55,7 @@ public:
explicit QtLogo(QObject *parent, int d = 64, qreal s = 1.0);
~QtLogo();
void setColor(QColor c);
void draw() const;
void draw(QOpenGLFunctions_1_1 *functions) const;
private:
void buildGeometry(int d, qreal s);

View File

@ -537,14 +537,14 @@ void GLWidget::setTransparent(bool transparent)
window()->update();
}
void GLWidget::resizeGL(int w, int h)
void GLWidget::resizeGL(int, int)
{
if (m_hasButton) {
if (!m_btn) {
m_btn = new QPushButton("A widget on top.\nPress me!", this);
m_btn = new QPushButton("A widget on top.\nPress for more widgets.", this);
connect(m_btn, &QPushButton::clicked, this, &GLWidget::handleButtonPress);
}
m_btn->move(w / 2, h / 2);
m_btn->move(20, 80);
}
}

View File

@ -47,6 +47,7 @@
#include <QLabel>
#include <QCheckBox>
#include <QSpinBox>
#include <QScrollArea>
#include "glwidget.h"
@ -69,7 +70,7 @@ MainWindow::MainWindow()
"and therefore an interval < 16 ms will likely lead to a 60 FPS update rate.");
QGroupBox *updateGroupBox = new QGroupBox(this);
QCheckBox *timerBased = new QCheckBox("Use timer", this);
timerBased->setChecked(true);
timerBased->setChecked(false);
timerBased->setToolTip("Toggles using a timer to trigger update().\n"
"When not set, each paintGL() schedules the next update immediately,\n"
"expecting the blocking swap to throttle the thread.\n"
@ -87,7 +88,7 @@ MainWindow::MainWindow()
slider->setRange(0, 50);
slider->setSliderPosition(30);
m_timer->setInterval(10);
label->setText("A QOpenGLWidget");
label->setText("A scrollable QOpenGLWidget");
label->setAlignment(Qt::AlignHCenter);
QGroupBox * groupBox = new QGroupBox(this);
@ -96,7 +97,10 @@ MainWindow::MainWindow()
m_layout = new QGridLayout(groupBox);
m_layout->addWidget(glwidget,1,0,8,1);
QScrollArea *scrollArea = new QScrollArea;
scrollArea->setWidget(glwidget);
m_layout->addWidget(scrollArea,1,0,8,1);
m_layout->addWidget(label,9,0,1,1);
m_layout->addWidget(updateGroupBox, 10, 0, 1, 1);
m_layout->addWidget(slider, 11,0,1,1);
@ -134,7 +138,10 @@ MainWindow::MainWindow()
connect(timerBased, &QCheckBox::toggled, this, &MainWindow::timerUsageChanged);
connect(timerBased, &QCheckBox::toggled, updateInterval, &QWidget::setEnabled);
if (timerBased->isChecked())
m_timer->start();
else
updateInterval->setEnabled(false);
}
void MainWindow::updateIntervalChanged(int value)
@ -170,3 +177,8 @@ void MainWindow::timerUsageChanged(bool enabled)
w->update();
}
}
void MainWindow::resizeEvent(QResizeEvent *)
{
m_glWidgets[0]->setMinimumSize(size() + QSize(128, 128));
}

View File

@ -56,6 +56,8 @@ public:
void addNew();
bool timerEnabled() const { return m_timer->isActive(); }
void resizeEvent(QResizeEvent *);
private slots:
void updateIntervalChanged(int value);
void timerUsageChanged(bool enabled);

View File

@ -187,13 +187,14 @@ bool ScribbleArea::event(QEvent *event)
foreach (const QTouchEvent::TouchPoint &touchPoint, touchPoints) {
switch (touchPoint.state()) {
case Qt::TouchPointStationary:
// don't do anything if this touch point hasn't moved
case Qt::TouchPointReleased:
// don't do anything if this touch point hasn't moved or has been released
continue;
default:
{
QRectF rect = touchPoint.rect();
if (rect.isEmpty()) {
qreal diameter = MinimumDiameter;
qreal diameter = MaximumDiameter;
if (touch->device()->capabilities() & QTouchDevice::Pressure)
diameter = MinimumDiameter + (MaximumDiameter - MinimumDiameter) * touchPoint.pressure();
rect.setSize(QSizeF(diameter, diameter));

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

View File

@ -30,8 +30,7 @@
\title Plug & Paint Example
\ingroup examples-widgets-tools
\brief The Plug & Paint example demonstrates how to write Qt
applications that can be extended through plugins.
\brief Demonstrates how to extend Qt applications using plugins.
\image plugandpaint.png Screenshot of the Plug & Paint example
@ -314,6 +313,9 @@
/*!
\example tools/plugandpaintplugins/basictools
\title Plug & Paint Basic Tools Example
\brief A plugin providing the basic tools for painting functionality.
\image plugandpaint.png Screenshot of the Plug & Paint example
The Basic Tools example is a static plugin for the
\l{tools/plugandpaint}{Plug & Paint} example. It provides a set
@ -499,6 +501,9 @@
/*!
\example tools/plugandpaintplugins/extrafilters
\title Plug & Paint Extra Filters Example
\brief A plugin providing the extra filters.
\image plugandpaint.png Screenshot of the Plug & Paint example
The Extra Filters example is a plugin for the
\l{tools/plugandpaint}{Plug & Paint} example. It provides a set

View File

@ -28,10 +28,13 @@
/*!
\example gestures/imagegestures
\title Image Gestures Example
\brief Demonstrates the use of simple gestures in a widget
This example shows how to enable gestures for a widget and use gesture input
to perform actions.
\image imagegestures-example.jpg
We use two classes to create the user interface for the application: \c MainWidget
and \c ImageWidget. The \c MainWidget class is simply used as a container for the
\c ImageWidget class, which we will configure to accept gesture input. Since we

View File

@ -1,10 +1,6 @@
QT += opengl widgets
contains(QT_CONFIG, opengles.) {
contains(QT_CONFIG, angle): \
warning("Qt was built with ANGLE, which provides only OpenGL ES 2.0 on top of DirectX 9.0c")
error("This example requires Qt to be configured with -opengl desktop")
}
contains(QT_CONFIG, opengles.|angle|dynamicgl):error("This example requires Qt to be configured with -opengl desktop")
HEADERS += 3rdparty/fbm.h \
glbuffers.h \

View File

@ -107,7 +107,7 @@ void ImageViewer::open()
mimeTypeFilters.sort();
const QStringList picturesLocations = QStandardPaths::standardLocations(QStandardPaths::PicturesLocation);
QFileDialog dialog(this, tr("Open File"),
picturesLocations.isEmpty() ? QDir::currentPath() : picturesLocations.first());
picturesLocations.isEmpty() ? QDir::currentPath() : picturesLocations.last());
dialog.setAcceptMode(QFileDialog::AcceptOpen);
dialog.setMimeTypeFilters(mimeTypeFilters);
dialog.selectMimeTypeFilter("image/jpeg");

View File

@ -92,11 +92,13 @@ public:
}
void mousePressEvent(QMouseEvent *e) Q_DECL_OVERRIDE {
if (!m_mouseDown) {
m_mouseDown = true;
m_polygon.clear();
m_polygon.append(e->pos());
renderLater();
}
}
void mouseMoveEvent(QMouseEvent *e) Q_DECL_OVERRIDE {
if (m_mouseDown) {
@ -106,10 +108,12 @@ public:
}
void mouseReleaseEvent(QMouseEvent *e) Q_DECL_OVERRIDE {
if (m_mouseDown) {
m_mouseDown = false;
m_polygon.append(e->pos());
renderLater();
}
}
void focusInEvent(QFocusEvent *) Q_DECL_OVERRIDE {
m_focus = true;

View File

@ -16,6 +16,7 @@ QMAKE_LFLAGS_SONAME += -Wl,-soname,
QMAKE_LFLAGS_THREAD +=
QMAKE_LFLAGS_RPATH = -Wl,-rpath,
QMAKE_LFLAGS_RPATHLINK = -Wl,-rpath-link,
QMAKE_LFLAGS_NEW_DTAGS = -Wl,--enable-new-dtags
QMAKE_LFLAGS_USE_GOLD = -fuse-ld=gold
# -Bsymbolic-functions (ld) support

View File

@ -43,7 +43,7 @@ QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_OPTIMIZE -g
QMAKE_CFLAGS_DEBUG += -g
QMAKE_CFLAGS_SHLIB += -fPIC
QMAKE_CFLAGS_STATIC_LIB += -fPIC
QMAKE_CFLAGS_APP += -fPIE
QMAKE_CFLAGS_APP += -fPIC
QMAKE_CFLAGS_ISYSTEM = -isystem
QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses
QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden

View File

@ -23,7 +23,7 @@ QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_OPTIMIZE -g
QMAKE_CFLAGS_DEBUG += -g
QMAKE_CFLAGS_SHLIB += -fPIC -shared
QMAKE_CFLAGS_STATIC_LIB += -fPIC
QMAKE_CFLAGS_APP += -fPIE
QMAKE_CFLAGS_APP += -fPIC
QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses
QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden
QMAKE_CFLAGS_SSE2 += -msse2

View File

@ -0,0 +1,49 @@
<?xml version=\"1.0\" encoding=\"utf-8\"?>
<Package
xmlns=\"http://schemas.microsoft.com/appx/manifest/foundation/windows10\"
xmlns:mp=\"http://schemas.microsoft.com/appx/2014/phone/manifest\"
xmlns:uap=\"http://schemas.microsoft.com/appx/manifest/uap/windows10\"
IgnorableNamespaces=\"uap mp\">
<Identity
Name=\"$${WINRT_MANIFEST.identity}\"
Publisher=\"$${WINRT_MANIFEST.publisherid}\"
Version=\"$${WINRT_MANIFEST.version}\" />
<mp:PhoneIdentity PhoneProductId=\"$${WINRT_MANIFEST.identity}\" PhonePublisherId=\"$${WINRT_MANIFEST.phone_publisher_id}\"/>
<Properties>
<DisplayName>$${WINRT_MANIFEST.name}</DisplayName>
<PublisherDisplayName>$${WINRT_MANIFEST.publisher}</PublisherDisplayName>
<Logo>$${WINRT_MANIFEST.logo_store}</Logo>
</Properties>
<Dependencies>
<TargetDeviceFamily Name=\"Windows.Universal\" MinVersion=\"10.0.10069.0\" MaxVersionTested=\"10.0.10069.0\" />
</Dependencies>
<Resources>
<Resource Language=\"en\"/>
</Resources>
<Applications>
<Application Id=\"App\"
Executable=\"$${WINRT_MANIFEST.target}.exe\"
EntryPoint=\"$${WINRT_MANIFEST.target}.App\">
<uap:VisualElements
DisplayName=\"$${WINRT_MANIFEST.name}\"
Description=\"$${WINRT_MANIFEST.description}\"
BackgroundColor=\"$${WINRT_MANIFEST.background}\"
Square150x150Logo=\"$${WINRT_MANIFEST.logo_150x150}\"
Square44x44Logo=\"$${WINRT_MANIFEST.logo_44x44}\">
<uap:SplashScreen Image=\"$${WINRT_MANIFEST.logo_620x300}\" />
</uap:VisualElements>
</Application>
</Applications>
<Capabilities>
<Capability Name=\"internetClient\" />
</Capabilities>
</Package>

View File

@ -50,7 +50,7 @@ QMAKE_CXXFLAGS_STL_OFF =
QMAKE_CXXFLAGS_RTTI_ON = -GR
QMAKE_CXXFLAGS_RTTI_OFF =
QMAKE_CXXFLAGS_EXCEPTIONS_ON = -EHsc
QMAKE_CXXFLAGS_EXCEPTIONS_OFF =
QMAKE_CXXFLAGS_EXCEPTIONS_OFF = -D_HAS_EXCEPTIONS=0
QMAKE_INCDIR =

View File

@ -36,8 +36,8 @@ QMAKE_CXXFLAGS_RELEASE += -O3
QMAKE_LIBS += -lrt -lpthread -ldl
# Extra stuff (OpenGL, DirectFB, ...)
QMAKE_INCDIR_EGL = $$[QT_SYSROOT]/usr/include
QMAKE_LIBDIR_EGL = $$[QT_SYSROOT]/usr/lib
QMAKE_INCDIR_EGL =
QMAKE_LIBDIR_EGL =
QMAKE_INCDIR_OPENGL_ES2 = $${QMAKE_INCDIR_EGL}
QMAKE_LIBDIR_OPENGL_ES2 = $${QMAKE_LIBDIR_EGL}
QMAKE_INCDIR_OPENVG = $${QMAKE_INCDIR_EGL}

View File

@ -16,15 +16,10 @@
include(../common/linux_device_pre.conf)
QMAKE_INCDIR += $$[QT_SYSROOT]/usr/include
QMAKE_LIBDIR += $$[QT_SYSROOT]/usr/lib
QMAKE_LIBS_EGL += -lEGL
QMAKE_LIBS_OPENGL_ES2 += -lGLESv2 -lEGL
QMAKE_LIBS_OPENVG += -lOpenVG -lEGL
QMAKE_LFLAGS += -Wl,-rpath-link,$$[QT_SYSROOT]/usr/lib
IMX5_CFLAGS = -march=armv7-a -mfpu=neon -DLINUX=1 -DEGL_API_FB=1 -Wno-psabi
QMAKE_CFLAGS += $$IMX5_CFLAGS
QMAKE_CXXFLAGS += $$IMX5_CFLAGS

View File

@ -4,15 +4,10 @@
include(../common/linux_device_pre.conf)
QMAKE_INCDIR += $$[QT_SYSROOT]/usr/include
QMAKE_LIBDIR += $$[QT_SYSROOT]/usr/lib
QMAKE_LIBS_EGL += -lEGL
QMAKE_LIBS_OPENGL_ES2 += -lGLESv2 -lEGL -lGAL
QMAKE_LIBS_OPENVG += -lOpenVG -lEGL -lGAL
QMAKE_LFLAGS += -Wl,-rpath-link,$$[QT_SYSROOT]/usr/lib
IMX6_CFLAGS = -march=armv7-a -mfpu=neon -DLINUX=1 -DEGL_API_FB=1
QMAKE_CFLAGS += $$IMX6_CFLAGS
QMAKE_CXXFLAGS += $$IMX6_CFLAGS

View File

@ -63,6 +63,7 @@ debug {
}
use_gold_linker: QMAKE_LFLAGS += $$QMAKE_LFLAGS_USE_GOLD
enable_new_dtags: QMAKE_LFLAGS += $$QMAKE_LFLAGS_NEW_DTAGS
dll:win32: QMAKE_LFLAGS += $$QMAKE_LFLAGS_DLL
static:mac: QMAKE_LFLAGS += $$QMAKE_LFLAGS_STATIC_LIB

View File

@ -7,3 +7,18 @@ CONFIG = \
lex yacc debug exceptions depend_includepath \
testcase_targets import_plugins import_qpa_plugin \
$$CONFIG
!build_pass:defined(QT_EDITION, var):!equals(QT_EDITION, "OpenSource"):!equals(QT_EDITION, "Preview") {
#
# call license checker (but cache result for one day)
#
today = $$section(_DATE_, " ", 0, 2)
!isEqual(QMAKE_LICHECK_TIMESTAMP, $$today) {
!system("$$system_quote($$system_path($$[QT_HOST_BINS/src]/$$QT_LICHECK)) check" \
"$$QT_RELEASE_DATE $$[QMAKE_SPEC] $$[QMAKE_XSPEC]"): \
error("License check failed! Giving up ...")
cache(QMAKE_LICHECK_TIMESTAMP, set stash, today)
}
unset(today)
}

View File

@ -52,12 +52,6 @@ QMAKE_DIR_REPLACE_SANE = PRECOMPILED_DIR OBJECTS_DIR MOC_DIR RCC_DIR UI_DIR
unset(modpath)
}
mac {
!isEmpty(QMAKE_RPATHDIR){
CONFIG += absolute_library_soname
}
}
cross_compile: \
CONFIG += force_bootstrap

View File

@ -79,6 +79,9 @@ warnings_are_errors:warning_clean {
# Work-around for bug https://code.google.com/p/android/issues/detail?id=58135
android: QMAKE_CXXFLAGS_WARN_ON += -Wno-error=literal-suffix
}
} else:msvc {
# enable for MSVC 2012, MSVC 2013
equals(MSVC_VER, "11.0")|equals(MSVC_VER, "12.0"): QMAKE_CXXFLAGS_WARN_ON += -WX
}
unset(ver)
}

View File

@ -185,7 +185,7 @@ defineTest(qtAddRpathLink) {
# paths OTOH need to be put there.
pubqt = $$replace(1, -private$, _private)
pubdep = $$resolve_depends(pubqt, "QT.")
privdep = $$resolve_depends(pubqt, "QT.", ".depends" ".private_depends" ".run_depends")
privdep = $$resolve_depends(pubqt, "QT.", ".depends" ".run_depends")
privdep -= $$pubdep
rpaths =
for(dep, privdep): \
@ -259,7 +259,7 @@ defineTest(qtAddToolEnv) {
# target variable, dependency var name, [non-empty: prepare for system(), not make]
defineTest(qtAddTargetEnv) {
deps = $$replace($$2, -private$, _private)
deps = $$resolve_depends(deps, "QT.", ".depends" ".private_depends" ".run_depends")
deps = $$resolve_depends(deps, "QT.", ".depends" ".run_depends")
!isEmpty(deps) {
ptypes =
for(dep, deps) {

View File

@ -60,7 +60,7 @@ MODULE_DEFINES = $$MODULE_DEFINE $$MODULE_DEFINES
load(qt_build_paths)
qt_no_install_library {
header_module {
TEMPLATE = aux
CONFIG += force_qt # Needed for the headers_clean tests.
} else {
@ -104,7 +104,7 @@ mac:CONFIG(shared, static|shared):contains(QT_CONFIG, qt_framework) {
QMAKE_TARGET_BUNDLE_PREFIX = org.qt-project
#QMAKE_FRAMEWORK_VERSION = 4.0
CONFIG += sliced_bundle qt_framework
qt_no_install_library {
header_module {
CONFIG += bundle
QMAKE_BUNDLE_EXTENSION = .framework
QMAKE_INFO_PLIST = $$QMAKESPEC/Info.plist.lib
@ -132,6 +132,9 @@ mac {
QMAKE_CFLAGS += -fconstant-cfstrings
QMAKE_CXXFLAGS += -fconstant-cfstrings
}
contains(QT_CONFIG, rpath): \
QMAKE_SONAME_PREFIX = @rpath
}
DEFINES += QT_BUILDING_QT

View File

@ -91,15 +91,22 @@ MODULE_FWD_PRI = $$mod_work_pfx/qt_lib_$${MODULE_ID}.pri
MODULE_PRIVATE_INCLUDES = \$\$QT_MODULE_INCLUDE_BASE/$$MODULE_INCNAME/$$VERSION \
\$\$QT_MODULE_INCLUDE_BASE/$$MODULE_INCNAME/$$VERSION/$$MODULE_INCNAME
}
split_incpath: \
split_incpath {
MODULE_SHADOW_INCLUDES = $$replace(MODULE_INCLUDES, ^\\\$\\\$QT_MODULE_INCLUDE_BASE, \
$$MODULE_BASE_OUTDIR/include)
generated_privates: \
MODULE_SHADOW_PRIVATE_INCLUDES = $$replace(MODULE_PRIVATE_INCLUDES, ^\\\$\\\$QT_MODULE_INCLUDE_BASE, \
$$MODULE_BASE_OUTDIR/include)
}
MODULE_INCLUDES += $$MODULE_AUX_INCLUDES
MODULE_PRIVATE_INCLUDES += $$MODULE_PRIVATE_AUX_INCLUDES
internal_module: \
MODULE_INCLUDES += $$MODULE_PRIVATE_INCLUDES
split_incpath: \
split_incpath {
MODULE_FWD_PRI_CONT_SUFFIX += "QT.$${MODULE_ID}.includes += $$val_escape(MODULE_SHADOW_INCLUDES)"
generated_privates: \
MODULE_FWD_PRI_CONT_SUFFIX += "QT.$${MODULE}_private.includes += $$val_escape(MODULE_SHADOW_PRIVATE_INCLUDES)"
}
MODULE_PRI_CONT = \
"QT.$${MODULE_ID}.VERSION = $${VERSION}" \
"QT.$${MODULE_ID}.MAJOR_VERSION = $$section(VERSION, ., 0, 0)" \

View File

@ -109,9 +109,8 @@ equals(MAKEFILE_GENERATOR, MSBUILD) \
}
QMAKE_INSTALL_DIR = $$QMAKE_COPY_DIR
equals(QMAKE_HOST.os, Windows) {
# Ugly (and broken for relative paths) hack to support cross-building for Unix.
QMAKE_SYMBOLIC_LINK = $$QMAKE_COPY
QMAKE_LN_SHLIB = $$QMAKE_SYMBOLIC_LINK
QMAKE_SYMBOLIC_LINK = $(QMAKE) -install ln -f -s
QMAKE_LN_SHLIB = $(QMAKE) -install ln -s
} else {
QMAKE_SYMBOLIC_LINK = ln -f -s
QMAKE_LN_SHLIB = ln -s

View File

@ -1 +1,2 @@
DEFINES += QT_TESTCASE_BUILDDIR=$$shell_quote(\"$$OUT_PWD\")
contains(TEMPLATE, vc.*): DEFINES += QT_TESTCASE_BUILDDIR=\"$$OUT_PWD\"
else: DEFINES += QT_TESTCASE_BUILDDIR=$$shell_quote(\"$$OUT_PWD\")

View File

@ -12,7 +12,7 @@ QMAKE_LEXFLAGS =
QMAKE_YACC = yacc
QMAKE_YACCFLAGS = -d
QMAKE_CFLAGS =
QMAKE_CFLAGS_APP = -fPIE
QMAKE_CFLAGS_APP = -fPIC
QMAKE_CFLAGS_DEPS = -M
QMAKE_CFLAGS_WARN_ON = -w1 -Wall -Wcheck -wd1572,873,2259,2261
QMAKE_CFLAGS_WARN_OFF = -w

View File

@ -0,0 +1,32 @@
#
# qmake configuration for winrt-arm-msvc2015
#
# Written for Microsoft Visual C++ 2015
#
include(../common/winrt_winphone/qmake.conf)
QMAKE_COMPILER_DEFINES += _MSC_VER=1900
DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_APP ARM __ARM__ __arm__
QMAKE_CFLAGS += -FS
QMAKE_CXXFLAGS += -FS
QMAKE_LFLAGS += /MACHINE:ARM /NODEFAULTLIB:kernel32.lib
QMAKE_LIBS += windowscodecs.lib WindowsApp.lib runtimeobject.lib
# Note that the order is important, ucrt(d) has to be first
# Otherwise the linker might use malloc from a different library
# but free_dbg() from the runtime, causing assert when deleting
# items from different heaps
CONFIG(debug, debug|release) {
QMAKE_LIBS = ucrtd.lib $$QMAKE_LIBS
} else {
QMAKE_LIBS = ucrt.lib $$QMAKE_LIBS
}
VCPROJ_ARCH = ARM
MSVC_VER = 14.0
WINSDK_VER = 10.0
WINTARGET_VER = winv10.0
WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/10.0/AppxManifest.xml.in
WINRT_MANIFEST.architecture = arm

View File

@ -3,7 +3,7 @@
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
** This file is part of the qmake spec of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
@ -30,3 +30,5 @@
** $QT_END_LICENSE$
**
****************************************************************************/
#include "../common/winrt_winphone/qplatformdefs.h"

View File

@ -0,0 +1,32 @@
#
# qmake configuration for winrt-x64-msvc2015
#
# Written for Microsoft Visual C++ 2015
#
include(../common/winrt_winphone/qmake.conf)
QMAKE_COMPILER_DEFINES += _MSC_VER=1900 _WIN32
DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_APP X64 __X64__ __x64__
QMAKE_CFLAGS += -FS
QMAKE_CXXFLAGS += -FS
QMAKE_LFLAGS += /MACHINE:X64 /NODEFAULTLIB:kernel32.lib
QMAKE_LIBS += windowscodecs.lib WindowsApp.lib runtimeobject.lib
# Note that the order is important, ucrt(d) has to be first
# Otherwise the linker might use malloc from a different library
# but free_dbg() from the runtime, causing assert when deleting
# items from different heaps
CONFIG(debug, debug|release) {
QMAKE_LIBS = ucrtd.lib $$QMAKE_LIBS
} else {
QMAKE_LIBS = ucrt.lib $$QMAKE_LIBS
}
VCPROJ_ARCH = x64
MSVC_VER = 14.0
WINSDK_VER = 10.0
WINTARGET_VER = winv10.0
WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/10.0/AppxManifest.xml.in
WINRT_MANIFEST.architecture = x64

View File

@ -3,7 +3,7 @@
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
** This file is part of the qmake spec of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
@ -30,3 +30,5 @@
** $QT_END_LICENSE$
**
****************************************************************************/
#include "../common/winrt_winphone/qplatformdefs.h"

View File

@ -0,0 +1,32 @@
#
# qmake configuration for winrt-x86-msvc2015
#
# Written for Microsoft Visual C++ 2015
#
include(../common/winrt_winphone/qmake.conf)
QMAKE_COMPILER_DEFINES += _MSC_VER=1900 _WIN32
DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_APP X86 __X86__ __x86__
QMAKE_CFLAGS += -FS
QMAKE_CXXFLAGS += -FS
QMAKE_LFLAGS += /SAFESEH /MACHINE:X86 /NODEFAULTLIB:kernel32.lib
QMAKE_LIBS += windowscodecs.lib WindowsApp.lib runtimeobject.lib
# Note that the order is important, ucrt(d) has to be first
# Otherwise the linker might use malloc from a different library
# but free_dbg() from the runtime, causing assert when deleting
# items from different heaps
CONFIG(debug, debug|release) {
QMAKE_LIBS = ucrtd.lib $$QMAKE_LIBS
} else {
QMAKE_LIBS = ucrt.lib $$QMAKE_LIBS
}
VCPROJ_ARCH = Win32
MSVC_VER = 14.0
WINSDK_VER = 10.0
WINTARGET_VER = winv10.0
WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/10.0/AppxManifest.xml.in
WINRT_MANIFEST.architecture = x86

View File

@ -3,7 +3,7 @@
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
** This file is part of the qmake spec of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
@ -30,3 +30,5 @@
** $QT_END_LICENSE$
**
****************************************************************************/
#include "../common/winrt_winphone/qplatformdefs.h"

View File

@ -810,7 +810,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
if(!project->isActiveConfig("staticlib")) { //DUMP LIBRARIES
ProStringList &libdirs = project->values("QMAKE_PBX_LIBPATHS"),
&frameworkdirs = project->values("QMAKE_FRAMEWORKPATH");
static const char * const libs[] = { "QMAKE_LFLAGS", "QMAKE_LIBS", "QMAKE_LIBS_PRIVATE", 0 };
static const char * const libs[] = { "QMAKE_LIBS", "QMAKE_LIBS_PRIVATE", 0 };
for (int i = 0; libs[i]; i++) {
tmp = project->values(libs[i]);
for(int x = 0; x < tmp.count();) {
@ -821,9 +821,6 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
QString r = opt.mid(2).toQString();
fixForOutput(r);
libdirs.append(r);
} else if(opt == "-prebind") {
project->values("QMAKE_DO_PREBINDING").append("TRUE");
remove = true;
} else if(opt.startsWith("-l")) {
name = opt.mid(2).toQString();
QString lib("lib" + name);
@ -921,7 +918,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
if(!path.isEmpty() && !libdirs.contains(path))
libdirs += path;
}
library = fileFixify(library, FileFixifyFromOutdir);
library = fileFixify(library, FileFixifyFromOutdir | FileFixifyAbsolute);
QString key = keyFor(library);
if (!project->values("QMAKE_PBX_LIBRARIES").contains(key)) {
bool is_frmwrk = (library.endsWith(".framework"));
@ -1812,11 +1809,14 @@ ProjectBuilderMakefileGenerator::openOutput(QFile &file, const QString &build) c
}
output += QString("project.pbxproj");
file.setFileName(output);
}
bool ret = UnixMakefileGenerator::openOutput(file, build);
((ProjectBuilderMakefileGenerator*)this)->pbx_dir = Option::output_dir.section(Option::dir_sep, 0, -1);
Option::output_dir = pbx_dir.section(Option::dir_sep, 0, -2);
return ret;
}
((ProjectBuilderMakefileGenerator*)this)->pbx_dir = Option::output_dir;
return UnixMakefileGenerator::openOutput(file, build);
}
/* This function is such a hack it is almost pointless, but it

View File

@ -2019,7 +2019,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
for(int i = 0; i < pre_deps.size(); ++i)
deps << replaceExtraCompilerVariables(pre_deps.at(i), inpf, out, NoShell);
}
QString cmd = replaceExtraCompilerVariables(tmp_cmd, inpf, out, LocalShell);
QString cmd = replaceExtraCompilerVariables(tmp_cmd, inpf, out, TargetShell);
// NOTE: The var -> QMAKE_COMP_var replace feature is unsupported, do not use!
for (ProStringList::ConstIterator it3 = vars.constBegin(); it3 != vars.constEnd(); ++it3)
cmd.replace("$(" + (*it3) + ")", "$(QMAKE_COMP_" + (*it3)+")");
@ -2240,7 +2240,7 @@ QString MakefileGenerator::buildArgs()
QString ret;
foreach (const QString &arg, Option::globals->qmake_args)
ret += " " + escapeFilePath(arg);
ret += " " + shellQuote(arg);
return ret;
}

View File

@ -612,7 +612,7 @@ UnixMakefileGenerator::processPrlFiles()
ProStringList &prl_libs = project->values("QMAKE_CURRENT_PRL_LIBS");
if(!prl_libs.isEmpty()) {
for(int prl = 0; prl < prl_libs.size(); ++prl)
l.insert(lit+prl+1, prl_libs.at(prl).toQString());
l.insert(++lit, prl_libs.at(prl));
prl_libs.clear();
}
}
@ -699,6 +699,7 @@ UnixMakefileGenerator::defaultInstall(const QString &t)
return QString();
enum { NoBundle, SolidBundle, SlicedBundle } bundle = NoBundle;
bool isAux = (project->first("TEMPLATE") == "aux");
const QString root = "$(INSTALL_ROOT)";
ProStringList &uninst = project->values(ProKey(t + ".uninstall"));
QString ret, destdir = project->first("DESTDIR").toQString();
@ -773,21 +774,21 @@ UnixMakefileGenerator::defaultInstall(const QString &t)
}
src_targ = escapeFilePath(src_targ);
dst_targ = escapeFilePath(dst_targ);
if(!ret.isEmpty())
ret += "\n\t";
QString copy_cmd("-");
QString copy_cmd;
if (bundle == SolidBundle) {
copy_cmd += "$(INSTALL_DIR) " + src_targ + ' ' + plain_targ;
copy_cmd += "-$(INSTALL_DIR) " + src_targ + ' ' + plain_targ;
} else if (project->first("TEMPLATE") == "lib" && project->isActiveConfig("staticlib")) {
copy_cmd += "$(INSTALL_FILE) " + src_targ + ' ' + dst_targ;
} else {
copy_cmd += "-$(INSTALL_FILE) " + src_targ + ' ' + dst_targ;
} else if (!isAux) {
if (bundle == SlicedBundle)
ret += mkdir_p_asstring("\"`dirname " + dst_targ + "`\"", false) + "\n\t";
copy_cmd += "$(INSTALL_PROGRAM) " + src_targ + ' ' + dst_targ;
copy_cmd += "-$(INSTALL_PROGRAM) " + src_targ + ' ' + dst_targ;
}
if(project->first("TEMPLATE") == "lib" && !project->isActiveConfig("staticlib")
&& project->values(ProKey(t + ".CONFIG")).indexOf("fix_rpath") != -1) {
if (!ret.isEmpty())
ret += "\n\t";
if(!project->isEmpty("QMAKE_FIX_RPATH")) {
ret += copy_cmd;
ret += "\n\t-" + var("QMAKE_FIX_RPATH") + ' ' + dst_targ + ' ' + dst_targ;
@ -797,11 +798,14 @@ UnixMakefileGenerator::defaultInstall(const QString &t)
} else {
ret += copy_cmd;
}
} else {
} else if (!copy_cmd.isEmpty()) {
if (!ret.isEmpty())
ret += "\n\t";
ret += copy_cmd;
}
if(project->first("TEMPLATE") == "lib" && project->isActiveConfig("staticlib")) {
if (isAux) {
} else if (project->first("TEMPLATE") == "lib" && project->isActiveConfig("staticlib")) {
if(!project->isEmpty("QMAKE_RANLIB"))
ret += QString("\n\t$(RANLIB) ") + dst_targ;
} else if (!project->isActiveConfig("debug_info") && !project->isActiveConfig("nostrip")
@ -820,7 +824,7 @@ UnixMakefileGenerator::defaultInstall(const QString &t)
uninst.append("\n\t");
if (bundle == SolidBundle)
uninst.append("-$(DEL_FILE) -r " + plain_targ);
else
else if (!isAux)
uninst.append("-$(DEL_FILE) " + dst_targ);
if (bundle == SlicedBundle) {
int dstlen = project->first("DESTDIR").length();

View File

@ -922,6 +922,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
}
}
}
if (!symlinks.isEmpty()) {
QString bundle_dir_f = escapeFilePath(bundle_dir);
QHash<QString, QString>::ConstIterator symIt = symlinks.constBegin(),
symEnd = symlinks.constEnd();
@ -932,7 +933,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
<< mkdir_p_asstring(bundle_dir) << "\n\t"
<< "@$(SYMLINK) " << escapeFilePath(symIt.value()) << ' ' << bundle_dir_f << endl;
}
if (!project->first("QMAKE_FRAMEWORK_VERSION").isEmpty()) {
QString currentLink = bundle_dir + "Versions/Current";
QString currentLink_f = escapeDependencyPath(currentLink);
bundledFiles << currentLink;

View File

@ -608,10 +608,13 @@ void VCXProjectWriter::write(XmlOutput &xml, VCProject &tool)
xml.setIndentString(" ");
const QString toolsVersion = (tool.SdkVersion == QStringLiteral("10.0")) ? QStringLiteral("14.0")
: QStringLiteral("4.0");
xml << decl("1.0", "utf-8")
<< tag("Project")
<< attrTag("DefaultTargets","Build")
<< attrTag("ToolsVersion", "4.0")
<< attrTag("ToolsVersion", toolsVersion)
<< attrTag("xmlns", "http://schemas.microsoft.com/developer/msbuild/2003")
<< tag("ItemGroup")
<< attrTag("Label", "ProjectConfigurations");
@ -640,7 +643,7 @@ void VCXProjectWriter::write(XmlOutput &xml, VCProject &tool)
<< tagValue("DefaultLanguage", "en")
<< tagValue("AppContainerApplication", "true")
<< tagValue("ApplicationType", isWinPhone ? "Windows Phone" : "Windows Store")
<< tagValue("ApplicationTypeRevision", tool.SdkVersion);
<< tagValue("ApplicationTypeRevision", tool.SdkVersion == "10.0" ? "8.2" : tool.SdkVersion);
}
xml << closetag();

View File

@ -176,11 +176,34 @@ NmakeMakefileGenerator::writeMakefile(QTextStream &t)
const QString vcInstallDir = "/fake/vc_install_dir";
const QString kitDir = "/fake/sdk_install_dir";
#endif // Q_OS_WIN
QStringList incDirs;
QStringList libDirs;
QStringList binDirs;
if (isPhone) {
if (msvcVer == QStringLiteral("14.0")) {
binDirs << vcInstallDir + QStringLiteral("bin/") + compiler;
binDirs << vcInstallDir + QStringLiteral("bin/"); // Maybe remove for x86 again?
binDirs << kitDir + QStringLiteral("bin/") + (arch == QStringLiteral("arm") ? QStringLiteral("x86") : arch);
binDirs << vcInstallDir + QStringLiteral("../Common7/Tools/bin");
binDirs << vcInstallDir + QStringLiteral("../Common7/Tools");
binDirs << vcInstallDir + QStringLiteral("../Common7/ide");
binDirs << kitDir + QStringLiteral("Windows Performance Toolkit/");
incDirs << vcInstallDir + QStringLiteral("include");
incDirs << vcInstallDir + QStringLiteral("atlmfc/include");
// ### Investigate why VS uses 10056 first
incDirs << kitDir + QStringLiteral("Include/10.0.10056.0/ucrt");
incDirs << kitDir + QStringLiteral("Include/10.0.10069.0/ucrt");
incDirs << kitDir + QStringLiteral("Include/10.0.10069.0/um");
incDirs << kitDir + QStringLiteral("Include/10.0.10069.0/shared");
incDirs << kitDir + QStringLiteral("Include/10.0.10069.0/winrt");
libDirs << vcInstallDir + QStringLiteral("lib/store/") + compilerArch;
libDirs << vcInstallDir + QStringLiteral("atlmfc/lib") + compilerArch;
// ### Investigate why VS uses 10056 first
libDirs << kitDir + QStringLiteral("lib/10.0.10056.0/ucrt/") + arch;
libDirs << kitDir + QStringLiteral("lib/10.0.10069.0/ucrt/") + arch;
libDirs << kitDir + QStringLiteral("lib/10.0.10069.0/um/") + arch;
} else if (isPhone) {
QString sdkDir = vcInstallDir;
if (!QDir(sdkDir).exists()) {
fprintf(stderr, "Failed to find the Windows Phone SDK in %s.\n"
@ -208,7 +231,6 @@ NmakeMakefileGenerator::writeMakefile(QTextStream &t)
<< kitDir + QStringLiteral("/include/shared")
<< kitDir + QStringLiteral("/include/winrt");
}
// Inherit PATH
binDirs << QString::fromLocal8Bit(qgetenv("PATH")).split(QLatin1Char(';'));

View File

@ -56,7 +56,8 @@ enum DotNET {
NET2008 = 0x90,
NET2010 = 0xa0,
NET2012 = 0xb0,
NET2013 = 0xc0
NET2013 = 0xc0,
NET2015 = 0xd0
};
/*

View File

@ -71,6 +71,7 @@ struct DotNetCombo {
const char *regKey;
} dotNetCombo[] = {
#ifdef Q_OS_WIN64
{NET2015, "MSVC.NET 2015 (14.0)", "Software\\Wow6432Node\\Microsoft\\VisualStudio\\14.0\\Setup\\VC\\ProductDir"},
{NET2013, "MSVC.NET 2013 (12.0)", "Software\\Wow6432Node\\Microsoft\\VisualStudio\\12.0\\Setup\\VC\\ProductDir"},
{NET2013, "MSVC.NET 2013 Express Edition (12.0)", "Software\\Wow6432Node\\Microsoft\\VCExpress\\12.0\\Setup\\VC\\ProductDir"},
{NET2012, "MSVC.NET 2012 (11.0)", "Software\\Wow6432Node\\Microsoft\\VisualStudio\\11.0\\Setup\\VC\\ProductDir"},
@ -84,6 +85,7 @@ struct DotNetCombo {
{NET2003, "MSVC.NET 2003 (7.1)", "Software\\Wow6432Node\\Microsoft\\VisualStudio\\7.1\\Setup\\VC\\ProductDir"},
{NET2002, "MSVC.NET 2002 (7.0)", "Software\\Wow6432Node\\Microsoft\\VisualStudio\\7.0\\Setup\\VC\\ProductDir"},
#else
{NET2015, "MSVC.NET 2015 (14.0)", "Software\\Microsoft\\VisualStudio\\14.0\\Setup\\VC\\ProductDir"},
{NET2013, "MSVC.NET 2013 (12.0)", "Software\\Microsoft\\VisualStudio\\12.0\\Setup\\VC\\ProductDir"},
{NET2013, "MSVC.NET 2013 Express Edition (12.0)", "Software\\Microsoft\\VCExpress\\12.0\\Setup\\VC\\ProductDir"},
{NET2012, "MSVC.NET 2012 (11.0)", "Software\\Microsoft\\VisualStudio\\11.0\\Setup\\VC\\ProductDir"},
@ -175,6 +177,8 @@ const char _slnHeader110[] = "Microsoft Visual Studio Solution File, Format
"\n# Visual Studio 2012";
const char _slnHeader120[] = "Microsoft Visual Studio Solution File, Format Version 12.00"
"\n# Visual Studio 2013";
const char _slnHeader140[] = "Microsoft Visual Studio Solution File, Format Version 12.00"
"\n# Visual Studio 2015";
// The following UUID _may_ change for later servicepacks...
// If so we need to search through the registry at
// HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.0\Projects
@ -401,6 +405,8 @@ QString VcprojGenerator::retrievePlatformToolSet() const
return QStringLiteral("v110") + suffix;
case NET2013:
return QStringLiteral("v120") + suffix;
case NET2015:
return QStringLiteral("v140") + suffix;
default:
return QString();
}
@ -647,6 +653,8 @@ void VcprojGenerator::writeSubDirs(QTextStream &t)
}
switch (which_dotnet_version(project->first("MSVC_VER").toLatin1())) {
case NET2015:
t << _slnHeader140;
case NET2013:
t << _slnHeader120;
break;
@ -972,6 +980,9 @@ void VcprojGenerator::initProject()
// Own elements -----------------------------
vcProject.Name = project->first("QMAKE_ORIG_TARGET").toQString();
switch (which_dotnet_version(project->first("MSVC_VER").toLatin1())) {
case NET2015:
vcProject.Version = "14.00";
break;
case NET2013:
vcProject.Version = "12.00";
break;

View File

@ -100,10 +100,13 @@ ProString Win32MakefileGenerator::fixLibFlag(const ProString &lib)
{
if (lib.startsWith('/')) {
if (lib.startsWith("/LIBPATH:"))
return QStringLiteral("/LIBPATH:") + escapeFilePath(lib.mid(9));
return QLatin1String("/LIBPATH:")
+ escapeFilePath(Option::fixPathToTargetOS(lib.mid(9).toQString(), false));
// This appears to be a user-supplied flag. Assume sufficient quoting.
return lib;
}
return escapeFilePath(lib);
// This must be a fully resolved library path.
return escapeFilePath(Option::fixPathToTargetOS(lib.toQString(), false));
}
bool
@ -231,7 +234,7 @@ Win32MakefileGenerator::processPrlFiles()
}
ProStringList &prl_libs = project->values("QMAKE_CURRENT_PRL_LIBS");
for (int prl = 0; prl < prl_libs.size(); ++prl)
l.insert(lit + prl + 1, prl_libs.at(prl));
l.insert(++lit, prl_libs.at(prl));
prl_libs.clear();
}
@ -791,7 +794,7 @@ QString Win32MakefileGenerator::defaultInstall(const QString &t)
{
if((t != "target" && t != "dlltarget") ||
(t == "dlltarget" && (project->first("TEMPLATE") != "lib" || !project->isActiveConfig("shared"))) ||
project->first("TEMPLATE") == "subdirs")
project->first("TEMPLATE") == "subdirs" || project->first("TEMPLATE") == "aux")
return QString();
const QString root = "$(INSTALL_ROOT)";

View File

@ -159,6 +159,18 @@ QString &ProString::toQString(QString &tmp) const
return tmp.setRawData(m_string.constData() + m_offset, m_length);
}
/*!
* \brief ProString::prepareExtend
* \param extraLen number of new characters to be added
* \param thisTarget offset to which current contents should be moved
* \param extraTarget offset at which new characters will be added
* \return pointer to storage location for new characters
*
* Prepares the string for adding new characters.
* If the string is detached and has enough space, it will be changed in place.
* Otherwise, it will be replaced with a new string object, thus detaching.
* In either case, the hash will be reset.
*/
QChar *ProString::prepareExtend(int extraLen, int thisTarget, int extraTarget)
{
if (m_string.isDetached() && m_length + extraLen <= m_string.capacity()) {
@ -473,4 +485,23 @@ ProFile::~ProFile()
{
}
ProString ProFile::getStr(const ushort *&tPtr)
{
uint len = *tPtr++;
ProString ret(items(), tPtr - tokPtr(), len);
ret.setSource(this);
tPtr += len;
return ret;
}
ProKey ProFile::getHashStr(const ushort *&tPtr)
{
uint hash = *tPtr++;
hash |= (uint)*tPtr++ << 16;
uint len = *tPtr++;
ProKey ret(items(), tPtr - tokPtr(), len, hash);
tPtr += len;
return ret;
}
QT_END_NAMESPACE

View File

@ -352,6 +352,9 @@ public:
bool isHostBuild() const { return m_hostBuild; }
void setHostBuild(bool host_build) { m_hostBuild = host_build; }
ProString getStr(const ushort *&tPtr);
ProKey getHashStr(const ushort *&tPtr);
private:
ProItemRefCount m_refCount;
QString m_proitems;

View File

@ -214,7 +214,7 @@ static QString windowsErrorCode()
NULL);
QString ret = QString::fromWCharArray(string);
LocalFree((HLOCAL)string);
return ret;
return ret.trimmed();
}
#endif
@ -362,7 +362,7 @@ QMakeEvaluator::writeFile(const QString &ctx, const QString &fn, QIODevice::Open
{
QString errStr;
if (!m_vfs->writeFile(fn, mode, contents, &errStr)) {
evalError(fL1S("Cannot write %1file %2: %3.")
evalError(fL1S("Cannot write %1file %2: %3")
.arg(ctx, QDir::toNativeSeparators(fn), errStr));
return ReturnFalse;
}
@ -1121,7 +1121,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinConditional(
switch (func_t) {
case T_DEFINED: {
if (args.count() < 1 || args.count() > 2) {
evalError(fL1S("defined(function, [\"test\"|\"replace\"])"
evalError(fL1S("defined(function, [\"test\"|\"replace\"|\"var\"])"
" requires one or two arguments."));
return ReturnFalse;
}
@ -1582,7 +1582,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinConditional(
GENERIC_READ, FILE_SHARE_READ,
NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if (rHand == INVALID_HANDLE_VALUE) {
evalError(fL1S("Cannot open() reference file %1: %2.").arg(rfn, windowsErrorCode()));
evalError(fL1S("Cannot open reference file %1: %2").arg(rfn, windowsErrorCode()));
return ReturnFalse;
}
FILETIME ft;
@ -1592,7 +1592,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinConditional(
GENERIC_WRITE, FILE_SHARE_READ,
NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if (wHand == INVALID_HANDLE_VALUE) {
evalError(fL1S("Cannot open() %1: %2.").arg(tfn, windowsErrorCode()));
evalError(fL1S("Cannot open %1: %2").arg(tfn, windowsErrorCode()));
return ReturnFalse;
}
SetFileTime(wHand, 0, 0, &ft);

View File

@ -259,24 +259,6 @@ uint QMakeEvaluator::getBlockLen(const ushort *&tokPtr)
return len;
}
ProString QMakeEvaluator::getStr(const ushort *&tokPtr)
{
uint len = *tokPtr++;
ProString ret(m_current.pro->items(), tokPtr - m_current.pro->tokPtr(), len);
ret.setSource(m_current.pro);
tokPtr += len;
return ret;
}
ProKey QMakeEvaluator::getHashStr(const ushort *&tokPtr)
{
uint hash = getBlockLen(tokPtr);
uint len = *tokPtr++;
ProKey ret(m_current.pro->items(), tokPtr - m_current.pro->tokPtr(), len, hash);
tokPtr += len;
return ret;
}
void QMakeEvaluator::skipStr(const ushort *&tokPtr)
{
uint len = *tokPtr++;
@ -315,6 +297,7 @@ ProStringList QMakeEvaluator::split_value_list(const QString &vals, const ProFil
switch (unicode) {
case '"':
case '\'':
if (!quote)
quote = unicode;
hadWord = true;
break;
@ -430,6 +413,7 @@ void QMakeEvaluator::evaluateExpression(
const ushort *&tokPtr, ProStringList *ret, bool joined)
{
debugMsg(2, joined ? "evaluating joined expression" : "evaluating expression");
ProFile *pro = m_current.pro;
if (joined)
*ret << ProString();
bool pending = false;
@ -445,35 +429,35 @@ void QMakeEvaluator::evaluateExpression(
m_current.line = *tokPtr++;
break;
case TokLiteral: {
const ProString &val = getStr(tokPtr);
const ProString &val = pro->getStr(tokPtr);
debugMsg(2, "literal %s", dbgStr(val));
addStr(val, ret, pending, joined);
break; }
case TokHashLiteral: {
const ProKey &val = getHashStr(tokPtr);
const ProKey &val = pro->getHashStr(tokPtr);
debugMsg(2, "hashed literal %s", dbgStr(val.toString()));
addStr(val, ret, pending, joined);
break; }
case TokVariable: {
const ProKey &var = getHashStr(tokPtr);
const ProKey &var = pro->getHashStr(tokPtr);
const ProStringList &val = values(map(var));
debugMsg(2, "variable %s => %s", dbgKey(var), dbgStrList(val));
addStrList(val, tok, ret, pending, joined);
break; }
case TokProperty: {
const ProKey &var = getHashStr(tokPtr);
const ProKey &var = pro->getHashStr(tokPtr);
const ProString &val = propertyValue(var);
debugMsg(2, "property %s => %s", dbgKey(var), dbgStr(val));
addStr(val, ret, pending, joined);
break; }
case TokEnvVar: {
const ProString &var = getStr(tokPtr);
const ProString &var = pro->getStr(tokPtr);
const ProString &val = ProString(m_option->getEnv(var.toQString(m_tmp1)));
debugMsg(2, "env var %s => %s", dbgStr(var), dbgStr(val));
addStr(val, ret, pending, joined);
break; }
case TokFuncName: {
const ProKey &func = getHashStr(tokPtr);
const ProKey &func = pro->getHashStr(tokPtr);
debugMsg(2, "function %s", dbgKey(func));
addStrList(evaluateExpandFunction(func, tokPtr), tok, ret, pending, joined);
break; }
@ -538,6 +522,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::visitProBlock(
{
traceMsg("entering block");
ProStringList curr;
ProFile *pro = m_current.pro;
bool okey = true, or_op = false, invert = false;
uint blockLen;
while (ushort tok = *tokPtr++) {
@ -597,7 +582,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::visitProBlock(
blockLen = getBlockLen(tokPtr);
ret = visitProBlock(tokPtr);
} else if (okey != or_op) {
const ProKey &variable = getHashStr(tokPtr);
const ProKey &variable = pro->getHashStr(tokPtr);
uint exprLen = getBlockLen(tokPtr);
const ushort *exprPtr = tokPtr;
tokPtr += exprLen;
@ -617,7 +602,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::visitProBlock(
case TokTestDef:
case TokReplaceDef:
if (m_cumulative || okey != or_op) {
const ProKey &name = getHashStr(tokPtr);
const ProKey &name = pro->getHashStr(tokPtr);
blockLen = getBlockLen(tokPtr);
visitProFunctionDef(tok, name, tokPtr);
traceMsg("defined %s function %s",
@ -797,8 +782,8 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::visitProLoop(
forever {
if (infinite) {
if (!variable.isEmpty())
m_valuemapStack.top()[variable] = ProStringList(ProString(QString::number(index++)));
if (index > 1000) {
m_valuemapStack.top()[variable] = ProStringList(ProString(QString::number(index)));
if (++index > 1000) {
evalError(fL1S("Ran into infinite loop (> 1000 iterations)."));
break;
}

View File

@ -150,8 +150,6 @@ public:
{ return b ? ReturnTrue : ReturnFalse; }
static ALWAYS_INLINE uint getBlockLen(const ushort *&tokPtr);
ProString getStr(const ushort *&tokPtr);
ProKey getHashStr(const ushort *&tokPtr);
void evaluateExpression(const ushort *&tokPtr, ProStringList *ret, bool joined);
static ALWAYS_INLINE void skipStr(const ushort *&tokPtr);
static ALWAYS_INLINE void skipHashStr(const ushort *&tokPtr);

View File

@ -135,6 +135,7 @@ public:
bool initProperties();
# else
void setProperties(const QHash<QString, QString> &props);
void setProperties(const QHash<ProKey, ProString> &props) { properties = props; }
# endif
ProString propertyValue(const ProKey &name) const { return properties.value(name); }
#endif

View File

@ -163,6 +163,75 @@ static int doSed(int argc, char **argv)
return 0;
}
static int doLink(int argc, char **argv)
{
bool isSymlink = false;
bool force = false;
QList<const char *> inFiles;
for (int i = 0; i < argc; i++) {
if (!strcmp(argv[i], "-s")) {
isSymlink = true;
} else if (!strcmp(argv[i], "-f")) {
force = true;
} else if (argv[i][0] == '-') {
fprintf(stderr, "Error: unrecognized ln option '%s'\n", argv[i]);
return 3;
} else {
inFiles << argv[i];
}
}
if (inFiles.size() != 2) {
fprintf(stderr, "Error: this ln requires exactly two file arguments\n");
return 3;
}
if (!isSymlink) {
fprintf(stderr, "Error: this ln supports faking symlinks only\n");
return 3;
}
QString target = QString::fromLocal8Bit(inFiles[0]);
QString linkname = QString::fromLocal8Bit(inFiles[1]);
QDir destdir;
QFileInfo tfi(target);
QFileInfo lfi(linkname);
if (lfi.isDir()) {
destdir.setPath(linkname);
lfi.setFile(destdir, tfi.fileName());
} else {
destdir.setPath(lfi.path());
}
if (!destdir.exists()) {
fprintf(stderr, "Error: destination directory %s does not exist\n", qPrintable(destdir.path()));
return 1;
}
tfi.setFile(destdir.absoluteFilePath(tfi.filePath()));
if (!tfi.exists()) {
fprintf(stderr, "Error: this ln does not support symlinking non-existing targets\n");
return 3;
}
if (tfi.isDir()) {
fprintf(stderr, "Error: this ln does not support symlinking directories\n");
return 3;
}
if (lfi.exists()) {
if (!force) {
fprintf(stderr, "Error: %s exists\n", qPrintable(lfi.filePath()));
return 1;
}
if (!QFile::remove(lfi.filePath())) {
fprintf(stderr, "Error: cannot overwrite %s\n", qPrintable(lfi.filePath()));
return 1;
}
}
if (!QFile::copy(tfi.filePath(), lfi.filePath())) {
fprintf(stderr, "Error: cannot copy %s to %s\n",
qPrintable(tfi.filePath()), qPrintable(lfi.filePath()));
return 1;
}
return 0;
}
static int doInstall(int argc, char **argv)
{
if (!argc) {
@ -171,6 +240,8 @@ static int doInstall(int argc, char **argv)
}
if (!strcmp(argv[0], "sed"))
return doSed(argc - 1, argv + 1);
if (!strcmp(argv[0], "ln"))
return doLink(argc - 1, argv + 1);
fprintf(stderr, "Error: unrecognized -install subcommand '%s'\n", argv[0]);
return 3;
}

View File

@ -46,6 +46,11 @@ equals(QMAKE_HOST.os, Windows) {
}
INSTALLS += qmake
#licheck
licheck.path = $$[QT_HOST_BINS]
licheck.files = $$PWD/bin/$$QT_LICHECK
exists($$licheck.files): INSTALLS += licheck
#syncqt
syncqt.path = $$[QT_HOST_BINS]
syncqt.files = $$PWD/bin/syncqt.pl

View File

@ -189,6 +189,7 @@ egl::Error SurfaceD3D::swapRect(EGLint x, EGLint y, EGLint width, EGLint height)
return egl::Error(EGL_SUCCESS);
}
#if !defined(ANGLE_ENABLE_WINDOWS_STORE) || (defined(ANGLE_ENABLE_WINDOWS_STORE) && WINAPI_FAMILY == WINAPI_FAMILY_PC_APP) // Qt WP: eglPostSubBufferNV comes here
if (x + width > mWidth)
{
width = mWidth - x;
@ -198,6 +199,7 @@ egl::Error SurfaceD3D::swapRect(EGLint x, EGLint y, EGLint width, EGLint height)
{
height = mHeight - y;
}
#endif
if (width == 0 || height == 0)
{

View File

@ -38,7 +38,7 @@ class InspectableNativeWindow;
using namespace Microsoft::WRL;
using namespace Microsoft::WRL::Wrappers;
#else
#elif defined(ANGLE_ENABLE_D3D11)
typedef IDXGISwapChain DXGISwapChain;
typedef IDXGIFactory DXGIFactory;
#endif
@ -60,9 +60,11 @@ class NativeWindow
#endif
static bool isValidNativeWindow(EGLNativeWindowType window);
#if defined(ANGLE_ENABLE_D3D11)
HRESULT createSwapChain(ID3D11Device* device, DXGIFactory* factory,
DXGI_FORMAT format, UINT width, UINT height,
DXGISwapChain** swapChain);
#endif
inline EGLNativeWindowType getNativeWindow() const { return mWindow; }

View File

@ -552,18 +552,18 @@ EGLint SwapChain11::swapRect(EGLint x, EGLint y, EGLint width, EGLint height)
d3d11::PositionTexCoordVertex *vertices = static_cast<d3d11::PositionTexCoordVertex*>(mappedResource.pData);
// Create a quad in homogeneous coordinates
float x1 = (x / float(mWidth)) * 2.0f - 1.0f;
float y1 = (y / float(mHeight)) * 2.0f - 1.0f;
float x2 = ((x + width) / float(mWidth)) * 2.0f - 1.0f;
float y2 = ((y + height) / float(mHeight)) * 2.0f - 1.0f;
#if defined(ANGLE_ENABLE_WINDOWS_STORE) && (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
// Create a quad in homogeneous coordinates
float x1 = -1.0f;
float y1 = -1.0f;
float x2 = 1.0f;
float y2 = 1.0f;
const float dim = std::max(mWidth, mHeight);
float u1 = x / dim;
float v1 = y / dim;
float u2 = (x + width) / dim;
float v2 = (y + height) / dim;
float u1 = 0;
float v1 = 0;
float u2 = float(width) / dim;
float v2 = float(height) / dim;
const NativeWindow::RotationFlags flags = mNativeWindow.rotationFlags();
const bool rotateL = flags == NativeWindow::RotateLeft;
@ -573,6 +573,12 @@ EGLint SwapChain11::swapRect(EGLint x, EGLint y, EGLint width, EGLint height)
d3d11::SetPositionTexCoordVertex(&vertices[2], x2, y1, rotateR ? u1 : u2, rotateL ? v2 : v1);
d3d11::SetPositionTexCoordVertex(&vertices[3], x2, y2, rotateL ? u1 : u2, rotateR ? v1 : v2);
#else
// Create a quad in homogeneous coordinates
float x1 = (x / float(mWidth)) * 2.0f - 1.0f;
float y1 = (y / float(mHeight)) * 2.0f - 1.0f;
float x2 = ((x + width) / float(mWidth)) * 2.0f - 1.0f;
float y2 = ((y + height) / float(mHeight)) * 2.0f - 1.0f;
float u1 = x / float(mWidth);
float v1 = y / float(mHeight);
float u2 = (x + width) / float(mWidth);
@ -613,8 +619,8 @@ EGLint SwapChain11::swapRect(EGLint x, EGLint y, EGLint width, EGLint height)
viewport.TopLeftX = 0;
viewport.TopLeftY = 0;
#if defined(ANGLE_ENABLE_WINDOWS_STORE) && (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
viewport.Width = (rotateL || rotateR) ? mHeight : mWidth;
viewport.Height = (rotateL || rotateR) ? mWidth : mHeight;
viewport.Width = (rotateL || rotateR) ? height : width;
viewport.Height = (rotateL || rotateR) ? width : height;
#else
viewport.Width = mWidth;
viewport.Height = mHeight;

View File

@ -37,6 +37,7 @@ bool NativeWindow::isValidNativeWindow(EGLNativeWindowType window)
return IsWindow(window) == TRUE;
}
#if defined(ANGLE_ENABLE_D3D11)
HRESULT NativeWindow::createSwapChain(ID3D11Device* device, DXGIFactory* factory,
DXGI_FORMAT format, unsigned int width, unsigned int height,
DXGISwapChain** swapChain)
@ -65,4 +66,5 @@ HRESULT NativeWindow::createSwapChain(ID3D11Device* device, DXGIFactory* factory
return factory->CreateSwapChain(device, &swapChainDesc, swapChain);
}
#endif
}

View File

@ -100,6 +100,7 @@ bool CoreWindowNativeWindow::registerForSizeChangeEvents()
if (SUCCEEDED(result))
{
result = mDisplayInformation->add_OrientationChanged(orientationChangedHandler.Get(), &mOrientationChangedEventToken);
orientationChangedHandler->Invoke(mDisplayInformation.Get(), nullptr);
}
#endif
@ -135,8 +136,8 @@ HRESULT CoreWindowNativeWindow::createSwapChain(ID3D11Device *device, DXGIFactor
}
DXGI_SWAP_CHAIN_DESC1 swapChainDesc = { 0 };
swapChainDesc.Width = width;
swapChainDesc.Height = height;
swapChainDesc.Width = mRotationFlags ? height : width;
swapChainDesc.Height = mRotationFlags ? width : height;
swapChainDesc.Format = format;
swapChainDesc.Stereo = FALSE;
swapChainDesc.SampleDesc.Count = 1;

View File

@ -101,12 +101,14 @@ EGLBoolean EGLAPIENTRY PostSubBufferNV(EGLDisplay dpy, EGLSurface surface, EGLin
return EGL_FALSE;
}
#if !defined(ANGLE_ENABLE_WINDOWS_STORE) || (defined(ANGLE_ENABLE_WINDOWS_STORE) && WINAPI_FAMILY == WINAPI_FAMILY_PC_APP) // Qt WP: Allow this entry point as a workaround
if (!display->getExtensions().postSubBuffer)
{
// Spec is not clear about how this should be handled.
SetGlobalError(Error(EGL_SUCCESS));
return EGL_TRUE;
}
#endif
error = eglSurface->postSubBuffer(x, y, width, height);
if (error.isError())

View File

@ -63,7 +63,7 @@
# include <Availability.h>
# include <AvailabilityMacros.h>
# if MAC_OS_X_VERSION_MIN_REQUIRED <= 1070
# define HAVE_BROKEN_WAITID_ALL 1
# define HAVE_BROKEN_WAITID 1
# endif
#endif
@ -109,10 +109,10 @@ static struct sigaction old_sigaction;
static pthread_once_t forkfd_initialization = PTHREAD_ONCE_INIT;
static ffd_atomic_int forkfd_status = FFD_ATOMIC_INIT(0);
#ifdef HAVE_BROKEN_WAITID_ALL
static int waitid_p_all_works = 0;
#ifdef HAVE_BROKEN_WAITID
static int waitid_works = 0;
#else
static const int waitid_p_all_works = 1;
static const int waitid_works = 1;
#endif
static ProcessInfo *tryAllocateInSection(Header *header, ProcessInfo entries[], int maxCount)
@ -183,10 +183,13 @@ static int tryReaping(pid_t pid, siginfo_t *info)
{
/* reap the child */
#ifdef HAVE_WAITID
if (waitid_works) {
// we have waitid(2), which fills in siginfo_t for us
info->si_pid = 0;
return waitid(P_PID, pid, info, WEXITED | WNOHANG) == 0 && info->si_pid == pid;
#else
}
#endif
int status;
if (waitpid(pid, &status, WNOHANG) <= 0)
return 0; // child did not change state
@ -206,7 +209,6 @@ static int tryReaping(pid_t pid, siginfo_t *info)
}
return 1;
#endif
}
static void freeInfo(Header *header, ProcessInfo *entry)
@ -246,7 +248,7 @@ static void sigchld_handler(int signum)
memset(&info, 0, sizeof info);
#ifdef HAVE_WAITID
if (!waitid_p_all_works)
if (!waitid_works)
goto search_arrays;
/* be optimistic: try to see if we can get the child that exited */
@ -310,12 +312,14 @@ search_arrays:
if (pid <= 0)
continue;
#ifdef HAVE_WAITID
if (waitid_works) {
/* The child might have been reaped by the block above in another thread,
* so first check if it's ready and, if it is, lock it */
if (!isChildReady(pid, &info) ||
!ffd_atomic_compare_exchange(&children.entries[i].pid, &pid, -1,
FFD_ATOMIC_RELAXED, FFD_ATOMIC_RELAXED))
continue;
}
#endif
if (tryReaping(pid, &info)) {
/* this is our child, send notification and free up this entry */
@ -331,12 +335,14 @@ search_arrays:
if (pid <= 0)
continue;
#ifdef HAVE_WAITID
if (waitid_works) {
/* The child might have been reaped by the block above in another thread,
* so first check if it's ready and, if it is, lock it */
if (!isChildReady(pid, &info) ||
!ffd_atomic_compare_exchange(&array->entries[i].pid, &pid, -1,
FFD_ATOMIC_RELAXED, FFD_ATOMIC_RELAXED))
continue;
}
#endif
if (tryReaping(pid, &info)) {
/* this is our child, send notification and free up this entry */
@ -357,17 +363,19 @@ chain_handler:
static void forkfd_initialize()
{
#if defined(HAVE_BROKEN_WAITID_ALL)
#if defined(HAVE_BROKEN_WAITID)
pid_t pid = fork();
if (pid == 0) {
_exit(0);
} else if (pid > 0) {
siginfo_t info;
waitid(P_ALL, 0, &info, WNOWAIT | WEXITED);
waitid_p_all_works = (info.si_pid != 0);
waitid_works = (info.si_pid != 0);
info.si_pid = 0;
// now really reap the child
waitid(P_PID, pid, &info, WEXITED);
waitid_works = waitid_works && (info.si_pid != 0);
}
#endif

View File

@ -241,7 +241,7 @@ static HB_Bool HB_ThaiConvertStringToGlyphIndices (HB_ShaperItem *item)
int lgn = 0;
HB_Bool haveSaraAm = false;
cell_length = th_next_cell ((const unsigned char *)cstr + i, len - i, &tis_cell, true); /* !item->fixedPitch); */
cell_length = (int)(th_next_cell ((const unsigned char *)cstr + i, len - i, &tis_cell, true)); /* !item->fixedPitch); */
haveSaraAm = (cstr[i + cell_length - 1] == (char)0xd3);
/* set shaper item's log_clusters */
@ -432,7 +432,7 @@ static void HB_ThaiAssignAttributes(const HB_UChar16 *string, hb_uint32 len, HB_
/* manage grapheme boundaries */
i = 0;
while (i < len) {
cell_length = th_next_cell((const unsigned char *)cstr + i, len - i, &tis_cell, true);
cell_length = (hb_uint32)(th_next_cell((const unsigned char *)cstr + i, len - i, &tis_cell, true));
attributes[i].graphemeBoundary = true;
for (j = 1; j < cell_length; j++)

View File

@ -180,7 +180,7 @@ static void md4_update(struct md4_context *ctx, const unsigned char *data, size_
saved_lo = ctx->lo;
if ((ctx->lo = (saved_lo + size) & 0x1fffffff) < saved_lo)
ctx->hi++;
ctx->hi += size >> 29;
ctx->hi += (quint32)(size >> 29);
used = saved_lo & 0x3f;

View File

@ -8,7 +8,7 @@ Email domain: cam.ac.uk
University of Cambridge Computing Service,
Cambridge, England.
Copyright (c) 1997-2014 University of Cambridge
Copyright (c) 1997-2015 University of Cambridge
All rights reserved
@ -19,7 +19,7 @@ Written by: Zoltan Herczeg
Email local part: hzmester
Emain domain: freemail.hu
Copyright(c) 2010-2014 Zoltan Herczeg
Copyright(c) 2010-2015 Zoltan Herczeg
All rights reserved.
@ -30,7 +30,7 @@ Written by: Zoltan Herczeg
Email local part: hzmester
Emain domain: freemail.hu
Copyright(c) 2009-2014 Zoltan Herczeg
Copyright(c) 2009-2015 Zoltan Herczeg
All rights reserved.

View File

@ -6,7 +6,8 @@ and semantics are as close as possible to those of the Perl 5 language.
Release 8 of PCRE is distributed under the terms of the "BSD" licence, as
specified below. The documentation for PCRE, supplied in the "doc"
directory, is distributed under the same terms as the software itself.
directory, is distributed under the same terms as the software itself. The data
in the testdata directory is not copyrighted and is in the public domain.
The basic library functions are written in C and are freestanding. Also
included in the distribution is a set of C++ wrapper functions, and a
@ -24,7 +25,7 @@ Email domain: cam.ac.uk
University of Cambridge Computing Service,
Cambridge, England.
Copyright (c) 1997-2014 University of Cambridge
Copyright (c) 1997-2015 University of Cambridge
All rights reserved.
@ -35,7 +36,7 @@ Written by: Zoltan Herczeg
Email local part: hzmester
Emain domain: freemail.hu
Copyright(c) 2010-2014 Zoltan Herczeg
Copyright(c) 2010-2015 Zoltan Herczeg
All rights reserved.
@ -46,7 +47,7 @@ Written by: Zoltan Herczeg
Email local part: hzmester
Emain domain: freemail.hu
Copyright(c) 2009-2014 Zoltan Herczeg
Copyright(c) 2009-2015 Zoltan Herczeg
All rights reserved.

View File

@ -43,8 +43,8 @@ POSSIBILITY OF SUCH DAMAGE.
#define PCRE_MAJOR 8
#define PCRE_MINOR 37
#define PCRE_PRERELEASE -RC1
#define PCRE_DATE 2015-02-03
#define PCRE_PRERELEASE
#define PCRE_DATE 2015-04-28
/* When an application links to a PCRE DLL in Windows, the symbols that are
imported have to be identified as such. When building PCRE, the appropriate

View File

@ -866,14 +866,6 @@ static const pcre_uint8 opcode_possessify[] = {
};
/* Structure for mutual recursion detection. */
typedef struct recurse_check {
struct recurse_check *prev;
const pcre_uchar *group;
} recurse_check;
/*************************************************
* Find an error text *
@ -5532,13 +5524,13 @@ for (;; ptr++)
PUT(previous, 1, (int)(code - previous));
break; /* End of class handling */
}
#endif
/* Even though any XCLASS list is now discarded, we must allow for
its memory. */
if (lengthptr != NULL)
*lengthptr += (int)(class_uchardata - class_uchardata_base);
#endif
/* If there are no characters > 255, or they are all to be included or
excluded, set the opcode to OP_CLASS or OP_NCLASS, depending on whether the

View File

@ -2460,6 +2460,13 @@ typedef struct branch_chain {
pcre_uchar *current_branch;
} branch_chain;
/* Structure for mutual recursion detection. */
typedef struct recurse_check {
struct recurse_check *prev;
const pcre_uchar *group;
} recurse_check;
/* Structure for items in a linked list that represents an explicit recursive
call within the pattern; used by pcre_exec(). */

View File

@ -1533,7 +1533,11 @@ while (cc < ccend)
{
case OP_KET:
if (PRIVATE_DATA(cc) != 0)
{
private_data_length++;
SLJIT_ASSERT(PRIVATE_DATA(cc + 1) != 0);
cc += PRIVATE_DATA(cc + 1);
}
cc += 1 + LINK_SIZE;
break;
@ -1548,6 +1552,7 @@ while (cc < ccend)
case OP_SBRAPOS:
case OP_SCOND:
private_data_length++;
SLJIT_ASSERT(PRIVATE_DATA(cc) != 0);
cc += 1 + LINK_SIZE;
break;
@ -1710,6 +1715,8 @@ do
{
count = 1;
srcw[0] = PRIVATE_DATA(cc);
SLJIT_ASSERT(PRIVATE_DATA(cc + 1) != 0);
cc += PRIVATE_DATA(cc + 1);
}
cc += 1 + LINK_SIZE;
break;

View File

@ -70,7 +70,7 @@ Arguments:
code pointer to start of group (the bracket)
startcode pointer to start of the whole pattern's code
options the compiling options
int RECURSE depth
recurses chain of recurse_check to catch mutual recursion
Returns: the minimum length
-1 if \C in UTF-8 mode or (*ACCEPT) was encountered
@ -80,12 +80,13 @@ Returns: the minimum length
static int
find_minlength(const REAL_PCRE *re, const pcre_uchar *code,
const pcre_uchar *startcode, int options, int recurse_depth)
const pcre_uchar *startcode, int options, recurse_check *recurses)
{
int length = -1;
/* PCRE_UTF16 has the same value as PCRE_UTF8. */
BOOL utf = (options & PCRE_UTF8) != 0;
BOOL had_recurse = FALSE;
recurse_check this_recurse;
register int branchlength = 0;
register pcre_uchar *cc = (pcre_uchar *)code + 1 + LINK_SIZE;
@ -130,7 +131,7 @@ for (;;)
case OP_SBRAPOS:
case OP_ONCE:
case OP_ONCE_NC:
d = find_minlength(re, cc, startcode, options, recurse_depth);
d = find_minlength(re, cc, startcode, options, recurses);
if (d < 0) return d;
branchlength += d;
do cc += GET(cc, 1); while (*cc == OP_ALT);
@ -393,7 +394,7 @@ for (;;)
ce = cs = (pcre_uchar *)PRIV(find_bracket)(startcode, utf, GET2(slot, 0));
if (cs == NULL) return -2;
do ce += GET(ce, 1); while (*ce == OP_ALT);
if ((cc > cs && cc < ce) || recurse_depth > 10)
if (cc > cs && cc < ce) /* Simple recursion */
{
d = 0;
had_recurse = TRUE;
@ -401,9 +402,23 @@ for (;;)
}
else
{
int dd = find_minlength(re, cs, startcode, options, recurse_depth+1);
recurse_check *r = recurses;
for (r = recurses; r != NULL; r = r->prev) if (r->group == cs) break;
if (r != NULL) /* Mutual recursion */
{
d = 0;
had_recurse = TRUE;
break;
}
else
{
int dd;
this_recurse.prev = recurses;
this_recurse.group = cs;
dd = find_minlength(re, cs, startcode, options, &this_recurse);
if (dd < d) d = dd;
}
}
slot += re->name_entry_size;
}
}
@ -418,14 +433,26 @@ for (;;)
ce = cs = (pcre_uchar *)PRIV(find_bracket)(startcode, utf, GET2(cc, 1));
if (cs == NULL) return -2;
do ce += GET(ce, 1); while (*ce == OP_ALT);
if ((cc > cs && cc < ce) || recurse_depth > 10)
if (cc > cs && cc < ce) /* Simple recursion */
{
d = 0;
had_recurse = TRUE;
}
else
{
d = find_minlength(re, cs, startcode, options, recurse_depth + 1);
recurse_check *r = recurses;
for (r = recurses; r != NULL; r = r->prev) if (r->group == cs) break;
if (r != NULL) /* Mutual recursion */
{
d = 0;
had_recurse = TRUE;
}
else
{
this_recurse.prev = recurses;
this_recurse.group = cs;
d = find_minlength(re, cs, startcode, options, &this_recurse);
}
}
}
else d = 0;
@ -474,12 +501,21 @@ for (;;)
case OP_RECURSE:
cs = ce = (pcre_uchar *)startcode + GET(cc, 1);
do ce += GET(ce, 1); while (*ce == OP_ALT);
if ((cc > cs && cc < ce) || recurse_depth > 10)
if (cc > cs && cc < ce) /* Simple recursion */
had_recurse = TRUE;
else
{
recurse_check *r = recurses;
for (r = recurses; r != NULL; r = r->prev) if (r->group == cs) break;
if (r != NULL) /* Mutual recursion */
had_recurse = TRUE;
else
{
this_recurse.prev = recurses;
this_recurse.group = cs;
branchlength += find_minlength(re, cs, startcode, options,
recurse_depth + 1);
&this_recurse);
}
}
cc += 1 + LINK_SIZE;
break;
@ -1503,7 +1539,7 @@ if ((re->options & PCRE_ANCHORED) == 0 &&
/* Find the minimum length of subject string. */
switch(min = find_minlength(re, code, code, re->options, 0))
switch(min = find_minlength(re, code, code, re->options, NULL))
{
case -2: *errorptr = "internal error: missing capturing bracket"; return NULL;
case -3: *errorptr = "internal error: opcode not recognized"; return NULL;

View File

@ -1081,12 +1081,13 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_enter(struct sljit_compiler *compil
FAIL_IF(push_inst(compiler, ADDI | RD(SLJIT_SP) | RN(TMP_SP) | (0 << 10)));
offs = (local_size - saved_regs_size) << (15 - 3);
} else {
compiler->local_size += 2 * sizeof(sljit_sw);
local_size -= saved_regs_size;
saved_regs_size += 2 * sizeof(sljit_sw);
FAIL_IF(push_inst(compiler, STP_PRE | 29 | RT2(TMP_LR)
| RN(TMP_SP) | ((-(saved_regs_size >> 3) & 0x7f) << 15)));
offs = 2 << 15;
offs = 0 << 15;
if (saved_regs_size & 0x8) {
offs = 1 << 15;
saved_regs_size += sizeof(sljit_sw);
}
local_size -= saved_regs_size + SLJIT_LOCALS_OFFSET;
FAIL_IF(push_inst(compiler, SUBI | RD(TMP_SP) | RN(TMP_SP) | (saved_regs_size << 10)));
}
tmp = saveds < SLJIT_NUMBER_OF_SAVED_REGISTERS ? (SLJIT_S0 + 1 - saveds) : SLJIT_FIRST_SAVED_REG;
@ -1122,6 +1123,8 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_enter(struct sljit_compiler *compil
}
if (local_size)
FAIL_IF(push_inst(compiler, SUBI | RD(TMP_SP) | RN(TMP_SP) | (local_size << 10)));
FAIL_IF(push_inst(compiler, STP_PRE | 29 | RT2(TMP_LR)
| RN(TMP_SP) | ((-(16 >> 3) & 0x7f) << 15)));
FAIL_IF(push_inst(compiler, ADDI | RD(SLJIT_SP) | RN(TMP_SP) | (0 << 10)));
}
@ -1145,8 +1148,6 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_set_context(struct sljit_compiler *compi
local_size += GET_SAVED_REGISTERS_SIZE(scratches, saveds, 0) + SLJIT_LOCALS_OFFSET;
local_size = (local_size + 15) & ~0xf;
if (local_size > (63 * sizeof(sljit_sw)))
local_size += 2 * sizeof(sljit_sw);
compiler->local_size = local_size;
return SLJIT_SUCCESS;
}
@ -1167,16 +1168,20 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_return(struct sljit_compiler *compi
if (local_size <= (63 * sizeof(sljit_sw)))
offs = (local_size - saved_regs_size) << (15 - 3);
else {
saved_regs_size += 2 * sizeof(sljit_sw);
local_size -= saved_regs_size;
FAIL_IF(push_inst(compiler, LDP_PST | 29 | RT2(TMP_LR)
| RN(TMP_SP) | (((16 >> 3) & 0x7f) << 15)));
offs = 0 << 15;
if (saved_regs_size & 0x8) {
offs = 1 << 15;
saved_regs_size += sizeof(sljit_sw);
}
local_size -= saved_regs_size + SLJIT_LOCALS_OFFSET;
if (local_size > 0xfff) {
FAIL_IF(push_inst(compiler, ADDI | RD(TMP_SP) | RN(TMP_SP) | ((local_size >> 12) << 10) | (1 << 22)));
local_size &= 0xfff;
}
if (local_size)
FAIL_IF(push_inst(compiler, ADDI | RD(TMP_SP) | RN(TMP_SP) | (local_size << 10)));
local_size = saved_regs_size;
offs = 2 << 15;
}
tmp = compiler->saveds < SLJIT_NUMBER_OF_SAVED_REGISTERS ? (SLJIT_S0 + 1 - compiler->saveds) : SLJIT_FIRST_SAVED_REG;
@ -1204,8 +1209,12 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_return(struct sljit_compiler *compi
if (prev != -1)
FAIL_IF(push_inst(compiler, LDRI | RT(prev) | RN(TMP_SP) | (offs >> 5)));
if (compiler->local_size <= (63 * sizeof(sljit_sw))) {
FAIL_IF(push_inst(compiler, LDP_PST | 29 | RT2(TMP_LR)
| RN(TMP_SP) | (((local_size >> 3) & 0x7f) << 15)));
} else {
FAIL_IF(push_inst(compiler, ADDI | RD(TMP_SP) | RN(TMP_SP) | (saved_regs_size << 10)));
}
FAIL_IF(push_inst(compiler, RET | RN(TMP_LR)));
return SLJIT_SUCCESS;

View File

@ -1092,7 +1092,9 @@ public class ExtractStyle {
{
try {
InsetDrawable d = (InsetDrawable)drawable;
Object mInsetStateObject = getAccessibleField(InsetDrawable.class, "mInsetState").get(d);
// mInsetState changed to mState in Android 5.1 (22)
Object mInsetStateObject = getAccessibleField(InsetDrawable.class, (Build.VERSION.SDK_INT > 21) ? "mState"
: "mInsetState").get(d);
Rect _padding = new Rect();
boolean hasPadding = d.getPadding(_padding);
return getDrawable(getAccessibleField(mInsetStateObject.getClass(), "mDrawable").get(mInsetStateObject), filename, hasPadding ? _padding : null);

View File

@ -65,7 +65,6 @@ import android.view.ViewConfiguration;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.view.inputmethod.InputMethodManager;
import android.widget.LinearLayout;
import java.io.BufferedReader;
import java.io.DataOutputStream;
@ -789,29 +788,7 @@ public class QtActivityDelegate
0, 0,
metrics.xdpi, metrics.ydpi, metrics.scaledDensity);
}
ViewGroup layout = null;
m_layout = new QtLayout(m_activity);
if (Build.VERSION.SDK_INT >= 14) {
try {
ActivityInfo activityInfo = m_activity.getPackageManager().getActivityInfo(m_activity.getComponentName(),
PackageManager.GET_META_DATA);
if (activityInfo.metaData == null
|| !activityInfo.metaData.containsKey("android.app.allow_overlapping_system_ui")
|| !activityInfo.metaData.getBoolean("android.app.allow_overlapping_system_ui")) {
layout = new LinearLayout(m_activity);
layout.setFitsSystemWindows(true);
layout.addView(m_layout, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.MATCH_PARENT));
}
} catch (Exception e) {
e.printStackTrace();
}
}
if (layout == null)
layout = m_layout;
m_editText = new QtEditText(m_activity, this);
m_imm = (InputMethodManager)m_activity.getSystemService(Context.INPUT_METHOD_SERVICE);
m_surfaces = new HashMap<Integer, QtSurface>();
@ -834,7 +811,7 @@ public class QtActivityDelegate
Log.w("Qt A11y", "Unknown exception: " + e.toString());
}
m_activity.setContentView(layout,
m_activity.setContentView(m_layout,
new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.MATCH_PARENT));

View File

@ -187,7 +187,7 @@ public class QtActivity extends Activity
QT_ANDROID_THEMES = new String[] {"Theme_Light"};
QT_ANDROID_DEFAULT_THEME = "Theme_Light";
}
else if ((Build.VERSION.SDK_INT >= 11 && Build.VERSION.SDK_INT <= 13) || Build.VERSION.SDK_INT == 21){
else if ((Build.VERSION.SDK_INT >= 11 && Build.VERSION.SDK_INT <= 13) || Build.VERSION.SDK_INT >= 21){
QT_ANDROID_THEMES = new String[] {"Theme_Holo_Light"};
QT_ANDROID_DEFAULT_THEME = "Theme_Holo_Light";
} else {

View File

@ -44,10 +44,6 @@
signal is sent! -->
<meta-data android:name="android.app.background_running" android:value="false"/>
<!-- Background running -->
<!-- Show translucent UI on top of Qt's surface when system theme mandates it -->
<meta-data android:name="android.app.allow_overlapping_system_ui" android:value="false"/>
<!-- Show translucent UI on top of Qt's surface when system theme mandates it -->
</activity>
</application>
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="14"/>

View File

@ -0,0 +1,145 @@
From f0fb8d75bd2c7a894df1cb7e7d3dcd1ad0fd88d0 Mon Sep 17 00:00:00 2001
From: Andrew Knight <andrew.knight@intopalo.com>
Date: Sun, 3 May 2015 20:55:04 +0300
Subject: [PATCH] ANGLE: Allow Windows Phone to communicate swap region
eglPostSubBufferNV is used to communicate the size of the window, as
otherwise there is no way for the renderer to know if the last frame was
rendered in landscape or portrait, causing rendering glitches when the
orientation changes. The rotation flags are utilized in a few additional
places now to fix some corner cases where the rotation was not applied.
This patch should be squashed into "ANGLE-Improve-Windows-Phone-Support"
during the next ANGLE rebase.
Task-number: QTBUG-44333
Task-number: QTBUG-43502
Change-Id: Iec37f7531854184819c30c87eab82d96d56ff133
---
.../angle/src/libANGLE/renderer/d3d/SurfaceD3D.cpp | 2 ++
.../libANGLE/renderer/d3d/d3d11/SwapChain11.cpp | 28 +++++++++++++---------
.../d3d/d3d11/winrt/CoreWindowNativeWindow.cpp | 5 ++--
.../angle/src/libGLESv2/entry_points_egl_ext.cpp | 2 ++
4 files changed, 24 insertions(+), 13 deletions(-)
diff --git a/src/3rdparty/angle/src/libANGLE/renderer/d3d/SurfaceD3D.cpp b/src/3rdparty/angle/src/libANGLE/renderer/d3d/SurfaceD3D.cpp
index 4fde295..4a87488 100644
--- a/src/3rdparty/angle/src/libANGLE/renderer/d3d/SurfaceD3D.cpp
+++ b/src/3rdparty/angle/src/libANGLE/renderer/d3d/SurfaceD3D.cpp
@@ -189,6 +189,7 @@ egl::Error SurfaceD3D::swapRect(EGLint x, EGLint y, EGLint width, EGLint height)
return egl::Error(EGL_SUCCESS);
}
+#if !defined(ANGLE_ENABLE_WINDOWS_STORE) || (defined(ANGLE_ENABLE_WINDOWS_STORE) && WINAPI_FAMILY == WINAPI_FAMILY_PC_APP) // Qt WP: eglPostSubBufferNV comes here
if (x + width > mWidth)
{
width = mWidth - x;
@@ -198,6 +199,7 @@ egl::Error SurfaceD3D::swapRect(EGLint x, EGLint y, EGLint width, EGLint height)
{
height = mHeight - y;
}
+#endif
if (width == 0 || height == 0)
{
diff --git a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/SwapChain11.cpp b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/SwapChain11.cpp
index 298f3cc..dc539cf 100644
--- a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/SwapChain11.cpp
+++ b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/SwapChain11.cpp
@@ -552,18 +552,18 @@ EGLint SwapChain11::swapRect(EGLint x, EGLint y, EGLint width, EGLint height)
d3d11::PositionTexCoordVertex *vertices = static_cast<d3d11::PositionTexCoordVertex*>(mappedResource.pData);
+#if defined(ANGLE_ENABLE_WINDOWS_STORE) && (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
// Create a quad in homogeneous coordinates
- float x1 = (x / float(mWidth)) * 2.0f - 1.0f;
- float y1 = (y / float(mHeight)) * 2.0f - 1.0f;
- float x2 = ((x + width) / float(mWidth)) * 2.0f - 1.0f;
- float y2 = ((y + height) / float(mHeight)) * 2.0f - 1.0f;
+ float x1 = -1.0f;
+ float y1 = -1.0f;
+ float x2 = 1.0f;
+ float y2 = 1.0f;
-#if defined(ANGLE_ENABLE_WINDOWS_STORE) && (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
const float dim = std::max(mWidth, mHeight);
- float u1 = x / dim;
- float v1 = y / dim;
- float u2 = (x + width) / dim;
- float v2 = (y + height) / dim;
+ float u1 = 0;
+ float v1 = 0;
+ float u2 = float(width) / dim;
+ float v2 = float(height) / dim;
const NativeWindow::RotationFlags flags = mNativeWindow.rotationFlags();
const bool rotateL = flags == NativeWindow::RotateLeft;
@@ -573,6 +573,12 @@ EGLint SwapChain11::swapRect(EGLint x, EGLint y, EGLint width, EGLint height)
d3d11::SetPositionTexCoordVertex(&vertices[2], x2, y1, rotateR ? u1 : u2, rotateL ? v2 : v1);
d3d11::SetPositionTexCoordVertex(&vertices[3], x2, y2, rotateL ? u1 : u2, rotateR ? v1 : v2);
#else
+ // Create a quad in homogeneous coordinates
+ float x1 = (x / float(mWidth)) * 2.0f - 1.0f;
+ float y1 = (y / float(mHeight)) * 2.0f - 1.0f;
+ float x2 = ((x + width) / float(mWidth)) * 2.0f - 1.0f;
+ float y2 = ((y + height) / float(mHeight)) * 2.0f - 1.0f;
+
float u1 = x / float(mWidth);
float v1 = y / float(mHeight);
float u2 = (x + width) / float(mWidth);
@@ -613,8 +619,8 @@ EGLint SwapChain11::swapRect(EGLint x, EGLint y, EGLint width, EGLint height)
viewport.TopLeftX = 0;
viewport.TopLeftY = 0;
#if defined(ANGLE_ENABLE_WINDOWS_STORE) && (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
- viewport.Width = (rotateL || rotateR) ? mHeight : mWidth;
- viewport.Height = (rotateL || rotateR) ? mWidth : mHeight;
+ viewport.Width = (rotateL || rotateR) ? height : width;
+ viewport.Height = (rotateL || rotateR) ? width : height;
#else
viewport.Width = mWidth;
viewport.Height = mHeight;
diff --git a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp
index 350526c..fa9a69c 100644
--- a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp
+++ b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp
@@ -100,6 +100,7 @@ bool CoreWindowNativeWindow::registerForSizeChangeEvents()
if (SUCCEEDED(result))
{
result = mDisplayInformation->add_OrientationChanged(orientationChangedHandler.Get(), &mOrientationChangedEventToken);
+ orientationChangedHandler->Invoke(mDisplayInformation.Get(), nullptr);
}
#endif
@@ -135,8 +136,8 @@ HRESULT CoreWindowNativeWindow::createSwapChain(ID3D11Device *device, DXGIFactor
}
DXGI_SWAP_CHAIN_DESC1 swapChainDesc = { 0 };
- swapChainDesc.Width = width;
- swapChainDesc.Height = height;
+ swapChainDesc.Width = mRotationFlags ? height : width;
+ swapChainDesc.Height = mRotationFlags ? width : height;
swapChainDesc.Format = format;
swapChainDesc.Stereo = FALSE;
swapChainDesc.SampleDesc.Count = 1;
diff --git a/src/3rdparty/angle/src/libGLESv2/entry_points_egl_ext.cpp b/src/3rdparty/angle/src/libGLESv2/entry_points_egl_ext.cpp
index ded73db..62f3ca1 100644
--- a/src/3rdparty/angle/src/libGLESv2/entry_points_egl_ext.cpp
+++ b/src/3rdparty/angle/src/libGLESv2/entry_points_egl_ext.cpp
@@ -101,12 +101,14 @@ EGLBoolean EGLAPIENTRY PostSubBufferNV(EGLDisplay dpy, EGLSurface surface, EGLin
return EGL_FALSE;
}
+#if !defined(ANGLE_ENABLE_WINDOWS_STORE) || (defined(ANGLE_ENABLE_WINDOWS_STORE) && WINAPI_FAMILY == WINAPI_FAMILY_PC_APP) // Qt WP: Allow this entry point as a workaround
if (!display->getExtensions().postSubBuffer)
{
// Spec is not clear about how this should be handled.
SetGlobalError(Error(EGL_SUCCESS));
return EGL_TRUE;
}
+#endif
error = eglSurface->postSubBuffer(x, y, width, height);
if (error.isError())
--
1.9.5.msysgit.0

View File

@ -0,0 +1,57 @@
From 1f993a2492a618becd4bf89ef0d6cb5d2c9aa67a Mon Sep 17 00:00:00 2001
From: Kai Koehne <kai.koehne@theqtcompany.com>
Date: Mon, 11 May 2015 15:17:12 +0200
Subject: [PATCH] ANGLE: Fix compilation without d3d11
Change-Id: I0b772698cf521083e5ecf35a395af57100a50131
---
src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/NativeWindow.h | 4 +++-
.../angle/src/libANGLE/renderer/d3d/d3d11/win32/NativeWindow.cpp | 2 ++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/NativeWindow.h b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/NativeWindow.h
index 81b9ea7..0f70fe4 100644
--- a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/NativeWindow.h
+++ b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/NativeWindow.h
@@ -38,7 +38,7 @@ class InspectableNativeWindow;
using namespace Microsoft::WRL;
using namespace Microsoft::WRL::Wrappers;
-#else
+#elif defined(ANGLE_ENABLE_D3D11)
typedef IDXGISwapChain DXGISwapChain;
typedef IDXGIFactory DXGIFactory;
#endif
@@ -60,9 +60,11 @@ class NativeWindow
#endif
static bool isValidNativeWindow(EGLNativeWindowType window);
+#if defined(ANGLE_ENABLE_D3D11)
HRESULT createSwapChain(ID3D11Device* device, DXGIFactory* factory,
DXGI_FORMAT format, UINT width, UINT height,
DXGISwapChain** swapChain);
+#endif
inline EGLNativeWindowType getNativeWindow() const { return mWindow; }
diff --git a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/win32/NativeWindow.cpp b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/win32/NativeWindow.cpp
index 9d8f0bb..0a4f45b 100644
--- a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/win32/NativeWindow.cpp
+++ b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/win32/NativeWindow.cpp
@@ -37,6 +37,7 @@ bool NativeWindow::isValidNativeWindow(EGLNativeWindowType window)
return IsWindow(window) == TRUE;
}
+#if defined(ANGLE_ENABLE_D3D11)
HRESULT NativeWindow::createSwapChain(ID3D11Device* device, DXGIFactory* factory,
DXGI_FORMAT format, unsigned int width, unsigned int height,
DXGISwapChain** swapChain)
@@ -65,4 +66,5 @@ HRESULT NativeWindow::createSwapChain(ID3D11Device* device, DXGIFactory* factory
return factory->CreateSwapChain(device, &swapChainDesc, swapChain);
}
+#endif
}
--
1.9.5.msysgit.0

View File

@ -13,7 +13,7 @@ lib_replace.CONFIG = path
QMAKE_PRL_INSTALL_REPLACE += lib_replace
# DirectX is included in the Windows 8 Kit, but everything else requires the DX SDK.
win32-msvc2012|win32-msvc2013|winrt {
winrt|if(msvc:!win32-msvc2005:!win32-msvc2008:!win32-msvc2010) {
FXC = fxc.exe
} else {
DX_DIR = $$(DXSDK_DIR)

View File

@ -329,6 +329,8 @@ angle_d3d11 {
!static {
DEF_FILE = $$ANGLE_DIR/src/libGLESv2/$${TARGET}.def
mingw:equals(QT_ARCH, i386): DEF_FILE = $$ANGLE_DIR/src/libGLESv2/$${TARGET}_mingw32.def
} else {
DEFINES += DllMain=DllMain_ANGLE # prevent symbol from conflicting with the user's DllMain
}
float_converter.target = float_converter

View File

@ -70,8 +70,14 @@ set(_qt5_corelib_extra_includes)
# Qt5_POSITION_INDEPENDENT_CODE variable is used in the # qt5_use_module
# macro to add it.
set(Qt5_POSITION_INDEPENDENT_CODE True)
set_property(TARGET Qt5::Core PROPERTY INTERFACE_POSITION_INDEPENDENT_CODE \"ON\")
set(Qt5Core_EXECUTABLE_COMPILE_FLAGS \"-fPIE\")
set(Qt5Core_EXECUTABLE_COMPILE_FLAGS \"-fPIC\")
if (CMAKE_VERSION VERSION_LESS 2.8.12
AND (NOT CMAKE_CXX_COMPILER_ID STREQUAL \"GNU\"
OR CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0))
set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_POSITION_INDEPENDENT_CODE \"ON\")
else()
set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_COMPILE_OPTIONS $$QMAKE_CXXFLAGS_APP)
endif()
!!IF !isEmpty(QT_NAMESPACE)
list(APPEND Qt5Core_DEFINITIONS -DQT_NAMESPACE=$$QT_NAMESPACE)

View File

@ -333,8 +333,10 @@ if (NOT CMAKE_VERSION VERSION_LESS 2.8.9)
set_property(TARGET ${_target} APPEND PROPERTY COMPILE_DEFINITIONS_RELEASE QT_NO_DEBUG)
set_property(TARGET ${_target} APPEND PROPERTY COMPILE_DEFINITIONS_RELWITHDEBINFO QT_NO_DEBUG)
set_property(TARGET ${_target} APPEND PROPERTY COMPILE_DEFINITIONS_MINSIZEREL QT_NO_DEBUG)
if (Qt5_POSITION_INDEPENDENT_CODE)
if (Qt5_POSITION_INDEPENDENT_CODE
AND (CMAKE_VERSION VERSION_LESS 2.8.12
AND (NOT CMAKE_CXX_COMPILER_ID STREQUAL \"GNU\"
OR CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)))
set_property(TARGET ${_target} PROPERTY POSITION_INDEPENDENT_CODE ${Qt5_POSITION_INDEPENDENT_CODE})
endif()
endforeach()

View File

@ -121,7 +121,7 @@ struct MibToName {
short index;
};
static MibToName mibToName[] = {
static const MibToName mibToName[] = {
{ 3, 0 },
{ 4, 9 },
{ 5, 20 },

View File

@ -1147,13 +1147,30 @@ QTextCodec *QTextCodec::codecForUtfText(const QByteArray &ba)
return codecForUtfText(ba, QTextCodec::codecForMib(/*Latin 1*/ 4));
}
/*!
\fn QTextCodec * QTextCodec::codecForTr ()
\obsolete
Returns the codec used by QObject::tr() on its argument. If this
function returns 0 (the default), tr() assumes Latin-1.
\sa setCodecForTr()
*/
/*!
\fn QTextCodec::setCodecForTr ( QTextCodec * c )
\obsolete
Sets the codec used by QObject::tr() on its argument to c. If c
is 0 (the default), tr() assumes Latin-1.
*/
/*!
\internal
\since 4.3
Determines whether the decoder encountered a failure while decoding the input. If
an error was encountered, the produced result is undefined, and gets converted as according
to the conversion flags.
Determines whether the decoder encountered a failure while decoding the
input. If an error was encountered, the produced result is undefined, and
gets converted as according to the conversion flags.
*/
bool QTextDecoder::hasFailure() const
{

View File

@ -172,7 +172,7 @@ QString QWindowsLocalCodec::convertToUnicodeCharByChar(const char *chars, int le
}
#else
QString s;
int size = mbstowcs(NULL, mb, length);
size_t size = mbstowcs(NULL, mb, length);
if (size < 0) {
Q_ASSERT("Error in CE TextCodec");
return QString();
@ -181,7 +181,7 @@ QString QWindowsLocalCodec::convertToUnicodeCharByChar(const char *chars, int le
ws[size +1] = 0;
ws[size] = 0;
size = mbstowcs(ws, mb, length);
for (int i=0; i< size; i++)
for (size_t i = 0; i < size; i++)
s.append(QChar(ws[i]));
delete [] ws;
#endif

View File

@ -43,5 +43,8 @@ imagedirs += images
excludedirs += snippets
excludefiles += ../../../examples/widgets/tools/customcompleter/doc/src/customcompleter.qdoc \
../../../examples/widgets/tools/codecs/doc/src/codecs.qdoc
navigation.landingpage = "Qt Core"
navigation.cppclassespage = "Qt Core C++ Classes"

View File

@ -48,7 +48,7 @@ MyClass::MyClass() : BaseClass()
{
Q_INIT_RESOURCE(resources);
QFile file("qrc:/myfile.dat");
QFile file(":/myfile.dat");
...
}
//! [5]
@ -60,7 +60,7 @@ int main(int argc, char *argv[])
QApplication app(argc, argv);
Q_INIT_RESOURCE(graphlib);
QFile file("qrc:/graph.png");
QFile file(":/graph.png");
...
return app.exec();
}

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