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/ModelPackager.cpp (1 of 11 files). Show all

Unified · Split

interface/src/ModelPackager.cpp+4−3
@@ -15,6 +15,7 @@ · 14 unmodified lines
15#include <QTemporaryDir>15#include <QTemporaryDir>
16 16
17#include <FSTReader.h>17#include <FSTReader.h>
18#include <OffscreenUi.h>
18 19
19#include "ModelSelector.h"20#include "ModelSelector.h"
20#include "ModelPropertiesDialog.h"21#include "ModelPropertiesDialog.h"
@@ -78,7 +79,7 @@ bool ModelPackager::loadModel() { · 57 unmodified lines
78 if (_modelFile.completeSuffix().contains("fst")) {79 if (_modelFile.completeSuffix().contains("fst")) {
79 QFile fst(_modelFile.filePath());80 QFile fst(_modelFile.filePath());
80 if (!fst.open(QFile::ReadOnly | QFile::Text)) {81 if (!fst.open(QFile::ReadOnly | QFile::Text)) {
81 QMessageBox::warning(NULL,82 OffscreenUi::warning(NULL,
82 QString("ModelPackager::loadModel()"),83 QString("ModelPackager::loadModel()"),
83 QString("Could not open FST file %1").arg(_modelFile.filePath()),84 QString("Could not open FST file %1").arg(_modelFile.filePath()),
84 QMessageBox::Ok);85 QMessageBox::Ok);
@@ -97,7 +98,7 @@ bool ModelPackager::loadModel() { · 12 unmodified lines
97 // open the fbx file98 // open the fbx file
98 QFile fbx(_fbxInfo.filePath());99 QFile fbx(_fbxInfo.filePath());
99 if (!_fbxInfo.exists() || !_fbxInfo.isFile() || !fbx.open(QIODevice::ReadOnly)) {100 if (!_fbxInfo.exists() || !_fbxInfo.isFile() || !fbx.open(QIODevice::ReadOnly)) {
100 QMessageBox::warning(NULL,101 OffscreenUi::warning(NULL,
101 QString("ModelPackager::loadModel()"),102 QString("ModelPackager::loadModel()"),
102 QString("Could not open FBX file %1").arg(_fbxInfo.filePath()),103 QString("Could not open FBX file %1").arg(_fbxInfo.filePath()),
103 QMessageBox::Ok);104 QMessageBox::Ok);
@@ -402,7 +403,7 @@ bool ModelPackager::copyTextures(const QString& oldDir, const QDir& newDir) { · 298 unmodified lines
402 }403 }
403 404
404 if (!errors.isEmpty()) {405 if (!errors.isEmpty()) {
405 QMessageBox::warning(nullptr, "ModelPackager::copyTextures()",406 OffscreenUi::warning(nullptr, "ModelPackager::copyTextures()",
406 "Missing textures:" + errors);407 "Missing textures:" + errors);
407 qCDebug(interfaceapp) << "ModelPackager::copyTextures():" << errors;408 qCDebug(interfaceapp) << "ModelPackager::copyTextures():" << errors;
408 return false;409 return false;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t