Author

Topic: Copy Paste bug in qt core (Read 1180 times)

legendary
Activity: 4326
Merit: 3041
Vile Vixen and Miss Bitcointalk 2021-2023
December 02, 2014, 03:20:22 AM
#4
Shouldn't the period/comma depend on the locale? Many countries use commas as the decimal mark.
It should, but it doesn't, besides accepting a comma as a decimal mark when entering values by hand:
Code:
if (keyEvent->key() == Qt::Key_Comma)
{
    // Translate a comma into a period
    QKeyEvent periodKeyEvent(event->type(), Qt::Key_Period, keyEvent->modifiers(), ".", keyEvent->isAutoRepeat(), keyEvent->count());
    QApplication::sendEvent(object, &periodKeyEvent);
    return true;
}
legendary
Activity: 1358
Merit: 1000
https://gliph.me/hUF
December 02, 2014, 12:47:21 AM
#3
Shouldn't the period/comma depend on the locale? Many countries use commas as the decimal mark.

I had an issue pasting the other a value from a website. I guess there was some zero-width non-breaking space (?) or similar in there.
legendary
Activity: 4326
Merit: 3041
Vile Vixen and Miss Bitcointalk 2021-2023
December 01, 2014, 10:48:34 AM
#2
Pasting will fail if the data contains an invalid character. For addresses, valid characters are alphanumeric characters other than I, l, O, and 0. For amounts, valid characters are numerals and a single period as a decimal mark (commas and a leading plus sign are allowed, but ignored - don't use a comma as a decimal mark (which, inconsistently, works when not pasting) unless you like big surprises!) In both cases, leading and trailing whitespace is ignored, though as I recall it caused problems in earlier versions of the client.

I've never seen copying or pasting fail in any other situation.
legendary
Activity: 3206
Merit: 1069
December 01, 2014, 08:45:02 AM
#1
sometimes, i can't do a simple copy paste of the amount to spend it or with the address

anyone experienced this?
Jump to: