mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-31 01:04:20 +00:00
fix multi-byte key/value size calculation
This commit is contained in:
parent
65fee98933
commit
2ff0b57e1e
@ -78,9 +78,9 @@ void KevaAddKeyDialog::cancel()
|
||||
|
||||
void KevaAddKeyDialog::onKeyChanged(const QString& key)
|
||||
{
|
||||
// Calculate current length
|
||||
int keyTextLength = key.length();
|
||||
int valueTextLength = ui->valueText->toPlainText().length();
|
||||
// Calculate current size
|
||||
int keyTextLength = key.toStdString().size();
|
||||
int valueTextLength = ui->valueText->toPlainText().toStdString().size();
|
||||
|
||||
// Update counter value
|
||||
ui->keyCounter->setText(
|
||||
@ -112,9 +112,9 @@ void KevaAddKeyDialog::onKeyChanged(const QString& key)
|
||||
|
||||
void KevaAddKeyDialog::onValueChanged()
|
||||
{
|
||||
// Calculate current length
|
||||
int keyTextLength = ui->keyText->text().length();
|
||||
int valueTextLength = ui->valueText->toPlainText().length();
|
||||
// Calculate current size
|
||||
int keyTextLength = ui->keyText->text().toStdString().size();
|
||||
int valueTextLength = ui->valueText->toPlainText().toStdString().size();
|
||||
|
||||
// Update counter value
|
||||
ui->valueCounter->setText(
|
||||
|
Loading…
x
Reference in New Issue
Block a user