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
8686 #include <ObjectMotionState.h>
8787 #include <OctalCode.h>
8888 #include <OctreeSceneStats.h>
89+#include <OffscreenUi.h>
8990 #include <gl/OffscreenGLCanvas.h>
9091 #include <PathUtils.h>
9192 #include <PerfStat.h>
@@ -4386,7 +4387,7 @@ bool Application::askToLoadScript(const QString& scriptFilenameOrURL) { · 4294 unmodified lines
43864387
43874388 bool Application::askToUploadAsset(const QString& filename) {
43884389 if (!DependencyManager::get<NodeList>()->getThisNodeCanRez()) {
4389− QMessageBox::warning(_window, "Failed Upload",
4390+ OffscreenUi::warning(_window, "Failed Upload",
43904391 QString("You don't have upload rights on that domain.\n\n"));
43914392 return false;
43924393 }
@@ -4430,7 +4431,7 @@ bool Application::askToUploadAsset(const QString& filename) { · 37 unmodified lines
44304431 }
44314432
44324433 // 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));
44344435 return false;
44354436 }
44364437
@@ -4528,7 +4529,7 @@ void Application::handleScriptEngineLoaded(const QString& scriptFilename) { · 91 unmodified lines
45284529 // FIXME - change to new version of ScriptCache loading notification
45294530 void Application::handleScriptLoadError(const QString& scriptFilename) {
45304531 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.");
45324533 }
45334534
45344535 QStringList Application::getRunningScripts() {