I requested my personal imageprovider, but when I debug this few lines requestedSize is always {-1,-1}

Qt Code:
  1. class XdgIconThemeImageProvider : public QQuickImageProvider
  2. {
  3. public:
  4. XdgIconThemeImageProvider() : QQuickImageProvider(QQuickImageProvider::Pixmap){}
  5. QPixmap requestPixmap(const QString &id, QSize *size, const QSize &requestedSize)
  6. {
  7. QIcon ico = QIcon::fromTheme(id);
  8. QPixmap pm = ico.isNull() ? QPixmap() : ico.pixmap(100,100);
  9. *size = pm.size();
  10. return pm;
  11. }
  12. };
To copy to clipboard, switch view to plain text mode 

Are there any reasons? Am I doing somthing wrong?