Initialize QSettings earlier & change the Organization to "Subsurface"

The first change allows the default_filename to be found again.
The second change switches us to .config/Subsurface/Subsurface.conf which
I find much more useful.

QtCreator also fixed a few indentation issues for me. How helpful.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2013-05-21 20:31:56 -07:00
parent 238c80a708
commit 6d3a4ec9b2
2 changed files with 6 additions and 6 deletions

2
main.c
View file

@ -217,7 +217,7 @@ int main(int argc, char **argv)
subsurface_command_line_init(&argc, &argv);
parse_xml_init();
init_ui(&argc, &argv); /* the gtk stuff is needed for parsing below */
init_ui(&argc, &argv);
for (i = 1; i < argc; i++) {
const char *a = argv[i];

View file

@ -61,9 +61,6 @@ const char *existing_filename;
void init_qt_ui(int *argcp, char ***argvp)
{
application->installTranslator(new Translator(application));
QCoreApplication::setOrganizationName("hohndel");
QCoreApplication::setOrganizationDomain("hohndel.org");
QCoreApplication::setApplicationName("Subsurface");
MainWindow *window = new MainWindow();
window->show();
}
@ -80,6 +77,9 @@ void init_ui(int *argcp, char ***argvp)
// [http://www.iana.org/assignments/character-sets/character-sets.xml]
QTextCodec::setCodecForCStrings(QTextCodec::codecForMib(106));
#endif
QCoreApplication::setOrganizationName("Subsurface");
QCoreApplication::setOrganizationDomain("subsurface.hohndel.org");
QCoreApplication::setApplicationName("Subsurface");
QSettings settings;
settings.beginGroup("GeneralSettings");