Results 1 to 2 of 2

Thread: Qcopservicerequest

  1. #1
    Join Date
    Dec 2006
    Posts
    6
    Thanks
    1
    Qt products
    Platforms
    Unix/X11

    Default Qcopservicerequest

    Hi,

    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
    req.send();

    ------
    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
    ----------------------
    MenuManager::eventFilter
    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
    void*

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Qcopservicerequest

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

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.