mirror of
https://github.com/linuxdeepin/gio-qt.git
synced 2024-11-10 12:03:46 +01:00
fix: when query_info throw NOT_FOUND cond.wakeAll() will never call
This commit is contained in:
parent
6dee1e99c3
commit
7ad783765d
@ -239,7 +239,12 @@ QExplicitlySharedDataPointer<DGioFileInfo> DGioFile::createFileInfo(QString attr
|
|||||||
QtConcurrent::run([&] {
|
QtConcurrent::run([&] {
|
||||||
QTime t;
|
QTime t;
|
||||||
t.start();
|
t.start();
|
||||||
gmmFileInfo = d->getGmmFileInstance()->query_info(attr.toStdString(), flags);
|
try {
|
||||||
|
gmmFileInfo = d->getGmmFileInstance()->query_info(attr.toStdString(), flags);
|
||||||
|
} catch (const Glib::Error &error) {
|
||||||
|
qDebug() << QString::fromStdString(error.what().raw());
|
||||||
|
}
|
||||||
|
|
||||||
if (t.elapsed() < timeout_msec) {
|
if (t.elapsed() < timeout_msec) {
|
||||||
cond.wakeAll();
|
cond.wakeAll();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user