diff options
author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2015-02-03 23:48:19 +0200 |
---|---|---|
committer | hjk <hjk@theqtcompany.com> | 2015-02-06 09:06:18 +0000 |
commit | 428565cb028a72d7ee82a6c3dd859c08c34b56a7 (patch) | |
tree | 4f9fcca395af5aa719d1c5fda04f991c6d024500 /src/plugins/coreplugin/actionmanager/actionmanager.cpp | |
parent | f7835eb5f2ab8e5d7dc40a58740956b4b1b6a08c (diff) | |
download | qt-creator-428565cb028a72d7ee82a6c3dd859c08c34b56a7.tar.gz |
Core: 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: I5c6690f51488bf8ca3610ba9fb11e6e5fd814aaa
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
Diffstat (limited to 'src/plugins/coreplugin/actionmanager/actionmanager.cpp')
-rw-r--r-- | src/plugins/coreplugin/actionmanager/actionmanager.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/coreplugin/actionmanager/actionmanager.cpp b/src/plugins/coreplugin/actionmanager/actionmanager.cpp index 81107deba7..87ca7128ba 100644 --- a/src/plugins/coreplugin/actionmanager/actionmanager.cpp +++ b/src/plugins/coreplugin/actionmanager/actionmanager.cpp @@ -101,9 +101,9 @@ using namespace Core::Internal; put the following in your plugin's IPlugin::initialize function: \code QAction *myAction = new QAction(tr("My Action"), this); - Core::Command *cmd = Core::ActionManager::registerAction(myAction, + Command *cmd = ActionManager::registerAction(myAction, "myplugin.myaction", - Core::Context(C_GLOBAL)); + Context(C_GLOBAL)); cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Alt+u"))); connect(myAction, SIGNAL(triggered()), this, SLOT(performMyAction())); \endcode @@ -125,7 +125,7 @@ using namespace Core::Internal; Following the example adding "My Action" to the "Tools" menu would be done by \code - Core::ActionManager::actionContainer(Core::M_TOOLS)->addAction(cmd); + ActionManager::actionContainer(M_TOOLS)->addAction(cmd); \endcode \section1 Important Guidelines: |