Remove deprecated method
Summary: Remove some deprecated method Reviewers: zzag Reviewed By: zzag Subscribers: davidedmundson, zzag, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D25735
This commit is contained in:
parent
790e717c82
commit
45177bb29b
4 changed files with 18 additions and 8 deletions
|
@ -41,10 +41,17 @@ void Plugin::registerTypes(const char *uri)
|
||||||
qmlRegisterType<KDecoration2::Preview::PreviewItem>(uri, 1, 0, "Decoration");
|
qmlRegisterType<KDecoration2::Preview::PreviewItem>(uri, 1, 0, "Decoration");
|
||||||
qmlRegisterType<KDecoration2::Preview::PreviewButtonItem>(uri, 1, 0, "Button");
|
qmlRegisterType<KDecoration2::Preview::PreviewButtonItem>(uri, 1, 0, "Button");
|
||||||
qmlRegisterType<KDecoration2::Preview::ButtonsModel>(uri, 1, 0, "ButtonsModel");
|
qmlRegisterType<KDecoration2::Preview::ButtonsModel>(uri, 1, 0, "ButtonsModel");
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
|
||||||
qmlRegisterType<KDecoration2::Preview::PreviewClient>();
|
qmlRegisterType<KDecoration2::Preview::PreviewClient>();
|
||||||
qmlRegisterType<KDecoration2::Decoration>();
|
qmlRegisterType<KDecoration2::Decoration>();
|
||||||
qmlRegisterType<KDecoration2::DecorationShadow>();
|
qmlRegisterType<KDecoration2::DecorationShadow>();
|
||||||
qmlRegisterType<KDecoration2::Preview::PreviewBridge>();
|
qmlRegisterType<KDecoration2::Preview::PreviewBridge>();
|
||||||
|
#else
|
||||||
|
qmlRegisterAnonymousType<KDecoration2::Preview::PreviewClient>(uri, 1);
|
||||||
|
qmlRegisterAnonymousType<KDecoration2::Decoration>(uri, 1);
|
||||||
|
qmlRegisterAnonymousType<KDecoration2::DecorationShadow>(uri, 1);
|
||||||
|
qmlRegisterAnonymousType<KDecoration2::Preview::PreviewBridge>(uri, 1);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -100,10 +100,13 @@ KCMKWinDecoration::KCMKWinDecoration(QObject *parent, const QVariantList &argume
|
||||||
i18n("Author"),
|
i18n("Author"),
|
||||||
QStringLiteral("vpilo@coldshock.net"));
|
QStringLiteral("vpilo@coldshock.net"));
|
||||||
setAboutData(about);
|
setAboutData(about);
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
|
||||||
qmlRegisterType<QAbstractListModel>();
|
qmlRegisterType<QAbstractListModel>();
|
||||||
qmlRegisterType<QSortFilterProxyModel>();
|
qmlRegisterType<QSortFilterProxyModel>();
|
||||||
|
#else
|
||||||
|
qmlRegisterAnonymousType<QAbstractListModel>("org.kde.kwin.KWinDecoration", 1);
|
||||||
|
qmlRegisterAnonymousType<QSortFilterProxyModel>("org.kde.kwin.KWinDecoration", 1);
|
||||||
|
#endif
|
||||||
m_proxyThemesModel->setSourceModel(m_themesModel);
|
m_proxyThemesModel->setSourceModel(m_themesModel);
|
||||||
m_proxyThemesModel->setFilterCaseSensitivity(Qt::CaseInsensitive);
|
m_proxyThemesModel->setFilterCaseSensitivity(Qt::CaseInsensitive);
|
||||||
m_proxyThemesModel->setSortCaseSensitivity(Qt::CaseInsensitive);
|
m_proxyThemesModel->setSortCaseSensitivity(Qt::CaseInsensitive);
|
||||||
|
|
|
@ -167,7 +167,7 @@ void DecorationOptions::setDecoration(KDecoration2::Decoration *decoration)
|
||||||
}
|
}
|
||||||
if (m_decoration) {
|
if (m_decoration) {
|
||||||
// disconnect from existing 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();
|
auto s = m_decoration->settings();
|
||||||
disconnect(s.data(), &KDecoration2::DecorationSettings::fontChanged, this, &DecorationOptions::fontChanged);
|
disconnect(s.data(), &KDecoration2::DecorationSettings::fontChanged, this, &DecorationOptions::fontChanged);
|
||||||
disconnect(s.data(), &KDecoration2::DecorationSettings::decorationButtonsLeftChanged, this, &DecorationOptions::titleButtonsChanged);
|
disconnect(s.data(), &KDecoration2::DecorationSettings::decorationButtonsLeftChanged, this, &DecorationOptions::titleButtonsChanged);
|
||||||
|
@ -175,8 +175,8 @@ void DecorationOptions::setDecoration(KDecoration2::Decoration *decoration)
|
||||||
disconnect(m_paletteConnection);
|
disconnect(m_paletteConnection);
|
||||||
}
|
}
|
||||||
m_decoration = decoration;
|
m_decoration = decoration;
|
||||||
connect(m_decoration->client().data(), &KDecoration2::DecoratedClient::activeChanged, this, &DecorationOptions::slotActiveChanged);
|
connect(m_decoration->client().toStrongRef().data(), &KDecoration2::DecoratedClient::activeChanged, this, &DecorationOptions::slotActiveChanged);
|
||||||
m_paletteConnection = connect(m_decoration->client().data(), &KDecoration2::DecoratedClient::paletteChanged, this,
|
m_paletteConnection = connect(m_decoration->client().toStrongRef().data(), &KDecoration2::DecoratedClient::paletteChanged, this,
|
||||||
[this] (const QPalette &pal) {
|
[this] (const QPalette &pal) {
|
||||||
m_colors.update(pal);
|
m_colors.update(pal);
|
||||||
emit colorsChanged();
|
emit colorsChanged();
|
||||||
|
@ -194,10 +194,10 @@ void DecorationOptions::slotActiveChanged()
|
||||||
if (!m_decoration) {
|
if (!m_decoration) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m_active == m_decoration->client().data()->isActive()) {
|
if (m_active == m_decoration->client().toStrongRef().data()->isActive()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_active = m_decoration->client().data()->isActive();
|
m_active = m_decoration->client().toStrongRef().data()->isActive();
|
||||||
emit colorsChanged();
|
emit colorsChanged();
|
||||||
emit fontChanged();
|
emit fontChanged();
|
||||||
}
|
}
|
||||||
|
|
|
@ -880,7 +880,7 @@ void ScreenEdges::setActionForTouchBorder(ElectricBorder border, ElectricBorderA
|
||||||
void ScreenEdges::updateLayout()
|
void ScreenEdges::updateLayout()
|
||||||
{
|
{
|
||||||
const QSize desktopMatrix = VirtualDesktopManager::self()->grid().size();
|
const QSize desktopMatrix = VirtualDesktopManager::self()->grid().size();
|
||||||
Qt::Orientations newLayout = nullptr;
|
Qt::Orientations newLayout = {};
|
||||||
if (desktopMatrix.width() > 1) {
|
if (desktopMatrix.width() > 1) {
|
||||||
newLayout |= Qt::Horizontal;
|
newLayout |= Qt::Horizontal;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue