提交 e565d8a7 编写于 作者: M manjaro-xfce

拷贝小文件加速

上级 9432b335
......@@ -44,6 +44,7 @@ void DialogFileLoadCtrl::timerEvent(QTimerEvent * evt)
void DialogFileLoadCtrl::cleanFile()
{
quint8 cm = 0;
while (m_total_size > ui->doubleSpinBox_maxSz->value()*1024ll*1024ll*1024ll)
{
if (!m_cache_files.size())
......@@ -73,7 +74,8 @@ void DialogFileLoadCtrl::cleanFile()
m_cache_files.erase(tmf);
}
slot_next_prg(0);
if (++cm % 10==0)
slot_next_prg(0);
}
}
......@@ -160,10 +162,13 @@ void DialogFileLoadCtrl::TransFile(QFileInfo ifile)
bOk = true;
});
//Hold and wait
slot_next_prg(0);
quint8 trc = 0;
while (!bOk)
{
QThread::msleep(100);
slot_next_prg(0);
QThread::msleep(1);
if (++trc % 100==0)
slot_next_prg(0);
}
t.join();
slot_msg(msg);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册