|
|
@ -100,7 +100,7 @@ void CCommandLog::doDisplay(const CLog::TDisplayInfo& args, const char *message)
|
|
|
|
|
|
|
|
|
|
|
|
std::string str = NLMISC::CWindowDisplayer::stringifyMessage(args, message);
|
|
|
|
std::string str = NLMISC::CWindowDisplayer::stringifyMessage(args, message);
|
|
|
|
|
|
|
|
|
|
|
|
tSigDisplay(color, str.substr(0, str.size() - 1).c_str());
|
|
|
|
emit tSigDisplay(color, QString::fromUtf8(str.substr(0, str.size() - 1).c_str()));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CCommandLog::tSlotDisplay(const QColor &c, const QString &text)
|
|
|
|
void CCommandLog::tSlotDisplay(const QColor &c, const QString &text)
|
|
|
@ -115,9 +115,8 @@ void CCommandLog::returnPressed()
|
|
|
|
if (text.isEmpty())
|
|
|
|
if (text.isEmpty())
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
std::string cmd = text.toLocal8Bit().data();
|
|
|
|
emit execCommand(text);
|
|
|
|
execCommand(cmd);
|
|
|
|
if (m_Func) m_Func(text.toUtf8().constData());
|
|
|
|
if (m_Func) m_Func(cmd);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
m_CommandInput->clear();
|
|
|
|
m_CommandInput->clear();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -148,10 +147,12 @@ void CCommandLogDisplayer::doDisplay(const NLMISC::CLog::TDisplayInfo& args, con
|
|
|
|
CCommandLog::doDisplay(args, message);
|
|
|
|
CCommandLog::doDisplay(args, message);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CCommandLogDisplayer::execCommandLog(const std::string &cmd)
|
|
|
|
void CCommandLogDisplayer::execCommandLog(const QString &cmd)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
m_Log.displayRawNL("> %s", cmd.c_str());
|
|
|
|
std::string str = cmd.toUtf8().constData();
|
|
|
|
ICommand::execute(cmd, m_Log);
|
|
|
|
|
|
|
|
|
|
|
|
m_Log.displayRawNL("> %s", str.c_str());
|
|
|
|
|
|
|
|
ICommand::execute(str, m_Log);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
} /* namespace NLQT */
|
|
|
|
} /* namespace NLQT */
|
|
|
|