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>
This commit is contained in:
Orgad Shaneh
2015-02-03 23:48:19 +02:00
committed by hjk
parent f7835eb5f2
commit 428565cb02
20 changed files with 118 additions and 118 deletions

View File

@@ -301,7 +301,7 @@ void FutureProgress::paintEvent(QPaintEvent *)
if (creatorTheme()->widgetStyle() == Theme::StyleFlat) {
p.fillRect(rect(), creatorTheme()->color(Theme::FutureProgressBackgroundColor));
} else {
QLinearGradient grad = Utils::StyleHelper::statusBarGradient(rect());
QLinearGradient grad = StyleHelper::statusBarGradient(rect());
p.fillRect(rect(), grad);
}
}
@@ -379,7 +379,7 @@ void FutureProgressPrivate::fadeAway()
QSequentialAnimationGroup *group = new QSequentialAnimationGroup(this);
QPropertyAnimation *animation = new QPropertyAnimation(opacityEffect, "opacity");
animation->setDuration(Utils::StyleHelper::progressFadeAnimationDuration);
animation->setDuration(StyleHelper::progressFadeAnimationDuration);
animation->setEndValue(0.);
group->addAnimation(animation);
animation = new QPropertyAnimation(m_q, "maximumHeight");

View File

@@ -216,7 +216,7 @@ void ProgressBar::mousePressEvent(QMouseEvent *event)
QFont ProgressBar::titleFont() const
{
QFont boldFont(font());
boldFont.setPointSizeF(Utils::StyleHelper::sidebarFontSize());
boldFont.setPointSizeF(StyleHelper::sidebarFontSize());
boldFont.setBold(true);
return boldFont;
}
@@ -232,7 +232,7 @@ void ProgressBar::paintEvent(QPaintEvent *)
// TODO use Utils::StyleHelper white
if (bar.isNull())
bar.load(Utils::StyleHelper::dpiSpecificImageFile(QLatin1String(":/core/images/progressbar.png")));
bar.load(StyleHelper::dpiSpecificImageFile(QLatin1String(":/core/images/progressbar.png")));
double range = maximum() - minimum();
double percent = 0.;
@@ -256,10 +256,10 @@ void ProgressBar::paintEvent(QPaintEvent *)
// Draw separator
int separatorHeight = m_separatorVisible ? SEPARATOR_HEIGHT : 0;
if (m_separatorVisible) {
p.setPen(Utils::StyleHelper::sidebarShadow());
p.setPen(StyleHelper::sidebarShadow());
p.drawLine(0,0, size().width(), 0);
p.setPen(Utils::StyleHelper::sidebarHighlight());
p.setPen(StyleHelper::sidebarHighlight());
p.drawLine(1, 1, size().width(), 1);
}
@@ -291,7 +291,7 @@ void ProgressBar::paintEvent(QPaintEvent *)
size().width() - 2 * INDENT + 1, m_progressHeight);
if (creatorTheme()->flag(Theme::DrawProgressBarSunken))
Utils::StyleHelper::drawCornerImage(bar, &p, rect, 3, 3, 3, 3);
StyleHelper::drawCornerImage(bar, &p, rect, 3, 3, 3, 3);
// draw inner rect
QColor c = creatorTheme()->color(Theme::ProgressBarColorNormal);
@@ -357,7 +357,7 @@ void ProgressBar::paintEvent(QPaintEvent *)
p.drawLine(cancelVisualRect.topLeft() + QPointF(0.5, 0.5), cancelVisualRect.bottomLeft() + QPointF(0.5, -0.5));
p.setPen(QPen(QColor(255, 255, 255, 30)));
p.drawLine(cancelVisualRect.topLeft() + QPointF(1.5, 0.5), cancelVisualRect.bottomLeft() + QPointF(1.5, -0.5));
p.setPen(QPen(hover ? Utils::StyleHelper::panelTextColor() : QColor(180, 180, 180), 1.2, Qt::SolidLine, Qt::FlatCap));
p.setPen(QPen(hover ? StyleHelper::panelTextColor() : QColor(180, 180, 180), 1.2, Qt::SolidLine, Qt::FlatCap));
p.setRenderHint(QPainter::Antialiasing, true);
p.drawLine(cancelVisualRect.topLeft() + QPointF(4.0, 2.0), cancelVisualRect.bottomRight() + QPointF(-3.0, -2.0));
p.drawLine(cancelVisualRect.bottomLeft() + QPointF(4.0, -2.0), cancelVisualRect.topRight() + QPointF(-3.0, 2.0));

View File

@@ -343,7 +343,7 @@ void ProgressManagerPrivate::init()
Command *cmd = ActionManager::registerAction(toggleProgressView,
"QtCreator.ToggleProgressDetails",
Context(Constants::C_GLOBAL));
cmd->setDefaultKeySequence(QKeySequence(Utils::HostOsInfo::isMacHost()
cmd->setDefaultKeySequence(QKeySequence(HostOsInfo::isMacHost()
? tr("Ctrl+Shift+0")
: tr("Alt+Shift+0")));
connect(toggleProgressView, SIGNAL(toggled(bool)), this, SLOT(progressDetailsToggled(bool)));
@@ -532,7 +532,7 @@ void ProgressManagerPrivate::fadeAwaySummaryProgress()
{
stopFadeOfSummaryProgress();
m_opacityAnimation = new QPropertyAnimation(m_opacityEffect, "opacity");
m_opacityAnimation->setDuration(Utils::StyleHelper::progressFadeAnimationDuration);
m_opacityAnimation->setDuration(StyleHelper::progressFadeAnimationDuration);
m_opacityAnimation->setEndValue(0.);
connect(m_opacityAnimation, SIGNAL(finished()), this, SLOT(summaryProgressFinishedFading()));
m_opacityAnimation->start(QAbstractAnimation::DeleteWhenStopped);
@@ -725,7 +725,7 @@ void ToggleButton::paintEvent(QPaintEvent *event)
QStyleOption arrowOpt;
arrowOpt.initFrom(this);
arrowOpt.rect.adjust(2, 0, -1, -2);
Utils::StyleHelper::drawArrow(QStyle::PE_IndicatorArrowUp, &p, &arrowOpt);
StyleHelper::drawArrow(QStyle::PE_IndicatorArrowUp, &p, &arrowOpt);
}