History

migrate callers of QMessageBox::warning() to OffscreenUi::warning()

Brad Hefta-Gaub committed 10 years ago

Commit 927fe971 parent d98c2d111 files · +57 −26Browse files

Showing the changes to interface/src/Application.cpp (1 of 11 files). Show all

Unified · Split

interface/src/Application.cpp+4−3
@@ -86,6 +86,7 @@ · 85 unmodified lines
86#include <ObjectMotionState.h>86#include <ObjectMotionState.h>
87#include <OctalCode.h>87#include <OctalCode.h>
88#include <OctreeSceneStats.h>88#include <OctreeSceneStats.h>
89#include <OffscreenUi.h>
89#include <gl/OffscreenGLCanvas.h>90#include <gl/OffscreenGLCanvas.h>
90#include <PathUtils.h>91#include <PathUtils.h>
91#include <PerfStat.h>92#include <PerfStat.h>
@@ -4386,7 +4387,7 @@ bool Application::askToLoadScript(const QString& scriptFilenameOrURL) { · 4294 unmodified lines
4386 4387
4387bool Application::askToUploadAsset(const QString& filename) {4388bool Application::askToUploadAsset(const QString& filename) {
4388 if (!DependencyManager::get<NodeList>()->getThisNodeCanRez()) {4389 if (!DependencyManager::get<NodeList>()->getThisNodeCanRez()) {
4389 QMessageBox::warning(_window, "Failed Upload",4390 OffscreenUi::warning(_window, "Failed Upload",
4390 QString("You don't have upload rights on that domain.\n\n"));4391 QString("You don't have upload rights on that domain.\n\n"));
4391 return false;4392 return false;
4392 }4393 }
@@ -4430,7 +4431,7 @@ bool Application::askToUploadAsset(const QString& filename) { · 37 unmodified lines
4430 }4431 }
4431 4432
4432 // display a message box with the error4433 // display a message box with the error
4433 QMessageBox::warning(_window, "Failed Upload", QString("Failed to upload %1.\n\n").arg(filename));4434 OffscreenUi::warning(_window, "Failed Upload", QString("Failed to upload %1.\n\n").arg(filename));
4434 return false;4435 return false;
4435}4436}
4436 4437
@@ -4528,7 +4529,7 @@ void Application::handleScriptEngineLoaded(const QString& scriptFilename) { · 91 unmodified lines
4528// FIXME - change to new version of ScriptCache loading notification4529// FIXME - change to new version of ScriptCache loading notification
4529void Application::handleScriptLoadError(const QString& scriptFilename) {4530void Application::handleScriptLoadError(const QString& scriptFilename) {
4530 qCDebug(interfaceapp) << "Application::loadScript(), script failed to load...";4531 qCDebug(interfaceapp) << "Application::loadScript(), script failed to load...";
4531 QMessageBox::warning(getWindow(), "Error Loading Script", scriptFilename + " failed to load.");4532 OffscreenUi::warning(getWindow(), "Error Loading Script", scriptFilename + " failed to load.");
4532}4533}
4533 4534
4534QStringList Application::getRunningScripts() {4535QStringList Application::getRunningScripts() {