Update QML UI test environment for Settings > General dialog

This commit is contained in:
David Rowe 2016-02-25 17:13:48 +13:00
parent f6a6560b86
commit 4cc36d1df0
4 changed files with 28 additions and 4 deletions

View file

@ -528,10 +528,6 @@ Menu {
text: menuOption.turnWithHead;
checkable: true
}
MenuItem {
text: menuOption.comfortMode;
checkable: true
}
MenuItem {
text: menuOption.keyboardMotorControl;
checkable: true

View file

@ -23,6 +23,20 @@ Item {
function getUsername() { return "Jherico"; }
}
Item {
objectName: "ApplicationCompositor"
property bool reticleOverDesktop: true
}
Item {
objectName: "Preferences"
// List of categories obtained by logging categories as they are added in Interface in Preferences::addPreference().
property var categories: [
"Avatar Basics", "Snapshots", "Scripts", "Privacy", "Level of Detail Tuning", "Avatar Tuning", "Avatar Camera",
"Audio", "Octree", "HMD", "Sixense Controllers", "Graphics"
]
}
Item {
objectName: "ScriptDiscoveryService"
//property var scriptsModelFilter: scriptsModel

View file

@ -38,6 +38,18 @@ ApplicationWindow {
property var tabs: [];
property var urls: [];
Button {
// Shows the dialog with preferences sections but not each section's preference items
// because Preferences.preferencesByCategory() method is not stubbed out.
text: "Settings > General..."
property var builder: Component {
GeneralPreferencesDialog { }
}
onClicked: {
var runningScripts = builder.createObject(desktop);
}
}
Button {
text: "Running Scripts"
property var builder: Component {

View file

@ -85,9 +85,11 @@ int main(int argc, char *argv[]) {
setChild(engine, "offscreenFlags");
setChild(engine, "Account");
setChild(engine, "ApplicationCompositor");
setChild(engine, "Desktop");
setChild(engine, "ScriptDiscoveryService");
setChild(engine, "MenuHelper");
setChild(engine, "Preferences");
setChild(engine, "urlHandler");
engine.rootContext()->setContextProperty("DebugQML", true);
engine.rootContext()->setContextProperty("fileDialogHelper", new FileDialogHelper());