author | llornkcor <llornkcor> | 2002-03-24 15:44:15 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-03-24 15:44:15 (UTC) |
commit | 368d5032f4ff4566dea1e99aa2bb782300e0bfd5 (patch) (unidiff) | |
tree | 9d4f453e27e66d4c7b55ebbca84d410ea3ec0204 | |
parent | 0003cbb436fc3d254e2c45aa1d65aee439d322f6 (diff) | |
download | opie-368d5032f4ff4566dea1e99aa2bb782300e0bfd5.zip opie-368d5032f4ff4566dea1e99aa2bb782300e0bfd5.tar.gz opie-368d5032f4ff4566dea1e99aa2bb782300e0bfd5.tar.bz2 |
took out processEvents causing slowup
-rw-r--r-- | noncore/net/opieftp/opieftp.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/noncore/net/opieftp/opieftp.cpp b/noncore/net/opieftp/opieftp.cpp index 4722d70..e2a6cad 100644 --- a/noncore/net/opieftp/opieftp.cpp +++ b/noncore/net/opieftp/opieftp.cpp | |||
@@ -320,33 +320,33 @@ void OpieFtp::serverComboEdited(const QString & edit) { | |||
320 | } | 320 | } |
321 | } | 321 | } |
322 | 322 | ||
323 | void OpieFtp::connectorBtnToggled(bool On) | 323 | void OpieFtp::connectorBtnToggled(bool On) |
324 | { | 324 | { |
325 | if(On) { | 325 | if(On) { |
326 | connector(); | 326 | connector(); |
327 | } else { | 327 | } else { |
328 | disConnector(); | 328 | disConnector(); |
329 | } | 329 | } |
330 | 330 | ||
331 | } | 331 | } |
332 | 332 | ||
333 | void OpieFtp::connector() | 333 | void OpieFtp::connector() |
334 | { | 334 | { |
335 | QCopEnvelope ( "QPE/System", "busy()" ); | 335 | QCopEnvelope ( "QPE/System", "busy()" ); |
336 | qApp->processEvents(); | 336 | // qApp->processEvents(); |
337 | currentRemoteDir=remotePath->text(); | 337 | currentRemoteDir=remotePath->text(); |
338 | if(ServerComboBox->currentText().isEmpty()) { | 338 | if(ServerComboBox->currentText().isEmpty()) { |
339 | QMessageBox::warning(this,tr("Ftp"),tr("Please set the server info"),tr("Ok"),0,0); | 339 | QMessageBox::warning(this,tr("Ftp"),tr("Please set the server info"),tr("Ok"),0,0); |
340 | TabWidget->setCurrentPage(2); | 340 | TabWidget->setCurrentPage(2); |
341 | ServerComboBox->setFocus(); | 341 | ServerComboBox->setFocus(); |
342 | connectServerBtn->setOn(FALSE); | 342 | connectServerBtn->setOn(FALSE); |
343 | connectServerBtn->setText( tr("Connect")); | 343 | connectServerBtn->setText( tr("Connect")); |
344 | return; | 344 | return; |
345 | } | 345 | } |
346 | FtpInit(); | 346 | FtpInit(); |
347 | TabWidget->setCurrentPage(1); | 347 | TabWidget->setCurrentPage(1); |
348 | QString ftp_host = ServerComboBox->currentText(); | 348 | QString ftp_host = ServerComboBox->currentText(); |
349 | QString ftp_user = UsernameComboBox->currentText(); | 349 | QString ftp_user = UsernameComboBox->currentText(); |
350 | QString ftp_pass = PasswordEdit->text(); | 350 | QString ftp_pass = PasswordEdit->text(); |
351 | QString port=PortSpinBox->cleanText(); | 351 | QString port=PortSpinBox->cleanText(); |
352 | port.stripWhiteSpace(); | 352 | port.stripWhiteSpace(); |
@@ -381,33 +381,33 @@ void OpieFtp::connector() | |||
381 | void OpieFtp::disConnector() | 381 | void OpieFtp::disConnector() |
382 | { | 382 | { |
383 | if(conn) | 383 | if(conn) |
384 | FtpQuit(conn); | 384 | FtpQuit(conn); |
385 | setCaption("OpieFtp"); | 385 | setCaption("OpieFtp"); |
386 | currentRemoteDir="/"; | 386 | currentRemoteDir="/"; |
387 | Remote_View->clear(); | 387 | Remote_View->clear(); |
388 | connectServerBtn->setText( tr("Connect")); | 388 | connectServerBtn->setText( tr("Connect")); |
389 | connectServerBtn->setOn(FALSE); | 389 | connectServerBtn->setOn(FALSE); |
390 | 390 | ||
391 | } | 391 | } |
392 | 392 | ||
393 | void OpieFtp::localUpload() | 393 | void OpieFtp::localUpload() |
394 | { | 394 | { |
395 | int fsz; | 395 | int fsz; |
396 | QCopEnvelope ( "QPE/System", "busy()" ); | 396 | QCopEnvelope ( "QPE/System", "busy()" ); |
397 | qApp->processEvents(); | 397 | // qApp->processEvents(); |
398 | QString strItem = Local_View->currentItem()->text(0); | 398 | QString strItem = Local_View->currentItem()->text(0); |
399 | QString localFile = currentDir.canonicalPath()+"/"+strItem; | 399 | QString localFile = currentDir.canonicalPath()+"/"+strItem; |
400 | QString remoteFile= currentRemoteDir+strItem; | 400 | QString remoteFile= currentRemoteDir+strItem; |
401 | QFileInfo fi(localFile); | 401 | QFileInfo fi(localFile); |
402 | if( !fi.isDir()) { | 402 | if( !fi.isDir()) { |
403 | fsz=fi.size(); | 403 | fsz=fi.size(); |
404 | ProgressBar->setTotalSteps(fsz); | 404 | ProgressBar->setTotalSteps(fsz); |
405 | 405 | ||
406 | FtpOptions(FTPLIB_CALLBACK, (long) log_progress, conn); | 406 | FtpOptions(FTPLIB_CALLBACK, (long) log_progress, conn); |
407 | FtpOptions(FTPLIB_IDLETIME, (long) 1000, conn); | 407 | FtpOptions(FTPLIB_IDLETIME, (long) 1000, conn); |
408 | FtpOptions(FTPLIB_CALLBACKARG, (long) &fsz, conn); | 408 | FtpOptions(FTPLIB_CALLBACKARG, (long) &fsz, conn); |
409 | FtpOptions(FTPLIB_CALLBACKBYTES, (long) fsz/10, conn); | 409 | FtpOptions(FTPLIB_CALLBACKBYTES, (long) fsz/10, conn); |
410 | qDebug("Put: %s, %s",localFile.latin1(),remoteFile.latin1()); | 410 | qDebug("Put: %s, %s",localFile.latin1(),remoteFile.latin1()); |
411 | 411 | ||
412 | if( !FtpPut( localFile.latin1(), remoteFile.latin1(),FTPLIB_IMAGE, conn ) ) { | 412 | if( !FtpPut( localFile.latin1(), remoteFile.latin1(),FTPLIB_IMAGE, conn ) ) { |
413 | QString msg; | 413 | QString msg; |
@@ -423,35 +423,35 @@ void OpieFtp::localUpload() | |||
423 | TabWidget->setCurrentPage(1); | 423 | TabWidget->setCurrentPage(1); |
424 | remoteDirList( (const QString &)currentRemoteDir); //this also calls populate | 424 | remoteDirList( (const QString &)currentRemoteDir); //this also calls populate |
425 | QCopEnvelope ( "QPE/System", "notBusy()" ); | 425 | QCopEnvelope ( "QPE/System", "notBusy()" ); |
426 | } | 426 | } |
427 | 427 | ||
428 | void OpieFtp::nullifyCallBack() | 428 | void OpieFtp::nullifyCallBack() |
429 | { | 429 | { |
430 | FtpOptions(FTPLIB_CALLBACK, NULL, conn); | 430 | FtpOptions(FTPLIB_CALLBACK, NULL, conn); |
431 | FtpOptions(FTPLIB_IDLETIME, NULL, conn); | 431 | FtpOptions(FTPLIB_IDLETIME, NULL, conn); |
432 | FtpOptions(FTPLIB_CALLBACKARG, NULL, conn); | 432 | FtpOptions(FTPLIB_CALLBACKARG, NULL, conn); |
433 | FtpOptions(FTPLIB_CALLBACKBYTES, NULL, conn); | 433 | FtpOptions(FTPLIB_CALLBACKBYTES, NULL, conn); |
434 | 434 | ||
435 | } | 435 | } |
436 | 436 | ||
437 | void OpieFtp::remoteDownload() | 437 | void OpieFtp::remoteDownload() |
438 | { | 438 | { |
439 | // qApp->processEvents(); | ||
439 | int fsz; | 440 | int fsz; |
440 | QCopEnvelope ( "QPE/System", "busy()" ); | 441 | QCopEnvelope ( "QPE/System", "busy()" ); |
441 | qApp->processEvents(); | ||
442 | QString strItem = Remote_View->currentItem()->text(0); | 442 | QString strItem = Remote_View->currentItem()->text(0); |
443 | // strItem=strItem.right(strItem.length()-1); | 443 | // strItem=strItem.right(strItem.length()-1); |
444 | 444 | ||
445 | QString localFile = currentDir.canonicalPath(); | 445 | QString localFile = currentDir.canonicalPath(); |
446 | if(localFile.right(1).find("/",0,TRUE) == -1) | 446 | if(localFile.right(1).find("/",0,TRUE) == -1) |
447 | localFile += "/"; | 447 | localFile += "/"; |
448 | localFile += strItem; | 448 | localFile += strItem; |
449 | // QString localFile = currentDir.canonicalPath()+"/"+strItem; | 449 | // QString localFile = currentDir.canonicalPath()+"/"+strItem; |
450 | QString remoteFile= currentRemoteDir+strItem; | 450 | QString remoteFile= currentRemoteDir+strItem; |
451 | if (!FtpSize( remoteFile.latin1(), &fsz, FTPLIB_ASCII, conn)) | 451 | if (!FtpSize( remoteFile.latin1(), &fsz, FTPLIB_ASCII, conn)) |
452 | fsz = 0; | 452 | fsz = 0; |
453 | QString temp; | 453 | QString temp; |
454 | temp.sprintf( remoteFile+" "+" %dkb", fsz); | 454 | temp.sprintf( remoteFile+" "+" %dkb", fsz); |
455 | 455 | ||
456 | ProgressBar->setTotalSteps(fsz); | 456 | ProgressBar->setTotalSteps(fsz); |
457 | FtpOptions(FTPLIB_CALLBACK, (long) log_progress, conn); | 457 | FtpOptions(FTPLIB_CALLBACK, (long) log_progress, conn); |