scripting: Drop "Item" word in WindowThumbnailItem and DesktopBackgroundItem

Drop the "Item" word to be more consistent with QtQuick coding
conventions, where C++ usually include the Item word, but QML types
don't.
This commit is contained in:
Vlad Zahorodnii 2023-02-14 18:36:50 +02:00
parent 37bcdbc03e
commit 9b6c9242f6
9 changed files with 13 additions and 13 deletions

View file

@ -73,7 +73,7 @@ FocusScope {
windowType: KWinComponents.WindowFilterModel.Dock | KWinComponents.WindowFilterModel.Desktop windowType: KWinComponents.WindowFilterModel.Dock | KWinComponents.WindowFilterModel.Desktop
} }
KWinComponents.WindowThumbnailItem { KWinComponents.WindowThumbnail {
wId: model.window.internalId wId: model.window.internalId
x: model.window.x - targetScreen.geometry.x x: model.window.x - targetScreen.geometry.x
y: model.window.y - targetScreen.geometry.y y: model.window.y - targetScreen.geometry.y

View file

@ -21,7 +21,7 @@ Item {
windowModel: desktopView.windowModel windowModel: desktopView.windowModel
} }
KWinComponents.WindowThumbnailItem { KWinComponents.WindowThumbnail {
wId: model.window.internalId wId: model.window.internalId
x: model.window.x - targetScreen.geometry.x x: model.window.x - targetScreen.geometry.x
y: model.window.y - targetScreen.geometry.y y: model.window.y - targetScreen.geometry.y

View file

@ -74,7 +74,7 @@ FocusScope {
} }
} }
KWinComponents.DesktopBackgroundItem { KWinComponents.DesktopBackground {
id: backgroundItem id: backgroundItem
activity: KWinComponents.Workspace.currentActivity activity: KWinComponents.Workspace.currentActivity
desktop: KWinComponents.Workspace.currentDesktop desktop: KWinComponents.Workspace.currentDesktop
@ -301,7 +301,7 @@ FocusScope {
windowType: KWinComponents.WindowFilterModel.Dock windowType: KWinComponents.WindowFilterModel.Dock
} }
KWinComponents.WindowThumbnailItem { KWinComponents.WindowThumbnail {
id: windowThumbnail id: windowThumbnail
visible: !model.window.hidden && opacity > 0 visible: !model.window.hidden && opacity > 0
wId: model.window.internalId wId: model.window.internalId

View file

@ -74,10 +74,10 @@ FocusScope {
delete dndManagerStore[key]; delete dndManagerStore[key];
} }
KWinComponents.WindowThumbnailItem { KWinComponents.WindowThumbnail {
id: otherScreenThumbnail id: otherScreenThumbnail
z: 2 z: 2
property KWinComponents.WindowThumbnailItem cloneOf property KWinComponents.WindowThumbnail cloneOf
visible: false visible: false
client: cloneOf ? cloneOf.client : null client: cloneOf ? cloneOf.client : null
width: cloneOf ? cloneOf.width : 0 width: cloneOf ? cloneOf.width : 0

View file

@ -89,7 +89,7 @@ Item {
TweenBehavior on width {} TweenBehavior on width {}
TweenBehavior on height {} TweenBehavior on height {}
KWinComponents.WindowThumbnailItem { KWinComponents.WindowThumbnail {
id: thumbSource id: thumbSource
wId: thumb.window.internalId wId: thumb.window.internalId

View file

@ -58,7 +58,7 @@ FocusScope {
windowModel: KWinComponents.WindowModel {} windowModel: KWinComponents.WindowModel {}
} }
KWinComponents.WindowThumbnailItem { KWinComponents.WindowThumbnail {
wId: model.window.internalId wId: model.window.internalId
x: model.window.x - targetScreen.geometry.x x: model.window.x - targetScreen.geometry.x
y: model.window.y - targetScreen.geometry.y y: model.window.y - targetScreen.geometry.y

View file

@ -62,7 +62,7 @@ Item {
} }
} }
KWinComponents.DesktopBackgroundItem { KWinComponents.DesktopBackground {
activity: KWinComponents.Workspace.currentActivity activity: KWinComponents.Workspace.currentActivity
desktop: KWinComponents.Workspace.currentDesktop desktop: KWinComponents.Workspace.currentDesktop
outputName: targetScreen.name outputName: targetScreen.name
@ -225,7 +225,7 @@ Item {
windowType: KWinComponents.WindowFilterModel.Dock windowType: KWinComponents.WindowFilterModel.Dock
} }
KWinComponents.WindowThumbnailItem { KWinComponents.WindowThumbnail {
id: windowThumbnail id: windowThumbnail
wId: model.window.internalId wId: model.window.internalId
x: model.window.x - targetScreen.geometry.x x: model.window.x - targetScreen.geometry.x

View file

@ -31,7 +31,7 @@ LayoutPreview::LayoutPreview(const QString &path, bool showDesktopThumbnail, QOb
{ {
QQmlEngine *engine = new QQmlEngine(this); QQmlEngine *engine = new QQmlEngine(this);
QQmlComponent *component = new QQmlComponent(engine, this); QQmlComponent *component = new QQmlComponent(engine, this);
qmlRegisterType<WindowThumbnailItem>("org.kde.kwin", 3, 0, "WindowThumbnailItem"); qmlRegisterType<WindowThumbnailItem>("org.kde.kwin", 3, 0, "WindowThumbnail");
qmlRegisterType<SwitcherItem>("org.kde.kwin", 3, 0, "TabBoxSwitcher"); qmlRegisterType<SwitcherItem>("org.kde.kwin", 3, 0, "TabBoxSwitcher");
qmlRegisterAnonymousType<QAbstractItemModel>("org.kde.kwin", 3); qmlRegisterAnonymousType<QAbstractItemModel>("org.kde.kwin", 3);
component->loadUrl(QUrl::fromLocalFile(path)); component->loadUrl(QUrl::fromLocalFile(path));

View file

@ -673,8 +673,8 @@ KWin::Scripting::Scripting(QObject *parent)
void KWin::Scripting::init() void KWin::Scripting::init()
{ {
qmlRegisterType<DesktopBackgroundItem>("org.kde.kwin", 3, 0, "DesktopBackgroundItem"); qmlRegisterType<DesktopBackgroundItem>("org.kde.kwin", 3, 0, "DesktopBackground");
qmlRegisterType<WindowThumbnailItem>("org.kde.kwin", 3, 0, "WindowThumbnailItem"); qmlRegisterType<WindowThumbnailItem>("org.kde.kwin", 3, 0, "WindowThumbnail");
qmlRegisterType<DBusCall>("org.kde.kwin", 3, 0, "DBusCall"); qmlRegisterType<DBusCall>("org.kde.kwin", 3, 0, "DBusCall");
qmlRegisterType<ScreenEdgeItem>("org.kde.kwin", 3, 0, "ScreenEdgeItem"); qmlRegisterType<ScreenEdgeItem>("org.kde.kwin", 3, 0, "ScreenEdgeItem");
qmlRegisterType<WindowModel>("org.kde.kwin", 3, 0, "WindowModel"); qmlRegisterType<WindowModel>("org.kde.kwin", 3, 0, "WindowModel");