Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
VideoLAN
medialibrary
Commits
15418ed1
Commit
15418ed1
authored
May 31, 2018
by
Hugo Beauzée-Luyssen
Browse files
Task: Don't silently override the current item.
This works now but is bound to fail at some point
parent
3fa529c9
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/parser/Task.cpp
View file @
15418ed1
...
...
@@ -162,6 +162,11 @@ const std::string& Task::Item::mrl() const
return
m_mrl
;
}
void
Task
::
Item
::
setMrl
(
std
::
string
mrl
)
{
m_mrl
=
std
::
move
(
mrl
);
}
const
std
::
vector
<
Task
::
Item
>&
Task
::
Item
::
subItems
()
const
{
return
m_subItems
;
...
...
@@ -314,7 +319,7 @@ void Task::setMrl( std::string newMrl )
"mrl = ? WHERE id_task = ?"
;
if
(
sqlite
::
Tools
::
executeUpdate
(
m_ml
->
getConn
(),
req
,
newMrl
,
m_id
)
==
false
)
return
;
m_item
=
Item
{
std
::
move
(
newMrl
)
}
;
m_item
.
setMrl
(
std
::
move
(
newMrl
)
)
;
}
void
Task
::
createTable
(
sqlite
::
Connection
*
dbConnection
)
...
...
src/parser/Task.h
View file @
15418ed1
...
...
@@ -148,6 +148,7 @@ public:
void
setMeta
(
Metadata
type
,
std
::
string
value
);
const
std
::
string
&
mrl
()
const
;
void
setMrl
(
std
::
string
mrl
);
const
std
::
vector
<
Item
>&
subItems
()
const
;
void
addSubItem
(
Item
mrl
);
...
...
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