Преглед на файлове

Remove method 'clear' from ctkPythonConsole

Since 'promptForInput' has been moved into ctkConsole, it's not
required anymove to re-implement the function.
Jean-Christophe Fillion-Robin преди 14 години
родител
ревизия
6f7fe86b3a
променени са 3 файла, в които са добавени 3 реда и са изтрити 9 реда
  1. 0 8
      Libs/Scripting/Python/Widgets/ctkPythonConsole.cpp
  2. 1 1
      Libs/Scripting/Python/Widgets/ctkPythonConsole.h
  3. 2 0
      Libs/Widgets/ctkConsole.cpp

+ 0 - 8
Libs/Scripting/Python/Widgets/ctkPythonConsole.cpp

@@ -290,14 +290,6 @@ ctkPythonConsole::~ctkPythonConsole()
 {
 }
 
-//----------------------------------------------------------------------------
-void ctkPythonConsole::clear()
-{
-  Q_D(ctkPythonConsole);
-  this->Superclass::clear();
-  d->promptForInput();
-}
-
 ////----------------------------------------------------------------------------
 //void ctkPythonConsole::executeScript(const QString& script)
 //{

+ 1 - 1
Libs/Scripting/Python/Widgets/ctkPythonConsole.h

@@ -89,7 +89,7 @@ public:
   virtual void setPs2(const QString& newPs2);
 
 public slots:
-  virtual void clear();
+
 //  void executeScript(const QString&);
 
 protected:

+ 2 - 0
Libs/Widgets/ctkConsole.cpp

@@ -607,5 +607,7 @@ void ctkConsole::clear()
   // For some reason the QCompleter tries to set the focus policy to
   // NoFocus, set let's make sure we set it back to the default WheelFocus.
   d->setFocusPolicy(Qt::WheelFocus);
+
+  d->promptForInput();
 }