mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-03 00:15:21 +00:00
fix diskmount plugin
Change-Id: I719dd6a134d9f23006c58c7650b41daa2e837683
This commit is contained in:
parent
b90c7a5924
commit
adf2543980
Notes:
Deepin Code Review
2016-11-21 14:17:13 +08:00
Verified+1: Anonymous Coward #1000004 Code-Review+2: 石博文 <sbw@sbw.so> Verified+1: <zhaofangfang@linuxdeepin.com> Submitted-by: 石博文 <sbw@sbw.so> Submitted-at: Mon, 21 Nov 2016 14:17:13 +0800 Reviewed-on: https://cr.deepin.io/17375 Project: dde/dde-dock Branch: refs/heads/master
@ -35,7 +35,7 @@ void DiskControlWidget::unmountAll()
|
||||
|
||||
void DiskControlWidget::diskListChanged()
|
||||
{
|
||||
m_diskInfoList = m_diskInter->diskList();
|
||||
DiskInfoList diskList = m_diskInter->diskList();
|
||||
|
||||
while (QLayoutItem *item = m_centeralLayout->takeAt(0))
|
||||
{
|
||||
@ -44,7 +44,7 @@ void DiskControlWidget::diskListChanged()
|
||||
}
|
||||
|
||||
int mountedCount = 0;
|
||||
for (auto info : m_diskInfoList)
|
||||
for (auto info : diskList)
|
||||
{
|
||||
if (info.m_mountPoint.isEmpty())
|
||||
continue;
|
||||
@ -56,6 +56,7 @@ void DiskControlWidget::diskListChanged()
|
||||
connect(item, &DiskControlItem::requestUnmount, this, &DiskControlWidget::unmountDisk);
|
||||
|
||||
m_centeralLayout->addWidget(item);
|
||||
m_diskInfoList.append(info);
|
||||
}
|
||||
|
||||
emit diskCountChanged(mountedCount);
|
||||
|
Loading…
x
Reference in New Issue
Block a user