Skip to content

5.6 #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 26 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
2c6bd45
Bump version
ossilator Nov 28, 2016
600951e
Fix crash when C++ QJSValue parameterized signal interacts with JS
tronical Jan 13, 2017
dc5efbf
Accept PUA characters, ZWNJ and ZWJ as input in TextInput/Edit
eskilblomfeldt Dec 7, 2016
533f959
Fix support for QJSValue as C++ signal parameter type, part 2
tronical Jan 16, 2017
89f8c55
Enable PropertyChanges to correctly restore binding on alias
mbrasser-ford Jan 30, 2017
cdbda2e
Fix memory leak in V4
sletta Jan 19, 2017
8e26ddf
QtQuick scene graph: fix text native rendering
Feb 27, 2017
be66de8
Fix build with GCC 7
marc-kdab Mar 22, 2017
aebb0f6
Prospective fix for static builds on Windows with QtQuickCompiler
tronical Mar 28, 2017
f76dd50
Fix for dangling object pointers in QQmlErrors
Apr 19, 2017
2da8e40
QML: clear the property cache on QObjectWrapper destuction
Apr 20, 2017
ab92855
Fixed assertion failure when using QSG_RENDERER_DEBUG=upload
Sep 24, 2015
d6f5732
Remove outdated QJSValue benchmark
May 4, 2017
babfbe2
Fix a QJSValue benchmark
May 4, 2017
bd782de
QQmlComponent: Fix heap buffer overflow with bogus input
Mar 15, 2017
bae65d8
Make sure we cannot reload debug connectors on shutdown
Nov 29, 2016
f3c87d2
Fix benchmark: remove benchmarks containing old v8 references
May 4, 2017
2215227
Fix qml file loading for tst_affectors
May 8, 2017
fdf8daa
Disable particle benchmarks
May 8, 2017
98af9f4
Another benchmark fix
May 5, 2017
2a9fd3d
Fix build of animation benchmark
May 5, 2017
caa273e
Fix wrong grabbing behavior
pasnox Dec 13, 2016
bd53456
Don't leak QQmlJavaScriptExpression errors
cogilvie Jun 2, 2017
7ed7f10
Fix bug in designer support reference counting
tronical Jun 27, 2017
f724b53
Fix crash in QQuickAnimatedImage
a-ilin Aug 8, 2017
59b726e
Don't crash: Connections with a signal on a nonexistent object
ec1oud Nov 16, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .qmake.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load(qt_build_config)
CONFIG += warning_clean

MODULE_VERSION = 5.6.2
MODULE_VERSION = 5.6.3
7 changes: 7 additions & 0 deletions src/3rdparty/masm/masm-defs.pri
Original file line number Diff line number Diff line change
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
}
}
5 changes: 4 additions & 1 deletion src/qml/debugger/qqmldebugconnector.cpp
Original file line number Diff line number Diff line change
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
2 changes: 1 addition & 1 deletion src/qml/jsruntime/qv4internalclass_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ struct InternalClassTransition
{ return id == other.id && flags == other.flags; }

bool operator<(const InternalClassTransition &other) const
{ return id < other.id; }
{ return id < other.id || (id == other.id && flags < other.flags); }
};

struct InternalClass : public QQmlJS::Managed {
Expand Down
4 changes: 4 additions & 0 deletions src/qml/jsruntime/qv4qobjectwrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1046,6 +1046,10 @@ void QObjectWrapper::destroyObject(bool lastCall)
// If the object is C++-owned, we still have to release the weak reference we have
// to it.
ddata->jsWrapper.clear();
if (lastCall && ddata->propertyCache) {
ddata->propertyCache->release();
ddata->propertyCache = Q_NULLPTR;
}
}
}
}
Expand Down
16 changes: 10 additions & 6 deletions src/qml/parser/qqmljsglobal_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,17 @@
#else // !QT_CREATOR
# define QT_QML_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
# define QT_QML_END_NAMESPACE QT_END_NAMESPACE
# if defined(QT_BUILD_QMLDEVTOOLS_LIB) || defined(QT_QMLDEVTOOLS_LIB)
// QmlDevTools is a static library
# define QML_PARSER_EXPORT
# elif defined(QT_BUILD_QML_LIB)
# define QML_PARSER_EXPORT Q_DECL_EXPORT
# ifndef QT_STATIC
# if defined(QT_BUILD_QMLDEVTOOLS_LIB) || defined(QT_QMLDEVTOOLS_LIB)
// QmlDevTools is a static library
# define QML_PARSER_EXPORT
# elif defined(QT_BUILD_QML_LIB)
# define QML_PARSER_EXPORT Q_DECL_EXPORT
# else
# define QML_PARSER_EXPORT Q_DECL_IMPORT
# endif
# else
# define QML_PARSER_EXPORT Q_DECL_IMPORT
# define QML_PARSER_EXPORT
# endif
#endif // QT_CREATOR

Expand Down
5 changes: 5 additions & 0 deletions src/qml/parser/qqmljslexer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,11 @@ int Lexer::scanToken()
return multilineStringLiteral ? T_MULTILINE_STRING_LITERAL : T_STRING_LITERAL;
} else if (_char == QLatin1Char('\\')) {
scanChar();
if (_codePtr > _endPtr) {
_errorCode = IllegalEscapeSequence;
_errorMessage = QCoreApplication::translate("QQmlParser", "End of file reached at escape sequence");
return T_ERROR;
}

QChar u;

Expand Down
5 changes: 4 additions & 1 deletion src/qml/qml/qqmlboundsignal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,10 @@ void QQmlBoundSignalExpression::evaluate(void **a)
// for several cases (such as QVariant type and QObject-derived types)
//args[ii] = engine->metaTypeToJS(type, a[ii + 1]);
if (type == qMetaTypeId<QJSValue>()) {
callData->args[ii] = *QJSValuePrivate::getValue(reinterpret_cast<QJSValue *>(a[ii + 1]));
if (QV4::Value *v4Value = QJSValuePrivate::valueForData(reinterpret_cast<QJSValue *>(a[ii + 1]), &callData->args[ii]))
callData->args[ii] = *v4Value;
else
callData->args[ii] = QV4::Encode::undefined();
} else if (type == QMetaType::QVariant) {
callData->args[ii] = scope.engine->fromVariant(*((QVariant *)a[ii + 1]));
} else if (type == QMetaType::Int) {
Expand Down
3 changes: 2 additions & 1 deletion src/qml/qml/qqmlerror.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include <QtCore/qdebug.h>
#include <QtCore/qfile.h>
#include <QtCore/qstringlist.h>
#include <QtCore/qpointer.h>

#include <private/qv4errorobject_p.h>

Expand Down Expand Up @@ -78,7 +79,7 @@ class QQmlErrorPrivate
QString description;
quint16 line;
quint16 column;
QObject *object;
QPointer<QObject> object;
};

QQmlErrorPrivate::QQmlErrorPrivate()
Expand Down
1 change: 1 addition & 0 deletions src/qml/qml/qqmljavascriptexpression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ QQmlJavaScriptExpression::~QQmlJavaScriptExpression()
}

clearGuards();
clearError();
if (m_scopeObject.isT2()) // notify DeleteWatcher of our deletion.
m_scopeObject.asT2()->_s = 0;
}
Expand Down
4 changes: 2 additions & 2 deletions src/qml/qml/qqmlproperty.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -791,12 +791,12 @@ void QQmlPropertyPrivate::removeBinding(const QQmlProperty &that)
QQmlAbstractBinding *
QQmlPropertyPrivate::binding(QObject *object, int index)
{
findAliasTarget(object, index, &object, &index);

QQmlData *data = QQmlData::get(object);
if (!data)
return 0;

findAliasTarget(object, index, &object, &index);

int coreIndex;
int valueTypeIndex = QQmlPropertyData::decodeValueTypePropertyIndex(index, &coreIndex);

Expand Down
10 changes: 9 additions & 1 deletion src/qml/qml/qqmlpropertycache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,12 @@ QQmlPropertyCache *QQmlPropertyCache::parent() const

void QQmlPropertyCache::setParent(QQmlPropertyCache *newParent)
{
if (_parent == newParent)
return;
if (_parent)
_parent->release();
_parent = newParent;
_parent->addref();
}

// Returns the first C++ type's QMetaObject - that is, the first QMetaObject not created by
Expand Down Expand Up @@ -1062,8 +1067,11 @@ int QQmlPropertyCache::originalClone(QObject *object, int index)
QQmlData *data = QQmlData::get(object, false);
if (data && data->propertyCache) {
QQmlPropertyCache *cache = data->propertyCache;
while (cache->signal(index)->isCloned())
QQmlPropertyData *sig = cache->signal(index);
while (sig && sig->isCloned()) {
--index;
sig = cache->signal(index);
}
} else {
while (QMetaObjectPrivate::signal(object->metaObject(), index).attributes() & QMetaMethod::Cloned)
--index;
Expand Down
2 changes: 1 addition & 1 deletion src/quick/items/qquickanimatedimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ void QQuickAnimatedImage::movieRequestFinished()
d->_movie = new QMovie(d->reply);
}

if (!d->_movie->isValid()) {
if (!d->_movie || !d->_movie->isValid()) {
qmlInfo(this) << "Error Reading Animated Image File " << d->url.toString();
delete d->_movie;
d->_movie = 0;
Expand Down
3 changes: 3 additions & 0 deletions src/quick/items/qquickrendercontrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,9 @@ QImage QQuickRenderControl::grab()
if (!d->window)
return QImage();

QQuickWindowPrivate *cd = QQuickWindowPrivate::get(d->window);
cd->polishItems();
cd->syncSceneGraph();
render();
QImage grabContent = qt_gl_read_framebuffer(d->window->size() * d->window->effectiveDevicePixelRatio(), false, false);
return grabContent;
Expand Down
7 changes: 3 additions & 4 deletions src/quick/items/qquicktextcontrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ void QQuickTextControl::redo()
}

QQuickTextControl::QQuickTextControl(QTextDocument *doc, QObject *parent)
: QObject(*new QQuickTextControlPrivate, parent)
: QInputControl(TextEdit, *new QQuickTextControlPrivate, parent)
{
Q_D(QQuickTextControl);
Q_ASSERT(doc);
Expand Down Expand Up @@ -950,9 +950,8 @@ void QQuickTextControlPrivate::keyPressEvent(QKeyEvent *e)

process:
{
QString text = e->text();
if (!text.isEmpty() && (text.at(0).isPrint() || text.at(0) == QLatin1Char('\t'))) {
cursor.insertText(text);
if (q->isAcceptableInput(e)) {
cursor.insertText(e->text());
selectionChanged();
} else {
e->ignore();
Expand Down
3 changes: 2 additions & 1 deletion src/quick/items/qquicktextcontrol_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
#include <QtGui/qabstracttextdocumentlayout.h>
#include <QtGui/qtextdocumentfragment.h>
#include <QtGui/qclipboard.h>
#include <QtGui/private/qinputcontrol_p.h>
#include <QtCore/qmimedata.h>

QT_BEGIN_NAMESPACE
Expand All @@ -65,7 +66,7 @@ class QAbstractScrollArea;
class QEvent;
class QTimerEvent;

class Q_AUTOTEST_EXPORT QQuickTextControl : public QObject
class Q_AUTOTEST_EXPORT QQuickTextControl : public QInputControl
{
Q_OBJECT
Q_DECLARE_PRIVATE(QQuickTextControl)
Expand Down
8 changes: 5 additions & 3 deletions src/quick/items/qquicktextinput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
#endif

#include <QtGui/private/qtextengine_p.h>
#include <QtGui/private/qinputcontrol_p.h>

QT_BEGIN_NAMESPACE

Expand Down Expand Up @@ -2559,6 +2560,8 @@ void QQuickTextInputPrivate::init()
option.setUseDesignMetrics(renderType != QQuickTextInput::NativeRendering);
m_textLayout.setTextOption(option);
}

m_inputControl = new QInputControl(QInputControl::LineEdit, q);
}

void QQuickTextInput::updateCursorRectangle(bool scroll)
Expand Down Expand Up @@ -4381,9 +4384,8 @@ void QQuickTextInputPrivate::processKeyEvent(QKeyEvent* event)
}

if (unknown && !m_readOnly) {
QString t = event->text();
if (!t.isEmpty() && t.at(0).isPrint()) {
insert(t);
if (m_inputControl->isAcceptableInput(event)) {
insert(event->text());
event->accept();
return;
}
Expand Down
2 changes: 2 additions & 0 deletions src/quick/items/qquicktextinput_p_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
QT_BEGIN_NAMESPACE

class QQuickTextNode;
class QInputControl;

class Q_QUICK_PRIVATE_EXPORT QQuickTextInputPrivate : public QQuickImplicitSizeItemPrivate
{
Expand Down Expand Up @@ -216,6 +217,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickTextInputPrivate : public QQuickImplicitSizeI
QQuickItem *cursorItem;
QQuickTextNode *textNode;
MaskInputData *m_maskData;
QInputControl *m_inputControl;

QList<int> m_transactions;
QVector<Command> m_history;
Expand Down
26 changes: 14 additions & 12 deletions src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1950,25 +1950,27 @@ void Renderer::uploadBatch(Batch *b)
vd += g->sizeOfVertex();
}

const quint16 *id =
if (!b->drawSets.isEmpty()) {
const quint16 *id =
# ifdef QSG_SEPARATE_INDEX_BUFFER
(const quint16 *) (b->ibo.data);
# else
(const quint16 *) (b->vbo.data + b->drawSets.at(0).indices);
# endif
{
QDebug iDump = qDebug();
iDump << " -- Index Data, count:" << b->indexCount;
for (int i=0; i<b->indexCount; ++i) {
if ((i % 24) == 0)
iDump << endl << " --- ";
iDump << id[i];
{
QDebug iDump = qDebug();
iDump << " -- Index Data, count:" << b->indexCount;
for (int i=0; i<b->indexCount; ++i) {
if ((i % 24) == 0)
iDump << endl << " --- ";
iDump << id[i];
}
}
}

for (int i=0; i<b->drawSets.size(); ++i) {
const DrawSet &s = b->drawSets.at(i);
qDebug() << " -- DrawSet: indexCount:" << s.indexCount << " vertices:" << s.vertices << " z:" << s.zorders << " indices:" << s.indices;
for (int i=0; i<b->drawSets.size(); ++i) {
const DrawSet &s = b->drawSets.at(i);
qDebug() << " -- DrawSet: indexCount:" << s.indexCount << " vertices:" << s.vertices << " z:" << s.zorders << " indices:" << s.indices;
}
}
}
#endif // QT_NO_DEBUG_OUTPUT
Expand Down
Loading