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
1515 #include <QTemporaryDir>
1616
1717 #include <FSTReader.h>
18+#include <OffscreenUi.h>
1819
1920 #include "ModelSelector.h"
2021 #include "ModelPropertiesDialog.h"
@@ -78,7 +79,7 @@ bool ModelPackager::loadModel() { · 57 unmodified lines
7879 if (_modelFile.completeSuffix().contains("fst")) {
7980 QFile fst(_modelFile.filePath());
8081 if (!fst.open(QFile::ReadOnly | QFile::Text)) {
81− QMessageBox::warning(NULL,
82+ OffscreenUi::warning(NULL,
8283 QString("ModelPackager::loadModel()"),
8384 QString("Could not open FST file %1").arg(_modelFile.filePath()),
8485 QMessageBox::Ok);
@@ -97,7 +98,7 @@ bool ModelPackager::loadModel() { · 12 unmodified lines
9798 // open the fbx file
9899 QFile fbx(_fbxInfo.filePath());
99100 if (!_fbxInfo.exists() || !_fbxInfo.isFile() || !fbx.open(QIODevice::ReadOnly)) {
100− QMessageBox::warning(NULL,
101+ OffscreenUi::warning(NULL,
101102 QString("ModelPackager::loadModel()"),
102103 QString("Could not open FBX file %1").arg(_fbxInfo.filePath()),
103104 QMessageBox::Ok);
@@ -402,7 +403,7 @@ bool ModelPackager::copyTextures(const QString& oldDir, const QDir& newDir) { · 298 unmodified lines
402403 }
403404
404405 if (!errors.isEmpty()) {
405− QMessageBox::warning(nullptr, "ModelPackager::copyTextures()",
406+ OffscreenUi::warning(nullptr, "ModelPackager::copyTextures()",
406407 "Missing textures:" + errors);
407408 qCDebug(interfaceapp) << "ModelPackager::copyTextures():" << errors;
408409 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