Commit 93dc8a57 authored by Ronan Abhamon's avatar Ronan Abhamon

feat(app): remove useless `SmartConnect` component

parent 80fdfd23
......@@ -203,7 +203,6 @@
<file>ui/modules/Common/Form/TransparentComboBox.qml</file>
<file>ui/modules/Common/Form/TransparentTextInput.qml</file>
<file>ui/modules/Common/Helpers/InvertedMouseArea.qml</file>
<file>ui/modules/Common/Helpers/SmartConnect.qml</file>
<file>ui/modules/Common/Image/Icon.qml</file>
<file>ui/modules/Common/Image/RoundedImage.qml</file>
<file>ui/modules/Common/Menu/ActionMenuEntry.qml</file>
......
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) {
var component = value[0][signalName]
if (component) {
component.disconnect(value[1])
}
})
}
}
}
......@@ -50,7 +50,6 @@ TabButton 1.0 Form/Tab/TabButton.qml
TabContainer 1.0 Form/Tab/TabContainer.qml
InvertedMouseArea 1.0 Helpers/InvertedMouseArea.qml
SmartConnect 1.0 Helpers/SmartConnect.qml
Icon 1.0 Image/Icon.qml
RoundedImage 1.0 Image/RoundedImage.qml
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment