QtUtils: Add UTF8CodePointCountValidator

This commit is contained in:
Techjar
2020-07-16 18:47:51 -04:00
parent c59648337a
commit 92812d0b0b
4 changed files with 47 additions and 3 deletions

View File

@ -0,0 +1,19 @@
// Copyright 2020 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.
#pragma once
#include <QString>
#include <QValidator>
class UTF8CodePointCountValidator : public QValidator
{
Q_OBJECT
public:
explicit UTF8CodePointCountValidator(int max_count, QObject* parent = nullptr);
QValidator::State validate(QString& input, int& pos) const override;
int m_max_count;
};