From dd1780b7a0df6d92fe984e78558884718cd6de9a Mon Sep 17 00:00:00 2001 From: SPUER <1021419916@qq.com> Date: Fri, 7 Jul 2023 11:24:36 +0800 Subject: [PATCH] chore: reduce compilation warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 解决赋值返回警告 解决\l不能解析警告 解决\value不能解析警告 Issue: https://github.com/linuxdeepin/dtk/issues/96 --- src/kernel/dforeignwindow.cpp | 4 ++-- src/kernel/dguiapplicationhelper.cpp | 2 +- src/kernel/dplatformhandle.cpp | 18 +++++++++--------- src/kernel/dregionmonitor.cpp | 6 +++--- src/kernel/dwindowgroupleader.cpp | 2 +- src/kernel/dwindowmanagerhelper.cpp | 4 ++-- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/kernel/dforeignwindow.cpp b/src/kernel/dforeignwindow.cpp index b9f35f85..c5eb5e4e 100644 --- a/src/kernel/dforeignwindow.cpp +++ b/src/kernel/dforeignwindow.cpp @@ -49,14 +49,14 @@ class DForeignWindowPrivate : public DTK_CORE_NAMESPACE::DObjectPrivate \property DForeignWindow::wmClass \brief 窗口 WM_CLASS 的值 \note 只读 - \l {https://tronche.com/gui/x/icccm/sec-4.html#WM_CLASS}{WM_CLASS} + \ref {https://tronche.com/gui/x/icccm/sec-4.html#WM_CLASS}{WM_CLASS} */ /*! \property DForeignWindow::pid \brief 窗口所属进程的 pid \note 只读 - \l {https://specifications.freedesktop.org/wm-spec/1.3/ar01s05.html}{_NET_WM_PID} + \ref {https://specifications.freedesktop.org/wm-spec/1.3/ar01s05.html}{_NET_WM_PID} */ /*! diff --git a/src/kernel/dguiapplicationhelper.cpp b/src/kernel/dguiapplicationhelper.cpp index 98cf975f..3b801013 100644 --- a/src/kernel/dguiapplicationhelper.cpp +++ b/src/kernel/dguiapplicationhelper.cpp @@ -1583,7 +1583,7 @@ bool DGuiApplicationHelper::hasUserManual() const "/com/deepin/Manual/Search", "com.deepin.Manual.Search"); if (!manualSearch.isValid()) - return hasManual = hasLocalManualFile(); + return (hasManual = hasLocalManualFile()); QDBusPendingCall call = manualSearch.asyncCall("ManualExists", qApp->applicationName()); QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(call, const_cast(this)); diff --git a/src/kernel/dplatformhandle.cpp b/src/kernel/dplatformhandle.cpp index 6e3ad93b..9fbf364f 100644 --- a/src/kernel/dplatformhandle.cpp +++ b/src/kernel/dplatformhandle.cpp @@ -122,8 +122,8 @@ static void setWindowProperty(QWindow *window, const char *name, const QVariant \endraw - \l {http://doc.qt.io/qt-5/qpa.html}{QPA} - \l {https://github.com/linuxdeepin/qt5dxcb-plugin/}{dxcb插件} + \ref {http://doc.qt.io/qt-5/qpa.html}{QPA} + \ref {https://github.com/linuxdeepin/qt5dxcb-plugin/}{dxcb插件} \sa Dtk::Gui::DPlatformHandle::isDXcbPlatform \sa QGuiApplication::platformNativeInterface \sa Dtk::Widget::DMainWindow @@ -355,17 +355,17 @@ static void setWindowProperty(QWindow *window, const char *name, const QVariant \brief 描述窗口背景模糊区域的数据结构,包含位置、大小、圆角半径等信息. - \value x + \var x 水平方向的坐标 - \value y + \var y 竖直方向的坐标 - \value width + \var width 区域的宽度 - \value height + \var height 区域的高度 - \value xRadius + \var xRadius 水平方向的圆角半径 - \value yRaduis + \var yRaduis 竖直方向的圆角半径 */ @@ -549,7 +549,7 @@ void DPlatformHandle::enableDXcbForWindow(QWindow *window) 绘制的内容不受dxcb插件的控制,它的绘制内容可能会超过 Sub Window 的有效区域,这种 情况下,应该使用此接口,并将 redirectContent 指定为 true。 - \l {https://www.x.org/releases/X11R7.5/doc/damageproto/damageproto.txt}{X11 Damage} + \ref {https://www.x.org/releases/X11R7.5/doc/damageproto/damageproto.txt}{X11 Damage} */ void DPlatformHandle::enableDXcbForWindow(QWindow *window, bool redirectContent) { diff --git a/src/kernel/dregionmonitor.cpp b/src/kernel/dregionmonitor.cpp index c37c4f2a..9a298fe1 100644 --- a/src/kernel/dregionmonitor.cpp +++ b/src/kernel/dregionmonitor.cpp @@ -22,13 +22,13 @@ DGUI_BEGIN_NAMESPACE \enum DRegionMonitor::RegisterdFlag DRegionMonitor::RegisterdFlag 定义了 DRegionMonitor 监听标志。 - \value Motion + \var Motion 代表监听鼠标移动。 - \value Button + \var Button 代表监听鼠标按键。 - \value Key + \var Key 代表监听键盘按键。 */ diff --git a/src/kernel/dwindowgroupleader.cpp b/src/kernel/dwindowgroupleader.cpp index 5235baf0..bc496c8f 100644 --- a/src/kernel/dwindowgroupleader.cpp +++ b/src/kernel/dwindowgroupleader.cpp @@ -102,7 +102,7 @@ bool DWindowGroupLeaderPrivate::setWindowGroupLeader(quint32 window, quint32 gro \image wa_wb_topWindow.gif 如果一个组内同时存在多个未设置过 QWindow::setTransientParent 的 Qt::Dialog(其它会自动设置 WM_TRANSIENT_FOR 属性的窗口也成立)类型的窗口,这些窗口之间不会互相影响显示顺序,具体的规则和 X11 ICCCM 标准一致。 - \l {https://tronche.com/gui/x/icccm/sec-4.html#WM_TRANSIENT_FOR} + \ref {https://tronche.com/gui/x/icccm/sec-4.html#WM_TRANSIENT_FOR} \sa DWindowGroupLeader::clientLeaderId \sa Dtk::Widget::DApplication::loadDXcbPlugin */ diff --git a/src/kernel/dwindowmanagerhelper.cpp b/src/kernel/dwindowmanagerhelper.cpp index 2b0f9d79..cc64d400 100644 --- a/src/kernel/dwindowmanagerhelper.cpp +++ b/src/kernel/dwindowmanagerhelper.cpp @@ -573,8 +573,8 @@ bool DWindowManagerHelper::hasWallpaperEffect() const \brief DWindowManagerHelper::windowManagerNameString \return 返回窗口管理器名称。在X11平台上,此值为窗口管理器对应窗口的 _NET_WM_NAME 的值 - \l {https://specifications.freedesktop.org/wm-spec/1.3/ar01s03.html}{_NET_SUPPORTING_WM_CHECK} - \l {https://specifications.freedesktop.org/wm-spec/1.3/ar01s05.html}{_NET_WM_NAME} + \ref {https://specifications.freedesktop.org/wm-spec/1.3/ar01s03.html}{_NET_SUPPORTING_WM_CHECK} + \ref {https://specifications.freedesktop.org/wm-spec/1.3/ar01s05.html}{_NET_WM_NAME} */ QString DWindowManagerHelper::windowManagerNameString() const {