src: Removed backwards compatibility to Coati (.coatiproject, .coatidb)

This commit is contained in:
Eberhard Graether
2019-11-17 16:22:35 +01:00
parent b5e0387f1e
commit 9ab724ae47
11 changed files with 4 additions and 65 deletions
@@ -47,21 +47,13 @@ void setupApp(int argc, char *argv[])
AppPath::setAppPath(FilePath(QCoreApplication::applicationDirPath().toStdWString() + L"/").getAbsolute());
std::string userdir(std::getenv("HOME"));
QDir coatiDir((userdir + "/.config/coati").c_str());
userdir.append("/.config/sourcetrail/");
QString userDataPath(userdir.c_str());
QDir dataDir(userdir.c_str());
if (!dataDir.exists())
{
if (coatiDir.exists())
{
utility::copyNewFilesFromDirectory(coatiDir.absolutePath(), userDataPath);
}
else
{
dataDir.mkpath(userDataPath);
}
dataDir.mkpath(userDataPath);
}
utility::copyNewFilesFromDirectory(QString::fromStdWString(ResourcePaths::getFallbackPath().wstr()), userDataPath);
@@ -64,18 +64,6 @@ void setupPlatform(int argc, char *argv[])
if (!dataDir.exists())
{
dataDir.mkpath(dataPath);
if (dataPath.endsWith("Sourcetrail"))
{
QString coatiDataPath = dataPath;
coatiDataPath.append("/../Coati");
QDir coatiDataDir(coatiDataPath);
if (coatiDataDir.exists())
{
oldDataPath = coatiDataPath;
}
}
}
utility::copyNewFilesFromDirectory(oldDataPath, dataPath);
+1 -1
View File
@@ -28,7 +28,7 @@ bool QtApplication::event(QEvent *event)
FilePath path(fileEvent->file().toStdWString());
if (path.exists() && (path.extension() == L".srctrlprj" || path.extension() == L".coatiproject"))
if (path.exists() && path.extension() == L".srctrlprj")
{
MessageLoadProject(path).dispatch();
return true;
+1 -1
View File
@@ -597,7 +597,7 @@ void QtMainWindow::newProjectFromCDB(const FilePath& filePath)
void QtMainWindow::openProject()
{
QString fileName = QtFileDialog::getOpenFileName(
this, tr("Open File"), FilePath(), "Sourcetrail Project Files (*.srctrlprj *.coatiproject)");
this, tr("Open File"), FilePath(), "Sourcetrail Project Files (*.srctrlprj)");
if (!fileName.isEmpty())
{