src: Removed backwards compatibility to Coati (.coatiproject, .coatidb)
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user