Keep a singleton ComputerManager outside of the Models

This commit is contained in:
Cameron Gutman 2018-07-05 22:08:55 -07:00
commit 1b1ad86271
9 changed files with 72 additions and 24 deletions

View file

@ -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
}