Adding --open-dir flag, hotkeys, many screenshots.#90
Open
john-philipp wants to merge 2 commits intojbehley:masterfrom
Open
Adding --open-dir flag, hotkeys, many screenshots.#90john-philipp wants to merge 2 commits intojbehley:masterfrom
john-philipp wants to merge 2 commits intojbehley:masterfrom
Conversation
75ae501 to
ca4e2be
Compare
Author
|
@jbehley back to you. Thanks. :) |
jbehley
reviewed
Jan 2, 2025
| std::string flag = argv[i]; | ||
| if (flag == FLAG_OPEN_DIR) { | ||
| if (argc > i) { | ||
| parsedArgs[FLAG_OPEN_DIR] = argv[i++ + 1]; |
Owner
There was a problem hiding this comment.
this looks confusing with the i++ (and probably also wrong?) should it be just i+1?
jbehley
reviewed
Jan 2, 2025
| } | ||
|
|
||
| void Mainframe::open() { | ||
| this->open(nullptr); |
Owner
There was a problem hiding this comment.
Suggested change
| this->open(nullptr); | |
| this->open(QString()); |
Don't use different semantics, even if it works. The QString() is probably what you want to express, like a null or empty string.
jbehley
reviewed
Jan 2, 2025
|
|
||
| QString retValue = | ||
| QString retValue; | ||
| if (dir == nullptr) { |
Owner
There was a problem hiding this comment.
Suggested change
| if (dir == nullptr) { | |
| if (dir.isNull()) { |
See https://doc.qt.io/qt-6/qstring.html#distinction-between-null-and-empty-strings
jbehley
reviewed
Jan 2, 2025
|
|
||
| public slots: | ||
| void open(); | ||
| void open(QString dir); |
Owner
There was a problem hiding this comment.
Better would be to avoid the redifinition, and just have open with as default; i.e.,
void open(QString dir = Qstring())
Then you can get rid of void open() and still can call open() and open(QString:fromStdString("..")
Owner
|
just some more suggestions. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See #89.