Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@ interface QtWindow {
qtprofiler_entry: unknown;
}

export async function load(ui: HTMLElement, dist: string, bytes: Uint8Array) {
export async function load(
ui: HTMLElement,
dist: string,
bytes: Uint8Array,
fileName: string
) {
const tracePath = `/traces/${fileName}`;
await loadScript(`${dist}/qtloader.js`);
await loadScript(`${dist}/qtprofiler.js`);

Expand All @@ -31,11 +37,11 @@ export async function load(ui: HTMLElement, dist: string, bytes: Uint8Array) {
containerElements: [ui],
entryFunction: w.qtprofiler_entry,
},
arguments: ['--embedded', '/traces/trace.qtd'],
arguments: ['--embedded', tracePath],
locateFile: (p) => `${dist}/${p}`,
preRun: [module => {
module.FS.mkdir('/traces');
module.FS.writeFile('/traces/trace.qtd', bytes);
module.FS.writeFile(tracePath, bytes);
}]
});
}
Expand Down
3 changes: 2 additions & 1 deletion qt-core/webview-ui/src/apps/qml-trace/viewlogic.svelte.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ export async function onAppMount() {
await profiler.load(
ui.container,
data.configs.qtProfiler.distDir,
data.bytes
data.bytes,
data.configs.fileName
);
}

Expand Down
Loading