Bibletime – a bible study tool
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

bibletimeapp.cpp 985B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*********
  2. *
  3. * This file is part of BibleTime's source code, http://www.bibletime.info/.
  4. *
  5. * Copyright 1999-2006 by the BibleTime developers.
  6. * The BibleTime source code is licensed under the GNU General Public License version 2.0.
  7. *
  8. **********/
  9. #include "bibletimeapp.h"
  10. #include "frontend/cbtconfig.h"
  11. #include "util/cresmgr.h"
  12. //KDE includes
  13. #include <dcopclient.h>
  14. BibleTimeApp::BibleTimeApp() {
  15. initDCOP();
  16. CResMgr::init_i18n();
  17. }
  18. BibleTimeApp::~BibleTimeApp() {
  19. //we can set this safely now because we close now (hopyfully without crash)
  20. CBTConfig::set(CBTConfig::crashedLastTime, false);
  21. CBTConfig::set(CBTConfig::crashedTwoTimes, false);
  22. deleteDisplayTemplateMgr();
  23. deleteLanguageMgr();
  24. deleteBackend();
  25. }
  26. void BibleTimeApp::initDCOP() {
  27. const bool dcopOk = dcopClient()->attach();
  28. Q_ASSERT(dcopOk);
  29. if (dcopOk) {
  30. const TQCString appId = dcopClient()->registerAs(kapp->name(), false);
  31. // dcopClient()->setDefaultObject("BibleTimeInterface");
  32. }
  33. }