diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b897ec295..c7ddee1a2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -70,7 +70,7 @@ jobs: container: ubuntu:${{ matrix.container }} strategy: matrix: - container: ['22.04', '24.04', '25.04', '25.10'] + container: ['22.04', '24.04', '25.10', '26.04'] arch: ['amd64', 'arm64'] env: DEBIAN_FRONTEND: noninteractive @@ -116,7 +116,7 @@ jobs: container: fedora:${{ matrix.container }} strategy: matrix: - container: [42, 43] + container: [42, 43, 44] steps: - name: Download artifact uses: dawidd6/action-download-artifact@v11 diff --git a/client/dialogs/RoleAddressDialog.cpp b/client/dialogs/RoleAddressDialog.cpp index 362e31a2b..bdf590973 100644 --- a/client/dialogs/RoleAddressDialog.cpp +++ b/client/dialogs/RoleAddressDialog.cpp @@ -23,11 +23,25 @@ #include "Settings.h" #include "effects/Overlay.h" +#include #include #include class RoleAddressDialog::Private: public Ui::RoleAddressDialog {}; +class SanitizingValidator: public QValidator { +public: + using QValidator::QValidator; + State validate(QString &input, int &pos) const override { + static const QRegularExpression invalid( + QStringLiteral("[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x{FFFE}\\x{FFFF}]")); + int before = input.size(); + input.remove(invalid); + pos = qMax(0, pos - (before - input.size())); + return Acceptable; + } +}; + RoleAddressDialog::RoleAddressDialog(QWidget *parent) : QDialog(parent) , d(new Private) @@ -37,17 +51,18 @@ RoleAddressDialog::RoleAddressDialog(QWidget *parent) d->buttonLayout->setDirection(QBoxLayout::RightToLeft); #endif setWindowFlags(Qt::Dialog | Qt::CustomizeWindowHint); - for(QLineEdit *w: findChildren()) - w->setAttribute(Qt::WA_MacShowFocusRect, false); connect( d->cancel, &QPushButton::clicked, this, &RoleAddressDialog::reject ); connect( d->sign, &QPushButton::clicked, this, &RoleAddressDialog::accept ); + auto *validator = new SanitizingValidator(this); auto list = findChildren(); if(!list.isEmpty()) list.first()->setFocus(); for(QLineEdit *line: list) { + line->setAttribute(Qt::WA_MacShowFocusRect, false); + line->setValidator(validator); Settings::Option s{line->objectName(), {}}; auto *completer = new QCompleter(s, line); completer->setMaxVisibleItems(10);