Review Request 129416: CMake ProjectManager: add advanced configuration settings

René J.V. Bertin rjvbertin at gmail.com
Thu Nov 17 17:00:22 UTC 2016


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/129416/
-----------------------------------------------------------

(Updated Nov. 17, 2016, 6 p.m.)


Review request for KDevelop.


Changes
-------

This revision moves the extra arguments history functionality from `CMakeBuildDirChooser` to a simple separate class, and reuses that class in `CMakePreferences` so that the argument history is available in both dialogs.

There is something wonky with the extra arguments widget width for which I've only found a workaround I don't really understand. The widget hlayout is set to expanding in the ui.rc, but this causes the whole `CMakePreferences` dialog to expand to accomodate the longest string in the argument history. I think that's because the dialog itself is configured to allow expansion whereas the `CMakeBuildDirChooser` dialog has a fixed size. I presume that doing a dynamic_cast from `KComboBox` to `QComboBox` has a side-effect which causes the widget to adopt the desired width and not become a lot wider.

I would of course love to be pointed to a proper way to do this!


Repository: kdevelop


Description
-------

This patch introduces something I've been missing since I started using KDevelop: the possibility to reconfigure the way CMake is called after creating a project (= through the IDE rather than by editing a file in the .kdev4 directory).

The patch introduces the equivalent of all fields available on the fields available on the cmake initial creation dialog, under the advanced button.

It's open for discussion whether the ExtraArguments field should have a history too (otherwise it could be a simple text entry box), and whether that history should be shared with the one from `CMakeBuildDirChooser`.

I'd also like to point out that with this extended interface we could provide a reset button which removes `CMakeCache.txt` and the `CMakeFiles` directory (or, more surgically, `CMakeFiles/3.*`); this is actually required for changes to certain changes like the compiler to be used.


Diffs (updated)
-----

  projectmanagers/cmake/CMakeLists.txt 5097f35 
  projectmanagers/cmake/cmakebuilddirchooser.h 186cc24 
  projectmanagers/cmake/cmakebuilddirchooser.cpp 2376bd3 
  projectmanagers/cmake/cmakeextraargumentshistory.h PRE-CREATION 
  projectmanagers/cmake/cmakeextraargumentshistory.cpp PRE-CREATION 
  projectmanagers/cmake/settings/cmakebuildsettings.ui 96362dd 
  projectmanagers/cmake/settings/cmakepreferences.h d653927 
  projectmanagers/cmake/settings/cmakepreferences.cpp e7cfbbb 

Diff: https://git.reviewboard.kde.org/r/129416/diff/


Testing
-------

Works as expected on OS X with Qt 5.6.2 and KF5 5.27.0


Thanks,

René J.V. Bertin

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20161117/d975fbd0/attachment.html>


More information about the KDevelop-devel mailing list