author | llornkcor <llornkcor> | 2005-01-03 03:09:51 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2005-01-03 03:09:51 (UTC) |
commit | 0b3bbec6703c021a188c865e822f536bfa3045fc (patch) (side-by-side diff) | |
tree | 3458531d039a111ba39ef2e0bed2e5bbbfedad46 /noncore/net | |
parent | 8ce8566bf038f0293a0690fce44df2bba9c4eb52 (diff) | |
download | opie-0b3bbec6703c021a188c865e822f536bfa3045fc.zip opie-0b3bbec6703c021a188c865e822f536bfa3045fc.tar.gz opie-0b3bbec6703c021a188c865e822f536bfa3045fc.tar.bz2 |
mess with things so this runs from launcher. not sure what was going on, but this seems to fix #1507
-rw-r--r-- | noncore/net/opieftp/main.cpp | 6 | ||||
-rw-r--r-- | noncore/net/opieftp/opieftp.cpp | 52 | ||||
-rw-r--r-- | noncore/net/opieftp/opieftp.h | 6 | ||||
-rw-r--r-- | noncore/net/opieftp/opieftp.pro | 3 |
4 files changed, 39 insertions, 28 deletions
diff --git a/noncore/net/opieftp/main.cpp b/noncore/net/opieftp/main.cpp index 330ca52..763ffb4 100644 --- a/noncore/net/opieftp/main.cpp +++ b/noncore/net/opieftp/main.cpp @@ -12,7 +12,9 @@ * (at your option) any later version. * ***************************************************************************/ -#include <opie2/oapplicationfactory.h> #include "opieftp.h" - +#include <opie2/oapplicationfactory.h> +//#include <qtopia/qpeapplication.h> using namespace Opie::Core; OPIE_EXPORT_APP( OApplicationFactory<OpieFtp> ) + + diff --git a/noncore/net/opieftp/opieftp.cpp b/noncore/net/opieftp/opieftp.cpp index 64146cb..4f0ca29 100644 --- a/noncore/net/opieftp/opieftp.cpp +++ b/noncore/net/opieftp/opieftp.cpp @@ -21,10 +21,11 @@ extern "C" { /* OPIE */ -#include <opie2/odebug.h> +//#include <opie2/odebug.h> +//using namespace Opie::Core; + #include <qpe/qpeapplication.h> #include <qpe/resource.h> #include <qpe/config.h> #include <qpe/mimetype.h> -using namespace Opie::Core; #include <qtextstream.h> @@ -63,9 +64,14 @@ static int log_progress(netbuf *, int xfered, void *) } -OpieFtp::OpieFtp( QWidget* parent, const char* name, WFlags fl) - : QMainWindow( parent, name, fl ) +OpieFtp::OpieFtp( QWidget* , const char*, WFlags) + : QMainWindow( ) { - odebug << "OpieFtp constructor" << oendl; + qDebug("OpieFtp constructor"); setCaption( tr( "OpieFtp" ) ); +// initializeGui(); + QTimer::singleShot( 50, this, SLOT(initializeGui() )); +} + +void OpieFtp::initializeGui() { fuckeduphack=FALSE; @@ -95,7 +101,5 @@ OpieFtp::OpieFtp( QWidget* parent, const char* name, WFlags fl) tabMenu = new QPopupMenu( this ); -//#if 0 layout->addMultiCellWidget( menuBar, 0, 0, 0, 2 ); -//#endif menuBar->insertItem( tr( "Connection" ), connectionMenu); @@ -317,4 +321,5 @@ OpieFtp::OpieFtp( QWidget* parent, const char* name, WFlags fl) currentPathCombo = new QComboBox( FALSE, view, "currentPathCombo" ); layout->addMultiCellWidget( currentPathCombo, 3, 3, 0, 4); + currentPathCombo ->setFixedWidth(220); currentPathCombo->setEditable(TRUE); @@ -337,5 +342,6 @@ OpieFtp::OpieFtp( QWidget* parent, const char* name, WFlags fl) TabWidget->setCurrentPage(2); - odebug << "Constructor done" << oendl; + qDebug("XXXXXXXXXXXX Constructor done"); + } @@ -536,5 +542,5 @@ void OpieFtp::localUpload() FtpOptions(FTPLIB_CALLBACKARG, (long) &fsz, conn); FtpOptions(FTPLIB_CALLBACKBYTES, (long) fsz/10, conn); - odebug << "Put: " << localFile.latin1() << ", " << remoteFile.latin1() << "" << oendl; +// odebug << "Put: " << localFile.latin1() << ", " << remoteFile.latin1() << "" << oendl; if( !FtpPut( localFile.latin1(), remoteFile.latin1(),FTPLIB_IMAGE, conn ) ) { @@ -597,5 +603,5 @@ void OpieFtp::remoteDownload() FtpOptions(FTPLIB_CALLBACKARG, (long) &fsz, conn); FtpOptions(FTPLIB_CALLBACKBYTES, (long) fsz/10, conn); - odebug << "Get: " << localFile.latin1() << ", " << remoteFile.latin1() << "" << oendl; +// odebug << "Get: " << localFile.latin1() << ", " << remoteFile.latin1() << "" << oendl; if(!FtpGet( localFile.latin1(), remoteFile.latin1(),FTPLIB_IMAGE, conn ) ) { @@ -776,6 +782,6 @@ bool OpieFtp::populateRemoteView( ) if( file.exists()) file. remove(); - } else - odebug << "temp file not opened successfully "+sfile << oendl; + } +// odebug << "temp file not opened successfully "+sfile << oendl; Remote_View->setSorting( 4,TRUE); return true; @@ -1235,5 +1241,5 @@ void OpieFtp::readConfig() void OpieFtp::writeConfig() { - odebug << "write config" << oendl; +// odebug << "write config" << oendl; Config cfg("opieftp"); cfg.setGroup("Server"); @@ -1266,5 +1272,5 @@ void OpieFtp::writeConfig() currentServerConfig = numberOfEntries+1; - odebug << "setting currentserverconfig to " << currentServerConfig << "" << oendl; +// odebug << "setting currentserverconfig to " << currentServerConfig << "" << oendl; cfg.setGroup(temp); @@ -1285,5 +1291,5 @@ void OpieFtp::writeConfig() void OpieFtp::clearCombos() { - odebug << "clearing" << oendl; +// odebug << "clearing" << oendl; ServerComboBox->clear(); UsernameComboBox->clear(); @@ -1305,8 +1311,8 @@ void OpieFtp::fillCombos() for (int i = 1; i <= numberOfEntries; i++) { temp.setNum(i); - odebug << temp << oendl; +// odebug << temp << oendl; cfg.setGroup("Server"); remoteServerStr = cfg.readEntry( temp,""); - odebug << remoteServerStr << oendl; +// odebug << remoteServerStr << oendl; int divider = remoteServerStr.length() - remoteServerStr.find(":",0,TRUE); @@ -1316,5 +1322,5 @@ void OpieFtp::fillCombos() remoteServerStr = remoteServerStr.left(remoteServerStr.length()-divider); - odebug << "remote server string "+remoteServerStr << oendl; +// odebug << "remote server string "+remoteServerStr << oendl; ServerComboBox->insertItem( remoteServerStr ); @@ -1335,5 +1341,5 @@ void OpieFtp::serverComboSelected(int index) QString servername; currentServerConfig = index+1; - odebug << "server combo selected " << index + 1 << "" << oendl; +// odebug << "server combo selected " << index + 1 << "" << oendl; QString username, remoteServerStr, remotePathStr, password, port, temp; servername = remoteServerStr = ServerComboBox->text(index); @@ -1350,5 +1356,5 @@ void OpieFtp::serverComboSelected(int index) remoteServerStr = cfg.readEntry( temp,""); - odebug << "Group " +temp << oendl; +// odebug << "Group " +temp << oendl; cfg.setGroup(temp); @@ -1366,5 +1372,5 @@ void OpieFtp::serverComboSelected(int index) username = cfg.readEntry("Username", "anonymous"); UsernameComboBox->lineEdit()->setText(username); - odebug << username << oendl; +// odebug << username << oendl; // odebug << "Password is "+cfg.readEntryCrypt(username << oendl; PasswordEdit->setText(cfg.readEntryCrypt(username, "me@opieftp.org")); @@ -1411,5 +1417,5 @@ void OpieFtp::deleteServer() serverListView->removeItem(i); - odebug << "OK DELETE "+tempname << oendl; +// odebug << "OK DELETE "+tempname << oendl; cfg.removeEntry(QString::number(i)); for ( ; i <= numberOfEntries; i++) { @@ -1535,5 +1541,5 @@ void OpieFtp::serverListClicked( const QString &item) { if(item.isEmpty()) return; Config cfg("opieftp"); - odebug << "highltined "+item << oendl; +// odebug << "highltined "+item << oendl; int numberOfEntries = cfg.readNumEntry("numberOfEntries",0); for (int i = 1; i <= numberOfEntries; i++) { diff --git a/noncore/net/opieftp/opieftp.h b/noncore/net/opieftp/opieftp.h index 076a906..ba2ddf9 100644 --- a/noncore/net/opieftp/opieftp.h +++ b/noncore/net/opieftp/opieftp.h @@ -48,8 +48,8 @@ class OpieFtp : public QMainWindow public: + static QString appName() { return QString::fromLatin1("opieftp"); } OpieFtp( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); ~OpieFtp(); - static QString appName() { return QString::fromLatin1("opieftp"); } QTabWidget *TabWidget; QWidget *tab, *tab_2, *tab_3; @@ -66,9 +66,11 @@ public: QString filterStr; QListViewItem * item; - QPushButton *connectServerBtn, *newServerButton;// + QPushButton *connectServerBtn, *newServerButton; QToolButton *cdUpButton, *homeButton, *docButton; bool b; + int currentServerConfig; protected slots: + void initializeGui(); void timerOut(); void upDir(); diff --git a/noncore/net/opieftp/opieftp.pro b/noncore/net/opieftp/opieftp.pro index fe69e15..835b6e0 100644 --- a/noncore/net/opieftp/opieftp.pro +++ b/noncore/net/opieftp/opieftp.pro @@ -1,3 +1,4 @@ -CONFIG += qt quick-app +TEMPLATE = app +CONFIG += qte quick-app warn_on HEADERS = opieftp.h inputDialog.h SOURCES = opieftp.cpp inputDialog.cpp main.cpp |