Add tooltip to callstack
This commit is contained in:
parent
dc041d669d
commit
d6fe3874c0
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
dist
|
||||
build
|
||||
Session.vim
|
||||
compile_commands.json
|
||||
|
14
Makefile
14
Makefile
@ -55,28 +55,28 @@ shell:
|
||||
|
||||
release:
|
||||
${ENV_RUN} rm -rf build/${HOST_ENV}-release
|
||||
${ENV_RUN} ./scripts/setup-build.ps1 ${HOST_ENV} release
|
||||
${ENV_RUN} ./scripts/setup-build ${HOST_ENV} release
|
||||
|
||||
debug:
|
||||
${ENV_RUN} rm -rf build/${HOST_ENV}-debug
|
||||
${ENV_RUN} ./scripts/setup-build.ps1 ${HOST_ENV} debug
|
||||
${ENV_RUN} ./scripts/setup-build ${HOST_ENV} debug
|
||||
|
||||
asan:
|
||||
${ENV_RUN} rm -rf build/${HOST_ENV}-asan
|
||||
${ENV_RUN} ./scripts/setup-build.ps1 ${HOST_ENV} asan
|
||||
${ENV_RUN} ./scripts/setup-build ${HOST_ENV} asan
|
||||
|
||||
windows:
|
||||
${ENV_RUN} rm -rf build/windows
|
||||
${ENV_RUN} ./scripts/setup-build.ps1 windows
|
||||
${ENV_RUN} ./scripts/setup-build windows
|
||||
|
||||
windows-debug:
|
||||
${ENV_RUN} rm -rf build/windows
|
||||
${ENV_RUN} ./scripts/setup-build.ps1 windows debug
|
||||
${ENV_RUN} ./scripts/setup-build windows debug
|
||||
|
||||
gba:
|
||||
${ENV_RUN} rm -rf build/gba-release
|
||||
${ENV_RUN} ./scripts/setup-build.ps1 gba release
|
||||
${ENV_RUN} ./scripts/setup-build gba release
|
||||
|
||||
gba-debug:
|
||||
${ENV_RUN} rm -rf build/gba-debug
|
||||
${ENV_RUN} ./scripts/setup-build.ps1 gba debug
|
||||
${ENV_RUN} ./scripts/setup-build gba debug
|
||||
|
@ -1,51 +0,0 @@
|
||||
#! /usr/bin/env pwsh
|
||||
|
||||
Param(
|
||||
[parameter(Mandatory=$true,Position=0)][String] ${target},
|
||||
[parameter(Mandatory=$true,Position=1)][String] ${buildType}
|
||||
)
|
||||
|
||||
$project=(Get-Location).Path
|
||||
|
||||
if (${target} -eq "windows") {
|
||||
$toolchain="-DCMAKE_TOOLCHAIN_FILE=cmake/Modules/Mingw.cmake"
|
||||
} elseif (${target} -eq "gba") {
|
||||
$toolchain="-DCMAKE_TOOLCHAIN_FILE=cmake/Modules/GBA.cmake"
|
||||
$oxUseStdLib="-DOX_USE_STDLIB=OFF"
|
||||
}
|
||||
|
||||
if (${buildType} -eq "asan") {
|
||||
$buildTypeArgs="-DUSE_ASAN=ON -DCMAKE_BUILD_TYPE=Debug"
|
||||
} elseif (${buildType} -eq "debug") {
|
||||
$buildTypeArgs="-DCMAKE_BUILD_TYPE=Debug"
|
||||
} elseif (${buildType} -eq "release") {
|
||||
$buildTypeArgs="-DCMAKE_BUILD_TYPE=Release"
|
||||
}
|
||||
|
||||
if (${env:QTDIR} -ne "") {
|
||||
$qtPath="-DQTDIR=${env:QTDIR}"
|
||||
}
|
||||
|
||||
$buildDir="${project}/build/${target}-${buildType}"
|
||||
$distDir="${project}/dist/${target}-${buildType}"
|
||||
|
||||
New-Item -ItemType Directory -Path $buildDir | Out-Null
|
||||
Push-Location $buildDir
|
||||
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON `
|
||||
-DCMAKE_INSTALL_PREFIX="$distDir" `
|
||||
-G Ninja `
|
||||
$buildTool `
|
||||
$nostalgiaBuildType `
|
||||
$oxUseStdLib `
|
||||
$buildTypeArgs `
|
||||
$qtPath `
|
||||
$toolchain `
|
||||
$project
|
||||
Pop-Location
|
||||
|
||||
rm -f build/current dist/current
|
||||
if (!(Test-Path -Path dist)) {
|
||||
New-Item -ItemType Directory -Path dist | Out-Null
|
||||
}
|
||||
ln -s ${target}-${buildType} build/current
|
||||
ln -s ${target}-${buildType} dist/current
|
@ -48,6 +48,17 @@ QVariant CallStackModel::data(const QModelIndex &index, int role) const {
|
||||
if (role == Qt::DisplayRole) {
|
||||
const auto &f = m_frames[index.row()];
|
||||
|
||||
switch (index.column()) {
|
||||
case Column::Function:
|
||||
return f.function;
|
||||
case Column::Source:
|
||||
return QString("%1:%2").arg(f.file).arg(f.line);
|
||||
default:
|
||||
return {};
|
||||
}
|
||||
} else if (role == Qt::ToolTipRole) {
|
||||
const auto &f = m_frames[index.row()];
|
||||
|
||||
switch (index.column()) {
|
||||
case Column::Function:
|
||||
return f.function;
|
||||
|
Loading…
Reference in New Issue
Block a user