Cleanup build scripts and make message get file/line info from main body
This commit is contained in:
parent
a05bd9537b
commit
8160055aa1
@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required(VERSION 2.8.8)
|
cmake_minimum_required(VERSION 3.8.8)
|
||||||
|
|
||||||
project(bullock)
|
project(bullock)
|
||||||
|
|
||||||
@ -29,11 +29,8 @@ if(NOT MSVC)
|
|||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
|
||||||
# forces colored output when using ninja
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
set(CMAKE_MACOSX_RPATH OFF)
|
set(CMAKE_MACOSX_RPATH OFF)
|
||||||
|
3
Makefile
3
Makefile
@ -33,6 +33,9 @@ test:
|
|||||||
run: install
|
run: install
|
||||||
./dist/current/bin/bullock
|
./dist/current/bin/bullock
|
||||||
|
|
||||||
|
gdb: install
|
||||||
|
gdb --args ./dist/current/bin/bullock
|
||||||
|
|
||||||
devenv-image:
|
devenv-image:
|
||||||
docker build . -t ${DEVENV_IMAGE}
|
docker build . -t ${DEVENV_IMAGE}
|
||||||
devenv-create:
|
devenv-create:
|
||||||
|
@ -35,6 +35,8 @@ Frame::Frame(QJsonObject frame) {
|
|||||||
TraceEvent::TraceEvent(QJsonObject tp) {
|
TraceEvent::TraceEvent(QJsonObject tp) {
|
||||||
this->channel = tp["channel"].toString();
|
this->channel = tp["channel"].toString();
|
||||||
this->logMsg = tp["log_msg"].toString();
|
this->logMsg = tp["log_msg"].toString();
|
||||||
|
this->_file = tp["file"].toString();
|
||||||
|
this->_line = tp["line"].toInt();
|
||||||
auto frames = tp["frames"].toArray();
|
auto frames = tp["frames"].toArray();
|
||||||
for (auto frame : frames) {
|
for (auto frame : frames) {
|
||||||
this->frames.push_back(frame.toObject());
|
this->frames.push_back(frame.toObject());
|
||||||
@ -42,10 +44,10 @@ TraceEvent::TraceEvent(QJsonObject tp) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QString TraceEvent::file() const {
|
QString TraceEvent::file() const {
|
||||||
return this->frames[0].file;
|
return this->_file;
|
||||||
}
|
}
|
||||||
|
|
||||||
int TraceEvent::line() const {
|
int TraceEvent::line() const {
|
||||||
return this->frames[0].line;
|
return this->_line;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,6 +38,8 @@ struct TraceEvent {
|
|||||||
QString channel;
|
QString channel;
|
||||||
QString logMsg;
|
QString logMsg;
|
||||||
QVector<Frame> frames;
|
QVector<Frame> frames;
|
||||||
|
QString _file;
|
||||||
|
int _line;
|
||||||
|
|
||||||
TraceEvent(QJsonObject tp = {});
|
TraceEvent(QJsonObject tp = {});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user