Reformat code.

This commit is contained in:
Black Hat
2018-09-04 21:13:14 +08:00
parent 412b5201bf
commit aa29f5252d
17 changed files with 139 additions and 90 deletions

View File

@@ -11,20 +11,18 @@ Item {
z: -2
height: parent.height
width: progressInfo.active && !progressInfo.completed ? progressInfo.progress / progressInfo.total * parent.width : 0
color: Material.accent
opacity: 0.4
}
onDownloadedChanged: downloaded && openOnFinished ? openSavedFile() : {}
onDownloadedChanged: if (downloaded && openOnFinished) openSavedFile()
function saveFileAs() {
currentRoom.saveFileAs(eventId)
}
function saveFileAs() { currentRoom.saveFileAs(eventId) }
function downloadAndOpen()
{
if (downloaded)
openSavedFile()
if (downloaded) openSavedFile()
else
{
openOnFinished = true
@@ -34,10 +32,7 @@ Item {
function openSavedFile()
{
if (Qt.openUrlExternally(progressInfo.localPath))
return;
if (Qt.openUrlExternally(progressInfo.localDir))
return;
if (Qt.openUrlExternally(progressInfo.localPath)) return;
if (Qt.openUrlExternally(progressInfo.localDir)) return;
}
}