]> git.siccegge.de Git - frida/frida.git/commitdiff
Move ScriptingDock contructor to cxx file
authorChristoph Egger <Christoph.Egger@fau.de>
Fri, 6 Mar 2015 16:23:11 +0000 (17:23 +0100)
committerChristoph Egger <Christoph.Egger@fau.de>
Fri, 6 Mar 2015 16:23:11 +0000 (17:23 +0100)
src/gui/widgets/ScriptingDock.cxx
src/gui/widgets/ScriptingDock.hxx

index ce00030473be583013b5fc2eac81a9dbd8ec2591..baf38c1d4493700c0d5f5ad0746f8d56a558c3e3 100644 (file)
@@ -7,6 +7,27 @@ namespace {
        }
 }
 
+ScriptingDock::ScriptingDock(const QString& title, QWidget * parent)
+       : QDockWidget(title, parent)
+       , logger(log4cxx::Logger::getLogger("ScriptingDock")) {
+       QTabWidget * tab = new QTabWidget;
+       QWidget * widget = new QWidget;
+       widget->setLayout(layout = new QGridLayout);
+       layout->addWidget(browser = new QTextBrowser, 0, 0, 1, 0);
+       layout->addWidget(line = new QLineEdit, 1, 0);
+       layout->addWidget(button = new QPushButton(tr("Evaluate")), 1, 1);
+       tab->addTab(widget, "GUILE");
+       ((QDockWidget*)this)->setWidget(tab);
+       connect(button, SIGNAL(released()), this, SLOT(doEvaluate()));
+       connect(line, SIGNAL(returnPressed()), this, SLOT(doEvaluate()));
+       scm_init_guile();
+       guile_output_port = scm_open_output_string();
+       guile_error_port = scm_open_output_string();
+       scm_set_current_output_port(guile_output_port);
+       scm_set_current_error_port(guile_error_port);
+}
+
+
 void ScriptingDock::doEvaluate() {
        QString text = line->text();
        line->clear();
index b6fc446d42d6cb11811d25233e479b4b8173d125..c02ec8156565110f71ca91732c0eeda8c5db0e04 100644 (file)
@@ -8,25 +8,8 @@ class ScriptingDock : public QDockWidget {
        Q_OBJECT
 
 public:
-       ScriptingDock(const QString& title, QWidget * parent = 0)
-               : QDockWidget(title, parent)
-               , logger(log4cxx::Logger::getLogger("ScriptingDock")) {     
-               QTabWidget * tab = new QTabWidget;
-               QWidget * widget = new QWidget;
-               widget->setLayout(layout = new QGridLayout);
-               layout->addWidget(browser = new QTextBrowser, 0, 0, 1, 0);
-               layout->addWidget(line = new QLineEdit, 1, 0);
-               layout->addWidget(button = new QPushButton(tr("Evaluate")), 1, 1);
-               tab->addTab(widget, "GUILE");
-               ((QDockWidget*)this)->setWidget(tab);
-               connect(button, SIGNAL(released()), this, SLOT(doEvaluate()));
-               connect(line, SIGNAL(returnPressed()), this, SLOT(doEvaluate()));
-               scm_init_guile();
-               guile_output_port = scm_open_output_string();
-               guile_error_port = scm_open_output_string();
-               scm_set_current_output_port(guile_output_port);
-               scm_set_current_error_port(guile_error_port);
-       }
+       ScriptingDock(const QString& title, QWidget * parent = 0);
+
 private:
        log4cxx::LoggerPtr logger;