Add icons for static fields and functions.
Icons for static members in completion list now with S letter. Task-number: QTCREATORBUG-203 Change-Id: I6c997ad14eeb500936ffe73e2fc0ad8e552a46c9 Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
@@ -46,10 +46,16 @@ Icons::Icons()
|
|||||||
_funcPublicIcon(QLatin1String(":/codemodel/images/func.png")),
|
_funcPublicIcon(QLatin1String(":/codemodel/images/func.png")),
|
||||||
_funcProtectedIcon(QLatin1String(":/codemodel/images/func_prot.png")),
|
_funcProtectedIcon(QLatin1String(":/codemodel/images/func_prot.png")),
|
||||||
_funcPrivateIcon(QLatin1String(":/codemodel/images/func_priv.png")),
|
_funcPrivateIcon(QLatin1String(":/codemodel/images/func_priv.png")),
|
||||||
|
_funcPublicStaticIcon(QLatin1String(":/codemodel/images/func_st.png")),
|
||||||
|
_funcProtectedStaticIcon(QLatin1String(":/codemodel/images/func_prot_st.png")),
|
||||||
|
_funcPrivateStaticIcon(QLatin1String(":/codemodel/images/func_priv_st.png")),
|
||||||
_namespaceIcon(QLatin1String(":/codemodel/images/namespace.png")),
|
_namespaceIcon(QLatin1String(":/codemodel/images/namespace.png")),
|
||||||
_varPublicIcon(QLatin1String(":/codemodel/images/var.png")),
|
_varPublicIcon(QLatin1String(":/codemodel/images/var.png")),
|
||||||
_varProtectedIcon(QLatin1String(":/codemodel/images/var_prot.png")),
|
_varProtectedIcon(QLatin1String(":/codemodel/images/var_prot.png")),
|
||||||
_varPrivateIcon(QLatin1String(":/codemodel/images/var_priv.png")),
|
_varPrivateIcon(QLatin1String(":/codemodel/images/var_priv.png")),
|
||||||
|
_varPublicStaticIcon(QLatin1String(":/codemodel/images/var_st.png")),
|
||||||
|
_varProtectedStaticIcon(QLatin1String(":/codemodel/images/var_prot_st.png")),
|
||||||
|
_varPrivateStaticIcon(QLatin1String(":/codemodel/images/var_priv_st.png")),
|
||||||
_signalIcon(QLatin1String(":/codemodel/images/signal.png")),
|
_signalIcon(QLatin1String(":/codemodel/images/signal.png")),
|
||||||
_slotPublicIcon(QLatin1String(":/codemodel/images/slot.png")),
|
_slotPublicIcon(QLatin1String(":/codemodel/images/slot.png")),
|
||||||
_slotProtectedIcon(QLatin1String(":/codemodel/images/slot_prot.png")),
|
_slotProtectedIcon(QLatin1String(":/codemodel/images/slot_prot.png")),
|
||||||
@@ -99,21 +105,22 @@ Icons::IconType Icons::iconTypeForSymbol(const Symbol *symbol)
|
|||||||
} else if (function->isSignal()) {
|
} else if (function->isSignal()) {
|
||||||
return SignalIconType;
|
return SignalIconType;
|
||||||
} else if (symbol->isPublic()) {
|
} else if (symbol->isPublic()) {
|
||||||
return FuncPublicIconType;
|
return symbol->isStatic() ? FuncPublicStaticIconType : FuncPublicIconType;
|
||||||
} else if (symbol->isProtected()) {
|
} else if (symbol->isProtected()) {
|
||||||
return FuncProtectedIconType;
|
return symbol->isStatic() ? FuncProtectedStaticIconType : FuncProtectedIconType;
|
||||||
} else if (symbol->isPrivate()) {
|
} else if (symbol->isPrivate()) {
|
||||||
return FuncPrivateIconType;
|
return symbol->isStatic() ? FuncPrivateStaticIconType : FuncPrivateIconType;
|
||||||
}
|
}
|
||||||
} else if (symbol->enclosingScope() && symbol->enclosingScope()->isEnum()) {
|
} else if (symbol->enclosingScope() && symbol->enclosingScope()->isEnum()) {
|
||||||
return EnumeratorIconType;
|
return EnumeratorIconType;
|
||||||
} else if (symbol->isDeclaration() || symbol->isArgument()) {
|
} else if (symbol->isDeclaration() || symbol->isArgument()) {
|
||||||
if (symbol->isPublic())
|
if (symbol->isPublic()) {
|
||||||
return VarPublicIconType;
|
return symbol->isStatic() ? VarPublicStaticIconType : VarPublicIconType;
|
||||||
else if (symbol->isProtected())
|
} else if (symbol->isProtected()) {
|
||||||
return VarProtectedIconType;
|
return symbol->isStatic() ? VarProtectedStaticIconType : VarProtectedIconType;
|
||||||
else if (symbol->isPrivate())
|
} else if (symbol->isPrivate()) {
|
||||||
return VarPrivateIconType;
|
return symbol->isStatic() ? VarPrivateStaticIconType : VarPrivateIconType;
|
||||||
|
}
|
||||||
} else if (symbol->isEnum()) {
|
} else if (symbol->isEnum()) {
|
||||||
return EnumIconType;
|
return EnumIconType;
|
||||||
} else if (symbol->isForwardClassDeclaration()) {
|
} else if (symbol->isForwardClassDeclaration()) {
|
||||||
@@ -156,6 +163,12 @@ QIcon Icons::iconForType(IconType type) const
|
|||||||
return _funcProtectedIcon;
|
return _funcProtectedIcon;
|
||||||
case FuncPrivateIconType:
|
case FuncPrivateIconType:
|
||||||
return _funcPrivateIcon;
|
return _funcPrivateIcon;
|
||||||
|
case FuncPublicStaticIconType:
|
||||||
|
return _funcPublicStaticIcon;
|
||||||
|
case FuncProtectedStaticIconType:
|
||||||
|
return _funcProtectedStaticIcon;
|
||||||
|
case FuncPrivateStaticIconType:
|
||||||
|
return _funcPrivateStaticIcon;
|
||||||
case NamespaceIconType:
|
case NamespaceIconType:
|
||||||
return _namespaceIcon;
|
return _namespaceIcon;
|
||||||
case VarPublicIconType:
|
case VarPublicIconType:
|
||||||
@@ -164,6 +177,12 @@ QIcon Icons::iconForType(IconType type) const
|
|||||||
return _varProtectedIcon;
|
return _varProtectedIcon;
|
||||||
case VarPrivateIconType:
|
case VarPrivateIconType:
|
||||||
return _varPrivateIcon;
|
return _varPrivateIcon;
|
||||||
|
case VarPublicStaticIconType:
|
||||||
|
return _varPublicStaticIcon;
|
||||||
|
case VarProtectedStaticIconType:
|
||||||
|
return _varProtectedStaticIcon;
|
||||||
|
case VarPrivateStaticIconType:
|
||||||
|
return _varPrivateStaticIcon;
|
||||||
case SignalIconType:
|
case SignalIconType:
|
||||||
return _signalIcon;
|
return _signalIcon;
|
||||||
case SlotPublicIconType:
|
case SlotPublicIconType:
|
||||||
|
@@ -57,10 +57,16 @@ public:
|
|||||||
FuncPublicIconType,
|
FuncPublicIconType,
|
||||||
FuncProtectedIconType,
|
FuncProtectedIconType,
|
||||||
FuncPrivateIconType,
|
FuncPrivateIconType,
|
||||||
|
FuncPublicStaticIconType,
|
||||||
|
FuncProtectedStaticIconType,
|
||||||
|
FuncPrivateStaticIconType,
|
||||||
NamespaceIconType,
|
NamespaceIconType,
|
||||||
VarPublicIconType,
|
VarPublicIconType,
|
||||||
VarProtectedIconType,
|
VarProtectedIconType,
|
||||||
VarPrivateIconType,
|
VarPrivateIconType,
|
||||||
|
VarPublicStaticIconType,
|
||||||
|
VarProtectedStaticIconType,
|
||||||
|
VarPrivateStaticIconType,
|
||||||
SignalIconType,
|
SignalIconType,
|
||||||
SlotPublicIconType,
|
SlotPublicIconType,
|
||||||
SlotProtectedIconType,
|
SlotProtectedIconType,
|
||||||
@@ -81,10 +87,16 @@ private:
|
|||||||
QIcon _funcPublicIcon;
|
QIcon _funcPublicIcon;
|
||||||
QIcon _funcProtectedIcon;
|
QIcon _funcProtectedIcon;
|
||||||
QIcon _funcPrivateIcon;
|
QIcon _funcPrivateIcon;
|
||||||
|
QIcon _funcPublicStaticIcon;
|
||||||
|
QIcon _funcProtectedStaticIcon;
|
||||||
|
QIcon _funcPrivateStaticIcon;
|
||||||
QIcon _namespaceIcon;
|
QIcon _namespaceIcon;
|
||||||
QIcon _varPublicIcon;
|
QIcon _varPublicIcon;
|
||||||
QIcon _varProtectedIcon;
|
QIcon _varProtectedIcon;
|
||||||
QIcon _varPrivateIcon;
|
QIcon _varPrivateIcon;
|
||||||
|
QIcon _varPublicStaticIcon;
|
||||||
|
QIcon _varProtectedStaticIcon;
|
||||||
|
QIcon _varPrivateStaticIcon;
|
||||||
QIcon _signalIcon;
|
QIcon _signalIcon;
|
||||||
QIcon _slotPublicIcon;
|
QIcon _slotPublicIcon;
|
||||||
QIcon _slotProtectedIcon;
|
QIcon _slotProtectedIcon;
|
||||||
|
@@ -17,5 +17,11 @@
|
|||||||
<file>images/var.png</file>
|
<file>images/var.png</file>
|
||||||
<file>images/var_priv.png</file>
|
<file>images/var_priv.png</file>
|
||||||
<file>images/var_prot.png</file>
|
<file>images/var_prot.png</file>
|
||||||
|
<file>images/func_priv_st.png</file>
|
||||||
|
<file>images/func_prot_st.png</file>
|
||||||
|
<file>images/func_st.png</file>
|
||||||
|
<file>images/var_priv_st.png</file>
|
||||||
|
<file>images/var_prot_st.png</file>
|
||||||
|
<file>images/var_st.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
BIN
src/libs/cplusplus/images/func_priv_st.png
Normal file
After Width: | Height: | Size: 685 B |
BIN
src/libs/cplusplus/images/func_prot_st.png
Normal file
After Width: | Height: | Size: 679 B |
BIN
src/libs/cplusplus/images/func_st.png
Normal file
After Width: | Height: | Size: 651 B |
BIN
src/libs/cplusplus/images/static.png
Normal file
After Width: | Height: | Size: 164 B |
BIN
src/libs/cplusplus/images/var_priv_st.png
Normal file
After Width: | Height: | Size: 676 B |
BIN
src/libs/cplusplus/images/var_prot_st.png
Normal file
After Width: | Height: | Size: 658 B |
BIN
src/libs/cplusplus/images/var_st.png
Normal file
After Width: | Height: | Size: 629 B |
@@ -54,6 +54,9 @@ const int IconSortOrder[] = {
|
|||||||
CPlusPlus::Icons::FuncPublicIconType,
|
CPlusPlus::Icons::FuncPublicIconType,
|
||||||
CPlusPlus::Icons::FuncProtectedIconType,
|
CPlusPlus::Icons::FuncProtectedIconType,
|
||||||
CPlusPlus::Icons::FuncPrivateIconType,
|
CPlusPlus::Icons::FuncPrivateIconType,
|
||||||
|
CPlusPlus::Icons::FuncPublicStaticIconType,
|
||||||
|
CPlusPlus::Icons::FuncProtectedStaticIconType,
|
||||||
|
CPlusPlus::Icons::FuncPrivateStaticIconType,
|
||||||
CPlusPlus::Icons::SignalIconType,
|
CPlusPlus::Icons::SignalIconType,
|
||||||
CPlusPlus::Icons::SlotPublicIconType,
|
CPlusPlus::Icons::SlotPublicIconType,
|
||||||
CPlusPlus::Icons::SlotProtectedIconType,
|
CPlusPlus::Icons::SlotProtectedIconType,
|
||||||
@@ -61,6 +64,9 @@ const int IconSortOrder[] = {
|
|||||||
CPlusPlus::Icons::VarPublicIconType,
|
CPlusPlus::Icons::VarPublicIconType,
|
||||||
CPlusPlus::Icons::VarProtectedIconType,
|
CPlusPlus::Icons::VarProtectedIconType,
|
||||||
CPlusPlus::Icons::VarPrivateIconType,
|
CPlusPlus::Icons::VarPrivateIconType,
|
||||||
|
CPlusPlus::Icons::VarPublicStaticIconType,
|
||||||
|
CPlusPlus::Icons::VarProtectedStaticIconType,
|
||||||
|
CPlusPlus::Icons::VarPrivateStaticIconType,
|
||||||
CPlusPlus::Icons::EnumeratorIconType,
|
CPlusPlus::Icons::EnumeratorIconType,
|
||||||
CPlusPlus::Icons::KeywordIconType,
|
CPlusPlus::Icons::KeywordIconType,
|
||||||
CPlusPlus::Icons::MacroIconType,
|
CPlusPlus::Icons::MacroIconType,
|
||||||
|