diff --git a/kcmkwin/kwindecoration/declarative-plugin/plugin.cpp b/kcmkwin/kwindecoration/declarative-plugin/plugin.cpp --- a/kcmkwin/kwindecoration/declarative-plugin/plugin.cpp +++ b/kcmkwin/kwindecoration/declarative-plugin/plugin.cpp @@ -41,10 +41,17 @@ qmlRegisterType(uri, 1, 0, "Decoration"); qmlRegisterType(uri, 1, 0, "Button"); qmlRegisterType(uri, 1, 0, "ButtonsModel"); +#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) qmlRegisterType(); qmlRegisterType(); qmlRegisterType(); qmlRegisterType(); +#else + qmlRegisterAnonymousType(uri, 1); + qmlRegisterAnonymousType(uri, 1); + qmlRegisterAnonymousType(uri, 1); + qmlRegisterAnonymousType(uri, 1); +#endif } } diff --git a/kcmkwin/kwindecoration/kcm.cpp b/kcmkwin/kwindecoration/kcm.cpp --- a/kcmkwin/kwindecoration/kcm.cpp +++ b/kcmkwin/kwindecoration/kcm.cpp @@ -100,10 +100,13 @@ i18n("Author"), QStringLiteral("vpilo@coldshock.net")); setAboutData(about); - +#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) qmlRegisterType(); qmlRegisterType(); - +#else + qmlRegisterAnonymousType("org.kde.kwin.KWinDecoration", 1); + qmlRegisterAnonymousType("org.kde.kwin.KWinDecoration", 1); +#endif m_proxyThemesModel->setSourceModel(m_themesModel); m_proxyThemesModel->setFilterCaseSensitivity(Qt::CaseInsensitive); m_proxyThemesModel->setSortCaseSensitivity(Qt::CaseInsensitive); diff --git a/plugins/kdecorations/aurorae/src/decorationoptions.cpp b/plugins/kdecorations/aurorae/src/decorationoptions.cpp --- a/plugins/kdecorations/aurorae/src/decorationoptions.cpp +++ b/plugins/kdecorations/aurorae/src/decorationoptions.cpp @@ -167,16 +167,16 @@ } if (m_decoration) { // disconnect from existing decoration - disconnect(m_decoration->client().data(), &KDecoration2::DecoratedClient::activeChanged, this, &DecorationOptions::slotActiveChanged); + disconnect(m_decoration->client().toStrongRef().data(), &KDecoration2::DecoratedClient::activeChanged, this, &DecorationOptions::slotActiveChanged); auto s = m_decoration->settings(); disconnect(s.data(), &KDecoration2::DecorationSettings::fontChanged, this, &DecorationOptions::fontChanged); disconnect(s.data(), &KDecoration2::DecorationSettings::decorationButtonsLeftChanged, this, &DecorationOptions::titleButtonsChanged); disconnect(s.data(), &KDecoration2::DecorationSettings::decorationButtonsRightChanged, this, &DecorationOptions::titleButtonsChanged); disconnect(m_paletteConnection); } m_decoration = decoration; - connect(m_decoration->client().data(), &KDecoration2::DecoratedClient::activeChanged, this, &DecorationOptions::slotActiveChanged); - m_paletteConnection = connect(m_decoration->client().data(), &KDecoration2::DecoratedClient::paletteChanged, this, + connect(m_decoration->client().toStrongRef().data(), &KDecoration2::DecoratedClient::activeChanged, this, &DecorationOptions::slotActiveChanged); + m_paletteConnection = connect(m_decoration->client().toStrongRef().data(), &KDecoration2::DecoratedClient::paletteChanged, this, [this] (const QPalette &pal) { m_colors.update(pal); emit colorsChanged(); @@ -194,10 +194,10 @@ if (!m_decoration) { return; } - if (m_active == m_decoration->client().data()->isActive()) { + if (m_active == m_decoration->client().toStrongRef().data()->isActive()) { return; } - m_active = m_decoration->client().data()->isActive(); + m_active = m_decoration->client().toStrongRef().data()->isActive(); emit colorsChanged(); emit fontChanged(); } diff --git a/screenedge.cpp b/screenedge.cpp --- a/screenedge.cpp +++ b/screenedge.cpp @@ -880,7 +880,7 @@ void ScreenEdges::updateLayout() { const QSize desktopMatrix = VirtualDesktopManager::self()->grid().size(); - Qt::Orientations newLayout = nullptr; + Qt::Orientations newLayout = {}; if (desktopMatrix.width() > 1) { newLayout |= Qt::Horizontal; }