Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 1f2195038b87b91e7102d213eacdb51f > files > 4

kdepim-4.4.11.1-5.fc15.src.rpm

commit 6f62ea1bff318d8efea42f59bdc965ee2ab187a0
Author: Thomas McGuire <mcguire@kde.org>
Date:   Wed May 11 18:21:32 2011 +0100

    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

diff --git a/kmail/kmcomposereditor.cpp b/kmail/kmcomposereditor.cpp
index f1accab..74de65b 100644
--- a/kmail/kmcomposereditor.cpp
+++ b/kmail/kmcomposereditor.cpp
@@ -44,7 +44,7 @@
 #include <QFileInfo>
 
 KMComposerEditor::KMComposerEditor( KMComposeWin *win,QWidget *parent)
- :KMeditor(parent),m_composerWin(win)
+ :KMeditor(parent, "kmailrc"),m_composerWin(win)
 {
 }
 
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