Results 1 to 2 of 2

Thread: Save password to *.db file

  1. #1
    Join Date
    Feb 2013
    Location
    Banzart
    Posts
    54
    Thanks
    17
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Save password to *.db file

    Hello i have this nap of code which is mentioned to save the password to a .db file but it dosen't seem to work because it always got to passwdJob.error() .Could you please help me to fix this out


    QKeychain::WritePasswordJob passwdJob(_OCS_APP_NAME);

    passwdJob.setAutoDelete(false);

    passwdJob.setKey( mAccountName );

    passwdJob.setTextData(mPassword);

    QEventLoop passwdLoop;

    passwdLoop.connect( &passwdJob, SIGNAL(finished(QKeychain::Job*)),
    &passwdLoop,SLOT(quit()));
    passwdJob.start();
    passwdLoop.exec();
    if(passwdJob.error()) {
    syncDebug() << "Error: Unable to save password!"<< passwdJob.error();

    }
    Sliver_Twist

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Save password to *.db file

    Your question reads: I am using an undisclosed third-party piece of software on an undisclosed operating system and it is returning an error. What is wrong?

    I suggest you start by looking at, and understanding, the error message.

Similar Threads

  1. How to secure a file by password
    By miraks in forum Qt Programming
    Replies: 8
    Last Post: 22nd March 2011, 19:34
  2. How to save a file in UTF with BOM?
    By Alan_K in forum Newbie
    Replies: 6
    Last Post: 19th March 2011, 21:32
  3. Saving a password in a file
    By srohit24 in forum Qt Programming
    Replies: 12
    Last Post: 25th June 2009, 07:50
  4. Password on local file/folder
    By icebox25 in forum Qt Programming
    Replies: 3
    Last Post: 13th April 2007, 16:33
  5. QHttp GET File & Password
    By patrik08 in forum Qt Programming
    Replies: 4
    Last Post: 11th June 2006, 13:04

Tags for this Thread

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.