When - and why - should you store data in the Windows Registry?

后端 未结 14 2748
礼貌的吻别
礼貌的吻别 2020-12-02 05:28

As a developer, tools that store configuration/options in the registry are the bane of my life. I can\'t easily track changes to those options, can\'t easily port them from

14条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-02 06:10

    Slightly off-topic, but since I see people concerned about portability, the best approach I've ever used is Qt's QSettings class. It abstracts the storage of the settings (registry on Windows, XML preference file on Mac OS and Ini files on Unix). As a client of the class, I don't have to spend a brain cycle wondering about the registry or anything else, it Just Works (tm).

    http://doc.trolltech.com/4.4/qsettings.html#details

提交回复
热议问题