src: Removed backwards compatibility to Coati (.coatiproject, .coatidb)
This commit is contained in:
@@ -265,8 +265,6 @@ void Application::handleMessage(MessageLoadProject* message)
|
||||
{
|
||||
MessageStatus(L"Loading Project: " + projectSettingsFilePath.wstr(), false, true).dispatch();
|
||||
|
||||
projectSettingsFilePath = migrateProjectSettings(projectSettingsFilePath);
|
||||
|
||||
m_project.reset();
|
||||
|
||||
if (m_hasGUI)
|
||||
@@ -359,36 +357,6 @@ void Application::handleMessage(MessageWindowFocus* message)
|
||||
}
|
||||
}
|
||||
|
||||
FilePath Application::migrateProjectSettings(const FilePath& projectSettingsFilePath) const
|
||||
{
|
||||
if (projectSettingsFilePath.extension() == L".coatiproject")
|
||||
{
|
||||
MessageStatus(L"Migrating deprecated project file extension \".coatiproject\" to new file extension \".srctrlprj\"").dispatch();
|
||||
const FilePath newSettingsPath = projectSettingsFilePath.replaceExtension(ProjectSettings::PROJECT_FILE_EXTENSION);
|
||||
{
|
||||
FileSystem::rename(projectSettingsFilePath, newSettingsPath);
|
||||
const FilePath oldDbPath = projectSettingsFilePath.replaceExtension(L"coatidb");
|
||||
if (oldDbPath.exists())
|
||||
{
|
||||
FileSystem::rename(oldDbPath, oldDbPath.replaceExtension(L"srctrldb"));
|
||||
}
|
||||
}
|
||||
{
|
||||
ApplicationSettings* appSettings = ApplicationSettings::getInstance().get();
|
||||
std::vector<FilePath> recentProjects = appSettings->getRecentProjects();
|
||||
std::vector<FilePath>::iterator it = std::find(recentProjects.begin(), recentProjects.end(), projectSettingsFilePath);
|
||||
if (it != recentProjects.end())
|
||||
{
|
||||
recentProjects.erase(it);
|
||||
}
|
||||
appSettings->setRecentProjects(recentProjects);
|
||||
appSettings->save(UserPaths::getAppSettingsPath());
|
||||
}
|
||||
return newSettingsPath;
|
||||
}
|
||||
return projectSettingsFilePath;
|
||||
}
|
||||
|
||||
void Application::startMessagingAndScheduling()
|
||||
{
|
||||
TaskManager::getScheduler(TabId::app())->startSchedulerLoopThreaded();
|
||||
|
||||
Reference in New Issue
Block a user