forked from qt-creator/qt-creator
Debugger: Fix defined but not used warning
Move the currentError function where it is used. Change-Id: Iba669d677b35abc0c9291572c2ccb1df3cd2ed56 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
committed by
Björn Schäpers
parent
670d36a931
commit
2455ff28cd
@@ -38,12 +38,6 @@ using namespace Utils;
|
|||||||
|
|
||||||
namespace Debugger::Internal {
|
namespace Debugger::Internal {
|
||||||
|
|
||||||
static QString currentError()
|
|
||||||
{
|
|
||||||
int err = errno;
|
|
||||||
return QString::fromLatin1(strerror(err));
|
|
||||||
}
|
|
||||||
|
|
||||||
Terminal::Terminal(QObject *parent)
|
Terminal::Terminal(QObject *parent)
|
||||||
: QObject(parent)
|
: QObject(parent)
|
||||||
{
|
{
|
||||||
@@ -52,6 +46,10 @@ Terminal::Terminal(QObject *parent)
|
|||||||
void Terminal::setup()
|
void Terminal::setup()
|
||||||
{
|
{
|
||||||
#ifdef DEBUGGER_USE_TERMINAL
|
#ifdef DEBUGGER_USE_TERMINAL
|
||||||
|
const auto currentError = [] {
|
||||||
|
int err = errno;
|
||||||
|
return QString::fromLatin1(strerror(err));
|
||||||
|
};
|
||||||
if (!qtcEnvironmentVariableIsSet("QTC_USE_PTY"))
|
if (!qtcEnvironmentVariableIsSet("QTC_USE_PTY"))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user