mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-02 15:45:21 +00:00
chore: 修复cppcheck问题
修复cppcheck问题,不影响功能 Log: Influence: 不影响 Task: https://pms.uniontech.com/zentao/task-view-88591.html Change-Id: I6667525b683ee55b73d5aec9c46acf4257a5a2c5
This commit is contained in:
parent
86ce60c15e
commit
f51b4f263f
@ -227,7 +227,7 @@ private:
|
||||
void displayAnimation(const QString &screen, AniAction act);
|
||||
|
||||
void tryToShowDock(int eventX, int eventY);
|
||||
void changeDockPosition(QString lastScreen, QString deskScreen, const Position &fromPos, const Position &toPos);
|
||||
void changeDockPosition(QString fromScreen, QString toScreen, const Position &fromPos, const Position &toPos);
|
||||
|
||||
QString getValidScreen(const Position &pos);
|
||||
void resetDockScreen();
|
||||
|
@ -155,9 +155,6 @@ bool ThemeAppIcon::getIcon(QPixmap &pix, const QString iconName, const int size,
|
||||
// fallback to a Default pixmap
|
||||
pix = QPixmap(":/icons/resources/application-x-desktop.svg");
|
||||
break;
|
||||
|
||||
Q_UNREACHABLE();
|
||||
|
||||
} while (false);
|
||||
|
||||
if (!key.isEmpty()) {
|
||||
|
@ -285,11 +285,3 @@ void AdaptersManager::adapterRefresh(const Adapter *adapter)
|
||||
m_bluetoothInter->SetAdapterDiscoverable(dPath, true);
|
||||
m_bluetoothInter->RequestDiscovery(dPath);
|
||||
}
|
||||
|
||||
void AdaptersManager::disconnectDevice(Device *device)
|
||||
{
|
||||
if (device) {
|
||||
QDBusObjectPath path(device->id());
|
||||
m_bluetoothInter->DisconnectDevice(path);
|
||||
}
|
||||
}
|
||||
|
@ -38,7 +38,6 @@ public:
|
||||
void connectDevice(const Device *device, Adapter *adapter);
|
||||
int adaptersCount();
|
||||
void adapterRefresh(const Adapter *adapter);
|
||||
void disconnectDevice(Device *device);
|
||||
|
||||
signals:
|
||||
void adapterIncreased(Adapter *adapter);
|
||||
|
@ -214,11 +214,6 @@ QSize BluetoothAdapterItem::sizeHint() const
|
||||
return QSize(ItemWidth, m_adapterLabel->height() + (m_adapter->powered() ? m_seperator->sizeHint().height() + viewHeight : 0));// 加上分割线的高度
|
||||
}
|
||||
|
||||
int BluetoothAdapterItem::currentDeviceCount()
|
||||
{
|
||||
return m_deviceItems.size();
|
||||
}
|
||||
|
||||
QStringList BluetoothAdapterItem::connectedDevicesName()
|
||||
{
|
||||
QStringList devsName;
|
||||
|
@ -100,7 +100,6 @@ public:
|
||||
explicit BluetoothAdapterItem(Adapter *adapter, QWidget *parent = nullptr);
|
||||
~BluetoothAdapterItem();
|
||||
Adapter *adapter() { return m_adapter; }
|
||||
int currentDeviceCount();
|
||||
QStringList connectedDevicesName();
|
||||
|
||||
public slots:
|
||||
|
@ -51,8 +51,8 @@ TEST_F(Test_PreviewContainer, coverage_test)
|
||||
snap->requestCloseAppSnapshot();
|
||||
container->setWindowInfos(map, QList<quint32> () << 1 << 2 << 3 << 4);
|
||||
|
||||
for (const WId id: map.keys()) {
|
||||
container->appendSnapWidget(id);
|
||||
for (const WId snapId: map.keys()) {
|
||||
container->appendSnapWidget(snapId);
|
||||
}
|
||||
|
||||
container->previewEntered(id);
|
||||
|
@ -121,14 +121,10 @@ TEST_F(Test_DockItem, event_test)
|
||||
|
||||
item->showHoverTips();
|
||||
|
||||
QTimer::singleShot(10, [ &item ] {
|
||||
delete item;
|
||||
item = nullptr;
|
||||
});
|
||||
item->showContextMenu();
|
||||
QEvent *deleteEvent = new QEvent(QEvent::DeferredDelete);
|
||||
qApp->postEvent(item, deleteEvent);
|
||||
|
||||
QTest::qWait(1000);
|
||||
ASSERT_TRUE(true);
|
||||
item->showContextMenu();
|
||||
}
|
||||
|
||||
TEST_F(Test_DockItem, topleftPoint_test)
|
||||
|
Loading…
x
Reference in New Issue
Block a user