Skip to content

Commit

Permalink
sync: from linuxdeepin/qt5platform-plugins
Browse files Browse the repository at this point in the history
Synchronize source files from linuxdeepin/qt5platform-plugins.

Source-pull-request: linuxdeepin/qt5platform-plugins#219
  • Loading branch information
deepin-ci-robot committed Nov 8, 2023
1 parent f00a161 commit c3c949d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/dnativesettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,11 @@ void DNativeSettings::init(const QMetaObject *metaObject)

QMetaPropertyBuilder op;

switch (mp.type()) {
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
switch (static_cast<int>(mp.metaType())) {
#else
switch (static_cast<int>(mp.type())) {
#endif
case QMetaType::QByteArray:
case QMetaType::QString:
case QMetaType::QColor:
Expand Down Expand Up @@ -411,7 +415,7 @@ int DNativeSettings::metaCall(QMetaObject::Call _c, int _id, void ** _a)
const int index = p.propertyIndex();
// 对于本地属性,此处应该从m_settings中读写
if (Q_LIKELY(index != m_flagPropertyIndex && index != m_allKeysPropertyIndex
&& index >= m_firstProperty)) {
&& index >= m_firstProperty + m_propertyCount)) {
switch (_c) {
case QMetaObject::ReadProperty:
*reinterpret_cast<QVariant*>(_a[1]) = m_settings->setting(p.name());
Expand Down

0 comments on commit c3c949d

Please sign in to comment.