blob: 79cd841dcc5bce459d1563c7d70299f1e51a70af (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
// Copyright 2020 Dolphin Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include <cstddef>
#include <QString>
#include <QValidator>
class UTF8CodePointCountValidator : public QValidator
{
Q_OBJECT
public:
explicit UTF8CodePointCountValidator(std::size_t max_count, QObject* parent = nullptr);
QValidator::State validate(QString& input, int& pos) const override;
private:
std::size_t m_max_count;
};
|