Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

Commit

Permalink
Code refactoring #4 (#15265)
Browse files Browse the repository at this point in the history
* Refactoring /deploy
* Refactoring /src #1
* Refactoring /src #2
* Code refactoring #3
* Code refactoring #4 (repl.*)
  • Loading branch information
pixiuPL authored Jan 15, 2018
1 parent 52e4849 commit b586cf2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
8 changes: 0 additions & 8 deletions src/repl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,9 @@
#include <QRegExp>
#include <QMetaMethod>
#include <QMetaProperty>

#include "repl.h"

#include "consts.h"
#include "terminal.h"

#define PROMPT "phantomjs> "
#define HISTORY_FILENAME "phantom_repl_history"

Expand Down Expand Up @@ -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());
}

Expand Down Expand Up @@ -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);

Expand Down
2 changes: 0 additions & 2 deletions src/repl.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#pragma once

#include <QWebFrame>

#include "phantom.h"

// Linenoise is a C Library: we need to externalise it's symbols for linkage
Expand All @@ -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;

Expand Down

0 comments on commit b586cf2

Please sign in to comment.