What I done:
1. connected to the signal
connect(m_portal->portalUser(), &Esri::ArcGISRuntime::PortalUser::addToFavoritesCompleted, this, [](bool success)
2. called the method:
m_portal->portalUser()->addToFavorites(m_webmaps->at(itemId.toInt()));
3. inside the connected lambda I always get false, and an item is not added to favorites.
And what I checked:
1. User is definitely logged in, because I can read favorites/groups/username etc
2. m_webmaps->at(itemId.toInt()) is the proper item, because I can call m_webmaps->at(itemId.toInt())->title() and compare it with the title of an item that I clicked on (they are the same items).