Results 1 to 2 of 2

Thread: Qcopservicerequest

  1. #1
    Join Date
    Dec 2006
    Qt products

    Default Qcopservicerequest


    How can I send a QStringList containing a huge list of filenames to another application for processing.

    I am using QCopServiceRequest APIs to achieve this. But when the size of string list increases then the service request to other application fails.

    Code snippet:

    In main application,
    QCopServiceRequest req("CalleeApplication","MyFunc(QStringList)");
    req << fileList; //filelist is QStringList containing list of items

    In CalleApplication,
    void CalleeApplication::MyFunc(const QStringList& list)
    .... // processing data

    On execution of main application, it is capable of opening CalleApplication but since the data sent is big enough, the application quickly fails. the Greenphone logs show the following
    Feb 5 11:11:18 greenphonesdk x86: HITESH: filelist = 1112
    Feb 5 11:11:18 greenphonesdk x86: HITESH: address = 809d118
    Feb 5 11:11:18 greenphonesdk x86: qws_read_command: Won't read command of length 145656, connection closed.
    Feb 5 11:11:18 greenphonesdk x86: QWSLock::lock: Invalid argument
    Feb 5 11:11:18 greenphonesdk x86: QWSLock::unlock: Invalid argument
    Feb 5 11:11:18 greenphonesdk x86: QWSLock::lock: Invalid argument
    Feb 5 11:11:18 greenphonesdk last message repeated 2 times
    Feb 5 11:11:18 greenphonesdk x86: QAbstractSocket::waitForBytesWritten() is not allowed in UnconnectedState


    what I understood from the above log is that there is limit to send the amount of data through cop service request. If I reduce the size of filelist, the processing goes fine.

    Now, My question is, how it is possible to send big data using QCopServiceRequest? I was also trying to pass on the pointer to data (pass by reference) but that also fails to process, most probably because both the applications run as different process.

    any help in this regard please..

    thanks a lot.

    Warm regards

  2. #2
    Join Date
    Jan 2006
    Warsaw, Poland
    Thanked 5,013 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits

    Default Re: Qcopservicerequest

    Maybe you could either divide the command into two pieces or compress the data before sending?


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.