Prechádzať zdrojové kódy

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 rokov pred
rodič
commit
6f7fe86b3a

+ 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();
 }