[Fedora-trans-ar] Re: Arabic issue #1: QSpinBox doen't work properly with Arabic locale

Lars Knoll lars at trolltech.com
Wed Feb 9 09:16:28 UTC 2005


Hi Munzir,

On Friday 04 February 2005 00:37, Munzir Taha wrote:
> On Yau al-Thulatha 21 Thu al-Hijjah 1425 12:30 am, Munzir Taha wrote:
> > Hi Sirs!
> >
> > Due to a message from Matthias Ettrich, I am retesting the Arabic and RTL
> > bugs from the beginning against the latest snapshot.
> >
> > Qt Version: qt-x11-opensource-4.0.0-b2-snapshot-20050131
> > System: Mandrake 10.1 on AMD64
> >
> > QSpinBox was not working when reversed but now it's working but with many
> > issues.
> >
> > CODE: LC_ALL=ar qt/examples/widgets/spinboxes/spinboxes
> >
> > shows the year like this 1059 and could only be increased to 1109 though
> > the code is:
> >
> >    dateEdit->setDateRange(QDate(2005, 1, 1), QDate(2010, 12, 31));
> >     dateLabel->setText(tr("Appointment date (between %0 and %1):")
> >                       
> > .arg(dateEdit->minimumDate().toString(Qt::ISODate))
> >
> > .arg(dateEdit->maximumDate().toString(Qt::ISODate)));
> >
> > I guess the issue has something to do with my ar locale and Hijri
> > Calendar. I can see functions like

No it was a simple bug in our detection of the default date format. This works 
now.

> > Also,
> >
> > $ LC_TIME=ar /usr/local/qt/examples/widgets/spinboxes/spinboxes
> >
> > shows another problem.
> >
> > PROBLEM: When I click many times in the strange Arabic letters/glyphs
> > that appeared on the first QDate spin box that says "Appointment date
> > (between 2005, 1, 1 and 2010, 12, 31:", the program crashes with the
> > error:
> >
> > ASSERT: "glyph_pos != -1" in file text/qtextlayout.cpp, line 1719
> > Aborted
>
> Now, this same error happened with this small program when called with
> -reverse.
>
>
> #include <QtGui>
>
> int main(int argc, char *argv[])
> {
>         QApplication app(argc, argv);
>         app.setFont(QFont("", 72, QFont::Bold));
>
>         QHBoxWidget *hbox = new QHBoxWidget(0);
>
>         QSpinBox *spinBox = new QSpinBox(hbox);
>
>         QSlider *slider = new QSlider(Qt::Horizontal, hbox);
>
>         QObject::connect(spinBox, SIGNAL(valueChanged(int)), slider,
> SLOT(setValue(int)));
>         QObject::connect(slider, SIGNAL(valueChanged(int)), spinBox,
> SLOT(setValue(int)));
>
>         app.setMainWidget(hbox);
>         hbox->show();
>         return app.exec();
>
> }
>
>
>
>
>
> A core dump is generated. I could send it to you if it will prove useful.
> The stack is
>
> #gdb --core=core.8450
> bt
> ...
> #3828 0x00336369 in ?? ()
> #3829 0x00000000 in ?? ()
> Cannot access memory at address 0xc0000000

I can't seem to be able to reproduce this. I hope it's fixed by now.

> > LC_ALL=ar_SA.UTF-8
> > shows broken glyphs of Sunday (in Arabic) though it's Tuesday today as my
> > $ date command shows!

I can reproduce this. We'll look into fixing it.

> > even LC_ALL=C shows the year as either 05 or 10! so I can't use 06, 07,
> > 08 and 09 as per the code setDateRange() function.
> >
> > What about Hijri date functions: isn't it implemented here? Can you copy
> > it from KDE code?

We're not planning on adding calender systems for 4.0. We'll note it as a 
feature request for 4.1

Cheers,
Lars




More information about the Fedora-trans-ar mailing list