summaryrefslogtreecommitdiff
authorjosef <josef>2002-10-18 11:36:34 (UTC)
committer josef <josef>2002-10-18 11:36:34 (UTC)
commit24c0ae04669e94d554fe8ef49888ffb5a6a00656 (patch) (side-by-side diff)
tree96e48d488555d789de7ac73797d016c7e8262956
parent3484cd354a54bcc20d389b123423028e09d884df (diff)
downloadopie-24c0ae04669e94d554fe8ef49888ffb5a6a00656.zip
opie-24c0ae04669e94d554fe8ef49888ffb5a6a00656.tar.gz
opie-24c0ae04669e94d554fe8ef49888ffb5a6a00656.tar.bz2
- increase dialog responsiveness
The higher the value (currently 100) is, the faster the modem dials, but lower values guarantee a smoother UI.
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-console/dialer.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/noncore/apps/opie-console/dialer.cpp b/noncore/apps/opie-console/dialer.cpp
index 7bf9352..51d4093 100644
--- a/noncore/apps/opie-console/dialer.cpp
+++ b/noncore/apps/opie-console/dialer.cpp
@@ -219,18 +219,17 @@ qWarning("Sending: '%s'", m.latin1());
}
}
QString Dialer::receive()
{
QString buf;
char buffer[1024];
int ret;
-
- qApp->processEvents();
+ int counter;
while(1)
{
ret = ::read(m_fd, buffer, sizeof(buffer));
if(ret > 0)
{
for(int i = 0; i < ret; i++)
@@ -242,17 +241,19 @@ qWarning("Got: '%s'", buffer);
{
qWarning("Receiving: '%s'", buf.latin1());
return buf;
}
}
else if(ret < 0)
{
if(errno != EAGAIN) reset();
+ else if(!(counter++ % 100)) qApp->processEvents();
}
+ else if(!(counter++ % 100)) qApp->processEvents();
}
return QString::null;
}
void Dialer::switchState(int newstate)
{
int oldstate = state;