mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-27 08:49:19 +00:00
fix(App): colors getter returns a const pointer now
This commit is contained in:
parent
00bc9aa18f
commit
46f989c2e8
3 changed files with 5 additions and 11 deletions
|
|
@ -352,8 +352,8 @@ void registerToolType (const char *name) {
|
|||
|
||||
#define registerSharedToolType(TYPE, NAME, METHOD) qmlRegisterSingletonType<TYPE>( \
|
||||
NAME, 1, 0, NAME, \
|
||||
[](QQmlEngine *, QJSEngine *) -> QObject *{ \
|
||||
QObject *object = METHOD(); \
|
||||
[](QQmlEngine *, QJSEngine *) -> QObject *{ \
|
||||
QObject *object = const_cast<TYPE *>(METHOD()); \
|
||||
QQmlEngine::setObjectOwnership(object, QQmlEngine::CppOwnership); \
|
||||
return object; \
|
||||
} \
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ public:
|
|||
return mNotifier;
|
||||
}
|
||||
|
||||
Colors *getColors () const {
|
||||
const Colors *getColors () const {
|
||||
return mColors;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -58,10 +58,7 @@ static QByteArray buildByteArrayAttribute (const QByteArray &name, const QByteAr
|
|||
return attribute;
|
||||
}
|
||||
|
||||
static QByteArray parseFillAndStroke (
|
||||
QXmlStreamAttributes &readerAttributes,
|
||||
const Colors &colors
|
||||
) {
|
||||
static QByteArray parseFillAndStroke (QXmlStreamAttributes &readerAttributes, const Colors &colors) {
|
||||
static QRegExp regex("^color-([^-]+)-(fill|stroke)$");
|
||||
|
||||
QByteArray attributes;
|
||||
|
|
@ -86,10 +83,7 @@ static QByteArray parseFillAndStroke (
|
|||
return attributes;
|
||||
}
|
||||
|
||||
static QByteArray parseStyle (
|
||||
QXmlStreamAttributes &readerAttributes,
|
||||
const Colors &colors
|
||||
) {
|
||||
static QByteArray parseStyle (QXmlStreamAttributes &readerAttributes, const Colors &colors) {
|
||||
static QRegExp regex("^color-([^-]+)-style-(fill|stroke)$");
|
||||
|
||||
QByteArray attribute;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue