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

Munzir Taha munzirtaha at newhorizons.com.sa
Thu Feb 3 23:37:39 UTC 2005


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
>
> 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


> LC_ALL=ar_SA.UTF-8
> shows broken glyphs of Sunday (in Arabic) though it's Tuesday today as my
> $ date command shows!
>
> 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?
>
> WoW the bugs are getting nasty now ;)

-- 
Munzir Taha  PGP Key available
gpg --recv-keys --keyserver www.mandrakesecure.net F0671821

Telecommunications and Electronics Engineer
Mandrake Club Member
Maintainer of the Open Arabic Bugs Project at
http://wiki.arabeyes.org/OpenBugs
Maintainer of Fedora Arabic Translation Project
https://listman.redhat.com/mailman/listinfo/fedora-trans-ar
CIW Designer, ICDL, MOUS, Linux+, LPI 101
New Horizons CLC, Riyadh, SA




More information about the Fedora-trans-ar mailing list