diff options
author | Alessandro Portale <alessandro.portale@qt.io> | 2021-02-11 11:57:57 +0100 |
---|---|---|
committer | Alessandro Portale <alessandro.portale@qt.io> | 2021-02-11 16:05:25 +0000 |
commit | 395e7cbfb9915e86945c40451e557769c7958576 (patch) | |
tree | da1c50eecd10239964e851abcc0a567e025bd50b /src/plugins/cppeditor/cppquickfixsettings.h | |
parent | 6829d92d38a2dfc5019f6b701afbcb84f4c4f956 (diff) |
CppEditor: Default to .cpp for QuickFix creation of 1-line setter/getter
Until Qt Creator 4.14, the QuickFix for setter/getter creation for
simple members added the implementation in the .cpp file.
The new QuickFix settings in Qt Creator 4.15 in theory keep the default
like before, but the threshold of 2 lines is usually not reached, which
causes the getter/setter implementations to now land in the header file.
This change sets the default threshold to 1 to restore the previous
default behavior.
Fixes: QTCREATORBUG-25331
Change-Id: I570deaa8b81686dc31254e8261b59ddcf8731f91
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/cppeditor/cppquickfixsettings.h')
-rw-r--r-- | src/plugins/cppeditor/cppquickfixsettings.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/cppeditor/cppquickfixsettings.h b/src/plugins/cppeditor/cppquickfixsettings.h index 89d9f2a9f4..6ee86cd133 100644 --- a/src/plugins/cppeditor/cppquickfixsettings.h +++ b/src/plugins/cppeditor/cppquickfixsettings.h @@ -138,9 +138,9 @@ public: public: int getterOutsideClassFrom = 0; - int getterInCppFileFrom = 2; + int getterInCppFileFrom = 1; int setterOutsideClassFrom = 0; - int setterInCppFileFrom = 2; + int setterInCppFileFrom = 1; QString getterAttributes; // e.g. [[nodiscard]] QString getterNameTemplate = "<name>"; // or get<Name> QString setterNameTemplate = "set<Name>"; // or set_<name> or Set<Name> |