Skip to content

Commit 7b1f86b

Browse files
wjyrichdeepin-bot[bot]
authored andcommitted
fix: fix building warnings.
as titile. Logs:
1 parent cdab9da commit 7b1f86b

30 files changed

Lines changed: 71 additions & 18 deletions

plugins/application-tray/abstracttrayprotocol.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class AbstractTrayProtocolHandler : public QObject
4242
Q_PROPERTY(bool enabled READ enabled NOTIFY enabledChanged FINAL)
4343

4444
public:
45-
AbstractTrayProtocolHandler(QObject *parent = nullptr) {};
45+
AbstractTrayProtocolHandler(QObject *parent = nullptr) { Q_UNUSED(parent) };
4646
~AbstractTrayProtocolHandler() {};
4747

4848
virtual uint32_t windowId() const = 0;
@@ -64,7 +64,7 @@ class AbstractTrayProtocolHandler : public QObject
6464
QWidget *window() const {return m_window;}
6565

6666
protected:
67-
virtual bool eventFilter(QObject *watched, QEvent *event) {return false;};
67+
virtual bool eventFilter(QObject *watched, QEvent *event) { Q_UNUSED(watched) Q_UNUSED(event) return false; };
6868

6969
Q_SIGNALS:
7070
void titleChanged();

plugins/application-tray/sniprotocolhandler.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ SniTrayProtocolHandler::SniTrayProtocolHandler(const QString &sniServicePath, QO
120120
connect(m_sniInter, &StatusNotifierItem::NewStatus, this, &SniTrayProtocolHandler::statusChanged);
121121
connect(m_sniInter, &StatusNotifierItem::NewToolTip, this, &SniTrayProtocolHandler::tooltiChanged);
122122
connect(DGuiApplicationHelper::instance(), &DGuiApplicationHelper::themeTypeChanged, this, [this](DGuiApplicationHelper::ColorType themeType) {
123+
Q_UNUSED(themeType)
123124
m_dbusMenuImporter->updateMenu(true);
124125
});
125126
}

plugins/application-tray/trayplugin.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
namespace tray {
1717
TrayPlugin::TrayPlugin(QObject *parent)
1818
{
19+
Q_UNUSED(parent)
1920
qRegisterMetaType<TrayList>("TrayList");
2021
qDBusRegisterMetaType<TrayList>();
2122

plugins/application-tray/traywidget.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ TrayWidget::~TrayWidget()
4646

4747
void TrayWidget::showEvent(QShowEvent* event)
4848
{
49+
Q_UNUSED(event)
4950
m_handler->setWindow(window());
5051
window()->installEventFilter(m_handler);
5152
window()->setMouseTracking(true);

plugins/application-tray/xembedprotocolhandler.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,6 @@ void XembedProtocolHandler::initX11resources()
201201
values[0] = screen->black_pixel; // draw a solid background so the embedded icon doesn't get garbage in it
202202
values[1] = true; // bypass wM
203203
values[2] = XCB_EVENT_MASK_STRUCTURE_NOTIFY | XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY | XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT | XCB_EVENT_MASK_LEAVE_WINDOW | XCB_EVENT_MASK_ENTER_WINDOW;
204-
const auto ratio = qApp->devicePixelRatio();
205204
xcb_create_window(c,
206205
XCB_COPY_FROM_PARENT,
207206
m_containerWid,

plugins/dde-dock/airplane-mode/airplanemodeplugin.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ void AirplaneModePlugin::refreshAirplaneEnableState()
185185

186186
void AirplaneModePlugin::onAirplaneEnableChanged(bool enable)
187187
{
188+
Q_UNUSED(enable)
188189
if (!m_proxyInter)
189190
return;
190191

@@ -266,6 +267,8 @@ bool AirplaneModePlugin::getAirplaneDconfig() const
266267

267268
void AirplaneModePlugin::onAirplaneModePropertiesChanged(const QString &interfaceName, const QVariantMap &changedProperties, const QStringList &invalidatedProperties)
268269
{
270+
Q_UNUSED(interfaceName)
271+
Q_UNUSED(invalidatedProperties)
269272
if (changedProperties.contains("HasAirplaneMode")) {
270273
updatePluginVisible();
271274
}

plugins/dde-dock/bluetooth/componments/bluetoothadapteritem.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ BluetoothDeviceItem::BluetoothDeviceItem(QStyle *style, const Device *device, Pl
2424
: m_style(style)
2525
, m_device(device)
2626
{
27+
Q_UNUSED(parent)
2728
m_standardItem = new PluginStandardItem();
2829

2930
m_standardItem->updateIcon(m_device->deviceType().isEmpty() ? QIcon::fromTheme("bluetooth_other")

plugins/dde-dock/bluetooth/componments/bluetoothadapteritem.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class DeviceControlWidget : public QPushButton
8888
}
8989
}
9090

91-
const bool isExpand() { return m_isExpand; }
91+
bool isExpand() { return m_isExpand; }
9292

9393
Q_SIGNALS:
9494
void expandStateChanged(bool state);
@@ -97,6 +97,7 @@ class DeviceControlWidget : public QPushButton
9797
protected:
9898
void paintEvent(QPaintEvent *paint) override
9999
{
100+
Q_UNUSED(paint)
100101
QPainter painter(this);
101102
painter.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform);
102103
// 绘制背景

plugins/dde-dock/brightness/brightnesscontroller.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ void BrightnessController::init()
3838
connect(&m_displayInter, &DisplayInter::BrightnessChanged, this, &BrightnessController::onMonitorsBrightnessChanged);
3939
connect(&m_displayInter, &DisplayInter::BrightnessChanged, &BrightnessModel::ref(), &BrightnessModel::setBrightnessMap);
4040
connect(&m_displayInter, &DisplayInter::DisplayModeChanged, this, [this](uchar value) {
41+
Q_UNUSED(value)
4142
// 显示模式以m_displayInter.GetRealDisplayMode()为准
4243
BrightnessModel::ref().setDisplayMode(m_displayInter.GetRealDisplayMode());
4344
});

plugins/dde-dock/brightness/monitor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class Monitor : public QObject
3232
inline bool isPrimary() const { return m_primary == m_name; }
3333
inline double brightness() const { return m_brightness; }
3434
inline const QString name() const { return m_name; }
35-
inline const bool canBrightness() const { return m_canBrightness; }
35+
inline bool canBrightness() const { return m_canBrightness; }
3636
inline const QString path() const { return m_path; }
3737
inline bool isEnabled() const { return m_enable; }
3838
inline bool isBuildin() const { return m_buildin; };

0 commit comments

Comments
 (0)