1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-06-15 08:30:44 +08:00

79 Commits

Author SHA1 Message Date
Brad King
9ec50ff157 cmake-gui: Restore search bar case insensitivity
Since these changes:

* commit f1de6f6682 (cmake-gui: Support building against Qt6,
                     2020-12-17, v3.20.0-rc1~205^2~7)
* commit 134d69121e (cmake-gui: Restore search bar for cache view and
                     environment dialog, 2021-02-22, v3.20.0-rc2~12^2)

the search bar is no longer case insensitive when using Qt 5.12.[0-1],
and possibly some later versions.  It works as of Qt 5.15 though, so
update our version check accordingly.

Fixes: #21884
2021-03-04 11:25:54 -05:00
Sankhesh Jhaveri
134d69121e cmake-gui: Restore search bar for cache view and environment dialog
This was broken by commit f1de6f6682 (cmake-gui: Support building
against Qt6, 2020-12-17, v3.20.0-rc1~205^2~7).

Fixes: #21850
2021-02-22 17:56:59 -05:00
Sankhesh Jhaveri
f1de6f6682 cmake-gui: Support building against Qt6 2021-01-05 11:03:30 -05:00
Brad King
5f782119c8 cmake-gui: Restore workaround for crash in file dialog
In commit ce9dbceb42 (QtDialog: remove Qt4-only code, 2020-06-02,
v3.19.0-rc1~712^2~1) we removed an event filter that was thought to be
necessary only as a workaround for a bug in Qt.  However, that bug was
fixed in Qt 4.5, and the file dialog still crashes as of Qt 5.14 without
the filter.  Restore the workaround pending further investigation.

Fixes: #21400
2020-11-05 14:50:45 -05:00
Kyle Edwards
ab8f6fdd8c CMake GUI: Modernize signal-slot connections
Qt5 supports passing function pointers to QObject::connect(), and
prefers this over SIGNAL() and SLOT(). Modernize the connections,
stop using a deprecated signal from QComboBox, and modernize a few
QKeySequence's.
2020-09-27 12:06:54 -04:00
Brad King
f3d93edb36 Merge topic 'cmake-gui-qt-5.14'
af6cf586f6 cmake-gui: Fix crash when built with Qt 5.14 or later

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5045
2020-07-23 08:20:48 -04:00
Brad King
af6cf586f6 cmake-gui: Fix crash when built with Qt 5.14 or later
In commit d7679f6427 (QCMakeCacheView: use non-deprecated List and Set
constructions, 2020-06-10, v3.18.0-rc2~13^2) the conversion of the
`this->properties()` value to QSet is incorrect for Qt 5.14+.  The
problem is that `this->properties()` returns by value, so the range
`this->properties().begin(), this->properties().end()` provides
iterators to two different instances.  Use an intermediate temporary
copy of the value to get a consistent iterator range.

Fixes: #20981
2020-07-22 15:19:51 -04:00
Brad King
6bdbc7dba0 Merge topic 'cmake-gui-qt-5.14'
8eb7cf9b5f cmake-gui: Fix compilation as C++14 with Qt 5.14

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !4978
2020-07-07 09:17:23 -04:00
Brad King
8eb7cf9b5f cmake-gui: Fix compilation as C++14 with Qt 5.14
Fix code added by commit d7679f6427 (QCMakeCacheView: use non-deprecated
List and Set constructions, 2020-06-10, v3.18.0-rc2~13^2), used
conditionally on Qt 5.14 or above, to compile as C++14.
2020-07-06 11:45:03 -04:00
Brad King
068551cfb2 Merge topic 'cmake-gui-qt5-only'
4037beb747 QtDialog: remove Qt4 definition
ce9dbceb42 QtDialog: remove Qt4-only code
8ea50749da QtDialog: use Qt5's imported targets
4ccc9921be QtDialog: use qt5 functions for special Qt sources
e4d6015460 QtDialog: remove Qt4 support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4836
2020-06-12 10:11:54 -04:00
Ben Boeckel
d7679f6427 QCMakeCacheView: use non-deprecated List and Set constructions 2020-06-10 16:42:56 -04:00
Ben Boeckel
ce9dbceb42 QtDialog: remove Qt4-only code
The `reset()` method was actually deprecated for 5.0 which means it can
now be removed here.
2020-06-09 10:30:46 -04:00
Ben Boeckel
44f1744bed QtDialog: avoid using deprecated APIs 2020-06-02 07:37:56 -04:00
Kitware Robot
ed98209ddc Revise include order using clang-format-6.0
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.
2019-10-01 12:26:36 -04:00
Regina Pfeifer
d331021255 clang-tidy: isolate declarations for readability 2019-08-21 00:20:49 +02:00
Regina Pfeifer
55671b41d2 clang-tidy: Use = default
Suppress some cases in `Source/cmGeneratorExpressionNode.cxx` and
`Source/cmUVHandlePtr.h` where a few older compilers require a
user-defined default constructor (with `{}`).
2019-01-25 06:44:32 -05:00
Regina Pfeifer
3e60580784 clang-tidy: Fix readability-static-accessed-through-instance
Enable the check in .clang-tidy and fix all warnings.
2018-11-22 00:11:37 +01:00
Bartosz Kosiorek
ab2e35d614 Replace occurrences of "Mac OS X" with "macOS" in comments
Apple's main Operating system changed their name from OS X to macOS:

    https://www.engadget.com/2016/06/13/os-x-is-now-macos/

Revise source comments accordingly.
2018-09-10 13:34:09 +02:00
Brad King
0b33aee48b Use C++11 override instead of CM_OVERRIDE
We now require C++11 support including `override`.  Drop use of
the old compatibility macro.  Convert references as follows:

    git grep -l CM_OVERRIDE -- '*.h' '*.hxx' '*.cxx' |
      xargs sed -i 's/CM_OVERRIDE/override/g'
2017-09-15 10:06:41 -04:00
Daniel Pfeifer
5962db4389 Use C++11 nullptr 2017-08-24 23:39:47 +02:00
Daniel Pfeifer
1ffe47e37f QCMakeCacheView: prever QVector over QList 2017-05-05 09:21:16 +02:00
Daniel Pfeifer
726b3b6f75 QtDialog: add reference in foreach 2017-05-05 09:21:13 +02:00
Daniel Pfeifer
377d4df279 QCMakeCacheView: avoid temporary containers for iteration 2017-05-05 09:21:12 +02:00
Brad King
86578eccf2 Simplify CMake per-source license notices
Per-source copyright/license notice headers that spell out copyright holder
names and years are hard to maintain and often out-of-date or plain wrong.
Precise contributor information is already maintained automatically by the
version control tool.  Ultimately it is the receiver of a file who is
responsible for determining its licensing status, and per-source notices are
merely a convenience.  Therefore it is simpler and more accurate for
each source to have a generic notice of the license name and references to
more detailed information on copyright holders and full license terms.

Our `Copyright.txt` file now contains a list of Contributors whose names
appeared source-level copyright notices.  It also references version control
history for more precise information.  Therefore we no longer need to spell
out the list of Contributors in each source file notice.

Replace CMake per-source copyright/license notice headers with a short
description of the license and links to `Copyright.txt` and online information
available from "https://cmake.org/licensing".  The online URL also handles
cases of modules being copied out of our source into other projects, so we
can drop our notices about replacing links with full license text.

Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority
of the replacements mechanically.  Manually fix up shebang lines and trailing
newlines in a few files.  Manually update the notices in a few files that the
script does not handle.
2016-09-27 15:14:44 -04:00
Daniel Pfeifer
5d3b5bef11 QCMakeCacheView: simplify boolean expression 2016-09-08 23:35:59 +02:00
Daniel Pfeifer
ad42eb33b6 QCMakeCacheView: no else after return 2016-09-08 23:33:08 +02:00
Daniel Pfeifer
62c5f9afc3 QtDialog: fix clang-tidy warnings 2016-09-06 08:42:54 -04:00
Kitware Robot
d9fd2f5402 Revise C++ coding style using clang-format
Run the `Utilities/Scripts/clang-format.bash` script to update
all our C++ code to a new style defined by `.clang-format`.
Use `clang-format` version 3.8.

* 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.
2016-05-16 16:05:19 -04:00
Brad King
e1c7747253 Format include directive blocks and ordering with clang-format
Sort include directives within each block (separated by a blank line) in
lexicographic order (except to prioritize `sys/types.h` first).  First
run `clang-format` with the config file:

    ---
    SortIncludes: false
    ...

Commit the result temporarily.  Then run `clang-format` again with:

    ---
    SortIncludes: true
    IncludeCategories:
      - Regex:    'sys/types.h'
        Priority: -1
    ...

Commit the result temporarily.  Start a new branch and cherry-pick the
second commit.  Manually resolve conflicts to preserve indentation of
re-ordered includes.  This cleans up the include ordering without
changing any other style.

Use the following command to run `clang-format`:

    $ git ls-files -z -- \
        '*.c' '*.cc' '*.cpp' '*.cxx' '*.h' '*.hh' '*.hpp' '*.hxx' |
      egrep -z -v '(Lexer|Parser|ParserHelper)\.' |
      egrep -z -v '^Source/cm_sha2' |
      egrep -z -v '^Source/(kwsys|CursesDialog/form)/' |
      egrep -z -v '^Utilities/(KW|cm).*/' |
      egrep -z -v '^Tests/Module/GenerateExportHeader' |
      egrep -z -v '^Tests/RunCMake/CommandLine/cmake_depends/test_UTF-16LE.h' |
      xargs -0 clang-format -i

This selects source files that do not come from a third-party.

Inspired-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
2016-04-29 13:58:54 -04:00
Andreas Mohr
f57800d6f5 Fix spelling and typos (product names)
API, Borland, MinGW, UNIX, Mac OS X.
2013-05-07 08:42:20 -04:00
Stephen Kelly
6387f6d85c cmake-gui: Use the QStandardItemModel workaround until 5.1.0.
If there is a Qt 5.0.3 release, it may or may not contain the patch
that fixes this issue.

 http://thread.gmane.org/gmane.comp.lib.qt.releasing/882

Just use the workaround until 5.1.0 which certainly will contain the
fix. Don't use the workaround before Qt 5.0.0.
2013-03-19 15:14:46 -04:00
Stephen Kelly
404e1d675a cmake-gui: Workaround bug in Qt 5.0.0 to 5.0.3 QStandardItemModel
The commit in qtbase 9dfba89c (Add implementations of QAIM::sibling in
public APIs., 2012-09-26) added a buggy implementation of sibling(), and
the commit f136701b (Use the base implementation of
QAbstractItemModel::sibling in QSIM., 2013-02-21) resolves it.
Workaround the bug for Qt releases that have it.
2013-03-12 18:41:26 -04:00
Kitware Robot
7bbaa4283d Remove trailing whitespace from most CMake and C/C++ code
Our Git commit hooks disallow modification or addition of lines with
trailing whitespace.  Wipe out all remnants of trailing whitespace
everywhere except third-party code.

Run the following shell code:

git ls-files -z -- \
 bootstrap doxygen.config '*.readme' \
 '*.c' '*.cmake' '*.cpp' '*.cxx' \
 '*.el' '*.f' '*.f90' '*.h' '*.in' '*.in.l' '*.java' \
 '*.mm' '*.pike' '*.py' '*.txt' '*.vim' |
egrep -z -v '^(Utilities/cm|Source/(kwsys|CursesDialog/form)/)' |
egrep -z -v '^(Modules/CPack\..*\.in)' |
xargs -0 sed -i 's/ \+$//'
2012-08-13 14:18:39 -04:00
Clinton Stimpson
b1f52b1fd8 Fix grouping bug where "Ungrouped Entries" showed up as a child. 2011-01-28 08:50:56 -07:00
Clinton Stimpson
3f158c6dfa cmake-gui: always enable generate button. 2010-12-17 19:04:57 -07:00
Brad King
96afb12087 Convert CMake to OSI-approved BSD License
This converts the CMake license to a pure 3-clause OSI-approved BSD
License.  We drop the previous license clause requiring modified
versions to be plainly marked.  We also update the CMake copyright to
cover the full development time range.
2009-09-28 11:43:28 -04:00
Clinton Stimpson
551fcc23c2 fix compile warnings 2009-09-23 13:09:56 -04:00
Clinton Stimpson
37805ff81c ENH: Allow edit on single click. Fixes #9393. Also fix row heights to be consistent. 2009-08-10 13:25:22 -04:00
Clinton Stimpson
17acf0a310 ENH: Add a "Show my changes" to the Tools menu.
Changes by the user are recorded and when requested, it shows
      -D arguments for commandline or contents for a cache file.
2009-07-17 14:38:36 -04:00
Clinton Stimpson
ff09eacf5c BUG: Don't return checkable flag for item when in the middle of configure/generate. 2009-03-26 11:42:37 -04:00
Clinton Stimpson
c54f47635c ENH: Add support for showing combo box for choosing from a list of strings that a cache property can have. 2009-03-12 11:19:27 -04:00
Clinton Stimpson
667d5f9446 BUG: Fix column widths on some systems. 2008-06-30 14:29:08 -04:00
Clinton Stimpson
88a9a3254e BUG: Don't create empty property. Fixes bug #7193. 2008-06-24 00:00:42 -04:00
Clinton Stimpson
b428350d1e ENH: remove red blending. It didn't look good on some systems. 2008-06-13 16:57:07 -04:00
Clinton Stimpson
82a5b8000e ENH: instead of solid red for new entries, blend it with the alternating
white/gray (depending on style).
2008-06-13 15:29:07 -04:00
Clinton Stimpson
b1c31be668 ENH: Make original flat view the default.
Add option to switch to grouped view (and remember it).
2008-06-13 11:19:53 -04:00
Clinton Stimpson
db016a096e ENH: better name for ungrouped entries. 2008-06-11 15:08:52 -04:00
Clinton Stimpson
b31b420b65 BUG: need to invalidate filtering when using Qt 4.3+. 2008-06-11 14:47:56 -04:00
Clinton Stimpson
36576a4e7a ENH: Give a label for the group of properties that didn't get put into another
group.
2008-06-10 20:17:23 -04:00
Clinton Stimpson
2d37d2a48d ENH: group together items with no prefix and items that won't be
grouped with others.
2008-06-10 18:53:22 -04:00