From 1fec9da2d3b89710d508f79fee583187cf88f549 Mon Sep 17 00:00:00 2001 From: LostDragonist Date: Tue, 17 Sep 2019 00:08:11 -0500 Subject: Automatically fill in the name of new executables When the binary browse button is used to select a binary, this will use the binary name to fill in the executable name if the previous executable name stated with "New Executable". --- src/editexecutablesdialog.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/editexecutablesdialog.cpp') diff --git a/src/editexecutablesdialog.cpp b/src/editexecutablesdialog.cpp index 7823fadc..d7ae4e77 100644 --- a/src/editexecutablesdialog.cpp +++ b/src/editexecutablesdialog.cpp @@ -619,8 +619,9 @@ void EditExecutablesDialog::on_browseBinary_clicked() ui->binary->setText(QDir::toNativeSeparators(binaryName)); } - // setting title if currently empty - if (ui->title->text().isEmpty()) { + // setting title if currently empty or some variation of "New Executable" + if (ui->title->text().isEmpty() || + ui->title->text().startsWith("New Executable", Qt::CaseInsensitive)) { const auto prefix = QFileInfo(binaryName).baseName(); const auto newTitle = m_executablesList.makeNonConflictingTitle(prefix); -- cgit v1.3.1