Commit 9556b69f authored by Nikita Sirgienko's avatar Nikita Sirgienko
Browse files

[Qalculate] Fix bug with terminal colour symobls in command results

BUG: 430055
FIXED-IN: 20.12.1
parent 48c72cd7
Pipeline #43192 passed with stage
in 26 minutes and 24 seconds
cmake_minimum_required (VERSION 3.12 FATAL_ERROR)
cmake_minimum_required (VERSION 3.13 FATAL_ERROR)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
......
......@@ -71,6 +71,8 @@ else(QALCULATE_CFLAGS AND QALCULATE_LIBRARIES)
endif(NOT WIN32)
set(QALCULATE_VERSION ${_pc_QALCULATE_VERSION})
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Qalculate DEFAULT_MSG QALCULATE_LIBRARIES )
......
......@@ -3,6 +3,9 @@ project(cantor-qalculate-backend)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS} -Wno-deprecated")
add_definitions(${QALCULATE_CFLAGS})
if (QALCULATE_VERSION VERSION_GREATER_EQUAL 3.11.0)
add_compile_definitions(QALCULATE_NEED_DISABLE_COLOR)
endif()
set( QalculateBackend_SRCS
qalculatesyntaxhelpobject.cpp
......
......@@ -90,6 +90,11 @@ void QalculateSession::login()
m_process = new QProcess(this);
m_process->setProgram(QStandardPaths::findExecutable(QLatin1String("qalc")));
#ifdef QALCULATE_NEED_DISABLE_COLOR
QStringList args;
args << QLatin1String("-s") << QLatin1String("color 0");
m_process->setArguments(args);
#endif
m_process->setProcessChannelMode(QProcess::SeparateChannels);
connect(m_process, SIGNAL(readyReadStandardOutput()), this, SLOT(readOutput()));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment