Commit 59dfdce1 authored by Felipe Borges's avatar Felipe Borges Committed by Christoph Cullmann
Browse files

Restoring project using data serialied.


Signed-off-by: Felipe Borges's avatarFelipe Borges <bumbleblo2013@gmail.com>
parent 0c8ce343
Pipeline #148511 passed with stage
in 4 minutes and 47 seconds
......@@ -10,7 +10,6 @@
#include "kateproject.h"
#include "kateprojectconfigpage.h"
#include "kateprojectpluginview.h"
#include <iostream>
#include <kcoreaddons_version.h>
#include <ktexteditor/application.h>
......@@ -373,11 +372,7 @@ KateProject *KateProjectPlugin::createProjectForDirectory(const QDir &dir)
KateProject *KateProjectPlugin::createProjectForDirectory(const QDir &dir, const QVariantMap &projectMap)
{
QVariantMap cnf;
cnf[QStringLiteral("name")] = dir.dirName();
cnf[QStringLiteral("files")] = (QVariantList() << projectMap);
KateProject *project = new KateProject(m_threadPool, this, cnf, dir.canonicalPath());
KateProject *project = new KateProject(m_threadPool, this, projectMap, dir.canonicalPath());
m_projects.append(project);
......@@ -594,9 +589,9 @@ void KateProjectPlugin::readSessionConfig(const KConfigGroup &config)
{
QByteArray buffer;
QVariantMap projectMap;
QVariantList projectList = config.readEntry("projects", QVariantList());
const QVariantList projectList = config.readEntry("projects", QVariantList());
for (QVariant &project : projectList) {
for (const QVariant &project : projectList) {
buffer = project.toByteArray();
{
......
......@@ -200,10 +200,6 @@ private:
static void registerVariables();
static void unregisterVariables();
/***
* Serialize object into a QByteArray
*/
private:
/**
* open plugins, maps project base directory => project
......
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