Results 1 to 14 of 14

Thread: File Binary Upload QHttp find the bug/s

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2006
    Posts
    788
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    49
    Thanked 48 Times in 46 Posts

    Default Re: File Binary Upload QHttp find the bug/s

    Impossibel to upload file or set variable apache2 & php5.... i discovery a faster method ...
    The key is Webdav http://www.webdav.org/ only window muss install external mount disk tool .... webdrive or netdrive ....

    advantage ... i can check evry time if mounted by hidden file
    if file exist mount otherwise ..... not....

    And send to disk evry file and variable ...

    Qt Code:
    1. void Setting_Gui::WebdavSetup()
    2. {
    3. label_webdav->setText(tr("Your OS Not Support Webdav"));
    4. QStringList diskremote;
    5. QString disksetting = Global_Config(APPLICATION_SETTING,"webdav_root");
    6. #if defined Q_WS_WIN
    7. /* http://ciz.ch/service/98,1142862047/de/ netdrive webdrive */
    8. label_webdav->setText(tr("Window XP/2000 OS: Webdav Root (Radice)"));
    9. QString alfa ="A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z";
    10. diskremote = alfa.split(",");
    11. webdav_root->clear();
    12. int loop= 0 - 1;
    13. int activeselected;
    14. QStringListIterator o(diskremote);
    15. while (o.hasNext()) {
    16. loop++;
    17. QString disker = o.next().toLocal8Bit().constData();
    18. QString diskeree = disker.append(":/");
    19. webdav_root->addItem(diskeree);
    20. if (disksetting == diskeree) {
    21. activeselected = loop;
    22. }
    23. }
    24. webdav_root->setEditable(false);
    25. webdav_root->setCurrentIndex(activeselected);
    26. #endif
    27. #if defined Q_WS_MAC
    28. /* apple + K */
    29. label_webdav->setText(tr("Mac OS: Mount Disk Webdav Root"));
    30. QString listdiron ="/Volumes/";
    31. webdav_root->addItem(disksetting);
    32. /* webdav_root->addItem(listdiron);*/
    33. QDir dir(listdiron);
    34. if (dir.exists()) {
    35. const QFileInfoList list = dir.entryInfoList();
    36. for (int i = 0; i < list.size(); i++)
    37. {
    38. fi = list.at(i);
    39. if (fi.isDir() && fi.fileName() != "." && fi.fileName() != "..") {
    40. QString disker = fi.absoluteFilePath();
    41. QString diskeree = disker.append("/");
    42. webdav_root->addItem(diskeree);
    43. }
    44. }
    45. }
    46. webdav_root->setEditable(false);
    47. #endif
    48.  
    49. #if defined Q_WS_X11
    50. /* http://www.webdav.org/cadaver/ */
    51. label_webdav->setText(tr("Linux OS: Mount Disk Webdav Root"));
    52. QString listdiron ="/mnt/";
    53. webdav_root->setEditable(true);
    54. webdav_root->addItem(disksetting);
    55. webdav_root->addItem(listdiron);
    56. #endif
    57.  
    58. }
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    28
    Thanked 976 Times in 912 Posts

    Default Re: File Binary Upload QHttp find the bug/s

    Quote Originally Posted by patrik08
    QString disker = o.next().toLocal8Bit().constData();
    Can't you just write
    Qt Code:
    1. QString disker = o.next();
    To copy to clipboard, switch view to plain text mode 
    ?

    If o.next() contains characters that local encoding can't handle, you will loose information.

  3. The following user says thank you to jacek for this useful post:

    patrik08 (9th June 2006)

Similar Threads

  1. Replies: 13
    Last Post: 1st June 2006, 15:01

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
  •  
Qt is a trademark of The Qt Company.