mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-03 16:58:24 +02:00
[ui] NodeLog: PySide2 5.11 compatibility fixes
* downgrade imports to work with versions prior to 5.12 * remove ES7 syntax
This commit is contained in:
parent
e40b0e57b8
commit
17556427fd
2 changed files with 9 additions and 7 deletions
|
@ -1,6 +1,5 @@
|
|||
import QtQuick 2.11
|
||||
import QtQml.Models 2.11
|
||||
import QtQuick.Controls 2.5
|
||||
import QtQuick.Controls 2.4
|
||||
import QtQuick.Layouts 1.11
|
||||
import MaterialIcons 2.2
|
||||
|
||||
|
@ -312,19 +311,22 @@ Item {
|
|||
}
|
||||
|
||||
// Load current source file and update ListView's model
|
||||
function loadSource(keepPosition = false)
|
||||
function loadSource(keepPosition)
|
||||
{
|
||||
if(!visible)
|
||||
return;
|
||||
loading = true;
|
||||
var xhr = new XMLHttpRequest;
|
||||
|
||||
xhr.open("GET", root.source);
|
||||
xhr.onload = function() {
|
||||
xhr.onreadystatechange = function() {
|
||||
// - can't rely on 'Last-Modified' header response to verify
|
||||
// that file has changed on disk (not always up-to-date)
|
||||
// - instead, let QML engine evaluate whether 'text' property value has changed
|
||||
textView.setText(xhr.status === 200 ? xhr.responseText : "", keepPosition);
|
||||
loading = false;
|
||||
if(xhr.readyState === XMLHttpRequest.DONE) {
|
||||
textView.setText(xhr.status === 200 ? xhr.responseText : "", keepPosition);
|
||||
loading = false;
|
||||
}
|
||||
};
|
||||
xhr.send();
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import QtQuick 2.12
|
||||
import QtQuick 2.11
|
||||
import QtQuick.Controls 2.3
|
||||
import QtQuick.Controls 1.4 as Controls1 // SplitView
|
||||
import QtQuick.Layouts 1.3
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue