Skip to content

Commit 7d29bc0

Browse files
committed
feat: provide option to start with recording page
1 parent d5d9cd4 commit 7d29bc0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/main.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,10 @@ int main(int argc, char** argv)
166166
QCoreApplication::translate("main", "Path to the objdump binary."), QStringLiteral("path"));
167167
parser.addOption(objdumpBinary);
168168

169+
const auto startRecordPage =
170+
QCommandLineOption(QStringLiteral("record"), QCoreApplication::translate("main", "Start with recording page."));
171+
parser.addOption(startRecordPage);
172+
169173
parser.addPositionalArgument(
170174
QStringLiteral("files"),
171175
QCoreApplication::translate("main", "Optional input files to open on startup, i.e. perf.data files."),
@@ -270,6 +274,8 @@ int main(int argc, char** argv)
270274
const auto perfDataFile = QStringLiteral("perf.data");
271275
if (QFile::exists(perfDataFile) && window) {
272276
window->openFile(perfDataFile);
277+
} else if (parser.isSet(startRecordPage)) {
278+
window->onRecordButtonClicked();
273279
}
274280
}
275281
if (window)

0 commit comments

Comments
 (0)