mirror of
https://github.com/overte-org/overte.git
synced 2025-08-11 01:23:17 +02:00
repairs to VoxelImporter to remove QCoreApplication warning
This commit is contained in:
parent
0badc02a93
commit
217135a8d6
4 changed files with 18 additions and 20 deletions
|
@ -117,11 +117,10 @@ Application::Application(int& argc, char** argv, timeval &startup_time) :
|
||||||
_frameCount(0),
|
_frameCount(0),
|
||||||
_fps(120.0f),
|
_fps(120.0f),
|
||||||
_justStarted(true),
|
_justStarted(true),
|
||||||
_voxelImporter(_window),
|
_voxelImporter(NULL),
|
||||||
_wantToKillLocalVoxels(false),
|
_wantToKillLocalVoxels(false),
|
||||||
_audioScope(256, 200, true),
|
_audioScope(256, 200, true),
|
||||||
_avatarManager(),
|
_myAvatar(),
|
||||||
_myAvatar(NULL),
|
|
||||||
_profile(QString()),
|
_profile(QString()),
|
||||||
_mirrorViewRect(QRect(MIRROR_VIEW_LEFT_PADDING, MIRROR_VIEW_TOP_PADDING, MIRROR_VIEW_WIDTH, MIRROR_VIEW_HEIGHT)),
|
_mirrorViewRect(QRect(MIRROR_VIEW_LEFT_PADDING, MIRROR_VIEW_TOP_PADDING, MIRROR_VIEW_WIDTH, MIRROR_VIEW_HEIGHT)),
|
||||||
_mouseX(0),
|
_mouseX(0),
|
||||||
|
@ -1673,7 +1672,12 @@ void Application::exportVoxels() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::importVoxels() {
|
void Application::importVoxels() {
|
||||||
if (_voxelImporter.exec()) {
|
if (!_voxelImporter) {
|
||||||
|
_voxelImporter = new VoxelImporter(_window);
|
||||||
|
_voxelImporter->init(_settings);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_voxelImporter->exec()) {
|
||||||
qDebug("[DEBUG] Import succeeded.");
|
qDebug("[DEBUG] Import succeeded.");
|
||||||
} else {
|
} else {
|
||||||
qDebug("[DEBUG] Import failed.");
|
qDebug("[DEBUG] Import failed.");
|
||||||
|
@ -1813,8 +1817,6 @@ void Application::init() {
|
||||||
_sharedVoxelSystem.changeTree(&_clipboard);
|
_sharedVoxelSystem.changeTree(&_clipboard);
|
||||||
delete tmpTree;
|
delete tmpTree;
|
||||||
|
|
||||||
_voxelImporter.init(_settings);
|
|
||||||
|
|
||||||
_environment.init();
|
_environment.init();
|
||||||
|
|
||||||
_glowEffect.init();
|
_glowEffect.init();
|
||||||
|
|
|
@ -355,7 +355,7 @@ private:
|
||||||
|
|
||||||
VoxelSystem _voxels;
|
VoxelSystem _voxels;
|
||||||
VoxelTree _clipboard; // if I copy/paste
|
VoxelTree _clipboard; // if I copy/paste
|
||||||
VoxelImporter _voxelImporter;
|
VoxelImporter* _voxelImporter;
|
||||||
VoxelSystem _sharedVoxelSystem;
|
VoxelSystem _sharedVoxelSystem;
|
||||||
ViewFrustum _sharedVoxelSystemViewFrustum;
|
ViewFrustum _sharedVoxelSystemViewFrustum;
|
||||||
|
|
||||||
|
|
|
@ -231,10 +231,6 @@ void ImportDialog::setLayout() {
|
||||||
widget = findChild<QWidget*>("treeView");
|
widget = findChild<QWidget*>("treeView");
|
||||||
widget->setAttribute(Qt::WA_MacShowFocusRect, false);
|
widget->setAttribute(Qt::WA_MacShowFocusRect, false);
|
||||||
|
|
||||||
// remove reference to treeView
|
|
||||||
widget = NULL;
|
|
||||||
widget->deleteLater();
|
|
||||||
|
|
||||||
switchToResourcesParentIfRequired();
|
switchToResourcesParentIfRequired();
|
||||||
QFile styleSheet("resources/styles/import_dialog.qss");
|
QFile styleSheet("resources/styles/import_dialog.qss");
|
||||||
if (styleSheet.open(QIODevice::ReadOnly)) {
|
if (styleSheet.open(QIODevice::ReadOnly)) {
|
||||||
|
|
|
@ -24,15 +24,15 @@ private:
|
||||||
const QString SETTINGS_GROUP_NAME = "VoxelImport";
|
const QString SETTINGS_GROUP_NAME = "VoxelImport";
|
||||||
const QString IMPORT_DIALOG_SETTINGS_KEY = "ImportDialogSettings";
|
const QString IMPORT_DIALOG_SETTINGS_KEY = "ImportDialogSettings";
|
||||||
|
|
||||||
VoxelImporter::VoxelImporter(QWidget* parent)
|
VoxelImporter::VoxelImporter(QWidget* parent) :
|
||||||
: QObject(parent),
|
QObject(parent),
|
||||||
_voxelTree(true),
|
_voxelTree(true),
|
||||||
_importDialog(parent),
|
_importDialog(parent),
|
||||||
_currentTask(NULL),
|
_currentTask(NULL),
|
||||||
_nextTask(NULL) {
|
_nextTask(NULL)
|
||||||
|
{
|
||||||
connect(&_importDialog, SIGNAL(currentChanged(QString)), SLOT(preImport()));
|
connect(&_importDialog, &QFileDialog::currentChanged, this, &VoxelImporter::preImport);
|
||||||
connect(&_importDialog, SIGNAL(accepted()), SLOT(import()));
|
connect(&_importDialog, &QFileDialog::accepted, this, &VoxelImporter::import);
|
||||||
}
|
}
|
||||||
|
|
||||||
void VoxelImporter::saveSettings(QSettings* settings) {
|
void VoxelImporter::saveSettings(QSettings* settings) {
|
||||||
|
|
Loading…
Reference in a new issue