| 45 | } |
| 46 | |
| 47 | int CParameter::Save(QString szFile, bool bForce) |
| 48 | { |
| 49 | if(!GetModified() && !bForce) return 0; |
| 50 | if(szFile.isEmpty()) |
| 51 | szFile = RabbitCommon::CDir::Instance()->GetFileUserConfigure(); |
| 52 | qDebug(log) << "Save configure file:" << szFile; |
| 53 | if(szFile.isEmpty()) return -1; |
| 54 | QSettings set(szFile, QSettings::IniFormat); |
| 55 | int nRet = Save(set); |
| 56 | SetModified(false); |
| 57 | return nRet; |
| 58 | } |
| 59 | |
| 60 | int CParameter::Load(QSettings &set) |
| 61 | { |