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

Method getKeyPattern

src/RedisView/AppView/MainWidget.cpp:1361–1378  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1359}
1360
1361QString MainWidget::getKeyPattern() {
1362 _keyPattern.clear();
1363 ClientInfoDialog clientInfo;
1364 QString sPath = QCoreApplication::applicationDirPath() + "/" + IniFileName;
1365 QSettings settings(sPath, QSettings::IniFormat);
1366 settings.setIniCodec("UTF-8");
1367 int size = settings.beginReadArray("logins");
1368 for(int i = 0; i < size; ++i) {
1369 settings.setArrayIndex(i);
1370 clientInfo._name = settings.value("name").toString().trimmed();
1371 if(_redisClient->getConnectName() == clientInfo._name) {
1372 _keyPattern = settings.value("keypattern","").toString();
1373 break;
1374 }
1375 }
1376 settings.endArray();
1377 return _keyPattern;
1378}
1379
1380void MainWidget::setKeyPattern(QString keyPattern) {
1381 if(_keyPattern == keyPattern)

Callers

nothing calls this directly

Calls 2

getConnectNameMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected