Notes |
|
(0032543)
|
nagger
|
2013-03-08 22:32
|
|
Notice that Ctrl-F is already taken for focusing the search-field for cache-variables. But in my opinion this should be changed. (See patch 0003)
Attached Patches:
0001: Search functions (forward and backward) - F3 and Shift-F3
0002: Context menu for output window to select the search functions
0003: search-field shortcut is now alt-e (alt-s is already taken)
0004: additional functionality: goto next non-status message (red message) in output window. I registered several shortcuts for this, since there is no common key for that. I would like to see 'F8' like in VisualStudio.
The patches are only tested with on Windows7. |
|
|
(0032546)
|
Alex Neundorf
|
2013-03-09 04:07
|
|
Cool :-)
Clinton, can you apply those patches ?
If you don't have the time, I could do that too. |
|
|
(0032561)
|
nagger
|
2013-03-09 10:35
|
|
Added an improved version for patch 0004:
* Subsequent error messages are not selected together anymore |
|
|
(0032800)
|
Alex Neundorf
|
2013-04-10 15:48
|
|
A few comments to the patches:
I get the following warnings when applying the patches:
* 0001:
~/src/CMake/CMake-git$ git apply 0001-search-functions-for-output-window.patch
0001-search-functions-for-output-window.patch:33: new blank line at EOF.
+
warning: 1 line adds whitespace errors.
~/src/CMake/CMake-git$ git apply 0004-goto-next-error-in-output-window_v2.patch
0004-goto-next-error-in-output-window_v2.patch:30: trailing whitespace.
//QTextEdit will terminate the msg with a ParagraphSeparator, but it also replaces
0004-goto-next-error-in-output-window_v2.patch:31: trailing whitespace.
//all newlines with ParagraphSeparators. By replacing the newlines by ourself, one
0004-goto-next-error-in-output-window_v2.patch:32: trailing whitespace.
//error msg will be one paragraph.
0004-goto-next-error-in-output-window_v2.patch:33: trailing whitespace.
QString paragraph(msg);
warning: 4 lines add whitespace errors.
Can you fix those please ?
I had to do the following change to make it compile:
@@ -1219,7 +1219,11 @@ void CMakeSetupDialog::doOutputFindNext(
QTextCursor cursor = this->Output->textCursor();
QTextDocument* document = this->Output->document();
- QTextDocument::FindFlags flags = directionForward ? 0 : QTextDocument::FindBackward;
+ QTextDocument::FindFlags flags;
+ if (!directionForward)
+ {
+ flags |= QTextDocument::FindBackward;
+ }
Otherwise I got:
Building CXX object Source/QtDialog/CMakeFiles/cmake-gui.dir/CMakeSetupDialog.cxx.o
/home/alex/src/CMake/CMake-git/Source/QtDialog/CMakeSetupDialog.cxx: In member function 'void CMakeSetupDialog::doOutputFindNext(bool)':
/home/alex/src/CMake/CMake-git/Source/QtDialog/CMakeSetupDialog.cxx:1222:74: error: conversion from 'int' to 'QTextDocument::FindFlags' is ambiguous
/usr/lib/qt/include/QtCore/qglobal.h:2180:12: note: candidates are: QFlags<Enum>::QFlags(void**) [with Enum = QTextDocument::FindFlag, void** = void**] <near match>
/usr/lib/qt/include/QtCore/qglobal.h:2179:12: note: QFlags<Enum>::QFlags(Enum) [with Enum = QTextDocument::FindFlag] <near match>
Additionally, can you please add menu entries to the new functions, so they can be found and the shortcuts are in this way discoverable ?
Probably the "Tools" menu is a good candidate.
And one more comment: some lines are quite long. In CMake the maximum allowed line length is 79. Can you try to make your patch so that the new code does not exceed the 79 characters per line ?
Beside that, very nice, thanks a lot. :-) |
|
|
(0032903)
|
nagger
|
2013-04-17 19:16
(edited on: 2013-04-17 19:17) |
|
Made it so. See attached search_for_strings_v2.
|
|
|
(0032906)
|
Alex Neundorf
|
2013-04-18 14:01
|
|
Thanks, great ! :-)
I applied your patches and merged them into next.
It should be in the next cmake release (2.8.12 probably). |
|