Adopt path to certain Tablet dialogs to new loading subsystem and path resolver

This commit is contained in:
vladest 2017-12-21 22:14:15 +01:00
parent 15fcf66d0e
commit 7985c39f2a
4 changed files with 19 additions and 15 deletions

View file

@ -48,11 +48,15 @@ Item {
}
function pushSource(path) {
d.push(Qt.resolvedUrl(path));
d.currentItem.sendToScript.connect(tabletMenu.sendToScript);
d.push(Qt.resolvedUrl("../../" + path));
if (d.currentItem.sendToScript !== undefined) {
d.currentItem.sendToScript.connect(tabletMenu.sendToScript);
}
d.currentItem.focus = true;
d.currentItem.forceActiveFocus();
breadcrumbText.text = d.currentItem.title;
if (d.currentItem.title !== undefined) {
breadcrumbText.text = d.currentItem.title;
}
if (typeof bgNavBar !== "undefined") {
d.currentItem.y = bgNavBar.height;
d.currentItem.height -= bgNavBar.height;

Binary file not shown.

View file

@ -6313,7 +6313,7 @@ void Application::showAssetServerWidget(QString filePath) {
if (!hmd->getShouldShowTablet() && !isHMDMode()) {
DependencyManager::get<OffscreenUi>()->show(url, "AssetServer", startUpload);
} else {
static const QUrl url("../../hifi/dialogs/TabletAssetServer.qml");
static const QUrl url("hifi/dialogs/TabletAssetServer.qml");
tablet->pushOntoStack(url);
}
}
@ -6886,7 +6886,7 @@ void Application::loadLODToolsDialog() {
auto dialogsManager = DependencyManager::get<DialogsManager>();
dialogsManager->lodTools();
} else {
tablet->pushOntoStack("../../hifi/dialogs/TabletLODTools.qml");
tablet->pushOntoStack("hifi/dialogs/TabletLODTools.qml");
}
}
@ -6898,7 +6898,7 @@ void Application::loadEntityStatisticsDialog() {
auto dialogsManager = DependencyManager::get<DialogsManager>();
dialogsManager->octreeStatsDetails();
} else {
tablet->pushOntoStack("../../hifi/dialogs/TabletEntityStatistics.qml");
tablet->pushOntoStack("hifi/dialogs/TabletEntityStatistics.qml");
}
}
@ -6909,7 +6909,7 @@ void Application::loadDomainConnectionDialog() {
auto dialogsManager = DependencyManager::get<DialogsManager>();
dialogsManager->showDomainConnectionDialog();
} else {
tablet->pushOntoStack("../../hifi/dialogs/TabletDCDialog.qml");
tablet->pushOntoStack("hifi/dialogs/TabletDCDialog.qml");
}
}

View file

@ -166,7 +166,7 @@ Menu::Menu() {
action = addActionToQMenuAndActionHash(avatarMenu, MenuOption::Attachments);
connect(action, &QAction::triggered, [] {
qApp->showDialog(QString("hifi/dialogs/AttachmentsDialog.qml"),
QString("../../hifi/tablet/TabletAttachmentsDialog.qml"), "AttachmentsDialog");
QString("hifi/tablet/TabletAttachmentsDialog.qml"), "AttachmentsDialog");
});
// Avatar > Size
@ -309,13 +309,13 @@ Menu::Menu() {
action = addActionToQMenuAndActionHash(settingsMenu, MenuOption::Preferences, Qt::CTRL | Qt::Key_Comma, nullptr, nullptr, QAction::PreferencesRole);
connect(action, &QAction::triggered, [] {
qApp->showDialog(QString("hifi/dialogs/GeneralPreferencesDialog.qml"),
QString("../../hifi/tablet/TabletGeneralPreferences.qml"), "GeneralPreferencesDialog");
QString("hifi/tablet/TabletGeneralPreferences.qml"), "GeneralPreferencesDialog");
});
action = addActionToQMenuAndActionHash(settingsMenu, "Audio...");
connect(action, &QAction::triggered, [] {
static const QUrl widgetUrl("hifi/dialogs/Audio.qml");
static const QUrl tabletUrl("../../hifi/audio/Audio.qml");
static const QUrl tabletUrl("hifi/audio/Audio.qml");
static const QString name("AudioDialog");
qApp->showDialog(widgetUrl, tabletUrl, name);
});
@ -324,14 +324,14 @@ Menu::Menu() {
action = addActionToQMenuAndActionHash(settingsMenu, "Avatar...");
connect(action, &QAction::triggered, [] {
qApp->showDialog(QString("hifi/dialogs/AvatarPreferencesDialog.qml"),
QString("../../hifi/tablet/TabletAvatarPreferences.qml"), "AvatarPreferencesDialog");
QString("hifi/tablet/TabletAvatarPreferences.qml"), "AvatarPreferencesDialog");
});
// Settings > LOD...
action = addActionToQMenuAndActionHash(settingsMenu, "LOD...");
connect(action, &QAction::triggered, [] {
qApp->showDialog(QString("hifi/dialogs/LodPreferencesDialog.qml"),
QString("../../hifi/tablet/TabletLodPreferences.qml"), "LodPreferencesDialog");
QString("hifi/tablet/TabletLodPreferences.qml"), "LodPreferencesDialog");
});
action = addActionToQMenuAndActionHash(settingsMenu, "Controller Settings...");
@ -364,7 +364,7 @@ Menu::Menu() {
action = addActionToQMenuAndActionHash(developerMenu, "Graphics...");
connect(action, &QAction::triggered, [] {
qApp->showDialog(QString("hifi/dialogs/GraphicsPreferencesDialog.qml"),
QString("../../hifi/tablet/TabletGraphicsPreferences.qml"), "GraphicsPreferencesDialog");
QString("hifi/tablet/TabletGraphicsPreferences.qml"), "GraphicsPreferencesDialog");
});
// Developer > UI >>>
@ -615,7 +615,7 @@ Menu::Menu() {
action = addActionToQMenuAndActionHash(networkMenu, MenuOption::Networking);
connect(action, &QAction::triggered, [] {
qApp->showDialog(QString("hifi/dialogs/NetworkingPreferencesDialog.qml"),
QString("../../hifi/tablet/TabletNetworkingPreferences.qml"), "NetworkingPreferencesDialog");
QString("hifi/tablet/TabletNetworkingPreferences.qml"), "NetworkingPreferencesDialog");
});
addActionToQMenuAndActionHash(networkMenu, MenuOption::ReloadContent, 0, qApp, SLOT(reloadResourceCaches()));
addActionToQMenuAndActionHash(networkMenu, MenuOption::ClearDiskCache, 0,
@ -676,7 +676,7 @@ Menu::Menu() {
action = addActionToQMenuAndActionHash(audioDebugMenu, "Buffers...");
connect(action, &QAction::triggered, [] {
qApp->showDialog(QString("hifi/dialogs/AudioBuffers.qml"),
QString("../../hifi/tablet/TabletAudioBuffers.qml"), "AudioBuffersDialog");
QString("hifi/tablet/TabletAudioBuffers.qml"), "AudioBuffersDialog");
});
auto audioIO = DependencyManager::get<AudioClient>();