×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Why can't I create a file?

    I'd have sworn this code was working at one point, but now doesn't seem to. Bits written to the file seem to end up in a bit bucket somewhere.
    Code:
    QvLog::QvLog() {
        nullStream.setString(&nullString);
        QDir dir(QString::fromAscii("C:/"));
        dir.mkpath(QString::fromAscii("C:/Data/Data"));
        dir.setCurrent(QString::fromAscii("C:/Data/Data"));
        logFile = QSharedPointer<QFile>(new QFile(QString::fromAscii("FlightRecorder.log")));
        logFile ->setPermissions(QFile::ReadOwner | QFile::WriteOwner | QFile::ReadUser | QFile::WriteUser | QFile::ReadOther);
        logFile ->open(QIODevice::WriteOnly | QIODevice::Truncate | QIODevice::Text | QIODevice::Unbuffered);
        logStream.setDevice(logFile.data());
    }
    Any ideas?

  2. #2
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: Why can't I create a file?

    Well, looks like the code's never getting invoked. Don't know if it's a problem with DEFINES directives in the PRO file, or something screwy about loading plugins.

  3. #3
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: Why can't I create a file?

    Curiouser and curiouser. Seems like it has something to do with class static data inside a static plugin. I know that static is a problem inside a DLL, but should it be a problem in a static plugin lib?

  4. #4
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: Why can't I create a file?

    Well figured it out, finally. Control was never getting to my code!

    I'm writing a replacement for QSQLITE, and had it working fine on the simulator. But apparently the linker on the hardware has some significant differences, and control was actually being passed to the resident SQLite code rather than my replacement code. (This even though the my driver name was returned when queried.)

    Had to rename/rework a couple of more files in the plugin path to get it to go. Now the problem is that my log file fills up too fast (10MB+) and I can't access it. (How do you download a large file from the device?)

  5. #5
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: Why can't I create a file?

    PS: There still is something flaky about static storage inside a static plugin. Apparently the static is not available until the plugin has been "plugged", and that doesn't happen until after some of the handshaking code has executed.

Similar Threads

  1. Not able to create .sis file
    By amit.mangal in forum Symbian
    Replies: 12
    Last Post: 2009-09-23, 13:06
  2. How to create .aif file...??
    By s4sandy_bit in forum Symbian
    Replies: 2
    Last Post: 2008-11-18, 10:27
  3. Problem with GCCE build in Carbide.vs
    By raffaelbechara in forum Symbian
    Replies: 6
    Last Post: 2008-10-20, 16:06
  4. How to create a bmp file from a TDesC.
    By bill-wang in forum Symbian
    Replies: 14
    Last Post: 2008-10-12, 16:24
  5. File server: Compilation error in carbide.c++
    By justteam in forum Symbian
    Replies: 6
    Last Post: 2007-01-03, 23:44

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×