-
Notifications
You must be signed in to change notification settings - Fork 18
Goto line dialog #21
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
base: master
Are you sure you want to change the base?
Goto line dialog #21
Conversation
The commits have your cryptic github email address as author. Do you insist in using that, or would I be allowed to use your full name and a more useful email address instead? |
I have changed the github setting. |
Type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll take this commit, but I'll update the commit message. Do allow that?
Do what you think it is the best. |
This Github review system is pure shit. I attempted to comment on 1159675, but it tacked the comment onto the overall conversation.
Are you willing to update the commits and adjust them to the project requirements? For example, you should read through existing commits to get to know the commit message style. In particular, there is a summary line, and a justification of the change, i.e., an explanation why the change is needed. This includes the goal that the commit wants to achieve. Look, for example, at the commit Preferences Back Timeout: 0 has now special meaning. It must explain in the commit message, at best already in the summary line, what the special meaning is. Also, don't do fixup changes; squash the fixups into the earlier change that introduced the breakage. This concerns the tab conversion fix. Note also that the indentation style is quite weird. Indentation is 4 positions, but tab width is still 8 and tab characters are used instead of 8 consecutive spaces. |
I'm not so familiar with git. Do you mean I should make a fresh branch, and replay the commits? |
Given the current state, it is probably easiest to make a new branch and rebuild the commits. But, please, when you are finished, do not make a new pull request, but update this one if possible. You can also use You should use tabs in the code, but only when you have two or more indentation levels, because one indentation level (4 positions) is not enough for a tab. Then 3 levels is one tab and 4 spaces, etc. |
Through that change new added text to the output window is shown.
Through setting the preference to 0 the program will not actively going into the background, but raise it in case of a stop of the debuge.
Through that rtti compiler option can be removed. I my option this leads to better runtime performance.
Thank you for the update. I like the idea to offer the option that the debugger never goes into the background. But that special value should not be 0, but "infinite". Can we have an edit box with a special value "never"? I won't take the last commit. I doubt that there is any performance to gain by turning off RTTI. Besides that, the warning that this would remove is more important than to permit custom builds with special compiler options. Regarding the Goto Line dialog: Good idea. I have a patch sitting around that moves the Find dialog to a toolbar instead of having it as a floating dialog. It would be great to have the Goto line entry in a similar way. But that can possibly be changed later. |
{ | ||
m_backTimer.setSingleShot( true ); | ||
m_backTimer.start( backTimeout_Ci ); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please mimic the coding style that you see elsewhere in this project: No space after the opening parenthesis and before the closing parenthesis. Do not use the _Ci
, which looks like a type indicator. Do not use this->
. Do not copy the member variable unnecessarily, it does not make the code easier to read and reason about.
kdbg/prefmisc.cpp
Outdated
const QString backTimeoutTT_Cqs( i18n("Time in ms. 0 has the special " | ||
"meaning of not actively going into the background, but raise it in " | ||
"case of a stop of the debuge.") ); | ||
m_backTimeoutLabel.setToolTip( backTimeoutTT_Cqs ); | ||
m_backTimeoutLabel.setMinimumSize(m_backTimeoutLabel.sizeHint()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we can have a special user-visible value "never", then we do not need an explanation. The special value can just be a very large value, say 1'000'000ms, then we do not even need special code for the timer, it just takes 16 minutes until the debugger goes into the background. That should be sufficient for "never".
If you do want to add an explanation, you can drop the bit about "raise it", because that happens also when the timeout is not the special value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like that the window is raised if the program stops. To have a timer running for a feature the user didn't like have, I don't know. I often like to see at least a part of the kdbg window, to can activate it through a mouse click instead of search it at the taskbar, because some other windows which are much more seldom used are in front of it. Instead of 0, it would also be possible to take a negative value, which is seeing it as unsigned int is a big value. The idea behind 0 was also the short description what is possible through that value,.
Do you really prefer a ComboBox LineEdit combination for that? The user expectation could be, that he likes see the previous used values too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that raise-to-top happens always even when there is a timeout. (At least that is the intent and I think it worked when I implemented it some decades ago.) Therefore, in this regard your new setting is not special. It's only special because it does not send KDbg into the background.
Whether it is a Combobox or something else I do not care much. I only saw some controls where it was possible to specify numbers and in addition one special, named value. I also would not mind to make -1 the special value for your new behavior, but in the user-interface it should be this one named special value that I propose to be "never".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about it. What do you think if we replace the QLabel with a QCheckbox that it looks like this:
[x] lower window after [ms]: __200
If the checkbox is unchecked m_backTimeout is set to the negative value of checked m_backTimeout) minus 1.
In this way no addition configuration value would be needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The checkbox is fine, too.
Concerning the configuration value, we have to be careful and keep in mind that the setting can be read by old versions of KDbg. Will they do something useful with a negative timeout, or will they be confused? I think that a new configuration value for the checkbox is better.
I would also prefer this - but I did not get this to work. |
If "Pop into foreground when program stops" is requested, it is now possible to disable the lowering of the window.
Thank you! I like the mechanics of the Goto dialog. The implementation needs some polishing, because it does not follow the project style. I would like to point out the details, but the review function on Github are completely incompatible with the way I would like to review commits. (In particular, my comments on an old commit remain even after the code was updated by a later commit, and then the comment is totally outdated.)
Can we please have a cue text in the edit box of the Goto line dialog, like "Line number". Because on my screen the dialog title is so short that it only says "Goto...". Can you please rebuild the commits so that it appears that there were no errors made from the beginning? You would use If you think you do not want to do that exercise, I can do it. And, BTW, do you want to remain anonymous regarding your first name and last name, i.e., do you prefer not to have your name etched into the history permanently? Or would you reveal your name? |
If "Pop into foreground when program stops" is requested, it is now possible to disable the lowering of the window.
Label at dialog added.
I would prefer if you do the changes you want. in the way you want. I think this will shorten things as not so much recursions are needed. Regarding the menu entry, my knowledge how the Kde things are working is to low, I didn't get this changed. |
…kip assembly lines, needs OK button
Through setting the preference to 0 the program will not actively going into the background, but raise it in case of a stop of the debuge.
If "Pop into foreground when program stops" is requested, it is now possible to disable the lowering of the window.
I've found a problem with the Goto Line dialog: It should skip disassembly lines, but does not. Can you have a look? Class I have pushed a preliminary clean-up of your work. You can download it with |
I just saw it today. |
Here is a patch which should solve the issue:
|
Thank you for the update. Please give me some time to consolidate the patches. |
Through the change regarding assembly lines for the goto feature, now a assert happens if the specified line number is greater than the line number present in the file. I added the following at
before But maybe a change of |
Please write a new commit with the suggested changes (those from above and these most recent suggested changes and update the pull request. Thanks. |
Do not count assembly lines if visible.
Hopefully I done the git related things in a usable/understandable way. |
Thanks. Will have a look. |
I've just pushed out an update of my branch goto-dialog with your latest change squashed in. Do you want to make the changes mentioned in the commit title, i.e.:
|
No description provided.