Georg Baum wrote:
Jean-Marc Lasgouttes wrote:
Could bug 2549 on OS X
http://bugzilla.lyx.org/show_bug.cgi?id=2549
be related to this?
I think so. Changing app to a pointer also in qt3 gets also rid of the
famous "mutex destroy failure" message.
I think we need to change both qt3 and qt4 in such a way that the
QApplication object we create is created before any other qt stuff is
created and destroyed at the end of main(), i.e. mimic the generic qt app:
int main(int argc, char ** argv)
{
QApppplication app(argc, aargv
return app.exec();
}
I was thinking of something like this:
class base_main
{
public:
base_main(int argc, char ** argv) = 0;
virtual ~base_main()
/// Initialise the process.
/**
\retval 0 : everything is fine.
*/
virtual bool init() = 0;
/// Launch the process.
/**
\return the result of the process
\retval 0 : everything is fine.
\retval 1 : xxxx
*/
virtual int go() = 0;
};
class qt4_main: public base_main
{
qt4_main(int argc, char ** argv)
: the_app_(argc, argv)
{ ... }
bool init()
{
fonts, rc, etc...
}
int go()
{
return app.exec();
}
protected:
QLApplication the_app_;
};
Georg