#endif
#include "quassel.h"
+#include "types.h"
int main(int argc, char **argv)
{
umask(S_IRWXG | S_IRWXO);
#endif
+ // Instantiate early, so log messages are handled
+ Quassel::instance();
+
#if QT_VERSION < 0x050000
// All our source files are in UTF-8, and Qt5 even requires that
QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
AboutData::setQuasselPersons(&aboutData);
KAboutData::setApplicationData(aboutData.kAboutData());
#endif
- if (!app.init())
- return EXIT_FAILURE;
+ try {
+ app.init();
+ }
+ catch (ExitException e) {
+ if (!e.errorString.isEmpty()) {
+ qCritical() << e.errorString;
+ }
+ return e.exitCode;
+ }
return app.exec();
}