Commit 65064825 authored by Christoph Cullmann's avatar Christoph Cullmann

less singletons

parent add440d3
......@@ -34,13 +34,9 @@
Q_DECLARE_LOGGING_CATEGORY(LOG_KWRITE)
Q_LOGGING_CATEGORY(LOG_KWRITE, "kwrite")
KWriteApp *KWriteApp::s_self = 0;
KWriteApp::KWriteApp(const QCommandLineParser &args)
: m_args(args)
{
s_self = this;
// read from global config once
KTextEditor::Editor::instance()->readConfig(KSharedConfig::openConfig().data());
......@@ -51,11 +47,6 @@ KWriteApp::~KWriteApp()
{
}
KWriteApp *KWriteApp::self ()
{
return s_self;
}
void KWriteApp::init()
{
if ( qApp->isSessionRestored() )
......
......@@ -57,23 +57,12 @@ class KWriteApp : public QObject
*/
~KWriteApp();
/**
* static accessor to avoid casting ;)
* @return app instance
*/
static KWriteApp *self ();
/**
* further initialization
*/
void init();
private:
/**
* Static instance of KWriteApp
*/
static KWriteApp *s_self;
/**
* kate's command line args
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment