Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Accessibility
Kontrast
Commits
a26d8555
Commit
a26d8555
authored
Dec 12, 2020
by
Carl Schwan
🚴
Browse files
Fix broken sql model
parent
c4de6e27
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/savedcolormodel.cpp
View file @
a26d8555
...
...
@@ -26,7 +26,7 @@ SavedColorModel::SavedColorModel(QObject *parent)
BackgroundColor BLOB NOT NULL
)
)RJIENRLWEY"
);
auto
query
=
QSqlQuery
();
auto
query
=
QSqlQuery
(
statement
);
if
(
!
query
.
exec
())
{
qCritical
()
<<
query
.
lastError
()
<<
"while creating table"
;
}
...
...
@@ -46,7 +46,7 @@ QVariant SavedColorModel::data(const QModelIndex &index, int role) const
if
(
role
==
Qt
::
UserRole
+
0
+
1
)
{
// ID
parentColumn
=
0
;
}
else
if
(
role
==
Qt
::
UserRole
+
1
+
1
)
{
// Name
parentColumn
=
0
;
parentColumn
=
1
;
}
else
if
(
role
==
Qt
::
UserRole
+
2
+
1
)
{
// ForegroundColor
parentColumn
=
2
;
}
else
{
// BackgroundColor
...
...
Write
Preview
Supports
Markdown
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