Add "troubleshooting" options to do rescan/reindex from UI
This commit is contained in:
Aditya Kulkarni
2019-03-19 16:02:47 -07:00
parent e8405fc0e8
commit 1671916e73
6 changed files with 118 additions and 5 deletions

View File

@@ -221,6 +221,9 @@ bool Settings::addToZcashConf(QString confLocation, QString line) {
}
bool Settings::removeFromZcashConf(QString confLocation, QString option) {
if (confLocation.isEmpty())
return false;
// To remove an option, we'll create a new file, and copy over everything but the option.
QFile file(confLocation);
if (!file.open(QIODevice::ReadOnly))
@@ -233,7 +236,6 @@ bool Settings::removeFromZcashConf(QString confLocation, QString option) {
auto s = line.indexOf("=");
QString name = line.left(s).trimmed().toLower();
if (name != option) {
qDebug() << "Copied " << line;
lines.append(line);
}
}