There is no special casing of an empty index in the model update code, so a query that returns no data should trigger the same behaviour as an index with no data to return.
To test this, I stopped the mediascanner daemon and manually deleted all the rows in the index. I'm still getting the same number of statusChanged signals as before (although it no longer claims I have 5784 songs the first time), and the "empty" text in my test program behaves as expected.
I can keep on searching for problems, but I think I'll need a bit more information to track this down.
There is no special casing of an empty index in the model update code, so a query that returns no data should trigger the same behaviour as an index with no data to return.
To test this, I stopped the mediascanner daemon and manually deleted all the rows in the index. I'm still getting the same number of statusChanged signals as before (although it no longer claims I have 5784 songs the first time), and the "empty" text in my test program behaves as expected.
I can keep on searching for problems, but I think I'll need a bit more information to track this down.