aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs
diff options
context:
space:
mode:
authorOrgad Shaneh <[email protected]>2015-02-03 23:48:57 +0200
committerOrgad Shaneh <[email protected]>2015-02-18 09:53:25 +0000
commitb6de2d1bd813055f77e6f43cfda9ff609d7b845d (patch)
tree17577afbd5ab45399bbfe14e24650154665af9d0 /src/libs
parent42af154c77aba5163e18405e7179b89aa684123b (diff)
QmlDesigner: Remove unneeded qualifications
Mostly done using the following ruby script: Dir.glob('**/*.cpp').each { |file| next if file =~ %r{src/shared/qbs|/qmljs/} s = File.read(file) s.scan(/^using namespace (.*);$/) { ns = $1 t = s.gsub(/^(.*)\b#{ns}::((?!Const)[A-Z])/) { |m| before = $1 char = $2 if before =~ /"|\/\/|\\|using|SIGNAL|SLOT|Q_/ m else before + char end } if t != s puts file File.open(file, 'w').write(t) end } } Change-Id: I492792bb9e5655c55795e938031efc557c9a462f Reviewed-by: Thomas Hartmann <[email protected]>
Diffstat (limited to 'src/libs')
-rw-r--r--src/libs/qmldebug/qmlprofilertraceclient.cpp16
-rw-r--r--src/libs/qmljs/qmljslink.cpp8
-rw-r--r--src/libs/qmljs/qmljsvalueowner.cpp8
3 files changed, 17 insertions, 15 deletions
diff --git a/src/libs/qmldebug/qmlprofilertraceclient.cpp b/src/libs/qmldebug/qmlprofilertraceclient.cpp
index c67e0ad8867..daecd97fc96 100644
--- a/src/libs/qmldebug/qmlprofilertraceclient.cpp
+++ b/src/libs/qmldebug/qmlprofilertraceclient.cpp
@@ -211,7 +211,7 @@ void QmlProfilerTraceClient::messageReceived(const QByteArray &data)
threadId = 0;
emit rangedEvent(Event, MaximumRangeType, AnimationFrame, time, 0, QString(),
- QmlDebug::QmlEventLocation(), frameRate, animationCount, threadId,
+ QmlEventLocation(), frameRate, animationCount, threadId,
0, 0);
d->maximumTime = qMax(time, d->maximumTime);
break;
@@ -222,7 +222,7 @@ void QmlProfilerTraceClient::messageReceived(const QByteArray &data)
break;
emit this->rangedEvent(Event, MaximumRangeType, subtype, time, 0, QString(),
- QmlDebug::QmlEventLocation(), 0, 0, 0, 0, 0);
+ QmlEventLocation(), 0, 0, 0, 0, 0);
d->maximumTime = qMax(time, d->maximumTime);
break;
}
@@ -244,8 +244,8 @@ void QmlProfilerTraceClient::messageReceived(const QByteArray &data)
}
while (count<5)
params[count++] = 0;
- emit rangedEvent(SceneGraphFrame, QmlDebug::MaximumRangeType, subtype,time, 0,
- QString(), QmlDebug::QmlEventLocation(), params[0], params[1],
+ emit rangedEvent(SceneGraphFrame, MaximumRangeType, subtype,time, 0,
+ QString(), QmlEventLocation(), params[0], params[1],
params[2], params[3], params[4]);
break;
}
@@ -261,8 +261,8 @@ void QmlProfilerTraceClient::messageReceived(const QByteArray &data)
stream >> width >> height;
refcount = 1;
}
- emit rangedEvent(QmlDebug::PixmapCacheEvent, QmlDebug::MaximumRangeType, subtype, time, 0,
- QString(), QmlDebug::QmlEventLocation(pixUrl,0,0), width, height,
+ emit rangedEvent(PixmapCacheEvent, MaximumRangeType, subtype, time, 0,
+ QString(), QmlEventLocation(pixUrl,0,0), width, height,
refcount, 0, 0);
d->maximumTime = qMax(time, d->maximumTime);
break;
@@ -273,8 +273,8 @@ void QmlProfilerTraceClient::messageReceived(const QByteArray &data)
qint64 delta;
stream >> delta;
- emit rangedEvent(QmlDebug::MemoryAllocation, QmlDebug::MaximumRangeType, subtype, time, 0,
- QString(), QmlDebug::QmlEventLocation(), delta, 0, 0, 0, 0);
+ emit rangedEvent(MemoryAllocation, MaximumRangeType, subtype, time, 0,
+ QString(), QmlEventLocation(), delta, 0, 0, 0, 0);
d->maximumTime = qMax(time, d->maximumTime);
break;
}
diff --git a/src/libs/qmljs/qmljslink.cpp b/src/libs/qmljs/qmljslink.cpp
index e885a6114e0..83f82f81546 100644
--- a/src/libs/qmljs/qmljslink.cpp
+++ b/src/libs/qmljs/qmljslink.cpp
@@ -41,9 +41,10 @@
#include <QDir>
using namespace LanguageUtils;
-using namespace QmlJS;
using namespace QmlJS::AST;
+namespace QmlJS {
+
namespace {
class ImportCacheKey
{
@@ -76,8 +77,7 @@ bool operator==(const ImportCacheKey &i1, const ImportCacheKey &i2)
}
}
-
-class QmlJS::LinkPrivate
+class LinkPrivate
{
public:
Snapshot snapshot;
@@ -602,3 +602,5 @@ void LinkPrivate::loadImplicitDefaultImports(Imports *imports)
imports->append(import);
}
}
+
+} // namespace QmlJS
diff --git a/src/libs/qmljs/qmljsvalueowner.cpp b/src/libs/qmljs/qmljsvalueowner.cpp
index 57aeb7629ee..7db6ad15a8b 100644
--- a/src/libs/qmljs/qmljsvalueowner.cpp
+++ b/src/libs/qmljs/qmljsvalueowner.cpp
@@ -65,12 +65,10 @@ private:
}
};
-} // end of Internal namespace
-} // end of QmlJS namespace
-
+} // namespace Internal
// globally shared data
-class QmlJS::SharedValueOwner : public ValueOwner
+class SharedValueOwner : public ValueOwner
{
public:
enum SharedValueOwnerKind{
@@ -969,3 +967,5 @@ const Value *ValueOwner::defaultValueForBuiltinType(const QString &name) const
}
return undefinedValue();
}
+
+} // namespace QmlJS