Hi,
I am using windows XP SP3, Qt 4.7.1
I am facing a strange problem.
The following line is the web address of gmail.
https://www.google.com/accounts/ServiceLogin?service=mail&passive=true&rm=false&continue=http%3A%2F%2Fmail.google.com%2Fmail%2F%3Fui%3Dhtml%26zy%3Dl&bsv=1eic6yu9oa4y3&scc=1<mpl=default<mplcache=2
https://www.google.com/accounts/ServiceLogin?service=mail&passive=true&rm=false&continue=http%3A%2F%2Fmail.google.com%2Fmail%2F%3Fui%3Dhtml%26zy%3Dl&bsv=1eic6yu9oa4y3&scc=1<mpl=default<mplcache=2
To copy to clipboard, switch view to plain text mode
Now consider the code below
QString glink
= QString("https://www.google.com/accounts/ServiceLogin?service=mail&passive=true&rm=false&continue=http%3A%2F%2Fmail.google.com%2Fmail%2F%3Fui%3Dhtml%26zy%3Dl&bsv=1eic6yu9oa4y3&scc=1<mpl=default<mplcache=2");
QIcon ico
= ficon.
icon(finfo
);
QString glink = QString("https://www.google.com/accounts/ServiceLogin?service=mail&passive=true&rm=false&continue=http%3A%2F%2Fmail.google.com%2Fmail%2F%3Fui%3Dhtml%26zy%3Dl&bsv=1eic6yu9oa4y3&scc=1<mpl=default<mplcache=2");
QFileInfo finfo(glink);
QFileIconProvider ficon;
QIcon ico = ficon.icon(finfo);
To copy to clipboard, switch view to plain text mode
Now strangely the ico contains the icon of MyComputer. Because glink contains the path of no file or folder or symlink QFileIconProvider should return a null icon.
Is it a bug? How should I write some code such that whenever QFileIconProvider gets a webpage link it return a null icon?
thanks
Bookmarks