Peter Kümmel wrote:
Georg Baum wrote:
Here you are basically reintroducing the static app variable, and therefore
the crash on exit on linux. A scoped_ptr is supposed to be equivalent to a
normal object variable concerning construction and destruction, so if that
is needed i think the old solution of Abdel is better.
Yes, the scoped _ptr adds only overhead.
What I don't understand is: Why does it work for other windows users?
Maybe they've used mingw, I use msvc.
I just merged my branch from trunk and I also see this with mingw.
If
this is really necessary we need to reintroduce the #ifdef of Abdel,
because I get a crash on Linux with this patch.
Indeed I solved the problem by adding a static there:
#ifdef Q_WS_WIN
static Application app(argc, argv);
#else
Application app(argc, argv);
#endif
For trunk that would be:
#ifdef Q_WS_WIN
static LQApplicationapp(argc, argv);
#else
LQApplication app(argc, argv);
#endif
Abdel.