Subversion Repositories svn1

Rev

Rev 387 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 387 Rev 388
Line 40... Line 40...
40
**
40
**
41
----------------------------------------------------------------------------*/
41
----------------------------------------------------------------------------*/
42
 
42
 
43
QmConfig::QmConfig(void)
43
QmConfig::QmConfig(void)
44
{
44
{
45
    /*
-
 
46
    ** Init appSettings - once !
-
 
47
    */
-
 
48
    //qDebug("Create a QmConfig");
-
 
49
    if (!appSettings)
-
 
50
    {
-
 
51
        appSettings = new QSettings(getAddendemFile("mara.ini", true), QSettings::IniFormat); 
-
 
52
    }
-
 
53
}
45
}
54
 
46
 
55
/*----------------------------------------------------------------------------
47
/*----------------------------------------------------------------------------
56
** FUNCTION           : ~QmConfig
48
** FUNCTION           : ~QmConfig
57
**
49
**
Line 109... Line 101...
109
 
101
 
110
    strncpy(filepath, qPrintable(info.absolutePath()), sizeof(filepath)-3);
102
    strncpy(filepath, qPrintable(info.absolutePath()), sizeof(filepath)-3);
111
    strcat(filepath, "/");
103
    strcat(filepath, "/");
112
    qDebug("FilePath:%s", filepath );
104
    qDebug("FilePath:%s", filepath );
113
 
105
 
-
 
106
    // Locate the .ini file used to store additional information
-
 
107
    appSettings = new QSettings(getAddendemFile("mara.ini", true), QSettings::IniFormat);
-
 
108
    //qDebug() << "AppSetting: " << appSettings->fileName() << "\n";
-
 
109
 
114
    if ( !open_read_config() )
110
    if ( !open_read_config() )
115
    {
111
    {
116
        if (QMessageBox::Cancel == QMessageBox::question ( 0,
112
        if (QMessageBox::Cancel == QMessageBox::question ( 0,
117
                                                       "Config Load Error",
113
                                                       "Config Load Error",
118
                                                       "Cannot load or read configuration file.\n"
114
                                                       "Cannot load or read configuration file.\n"