[Differential] [Request, 16 lines] D4079: Fix bug with wrong CMake arguments during adding new build directory

Anton Anikin noreply at phabricator.kde.org
Wed Jan 11 04:35:04 UTC 2017


antonanikin created this revision.
antonanikin added a reviewer: KDevelop.
antonanikin added a subscriber: kdevelop-devel.

REVISION SUMMARY
  This patch fixes wrong CMake arguments during adding new build directory by user.
  
  Reproducible - always. Steps to reproduce:
  
  1. Open some CMake-based project and go to it's configuration.
  2. Open CMake settings.
  3. Press "Show Advanced" button.
  4. Press button to add new build directory.
  5. Change some parameters, for example build type to `MinSizeRel`.
  6. Press "OK".
  7. Selected parameters will be "dropped" and replaced by it's default values. For example build type always set to `Release`.
  
  As a result user can't set any CMake parameters for new build directory - all new directories will be "Release" build with default settings.
  
  This caused by wrong order in the `CMakePreferences::createBuildDir()` method: it's first adds new directory into combo box and then save parameters values to config. But adding directory to the combo box leads to calling `CMakePreferences::buildDirChanged()` method, which will try to read not yet populated config.

TEST PLAN
  Tested on master branch.

REPOSITORY
  R32 KDevelop

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D4079

AFFECTED FILES
  projectmanagers/cmake/settings/cmakepreferences.cpp

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: antonanikin, #kdevelop
Cc: kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20170111/f7455ca6/attachment.html>


More information about the KDevelop-devel mailing list