Show
Ignore:
Timestamp:
03/22/08 05:06:28 (9 months ago)
Author:
flynd
Message:

Let KTextEdit handle context menu in kde4-gui so it can add spell checking entries. Also added spell checking to settings dialog.

Location:
trunk/qt4-gui/src/widgets
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/qt4-gui/src/widgets/mledit.cpp

    r6078 r6110  
    8383 
    8484  setPalette(pal); 
    85 } 
    86  
    87 void MLEdit::setCheckSpellingEnabled(bool check) 
    88 { 
    89 #ifdef MLEDIT_USE_KTEXTEDIT 
    90   KTextEdit::setCheckSpellingEnabled(check); 
    91 #else 
    92   (void) check; // Remove warning about unused parameter 
    93 #endif 
    94 } 
    95  
    96 bool MLEdit::checkSpellingEnabled() const 
    97 { 
    98 #ifdef MLEDIT_USE_KTEXTEDIT 
    99   return KTextEdit::checkSpellingEnabled(); 
    100 #else 
    101   return false; 
    102 #endif 
    10385} 
    10486 
     
    207189} 
    208190 
     191#ifndef USE_KDE 
    209192void MLEdit::contextMenuEvent(QContextMenuEvent* event) 
    210193{ 
     
    223206  delete menu; 
    224207} 
     208#endif 
    225209 
    226210void MLEdit::updateFont() 
  • trunk/qt4-gui/src/widgets/mledit.h

    r6064 r6110  
    6464  void setForeground(const QColor& color); 
    6565 
    66   void setCheckSpellingEnabled(bool check); 
    67   bool checkSpellingEnabled() const; 
     66#ifndef USE_KDE 
     67  void setCheckSpellingEnabled(bool /* check */) {} 
     68  bool checkSpellingEnabled() const { return false; } 
     69#endif 
    6870 
    6971  /** 
     
    102104  virtual void keyPressEvent(QKeyEvent* event); 
    103105  virtual void mousePressEvent(QMouseEvent* event); 
     106#ifndef USE_KDE 
    104107  virtual void contextMenuEvent(QContextMenuEvent* event); 
     108#endif 
    105109 
    106110#if 0