summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-08-10 20:16:27 +0200
committerMontel Laurent <[email protected]>2017-08-10 20:16:27 +0200
commit3a3becac7902465e20949a0e5b364df465d0ebd4 (patch)
tree7163d060c6607863bc78d7f4d975375acb6834d7
parent1833395a0ce08cf334279a93810829f9d1fa6819 (diff)
Use c++11 style
-rw-r--r--src/texttospeech/texttospeech.cpp21
1 files changed, 2 insertions, 19 deletions
diff --git a/src/texttospeech/texttospeech.cpp b/src/texttospeech/texttospeech.cpp
index 8b8fd47..9032464 100644
--- a/src/texttospeech/texttospeech.cpp
+++ b/src/texttospeech/texttospeech.cpp
@@ -28,24 +28,6 @@
#endif
namespace KPIMTextEdit {
-class TextToSpeechPrivate
-{
-public:
- TextToSpeechPrivate()
- : textToSpeech(new TextToSpeech)
- {
- }
-
- ~TextToSpeechPrivate()
- {
- delete textToSpeech;
- }
-
- TextToSpeech *textToSpeech;
-};
-
-Q_GLOBAL_STATIC(TextToSpeechPrivate, sInstance)
-
TextToSpeech::TextToSpeech(QObject *parent)
: QObject(parent)
#if KPIMTEXTEDIT_HAVE_TEXTTOSPEECH
@@ -85,7 +67,8 @@ void TextToSpeech::reloadSettings()
TextToSpeech *TextToSpeech::self()
{
- return sInstance->textToSpeech; //will create it
+ static TextToSpeech s_self;
+ return &s_self;
}
void TextToSpeech::slotStateChanged()