Misc: 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: I919da493d0629b719d328e5e71c96a29d230dfd1
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:56:02 +02:00
committed by hjk
parent 2f1509aa58
commit 74ed591db3
61 changed files with 247 additions and 248 deletions

View File

@@ -385,7 +385,7 @@ bool QtWebKitHelpWidget::eventFilter(QObject *obj, QEvent *event)
if (event->type() == QEvent::KeyPress) {
if (QKeyEvent *keyEvent = static_cast<QKeyEvent*> (event)) {
if (keyEvent->key() == Qt::Key_Slash)
Core::FindPlugin::instance()->openFindToolBar(Core::FindPlugin::FindForwardDirection);
FindPlugin::instance()->openFindToolBar(FindPlugin::FindForwardDirection);
}
}
return QWebView::eventFilter(obj, event);
@@ -569,7 +569,7 @@ void QtWebKitHelpViewer::setOpenInNewPageActionVisible(bool visible)
m_webView->setOpenInNewPageActionVisible(visible);
}
bool QtWebKitHelpViewer::findText(const QString &text, Core::FindFlags flags,
bool QtWebKitHelpViewer::findText(const QString &text, FindFlags flags,
bool incremental, bool fromSearch, bool *wrapped)
{
Q_UNUSED(incremental);
@@ -577,9 +577,9 @@ bool QtWebKitHelpViewer::findText(const QString &text, Core::FindFlags flags,
if (wrapped)
*wrapped = false;
QWebPage::FindFlags options;
if (flags & Core::FindBackward)
if (flags & FindBackward)
options |= QWebPage::FindBackward;
if (flags & Core::FindCaseSensitively)
if (flags & FindCaseSensitively)
options |= QWebPage::FindCaseSensitively;
bool found = m_webView->findText(text, options);