Changeset View
Changeset View
Standalone View
Standalone View
addons/lspclient/lspclientserver.cpp
Show First 20 Lines • Show All 614 Lines • ▼ Show 20 Line(s) | 614 | public: | |||
---|---|---|---|---|---|
615 | bool start() | 615 | bool start() | ||
616 | { | 616 | { | ||
617 | if (m_state != State::None) | 617 | if (m_state != State::None) | ||
618 | return true; | 618 | return true; | ||
619 | 619 | | |||
620 | auto program = m_server.front(); | 620 | auto program = m_server.front(); | ||
621 | auto args = m_server; | 621 | auto args = m_server; | ||
622 | args.pop_front(); | 622 | args.pop_front(); | ||
623 | qCInfo(LSPCLIENT) << "starting" << m_server; | 623 | qCInfo(LSPCLIENT) << "starting" << m_server << "with root" << m_root; | ||
624 | | ||||
625 | // start LSP server in project root | ||||
626 | m_sproc.setWorkingDirectory(m_root.path()); | ||||
627 | | ||||
624 | // at least we see some errors somewhere then | 628 | // at least we see some errors somewhere then | ||
625 | m_sproc.setProcessChannelMode(QProcess::ForwardedErrorChannel); | 629 | m_sproc.setProcessChannelMode(QProcess::ForwardedErrorChannel); | ||
626 | m_sproc.setReadChannel(QProcess::QProcess::StandardOutput); | 630 | m_sproc.setReadChannel(QProcess::QProcess::StandardOutput); | ||
627 | m_sproc.start(program, args); | 631 | m_sproc.start(program, args); | ||
628 | bool result = m_sproc.waitForStarted(); | 632 | bool result = m_sproc.waitForStarted(); | ||
629 | if (!result) { | 633 | if (!result) { | ||
630 | qCWarning(LSPCLIENT) << m_sproc.error(); | 634 | qCWarning(LSPCLIENT) << m_sproc.error(); | ||
631 | } else { | 635 | } else { | ||
▲ Show 20 Lines • Show All 671 Lines • Show Last 20 Lines |