PDA

View Full Version : 2 questions: QAuthenticator and stack / heap



Tito Serenti
1st March 2009, 17:04
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:


SomeDialog dlg(this);
dlg.exec();

and


SomeDialog *dlg = new SomeDialog(this);
dlg->exec();

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.

radek.z
2nd March 2009, 08:54
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

Tito Serenti
3rd March 2009, 02:22
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!

radek.z
3rd March 2009, 06:56
Hi,
great, I was also wondering if does QAuthenticator support HTTP Digest, so thanks for finding out answer.