10import org.kde.purpose.phabricator
15 property string updateDR
16 property string drTitle
17 property string localBaseDir
18 property alias updateComment: updateCommentField.text
21 property alias doBrowse: doBrowseCheck.checked
25 function labelText() {
26 if (updateDRCombo.currentIndex >= 0 && updateOld.checked) {
27 if (updateDR !== "") {
28 return i18nd("purpose6_phabricator
", "Update differential revision %1
", updateDR);
30 return i18nd("purpose6_phabricator
", "Update differential revision
");
32 } else if (createNew.checked) {
33 return i18nd("purpose6_phabricator
", "Create new \
"differential diff\"")
35 return i18nd(
"purpose6_phabricator",
"Create or update?")
41 Layout.fillWidth:
true
42 text: root.labelText()
48 path: root.localBaseDir +
"/.arcconfig"
51 function refreshUpdateDR() {
52 if (updateDRCombo.currentIndex >= 0 && updateOld.checked) {
53 root.updateDR = diffList.get(updateDRCombo.currentIndex,
"toolTip")
54 root.drTitle = diffList.get(updateDRCombo.currentIndex,
"display")
56 if (createNew.checked) {
60 root.updateDR =
i18nd(
"purpose6_phabricator",
"unknown")
67 Layout.alignment:
Qt.AlignHCenter
70 text:
i18nd(
"purpose6_phabricator",
"New Diff")
71 ToolTip.text: i18nd("purpose6_phabricator", "tick this to create a new \"differential diff\" which can\nbe converted online to a new differential revision")
73 root.refreshUpdateDR();
78 text:
i18nd(
"purpose6_phabricator",
"Update Diff")
79 ToolTip.text: i18nd("purpose6_phabricator", "tick this to update an existing revision,\nselect one from the list below.")
81 root.refreshUpdateDR();
88 Layout.fillWidth:
true
89 enabled: updateOld.checked
91 model: DiffListModel {
95 onCurrentIndexChanged: {
96 root.refreshUpdateDR();
101 Layout.fillWidth:
true
102 height: doBrowseCheck.height
106 anchors.centerIn: parent
107 text:
i18nd(
"purpose6_phabricator",
"Open Diff in browser")
108 enabled: updateOld.checked
113 Layout.fillWidth:
true
115 text: root.updateDR !==
"unknown" && root.updateDR !==
""
116 ?
i18nd(
"purpose6_phabricator",
"Summary of the update to %1:", root.updateDR)
117 :
i18nd(
"purpose6_phabricator",
"Summary of the update")
118 enabled: updateOld.checked
123 id: updateCommentField
124 Layout.fillWidth: true
125 Layout.fillHeight: true
126 text:
i18nd(
"purpose6_phabricator",
"patch updated through %1 and the Purpose/Phabricator plugin",
Qt.application.
name)
127 wrapMode: TextEdit.Wrap
128 enabled: updateOld.checked
132 Layout.fillHeight: true
133 Layout.fillWidth: true
Q_SCRIPTABLE CaptureState status()
QString i18nd(const char *domain, const char *text, const TYPE &arg...)
QString path(const QString &relativePath)
QString name(StandardAction id)
QString label(StandardShortcut id)