2025-01-17 10:40:54 +01:00
|
|
|
import Git 1.0
|
|
|
|
import Lomiri.Components 1.3
|
|
|
|
import Lomiri.Components.Pickers 1.3
|
2025-01-20 11:23:40 +01:00
|
|
|
import QtQuick 2.4
|
2025-01-17 10:40:54 +01:00
|
|
|
|
2025-01-20 11:23:40 +01:00
|
|
|
OptionSelector {
|
2025-01-17 10:40:54 +01:00
|
|
|
id: combo
|
2025-01-20 11:23:40 +01:00
|
|
|
|
|
|
|
width: parent.width
|
2025-01-17 10:40:54 +01:00
|
|
|
model: ["HTTP", "HTTP AUTH"]
|
|
|
|
onDelegateClicked: function(i) {
|
2025-01-20 11:23:40 +01:00
|
|
|
if (i === 0)
|
|
|
|
timer.setTimeout(function() {
|
2025-01-20 14:46:47 +01:00
|
|
|
importGitCloneForm.source = Qt.resolvedUrl("GitCloneHttp.qml");
|
|
|
|
}, 500);
|
2025-01-20 11:23:40 +01:00
|
|
|
else if (i === 1)
|
|
|
|
timer.setTimeout(function() {
|
2025-01-20 14:46:47 +01:00
|
|
|
importGitCloneForm.source = Qt.resolvedUrl("GitCloneHttpAuth.qml");
|
|
|
|
}, 500);
|
2025-01-17 10:40:54 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
Timer {
|
|
|
|
id: timer
|
2025-01-20 11:23:40 +01:00
|
|
|
|
2025-01-17 10:40:54 +01:00
|
|
|
function setTimeout(cb, delayTime) {
|
|
|
|
timer.interval = delayTime;
|
|
|
|
timer.repeat = false;
|
|
|
|
timer.triggered.connect(cb);
|
2025-01-20 11:23:40 +01:00
|
|
|
timer.triggered.connect(function release() {
|
2025-01-17 10:40:54 +01:00
|
|
|
timer.triggered.disconnect(cb); // This is important
|
|
|
|
timer.triggered.disconnect(release); // This is important as well
|
|
|
|
});
|
|
|
|
timer.start();
|
|
|
|
}
|
2025-01-20 11:23:40 +01:00
|
|
|
|
2025-01-17 10:40:54 +01:00
|
|
|
}
|
2025-01-20 11:23:40 +01:00
|
|
|
|
2025-01-17 10:40:54 +01:00
|
|
|
}
|