From 70b966dc0e0dd65f574538b8f09e0e36894fda7d Mon Sep 17 00:00:00 2001 From: LostDragonist Date: Tue, 22 Oct 2019 23:27:39 -0500 Subject: Improve automatic naming of new executables When using the "Add from file..." option, the extension will be removed. E.g., "zEdit 1.2.3.exe" will be shortened to "zEdit 1.2.3". When using the "Add empty" option and subsequently browsing for a binary, the complete base name will be used instead of just the base name. E.g., "zEdit 1.2.3.exe" will be shorted to "zEdit 1.2.3" instead of "zEdit 1". When using the "Add as Executable" option of the data tab, the complete base name will be used instead of just the base name. E.g., "zEdit 1.2.3.exe" will be shorted to "zEdit 1.2.3" instead of "zEdit 1". --- src/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 177c2a23..12ed40b3 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -5329,7 +5329,7 @@ void MainWindow::addAsExecutable() case FileExecutionTypes::Executable: { QString name = QInputDialog::getText(this, tr("Enter Name"), tr("Please enter a name for the executable"), QLineEdit::Normal, - targetInfo.baseName()); + targetInfo.completeBaseName()); if (!name.isEmpty()) { //Note: If this already exists, you'll lose custom settings -- cgit v1.3.1