lp://staging/~aacid/gsettings-qt/use_qchar_upper_lower
- Get this branch:
- bzr branch lp://staging/~aacid/gsettings-qt/use_qchar_upper_lower
Branch merges
- Nick Dedekind (community): Approve
- Michael Zanetti (community): Approve
- Ubuntu Touch System Settings: Pending requested
-
Diff: 25 lines (+4/-3)1 file modifiedsrc/util.cpp (+4/-3)
Related bugs
Related blueprints
Branch information
Recent revisions
- 80. By Albert Astals Cid
-
Use QChar toUpper/toLower instead of C version
C version works according to the locale that is not what we want in here
since in some locales there's not capital versions for some of the latin1
characters (i.e. Turkish will return i for toupper('i')) so when we try to
go back to the dashed version it will fail - 78. By Albert Astals Cid
-
Disconnect signal handler on destruction
When running unity8 under valgrind sometimes I get
==31122== Invalid read of size 8
==31122== at 0x620DB42: QMetaObject::invokeMethod( QObject* , char const*, Qt::ConnectionType, QGenericReturnA rgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) (in /usr/lib/ x86_64- linux-gnu/ libQt5Core. so.5.4. 2)
==31122== by 0x1C7C63EE: invokeMethod (qobjectdefs.h:391)
==31122== by 0x1C7C63EE: QGSettingsPrivate::settingChan ged(_GSettings* , char const*, void*) (qgsettings.cpp:40)
==31122== by 0x129DAA59: g_cclosure_marshal_ VOID__STRINGv (in /usr/lib/ x86_64- linux-gnu/ libgobject- 2.0.so. 0.4700. 1)
==31122== by 0x129D81D3: _g_closure_invoke_ va (in /usr/lib/ x86_64- linux-gnu/ libgobject- 2.0.so. 0.4700. 1)
==31122== by 0x129F29D5: g_signal_emit_valist (in /usr/lib/ x86_64- linux-gnu/ libgobject- 2.0.so. 0.4700. 1)
==31122== by 0x129F30BE: g_signal_emit (in /usr/lib/x86_64- linux-gnu/ libgobject- 2.0.so. 0.4700. 1)
==31122== by 0x138478EB: g_settings_real_change_ event (in /usr/lib/ x86_64- linux-gnu/ libgio- 2.0.so. 0.4700. 1)
==31122== by 0x14540D8F: ffi_call_unix64 (in /usr/lib/x86_64- linux-gnu/ libffi. so.6.0. 4)
==31122== by 0x145407F7: ffi_call (in /usr/lib/x86_64- linux-gnu/ libffi. so.6.0. 4)
==31122== by 0x129D8CF4: g_cclosure_marshal_ generic_ va (in /usr/lib/ x86_64- linux-gnu/ libgobject- 2.0.so. 0.4700. 1)
==31122== by 0x129D81D3: _g_closure_invoke_ va (in /usr/lib/ x86_64- linux-gnu/ libgobject- 2.0.so. 0.4700. 1)
==31122== by 0x129F24E7: g_signal_emit_valist (in /usr/lib/ x86_64- linux-gnu/ libgobject- 2.0.so. 0.4700. 1)
==31122== Address 0x1dbaa450 is 0 bytes inside a block of size 24 free'd
==31122== at 0x4C2D28B: operator delete(void*) (vg_replace_malloc. c:575)
==31122== by 0x622CD2A: QObjectPrivate::deleteChildren () (in /usr/lib/ x86_64- linux-gnu/ libQt5Core. so.5.4. 2)
==31122== by 0x623661F: QObject::~QObject() (in /usr/lib/x86_64- linux-gnu/ libQt5Core. so.5.4. 2)
==31122== by 0x1C5BB7AD: ~QQmlElement (qqmlprivate.h:98)
==31122== by 0x1C5BB7AD: QQmlPrivate::QQmlElement< GSettingsQml> ::~QQmlElement( ) (qqmlprivate.h:98)
==31122== by 0x622CD2A: QObjectPrivate::deleteChildren () (in /usr/lib/ x86_64- linux-gnu/ libQt5Core. so.5.4. 2)
==31122== by 0x623661F: QObject::~QObject() (in /usr/lib/x86_64- linux-gnu/ libQt5Core. so.5.4. 2)
==31122== by 0x53E886C: QQuickItem::~QQuickItem( ) (qquickitem. cpp:2223)
==31122== by 0x5402DED: ~QQuickRectangle (qquickrectangle_p.h:128)
==31122== by 0x5402DED: ~QQmlElement (qqmlprivate.h:98)
==31122== by 0x5402DED: QQmlPrivate::QQmlElement< QQuickRectangle >::~QQmlElement () (qqmlprivate.h:98)
==31122== by 0x622F66F: QObject::event( QEvent* ) (in /usr/lib/ x86_64- linux-gnu/ libQt5Core. so.5.4. 2)
==31122== by 0x53E66BA: QQuickItem::event( QEvent* ) (qquickitem. cpp:7302)
==31122== by 0x61FDDE8: QCoreApplication::notify( QObject* , QEvent*) (in /usr/lib/ x86_64- linux-gnu/ libQt5Core. so.5.4. 2)
==31122== by 0x61FDF1A: QCoreApplication::notifyIntern al(QObject* , QEvent*) (in /usr/lib/ x86_64- linux-gnu/ libQt5Core. so.5.4. 2)
==31122== Block was alloc'd at
==31122== at 0x4C2C12F: operator new(unsigned long) (vg_replace_malloc. c:333)
==31122== by 0x1C5BD113: GSettingsQml::componentCompl ete() (gsettings- qml.cpp: 141)
==31122== by 0x5E25421: ??? (in /usr/lib/x86_64- linux-gnu/ libQt5Qml. so.5.4. 2)
==31122== by 0x5DB22E9: ??? (in /usr/lib/x86_64- linux-gnu/ libQt5Qml. so.5.4. 2)
==31122== by 0x5DB2B9E: QQmlEnginePrivate::incubate( QQmlIncubator& , QQmlContextData*) (in /usr/lib/ x86_64- linux-gnu/ libQt5Qml. so.5.4. 2)
==31122== by 0x5DAE4EB: QQmlComponent::create( QQmlIncubator& , QQmlContext*, QQmlContext*) (in /usr/lib/ x86_64- linux-gnu/ libQt5Qml. so.5.4. 2)
==31122== by 0x5498859: QQuickLoaderPrivate::_ q_sourceLoaded( ) (qquickloader. cpp:713)
==31122== by 0x54989F7: QQuickLoaderPrivate::load( ) (qquickloader. cpp:596)
==31122== by 0x5E25421: ??? (in /usr/lib/x86_64- linux-gnu/ libQt5Qml. so.5.4. 2)
==31122== by 0x5DADEAD: QQmlComponentPrivate:: complete( QQmlEnginePriva te*, QQmlComponentPr ivate:: ConstructionSta te*) (in /usr/lib/ x86_64- linux-gnu/ libQt5Qml. so.5.4. 2)
==31122== by 0x5DADF76: QQmlComponentPrivate:: completeCreate( ) (in /usr/lib/ x86_64- linux-gnu/ libQt5Qml. so.5.4. 2)
==31122== by 0x5DADDDF: QQmlComponent::create( QQmlContext* ) (in /usr/lib/ x86_64- linux-gnu/ libQt5Qml. so.5.4. 2) Which as far as i understand means that the QGSettingsPriva
te::settingChan ged is being called even if GSettingsQml has already been destroyed. By disconnecting the signal handler I have not been able to reproduce the valgrind warning anymore
Approved by: Lars Uebernickel - 74. By Lars Karlitski
-
qgsettings-qml: explicitly emit changed events
We're working around QTBUG-32859 by not dispatching changed signals
directly. This leads to two issues:1. Changed signals are not emitted by GSettingsQml, because it only
emits those when the value is different from its cached one, which is
already updated by the time the queued signal arrives.2. Calling schema.reset() from qml and immediately fetching the value
after returns the old value, because the value was only updated when the
signal arrives.Fix these by explicitly emitting the changed signal when setting the
value from qml (the later one is then ignored) and setting the cached
value when calling reset().Also, remove changesSpy from test_reset(), because that now counts
changes correctly and includes the ones from previous tests.This patch can be reverted once the Qt bug is fixed. Fixes: #1503693
Approved by: Albert Astals Cid - 72. By Lukáš Tinkl
-
Force handling deferred delete events to avoid memory leaks Fixes: #1460970
Approved by: Nick Dedekind, Lars Uebernickel
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)
- Stacked on:
- lp://staging/gsettings-qt