Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display full path in recent files menu #1992

Merged
merged 2 commits into from
Sep 11, 2018
Merged

Conversation

gogoprog
Copy link
Contributor

This is useful when different files have the same name

@bjorn
Copy link
Member

bjorn commented Aug 19, 2018 via email

@gogoprog
Copy link
Contributor Author

Thanks for reviewing,
here are my new changes

@@ -1328,6 +1329,7 @@ void MainWindow::updateRecentFilesMenu()
mRecentFiles[i]->setText(QFileInfo(files[i]).fileName());
mRecentFiles[i]->setData(files[i]);
mRecentFiles[i]->setVisible(true);
mRecentFiles[i]->setToolTip(QFileInfo(files[i]).filePath());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a small suggestion: please re-use the QFileInfo instance. Not that the code is performance-critical, but in general it's good to avoid duplicating work.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I just updated

* Coding style places & or * against the variable name
* Generally only using auto when it reduces code size
@bjorn bjorn merged commit 1675ced into mapeditor:master Sep 11, 2018
@bjorn
Copy link
Member

bjorn commented Sep 11, 2018

Nice addition, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants