From b586cf21e3cf667cfd35d87093946a4b0f9a1bb3 Mon Sep 17 00:00:00 2001 From: pixiuPL Date: Mon, 15 Jan 2018 14:44:13 +0100 Subject: [PATCH] Code refactoring #4 (#15265) * Refactoring /deploy * Refactoring /src #1 * Refactoring /src #2 * Code refactoring #3 * Code refactoring #4 (repl.*) --- src/repl.cpp | 8 -------- src/repl.h | 2 -- 2 files changed, 10 deletions(-) diff --git a/src/repl.cpp b/src/repl.cpp index 4a9fa4136..1d8de545c 100644 --- a/src/repl.cpp +++ b/src/repl.cpp @@ -33,12 +33,9 @@ #include #include #include - #include "repl.h" - #include "consts.h" #include "terminal.h" - #define PROMPT "phantomjs> " #define HISTORY_FILENAME "phantom_repl_history" @@ -82,7 +79,6 @@ REPL* REPL::getInstance(QWebFrame* webframe, Phantom* parent) QString REPL::_getClassName(QObject* obj) const { const QMetaObject* meta = obj->metaObject(); - return QString::fromLatin1(meta->className()); } @@ -145,10 +141,6 @@ REPL::REPL(QWebFrame* webframe, Phantom* parent) // Set the static callback to offer Completions to the User linenoiseSetCompletionCallback(REPL::offerCompletion); - // Inject REPL utility functions - // TODO: REPL - // m_webframe->evaluateJavaScript(Utils::readResourceFileUtf8(":/repl.js")); - // Add self to JavaScript world m_webframe->addToJavaScriptWindowObject("_repl", this); diff --git a/src/repl.h b/src/repl.h index 9356adfa8..7792636d0 100644 --- a/src/repl.h +++ b/src/repl.h @@ -30,7 +30,6 @@ #pragma once #include - #include "phantom.h" // Linenoise is a C Library: we need to externalise it's symbols for linkage @@ -56,7 +55,6 @@ class REPL: public QObject public: static bool instanceExists(); static REPL* getInstance(QWebFrame* webframe = NULL, Phantom* parent = NULL); - Q_INVOKABLE QString _getClassName(QObject* obj) const; Q_INVOKABLE QStringList _enumerateCompletions(QObject* obj) const;