gui: previews: Ensure order matches relevance ranking
Previously, the order of previews would depend simply on which generator would finish first. Fix this by caching out of order previews. This may cause a small delay but should overall be hardly noticable.
此提交包含在:
@ -71,6 +71,10 @@ class MainWindow : public QMainWindow
|
||||
QVector<QString> searchHistory;
|
||||
int currentSearchHistoryIndex = 0;
|
||||
QString currentSavedSearchText;
|
||||
QHash<QString, int> previewOrder; /* Quick lookup for the order a preview should have */
|
||||
QMap<int, QWidget *>
|
||||
previewWidgetOrderCache /* Saves those that arrived out of order to be inserted later at the correct pos */;
|
||||
|
||||
private slots:
|
||||
void lineEditReturnPressed();
|
||||
void treeSearchItemActivated(QTreeWidgetItem *item, int i);
|
||||
|
新增問題並參考
封鎖使用者