summaryrefslogtreecommitdiffstats
path: root/Source/CursesDialog/cmCursesMainForm.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'ccmake_incremental_log_display'Brad King2020-04-091-10/+14
|\ | | | | | | | | | | | | | | | | 60bfaa8fe6 ccmake: Use incremental rendering for the logs e9b36731e9 cmCursesLongMessageForm: Factor out helper to draw message to form Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Robert Maynard <robert.maynard@kitware.com> Merge-request: !4573
| * ccmake: Use incremental rendering for the logsSylvain Joubert2020-04-081-10/+14
| | | | | | | | | | | | | | | | | | This should avoid an exponential slowdown in the display time for projects with lots of output. This is still slower than cmake due to the ncurses drawing, but it should now be O(L) in total and not O(L^2) wrt to output length. Fixes: #20535
* | cmState::GetCacheEntryProperty: return cmPropVitaly Stakhovsky2020-03-251-4/+5
| |
* | cmState::GetCacheEntryValue: return cmPropVitaly Stakhovsky2020-03-171-8/+8
|/
* ccmake: Fix crash with cache entries almost the size of the windowSylvain Joubert2019-11-191-84/+39
| | | | | | | | | | | | | | | The previous code: if (curFieldLen < width) { ... strncpy(bar + curFieldLen + 2, help, width - curFieldLen - 2); was not correctly guarded against cache entries whose size were exactly 1 or 2 characters short of the window size. "if (curFieldLen - 2 < width)" would have prevented a copy of negative/max_int characters and a subsequent crash. The whole method was modernized with std::string instead of char*
* ccmake: Fix rendering on window resizeSylvain Joubert2019-11-181-12/+8
| | | | | | | | | Repro steps: configure (without errors), the logs are displayed then the cache is displayed again, resize the window up -> the logs are redisplayed after resize instead of the cache The 'CurrentForm' pointer were left pointed to the last log message form, this resets it to the main form when configure or generate is done
* ccmake: redirect stdout/stderr to the displayed logsSylvain Joubert2019-11-161-12/+14
| | | | | | | | | | | | | | | | | Use cmSystemTools to report some messages. These should now be caught and displayed properly, both in ccmake and cmake-gui Avoid log display flickering during processing - Don't clear the screen each time the long message form is rendered. It always renders the whole screen again so clearing it only causes flickering. - Add scroll down capabilities to the long message form so that it can draw itself directly in the correct state. This removes the need to programatically scroll down just after that also caused flickering. Fixes #19882 Fixes #13288
* ccmake: Identify the current cache entrySylvain Joubert2019-11-041-0/+9
|
* ccmake: Improve display of the key controlsSylvain Joubert2019-11-041-8/+8
| | | | Reduce space usage and add the key to display the output
* ccmake: Don't overwrite the last character of the titleSylvain Joubert2019-10-251-6/+6
|
* ccmake: Display output during configure and generateSylvain Joubert2019-10-251-20/+38
|
* ccmake: Use the error display for all the logsSylvain Joubert2019-10-251-16/+25
|
* ccmake: Display an ASCII progress bar in the status barSylvain Joubert2019-10-251-16/+12
| | | | | | | | The status bar is now only used to display the progress. The status log are not shown anymore since for the most cases they went by too quickly to be read. As for cases when a process is long enough to display and read a log, it would probably be a previous unrelated message.
* ccmake: Fully clear the 1st help line when processingSylvain Joubert2019-10-201-1/+1
|
* Revise include order using clang-format-6.0Kitware Robot2019-10-011-7/+7
| | | | | Run the `clang-format.bash` script to update our C and C++ code to a new include order `.clang-format`. Use `clang-format` version 6.0.
* cmCursesMainForm: change Entries to object vectorTushar Maheshwari2019-09-271-45/+43
| | | | | | - Add move constructor and move assignment operator for `cmCursesCacheEntryComposite`. - Transfer ownership of Entries objects to std::vector.
* cmCursesCacheEntryComposite: default destructorTushar Maheshwari2019-09-261-1/+1
|
* cmCursesMainForm: cleanup manual allocationTushar Maheshwari2019-09-261-90/+58
|
* clang-tidy: modernize-deprecated-headersRegina Pfeifer2019-09-161-2/+2
|
* Source sweep: Use cmStrCat for string concatenationSebastian Holtermann2019-08-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is generated by a python script that uses regular expressions to search for string concatenation patterns of the kind ``` std::string str = <ARG0>; str += <ARG1>; str += <ARG2>; ... ``` and replaces them with a single `cmStrCat` call ``` std::string str = cmStrCat(<ARG0>, <ARG1>, <ARG2>, ...); ``` If any `<ARGX>` is itself a concatenated string of the kind ``` a + b + c + ...; ``` then `<ARGX>` is split into multiple arguments for the `cmStrCat` call. If there's a sequence of literals in the `<ARGX>`, then all literals in the sequence are concatenated and merged into a single literal argument for the `cmStrCat` call. Single character strings are converted to single char arguments for the `cmStrCat` call. `std::to_string(...)` wrappings are removed from `cmStrCat` arguments, because it supports numeric types as well as string types. `arg.substr(x)` arguments to `cmStrCat` are replaced with `cm::string_view(arg).substr(x)`
* clang-tidy: isolate declarations for readabilityRegina Pfeifer2019-08-201-7/+14
|
* Source sweep: Use cmIsOn instead of cmSystemTools::IsOnSebastian Holtermann2019-08-171-1/+2
| | | | | | | | | This replaces invocations of - `cmSystemTools::IsInternallyOn` with `cmIsInternallyOn` - `cmSystemTools::IsNOTFOUND` with `cmIsNOTFOUND` - `cmSystemTools::IsOn` with `cmIsOn` - `cmSystemTools::IsOff` with `cmIsOff`
* ccmake: fix curses dialog broken by refactoringFelix Schwitzer2019-03-041-1/+1
| | | | | | | | | During refactoring in commit f6291eee25 (cmCursesMainForm: Modernize with STL and ranged-for loops, 2019-02-10) a transformation of a loop went wrong and editing the cmake cache with ccmake no longer works. Make ccmake work again. Fixes: #19008
* cmCursesMainForm: Fix lambda return type deducing warningArtur Ryt2019-02-121-5/+6
| | | | | It was issued by sparc compiler on Solaris system See !2947
* Merge topic 'progress-stdstring'Brad King2019-02-121-5/+9
|\ | | | | | | | | | | | | 950c099d83 cmake: Progress functions use `std::string` param Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2948
| * cmake: Progress functions use `std::string` paramVitaly Stakhovsky2019-02-111-5/+9
| |
* | Merge topic 'modernize-cmCursesMainForm'Brad King2019-02-121-62/+48
|\ \ | |/ |/| | | | | | | | | f6291eee25 cmCursesMainForm: Modernize with STL and ranged-for loops Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2947
| * cmCursesMainForm: Modernize with STL and ranged-for loopsArtur Ryt2019-02-101-62/+48
| |
* | Merge topic 'modernize-for-loops'Brad King2019-02-111-11/+6
|\ \ | |/ |/| | | | | | | | | | | | | 01b2d6ab74 Modernize: Use ranged for-loops when possible 15bdbec017 cmAlgorithms: Make cmRange advance/retreat safe for rvalues Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Daniel Pfeifer <daniel@pfeifer-mail.de> Merge-request: !2901
| * Modernize: Use ranged for-loops when possibleArtur Ryt2019-02-071-11/+6
| | | | | | | | | | | | | | Replaced most manual `const_iterator`-based loops and some reverse-iterator loops with range loops. Fixes: #18858
* | cmSystemTools: MessageCallback and Message() accept std::string argumentVitaly Stakhovsky2019-02-071-1/+2
|/
* Use `std::function` for callbacksRegina Pfeifer2019-01-291-13/+9
|
* clang-tidy: Pass by valueRegina Pfeifer2019-01-221-2/+3
|
* clang-tidy: Use emplaceRegina Pfeifer2019-01-171-4/+4
|
* Properties: Add CMAKE_ROLE global propertyKyle Edwards2019-01-171-1/+1
| | | | | This property allows scripts to determine whether they're in project mode, script mode, find-package mode, CTest, or CPack.
* Remove unnecessary c_str() callsVitaly Stakhovsky2018-09-051-1/+1
| | | | Use the new IsOn(),IsOff() overloads.
* Revise C++ coding style using clang-format-6.0Kitware Robot2018-06-011-9/+12
| | | | | | | | | | | | Run the `clang-format.bash` script to update all our C and C++ code to a new style defined by `.clang-format`. Use `clang-format` version 6.0. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
* ccmake: fix status line buffer overflow on very wide terminalsTianhao Chai2018-03-131-1/+1
| | | | | A mistyped length calculation will memset across stack frame when the user's terminal width is larger than 270.
* CursesDialog: avoid calling strcpy()Rolf Eike Beer2017-09-251-33/+16
| | | | | Also use memset() and a few places where the compiler will collapse the for loop into such a call anyway.
* Replace C-style castsDaniel Pfeifer2017-08-271-1/+1
|
* Use C++11 nullptrDaniel Pfeifer2017-08-241-18/+18
|
* Access string npos without instancePavel Solodovnikov2017-06-011-1/+1
|
* cmake: initialize with Role that controls which commands to registerDaniel Pfeifer2017-05-081-1/+1
|
* clang-tidy: remove else after break and continueDaniel Pfeifer2017-04-211-3/+2
|
* clang-tidy: apply modernize-use-bool-literals fixesDaniel Pfeifer2016-12-121-4/+2
|
* ccmake: Correctly display edit mode and associated keysSylvain Joubert2016-11-151-48/+43
| | | | | | | | Specific widgets can implement `PrintKeys` but their effects were hidden by the main widget `PrintKeys`. Fix this to give the user a better hint about the edit mode status. Closes: #13757
* ccmake: Add missing spaces to match the previous text lengthSylvain Joubert2016-11-151-1/+1
| | | | There was a "glitch" leaving "it" on the screen
* cmListFileCache: Remove cmState header includeStephen Kelly2016-10-191-0/+1
| | | | | Include it in dependents which have previously relied on it transitively.
* cmState: Port dependents to new cmStateTypes headerStephen Kelly2016-10-191-1/+1
|
* cmState: Move CacheEntryType enum to separate namespaceStephen Kelly2016-10-191-15/+16
| | | | Port dependent code to the change.