From 428565cb028a72d7ee82a6c3dd859c08c34b56a7 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Tue, 3 Feb 2015 23:48:19 +0200 Subject: 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 Reviewed-by: hjk --- src/plugins/coreplugin/fancytabwidget.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/plugins/coreplugin/fancytabwidget.cpp') diff --git a/src/plugins/coreplugin/fancytabwidget.cpp b/src/plugins/coreplugin/fancytabwidget.cpp index b4095138fd..b50156cf20 100644 --- a/src/plugins/coreplugin/fancytabwidget.cpp +++ b/src/plugins/coreplugin/fancytabwidget.cpp @@ -100,7 +100,7 @@ FancyTabBar::~FancyTabBar() QSize FancyTabBar::tabSizeHint(bool minimum) const { QFont boldFont(font()); - boldFont.setPointSizeF(Utils::StyleHelper::sidebarFontSize()); + boldFont.setPointSizeF(StyleHelper::sidebarFontSize()); boldFont.setBold(true); QFontMetrics fm(boldFont); int spacing = 8; @@ -288,13 +288,13 @@ void FancyTabBar::paintTab(QPainter *painter, int tabIndex) const QRect tabIconRect(tabTextRect); tabTextRect.translate(0, drawIcon ? -2 : 1); QFont boldFont(painter->font()); - boldFont.setPointSizeF(Utils::StyleHelper::sidebarFontSize()); + boldFont.setPointSizeF(StyleHelper::sidebarFontSize()); boldFont.setBold(true); painter->setFont(boldFont); painter->setPen(selected ? QColor(255, 255, 255, 160) : QColor(0, 0, 0, 110)); const int textFlags = Qt::AlignCenter | (drawIcon ? Qt::AlignBottom : Qt::AlignVCenter) | Qt::TextWordWrap; - if (!Utils::HostOsInfo::isMacHost() && !selected && enabled) { + if (!HostOsInfo::isMacHost() && !selected && enabled) { painter->save(); int fader = int(m_tabs[tabIndex]->fader()); if (creatorTheme()->widgetStyle() == Theme::StyleFlat) { @@ -320,7 +320,7 @@ void FancyTabBar::paintTab(QPainter *painter, int tabIndex) const if (drawIcon) { int textHeight = painter->fontMetrics().boundingRect(QRect(0, 0, width(), height()), Qt::TextWordWrap, tabText).height(); tabIconRect.adjust(0, 4, 0, -textHeight); - Utils::StyleHelper::drawIconWithShadow(tabIcon(tabIndex), tabIconRect, painter, enabled ? QIcon::Normal : QIcon::Disabled); + StyleHelper::drawIconWithShadow(tabIcon(tabIndex), tabIconRect, painter, enabled ? QIcon::Normal : QIcon::Disabled); } painter->setOpacity(1.0); //FIXME: was 0.7 before? @@ -386,9 +386,9 @@ public: void mousePressEvent(QMouseEvent *ev) { if (ev->modifiers() & Qt::ShiftModifier) { - QColor color = QColorDialog::getColor(Utils::StyleHelper::requestedBaseColor(), m_parent); + QColor color = QColorDialog::getColor(StyleHelper::requestedBaseColor(), m_parent); if (color.isValid()) - Utils::StyleHelper::setBaseColor(color); + StyleHelper::setBaseColor(color); } } private: @@ -409,7 +409,7 @@ FancyTabWidget::FancyTabWidget(QWidget *parent) selectionLayout->setSpacing(0); selectionLayout->setMargin(0); - Utils::StyledBar *bar = new Utils::StyledBar; + StyledBar *bar = new StyledBar; QHBoxLayout *layout = new QHBoxLayout(bar); layout->setMargin(0); layout->setSpacing(0); @@ -490,11 +490,11 @@ void FancyTabWidget::paintEvent(QPaintEvent *event) QRect rect = m_selectionWidget->rect().adjusted(0, 0, 1, 0); rect = style()->visualRect(layoutDirection(), geometry(), rect); - Utils::StyleHelper::verticalGradient(&painter, rect, rect); - painter.setPen(Utils::StyleHelper::borderColor()); + StyleHelper::verticalGradient(&painter, rect, rect); + painter.setPen(StyleHelper::borderColor()); painter.drawLine(rect.topRight(), rect.bottomRight()); - QColor light = Utils::StyleHelper::sidebarHighlight(); + QColor light = StyleHelper::sidebarHighlight(); painter.setPen(light); painter.drawLine(rect.bottomLeft(), rect.bottomRight()); } -- cgit v1.2.1