forked from qt-creator/qt-creator
Misc: 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: I919da493d0629b719d328e5e71c96a29d230dfd1
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
@@ -48,10 +48,10 @@ CallgrindRunControl::CallgrindRunControl(const AnalyzerStartParameters &sp,
|
||||
: ValgrindRunControl(sp, runConfiguration)
|
||||
, m_markAsPaused(false)
|
||||
{
|
||||
connect(&m_runner, &Valgrind::Callgrind::CallgrindRunner::finished,
|
||||
connect(&m_runner, &Callgrind::CallgrindRunner::finished,
|
||||
this, &CallgrindRunControl::slotFinished);
|
||||
connect(m_runner.parser(), SIGNAL(parserDataReady()), this, SLOT(slotFinished()));
|
||||
connect(&m_runner, &Valgrind::Callgrind::CallgrindRunner::statusMessage,
|
||||
connect(&m_runner, &Callgrind::CallgrindRunner::statusMessage,
|
||||
this, &CallgrindRunControl::showStatusMessage);
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ QString CallgrindRunControl::progressTitle() const
|
||||
return tr("Profiling");
|
||||
}
|
||||
|
||||
Valgrind::ValgrindRunner * CallgrindRunControl::runner()
|
||||
ValgrindRunner * CallgrindRunControl::runner()
|
||||
{
|
||||
return &m_runner;
|
||||
}
|
||||
@@ -106,7 +106,7 @@ bool CallgrindRunControl::startEngine()
|
||||
|
||||
void CallgrindRunControl::dump()
|
||||
{
|
||||
m_runner.controller()->run(Valgrind::Callgrind::CallgrindController::Dump);
|
||||
m_runner.controller()->run(Callgrind::CallgrindController::Dump);
|
||||
}
|
||||
|
||||
void CallgrindRunControl::setPaused(bool paused)
|
||||
@@ -135,20 +135,20 @@ void CallgrindRunControl::setToggleCollectFunction(const QString &toggleCollectF
|
||||
|
||||
void CallgrindRunControl::reset()
|
||||
{
|
||||
m_runner.controller()->run(Valgrind::Callgrind::CallgrindController::ResetEventCounters);
|
||||
m_runner.controller()->run(Callgrind::CallgrindController::ResetEventCounters);
|
||||
}
|
||||
|
||||
void CallgrindRunControl::pause()
|
||||
{
|
||||
m_runner.controller()->run(Valgrind::Callgrind::CallgrindController::Pause);
|
||||
m_runner.controller()->run(Callgrind::CallgrindController::Pause);
|
||||
}
|
||||
|
||||
void CallgrindRunControl::unpause()
|
||||
{
|
||||
m_runner.controller()->run(Valgrind::Callgrind::CallgrindController::UnPause);
|
||||
m_runner.controller()->run(Callgrind::CallgrindController::UnPause);
|
||||
}
|
||||
|
||||
Valgrind::Callgrind::ParseData *CallgrindRunControl::takeParserData()
|
||||
Callgrind::ParseData *CallgrindRunControl::takeParserData()
|
||||
{
|
||||
return m_runner.parser()->takeData();
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ public:
|
||||
void updateEventCombo();
|
||||
|
||||
AnalyzerRunControl *createRunControl(const AnalyzerStartParameters &sp,
|
||||
ProjectExplorer::RunConfiguration *runConfiguration = 0);
|
||||
RunConfiguration *runConfiguration = 0);
|
||||
|
||||
signals:
|
||||
void cycleDetectionEnabled(bool enabled);
|
||||
@@ -131,8 +131,8 @@ public slots:
|
||||
void slotRequestDump();
|
||||
void loadExternalLogFile();
|
||||
|
||||
void selectFunction(const Valgrind::Callgrind::Function *);
|
||||
void setCostFormat(Valgrind::Internal::CostDelegate::CostFormat format);
|
||||
void selectFunction(const Function *);
|
||||
void setCostFormat(CostDelegate::CostFormat format);
|
||||
void enableCycleDetection(bool enabled);
|
||||
void shortenTemplates(bool enabled);
|
||||
void setCostEvent(int index);
|
||||
@@ -160,15 +160,15 @@ public slots:
|
||||
void dataFunctionSelected(const QModelIndex &index);
|
||||
void calleeFunctionSelected(const QModelIndex &index);
|
||||
void callerFunctionSelected(const QModelIndex &index);
|
||||
void visualisationFunctionSelected(const Valgrind::Callgrind::Function *function);
|
||||
void showParserResults(const Valgrind::Callgrind::ParseData *data);
|
||||
void visualisationFunctionSelected(const Function *function);
|
||||
void showParserResults(const ParseData *data);
|
||||
|
||||
void takeParserDataFromRunControl(CallgrindRunControl *rc);
|
||||
void takeParserData(ParseData *data);
|
||||
void engineStarting(const Analyzer::AnalyzerRunControl *);
|
||||
void engineStarting(const AnalyzerRunControl *);
|
||||
void engineFinished();
|
||||
|
||||
void editorOpened(Core::IEditor *);
|
||||
void editorOpened(IEditor *);
|
||||
void requestContextMenu(TextEditorWidget *widget, int line, QMenu *menu);
|
||||
|
||||
public:
|
||||
@@ -401,7 +401,7 @@ void CallgrindToolPrivate::updateCostFormat()
|
||||
|
||||
void CallgrindToolPrivate::handleFilterProjectCosts()
|
||||
{
|
||||
ProjectExplorer::Project *pro = ProjectExplorer::ProjectTree::currentProject();
|
||||
Project *pro = ProjectTree::currentProject();
|
||||
QTC_ASSERT(pro, return);
|
||||
|
||||
if (m_filterProjectCosts->isChecked()) {
|
||||
@@ -819,7 +819,7 @@ void CallgrindToolPrivate::clearTextMarks()
|
||||
m_textMarks.clear();
|
||||
}
|
||||
|
||||
void CallgrindToolPrivate::engineStarting(const Analyzer::AnalyzerRunControl *)
|
||||
void CallgrindToolPrivate::engineStarting(const AnalyzerRunControl *)
|
||||
{
|
||||
// enable/disable actions
|
||||
m_resetAction->setEnabled(true);
|
||||
@@ -929,7 +929,7 @@ void CallgrindToolPrivate::slotRequestDump()
|
||||
void CallgrindToolPrivate::loadExternalLogFile()
|
||||
{
|
||||
const QString filePath = QFileDialog::getOpenFileName(
|
||||
Core::ICore::mainWindow(),
|
||||
ICore::mainWindow(),
|
||||
tr("Open Callgrind Log File"),
|
||||
QString(),
|
||||
tr("Callgrind Output (callgrind.out*);;All Files (*)"));
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace Valgrind {
|
||||
namespace Internal {
|
||||
|
||||
MemcheckRunControl::MemcheckRunControl(const AnalyzerStartParameters &sp,
|
||||
ProjectExplorer::RunConfiguration *runConfiguration)
|
||||
RunConfiguration *runConfiguration)
|
||||
: ValgrindRunControl(sp, runConfiguration)
|
||||
{
|
||||
connect(&m_parser, &XmlProtocol::ThreadedParser::error,
|
||||
|
||||
@@ -146,7 +146,7 @@ bool MemcheckErrorFilterProxyModel::filterAcceptsRow(int sourceRow, const QModel
|
||||
foreach (Project *project, SessionManager::projects()) {
|
||||
validFolders << project->projectDirectory().toString();
|
||||
foreach (Target *target, project->targets()) {
|
||||
foreach (const ProjectExplorer::DeployableFile &file,
|
||||
foreach (const DeployableFile &file,
|
||||
target->deploymentData().allFiles()) {
|
||||
if (file.isExecutable())
|
||||
validFolders << file.remoteDirectory();
|
||||
@@ -519,7 +519,7 @@ void MemcheckTool::loadExternalXmlLogFile()
|
||||
parser->parse(logFile); // ThreadedParser owns the file
|
||||
}
|
||||
|
||||
void MemcheckTool::parserError(const Valgrind::XmlProtocol::Error &error)
|
||||
void MemcheckTool::parserError(const Error &error)
|
||||
{
|
||||
m_errorModel->addError(error);
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace Valgrind {
|
||||
namespace Internal {
|
||||
|
||||
ValgrindRunControl::ValgrindRunControl(const AnalyzerStartParameters &sp,
|
||||
ProjectExplorer::RunConfiguration *runConfiguration)
|
||||
RunConfiguration *runConfiguration)
|
||||
: AnalyzerRunControl(sp, runConfiguration),
|
||||
m_settings(0),
|
||||
m_isStopping(false)
|
||||
|
||||
@@ -95,7 +95,7 @@ RunControl *ValgrindRunControlFactory::create(RunConfiguration *runConfiguration
|
||||
sp.connParams.host = server.serverAddress().toString();
|
||||
sp.connParams.port = server.serverPort();
|
||||
sp.startMode = StartLocal;
|
||||
sp.localRunMode = static_cast<ProjectExplorer::ApplicationLauncher::Mode>(rc1->runMode());
|
||||
sp.localRunMode = static_cast<ApplicationLauncher::Mode>(rc1->runMode());
|
||||
} else if (RemoteLinux::AbstractRemoteLinuxRunConfiguration *rc2 =
|
||||
qobject_cast<RemoteLinux::AbstractRemoteLinuxRunConfiguration *>(runConfiguration)) {
|
||||
sp.startMode = StartRemote;
|
||||
@@ -131,7 +131,7 @@ public:
|
||||
|
||||
RunConfigWidget *createConfigurationWidget()
|
||||
{
|
||||
return new Analyzer::AnalyzerRunConfigWidget(this);
|
||||
return new AnalyzerRunConfigWidget(this);
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user