projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
common: Make the Quassel class a proper singleton, clean up
[quassel.git]
/
src
/
core
/
coreapplication.cpp
diff --git
a/src/core/coreapplication.cpp
b/src/core/coreapplication.cpp
index
7426f17
..
1a689a2
100644
(file)
--- a/
src/core/coreapplication.cpp
+++ b/
src/core/coreapplication.cpp
@@
-55,6
+55,11
@@
bool CoreApplicationInternal::init()
Core::instance(); // create and init the core
_coreCreated = true;
Core::instance(); // create and init the core
_coreCreated = true;
+ Quassel::registerReloadHandler([]() {
+ // Currently, only reloading SSL certificates is supported
+ return Core::reloadCerts();
+ });
+
if (!Quassel::isOptionSet("norestore"))
Core::restoreState();
if (!Quassel::isOptionSet("norestore"))
Core::restoreState();
@@
-62,27
+67,16
@@
bool CoreApplicationInternal::init()
}
}
-bool CoreApplicationInternal::reloadConfig()
-{
- if (_coreCreated) {
- // Currently, only reloading SSL certificates is supported
- return Core::reloadCerts();
- } else {
- return false;
- }
-}
-
-
/*****************************************************************************/
CoreApplication::CoreApplication(int &argc, char **argv)
/*****************************************************************************/
CoreApplication::CoreApplication(int &argc, char **argv)
- : QCoreApplication(argc, argv)
, Quassel()
+ : QCoreApplication(argc, argv)
{
#ifdef Q_OS_MAC
{
#ifdef Q_OS_MAC
-
disableCrashh
andler();
+
Quassel::disableCrashH
andler();
#endif /* Q_OS_MAC */
#endif /* Q_OS_MAC */
- setRunMode(Quassel::CoreOnly);
+
Quassel::
setRunMode(Quassel::CoreOnly);
_internal = new CoreApplicationInternal();
}
_internal = new CoreApplicationInternal();
}
@@
-105,13
+99,3
@@
bool CoreApplication::init()
}
return false;
}
}
return false;
}
-
-
-bool CoreApplication::reloadConfig()
-{
- if (_internal) {
- return _internal->reloadConfig();
- } else {
- return false;
- }
-}