mainwindow: wait till search is completed before launching new one
This commit is contained in:
parent
0528e9067a
commit
5e983049f5
@ -157,6 +157,8 @@ void MainWindow::lineEditReturnPressed()
|
|||||||
}
|
}
|
||||||
// TODO: validate q;
|
// TODO: validate q;
|
||||||
ui->lblSearchResults->setText("Searching...");
|
ui->lblSearchResults->setText("Searching...");
|
||||||
|
searchWatcher.cancel();
|
||||||
|
searchWatcher.waitForFinished();
|
||||||
QFuture<QVector<SearchResult>> searchFuture = QtConcurrent::run(
|
QFuture<QVector<SearchResult>> searchFuture = QtConcurrent::run(
|
||||||
[&, q]()
|
[&, q]()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user