Should we check if for example QDesktopServices returns false?
-
bq. Opens the given url in the appropriate Web browser for the user's desktop environment, and returns true if successful; otherwise returns false.
So should i create a bool function
@void Global::openUrl(const QString &url){
if(!QDesktopServices::openUrl(QUrl(url))){
Global::error("I probably could not open ""+url+""");
}
}@and call
@Global::openUrl("http://melloristudio.com/wallch/1000-HD-Wallpapers");@
everytime, or simply
@QDesktopServices::openUrl(QUrl("http://melloristudio.com/wallch/1000-HD-Wallpapers"));@ -
Checking for failures is always handy. Especially when you log messages your application puts out: then it will be easier for you to triage bug reports based on a log file.