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")),
|
||||
_funcProtectedIcon(QLatin1String(":/codemodel/images/func_prot.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")),
|
||||
_varPublicIcon(QLatin1String(":/codemodel/images/var.png")),
|
||||
_varProtectedIcon(QLatin1String(":/codemodel/images/var_prot.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")),
|
||||
_slotPublicIcon(QLatin1String(":/codemodel/images/slot.png")),
|
||||
_slotProtectedIcon(QLatin1String(":/codemodel/images/slot_prot.png")),
|
||||
@@ -99,21 +105,22 @@ Icons::IconType Icons::iconTypeForSymbol(const Symbol *symbol)
|
||||
} else if (function->isSignal()) {
|
||||
return SignalIconType;
|
||||
} else if (symbol->isPublic()) {
|
||||
return FuncPublicIconType;
|
||||
return symbol->isStatic() ? FuncPublicStaticIconType : FuncPublicIconType;
|
||||
} else if (symbol->isProtected()) {
|
||||
return FuncProtectedIconType;
|
||||
return symbol->isStatic() ? FuncProtectedStaticIconType : FuncProtectedIconType;
|
||||
} else if (symbol->isPrivate()) {
|
||||
return FuncPrivateIconType;
|
||||
return symbol->isStatic() ? FuncPrivateStaticIconType : FuncPrivateIconType;
|
||||
}
|
||||
} else if (symbol->enclosingScope() && symbol->enclosingScope()->isEnum()) {
|
||||
return EnumeratorIconType;
|
||||
} else if (symbol->isDeclaration() || symbol->isArgument()) {
|
||||
if (symbol->isPublic())
|
||||
return VarPublicIconType;
|
||||
else if (symbol->isProtected())
|
||||
return VarProtectedIconType;
|
||||
else if (symbol->isPrivate())
|
||||
return VarPrivateIconType;
|
||||
if (symbol->isPublic()) {
|
||||
return symbol->isStatic() ? VarPublicStaticIconType : VarPublicIconType;
|
||||
} else if (symbol->isProtected()) {
|
||||
return symbol->isStatic() ? VarProtectedStaticIconType : VarProtectedIconType;
|
||||
} else if (symbol->isPrivate()) {
|
||||
return symbol->isStatic() ? VarPrivateStaticIconType : VarPrivateIconType;
|
||||
}
|
||||
} else if (symbol->isEnum()) {
|
||||
return EnumIconType;
|
||||
} else if (symbol->isForwardClassDeclaration()) {
|
||||
@@ -156,6 +163,12 @@ QIcon Icons::iconForType(IconType type) const
|
||||
return _funcProtectedIcon;
|
||||
case FuncPrivateIconType:
|
||||
return _funcPrivateIcon;
|
||||
case FuncPublicStaticIconType:
|
||||
return _funcPublicStaticIcon;
|
||||
case FuncProtectedStaticIconType:
|
||||
return _funcProtectedStaticIcon;
|
||||
case FuncPrivateStaticIconType:
|
||||
return _funcPrivateStaticIcon;
|
||||
case NamespaceIconType:
|
||||
return _namespaceIcon;
|
||||
case VarPublicIconType:
|
||||
@@ -164,6 +177,12 @@ QIcon Icons::iconForType(IconType type) const
|
||||
return _varProtectedIcon;
|
||||
case VarPrivateIconType:
|
||||
return _varPrivateIcon;
|
||||
case VarPublicStaticIconType:
|
||||
return _varPublicStaticIcon;
|
||||
case VarProtectedStaticIconType:
|
||||
return _varProtectedStaticIcon;
|
||||
case VarPrivateStaticIconType:
|
||||
return _varPrivateStaticIcon;
|
||||
case SignalIconType:
|
||||
return _signalIcon;
|
||||
case SlotPublicIconType:
|
||||
|
@@ -57,10 +57,16 @@ public:
|
||||
FuncPublicIconType,
|
||||
FuncProtectedIconType,
|
||||
FuncPrivateIconType,
|
||||
FuncPublicStaticIconType,
|
||||
FuncProtectedStaticIconType,
|
||||
FuncPrivateStaticIconType,
|
||||
NamespaceIconType,
|
||||
VarPublicIconType,
|
||||
VarProtectedIconType,
|
||||
VarPrivateIconType,
|
||||
VarPublicStaticIconType,
|
||||
VarProtectedStaticIconType,
|
||||
VarPrivateStaticIconType,
|
||||
SignalIconType,
|
||||
SlotPublicIconType,
|
||||
SlotProtectedIconType,
|
||||
@@ -81,10 +87,16 @@ private:
|
||||
QIcon _funcPublicIcon;
|
||||
QIcon _funcProtectedIcon;
|
||||
QIcon _funcPrivateIcon;
|
||||
QIcon _funcPublicStaticIcon;
|
||||
QIcon _funcProtectedStaticIcon;
|
||||
QIcon _funcPrivateStaticIcon;
|
||||
QIcon _namespaceIcon;
|
||||
QIcon _varPublicIcon;
|
||||
QIcon _varProtectedIcon;
|
||||
QIcon _varPrivateIcon;
|
||||
QIcon _varPublicStaticIcon;
|
||||
QIcon _varProtectedStaticIcon;
|
||||
QIcon _varPrivateStaticIcon;
|
||||
QIcon _signalIcon;
|
||||
QIcon _slotPublicIcon;
|
||||
QIcon _slotProtectedIcon;
|
||||
|
@@ -17,5 +17,11 @@
|
||||
<file>images/var.png</file>
|
||||
<file>images/var_priv.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>
|
||||
</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::FuncProtectedIconType,
|
||||
CPlusPlus::Icons::FuncPrivateIconType,
|
||||
CPlusPlus::Icons::FuncPublicStaticIconType,
|
||||
CPlusPlus::Icons::FuncProtectedStaticIconType,
|
||||
CPlusPlus::Icons::FuncPrivateStaticIconType,
|
||||
CPlusPlus::Icons::SignalIconType,
|
||||
CPlusPlus::Icons::SlotPublicIconType,
|
||||
CPlusPlus::Icons::SlotProtectedIconType,
|
||||
@@ -61,6 +64,9 @@ const int IconSortOrder[] = {
|
||||
CPlusPlus::Icons::VarPublicIconType,
|
||||
CPlusPlus::Icons::VarProtectedIconType,
|
||||
CPlusPlus::Icons::VarPrivateIconType,
|
||||
CPlusPlus::Icons::VarPublicStaticIconType,
|
||||
CPlusPlus::Icons::VarProtectedStaticIconType,
|
||||
CPlusPlus::Icons::VarPrivateStaticIconType,
|
||||
CPlusPlus::Icons::EnumeratorIconType,
|
||||
CPlusPlus::Icons::KeywordIconType,
|
||||
CPlusPlus::Icons::MacroIconType,
|
||||
|