forked from qt-creator/qt-creator
TextEditor: 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: Ief087658e2adc337ee02c49f0fb406597114df07
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
@@ -190,7 +190,7 @@ CodeStyleSelectorWidget::~CodeStyleSelectorWidget()
|
||||
delete m_ui;
|
||||
}
|
||||
|
||||
void CodeStyleSelectorWidget::setCodeStyle(TextEditor::ICodeStylePreferences *codeStyle)
|
||||
void CodeStyleSelectorWidget::setCodeStyle(ICodeStylePreferences *codeStyle)
|
||||
{
|
||||
if (m_codeStyle == codeStyle)
|
||||
return; // nothing changes
|
||||
@@ -244,15 +244,15 @@ void CodeStyleSelectorWidget::slotComboBoxActivated(int index)
|
||||
|
||||
if (index < 0 || index >= m_ui->delegateComboBox->count())
|
||||
return;
|
||||
TextEditor::ICodeStylePreferences *delegate =
|
||||
m_ui->delegateComboBox->itemData(index).value<TextEditor::ICodeStylePreferences *>();
|
||||
ICodeStylePreferences *delegate =
|
||||
m_ui->delegateComboBox->itemData(index).value<ICodeStylePreferences *>();
|
||||
|
||||
const bool wasBlocked = blockSignals(true);
|
||||
m_codeStyle->setCurrentDelegate(delegate);
|
||||
blockSignals(wasBlocked);
|
||||
}
|
||||
|
||||
void CodeStyleSelectorWidget::slotCurrentDelegateChanged(TextEditor::ICodeStylePreferences *delegate)
|
||||
void CodeStyleSelectorWidget::slotCurrentDelegateChanged(ICodeStylePreferences *delegate)
|
||||
{
|
||||
m_ignoreGuiSignals = true;
|
||||
m_ui->delegateComboBox->setCurrentIndex(m_ui->delegateComboBox->findData(QVariant::fromValue(delegate)));
|
||||
|
||||
Reference in New Issue
Block a user