MCPcopy Create free account
hub / github.com/cc20110101/RedisView / saveSet

Method saveSet

src/RedisView/AppView/LoginDialog.cpp:210–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208}
209
210void LoginDialog::saveSet(QList<ClientInfoDialog> &vClientInfo) {
211
212 QString sPath = QCoreApplication::applicationDirPath() + "/" + IniFileName;
213 QSettings settings(sPath, QSettings::IniFormat);
214 settings.setIniCodec("UTF-8");
215 settings.remove("logins");
216 settings.beginWriteArray("logins");
217 for(int i =0; i < vClientInfo.size(); ++i) {
218 settings.setArrayIndex(i);
219 settings.setValue("name", vClientInfo[i]._name);
220 settings.setValue("addr", vClientInfo[i]._encodeAddr);
221 settings.setValue("passwd", vClientInfo[i]._encodePasswd);
222 settings.setValue("encode", vClientInfo[i]._encode.isEmpty() ? "GB18030" : vClientInfo[i]._encode);
223 settings.setValue("keypattern", vClientInfo[i]._keyPattern);
224 settings.setValue("valuepattern", vClientInfo[i]._valuePattern);
225 }
226 settings.endArray();
227}
228
229RedisCluster * LoginDialog::getClient() {
230 return _redisClient;

Callers

nothing calls this directly

Calls 1

setValueMethod · 0.80

Tested by

no test coverage detected