diff --git a/misc/dbusnotification.cpp b/misc/dbusnotification.cpp index 7729614..f7c1867 100644 --- a/misc/dbusnotification.cpp +++ b/misc/dbusnotification.cpp @@ -362,8 +362,8 @@ bool DBusNotification::queryCapabilities(const std::functionGetCapabilities()); - connect(watcher, &QDBusPendingCallWatcher::finished, [&callback](QDBusPendingCallWatcher *watcher) { + const auto *const newWatcher = new QDBusPendingCallWatcher(s_dbusInterface->GetCapabilities()); + connect(newWatcher, &QDBusPendingCallWatcher::finished, [&callback](QDBusPendingCallWatcher *watcher) { watcher->deleteLater(); const QDBusPendingReply returnValue(*watcher); if (returnValue.isError()) { diff --git a/paletteeditor/paletteeditor.cpp b/paletteeditor/paletteeditor.cpp index 8142d8a..4b9917c 100644 --- a/paletteeditor/paletteeditor.cpp +++ b/paletteeditor/paletteeditor.cpp @@ -327,7 +327,7 @@ bool PaletteModel::setData(const QModelIndex &index, const QVariant &value, int m_parentPalette.brush(QPalette::Inactive, static_cast(r))); m_palette.setBrush(QPalette::Disabled, static_cast(r), m_parentPalette.brush(QPalette::Disabled, static_cast(r))); - mask &= ~(1 << index.row()); + mask &= ~static_cast(1 << index.row()); } m_palette. #if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)) diff --git a/resources/qtconfigarguments.cpp b/resources/qtconfigarguments.cpp index ba154d6..7de67e9 100644 --- a/resources/qtconfigarguments.cpp +++ b/resources/qtconfigarguments.cpp @@ -132,7 +132,7 @@ void QtConfigArguments::applySettings(bool preventApplyingDefaultFont) const QIcon::setThemeName(QString::fromLocal8Bit(*i)); if (++i != end) { QStringList searchPaths; - searchPaths.reserve(m_iconThemeArg.values().size() - 1); + searchPaths.reserve(static_cast(m_iconThemeArg.values().size() - 1)); for (; i != end; ++i) { searchPaths << QString::fromLocal8Bit(*i); } @@ -179,7 +179,7 @@ void QtConfigArguments::applySettings(bool preventApplyingDefaultFont) const #endif if (m_libraryPathsArg.isPresent()) { QStringList libraryPaths; - libraryPaths.reserve(m_libraryPathsArg.values().size()); + libraryPaths.reserve(static_cast(m_libraryPathsArg.values().size())); for (const auto &path : m_libraryPathsArg.values()) { libraryPaths << QString::fromLocal8Bit(path); } diff --git a/widgets/iconbutton.cpp b/widgets/iconbutton.cpp index fde1958..d2cf8e1 100644 --- a/widgets/iconbutton.cpp +++ b/widgets/iconbutton.cpp @@ -80,7 +80,7 @@ QSize IconButton::sizeHint() const #else const qreal pixmapRatio = 1.0; #endif - return QSize(m_pixmap.width() / pixmapRatio, m_pixmap.height() / pixmapRatio); + return QSize(static_cast(m_pixmap.width() / pixmapRatio), static_cast(m_pixmap.height() / pixmapRatio)); } void IconButton::paintEvent(QPaintEvent *) @@ -90,12 +90,12 @@ void IconButton::paintEvent(QPaintEvent *) #else const qreal pixmapRatio = 1.0; #endif - QStylePainter painter(this); - QRect pixmapRect = QRect(0, 0, m_pixmap.width() / pixmapRatio, m_pixmap.height() / pixmapRatio); + auto painter = QStylePainter(this); + auto pixmapRect = QRect(0, 0, static_cast(m_pixmap.width() / pixmapRatio), static_cast(m_pixmap.height() / pixmapRatio)); pixmapRect.moveCenter(rect().center()); painter.drawPixmap(pixmapRect, m_pixmap); if (hasFocus()) { - QStyleOptionFocusRect focusOption; + auto focusOption = QStyleOptionFocusRect(); focusOption.initFrom(this); focusOption.rect = pixmapRect; #ifdef Q_OS_MAC