nurupo / ProjectTox-Qt-GUI

A cross-platform front end for ProjectTox Core library, written in C++11 with use of Qt5
GNU General Public License v3.0
342 stars 116 forks source link

Changed to QT defaults for settings location #88

Closed ybhvf closed 10 years ago

ybhvf commented 10 years ago

The use of the working directory for saving/loading a "settings.ini" isn't good practice. This commit changes the saving/loading behavior to use the QTSettings defaults for the settings file location.

nurupo commented 10 years ago

The use of the working directory for saving/loading a "settings.ini" isn't good practice.

Yeah, you are right, that even was somewhere on the TODO.

There are some problems with your code:

  1. The default settings file, containing a list of DHT nodes, is no longer used, which will break things a little.
  2. You don't use QSettings::IniFormat anymore. The default format is QSettings::NativeFormat. I would like to keep the IniFormat since it's platform-independent and, because of that, it is easier to troubleshoot (native formats have some platform-dependent limitations).
  3. You wrote "qui" instead of "gui".

Anyway, I will do appropriate changes sometime soon, so you don't have to correct anything.

Also, Qt is not QT (Quick Time) and there is no QTSettings :)

ybhvf commented 10 years ago

Heh - I should've spell-checked this commit. :)

nurupo commented 10 years ago

Also, organization and application names are already set in main.cpp, so it's unnecessary to provide them to QSettings -- it will use them by default.

nurupo commented 10 years ago

Fixed in https://github.com/nurupo/ProjectTox-Qt-GUI/commit/08ebd5801fe15130be55db4a75d1cc5338168791