projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add link to certificate FAQ in --require-ssl error
[quassel.git]
/
src
/
core
/
coreapplication.cpp
diff --git
a/src/core/coreapplication.cpp
b/src/core/coreapplication.cpp
index
9ad6ef0
..
a2a81be
100644
(file)
--- a/
src/core/coreapplication.cpp
+++ b/
src/core/coreapplication.cpp
@@
-1,5
+1,5
@@
/***************************************************************************
/***************************************************************************
- * Copyright (C) 2005-20
18
by the Quassel Project *
+ * Copyright (C) 2005-20
20
by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
@@
-20,34
+20,23
@@
#include "coreapplication.h"
#include "coreapplication.h"
-CoreApplication::CoreApplication(int
&argc, char **
argv)
+CoreApplication::CoreApplication(int
& argc, char**
argv)
: QCoreApplication(argc, argv)
{
: QCoreApplication(argc, argv)
{
-#ifdef Q_OS_MAC
- Quassel::disableCrashHandler();
-#endif /* Q_OS_MAC */
-
- Quassel::setRunMode(Quassel::CoreOnly);
Quassel::registerQuitHandler([this]() {
Quassel::registerQuitHandler([this]() {
- connect(_core.get(),
SIGNAL(shutdownComplete()), this, SLOT(onShutdownComplete())
);
+ connect(_core.get(),
&Core::shutdownComplete, this, &CoreApplication::onShutdownComplete
);
_core->shutdown();
});
}
_core->shutdown();
});
}
-
void CoreApplication::init()
{
void CoreApplication::init()
{
- if (!Quassel::init()) {
- throw ExitException{EXIT_FAILURE, tr("Could not initialize Quassel!")};
- }
-
- _core.reset(new Core{}); // FIXME C++14: std::make_unique
+ _core = std::make_unique<Core>();
_core->init();
}
_core->init();
}
-
void CoreApplication::onShutdownComplete()
{
void CoreApplication::onShutdownComplete()
{
- connect(_core.get(),
SIGNAL(destroyed()), QCoreApplication::instance(), SLOT(quit())
);
+ connect(_core.get(),
&QObject::destroyed, QCoreApplication::instance(), &QCoreApplication::quit
);
_core.release()->deleteLater();
}
_core.release()->deleteLater();
}