Commit 4e2bc661 authored by Felipe Borges's avatar Felipe Borges Committed by Christoph Cullmann
Browse files

Write projects data in the end of a session and reading that when


de project plugin is open
Signed-off-by: Felipe Borges's avatarFelipe Borges <bumbleblo2013@gmail.com>
parent 7ed2463d
......@@ -5,6 +5,8 @@
* SPDX-License-Identifier: LGPL-2.0-or-later
*/
#include <iostream>
#include "kateprojectplugin.h"
#include "kateproject.h"
......@@ -577,8 +579,24 @@ void KateProjectPlugin::unregisterVariables()
void KateProjectPlugin::readSessionConfig(const KConfigGroup &config)
{
QStringList projectList = config.readEntry("projects", QStringList());
for (QString project : projectList) {
std::cout << project.toStdString() << std::endl;
KateProject *pProject = createProjectForDirectory(QDir(project));
if (pProject != NULL)
m_projects.append(pProject);
}
}
void KateProjectPlugin::writeSessionConfig(KConfigGroup &config)
{
QStringList projectList;
for (KateProject *project : projects()) {
projectList.push_back(project->baseDir());
}
config.writeEntry("projects", projectList);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment