Use QWaitCondition instead of QSemaphore, and search function is OK.