Debug TaskManager

Hi, Guys! I was attempt to fix bug 484647 (it is annoying me). I guess is something in LibTaskManager and I need to debug it. So I started writing a C++ code in Qt Creator:

int main(int argc, char *argv[])
{
    QApplication app(argc, argv);
    cout << QApplication::platformName().toStdString() << endl;

    TaskManager::WindowTasksModel windowTasksModel;
    cout << "Window count: " << windowTasksModel.rowCount() << endl;
}

But I got:

wayland
Window count: 0

I try write a Qt Quick App coping the QML Code from window-list applet and I got a empty list as well. So what I am doing wrong? How can I debug LibTaskManager?

Thank you in advance!

Maybe this will help you:


    //Get the number of open windows for the application
    const anchorModelIndex = anchor.modelIndex(anchor.index);
    const winIdList = tasks.tasksModel.data(anchorModelIndex, TaskManager.AbstractTasksModel.WinIdList);
    const windowCount = winIdList ? winIdList.length : 0;

Could it be that this model is populated asynchronously?