Skip to content

Commit

Permalink
feat: provide option to start with recording page
Browse files Browse the repository at this point in the history
  • Loading branch information
GitMensch committed Jun 7, 2024
1 parent d5d9cd4 commit 7d29bc0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,10 @@ int main(int argc, char** argv)
QCoreApplication::translate("main", "Path to the objdump binary."), QStringLiteral("path"));
parser.addOption(objdumpBinary);

const auto startRecordPage =
QCommandLineOption(QStringLiteral("record"), QCoreApplication::translate("main", "Start with recording page."));
parser.addOption(startRecordPage);

parser.addPositionalArgument(
QStringLiteral("files"),
QCoreApplication::translate("main", "Optional input files to open on startup, i.e. perf.data files."),
Expand Down Expand Up @@ -270,6 +274,8 @@ int main(int argc, char** argv)
const auto perfDataFile = QStringLiteral("perf.data");
if (QFile::exists(perfDataFile) && window) {
window->openFile(perfDataFile);
} else if (parser.isSet(startRecordPage)) {
window->onRecordButtonClicked();
}
}
if (window)
Expand Down

0 comments on commit 7d29bc0

Please sign in to comment.