summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Cullmann <cullmann@kde.org>2014-01-19 19:38:51 (GMT)
committerChristoph Cullmann <cullmann@kde.org>2014-01-19 19:38:51 (GMT)
commit65064825e7f233b4a25c282449bce4c115cd0cff (patch)
tree3d5aea17149f572079f03e767b6f295e6da17555
parentadd440d3ac8b413ad48665a210d68f5134e10700 (diff)
less singletons
-rw-r--r--kwrite/kwriteapp.cpp9
-rw-r--r--kwrite/kwriteapp.h11
2 files changed, 0 insertions, 20 deletions
diff --git a/kwrite/kwriteapp.cpp b/kwrite/kwriteapp.cpp
index 2994efc..fd2798d 100644
--- a/kwrite/kwriteapp.cpp
+++ b/kwrite/kwriteapp.cpp
@@ -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() )
diff --git a/kwrite/kwriteapp.h b/kwrite/kwriteapp.h
index 1116a8f..726bce5 100644
--- a/kwrite/kwriteapp.h
+++ b/kwrite/kwriteapp.h
@@ -58,23 +58,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
*/
const QCommandLineParser &m_args;