diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-05-27 10:12:29 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-05-27 10:12:29 +0200 |
commit | 314909776db599b2a90fecde6e85c9874768efeb (patch) | |
tree | 4e6c1f16be1271fba4b267bfbff4e6c8a31cbeed /sinksh/repl/repl.cpp | |
parent | 01002ca7602b8d8a569c6d7191a1ba1ad03f3e65 (diff) | |
download | sink-314909776db599b2a90fecde6e85c9874768efeb.tar.gz sink-314909776db599b2a90fecde6e85c9874768efeb.zip |
A wrapper for linenoise
Because global variables in header files don't work if included from
multiple places.
Diffstat (limited to 'sinksh/repl/repl.cpp')
-rw-r--r-- | sinksh/repl/repl.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sinksh/repl/repl.cpp b/sinksh/repl/repl.cpp index 32932cb..c8f9b45 100644 --- a/sinksh/repl/repl.cpp +++ b/sinksh/repl/repl.cpp | |||
@@ -27,12 +27,12 @@ | |||
27 | 27 | ||
28 | #include "replStates.h" | 28 | #include "replStates.h" |
29 | #include "syntaxtree.h" | 29 | #include "syntaxtree.h" |
30 | #include "linenoise.hpp" | 30 | #include "commandline.h" |
31 | 31 | ||
32 | Repl::Repl(QObject *parent) | 32 | Repl::Repl(QObject *parent) |
33 | : QStateMachine(parent) | 33 | : QStateMachine(parent) |
34 | { | 34 | { |
35 | linenoise::LoadHistory(commandHistoryPath().toLocal8Bit()); | 35 | Commandline::loadHistory(commandHistoryPath()); |
36 | 36 | ||
37 | // create all states | 37 | // create all states |
38 | ReadState *read = new ReadState(this); | 38 | ReadState *read = new ReadState(this); |
@@ -61,7 +61,7 @@ Repl::Repl(QObject *parent) | |||
61 | 61 | ||
62 | Repl::~Repl() | 62 | Repl::~Repl() |
63 | { | 63 | { |
64 | linenoise::SaveHistory(commandHistoryPath().toLocal8Bit()); | 64 | Commandline::saveHistory(commandHistoryPath()); |
65 | } | 65 | } |
66 | 66 | ||
67 | void Repl::printWelcomeBanner() | 67 | void Repl::printWelcomeBanner() |