mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-17 14:11:33 +00:00
Keep a singleton ComputerManager outside of the Models
This commit is contained in:
+4
-2
@@ -3,6 +3,8 @@ import QtQuick.Controls 2.2
|
||||
|
||||
import AppModel 1.0
|
||||
|
||||
import ComputerManager 1.0
|
||||
|
||||
GridView {
|
||||
property int computerIndex
|
||||
|
||||
@@ -16,8 +18,8 @@ GridView {
|
||||
|
||||
function createModel()
|
||||
{
|
||||
var model = Qt.createQmlObject('import AppModel 1.0; AppModel {}', parent, "")
|
||||
model.initialize(computerIndex)
|
||||
var model = Qt.createQmlObject('import AppModel 1.0; AppModel {}', parent, '')
|
||||
model.initialize(ComputerManager, computerIndex)
|
||||
return model
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user