forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user