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 ?



  • 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



  • but what about @QString storageLocation ( StandardLocation type ) @

    and

    @enum StandardLocation@

    They are more of an CLI stuff.



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



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

    Anyway, +1 for this.


  • Moderators

    Please file a "feature request":http://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.





  • 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...



  • 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.



  • [quote author="vishwajeet" date="1280483678"]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.

    [/quote]

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



  • 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?


  • Moderators

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


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.