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
Education
Analitza
Commits
9d97532a
Commit
9d97532a
authored
Feb 28, 2020
by
Aleix Pol Gonzalez
🐧
Browse files
Stay compatible with older Qt...
parent
302178f4
Changes
3
Hide whitespace changes
Inline
Side-by-side
analitzagui/operatorsmodel.cpp
View file @
9d97532a
...
...
@@ -31,10 +31,8 @@ OperatorsModel::OperatorsModel(QObject *parent) : QAbstractTableModel(parent), m
QHash
<
int
,
QByteArray
>
OperatorsModel
::
roleNames
()
const
{
auto
ret
=
QAbstractTableModel
::
roleNames
();
ret
.
insert
({
{
IsVariableRole
,
"isVariable"
},
{
DescriptionRole
,
"description"
}
});
ret
.
insert
(
IsVariableRole
,
"isVariable"
);
ret
.
insert
(
DescriptionRole
,
"description"
);
return
ret
;
}
...
...
analitzaplot/plotsmodel.cpp
View file @
9d97532a
...
...
@@ -48,9 +48,7 @@ PlotsModel::~PlotsModel()
QHash
<
int
,
QByteArray
>
PlotsModel
::
roleNames
()
const
{
auto
ret
=
QAbstractListModel
::
roleNames
();
ret
.
insert
({
{
DescriptionRole
,
"description"
}
});
ret
.
insert
(
DescriptionRole
,
"description"
);
return
ret
;
}
...
...
declarative/analitzadeclarativeplugin.cpp
View file @
9d97532a
...
...
@@ -35,5 +35,10 @@ void AnalitzaDeclarativePlugin::registerTypes(const char* uri)
qmlRegisterType
<
Analitza
::
PlotsModel
>
(
uri
,
1
,
0
,
"PlotsModel"
);
qmlRegisterType
<
Analitza
::
VariablesModel
>
(
uri
,
1
,
0
,
"VariablesModel"
);
qmlRegisterType
<
OperatorsModel
>
(
uri
,
1
,
0
,
"OperatorsModel"
);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
qmlRegisterInterface
<
Analitza
::
Variables
*>
(
"Analitza::Variables"
);
#else
qmlRegisterInterface
<
Analitza
::
Variables
>
(
uri
,
1
);
#endif
}
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