Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
plasma-angelfish
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Mike Royal
plasma-angelfish
Commits
6346ca1e
Verified
Commit
6346ca1e
authored
Apr 25, 2019
by
Jonah Brüchert
🌳
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'schmeisser/fix_history'
parents
9f132c58
5b0fb1a6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
src/urlmodel.cpp
src/urlmodel.cpp
+8
-2
No files found.
src/urlmodel.cpp
View file @
6346ca1e
...
...
@@ -172,7 +172,7 @@ bool UrlModel::save()
QJsonArray
urls
;
Q_FOREACH
(
const
auto
&
url
,
m_data
)
{
for
(
const
auto
&
url
:
m_data
)
{
urls
<<
url
;
}
...
...
@@ -211,10 +211,16 @@ QString UrlModel::key(int role) const
void
UrlModel
::
add
(
const
QJsonObject
&
data
)
{
foreach
(
const
auto
&
urldata
,
m_data
)
{
size_t
i
=
0
;
for
(
const
auto
&
urldata
:
m_data
)
{
if
(
urldata
==
data
)
{
beginMoveRows
(
QModelIndex
(),
i
,
i
,
QModelIndex
(),
m_data
.
size
());
m_data
.
removeAt
(
i
);
m_data
.
append
(
data
);
endMoveRows
();
return
;
}
++
i
;
}
beginInsertRows
(
QModelIndex
(),
m_data
.
size
(),
m_data
.
size
());
m_data
.
append
(
data
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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