aboutsummaryrefslogtreecommitdiff
path: root/kodereviewer/qml/FilesChangedPage.qml
diff options
context:
space:
mode:
Diffstat (limited to 'kodereviewer/qml/FilesChangedPage.qml')
-rw-r--r--kodereviewer/qml/FilesChangedPage.qml21
1 files changed, 18 insertions, 3 deletions
diff --git a/kodereviewer/qml/FilesChangedPage.qml b/kodereviewer/qml/FilesChangedPage.qml
index fe2aaf6..25c1164 100644
--- a/kodereviewer/qml/FilesChangedPage.qml
+++ b/kodereviewer/qml/FilesChangedPage.qml
@@ -30,6 +30,7 @@ Kirigami.ScrollablePage {
onPullRequestChanged: {
root.currentFile = ""
root.currentText = ""
+ root.currentSha = ""
}
Component.onCompleted: {
@@ -85,7 +86,7 @@ Kirigami.ScrollablePage {
id: editor
Layout.fillWidth: true
Layout.fillHeight: true
- file: root.currentFile
+ file: root.currentFile + '.diff'
text: root.currentText
MouseArea {
@@ -108,7 +109,21 @@ Kirigami.ScrollablePage {
onTriggered: {
console.log("triggered review")
console.log(`start line: ${editor.selectionStartLine()} to ${editor.selectionEndLine()}`)
- popup.open()
+
+ const component = Qt.createComponent("ReviewWindow.qml")
+ print(applicationWindow().project)
+ const params = {
+ project: applicationWindow().project,
+ pullRequestNumber: root.pullRequest.number,
+ diffText: root.currentText,
+ path: root.currentFile,
+ startLine: editor.selectionStartLine(),
+ endLine: editor.selectionEndLine(),
+ commitId: root.pullRequest.last_commit
+ }
+ component.createObject(applicationWindow(), params)
+
+ //popup.open()
}
}
}
@@ -120,7 +135,7 @@ Kirigami.ScrollablePage {
target: contextDrawer
function onFileSelected(filename, text) {
console.log("file changed!")
- root.currentFile = filename + '.diff'
+ root.currentFile = filename
root.currentText = text
}
}