diff options
author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2015-02-03 23:48:19 +0200 |
---|---|---|
committer | hjk <hjk@theqtcompany.com> | 2015-02-06 09:06:18 +0000 |
commit | 428565cb028a72d7ee82a6c3dd859c08c34b56a7 (patch) | |
tree | 4f9fcca395af5aa719d1c5fda04f991c6d024500 /src/plugins/coreplugin/fancytabwidget.cpp | |
parent | f7835eb5f2ab8e5d7dc40a58740956b4b1b6a08c (diff) | |
download | qt-creator-428565cb028a72d7ee82a6c3dd859c08c34b56a7.tar.gz |
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>
Diffstat (limited to 'src/plugins/coreplugin/fancytabwidget.cpp')
-rw-r--r-- | src/plugins/coreplugin/fancytabwidget.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
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()); } |