diff options
author | Nikolai Kosjar <nikolai.kosjar@digia.com> | 2013-01-15 14:26:24 +0100 |
---|---|---|
committer | Nikolai Kosjar <nikolai.kosjar@digia.com> | 2013-01-24 11:59:40 +0100 |
commit | 8fe25d0a4a1f61d0071ff9f10bb26204354da58e (patch) | |
tree | 8d5ee9a7e62d35d55f8a3ada86e102a7905e7202 /src/plugins/cpptools/cppcodestylesettingspage.ui | |
parent | 138066792e61925b827d9d722669b8d96bc0a87b (diff) | |
download | qt-creator-8fe25d0a4a1f61d0071ff9f10bb26204354da58e.tar.gz |
C++: Add settings dialog for pointer declaration formatting
The dialog is at Tools > Options > C++ > Code Style > Edit... > Pointers
and References.
Currently the settings are referenced when applying the following
QuickFixes:
- Adapting function signature in declaration/definition
(FunctionDeclDefLink)
- Inserting declaration from definition (InsertDeclOperation)
- Inserting definition from declaration (InsertDefOperation)
- Extracting a function (ExtractFunctionOperation)
- Add Local Declaration (AddLocalDeclarationOp::Operation)
In these cases the code style of the current project is used. If there
is no current project open, the current global code style is used.
Task-number: QTCREATORBUG-6169
Change-Id: I3e4e502b3103f7f754ac9b39594ad461d89d9304
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Diffstat (limited to 'src/plugins/cpptools/cppcodestylesettingspage.ui')
-rw-r--r-- | src/plugins/cpptools/cppcodestylesettingspage.ui | 82 |
1 files changed, 81 insertions, 1 deletions
diff --git a/src/plugins/cpptools/cppcodestylesettingspage.ui b/src/plugins/cpptools/cppcodestylesettingspage.ui index 0ca280a2f4..fed6d45722 100644 --- a/src/plugins/cpptools/cppcodestylesettingspage.ui +++ b/src/plugins/cpptools/cppcodestylesettingspage.ui @@ -17,7 +17,7 @@ <item> <widget class="QTabWidget" name="categoryTab"> <property name="currentIndex"> - <number>0</number> + <number>5</number> </property> <widget class="QWidget" name="generalTab"> <attribute name="title"> @@ -404,6 +404,86 @@ if they would align to the next line</string> </item> </layout> </widget> + <widget class="QWidget" name="typesTab"> + <attribute name="title"> + <string>Pointers and References</string> + </attribute> + <layout class="QHBoxLayout" name="horizontalLayout_2"> + <item> + <widget class="QGroupBox" name="pointerReferencesGroupBox"> + <property name="title"> + <string>Bind '*' and '&&' in types/declarations to</string> + </property> + <property name="flat"> + <bool>true</bool> + </property> + <layout class="QVBoxLayout" name="verticalLayout_6"> + <item> + <widget class="QCheckBox" name="bindStarToIdentifier"> + <property name="toolTip"> + <string><html><head/><body>This does not apply to the star and reference symbol in pointer/reference to functions and arrays, e.g.: +<pre> int (&rf)() = ...; + int (*pf)() = ...; + + int (&ra)[2] = ...; + int (*pa)[2] = ...; + +</pre></body></html></string> + </property> + <property name="text"> + <string>Identifier</string> + </property> + </widget> + </item> + <item> + <widget class="QCheckBox" name="bindStarToTypeName"> + <property name="text"> + <string>Type name</string> + </property> + </widget> + </item> + <item> + <widget class="QCheckBox" name="bindStarToLeftSpecifier"> + <property name="text"> + <string>Left const/volatile</string> + </property> + </widget> + </item> + <item> + <widget class="QCheckBox" name="bindStarToRightSpecifier"> + <property name="toolTip"> + <string>This does not apply to references.</string> + </property> + <property name="text"> + <string>Right const/volatile</string> + </property> + </widget> + </item> + <item> + <spacer name="verticalSpacer_6"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> + </layout> + </widget> + </item> + <item> + <widget class="TextEditor::SnippetEditorWidget" name="previewTextEditPointerReferences"> + <property name="plainText"> + <string/> + </property> + </widget> + </item> + </layout> + </widget> </widget> </item> </layout> |