July 29, 2010

vishwajeet vishwajeet
Lab Rat
83 posts

QDesktopService should be in QtCore ?

 

Hi
While looking at QDesktopService class and its functionality. was curious to know why QDesktopService class is in QtGui ? it should have been QtCore functionality.

Any thoughts ?

 Signature 

Born To Code !!!

11 replies

July 29, 2010

Smar Smar
Lab Rat
269 posts

This class seems to be for tasks desktop programs offers, and not for CLI interactivity:

From the doc: “Many desktop environments provide services that can be used by applications to perform common tasks, such as opening a web page, in a way that is both consistent and takes into account the user’s application preferences.”

http://doc.qt.nokia.com/latest/qdesktopservices.html

July 29, 2010

vishwajeet vishwajeet
Lab Rat
83 posts

but what about

  1. QString storageLocation ( StandardLocation type )

and

  1. enum StandardLocation

They are more of an CLI stuff.

 Signature 

Born To Code !!!

July 30, 2010

t3chNo t3chNo
Lab Rat
55 posts

If storageLocation was in QDir, it would be better i think. QDir already has storage location members like QDir::homePath.

July 30, 2010

Smar Smar
Lab Rat
269 posts

Or QFile… If this one is seen to be file relevant, and not directory.

Anyway, +1 for this.

July 30, 2010

Tobias Hunger Tobias Hunger
Mad Scientist
3130 posts

Please file a feature request [bugreports.qt.nokia.com].

Postings like this will only ever get considered by accident (if somebody happens to remember reading it and then actually finds the relevant post again), while the bug tracker will be consulted during planning sessions.

It might be a good idea to post the link here so that people reading this can vote for the issue.

July 30, 2010

t3chNo t3chNo
Lab Rat
55 posts

i reported.
http://bugreports.qt.nokia.com/browse/QTBUG-12531 [bugreports.qt.nokia.com]

July 30, 2010

Smar Smar
Lab Rat
269 posts

I originally thought that it could be discussed what people would think about this. First I wasn’t able to even find more proper solution for this… I suppose this is what the creator of the thread thought too.

Now, it seems this is actually good idea, a feature request can be filled with some nice suggestions :)

EDIT: too slow…

July 30, 2010

vishwajeet vishwajeet
Lab Rat
83 posts

Thats true, conclusion is not there. and thanks to t3chNo to report it but still i also feel little description and suggestion for it would have been nicer.

From my side i think let there be QCoreDesktopServices class in QtCore and QDesktopServices in QGui.

QCoreDesktopServices can have properties like storageLocation and may some more can be added later like host system configuration, CPU usage, Memory Usage like task manager.

 Signature 

Born To Code !!!

July 30, 2010

Smar Smar
Lab Rat
269 posts

vishwajeet wrote:
Thats true, conclusion is not there. and thanks to t3chNo to report it but still i also feel little description and suggestion for it would have been nicer.

From my side i think let there be QCoreDesktopServices class in QtCore and QDesktopServices in QGui.

QCoreDesktopServices can have properties like storageLocation and may some more can be added later like host system configuration, CPU usage, Memory Usage like task manager.

Could you put a comment about ideas in this topic to that bug? Seems like there is no other way to go on now.

August 14, 2012

mstanescu mstanescu
Lab Rat
18 posts

Its a good question and i cry after this. That’s what you get when people combine in the same interface things which are not related instead of doing a good encapsulation. Its just bad design.

Why not just make some StorageLocations helper class and just provide the location thing. You can just put it in QCoreApplication from my point of view.

I don’t really see the conection of these paths with the QDesktopService. Does storageLocation has ANYTHING to do with the word service?

August 14, 2012

sierdzio sierdzio
Area 51 Engineer
2320 posts

Check out Qt5, there is a module called “QtSystems” it can provide info you want and is not in QtGui/ QtWidgets ;)

 Signature 

(Z(:^

 
  ‹‹ Can Qt 3.3.6 QTable widget support multiple header rows & columns?      Spooky Qt Event Loop ››

You must log in to post a reply. Not a member yet? Register here!