forked from qt-creator/qt-creator
VCS: 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: I061c7bdcade96961aed226a8348f8ab07ee95f5f
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
6bbee89653
commit
620d1c36e5
@@ -71,7 +71,7 @@ void CommitEditor::setFields(const QFileInfo &repositoryRoot, const QString &bra
|
||||
if (item.flags == QLatin1String("Untracked"))
|
||||
shouldTrack.append(item.file);
|
||||
else
|
||||
fileModel->addFile(item.file, item.flags, VcsBase::Unchecked);
|
||||
fileModel->addFile(item.file, item.flags, Unchecked);
|
||||
}
|
||||
|
||||
VcsBaseSubmitEditor::filterUntrackedFilesOfProject(repositoryRoot.absoluteFilePath(),
|
||||
@@ -80,7 +80,7 @@ void CommitEditor::setFields(const QFileInfo &repositoryRoot, const QString &bra
|
||||
foreach (const QString &track, shouldTrack) {
|
||||
foreach (const VcsBaseClient::StatusItem &item, repoStatus) {
|
||||
if (item.file == track)
|
||||
fileModel->addFile(item.file, item.flags, VcsBase::Unchecked);
|
||||
fileModel->addFile(item.file, item.flags, Unchecked);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -252,7 +252,7 @@ QString MercurialClient::shortDescriptionSync(const QString &workingDirectory,
|
||||
QByteArray outputData;
|
||||
if (!vcsFullySynchronousExec(workingDirectory, args, &outputData))
|
||||
return revision;
|
||||
description = Utils::SynchronousProcess::normalizeNewlines(QString::fromLocal8Bit(outputData));
|
||||
description = SynchronousProcess::normalizeNewlines(QString::fromLocal8Bit(outputData));
|
||||
if (description.endsWith(QLatin1Char('\n')))
|
||||
description.truncate(description.size() - 1);
|
||||
return description;
|
||||
|
||||
@@ -555,7 +555,7 @@ void MercurialPlugin::showCommitWidget(const QList<VcsBaseClient::StatusItem> &s
|
||||
}
|
||||
|
||||
// Start new temp file
|
||||
Utils::TempFileSaver saver;
|
||||
TempFileSaver saver;
|
||||
// Keep the file alive, else it removes self and forgets its name
|
||||
saver.setAutoRemove(false);
|
||||
if (!saver.finalize()) {
|
||||
|
||||
Reference in New Issue
Block a user