mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-25 15:58:16 +00:00
- display correctly selected chat in timeline - fix weight computation in `ContactsListProxyModel` - `SmartConnect` supports unlimited handlers
27 lines
572 B
QML
27 lines
572 B
QML
import QtQuick 2.7
|
|
|
|
import Utils 1.0
|
|
|
|
// =============================================================================
|
|
|
|
Item {
|
|
property var handlers: ({})
|
|
|
|
function connect (emitter, signalName, handler) {
|
|
emitter[signalName].connect(handler)
|
|
|
|
if (!handlers[signalName]) {
|
|
handlers[signalName] = []
|
|
}
|
|
|
|
handlers[signalName].push([emitter, handler])
|
|
}
|
|
|
|
Component.onDestruction: {
|
|
for (var signalName in handlers) {
|
|
handlers[signalName].forEach(function (value) {
|
|
value[0][signalName].disconnect(value[1])
|
|
})
|
|
}
|
|
}
|
|
}
|