Results 1 to 3 of 3

Thread: My ftp application getting success on desktop but failed when testing on the devices

  1. #1
    Join Date
    Feb 2010
    Posts
    3
    Qt products
    Qt4 Qt/Embedded Qt Jambi
    Platforms
    Unix/X11 Windows Symbian S60

    Default My ftp application getting success on desktop but failed when testing on the devices

    I've written my code to upload image using qt for symbian devices, my application was getting success to upload image or xml file on the desktop to the server. But when it testing on nokia 5800, my phone hang and failed to upload image as well as xml file. Below is my code that i've written to upload image:

    .................................................. ................................

    void MainWindow::sendFileToServer(QString filename)
    {

    QFile transferedImage(filename);


    if (!transferedImage.open(QIODevice::ReadOnly))
    {

    QMessageBox msgBox;
    msgBox.setText("File Not Found");
    msgBox.exec();

    }


    QByteArray arrayImage = transferedImage.readAll();


    connection = new QFtp();
    connect(connection, SIGNAL(dataTransferProgress(qint64,qint64)),this, SLOT(updateDataTransferProgress(qint64,qint64)));
    QObject::connect(connection, SIGNAL(done(bool)), this, SLOT(closeConnection()));

    connection->connectToHost(ui->editIPAddress->text());
    connection->login("suresh", "suresh");
    connection->put(arrayImage, "HASIL.png", QFtp::Binary);

    }

    .................................................. .................................................
    anyone can give me advice and show me what wrong with my code

  2. #2
    Join Date
    Aug 2009
    Location
    Greece, Chania
    Posts
    63
    Thanked 11 Times in 11 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60

    Default Re: My ftp application getting success on desktop but failed when testing on the devi

    You mean the application runs on your desktop as a symbian application, I mean it runs on the emulator correctly?
    Cause the above code seems ok.
    Misha R.evolution - High level Debugging IDE

    Programming is about 2 basic principles: KISS and RTFM!!!

  3. #3
    Join Date
    Feb 2010
    Posts
    3
    Qt products
    Qt4 Qt/Embedded Qt Jambi
    Platforms
    Unix/X11 Windows Symbian S60

    Default Re: My ftp application getting success on desktop but failed when testing on the devi

    its getting success run as dekstop application not on symbian simulator, the code ported to qt for symbian. Fiisrt, when it testing on my devices my phone is getting hang. Getting suggestion from someone to include sym_iap_util.h and add qt_SetDefaultIap() to my code and me myself initiative to add several linking to socket library such ac esock and insock library same as we can see on QFtp examples. my phone is not getting hang anymore but my application close unexpectedly without upload anything.

Similar Threads

  1. Desktop environment for mobile devices
    By zuck in forum Qt Programming
    Replies: 4
    Last Post: 17th December 2009, 17:47
  2. Load Testing Tool for client server application
    By live_07 in forum Qt Programming
    Replies: 2
    Last Post: 4th November 2009, 18:19
  3. QT Application testing
    By venk2ksubbu in forum Qt Programming
    Replies: 2
    Last Post: 23rd June 2009, 09:28
  4. Desktop application shadow?
    By gfunk in forum Qt Programming
    Replies: 2
    Last Post: 18th November 2006, 02:42

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.