Skip to content

Commit

Permalink
Merge ../../qt5/qtdeclarative into mer-5.6
Browse files Browse the repository at this point in the history
  • Loading branch information
pvuorela committed Nov 8, 2017
2 parents f40cfc5 + bb01612 commit 1f5e1d6
Show file tree
Hide file tree
Showing 164 changed files with 56,471 additions and 806 deletions.
2 changes: 1 addition & 1 deletion .qmake.conf
@@ -1,4 +1,4 @@
load(qt_build_config)
CONFIG += warning_clean

MODULE_VERSION = 5.6.2
MODULE_VERSION = 5.6.3
78 changes: 78 additions & 0 deletions dist/changes-5.6.3
@@ -0,0 +1,78 @@
Qt 5.6.3 is a bug-fix release. It maintains both forward and backward
compatibility (source and binary) with Qt 5.6.0.

For more details, refer to the online documentation included in this
distribution. The documentation is also available online:

http://doc.qt.io/qt-5/index.html

The Qt version 5.6 series is binary compatible with the 5.5.x series.
Applications compiled for 5.5 will continue to run with 5.6.

Some of the changes listed in this file include issue tracking numbers
corresponding to tasks in the Qt Bug Tracker:

https://bugreports.qt.io/

Each of these identifiers can be entered in the bug tracker to obtain more
information about a particular change.

QQuickWindow
------------

- The relevant child item is now sent a hover event when the window
receives a QEnterEvent, making sure hovering is recognized without
waiting for mouse movement.
- [QTBUG-56075] Wheel events retain their timestamps during delivery.

QtQml
-----

- Fixed reading of enum properties from gadgets / value types when the
enum was registered with qRegisterMetaType().
- [QTBUG-56271] Fixed a crash on big-endian architecture.
- [QTBUG-50592] JSON.stringify() uses QVariant::toString() so that URLs
and other types which are stored as variants will not be omitted.
- [QTBUG-56658] Fixed a crash in the Qt Quick compiler.
- [QTBUG-56830] Fixed conversion of long numeric strings to integers.
- [QTBUG-52356] Fixed binding re-evaluation when list model properties change.
- [QTBUG-58133] Fixed a crash when emitting a signal with an undefined QJSValue.
- [QTBUG-57633][QTBUG-46263] Fix crash with QObjects exposed to multiple QML engines.
- [QTBUG-58271] Fix PropertyChanges element to restore bindings on aliases.
- [QTBUG-56499] Fix Connection element not disconnecting when target became null.
- Work around crashes with gcc 5/6 caused by dead-store eliminations.
- Fix memory leak with QQmlExpression.
- [QTBUG-53261] Fix memory corruption when changing JS object properties in
certain ways.
- [QTBUG-39888] Fix crash with QQuickItem objects that do not have a parent but
should be kept alive by the JS garbage collector.
- [QTBUG-54822] Fix support for address space configurations where the kernel uses
more bits in pointer addressing
- [QTBUG-56551] Fix crash with Connection element and non-existent objects

QtQuick
-------

- [QTBUG-39888] Fixed crash with QQuickItems created via JavaScript being
garbage collected sometimes when they're not assigned to a window.
- [QTBUG-44038] TextInput no longer emits editingFinished twice on iOS.
- [QTBUG-55871][QTBUG-55886] Flickable::movementEnding and movementEnded
are emitted reliably at the right times on macOS.
- [QTBUG-55779] Text padding now has the proper effect on height when
there is more than one line of text.
- [QTBUG-37095] Canvas is rendered at high resolution if the scene is
initially rendered on a high-DPI screen.
- [QTBUG-56657] Fixed a bug resulting in invisible images in some cases.
- [QTBUG-58852] Large amounts of text are now rendered properly with
Text.NativeRendering.

QuickTest
---------
- [QTBUG-56223] Mouse events now include timestamps.

QtWidgets
---------

- [QTBUG-42074][QTBUG-57003] Support characters in Private Use Area, as
well as zero-width joiners and zero-width non-joiners in input in
TextInput and TextEdit.
2 changes: 1 addition & 1 deletion examples/quick/demos/tweetsearch/content/LineInput.qml
Expand Up @@ -62,7 +62,7 @@ FocusScope {
text: "Enter word"
font.pixelSize: 18
color: "#707070"
opacity: input.length ? 0 : 1
opacity: input.displayText.length ? 0 : 1
}

Text {
Expand Down
30 changes: 22 additions & 8 deletions examples/quick/quickwidgets/quickwidget/main.cpp
Expand Up @@ -39,6 +39,7 @@
****************************************************************************/

#include <QQuickWidget>
#include <QQuickItem>
#include <QQmlError>
#include <QtWidgets>

Expand All @@ -50,8 +51,9 @@ class MainWindow : public QMainWindow {
private slots:
void quickWidgetStatusChanged(QQuickWidget::Status);
void sceneGraphError(QQuickWindow::SceneGraphError error, const QString &message);
void grabToFile();
void renderToFile();
void grabFramebuffer();
void renderToPixmap();
void grabToImage();

private:
QQuickWidget *m_quickWidget;
Expand Down Expand Up @@ -91,8 +93,9 @@ MainWindow::MainWindow()
setCentralWidget(centralWidget);

QMenu *fileMenu = menuBar()->addMenu(tr("&File"));
fileMenu->addAction(tr("Grab to imFage"), this, &MainWindow::grabToFile);
fileMenu->addAction(tr("Render to pixmap"), this, &MainWindow::renderToFile);
fileMenu->addAction(tr("Grab framebuffer"), this, &MainWindow::grabFramebuffer);
fileMenu->addAction(tr("Render to pixmap"), this, &MainWindow::renderToPixmap);
fileMenu->addAction(tr("Grab via grabToImage"), this, &MainWindow::grabToImage);
fileMenu->addAction(tr("Quit"), qApp, &QCoreApplication::quit);
}

Expand All @@ -113,28 +116,39 @@ void MainWindow::sceneGraphError(QQuickWindow::SceneGraphError, const QString &m

template<class T> void saveToFile(QWidget *parent, T *saveable)
{
QString t;
QFileDialog fd(parent, t, QString());
QFileDialog fd(parent);
fd.setAcceptMode(QFileDialog::AcceptSave);
fd.setDefaultSuffix("png");
fd.selectFile("test.png");
if (fd.exec() == QDialog::Accepted)
saveable->save(fd.selectedFiles().first());
}

void MainWindow::grabToFile()
void MainWindow::grabFramebuffer()
{
QImage image = m_quickWidget->grabFramebuffer();
saveToFile(this, &image);
}

void MainWindow::renderToFile()
void MainWindow::renderToPixmap()
{
QPixmap pixmap(m_quickWidget->size());
m_quickWidget->render(&pixmap);
saveToFile(this, &pixmap);
}

void MainWindow::grabToImage()
{
QFileDialog fd(this);
fd.setAcceptMode(QFileDialog::AcceptSave);
fd.setDefaultSuffix("png");
fd.selectFile("test_grabToImage.png");
if (fd.exec() == QDialog::Accepted) {
QMetaObject::invokeMethod(m_quickWidget->rootObject(), "performLayerBasedGrab",
Q_ARG(QVariant, fd.selectedFiles().first()));
}
}

int main(int argc, char **argv)
{
QApplication app(argc, argv);
Expand Down
6 changes: 6 additions & 0 deletions examples/quick/quickwidgets/quickwidget/rotatingsquare.qml
Expand Up @@ -57,4 +57,10 @@ Rectangle {
anchors.centerIn: parent
text: "Qt Quick running in a widget"
}

function performLayerBasedGrab(fn) {
root.grabToImage(function(result) {
result.saveToFile(fn);
});
}
}
1 change: 1 addition & 0 deletions examples/quick/shared/shared.h
Expand Up @@ -44,6 +44,7 @@
#include <QQuickView> //Not using QQmlApplicationEngine because many examples don't have a Window{}
#define DECLARATIVE_EXAMPLE_MAIN(NAME) int main(int argc, char* argv[]) \
{\
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);\
QGuiApplication app(argc,argv);\
app.setOrganizationName("QtProject");\
app.setOrganizationDomain("qt-project.org");\
Expand Down
7 changes: 7 additions & 0 deletions src/3rdparty/masm/masm-defs.pri
Expand Up @@ -38,3 +38,10 @@ INCLUDEPATH += $$_OUT_PWD
win32-msvc2008|wince*: INCLUDEPATH += $$PWD/stubs/compat

CONFIG(release, debug|release): DEFINES += NDEBUG

!intel_icc:!clang:gcc {
greaterThan(QT_GCC_MAJOR_VERSION, 6) { # GCC 7
QMAKE_CXXFLAGS_WARN_ON += -Wno-expansion-to-defined
QMAKE_CXXFLAGS += -Wno-expansion-to-defined
}
}
2 changes: 1 addition & 1 deletion src/3rdparty/masm/wtf/MathExtras.h
Expand Up @@ -152,7 +152,7 @@ inline long lroundf(float num) { return static_cast<long>(roundf(num)); }
inline long long abs(long num) { return labs(num); }
#endif

#if COMPILER(MSVC)
#if COMPILER(MSVC) && COMPILER(MSVC12_OR_LOWER)
// MSVC's math.h does not currently supply log2 or log2f.
inline double log2(double num)
{
Expand Down
6 changes: 3 additions & 3 deletions src/imports/folderlistmodel/qquickfolderlistmodel.cpp
Expand Up @@ -440,9 +440,9 @@ void QQuickFolderListModel::setFolder(const QUrl &folder)
/*!
\qmlproperty url FolderListModel::rootFolder
When the rootFolder is set, then this folder will
be threated as the root in the file system, so that
you can only travers sub folders from this rootFolder.
When this property is set, the given folder will
be treated as the root in the file system, so that
you can only traverse subfolders within it.
*/
QUrl QQuickFolderListModel::rootFolder() const
{
Expand Down
5 changes: 5 additions & 0 deletions src/imports/particles/particles.pro
Expand Up @@ -3,6 +3,11 @@ TARGET = particlesplugin
TARGETPATH = QtQuick/Particles.2
IMPORT_VERSION = 2.0

greaterThan(QT_GCC_MAJOR_VERSION, 5):!qnx {
# Our code is bad. Temporary workaround. Fixed in 5.8
QMAKE_CXXFLAGS += -fno-delete-null-pointer-checks -fno-lifetime-dse
}

SOURCES += \
plugin.cpp

Expand Down
6 changes: 4 additions & 2 deletions src/particles/qquickimageparticle.cpp
Expand Up @@ -1276,14 +1276,16 @@ void QQuickImageParticle::finishBuildParticleNodes(QSGNode** node)
// OS X 10.8.3 introduced a bug in the AMD drivers, for at least the 2011 macbook pros,
// causing point sprites who read gl_PointCoord in the frag shader to come out as
// green-red blobs.
if (perfLevel < Deformable && strstr((char *) glGetString(GL_VENDOR), "ATI")) {
const GLubyte *glVendor = QOpenGLContext::currentContext()->functions()->glGetString(GL_VENDOR);
if (perfLevel < Deformable && glVendor && strstr((char *) glVendor, "ATI")) {
perfLevel = Deformable;
}
#endif

#ifdef Q_OS_LINUX
// Nouveau drivers can potentially freeze a machine entirely when taking the point-sprite path.
if (perfLevel < Deformable && strstr((const char *) glGetString(GL_VENDOR), "nouveau"))
const GLubyte *glVendor = QOpenGLContext::currentContext()->functions()->glGetString(GL_VENDOR);
if (perfLevel < Deformable && glVendor && strstr((const char *) glVendor, "nouveau"))
perfLevel = Deformable;
#endif

Expand Down
29 changes: 21 additions & 8 deletions src/plugins/qmltooling/qmldbg_profiler/qqmlprofileradapter.cpp
Expand Up @@ -37,19 +37,32 @@
QT_BEGIN_NAMESPACE

QQmlProfilerAdapter::QQmlProfilerAdapter(QQmlProfilerService *service, QQmlEnginePrivate *engine) :
QQmlAbstractProfilerAdapter(service), next(0)
QQmlAbstractProfilerAdapter(service)
{
engine->enableProfiler();
connect(this, SIGNAL(profilingEnabled(quint64)), engine->profiler, SLOT(startProfiling(quint64)));
init(engine->profiler);
}

QQmlProfilerAdapter::QQmlProfilerAdapter(QQmlProfilerService *service, QQmlTypeLoader *loader) :
QQmlAbstractProfilerAdapter(service)
{
loader->enableProfiler();
init(loader->profiler());
}

void QQmlProfilerAdapter::init(QQmlProfiler *profiler)
{
next = 0;
connect(this, SIGNAL(profilingEnabled(quint64)), profiler, SLOT(startProfiling(quint64)));
connect(this, SIGNAL(profilingEnabledWhileWaiting(quint64)),
engine->profiler, SLOT(startProfiling(quint64)), Qt::DirectConnection);
connect(this, SIGNAL(profilingDisabled()), engine->profiler, SLOT(stopProfiling()));
profiler, SLOT(startProfiling(quint64)), Qt::DirectConnection);
connect(this, SIGNAL(profilingDisabled()), profiler, SLOT(stopProfiling()));
connect(this, SIGNAL(profilingDisabledWhileWaiting()),
engine->profiler, SLOT(stopProfiling()), Qt::DirectConnection);
connect(this, SIGNAL(dataRequested()), engine->profiler, SLOT(reportData()));
profiler, SLOT(stopProfiling()), Qt::DirectConnection);
connect(this, SIGNAL(dataRequested()), profiler, SLOT(reportData()));
connect(this, SIGNAL(referenceTimeKnown(QElapsedTimer)),
engine->profiler, SLOT(setTimer(QElapsedTimer)));
connect(engine->profiler, SIGNAL(dataReady(QVector<QQmlProfilerData>)),
profiler, SLOT(setTimer(QElapsedTimer)));
connect(profiler, SIGNAL(dataReady(QVector<QQmlProfilerData>)),
this, SLOT(receiveData(QVector<QQmlProfilerData>)));
}

Expand Down
2 changes: 2 additions & 0 deletions src/plugins/qmltooling/qmldbg_profiler/qqmlprofileradapter.h
Expand Up @@ -54,12 +54,14 @@ class QQmlProfilerAdapter : public QQmlAbstractProfilerAdapter {
Q_OBJECT
public:
QQmlProfilerAdapter(QQmlProfilerService *service, QQmlEnginePrivate *engine);
QQmlProfilerAdapter(QQmlProfilerService *service, QQmlTypeLoader *loader);
qint64 sendMessages(qint64 until, QList<QByteArray> &messages);

public slots:
void receiveData(const QVector<QQmlProfilerData> &new_data);

private:
void init(QQmlProfiler *profiler);
QVector<QQmlProfilerData> data;
int next;
};
Expand Down
Expand Up @@ -98,9 +98,14 @@ void QQmlProfilerServiceImpl::engineAboutToBeAdded(QQmlEngine *engine)
"QML profilers have to be added from the engine thread");

QMutexLocker lock(&m_configMutex);
QQmlProfilerAdapter *qmlAdapter = new QQmlProfilerAdapter(this, QQmlEnginePrivate::get(engine));
QV4ProfilerAdapter *v4Adapter = new QV4ProfilerAdapter(this, QV8Engine::getV4(engine->handle()));
QQmlEnginePrivate *enginePrivate = QQmlEnginePrivate::get(engine);
QQmlProfilerAdapter *qmlAdapter = new QQmlProfilerAdapter(this, enginePrivate);
QQmlProfilerAdapter *compileAdapter
= new QQmlProfilerAdapter(this, &(enginePrivate->typeLoader));
QV4ProfilerAdapter *v4Adapter
= new QV4ProfilerAdapter(this, QV8Engine::getV4(engine->handle()));
addEngineProfiler(qmlAdapter, engine);
addEngineProfiler(compileAdapter, engine);
addEngineProfiler(v4Adapter, engine);
QQmlConfigurableDebugService<QQmlProfilerService>::engineAboutToBeAdded(engine);
}
Expand Down
15 changes: 6 additions & 9 deletions src/qml/compiler/qv4ssa.cpp
Expand Up @@ -1968,14 +1968,9 @@ class StatementWorklist
return *this;
}

bool isEmpty() const
{
return worklistSize == 0;
}

Stmt *takeNext(Stmt *last)
{
if (isEmpty())
if (worklistSize == 0)
return 0;

const int startAt = last ? last->id() + 1 : 0;
Expand All @@ -1991,6 +1986,10 @@ class StatementWorklist
--worklistSize;
Stmt *s = stmts.at(pos);
Q_ASSERT(s);

if (removed.at(s->id()))
return takeNext(s);

return s;
}

Expand Down Expand Up @@ -3960,9 +3959,7 @@ void optimizeSSA(StatementWorklist &W, DefUses &defUses, DominatorTree &df)
ExprReplacer replaceUses(defUses, function);

Stmt *s = 0;
while (!W.isEmpty()) {
s = W.takeNext(s);
Q_ASSERT(s);
while ((s = W.takeNext(s))) {

if (Phi *phi = s->asPhi()) {
// dead code elimination:
Expand Down
18 changes: 18 additions & 0 deletions src/qml/debugger/qqmldebug.cpp
Expand Up @@ -119,4 +119,22 @@ bool QQmlDebuggingEnabler::connectToLocalDebugger(const QString &socketFileName,
return false;
}

enum { HookCount = 3 };

// Only add to the end, and bump version if you do.
quintptr Q_QML_EXPORT qtDeclarativeHookData[] = {
// Version of this Array. Bump if you add to end.
1,

// Number of entries in this array.
HookCount,

// TypeInformationVersion, an integral value, bumped whenever private
// object sizes or member offsets that are used in Qt Creator's
// data structure "pretty printing" change.
2
};

Q_STATIC_ASSERT(HookCount == sizeof(qtDeclarativeHookData) / sizeof(qtDeclarativeHookData[0]));

QT_END_NAMESPACE
5 changes: 4 additions & 1 deletion src/qml/debugger/qqmldebugconnector.cpp
Expand Up @@ -146,7 +146,10 @@ QQmlDebugConnectorFactory::~QQmlDebugConnectorFactory()
{
// This is triggered when the plugin is unloaded.
QQmlDebugConnectorParams *params = qmlDebugConnectorParams();
if (params && params->instance) {
if (params) {
params->pluginKey.clear();
params->arguments.clear();
params->services.clear();
delete params->instance;
params->instance = 0;
}
Expand Down

0 comments on commit 1f5e1d6

Please sign in to comment.