Author

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

legendary
Activity: 4536
Merit: 3188
Vile Vixen and Miss Bitcointalk 2021-2023
December 02, 2014, 02: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: 1001
https://gliph.me/hUF
December 01, 2014, 11:47:21 PM
#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: 4536
Merit: 3188
Vile Vixen and Miss Bitcointalk 2021-2023
December 01, 2014, 09: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: 3248
Merit: 1070
December 01, 2014, 07: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: