Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Kate
Commits
59dfdce1
Commit
59dfdce1
authored
Mar 08, 2022
by
Felipe Borges
Committed by
Christoph Cullmann
Mar 11, 2022
Browse files
Restoring project using data serialied.
Signed-off-by:
Felipe Borges
<
bumbleblo2013@gmail.com
>
parent
0c8ce343
Pipeline
#148511
passed with stage
in 4 minutes and 47 seconds
Changes
2
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
addons/project/kateprojectplugin.cpp
View file @
59dfdce1
...
...
@@ -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
();
{
...
...
addons/project/kateprojectplugin.h
View file @
59dfdce1
...
...
@@ -200,10 +200,6 @@ private:
static
void
registerVariables
();
static
void
unregisterVariables
();
/***
* Serialize object into a QByteArray
*/
private:
/**
* open plugins, maps project base directory => project
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment