Prefer static to anonymous namespace for global functions

This commit is contained in:
Thorbjørn Lindeijer
2010-06-15 14:36:10 +02:00
parent 77558abc32
commit 16989185df

View File

@@ -67,10 +67,8 @@ using namespace QmlJSEditor;
using namespace QmlJSEditor::Internal;
using namespace QmlJS;
namespace {
// Temporary workaround until we have proper icons for QML completion items
QIcon iconForColor(const QColor &color)
static QIcon iconForColor(const QColor &color)
{
QPixmap pix(6, 6);
@@ -100,7 +98,7 @@ QIcon iconForColor(const QColor &color)
return pix;
}
bool checkStartOfIdentifier(const QString &word)
static bool checkStartOfIdentifier(const QString &word)
{
if (word.isEmpty())
return false;
@@ -116,7 +114,7 @@ bool checkStartOfIdentifier(const QString &word)
}
}
bool isIdentifierChar(QChar ch)
static bool isIdentifierChar(QChar ch)
{
switch (ch.unicode()) {
case '_': case '$':
@@ -127,6 +125,8 @@ bool isIdentifierChar(QChar ch)
}
}
namespace {
class SearchPropertyDefinitions: protected AST::Visitor
{
QList<AST::UiPublicMember *> _properties;