Results 1 to 4 of 4

Thread: 2 questions: QAuthenticator and stack / heap

  1. #1
    Tito Serenti Guest

    Default 2 questions: QAuthenticator and stack / heap

    I have two questions:

    1. I couldn't find this in any documentation: does QAuthenticator support HTTP Digest and NTLM? I assume it does, can you confirm it?

    And, how can I check what kind of authentication it uses when connecting?

    2. I was wondering what is the preferred method of creating and displaying dialogs, on the stack or on the heap? For example:

    Qt Code:
    1. SomeDialog dlg(this);
    2. dlg.exec();
    To copy to clipboard, switch view to plain text mode 

    and

    Qt Code:
    1. SomeDialog *dlg = new SomeDialog(this);
    2. dlg->exec();
    To copy to clipboard, switch view to plain text mode 

    both work fine. But is one preferred over the other or are there any advantages to using one over the other? (Assuming that the dialog should be destroyed right after it returns from being executed.)

    Thank you for any input you might have.

  2. #2
    Join Date
    Dec 2008
    Location
    Czech
    Posts
    44
    Thanks
    2
    Thanked 8 Times in 8 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: 2 questions: QAuthenticator and stack / heap

    Hi,
    About the dialog heap or stack.
    Its like with other objects. If you want to use it in more funcktions, then create it on the heap. Maybe you can also consider to use exec() or show() instead. Exec() will pops up the dialog as modal while show() will pop up it as modeless which might be better.

    Radek

  3. #3
    Tito Serenti Guest

    Default Re: 2 questions: QAuthenticator and stack / heap

    Thank you, Radek, for your answer. That's pretty much what I figured, that there's not much difference between the two when all I need to do is display the dialog without needing to re-use it.

    As far as the authenticator questions, I traced the program to qauthenticator.cpp and discovered that yes, it supports both http digest and ntlm (now, why didn't I think of doing that before? ) This is great news, since it saves me a lot of trouble of trying to implement http digest myself. Again, kudos to qt!

  4. #4
    Join Date
    Dec 2008
    Location
    Czech
    Posts
    44
    Thanks
    2
    Thanked 8 Times in 8 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: 2 questions: QAuthenticator and stack / heap

    Hi,
    great, I was also wondering if does QAuthenticator support HTTP Digest, so thanks for finding out answer.

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.