Segfault fixes
This commit is contained in:
parent
79ec379c66
commit
cfea90e9d2
|
@ -0,0 +1,9 @@
|
||||||
|
UseTab: Never
|
||||||
|
IndentWidth: 4
|
||||||
|
BreakBeforeBraces: Allman
|
||||||
|
AllowShortIfStatementsOnASingleLine: false
|
||||||
|
IndentCaseLabels: false
|
||||||
|
ColumnLimit: 0
|
||||||
|
DerivePointerAlignment: false
|
||||||
|
PointerAlignment: Left
|
||||||
|
AccessModifierOffset: -4
|
|
@ -1,30 +1,28 @@
|
||||||
{
|
{
|
||||||
"configurations": [
|
"configurations": [
|
||||||
{
|
{
|
||||||
"name": "x64-Debug",
|
"name": "x64-Debug",
|
||||||
"generator": "Ninja",
|
"generator": "Ninja",
|
||||||
"configurationType": "Debug",
|
"configurationType": "Debug",
|
||||||
"inheritEnvironments": [
|
"inheritEnvironments": [ "msvc_x64_x64" ],
|
||||||
"msvc_x64_x64"
|
"buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}",
|
||||||
],
|
"installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}",
|
||||||
"buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}",
|
"cmakeCommandArgs": "-DCMAKE_PREFIX_PATH=C:/Qt/5.12.6/msvc2017_64/lib/cmake/Qt5",
|
||||||
"installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}",
|
"buildCommandArgs": "",
|
||||||
"cmakeCommandArgs": "-DCMAKE_PREFIX_PATH=C:/Qt/5.12.3/msvc2017_64/lib/cmake/Qt5",
|
"ctestCommandArgs": "",
|
||||||
"buildCommandArgs": "-v",
|
"variables": []
|
||||||
"ctestCommandArgs": ""
|
},
|
||||||
},
|
{
|
||||||
{
|
"name": "x64-Release",
|
||||||
"name": "x64-Release",
|
"generator": "Ninja",
|
||||||
"generator": "Ninja",
|
"configurationType": "RelWithDebInfo",
|
||||||
"configurationType": "RelWithDebInfo",
|
"inheritEnvironments": [ "msvc_x64_x64" ],
|
||||||
"inheritEnvironments": [
|
"buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}",
|
||||||
"msvc_x64_x64"
|
"installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}",
|
||||||
],
|
"cmakeCommandArgs": "-DCMAKE_PREFIX_PATH=C:/Qt/5.12.6/msvc2017_64/lib/cmake/Qt5",
|
||||||
"buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}",
|
"buildCommandArgs": "",
|
||||||
"installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}",
|
"ctestCommandArgs": "",
|
||||||
"cmakeCommandArgs": "-DCMAKE_PREFIX_PATH=C:/Qt/5.12.3/msvc2017_64/lib/cmake/Qt5",
|
"variables": []
|
||||||
"buildCommandArgs": "-v",
|
}
|
||||||
"ctestCommandArgs": ""
|
]
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
|
@ -1 +1 @@
|
||||||
Subproject commit 8393432003b8e634cba4e89c27635fec0ae43a6f
|
Subproject commit 9ee4e6ac6cb1fa6b7db45099ae37026db2d2c49c
|
|
@ -1,8 +1,8 @@
|
||||||
#include "CTweakManager.h"
|
#include "CTweakManager.h"
|
||||||
#include "Core/GameProject/CGameProject.h"
|
#include "Core/GameProject/CGameProject.h"
|
||||||
#include "Core/GameProject/CResourceIterator.h"
|
#include "Core/GameProject/CResourceIterator.h"
|
||||||
#include "Core/Tweaks/CTweakLoader.h"
|
|
||||||
#include "Core/Tweaks/CTweakCooker.h"
|
#include "Core/Tweaks/CTweakCooker.h"
|
||||||
|
#include "Core/Tweaks/CTweakLoader.h"
|
||||||
|
|
||||||
CTweakManager::CTweakManager(CGameProject* pInProject)
|
CTweakManager::CTweakManager(CGameProject* pInProject)
|
||||||
: mpProject(pInProject)
|
: mpProject(pInProject)
|
||||||
|
@ -16,16 +16,18 @@ CTweakManager::~CTweakManager()
|
||||||
|
|
||||||
void CTweakManager::LoadTweaks()
|
void CTweakManager::LoadTweaks()
|
||||||
{
|
{
|
||||||
ASSERT( mTweakObjects.empty() );
|
ASSERT(mTweakObjects.empty());
|
||||||
|
|
||||||
// MP1 - Load all tweak assets into memory
|
// MP1 - Load all tweak assets into memory
|
||||||
if (mpProject->Game() <= EGame::Prime)
|
if (mpProject->Game() <= EGame::Prime)
|
||||||
{
|
{
|
||||||
for (TResourceIterator<EResourceType::Tweaks> It(mpProject->ResourceStore()); It; ++It)
|
for (TResourceIterator<EResourceType::Tweaks> It(mpProject->ResourceStore()); It; ++It)
|
||||||
{
|
{
|
||||||
CTweakData* pTweaks = (CTweakData*) It->Load();
|
if (CTweakData* pTweaks = (CTweakData*)It->Load())
|
||||||
pTweaks->Lock();
|
{
|
||||||
mTweakObjects.push_back(pTweaks);
|
pTweaks->Lock();
|
||||||
|
mTweakObjects.push_back(pTweaks);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,9 +42,7 @@ void CTweakManager::LoadTweaks()
|
||||||
{
|
{
|
||||||
// For Wii builds, there is another game-dependent subfolder.
|
// For Wii builds, there is another game-dependent subfolder.
|
||||||
EGame Game = mpProject->Game();
|
EGame Game = mpProject->Game();
|
||||||
TString GameName = (Game == EGame::Prime ? "MP1" :
|
TString GameName = (Game == EGame::Prime ? "MP1" : Game == EGame::Echoes ? "MP2" : "MP3");
|
||||||
Game == EGame::Echoes ? "MP2" :
|
|
||||||
"MP3");
|
|
||||||
mStandardFilePath = mpProject->DiscFilesystemRoot(false) / GameName / "Standard.ntwk";
|
mStandardFilePath = mpProject->DiscFilesystemRoot(false) / GameName / "Standard.ntwk";
|
||||||
|
|
||||||
// MP3 might actually be FrontEnd
|
// MP3 might actually be FrontEnd
|
||||||
|
|
|
@ -16,7 +16,7 @@ CProgressDialog::CProgressDialog(QString OperationName, bool UseBusyIndicator, b
|
||||||
mpUI->ProgressBar->setMaximum(UseBusyIndicator ? 0 : 10000);
|
mpUI->ProgressBar->setMaximum(UseBusyIndicator ? 0 : 10000);
|
||||||
setWindowTitle(OperationName);
|
setWindowTitle(OperationName);
|
||||||
|
|
||||||
#if WIN32
|
#ifdef WIN32
|
||||||
QWinTaskbarButton *pButton = new QWinTaskbarButton(this);
|
QWinTaskbarButton *pButton = new QWinTaskbarButton(this);
|
||||||
QWindow *pWindow = UICommon::FindWidgetWindowHandle( parentWidget() );
|
QWindow *pWindow = UICommon::FindWidgetWindowHandle( parentWidget() );
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ void CProgressDialog::closeEvent(QCloseEvent *pEvent)
|
||||||
{
|
{
|
||||||
pEvent->accept();
|
pEvent->accept();
|
||||||
|
|
||||||
#if WIN32
|
#ifdef WIN32
|
||||||
if (mpTaskbarProgress)
|
if (mpTaskbarProgress)
|
||||||
{
|
{
|
||||||
mpTaskbarProgress->reset();
|
mpTaskbarProgress->reset();
|
||||||
|
@ -108,7 +108,7 @@ void CProgressDialog::UpdateUI(const QString& rkTaskDesc, const QString& rkStepD
|
||||||
int ProgressValue = 10000 * ProgressPercent;
|
int ProgressValue = 10000 * ProgressPercent;
|
||||||
mpUI->ProgressBar->setValue(ProgressValue);
|
mpUI->ProgressBar->setValue(ProgressValue);
|
||||||
|
|
||||||
#if WIN32
|
#ifdef WIN32
|
||||||
if (mpTaskbarProgress)
|
if (mpTaskbarProgress)
|
||||||
mpTaskbarProgress->setValue(ProgressValue);
|
mpTaskbarProgress->setValue(ProgressValue);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#include <QFuture>
|
#include <QFuture>
|
||||||
#include <QFutureWatcher>
|
#include <QFutureWatcher>
|
||||||
|
|
||||||
#if WIN32
|
#ifdef WIN32
|
||||||
#include <QtWinExtras/QWinTaskbarButton>
|
#include <QtWinExtras/QWinTaskbarButton>
|
||||||
#include <QtWinExtras/QWinTaskbarProgress>
|
#include <QtWinExtras/QWinTaskbarProgress>
|
||||||
#endif
|
#endif
|
||||||
|
@ -28,7 +28,7 @@ class CProgressDialog : public IProgressNotifierUI
|
||||||
bool mFinished;
|
bool mFinished;
|
||||||
bool mCanceled;
|
bool mCanceled;
|
||||||
|
|
||||||
#if WIN32
|
#ifdef WIN32
|
||||||
QWinTaskbarProgress *mpTaskbarProgress;
|
QWinTaskbarProgress *mpTaskbarProgress;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -26,9 +26,9 @@ void CResourceTableContextMenu::InitMenu()
|
||||||
|
|
||||||
if (mpClickedEntry)
|
if (mpClickedEntry)
|
||||||
{
|
{
|
||||||
#if WIN32
|
#ifdef WIN32
|
||||||
const QString kOpenInExplorerString = "Show in Explorer";
|
const QString kOpenInExplorerString = "Show in Explorer";
|
||||||
#elif __APPLE__
|
#elif defined(__APPLE__)
|
||||||
const QString kOpenInExplorerString = "Show in Finder";
|
const QString kOpenInExplorerString = "Show in Finder";
|
||||||
#else
|
#else
|
||||||
const QString kOpenInExplorerString = "Show in file manager";
|
const QString kOpenInExplorerString = "Show in file manager";
|
||||||
|
|
|
@ -222,7 +222,8 @@ CWorldEditor::~CWorldEditor()
|
||||||
mScene.ClearScene();
|
mScene.ClearScene();
|
||||||
mpArea = nullptr;
|
mpArea = nullptr;
|
||||||
mpWorld = nullptr;
|
mpWorld = nullptr;
|
||||||
gpResourceStore->DestroyUnreferencedResources(); // this should destroy the area!
|
if (gpResourceStore)
|
||||||
|
gpResourceStore->DestroyUnreferencedResources(); // this should destroy the area!
|
||||||
|
|
||||||
delete mpScriptSidebar; // For some reason WCreateTab filters an event during the viewport's destructor
|
delete mpScriptSidebar; // For some reason WCreateTab filters an event during the viewport's destructor
|
||||||
delete ui;
|
delete ui;
|
||||||
|
@ -244,7 +245,8 @@ bool CWorldEditor::CloseWorld()
|
||||||
|
|
||||||
mpArea = nullptr;
|
mpArea = nullptr;
|
||||||
mpWorld = nullptr;
|
mpWorld = nullptr;
|
||||||
gpResourceStore->DestroyUnreferencedResources(); // this should destroy the area!
|
if (gpResourceStore)
|
||||||
|
gpResourceStore->DestroyUnreferencedResources(); // this should destroy the area!
|
||||||
UpdateWindowTitle();
|
UpdateWindowTitle();
|
||||||
|
|
||||||
ui->ActionSave->setEnabled(false);
|
ui->ActionSave->setEnabled(false);
|
||||||
|
|
Loading…
Reference in New Issue