Commit 23b4dc12 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by hjk

ProjectExplorer: 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: I1d05d48b23f44e3d589cc2a790803714786b57d2
Reviewed-by: default avatarChristian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: default avatarhjk <hjk@theqtcompany.com>
parent 779d6a8c
......@@ -56,13 +56,13 @@ using namespace ProjectExplorer::Internal;
using namespace Utils;
ToolWidget::ToolWidget(QWidget *parent)
: Utils::FadingPanel(parent), m_buildStepEnabled(true), m_targetOpacity(1.0f)
: FadingPanel(parent), m_buildStepEnabled(true), m_targetOpacity(1.0f)
{
QHBoxLayout *layout = new QHBoxLayout;
layout->setMargin(4);
layout->setSpacing(4);
setLayout(layout);
m_firstWidget = new Utils::FadingWidget(this);
m_firstWidget = new FadingWidget(this);
m_firstWidget->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
QHBoxLayout *hbox = new QHBoxLayout();
hbox->setContentsMargins(0, 0, 0, 0);
......@@ -79,7 +79,7 @@ ToolWidget::ToolWidget(QWidget *parent)
hbox->addWidget(m_disableButton);
layout->addWidget(m_firstWidget);
m_secondWidget = new Utils::FadingWidget(this);
m_secondWidget = new FadingWidget(this);
m_secondWidget->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding);
hbox = new QHBoxLayout();
hbox->setMargin(0);
......@@ -179,7 +179,7 @@ BuildStepsWidgetData::BuildStepsWidgetData(BuildStep *s) :
widget = s->createConfigWidget();
Q_ASSERT(widget);
detailsWidget = new Utils::DetailsWidget;
detailsWidget = new DetailsWidget;
detailsWidget->setWidget(widget);
toolWidget = new ToolWidget(detailsWidget);
......@@ -278,7 +278,7 @@ void BuildStepListWidget::init(BuildStepList *bsl)
addBuildStep(i);
// addBuilStep expands the config widget by default, which we don't want here
if (m_buildStepsData.at(i)->widget->showWidget())
m_buildStepsData.at(i)->detailsWidget->setState(Utils::DetailsWidget::Collapsed);
m_buildStepsData.at(i)->detailsWidget->setState(DetailsWidget::Collapsed);
}
m_noStepsLabel->setVisible(bsl->isEmpty());
......@@ -354,9 +354,9 @@ void BuildStepListWidget::addBuildStep(int pos)
BuildStepsWidgetData *s = m_buildStepsData.at(pos);
// Expand new build steps by default
if (s->widget->showWidget())
s->detailsWidget->setState(Utils::DetailsWidget::Expanded);
s->detailsWidget->setState(DetailsWidget::Expanded);
else
s->detailsWidget->setState(Utils::DetailsWidget::OnlySummary);
s->detailsWidget->setState(DetailsWidget::OnlySummary);
m_noStepsLabel->setVisible(false);
updateBuildStepButtonsState();
......
......@@ -141,7 +141,7 @@ void ProjectExplorerPlugin::testClangOutputParser_data()
QTest::addColumn<OutputParserTester::Channel>("inputChannel");
QTest::addColumn<QString>("childStdOutLines");
QTest::addColumn<QString>("childStdErrLines");
QTest::addColumn<QList<ProjectExplorer::Task> >("tasks");
QTest::addColumn<QList<Task> >("tasks");
QTest::addColumn<QString>("outputLines");
const Core::Id categoryCompile = Constants::TASK_CATEGORY_COMPILE;
......@@ -149,19 +149,19 @@ void ProjectExplorerPlugin::testClangOutputParser_data()
QTest::newRow("pass-through stdout")
<< QString::fromLatin1("Sometext") << OutputParserTester::STDOUT
<< QString::fromLatin1("Sometext\n") << QString()
<< QList<ProjectExplorer::Task>()
<< QList<Task>()
<< QString();
QTest::newRow("pass-through stderr")
<< QString::fromLatin1("Sometext") << OutputParserTester::STDERR
<< QString() << QString::fromLatin1("Sometext\n")
<< QList<ProjectExplorer::Task>()
<< QList<Task>()
<< QString();
QTest::newRow("clang++ warning")
<< QString::fromLatin1("clang++: warning: argument unused during compilation: '-mthreads'")
<< OutputParserTester::STDERR
<< QString() << QString()
<< (QList<ProjectExplorer::Task>()
<< (QList<Task>()
<< Task(Task::Warning,
QLatin1String("argument unused during compilation: '-mthreads'"),
Utils::FileName(), -1,
......@@ -171,7 +171,7 @@ void ProjectExplorerPlugin::testClangOutputParser_data()
<< QString::fromLatin1("clang++: error: no input files [err_drv_no_input_files]")
<< OutputParserTester::STDERR
<< QString() << QString()
<< (QList<ProjectExplorer::Task>()
<< (QList<Task>()
<< Task(Task::Error,
QLatin1String("no input files [err_drv_no_input_files]"),
Utils::FileName(), -1,
......@@ -184,7 +184,7 @@ void ProjectExplorerPlugin::testClangOutputParser_data()
" ^")
<< OutputParserTester::STDERR
<< QString() << QString()
<< (QList<ProjectExplorer::Task>()
<< (QList<Task>()
<< Task(Task::Unknown,
QLatin1String("In file included from ..\\..\\..\\QtSDK1.1\\Desktop\\Qt\\4.7.3\\mingw\\include/QtCore/qnamespace.h:45:"),
Utils::FileName::fromUserInput(QLatin1String("..\\..\\..\\QtSDK1.1\\Desktop\\Qt\\4.7.3\\mingw\\include/QtCore/qnamespace.h")), 45,
......@@ -202,7 +202,7 @@ void ProjectExplorerPlugin::testClangOutputParser_data()
" ^")
<< OutputParserTester::STDERR
<< QString() << QString()
<< (QList<ProjectExplorer::Task>()
<< (QList<Task>()
<< Task(Task::Unknown,
QLatin1String("instantiated from:\n"
"# define Q_CORE_EXPORT Q_DECL_IMPORT\n"
......@@ -216,7 +216,7 @@ void ProjectExplorerPlugin::testClangOutputParser_data()
" ^")
<< OutputParserTester::STDERR
<< QString() << QString()
<< (QList<ProjectExplorer::Task>()
<< (QList<Task>()
<< Task(Task::Error,
QLatin1String("'bits/c++config.h' file not found\n"
"#include <bits/c++config.h>\n"
......@@ -231,7 +231,7 @@ void ProjectExplorerPlugin::testClangOutputParser_data()
" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^")
<< OutputParserTester::STDERR
<< QString() << QString()
<< (QList<ProjectExplorer::Task>()
<< (QList<Task>()
<< Task(Task::Warning,
QLatin1String("?: has lower precedence than +; + will be evaluated first [-Wparentheses]\n"
" int x = option->rect.x() + horizontal ? 2 : 6;\n"
......@@ -245,7 +245,7 @@ void ProjectExplorerPlugin::testClangOutputParser_data()
"CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 7.0'")
<< OutputParserTester::STDERR
<< QString() << QString::fromLatin1("Check dependencies\n")
<< (QList<ProjectExplorer::Task>()
<< (QList<Task>()
<< Task(Task::Error,
QLatin1String("No matching provisioning profiles found: No provisioning profiles with a valid signing identity (i.e. certificate and private key pair) were found."),
Utils::FileName(), -1,
......
......@@ -46,7 +46,7 @@ CodeStyleSettingsWidget::CodeStyleSettingsWidget(Project *project) : QWidget(),
const EditorConfiguration *config = m_project->editorConfiguration();
QMap<Core::Id, ICodeStylePreferencesFactory *> factories
= TextEditor::TextEditorSettings::codeStyleFactories();
= TextEditorSettings::codeStyleFactories();
QMapIterator<Core::Id, ICodeStylePreferencesFactory *> it(factories);
while (it.hasNext()) {
it.next();
......
......@@ -75,7 +75,7 @@ void CurrentProjectFilter::prepareSearch(const QString &entry)
BaseFileFilter::prepareSearch(entry);
}
void CurrentProjectFilter::currentProjectChanged(ProjectExplorer::Project *project)
void CurrentProjectFilter::currentProjectChanged(Project *project)
{
if (project == m_project)
return;
......
......@@ -36,6 +36,7 @@
#include <QString>
using namespace Utils;
using namespace ProjectExplorer;
CustomParserSettings::CustomParserSettings() :
......@@ -138,8 +139,7 @@ bool CustomParser::parseLine(const QString &rawLine)
if (m_errorRegExp.indexIn(rawLine.trimmed()) == -1)
return false;
const Utils::FileName fileName =
Utils::FileName::fromUserInput(m_errorRegExp.cap(m_fileNameCap));
const FileName fileName = FileName::fromUserInput(m_errorRegExp.cap(m_fileNameCap));
const int lineNumber = m_errorRegExp.cap(m_lineNumberCap).toInt();
const QString message = m_errorRegExp.cap(m_messageCap);
......@@ -156,8 +156,6 @@ bool CustomParser::parseLine(const QString &rawLine)
# include "metatypedeclarations.h"
# include "outputparser_test.h"
using namespace Utils;
void ProjectExplorerPlugin::testCustomOutputParsers_data()
{
QTest::addColumn<QString>("input");
......@@ -168,12 +166,12 @@ void ProjectExplorerPlugin::testCustomOutputParsers_data()
QTest::addColumn<int>("messageCap");
QTest::addColumn<QString>("childStdOutLines");
QTest::addColumn<QString>("childStdErrLines");
QTest::addColumn<QList<ProjectExplorer::Task> >("tasks");
QTest::addColumn<QList<Task> >("tasks");
QTest::addColumn<QString>("outputLines");
const Core::Id categoryCompile = Constants::TASK_CATEGORY_COMPILE;
const QString simplePattern = QLatin1String("^([a-z]+\\.[a-z]+):(\\d+): error: ([^\\s].+)$");
const Utils::FileName fileName = Utils::FileName::fromUserInput(QLatin1String("main.c"));
const FileName fileName = FileName::fromUserInput(QLatin1String("main.c"));
QTest::newRow("empty pattern")
<< QString::fromLatin1("Sometext")
......@@ -181,7 +179,7 @@ void ProjectExplorerPlugin::testCustomOutputParsers_data()
<< QString::fromLatin1("")
<< 1 << 2 << 3
<< QString::fromLatin1("Sometext\n") << QString()
<< QList<ProjectExplorer::Task>()
<< QList<Task>()
<< QString();
QTest::newRow("pass-through stdout")
......@@ -190,7 +188,7 @@ void ProjectExplorerPlugin::testCustomOutputParsers_data()
<< simplePattern
<< 1 << 2 << 3
<< QString::fromLatin1("Sometext\n") << QString()
<< QList<ProjectExplorer::Task>()
<< QList<Task>()
<< QString();
QTest::newRow("pass-through stderr")
......@@ -199,7 +197,7 @@ void ProjectExplorerPlugin::testCustomOutputParsers_data()
<< simplePattern
<< 1 << 2 << 3
<< QString() << QString::fromLatin1("Sometext\n")
<< QList<ProjectExplorer::Task>()
<< QList<Task>()
<< QString();
const QString simpleError = QLatin1String("main.c:9: error: `sfasdf' undeclared (first use this function)");
......@@ -211,7 +209,7 @@ void ProjectExplorerPlugin::testCustomOutputParsers_data()
<< simplePattern
<< 1 << 2 << 3
<< QString() << QString()
<< (QList<ProjectExplorer::Task>()
<< (QList<Task>()
<< Task(Task::Error, message, fileName, 9, categoryCompile)
)
<< QString();
......@@ -226,7 +224,7 @@ void ProjectExplorerPlugin::testCustomOutputParsers_data()
<< simplePattern2
<< 1 << 2 << 3
<< QString() << QString()
<< (QList<ProjectExplorer::Task>()
<< (QList<Task>()
<< Task(Task::Error, message, fileName, lineNumber2, categoryCompile)
)
<< QString();
......@@ -237,7 +235,7 @@ void ProjectExplorerPlugin::testCustomOutputParsers_data()
<< simplePattern2
<< 1 << 2 << 3
<< QString() << QString()
<< (QList<ProjectExplorer::Task>()
<< (QList<Task>()
<< Task(Task::Error, message, fileName, lineNumber2, categoryCompile)
)
<< QString();
......@@ -254,7 +252,7 @@ void ProjectExplorerPlugin::testCustomOutputParsers_data()
<< unitTestPattern
<< 1 << 2 << 3
<< QString() << QString()
<< (QList<ProjectExplorer::Task>()
<< (QList<Task>()
<< Task(Task::Error, unitTestMessage, unitTestFileName, unitTestLineNumber, categoryCompile)
)
<< QString();
......
......@@ -177,7 +177,7 @@ void CustomToolChain::setPredefinedMacros(const QStringList &list)
m_predefinedMacros = list;
}
QList<HeaderPath> CustomToolChain::systemHeaderPaths(const QStringList &cxxFlags, const Utils::FileName &) const
QList<HeaderPath> CustomToolChain::systemHeaderPaths(const QStringList &cxxFlags, const FileName &) const
{
QList<HeaderPath> flagHeaderPaths;
foreach (const QString &cxxFlag, cxxFlags) {
......@@ -251,7 +251,7 @@ void CustomToolChain::setMakeCommand(const FileName &path)
toolChainUpdated();
}
QString CustomToolChain::makeCommand(const Utils::Environment &) const
QString CustomToolChain::makeCommand(const Environment &) const
{
return m_makeCommand.toString();
}
......@@ -272,7 +272,7 @@ const QStringList &CustomToolChain::cxx11Flags() const
void CustomToolChain::setMkspecs(const QString &specs)
{
m_mkspecs = Utils::transform(specs.split(QLatin1Char(',')),
[](QString fn) { return Utils::FileName::fromString(fn); });
[](QString fn) { return FileName::fromString(fn); });
}
QString CustomToolChain::mkspecs() const
......@@ -585,7 +585,7 @@ void CustomToolChainConfigWidget::setFromToolchain()
bool blocked = blockSignals(true);
CustomToolChain *tc = static_cast<CustomToolChain *>(toolChain());
m_compilerCommand->setFileName(tc->compilerCommand());
m_makeCommand->setFileName(FileName::fromString(tc->makeCommand(Utils::Environment())));
m_makeCommand->setFileName(FileName::fromString(tc->makeCommand(Environment())));
m_abiWidget->setAbis(QList<Abi>(), tc->targetAbi());
m_predefinedMacros->setPlainText(tc->rawPredefinedMacros().join(QLatin1Char('\n')));
m_headerPaths->setPlainText(tc->headerPathsList().join(QLatin1Char('\n')));
......@@ -601,7 +601,7 @@ bool CustomToolChainConfigWidget::isDirtyImpl() const
CustomToolChain *tc = static_cast<CustomToolChain *>(toolChain());
Q_ASSERT(tc);
return m_compilerCommand->fileName() != tc->compilerCommand()
|| m_makeCommand->path() != tc->makeCommand(Utils::Environment())
|| m_makeCommand->path() != tc->makeCommand(Environment())
|| m_abiWidget->currentAbi() != tc->targetAbi()
|| m_predefinedDetails->entries() != tc->rawPredefinedMacros()
|| m_headerDetails->entries() != tc->headerPathsList()
......
......@@ -114,7 +114,7 @@ public:
QLabel *kitLabel;
KitChooser *kitChooser;
Utils::TreeView *procView;
TreeView *procView;
QTextBrowser *errorText;
FancyLineEdit *processFilterLineEdit;
QPushButton *updateListButton;
......@@ -144,7 +144,7 @@ DeviceProcessesDialogPrivate::DeviceProcessesDialogPrivate(KitChooser *chooser,
kitChooser->populate();
procView = new Utils::TreeView(q);
procView = new TreeView(q);
procView->setModel(&proxyModel);
procView->setSelectionBehavior(QAbstractItemView::SelectRows);
procView->setSelectionMode(QAbstractItemView::SingleSelection);
......@@ -155,7 +155,7 @@ DeviceProcessesDialogPrivate::DeviceProcessesDialogPrivate(KitChooser *chooser,
procView->header()->setDefaultSectionSize(100);
procView->header()->setStretchLastSection(true);
procView->sortByColumn(1, Qt::AscendingOrder);
procView->setActivationMode(Utils::DoubleClickActivation);
procView->setActivationMode(DoubleClickActivation);
errorText = new QTextBrowser(q);
......
......@@ -124,7 +124,7 @@ void DeviceSettingsWidget::initGui()
m_ui->addConfigButton->setEnabled(hasDeviceFactories);
int lastIndex = Core::ICore::settings()
int lastIndex = ICore::settings()
->value(QLatin1String(LastDeviceIndexKey), 0).toInt();
if (lastIndex == -1)
lastIndex = 0;
......@@ -143,7 +143,7 @@ void DeviceSettingsWidget::addDevice()
if (d.exec() != QDialog::Accepted)
return;
Core::Id toCreate = d.selectedId();
Id toCreate = d.selectedId();
if (!toCreate.isValid())
return;
IDeviceFactory *factory = IDeviceFactory::find(toCreate);
......@@ -221,7 +221,7 @@ void DeviceSettingsWidget::updateDeviceFromUi()
void DeviceSettingsWidget::saveSettings()
{
Core::ICore::settings()->setValue(QLatin1String(LastDeviceIndexKey), currentIndex());
ICore::settings()->setValue(QLatin1String(LastDeviceIndexKey), currentIndex());
DeviceManager::replaceInstance();
}
......@@ -299,7 +299,7 @@ void DeviceSettingsWidget::currentDeviceChanged(int index)
m_ui->buttonsLayout->insertWidget(m_ui->buttonsLayout->count() - 1, button);
}
foreach (Core::Id actionId, device->actionIds()) {
foreach (Id actionId, device->actionIds()) {
QPushButton * const button = new QPushButton(device->displayNameForActionId(actionId));
m_additionalActionButtons << button;
connect(button, SIGNAL(clicked()), m_additionalActionsMapper, SLOT(map()));
......@@ -327,7 +327,7 @@ void DeviceSettingsWidget::handleAdditionalActionRequest(int actionId)
const IDevice::Ptr device = m_deviceManager->mutableDevice(currentDevice()->id());
QTC_ASSERT(device, return);
updateDeviceFromUi();
device->executeAction(Core::Id::fromUniqueIdentifier(actionId), this);
device->executeAction(Id::fromUniqueIdentifier(actionId), this);
// Widget must be set up from scratch, because the action could have changed random attributes.
currentDeviceChanged(currentIndex());
......
......@@ -51,7 +51,7 @@ static const int MARGIN = 12;
static const int OTHER_HEIGHT = 38;
static const int SELECTION_IMAGE_WIDTH = 10;
static const int SELECTION_IMAGE_HEIGHT = 20;
static const int OVERFLOW_DROPDOWN_WIDTH = Utils::StyleHelper::navigationWidgetHeight();
static const int OVERFLOW_DROPDOWN_WIDTH = StyleHelper::navigationWidgetHeight();
static void drawFirstLevelSeparator(QPainter *painter, QPoint top, QPoint bottom)
{
......@@ -170,7 +170,7 @@ void DoubleTabWidget::setTitle(const QString &title)
QSize DoubleTabWidget::minimumSizeHint() const
{
return QSize(0, Utils::StyleHelper::navigationWidgetHeight() + OTHER_HEIGHT + 1);
return QSize(0, StyleHelper::navigationWidgetHeight() + OTHER_HEIGHT + 1);
}
void DoubleTabWidget::updateNameIsUniqueAdd(Tab *tab)
......@@ -258,7 +258,7 @@ int DoubleTabWidget::tabCount() const
/// is the tab or subtab number
QPair<DoubleTabWidget::HitArea, int> DoubleTabWidget::convertPosToTab(QPoint pos)
{
if (pos.y() < Utils::StyleHelper::navigationWidgetHeight()) {
if (pos.y() < StyleHelper::navigationWidgetHeight()) {
// on the top level part of the bar
int eventX = pos.x();
QFontMetrics fm(font());
......@@ -282,10 +282,10 @@ QPair<DoubleTabWidget::HitArea, int> DoubleTabWidget::convertPosToTab(QPoint pos
if (eventX > x && eventX < x + OVERFLOW_DROPDOWN_WIDTH)
return qMakePair(HITOVERFLOW, -1);
}
} else if (pos.y() < Utils::StyleHelper::navigationWidgetHeight() + OTHER_HEIGHT) {
} else if (pos.y() < StyleHelper::navigationWidgetHeight() + OTHER_HEIGHT) {
int diff = (OTHER_HEIGHT - SELECTION_IMAGE_HEIGHT) / 2;
if (pos.y() < Utils::StyleHelper::navigationWidgetHeight() + diff
|| pos.y() > Utils::StyleHelper::navigationWidgetHeight() + OTHER_HEIGHT - diff)
if (pos.y() < StyleHelper::navigationWidgetHeight() + diff
|| pos.y() > StyleHelper::navigationWidgetHeight() + OTHER_HEIGHT - diff)
return qMakePair(HITNOTHING, -1);
// on the lower level part of the bar
if (m_currentIndex == -1)
......@@ -363,13 +363,13 @@ void DoubleTabWidget::paintEvent(QPaintEvent *event)
QRect r = rect();
// draw top level tab bar
r.setHeight(Utils::StyleHelper::navigationWidgetHeight());
r.setHeight(StyleHelper::navigationWidgetHeight());
if (creatorTheme()->widgetStyle () == Theme::StyleDefault) {
QPoint offset = window()->mapToGlobal(QPoint(0, 0)) - mapToGlobal(r.topLeft());
QRect gradientSpan = QRect(offset, window()->size());
Utils::StyleHelper::horizontalGradient(&painter, gradientSpan, r);
painter.setPen(Utils::StyleHelper::borderColor());
StyleHelper::horizontalGradient(&painter, gradientSpan, r);
painter.setPen(StyleHelper::borderColor());
QColor lighter(255, 255, 255, 40);
painter.drawLine(r.bottomLeft(), r.bottomRight());
painter.setPen(lighter);
......@@ -383,7 +383,7 @@ void DoubleTabWidget::paintEvent(QPaintEvent *event)
// top level title
if (!m_title.isEmpty()) {
painter.setPen(Utils::StyleHelper::panelTextColor());
painter.setPen(StyleHelper::panelTextColor());
painter.drawText(MARGIN, baseline, m_title);
}
......@@ -478,7 +478,7 @@ void DoubleTabWidget::paintEvent(QPaintEvent *event)
int actualIndex = m_currentTabIndices.at(i);
Tab tab = m_tabs.at(actualIndex);
if (actualIndex == m_currentIndex) {
painter.setPen(Utils::StyleHelper::borderColor());
painter.setPen(StyleHelper::borderColor());
painter.drawLine(x - 1, 0, x - 1, r.height() - 1);
painter.fillRect(QRect(x, 0,
2 * MARGIN + fm.width(tab.displayName()),
......@@ -495,7 +495,7 @@ void DoubleTabWidget::paintEvent(QPaintEvent *event)
x += nameWidth.at(actualIndex);
x += MARGIN;
if (creatorTheme()->widgetStyle() == Theme::StyleDefault) {
painter.setPen(Utils::StyleHelper::borderColor());
painter.setPen(StyleHelper::borderColor());
painter.drawLine(x, 0, x, r.height() - 1);
painter.setPen(QColor(0, 0, 0, 20));
painter.drawLine(x + 1, 0, x + 1, r.height() - 1);
......
......@@ -333,25 +333,25 @@ void EditorConfiguration::switchSettings(TextEditorWidget *widget) const
}
}
void EditorConfiguration::setTypingSettings(const TextEditor::TypingSettings &settings)
void EditorConfiguration::setTypingSettings(const TypingSettings &settings)
{
d->m_typingSettings = settings;
emit typingSettingsChanged(d->m_typingSettings);
}
void EditorConfiguration::setStorageSettings(const TextEditor::StorageSettings &settings)
void EditorConfiguration::setStorageSettings(const StorageSettings &settings)
{
d->m_storageSettings = settings;
emit storageSettingsChanged(d->m_storageSettings);
}
void EditorConfiguration::setBehaviorSettings(const TextEditor::BehaviorSettings &settings)
void EditorConfiguration::setBehaviorSettings(const BehaviorSettings &settings)
{
d->m_behaviorSettings = settings;
emit behaviorSettingsChanged(d->m_behaviorSettings);
}
void EditorConfiguration::setExtraEncodingSettings(const TextEditor::ExtraEncodingSettings &settings)
void EditorConfiguration::setExtraEncodingSettings(const ExtraEncodingSettings &settings)
{
d->m_extraEncodingSettings = settings;
emit extraEncodingSettingsChanged(d->m_extraEncodingSettings);
......@@ -391,7 +391,7 @@ void EditorConfiguration::slotAboutToRemoveProject(Project *project)
if (project->editorConfiguration() != this)
return;
foreach (TextEditor::BaseTextEditor *editor, d->m_editors)
foreach (BaseTextEditor *editor, d->m_editors)
deconfigureEditor(editor);
}
......
......@@ -197,7 +197,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
QTest::addColumn<OutputParserTester::Channel>("inputChannel");
QTest::addColumn<QString>("childStdOutLines");
QTest::addColumn<QString>("childStdErrLines");
QTest::addColumn<QList<ProjectExplorer::Task> >("tasks");
QTest::addColumn<QList<Task> >("tasks");
QTest::addColumn<QString>("outputLines");
const Core::Id categoryCompile = Constants::TASK_CATEGORY_COMPILE;
......
......@@ -128,7 +128,7 @@ static QByteArray gccPredefinedMacros(const FileName &gcc, const QStringList &ar
QByteArray predefinedMacros = runGcc(gcc, arguments, env);
// Sanity check in case we get an error message instead of real output:
QTC_CHECK(predefinedMacros.isNull() || predefinedMacros.startsWith("#define "));
if (Utils::HostOsInfo::isMacHost()) {
if (HostOsInfo::isMacHost()) {
// Turn off flag indicating Apple's blocks support
const QByteArray blocksDefine("#define __BLOCKS__ 1");
const QByteArray blocksUndefine("#undef __BLOCKS__");
......@@ -539,7 +539,7 @@ GccToolChain::WarningFlags GccToolChain::warningFlags(const QStringList &cflags)
return flags;
}
QList<HeaderPath> GccToolChain::systemHeaderPaths(const QStringList &cxxflags, const Utils::FileName &sysRoot) const
QList<HeaderPath> GccToolChain::systemHeaderPaths(const QStringList &cxxflags, const FileName &sysRoot) const
{
if (m_headerPaths.isEmpty()) {
// Using a clean environment breaks ccache/distcc/etc.
......@@ -617,7 +617,7 @@ QList<FileName> GccToolChain::suggestedMkspecList() const
return QList<FileName>();
}
QString GccToolChain::makeCommand(const Utils::Environment &environment) const
QString GccToolChain::makeCommand(const Environment &environment) const
{
QString make = QLatin1String("make");
FileName tmp = environment.searchInPath(make);
......@@ -791,7 +791,7 @@ ToolChain *GccToolChainFactory::create()
QList<ToolChain *> GccToolChainFactory::autoDetect()
{
QList<ToolChain *> tcs;
if (Utils::HostOsInfo::isMacHost()) {
if (HostOsInfo::isMacHost()) {
// Old mac compilers needed to support macx-gccXY mkspecs:
tcs.append(autoDetectToolchains(QLatin1String("g++-4.0"), Abi::hostAbi()));
tcs.append(autoDetectToolchains(QLatin1String("g++-4.2"), Abi::hostAbi()));
......@@ -1036,10 +1036,10 @@ QString ClangToolChain::typeDisplayName() const
return ClangToolChainFactory::tr("Clang");
}
QString ClangToolChain::makeCommand(const Utils::Environment &environment) const
QString ClangToolChain::makeCommand(const Environment &environment) const
{
QStringList makes;
if (Utils::HostOsInfo::isWindowsHost()) {
if (HostOsInfo::isWindowsHost()) {
makes << QLatin1String("mingw32-make.exe");
makes << QLatin1String("make.exe");
} else {
......@@ -1186,9 +1186,9 @@ QString MingwToolChain::typeDisplayName() const
QList<FileName> MingwToolChain::suggestedMkspecList() const
{
if (Utils::HostOsInfo::isWindowsHost())
if (HostOsInfo::isWindowsHost())
return QList<FileName>() << FileName::fromLatin1("win32-g++");
if (Utils::HostOsInfo::isLinuxHost()) {
if (HostOsInfo::isLinuxHost()) {
if (version().startsWith(QLatin1String("4.6.")))
return QList<FileName>()
<< FileName::fromLatin1("win32-g++-4.6-cross")
......@@ -1201,10 +1201,10 @@ QList<FileName> MingwToolChain::suggestedMkspecList() const
return QList<FileName>();
}
QString MingwToolChain::makeCommand(const Utils::Environment &environment) const
QString MingwToolChain::makeCommand(const Environment &environment) const
{
QStringList makes;
if (Utils::HostOsInfo::isWindowsHost()) {
if (HostOsInfo::isWindowsHost()) {
makes << QLatin1String("mingw32-make.exe");
makes << QLatin1String("make.exe");
} else {
......
......@@ -97,7 +97,7 @@ public:
m_expander.setAccumulating(true);
m_expander.registerVariable("INPUT", tr("The text edit input to fix up."),
[this]() { return m_currentInput; });
m_expander.registerSubProvider([expander]() -> Utils::MacroExpander * { return expander; });
m_expander.registerSubProvider([expander]() -> MacroExpander * { return expander; });
}
void setFixupExpando(const QString &expando)
......
......@@ -83,7 +83,7 @@ static ICodeStylePreferences *codeStylePreferences(Project *project, Id language
// JsonWizardGenerator:
// --------------------------------------------------------------------
bool JsonWizardGenerator::formatFile(const JsonWizard *wizard, Core::GeneratedFile *file, QString *errorMessage)
bool JsonWizardGenerator::formatFile(const JsonWizard *wizard, GeneratedFile *file, QString *errorMessage)
{
Q_UNUSED(errorMessage);
......@@ -132,7 +132,7 @@ JsonWizardGenerator::OverwriteResult JsonWizardGenerator::promptForOverwrite(Jso
foreach (const JsonWizard::GeneratorFile &f, *files) {
const QFileInfo fi(f.file.path());
if (fi.exists() && !(f.file.attributes() & Core::GeneratedFile::ForceOverwrite))
if (fi.exists() && !(f.file.attributes() & GeneratedFile::ForceOverwrite))
existingFiles.append(f.file.path());
}
if (existingFiles.isEmpty())
......@@ -173,7 +173,7 @@ JsonWizardGenerator::OverwriteResult JsonWizardGenerator::promptForOverwrite(Jso
}
// Prompt to overwrite existing files.
Core::PromptOverwriteDialog overwriteDialog;
PromptOverwriteDialog overwriteDialog;
// Scripts cannot handle overwrite
overwriteDialog.setFiles(existingFiles);
......@@ -195,7 +195,7 @@ JsonWizardGenerator::OverwriteResult JsonWizardGenerator::promptForOverwrite(Jso
{ return f.file.path() == keepFile; });
if (!file.isValid())
return OverwriteCanceled;
file.file.setAttributes(file.file.attributes() | Core::GeneratedFile::KeepExistingFileAttribute);
file.file.setAttributes(file.file.attributes() | GeneratedFile::KeepExistingFileAttribute);
}
return OverwriteOk;
}
......@@ -243,7 +243,7 @@ bool JsonWizardGenerator::allDone(const JsonWizard *wizard, JsonWizard::Generato
void JsonWizardGeneratorFactory::setTypeIdsSuffixes(const QStringList &suffixes)
{
m_typeIds = Utils::transform(suffixes, [](QString suffix)
{ return Core::Id::fromString(QString::fromLatin1(Constants::GENERATOR_ID_PREFIX) + suffix); });
{ return Id::fromString(QString::fromLatin1(Constants::GENERATOR_ID_PREFIX) + suffix); });
}
void JsonWizardGeneratorFactory::setTypeIdsSuffix(const QString &suffix)
......@@ -261,7 +261,7 @@ FileGeneratorFactory::FileGeneratorFactory()
setTypeIdsSuffix(QLatin1String("File"));
}
JsonWizardGenerator *FileGeneratorFactory::create(Core::Id typeId, const QVariant &data,
JsonWizardGenerator *FileGeneratorFactory::create(Id typeId, const QVariant &data,
const QString &path, const QString &platform,
const QVariantMap &variables)
{
......@@ -285,7 +285,7 @@ JsonWizardGenerator *FileGeneratorFactory::create(Core::Id typeId, const QVarian