# QMAKE_CC=clang
# QMAKE_CXX=clang++
+# QMAKE_LINK=clang++
freebsd-g++: QMAKE_TARGET.arch = $$QMAKE_HOST.arch
linux-g++: QMAKE_TARGET.arch = $$QMAKE_HOST.arch
// ********************************************************* Step 13: IP collection thread
strCollectorCommand = GetArg("-peercollector", "");
- if (strCollectorCommand != "")
+ if (!fTestNet && strCollectorCommand != "")
NewThread(ThreadIPCollector, NULL);
// ********************************************************* Step 14: finished
<rect>
<x>0</x>
<y>0</y>
- <width>550</width>
+ <width>595</width>
<height>380</height>
</rect>
</property>
</layout>
</item>
<item>
- <spacer name="verticalSpacer_Network">
+ <layout class="QHBoxLayout" name="horizontalLayout_3">
+ <item>
+ <widget class="QLabel" name="externalSeederLabel">
+ <property name="text">
+ <string>Seeder command:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="externalSeederCommand"/>
+ </item>
+ <item>
+ <widget class="QPushButton" name="chooseSeeder">
+ <property name="text">
+ <string>Choose ...</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
#include <QRegExp>
#include <QRegExpValidator>
#include <QKeyEvent>
+#include <QFileDialog>
+
+#if QT_VERSION < 0x050000
+#include <QDesktopServices>
+#else
+#include <QStandardPaths>
+#endif
OptionsDialog::OptionsDialog(QWidget *parent) :
QWidget(parent, DIALOGWINDOWHINTS),
mapper->addMapping(ui->torPort, OptionsModel::TorPort);
mapper->addMapping(ui->TorOnly, OptionsModel::TorOnly);
mapper->addMapping(ui->torName, OptionsModel::TorName);
+ mapper->addMapping(ui->externalSeederCommand, OptionsModel::ExternalSeeder);
/* Window */
close();
}
#endif
-}
\ No newline at end of file
+}
+void OptionsDialog::on_chooseSeeder_clicked()
+{
+#if QT_VERSION < 0x050000
+ QString openDir = QDesktopServices::storageLocation(QDesktopServices::ApplicationsLocation);
+#else
+ QString openDir = QStandardPaths::ApplicationsLocation(QStandardPaths::ApplicationsLocation);
+#endif
+
+ QString filename = QFileDialog::getOpenFileName(this, tr("Choose peer collector application"), openDir, tr("Applications (*.*)"));
+ if(!filename.isEmpty()) {
+ ui->externalSeederCommand->setText(filename);
+ }
+}
void handleProxyIpValid(QValidatedLineEdit *object, bool fState);
void handleTorIpValid(QValidatedLineEdit *object, bool fState);
+ void on_chooseSeeder_clicked();
+
signals:
void proxyIpValid(QValidatedLineEdit *object, bool fValid);
void torIpValid(QValidatedLineEdit *object, bool fValid);
}
}
+ if (!fTestNet && settings.contains("externalSeeder") && settings.value("externalSeeder").toString() != "") {
+ SoftSetArg("-peercollector", settings.value("externalSeeder").toString().toStdString());
+ }
+
if (settings.contains("detachDB"))
SoftSetBoolArg("-detachdb", settings.value("detachDB").toBool());
if (!language.isEmpty())
return settings.value("fTorOnly", false);
case TorName:
return settings.value("TorName", "");
+ case ExternalSeeder:
+ return settings.value("externalSeeder", "");
case Fee:
return QVariant(static_cast<qlonglong>(nTransactionFee));
case DisplayUnit:
settings.setValue("TorName", value.toString());
}
break;
+ case ExternalSeeder:
+ settings.setValue("externalSeeder", value.toString());
+ break;
case Fee:
nTransactionFee = value.toLongLong();
settings.setValue("nTransactionFee", static_cast<qlonglong>(nTransactionFee));
DetachDatabases, // bool
Language, // QString
CoinControlFeatures, // bool
+ ExternalSeeder, // QString
OptionIDRowCount,
};