author | ar <ar> | 2004-05-03 21:35:18 (UTC) |
---|---|---|
committer | ar <ar> | 2004-05-03 21:35:18 (UTC) |
commit | 412619441fab46fc79c695a23ccf9e38135bdfad (patch) (side-by-side diff) | |
tree | 19d9b8af14cf6c345ef532bb32368b9c7b43c50f /noncore/apps/opie-gutenbrowser/NetworkDialog.cpp | |
parent | d1095d71394779557f446e2a67ba55bc62eec859 (diff) | |
download | opie-412619441fab46fc79c695a23ccf9e38135bdfad.zip opie-412619441fab46fc79c695a23ccf9e38135bdfad.tar.gz opie-412619441fab46fc79c695a23ccf9e38135bdfad.tar.bz2 |
- convert qDebug to odebug
Diffstat (limited to 'noncore/apps/opie-gutenbrowser/NetworkDialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-gutenbrowser/NetworkDialog.cpp | 78 |
1 files changed, 42 insertions, 36 deletions
diff --git a/noncore/apps/opie-gutenbrowser/NetworkDialog.cpp b/noncore/apps/opie-gutenbrowser/NetworkDialog.cpp index aed53c6..6e6b707 100644 --- a/noncore/apps/opie-gutenbrowser/NetworkDialog.cpp +++ b/noncore/apps/opie-gutenbrowser/NetworkDialog.cpp @@ -12,7 +12,3 @@ // /* Created: Sun Aug 27 15:24:52 2000*/ -#include <unistd.h> -extern "C" { -#include <ftplib.h> -} @@ -21,2 +17,6 @@ extern "C" { +/* OPIE */ +#include <opie2/odebug.h> + +/* QT */ #include <qprogressbar.h> @@ -32,2 +32,8 @@ extern "C" { +/* STD */ +#include <unistd.h> +extern "C" { +#include <ftplib.h> +} + QProgressBar* ProgressBar1; @@ -48,3 +54,3 @@ static int log_progress(netbuf *ctl, int xfered, void *arg) { NetworkDialog::NetworkDialog( QWidget* parent, const char* name, bool modal, WFlags fl, const QStringList netL) - : QDialog( parent, name, modal, fl ) + : QDialog( parent, name, modal, fl ) { @@ -55,9 +61,9 @@ NetworkDialog::NetworkDialog( QWidget* parent, const char* name, bool modal, WF dir = ftp_base_dir = netL[1]; - localFileName = netL[2]; - s_partialFileName = netL[3]; + localFileName = netL[2]; + s_partialFileName = netL[3]; - resize(240,110); + resize(240,110); - local_library = (QDir::homeDirPath ()) +"/Applications/gutenbrowser/"; -// autoOk = autoDownload; + local_library = (QDir::homeDirPath ()) +"/Applications/gutenbrowser/"; +// autoOk = autoDownload; // if( networkUrl.find("ftp",0,false)== -1 ) { @@ -120,7 +126,7 @@ void NetworkDialog::initDialog() { // connect( connectionTimer,SIGNAL( timeout()),this,SLOT( connectionTimeSlot())); - if(autoOk) { - qWarning("XXXXXXXXXXXXXXXXXXXXXXXX"); - buttonOk->setDown(true); - doOk(); - } + if(autoOk) { + owarn << "XXXXXXXXXXXXXXXXXXXXXXXX" << oendl; + buttonOk->setDown(true); + doOk(); + } } @@ -145,3 +151,3 @@ void NetworkDialog::timeSlot() { // } -// // qDebug("timer event"); +// // odebug << "timer event" << oendl; // qApp->processEvents(); @@ -151,3 +157,3 @@ void NetworkDialog::timeSlot() { void NetworkDialog::connectionTimeSlot() { -// qDebug("Connections timed out"); +// odebug << "Connections timed out" << oendl; // ftpQuit(); @@ -169,4 +175,4 @@ bool NetworkDialog::downloadFile( QString networkUrl ) qApp->processEvents(); - qDebug("Downloading: %s",networkUrl.latin1()); - qDebug("Into: %s",localFileName.latin1()); + odebug << "Downloading: " << networkUrl << "" << oendl; + odebug << "Into: " << localFileName << "" << oendl; if( networkUrl.length() > 5) { @@ -176,3 +182,3 @@ bool NetworkDialog::downloadFile( QString networkUrl ) if(ftp_host.length() < 2) { - qDebug("Please select an ftp host" ); + odebug << "Please select an ftp host" << oendl; successDownload=false; @@ -182,4 +188,4 @@ bool NetworkDialog::downloadFile( QString networkUrl ) QString msg; - qDebug(ftp_host); - qDebug("Opening ftp connection."); + odebug << ftp_host << oendl; + odebug << "Opening ftp connection." << oendl; warnLabel->setText("connecting to: "+ftp_host ); @@ -202,3 +208,3 @@ bool NetworkDialog::downloadFile( QString networkUrl ) } - qDebug("Changing directories."); + odebug << "Changing directories." << oendl; TextLabel3->setText("Changing directories."); @@ -219,3 +225,3 @@ bool NetworkDialog::downloadFile( QString networkUrl ) // } - qDebug("Requesting directory list."); + odebug << "Requesting directory list." << oendl; TextLabel3->setText("Getting directory list."); @@ -234,3 +240,3 @@ bool NetworkDialog::downloadFile( QString networkUrl ) QTextStream t( &tmp ); // use a text stream - qDebug("Finding partial filename "+s_partialFileName); + odebug << "Finding partial filename "+s_partialFileName << oendl; while ( !t.eof()) { @@ -243,3 +249,3 @@ bool NetworkDialog::downloadFile( QString networkUrl ) File_Name = str; - qDebug("Found file_name "+ File_Name); + odebug << "Found file_name "+ File_Name << oendl; break; @@ -248,6 +254,6 @@ bool NetworkDialog::downloadFile( QString networkUrl ) // File_Name = str; -// qDebug("Found file_name "+ File_Name); +// odebug << "Found file_name "+ File_Name << oendl; // break; // } - + } @@ -258,3 +264,3 @@ bool NetworkDialog::downloadFile( QString networkUrl ) else - qDebug("Error opening temp file."); + odebug << "Error opening temp file." << oendl; @@ -265,4 +271,4 @@ bool NetworkDialog::downloadFile( QString networkUrl ) localFileName = temp+File_Name; - qDebug("Requesting file "+ File_Name); - qDebug( "Saving as "+localFileName); + odebug << "Requesting file "+ File_Name << oendl; + odebug << "Saving as "+localFileName << oendl; msg="Requesting file "+ File_Name; @@ -274,5 +280,5 @@ bool NetworkDialog::downloadFile( QString networkUrl ) QString temp; - temp.sprintf( File_Name+" "+" %dkb", fsz); + temp.sprintf( File_Name+" "+" %dkb", fsz); TextLabel3->setText(temp); - + ProgressBar1->setTotalSteps(fsz); @@ -295,3 +301,3 @@ bool NetworkDialog::downloadFile( QString networkUrl ) } - qDebug("Ftp session successful"); + odebug << "Ftp session successful" << oendl; successDownload=TRUE; @@ -304,3 +310,3 @@ bool NetworkDialog::downloadFile( QString networkUrl ) void NetworkDialog::doOk() { - qWarning("Do OK"); + owarn << "Do OK" << oendl; QString loginStr; @@ -316,3 +322,3 @@ void NetworkDialog::doOk() { successDownload = false; - reject(); + reject(); } |