Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ project(DDEShell
LANGUAGES CXX C
)

add_compile_definitions(QT_NO_KEYWORDS)

if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX /usr)
endif ()
Expand Down
4 changes: 2 additions & 2 deletions applets/dde-am/amapplet.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2024-2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

Expand All @@ -19,7 +19,7 @@

virtual bool load() override;

private slots:
private Q_SLOTS:

Check warning on line 22 in applets/dde-am/amapplet.h

View workflow job for this annotation

GitHub Actions / cppcheck

There is an unknown macro here somewhere. Configuration is required. If Q_SLOTS is a macro then please configure it.
void onInterfacesRemoved(const QDBusObjectPath &objPath, const QStringList &interfaces);

private:
Expand Down
2 changes: 1 addition & 1 deletion applets/dde-appearance/appearanceapplet.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class AppearanceApplet : public DApplet

virtual bool load() override;
qreal opacity() const;
signals:
Q_SIGNALS:
void opacityChanged();
private:
void initDBusProxy();
Expand Down
4 changes: 2 additions & 2 deletions applets/dde-apps/amappitemmodel.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2024-2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

Expand All @@ -21,7 +21,7 @@ class AMAppItemModel : public AppItemModel

bool ready() const;

signals:
Q_SIGNALS:
void readyChanged(bool);

private:
Expand Down
2 changes: 1 addition & 1 deletion applets/dde-apps/appsapplet.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class AppsApplet : public DApplet
bool appModelReady() const;
QVariantMap ddeCategories() const;

signals:
Q_SIGNALS:
void appModelReadyChanged(bool ready);

private:
Expand Down
20 changes: 10 additions & 10 deletions applets/dde-apps/itemspage.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2023-2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

Expand Down Expand Up @@ -34,7 +34,7 @@ QString ItemsPage::name() const
void ItemsPage::setName(const QString &name)
{
m_displayName = name;
emit nameChanged();
Q_EMIT nameChanged();
}

int ItemsPage::maxItemCountPerPage() const
Expand Down Expand Up @@ -72,8 +72,8 @@ void ItemsPage::appendEmptyPage()
{
m_pages.append(QStringList());

emit pageCountChanged();
emit sigPageAdded(m_pages.count() - 1, m_pages.count() - 1);
Q_EMIT pageCountChanged();
Q_EMIT sigPageAdded(m_pages.count() - 1, m_pages.count() - 1);
}

// if length of items larger than max item count per page, there will be another page get appended
Expand Down Expand Up @@ -102,8 +102,8 @@ void ItemsPage::appendPage(const QStringList items)
m_pages.append(newList);
}

emit pageCountChanged();
emit sigPageAdded(first, m_pages.count() - 1);
Q_EMIT pageCountChanged();
Q_EMIT sigPageAdded(first, m_pages.count() - 1);
}

// find a page with empty place and append the item to that page.
Expand Down Expand Up @@ -186,8 +186,8 @@ bool ItemsPage::removeItem(const QString id, bool removePageIfPageIsEmpty)

if (removePageIfPageIsEmpty && m_pages.at(page).isEmpty()) {
m_pages.removeAt(page);
emit pageCountChanged();
emit sigPageRemoved(m_pages.count() - 1, m_pages.count() - 1);
Q_EMIT pageCountChanged();
Q_EMIT sigPageRemoved(m_pages.count() - 1, m_pages.count() - 1);
}

return true;
Expand All @@ -214,8 +214,8 @@ void ItemsPage::removeEmptyPages()
int count = m_pages.size();
m_pages.removeAll({});
if (count != m_pages.size()) {
emit pageCountChanged();
emit sigPageRemoved(m_pages.count() - 1, m_pages.count() - 1);
Q_EMIT pageCountChanged();
Q_EMIT sigPageRemoved(m_pages.count() - 1, m_pages.count() - 1);
}
}

Expand Down
4 changes: 2 additions & 2 deletions applets/dde-apps/itemspage.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2023-2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

Expand Down Expand Up @@ -49,10 +49,10 @@
private:
void moveItem(int fromPage, int fromIndex, int toPage, int toIndex);

signals:
Q_SIGNALS:
void nameChanged();
void pageCountChanged();
void sigPageAdded(int first, int last);

Check warning on line 55 in applets/dde-apps/itemspage.h

View workflow job for this annotation

GitHub Actions / cppcheck

Local variable 'sigPageAdded' shadows outer function

Check warning on line 55 in applets/dde-apps/itemspage.h

View workflow job for this annotation

GitHub Actions / cppcheck

Local variable 'sigPageAdded' shadows outer function
void sigPageRemoved(int first, int last);

private:
Expand Down
4 changes: 2 additions & 2 deletions example/applet-example-data/exampleapplet.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2023-2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

Expand Down Expand Up @@ -53,7 +53,7 @@ void ExampleApplet::setUserData(bool newUserData)
if (m_userData == newUserData)
return;
m_userData = newUserData;
emit userDataChanged();
Q_EMIT userDataChanged();
}

QString ExampleApplet::call(const QString &id)
Expand Down
4 changes: 2 additions & 2 deletions example/bridge-example/exampleappletitem.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2024-2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

Expand All @@ -17,7 +17,7 @@ class ExampleAppletItem : public DS_NAMESPACE::DApplet
explicit ExampleAppletItem(QObject *parent = nullptr);
virtual bool init() override;

signals:
Q_SIGNALS:
void applicationsModelChanged();

private:
Expand Down
4 changes: 2 additions & 2 deletions example/panel-example/examplepanel.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2023-2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

Expand All @@ -18,7 +18,7 @@

virtual bool init() override;

private slots:
private Q_SLOTS:

Check warning on line 21 in example/panel-example/examplepanel.h

View workflow job for this annotation

GitHub Actions / cppcheck

There is an unknown macro here somewhere. Configuration is required. If Q_SLOTS is a macro then please configure it.
void onReceivedSignal(const QString &id);

};
2 changes: 1 addition & 1 deletion frame/layershell/x11dlayershellemulation.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
public:
explicit LayerShellEmulation(QWindow* window, QObject* parent = nullptr);

private slots:
private Q_SLOTS:

Check warning on line 25 in frame/layershell/x11dlayershellemulation.h

View workflow job for this annotation

GitHub Actions / cppcheck

There is an unknown macro here somewhere. Configuration is required. If Q_SLOTS is a macro then please configure it.
void onLayerChanged();
// margins or anchor changed
void onPositionChanged();
Expand Down
4 changes: 2 additions & 2 deletions frame/models/listtotableproxymodel.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2024-2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: LGPL-2.0-or-later

Expand All @@ -18,7 +18,7 @@ class ListToTableProxyModel : public KExtraColumnsProxyModel

QVariant extraColumnData(const QModelIndex &parent, int row, int extraColumn, int role = Qt::DisplayRole) const override;

signals:
Q_SIGNALS:
void rolesChanged(QList<int> roles);
void sourceColumnChanged(int sourceColum);

Expand Down
2 changes: 1 addition & 1 deletion frame/popupwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class PopupWindow : public QQuickApplicationWindow
void mouseMoveEvent(QMouseEvent *event) override;
bool nativeEvent(const QByteArray &eventType, void *message, qintptr *result) override;

signals:
Q_SIGNALS:
void x11GrabFocusTransitionChanged();
void x11FocusOutByGrab();
void x11FocusInByUngrab();
Expand Down
4 changes: 2 additions & 2 deletions frame/private/dsqmlglobal_p.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2024-2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

Expand Down Expand Up @@ -40,7 +40,7 @@ class DQmlGlobal : public QObject, public DTK_CORE_NAMESPACE::DObject
static DQmlGlobal *instance();
static QList<QWindow *> allChildrenWindows(QWindow *target);

signals:
Q_SIGNALS:
void rootAppletChanged();
};

Expand Down
4 changes: 2 additions & 2 deletions frame/private/utility_x11_p.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2024-2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

Expand Down Expand Up @@ -42,7 +42,7 @@ class MouseGrabEventFilter : public QObject
static bool isMatchingWindow(QWindow *target);
void closeAllWindow();
bool eventFilter(QObject *watched, QEvent *event) override;
signals:
Q_SIGNALS:
void outsideMousePressed();
private:
void mousePressEvent(QMouseEvent *e);
Expand Down
14 changes: 7 additions & 7 deletions frame/quick/dsquickdrag.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2024-2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

Expand Down Expand Up @@ -141,7 +141,7 @@ void DQuickDrag::setActive(bool newActive)
}

d->m_active = newActive;
emit activeChanged();
Q_EMIT activeChanged();
}

QPoint DQuickDrag::startDragPoint() const
Expand All @@ -162,7 +162,7 @@ void DQuickDrag::setOverlay(QQmlComponent *newOverlay)
if (d->m_overlay == newOverlay)
return;
d->m_overlay = newOverlay;
emit overlayChanged();
Q_EMIT overlayChanged();
}

QSizeF DQuickDrag::hotSpotScale() const
Expand All @@ -177,14 +177,14 @@ void DQuickDrag::setHotSpotScale(const QSizeF &newHotSpotScale)
if (d->m_hotSpotScale == newHotSpotScale)
return;
d->m_hotSpotScale = newHotSpotScale;
emit hotSpotScaleChanged();
Q_EMIT hotSpotScaleChanged();
}

void DQuickDrag::resetHotSpotScale()
{
D_D(DQuickDrag);
d->m_hotSpotScale = {};
emit hotSpotScaleChanged();
Q_EMIT hotSpotScaleChanged();
}

QPoint DQuickDrag::currentDragPoint() const
Expand Down Expand Up @@ -299,14 +299,14 @@ void DQuickDragPrivate::updateStartDragPoint()
m_startDragPoint = pos - hotSpot();

D_Q(DQuickDrag);
emit q->startDragPointChanged();
Q_EMIT q->startDragPointChanged();
}

void DQuickDragPrivate::updateCurrentDragPoint()
{
m_currentDragPoint = m_window->position();
D_Q(DQuickDrag);
emit q->currentDragPointChanged();
Q_EMIT q->currentDragPointChanged();
}

QPoint DQuickDragPrivate::hotSpot() const
Expand Down
4 changes: 2 additions & 2 deletions frame/quick/dsquickdrag_p.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2024-2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

Expand Down Expand Up @@ -45,7 +45,7 @@ class DQuickDrag : public QObject, public DTK_CORE_NAMESPACE::DObject
bool isDragging() const;

static DQuickDrag *qmlAttachedProperties(QObject *object);
signals:
Q_SIGNALS:
void activeChanged();
void startDragPointChanged();
void overlayChanged();
Expand Down
4 changes: 2 additions & 2 deletions frame/utility_x11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ bool MouseGrabEventFilter::eventFilter(QObject *watched, QEvent *event)
const auto pos = pt.globalPosition();
if (!bounding.contains(pos.toPoint())) {
qCDebug(dsLog) << "touch outside menu window:" << m_target->winId();
emit outsideMousePressed();
Q_EMIT outsideMousePressed();
return true;
}
}
Expand All @@ -146,7 +146,7 @@ void MouseGrabEventFilter::mousePressEvent(QMouseEvent *e)
if ((e->position().toPoint().isNull() && !pos.isNull()) ||
!bounding.contains(pos.toPoint())) {
instance()->deliverMouseEvent(e->button());
emit outsideMousePressed();
Q_EMIT outsideMousePressed();
return;
}
}
Expand Down
6 changes: 3 additions & 3 deletions panels/dock/appruntimeitem/windowmanager.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2024-2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

Expand Down Expand Up @@ -101,7 +101,7 @@ void WindowManager::setWindowInfoActive(uint id, const QString &name)
if (m_WindowList[i].id == id) {
m_ActiveId = id;
m_WindowList[i].name = "ForegroundApp:"+name;
emit dataChanged(index(i), index(i), {NameRole, IdRole, StartTimeRole});
Q_EMIT dataChanged(index(i), index(i), {NameRole, IdRole, StartTimeRole});
return;
}
}
Expand All @@ -113,7 +113,7 @@ void WindowManager::setWindowInfoInActive(uint id, const QString &name)
if (m_ActiveId!=0&&m_WindowList[i].id == m_ActiveId) {
m_WindowList[i].name = "BackgroundApp:"+m_WindowList[i].name.split(":")[1];
m_ActiveId=0;
emit dataChanged(index(i), index(i), {NameRole, IdRole, StartTimeRole});
Q_EMIT dataChanged(index(i), index(i), {NameRole, IdRole, StartTimeRole});
return;
}
}
Expand Down
4 changes: 2 additions & 2 deletions panels/dock/dockpanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ void DockPanel::setContextDragging(bool newContextDragging)
m_contextDragging = newContextDragging;
if (!m_contextDragging)
m_helper->checkNeedHideOrNot();
emit contextDraggingChanged();
Q_EMIT contextDraggingChanged();
}

bool DockPanel::isResizing() const
Expand All @@ -585,7 +585,7 @@ void DockPanel::setIsResizing(bool resizing)
if (m_isResizing == resizing)
return;
m_isResizing = resizing;
emit isResizingChanged(m_isResizing);
Q_EMIT isResizingChanged(m_isResizing);
}

bool DockPanel::moveXEmbedWindow(uint32_t wid, double dx, double dy, QQuickWindow *anchorWindow)
Expand Down
Loading
Loading