mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-23 14:48:15 +00:00
20 lines
447 B
QML
20 lines
447 B
QML
import QtQuick 2.7
|
|
|
|
import Utils 1.0
|
|
|
|
// ===================================================================
|
|
|
|
Item {
|
|
property bool _connected: false
|
|
|
|
function connect (emitter, signalName, handler) {
|
|
Utils.assert(!_connected, 'Smart connect is already connected!')
|
|
|
|
emitter[signalName].connect(handler)
|
|
_connected = true
|
|
|
|
Component.onDestruction.connect(function () {
|
|
emitter[signalName].disconnect(handler)
|
|
})
|
|
}
|
|
}
|