From eaf2f21b51ea781f77238b3dbe8deeaa67934924 Mon Sep 17 00:00:00 2001 From: codereader Date: Tue, 3 Jan 2017 15:58:27 +0100 Subject: [PATCH] The filesystem module can shut itself down --- plugins/vfspk3/Doom3FileSystem.cpp | 5 +++++ plugins/vfspk3/Doom3FileSystem.h | 7 ++++--- radiant/RadiantModule.cpp | 3 --- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/plugins/vfspk3/Doom3FileSystem.cpp b/plugins/vfspk3/Doom3FileSystem.cpp index 7b5a56c1a1..ed75bd1413 100644 --- a/plugins/vfspk3/Doom3FileSystem.cpp +++ b/plugins/vfspk3/Doom3FileSystem.cpp @@ -358,3 +358,8 @@ void Doom3FileSystem::initialiseModule(const ApplicationContext& ctx) initialise(); } + +void Doom3FileSystem::shutdownModule() +{ + shutdown(); +} diff --git a/plugins/vfspk3/Doom3FileSystem.h b/plugins/vfspk3/Doom3FileSystem.h index 3636addc7a..6ef5c62599 100644 --- a/plugins/vfspk3/Doom3FileSystem.h +++ b/plugins/vfspk3/Doom3FileSystem.h @@ -61,9 +61,10 @@ class Doom3FileSystem : virtual void removeObserver(Observer& observer); // RegisterableModule implementation - virtual const std::string& getName() const; - virtual const StringSet& getDependencies() const; - virtual void initialiseModule(const ApplicationContext& ctx); + const std::string& getName() const override; + const StringSet& getDependencies() const override; + void initialiseModule(const ApplicationContext& ctx) override; + void shutdownModule() override; private: void initPakFile(ArchiveLoader& archiveModule, const std::string& filename); diff --git a/radiant/RadiantModule.cpp b/radiant/RadiantModule.cpp index 995bf8fe48..2d33e8fccb 100644 --- a/radiant/RadiantModule.cpp +++ b/radiant/RadiantModule.cpp @@ -8,7 +8,6 @@ #include "iregistry.h" #include "icommandsystem.h" #include "itextstream.h" -#include "ifilesystem.h" #include "iuimanager.h" #include "ieclass.h" #include "ipreferencesystem.h" @@ -218,8 +217,6 @@ void RadiantModule::shutdownModule() { rMessage() << "RadiantModule::shutdownModule called." << std::endl; - GlobalFileSystem().shutdown(); - _radiantShutdown.clear(); }