Multilineedit refresh only every ~70seconds, why?

Florian Erfurth <[email protected]> Thu, 11 Jan 2007 14:22:28 +0100
Newsgroups gmane.comp.handhelds.opie.devel
Message-ID <[email protected]>
Hi, I wrote an application which uses oprocess in order to call a 
shell-script. If I test it on my PC (with qvfb), it works great. 
Unfortunatelly... if I crosscompile the same code and let run directly 
on iPAQ, then it behaves different.
It should get the output from script onto multilineedit. unfortunatelly 
it doesn't work on iPAQ as I want. The output only refresh every 
70second. What did I wrong? I hope this mailinglist allows attachments. 
If you didn't receive the attachment (or if you don't want to open 
attachment) let me know please.

The most important thing of the code is in speech2textImpl.cpp:

void speech2textImpl::polish()
{
        pocketsphinx = new Opie::Core::OProcess(this, 
QString("PocketSphinx"));
    *pocketsphinx << "/home/root/speech2text/speech2text.sh";
    connect(pocketsphinx, SIGNAL(receivedStdout(Opie::Core::OProcess*, 
char*,  int)), SLOT(readFromStdout(Opie::Core::OProcess*, char*,  int)));
    if(!pocketsphinx->start(Opie::Core::OProcess::NotifyOnExit, 
Opie::Core::OProcess::AllOutput))
        QMessageBox::critical( this, "Speech2Text Info", "Script 
not\nrunning!" );
}

void speech2textImpl::readFromStdout(Opie::Core::OProcess *, char* 
c_buffer, int i_length){
    QByteArray c_buffer_array(i_length);
    memcpy( c_buffer_array.data(), c_buffer, i_length);
    str_Text.append(c_buffer_array);
    CMultiLineEdit->setText(str_Text);
    CMultiLineEdit->setCursorPosition ( CMultiLineEdit->numLines(), 0, 
FALSE );;
}

cu Floh

_______________________________________________

http://opie.handhelds.org/cgi-bin/moin.cgi/DeveloperWikiIndex

Opie-devel mailing list
[email protected]
https://handhelds.org/mailman/listinfo/opie-devel
source.tar.gz (application/x-gzip, 32.6 KB) - not displayed