mirror of
https://github.com/wownero/wowlet.git
synced 2026-10-17 07:11:29 +02:00
TorInfoDialog: validate port
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include <QInputDialog>
|
||||
#include <QMessageBox>
|
||||
#include <QPushButton>
|
||||
#include <QRegularExpressionValidator>
|
||||
|
||||
#include "utils/ColorScheme.h"
|
||||
#include "utils/Icons.h"
|
||||
@@ -37,6 +38,9 @@ TorInfoDialog::TorInfoDialog(QSharedPointer<AppContext> ctx, QWidget *parent)
|
||||
initPrivacyLevel();
|
||||
onConnectionStatusChanged(torManager()->torConnected);
|
||||
|
||||
auto *portValidator = new QRegularExpressionValidator{QRegularExpression("[0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]")};
|
||||
ui->line_port->setValidator(portValidator);
|
||||
|
||||
connect(torManager(), &TorManager::connectionStateChanged, this, &TorInfoDialog::onConnectionStatusChanged);
|
||||
connect(torManager(), &TorManager::logsUpdated, this, &TorInfoDialog::onLogsUpdated);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user