summaryrefslogtreecommitdiff
blob: 19d8c01666f68dde264d514e8624921a5bb36e1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
From 6f62ea1bff318d8efea42f59bdc965ee2ab187a0 Mon Sep 17 00:00:00 2001
From: Thomas McGuire <mcguire@kde.org>
Date: Wed, 11 May 2011 18:21:32 +0100
Subject: [PATCH 4/6] Make spell checking work again. The text edit used the
 wrong config file for loading spell settings. After
 using the config file, the correct settigns get loaded
 again, since the Loader from Sonnet is a singleton and
 therefore shares the settings, so even the textedit
 with the wrong settings file name gets updated.

cherry-picked from d1708effbb68d6eae36ee5177a599c965973725f.

BUG: 247486
---
 kmail/kmcomposereditor.cpp |    2 +-
 libkdepim/kmeditor.cpp     |   12 ++++++++++++
 libkdepim/kmeditor.h       |    6 ++++++
 3 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/libkdepim/kmeditor.cpp b/libkdepim/kmeditor.cpp
index e8f0d36..067c781 100644
--- a/libkdepim/kmeditor.cpp
+++ b/libkdepim/kmeditor.cpp
@@ -28,6 +28,7 @@
 #include <KProcess>
 #include <KPushButton>
 #include <KTemporaryFile>
+#include <kdeversion.h>
 
 #include <QApplication>
 #include <QClipboard>
@@ -215,6 +216,17 @@ KMeditor::KMeditor( QWidget *parent )
   d->init();
 }
 
+KMeditor::KMeditor( QWidget *parent, const QString & configFile )
+#if KDE_IS_VERSION(4,6,0)
+ : TextEdit( parent, configFile ), d( new KMeditorPrivate( this ) )
+#else
+ : TextEdit( parent ), d( new KMeditorPrivate( this ) )
+#endif
+{
+  Q_UNUSED( configFile )
+  d->init();
+}
+
 KMeditor::~KMeditor()
 {
   delete d;
diff --git a/libkdepim/kmeditor.h b/libkdepim/kmeditor.h
index 4aab8aa..66ebb4a 100644
--- a/libkdepim/kmeditor.h
+++ b/libkdepim/kmeditor.h
@@ -61,6 +61,12 @@ class KDEPIM_EXPORT KMeditor : public KPIMTextEdit::TextEdit
      */
     explicit KMeditor( QWidget *parent = 0 );
 
+    /**
+     * Constructs a KMeditor object.
+     */
+    explicit KMeditor( QWidget *parent, const QString& configFile );
+
+
     virtual ~KMeditor();
 
     //Redefine it for each apps
-- 
1.7.9.2