[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdewebdev/kommander/widgets
From:       Michal Rudolf <mrudolf () kdewebdev ! org>
Date:       2005-04-25 12:46:07
Message-ID: 20050425124607.4A86F3EF () office ! kde ! org
[Download RAW message or body]

CVS commit by mrudolf: 

Add a way to insert text inside text widgets.


  M +1 -3      lineedit.cpp   1.17
  M +4 -1      textedit.cpp   1.17


--- kdewebdev/kommander/widgets/lineedit.cpp  #1.16:1.17
@@ -83,7 +83,5 @@ void LineEdit::populate()
 void LineEdit::setSelectedWidgetText(const QString& a_text)
 {
-  int f = text().find(a_text);
-  if (f != -1)
-    setSelection(f, a_text.length());
+  insert(a_text);
 }
 

--- kdewebdev/kommander/widgets/textedit.cpp  #1.16:1.17
@@ -95,5 +95,5 @@ void TextEdit::showEvent(QShowEvent * e)
 bool TextEdit::isFunctionSupported(int f)
 {
-  return f == DCOP::text || f == DCOP::setText || f == DCOP::selection || f == \
DCOP::clear; +  return f == DCOP::text || f == DCOP::setText || f == DCOP::selection \
|| f == DCOP::setSelection || f == DCOP::clear;  }
 
@@ -108,4 +108,7 @@ QString TextEdit::handleDCOP(int functio
     case DCOP::selection:
       return selectedText();
+    case DCOP::setSelection:
+      insert(args[0]);
+      break;
     case DCOP::clear:
       setWidgetText("");


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic