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; ...@@ -56,13 +56,13 @@ using namespace ProjectExplorer::Internal;
using namespace Utils; using namespace Utils;
ToolWidget::ToolWidget(QWidget *parent) 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; QHBoxLayout *layout = new QHBoxLayout;
layout->setMargin(4); layout->setMargin(4);
layout->setSpacing(4); layout->setSpacing(4);
setLayout(layout); setLayout(layout);
m_firstWidget = new Utils::FadingWidget(this); m_firstWidget = new FadingWidget(this);
m_firstWidget->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); m_firstWidget->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
QHBoxLayout *hbox = new QHBoxLayout(); QHBoxLayout *hbox = new QHBoxLayout();
hbox->setContentsMargins(0, 0, 0, 0); hbox->setContentsMargins(0, 0, 0, 0);
...@@ -79,7 +79,7 @@ ToolWidget::ToolWidget(QWidget *parent) ...@@ -79,7 +79,7 @@ ToolWidget::ToolWidget(QWidget *parent)
hbox->addWidget(m_disableButton); hbox->addWidget(m_disableButton);
layout->addWidget(m_firstWidget); layout->addWidget(m_firstWidget);
m_secondWidget = new Utils::FadingWidget(this); m_secondWidget = new FadingWidget(this);
m_secondWidget->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding); m_secondWidget->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding);
hbox = new QHBoxLayout(); hbox = new QHBoxLayout();
hbox->setMargin(0); hbox->setMargin(0);
...@@ -179,7 +179,7 @@ BuildStepsWidgetData::BuildStepsWidgetData(BuildStep *s) : ...@@ -179,7 +179,7 @@ BuildStepsWidgetData::BuildStepsWidgetData(BuildStep *s) :
widget = s->createConfigWidget(); widget = s->createConfigWidget();
Q_ASSERT(widget); Q_ASSERT(widget);
detailsWidget = new Utils::DetailsWidget; detailsWidget = new DetailsWidget;
detailsWidget->setWidget(widget); detailsWidget->setWidget(widget);
toolWidget = new ToolWidget(detailsWidget); toolWidget = new ToolWidget(detailsWidget);
...@@ -278,7 +278,7 @@ void BuildStepListWidget::init(BuildStepList *bsl) ...@@ -278,7 +278,7 @@ void BuildStepListWidget::init(BuildStepList *bsl)
addBuildStep(i); addBuildStep(i);
// addBuilStep expands the config widget by default, which we don't want here // addBuilStep expands the config widget by default, which we don't want here
if (m_buildStepsData.at(i)->widget->showWidget()) 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()); m_noStepsLabel->setVisible(bsl->isEmpty());
...@@ -354,9 +354,9 @@ void BuildStepListWidget::addBuildStep(int pos) ...@@ -354,9 +354,9 @@ void BuildStepListWidget::addBuildStep(int pos)
BuildStepsWidgetData *s = m_buildStepsData.at(pos); BuildStepsWidgetData *s = m_buildStepsData.at(pos);
// Expand new build steps by default // Expand new build steps by default
if (s->widget->showWidget()) if (s->widget->showWidget())
s->detailsWidget->setState(Utils::DetailsWidget::Expanded); s->detailsWidget->setState(DetailsWidget::Expanded);
else else
s->detailsWidget->setState(Utils::DetailsWidget::OnlySummary); s->detailsWidget->setState(DetailsWidget::OnlySummary);
m_noStepsLabel->setVisible(false); m_noStepsLabel->setVisible(false);
updateBuildStepButtonsState(); updateBuildStepButtonsState();
......
...@@ -141,7 +141,7 @@ void ProjectExplorerPlugin::testClangOutputParser_data() ...@@ -141,7 +141,7 @@ void ProjectExplorerPlugin::testClangOutputParser_data()
QTest::addColumn<OutputParserTester::Channel>("inputChannel"); QTest::addColumn<OutputParserTester::Channel>("inputChannel");
QTest::addColumn<QString>("childStdOutLines"); QTest::addColumn<QString>("childStdOutLines");
QTest::addColumn<QString>("childStdErrLines"); QTest::addColumn<QString>("childStdErrLines");
QTest::addColumn<QList<ProjectExplorer::Task> >("tasks"); QTest::addColumn<QList<Task> >("tasks");
QTest::addColumn<QString>("outputLines"); QTest::addColumn<QString>("outputLines");
const Core::Id categoryCompile = Constants::TASK_CATEGORY_COMPILE; const Core::Id categoryCompile = Constants::TASK_CATEGORY_COMPILE;
...@@ -149,19 +149,19 @@ void ProjectExplorerPlugin::testClangOutputParser_data() ...@@ -149,19 +149,19 @@ void ProjectExplorerPlugin::testClangOutputParser_data()
QTest::newRow("pass-through stdout") QTest::newRow("pass-through stdout")
<< QString::fromLatin1("Sometext") << OutputParserTester::STDOUT << QString::fromLatin1("Sometext") << OutputParserTester::STDOUT
<< QString::fromLatin1("Sometext\n") << QString() << QString::fromLatin1("Sometext\n") << QString()
<< QList<ProjectExplorer::Task>() << QList<Task>()
<< QString(); << QString();
QTest::newRow("pass-through stderr") QTest::newRow("pass-through stderr")
<< QString::fromLatin1("Sometext") << OutputParserTester::STDERR << QString::fromLatin1("Sometext") << OutputParserTester::STDERR
<< QString() << QString::fromLatin1("Sometext\n") << QString() << QString::fromLatin1("Sometext\n")
<< QList<ProjectExplorer::Task>() << QList<Task>()
<< QString(); << QString();
QTest::newRow("clang++ warning") QTest::newRow("clang++ warning")
<< QString::fromLatin1("clang++: warning: argument unused during compilation: '-mthreads'") << QString::fromLatin1("clang++: warning: argument unused during compilation: '-mthreads'")
<< OutputParserTester::STDERR << OutputParserTester::STDERR
<< QString() << QString() << QString() << QString()
<< (QList<ProjectExplorer::Task>() << (QList<Task>()
<< Task(Task::Warning, << Task(Task::Warning,
QLatin1String("argument unused during compilation: '-mthreads'"), QLatin1String("argument unused during compilation: '-mthreads'"),
Utils::FileName(), -1, Utils::FileName(), -1,
...@@ -171,7 +171,7 @@ void ProjectExplorerPlugin::testClangOutputParser_data() ...@@ -171,7 +171,7 @@ void ProjectExplorerPlugin::testClangOutputParser_data()
<< QString::fromLatin1("clang++: error: no input files [err_drv_no_input_files]") << QString::fromLatin1("clang++: error: no input files [err_drv_no_input_files]")
<< OutputParserTester::STDERR << OutputParserTester::STDERR
<< QString() << QString() << QString() << QString()
<< (QList<ProjectExplorer::Task>() << (QList<Task>()
<< Task(Task::Error, << Task(Task::Error,
QLatin1String("no input files [err_drv_no_input_files]"), QLatin1String("no input files [err_drv_no_input_files]"),
Utils::FileName(), -1, Utils::FileName(), -1,
...@@ -184,7 +184,7 @@ void ProjectExplorerPlugin::testClangOutputParser_data() ...@@ -184,7 +184,7 @@ void ProjectExplorerPlugin::testClangOutputParser_data()
" ^") " ^")
<< OutputParserTester::STDERR << OutputParserTester::STDERR
<< QString() << QString() << QString() << QString()
<< (QList<ProjectExplorer::Task>() << (QList<Task>()
<< Task(Task::Unknown, << Task(Task::Unknown,
QLatin1String("In file included from ..\\..\\..\\QtSDK1.1\\Desktop\\Qt\\4.7.3\\mingw\\include/QtCore/qnamespace.h:45:"), 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, 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() ...@@ -202,7 +202,7 @@ void ProjectExplorerPlugin::testClangOutputParser_data()
" ^") " ^")
<< OutputParserTester::STDERR << OutputParserTester::STDERR
<< QString() << QString() << QString() << QString()
<< (QList<ProjectExplorer::Task>() << (QList<Task>()
<< Task(Task::Unknown, << Task(Task::Unknown,
QLatin1String("instantiated from:\n" QLatin1String("instantiated from:\n"
"# define Q_CORE_EXPORT Q_DECL_IMPORT\n" "# define Q_CORE_EXPORT Q_DECL_IMPORT\n"
...@@ -216,7 +216,7 @@ void ProjectExplorerPlugin::testClangOutputParser_data() ...@@ -216,7 +216,7 @@ void ProjectExplorerPlugin::testClangOutputParser_data()
" ^") " ^")
<< OutputParserTester::STDERR << OutputParserTester::STDERR
<< QString() << QString() << QString() << QString()
<< (QList<ProjectExplorer::Task>() << (QList<Task>()
<< Task(Task::Error, << Task(Task::Error,
QLatin1String("'bits/c++config.h' file not found\n" QLatin1String("'bits/c++config.h' file not found\n"
"#include <bits/c++config.h>\n" "#include <bits/c++config.h>\n"
...@@ -231,7 +231,7 @@ void ProjectExplorerPlugin::testClangOutputParser_data() ...@@ -231,7 +231,7 @@ void ProjectExplorerPlugin::testClangOutputParser_data()
" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^") " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^")
<< OutputParserTester::STDERR << OutputParserTester::STDERR
<< QString() << QString() << QString() << QString()
<< (QList<ProjectExplorer::Task>() << (QList<Task>()
<< Task(Task::Warning, << Task(Task::Warning,
QLatin1String("?: has lower precedence than +; + will be evaluated first [-Wparentheses]\n" QLatin1String("?: has lower precedence than +; + will be evaluated first [-Wparentheses]\n"
" int x = option->rect.x() + horizontal ? 2 : 6;\n" " int x = option->rect.x() + horizontal ? 2 : 6;\n"
...@@ -245,7 +245,7 @@ void ProjectExplorerPlugin::testClangOutputParser_data() ...@@ -245,7 +245,7 @@ void ProjectExplorerPlugin::testClangOutputParser_data()
"CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 7.0'") "CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 7.0'")
<< OutputParserTester::STDERR << OutputParserTester::STDERR
<< QString() << QString::fromLatin1("Check dependencies\n") << QString() << QString::fromLatin1("Check dependencies\n")
<< (QList<ProjectExplorer::Task>() << (QList<Task>()
<< Task(Task::Error, << 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."), 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, Utils::FileName(), -1,
......
...@@ -46,7 +46,7 @@ CodeStyleSettingsWidget::CodeStyleSettingsWidget(Project *project) : QWidget(), ...@@ -46,7 +46,7 @@ CodeStyleSettingsWidget::CodeStyleSettingsWidget(Project *project) : QWidget(),
const EditorConfiguration *config = m_project->editorConfiguration(); const EditorConfiguration *config = m_project->editorConfiguration();
QMap<Core::Id, ICodeStylePreferencesFactory *> factories QMap<Core::Id, ICodeStylePreferencesFactory *> factories
= TextEditor::TextEditorSettings::codeStyleFactories(); = TextEditorSettings::codeStyleFactories();
QMapIterator<Core::Id, ICodeStylePreferencesFactory *> it(factories); QMapIterator<Core::Id, ICodeStylePreferencesFactory *> it(factories);
while (it.hasNext()) { while (it.hasNext()) {
it.next(); it.next();
......
...@@ -75,7 +75,7 @@ void CurrentProjectFilter::prepareSearch(const QString &entry) ...@@ -75,7 +75,7 @@ void CurrentProjectFilter::prepareSearch(const QString &entry)
BaseFileFilter::prepareSearch(entry); BaseFileFilter::prepareSearch(entry);
} }
void CurrentProjectFilter::currentProjectChanged(ProjectExplorer::Project *project) void CurrentProjectFilter::currentProjectChanged(Project *project)
{ {
if (project == m_project) if (project == m_project)
return; return;
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include <QString> #include <QString>
using namespace Utils;
using namespace ProjectExplorer; using namespace ProjectExplorer;
CustomParserSettings::CustomParserSettings() : CustomParserSettings::CustomParserSettings() :
...@@ -138,8 +139,7 @@ bool CustomParser::parseLine(const QString &rawLine) ...@@ -138,8 +139,7 @@ bool CustomParser::parseLine(const QString &rawLine)
if (m_errorRegExp.indexIn(rawLine.trimmed()) == -1) if (m_errorRegExp.indexIn(rawLine.trimmed()) == -1)
return false; return false;
const Utils::FileName fileName = const FileName fileName = FileName::fromUserInput(m_errorRegExp.cap(m_fileNameCap));
Utils::FileName::fromUserInput(m_errorRegExp.cap(m_fileNameCap));
const int lineNumber = m_errorRegExp.cap(m_lineNumberCap).toInt(); const int lineNumber = m_errorRegExp.cap(m_lineNumberCap).toInt();
const QString message = m_errorRegExp.cap(m_messageCap); const QString message = m_errorRegExp.cap(m_messageCap);
...@@ -156,8 +156,6 @@ bool CustomParser::parseLine(const QString &rawLine) ...@@ -156,8 +156,6 @@ bool CustomParser::parseLine(const QString &rawLine)
# include "metatypedeclarations.h" # include "metatypedeclarations.h"
# include "outputparser_test.h" # include "outputparser_test.h"
using namespace Utils;
void ProjectExplorerPlugin::testCustomOutputParsers_data() void ProjectExplorerPlugin::testCustomOutputParsers_data()
{ {
QTest::addColumn<QString>("input"); QTest::addColumn<QString>("input");
...@@ -168,12 +166,12 @@ void ProjectExplorerPlugin::testCustomOutputParsers_data() ...@@ -168,12 +166,12 @@ void ProjectExplorerPlugin::testCustomOutputParsers_data()
QTest::addColumn<int>("messageCap"); QTest::addColumn<int>("messageCap");
QTest::addColumn<QString>("childStdOutLines"); QTest::addColumn<QString>("childStdOutLines");
QTest::addColumn<QString>("childStdErrLines"); QTest::addColumn<QString>("childStdErrLines");
QTest::addColumn<QList<ProjectExplorer::Task> >("tasks"); QTest::addColumn<QList<Task> >("tasks");
QTest::addColumn<QString>("outputLines"); QTest::addColumn<QString>("outputLines");
const Core::Id categoryCompile = Constants::TASK_CATEGORY_COMPILE; const Core::Id categoryCompile = Constants::TASK_CATEGORY_COMPILE;
const QString simplePattern = QLatin1String("^([a-z]+\\.[a-z]+):(\\d+): error: ([^\\s].+)$"); 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") QTest::newRow("empty pattern")
<< QString::fromLatin1("Sometext") << QString::fromLatin1("Sometext")
...@@ -181,7 +179,7 @@ void ProjectExplorerPlugin::testCustomOutputParsers_data() ...@@ -181,7 +179,7 @@ void ProjectExplorerPlugin::testCustomOutputParsers_data()
<< QString::fromLatin1("") << QString::fromLatin1("")
<< 1 << 2 << 3 << 1 << 2 << 3
<< QString::fromLatin1("Sometext\n") << QString() << QString::fromLatin1("Sometext\n") << QString()
<< QList<ProjectExplorer::Task>() << QList<Task>()
<< QString(); << QString();
QTest::newRow("pass-through stdout") QTest::newRow("pass-through stdout")
...@@ -190,7 +188,7 @@ void ProjectExplorerPlugin::testCustomOutputParsers_data() ...@@ -190,7 +188,7 @@ void ProjectExplorerPlugin::testCustomOutputParsers_data()
<< simplePattern << simplePattern
<< 1 << 2 << 3 << 1 << 2 << 3
<< QString::fromLatin1("Sometext\n") << QString() << QString::fromLatin1("Sometext\n") << QString()
<< QList<ProjectExplorer::Task>() << QList<Task>()
<< QString(); << QString();
QTest::newRow("pass-through stderr") QTest::newRow("pass-through stderr")
...@@ -199,7 +197,7 @@ void ProjectExplorerPlugin::testCustomOutputParsers_data() ...@@ -199,7 +197,7 @@ void ProjectExplorerPlugin::testCustomOutputParsers_data()
<< simplePattern << simplePattern
<< 1 << 2 << 3 << 1 << 2 << 3
<< QString() << QString::fromLatin1("Sometext\n") << QString() << QString::fromLatin1("Sometext\n")
<< QList<ProjectExplorer::Task>() << QList<Task>()
<< QString(); << QString();
const QString simpleError = QLatin1String("main.c:9: error: `sfasdf' undeclared (first use this function)"); const QString simpleError = QLatin1String("main.c:9: error: `sfasdf' undeclared (first use this function)");
...@@ -211,7 +209,7 @@ void ProjectExplorerPlugin::testCustomOutputParsers_data() ...@@ -211,7 +209,7 @@ void ProjectExplorerPlugin::testCustomOutputParsers_data()
<< simplePattern << simplePattern
<< 1 << 2 << 3 << 1 << 2 << 3
<< QString() << QString() << QString() << QString()
<< (QList<ProjectExplorer::Task>() << (QList<Task>()
<< Task(Task::Error, message, fileName, 9, categoryCompile) << Task(Task::Error, message, fileName, 9, categoryCompile)
) )
<< QString(); << QString();
...@@ -226,7 +224,7 @@ void ProjectExplorerPlugin::testCustomOutputParsers_data() ...@@ -226,7 +224,7 @@ void ProjectExplorerPlugin::testCustomOutputParsers_data()
<< simplePattern2 << simplePattern2
<< 1 << 2 << 3 << 1 << 2 << 3
<< QString() << QString() << QString() << QString()
<< (QList<ProjectExplorer::Task>() << (QList<Task>()
<< Task(Task::Error, message, fileName, lineNumber2, categoryCompile) << Task(Task::Error, message, fileName, lineNumber2, categoryCompile)
) )
<< QString(); << QString();
...@@ -237,7 +235,7 @@ void ProjectExplorerPlugin::testCustomOutputParsers_data() ...@@ -237,7 +235,7 @@ void ProjectExplorerPlugin::testCustomOutputParsers_data()
<< simplePattern2 << simplePattern2
<< 1 << 2 << 3 << 1 << 2 << 3
<< QString() << QString() << QString() << QString()
<< (QList<ProjectExplorer::Task>() << (QList<Task>()
<< Task(Task::Error, message, fileName, lineNumber2, categoryCompile) << Task(Task::Error, message, fileName, lineNumber2, categoryCompile)
) )
<< QString(); << QString();
...@@ -254,7 +252,7 @@ void ProjectExplorerPlugin::testCustomOutputParsers_data() ...@@ -254,7 +252,7 @@ void ProjectExplorerPlugin::testCustomOutputParsers_data()
<< unitTestPattern << unitTestPattern
<< 1 << 2 << 3 << 1 << 2 << 3
<< QString() << QString() << QString() << QString()
<< (QList<ProjectExplorer::Task>() << (QList<Task>()
<< Task(Task::Error, unitTestMessage, unitTestFileName, unitTestLineNumber, categoryCompile) << Task(Task::Error, unitTestMessage, unitTestFileName, unitTestLineNumber, categoryCompile)
) )
<< QString(); << QString();
......
...@@ -177,7 +177,7 @@ void CustomToolChain::setPredefinedMacros(const QStringList &list) ...@@ -177,7 +177,7 @@ void CustomToolChain::setPredefinedMacros(const QStringList &list)
m_predefinedMacros = 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; QList<HeaderPath> flagHeaderPaths;
foreach (const QString &cxxFlag, cxxFlags) { foreach (const QString &cxxFlag, cxxFlags) {
...@@ -251,7 +251,7 @@ void CustomToolChain::setMakeCommand(const FileName &path) ...@@ -251,7 +251,7 @@ void CustomToolChain::setMakeCommand(const FileName &path)
toolChainUpdated(); toolChainUpdated();
} }
QString CustomToolChain::makeCommand(const Utils::Environment &) const QString CustomToolChain::makeCommand(const Environment &) const
{ {
return m_makeCommand.toString(); return m_makeCommand.toString();
} }
...@@ -272,7 +272,7 @@ const QStringList &CustomToolChain::cxx11Flags() const ...@@ -272,7 +272,7 @@ const QStringList &CustomToolChain::cxx11Flags() const
void CustomToolChain::setMkspecs(const QString &specs) void CustomToolChain::setMkspecs(const QString &specs)
{ {
m_mkspecs = Utils::transform(specs.split(QLatin1Char(',')), m_mkspecs = Utils::transform(specs.split(QLatin1Char(',')),
[](QString fn) { return Utils::FileName::fromString(fn); }); [](QString fn) { return FileName::fromString(fn); });
} }
QString CustomToolChain::mkspecs() const QString CustomToolChain::mkspecs() const
...@@ -585,7 +585,7 @@ void CustomToolChainConfigWidget::setFromToolchain() ...@@ -585,7 +585,7 @@ void CustomToolChainConfigWidget::setFromToolchain()
bool blocked = blockSignals(true); bool blocked = blockSignals(true);
CustomToolChain *tc = static_cast<CustomToolChain *>(toolChain()); CustomToolChain *tc = static_cast<CustomToolChain *>(toolChain());
m_compilerCommand->setFileName(tc->compilerCommand()); 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_abiWidget->setAbis(QList<Abi>(), tc->targetAbi());
m_predefinedMacros->setPlainText(tc->rawPredefinedMacros().join(QLatin1Char('\n'))); m_predefinedMacros->setPlainText(tc->rawPredefinedMacros().join(QLatin1Char('\n')));
m_headerPaths->setPlainText(tc->headerPathsList().join(QLatin1Char('\n'))); m_headerPaths->setPlainText(tc->headerPathsList().join(QLatin1Char('\n')));
...@@ -601,7 +601,7 @@ bool CustomToolChainConfigWidget::isDirtyImpl() const ...@@ -601,7 +601,7 @@ bool CustomToolChainConfigWidget::isDirtyImpl() const
CustomToolChain *tc = static_cast<CustomToolChain *>(toolChain()); CustomToolChain *tc = static_cast<CustomToolChain *>(toolChain());
Q_ASSERT(tc); Q_ASSERT(tc);
return m_compilerCommand->fileName() != tc->compilerCommand() 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_abiWidget->currentAbi() != tc->targetAbi()
|| m_predefinedDetails->entries() != tc->rawPredefinedMacros() || m_predefinedDetails->entries() != tc->rawPredefinedMacros()
|| m_headerDetails->entries() != tc->headerPathsList() || m_headerDetails->entries() != tc->headerPathsList()
......
...@@ -114,7 +114,7 @@ public: ...@@ -114,7 +114,7 @@ public:
QLabel *kitLabel; QLabel *kitLabel;
KitChooser *kitChooser; KitChooser *kitChooser;
Utils::TreeView *procView; TreeView *procView;
QTextBrowser *errorText; QTextBrowser *errorText;
FancyLineEdit *processFilterLineEdit; FancyLineEdit *processFilterLineEdit;
QPushButton *updateListButton; QPushButton *updateListButton;
...@@ -144,7 +144,7 @@ DeviceProcessesDialogPrivate::DeviceProcessesDialogPrivate(KitChooser *chooser, ...@@ -144,7 +144,7 @@ DeviceProcessesDialogPrivate::DeviceProcessesDialogPrivate(KitChooser *chooser,
kitChooser->populate(); kitChooser->populate();
procView = new Utils::TreeView(q); procView = new TreeView(q);
procView->setModel(&proxyModel); procView->setModel(&proxyModel);
procView->setSelectionBehavior(QAbstractItemView::SelectRows); procView->setSelectionBehavior(QAbstractItemView::SelectRows);
procView->setSelectionMode(QAbstractItemView::SingleSelection); procView->setSelectionMode(QAbstractItemView::SingleSelection);
...@@ -155,7 +155,7 @@ DeviceProcessesDialogPrivate::DeviceProcessesDialogPrivate(KitChooser *chooser, ...@@ -155,7 +155,7 @@ DeviceProcessesDialogPrivate::DeviceProcessesDialogPrivate(KitChooser *chooser,
procView->header()->setDefaultSectionSize(100); procView->header()->setDefaultSectionSize(100);
procView->header()->setStretchLastSection(true); procView->header()->setStretchLastSection(true);
procView->sortByColumn(1, Qt::AscendingOrder); procView->sortByColumn(1, Qt::AscendingOrder);
procView->setActivationMode(Utils::DoubleClickActivation); procView->setActivationMode(DoubleClickActivation);
errorText = new QTextBrowser(q); errorText = new QTextBrowser(q);
......
...@@ -124,7 +124,7 @@ void DeviceSettingsWidget::initGui() ...@@ -124,7 +124,7 @@ void DeviceSettingsWidget::initGui()
m_ui->addConfigButton->setEnabled(hasDeviceFactories); m_ui->addConfigButton->setEnabled(hasDeviceFactories);
int lastIndex = Core::ICore::settings() int lastIndex = ICore::settings()
->value(QLatin1String(LastDeviceIndexKey), 0).toInt(); ->value(QLatin1String(LastDeviceIndexKey), 0).toInt();
if (lastIndex == -1) if (lastIndex == -1)
lastIndex = 0; lastIndex = 0;
...@@ -143,7 +143,7 @@ void DeviceSettingsWidget::addDevice() ...@@ -143,7 +143,7 @@ void DeviceSettingsWidget::addDevice()
if (d.exec() != QDialog::Accepted) if (d.exec() != QDialog::Accepted)
return; return;
Core::Id toCreate = d.selectedId(); Id toCreate = d.selectedId();
if (!toCreate.isValid()) if (!toCreate.isValid())
return; return;
IDeviceFactory *factory = IDeviceFactory::find(toCreate); IDeviceFactory *factory = IDeviceFactory::find(toCreate);
...@@ -221,7 +221,7 @@ void DeviceSettingsWidget::updateDeviceFromUi() ...@@ -221,7 +221,7 @@ void DeviceSettingsWidget::updateDeviceFromUi()
void DeviceSettingsWidget::saveSettings() void DeviceSettingsWidget::saveSettings()
{ {
Core::ICore::settings()->setValue(QLatin1String(LastDeviceIndexKey), currentIndex()); ICore::settings()->setValue(QLatin1String(LastDeviceIndexKey), currentIndex());
DeviceManager::replaceInstance(); DeviceManager::replaceInstance();
} }
...@@ -299,7 +299,7 @@ void DeviceSettingsWidget::currentDeviceChanged(int index) ...@@ -299,7 +299,7 @@ void DeviceSettingsWidget::currentDeviceChanged(int index)
m_ui->buttonsLayout->insertWidget(m_ui->buttonsLayout->count() - 1, button); 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)); QPushButton * const button = new QPushButton(device->displayNameForActionId(actionId));
m_additionalActionButtons << button; m_additionalActionButtons << button;
connect(button, SIGNAL(clicked()), m_additionalActionsMapper, SLOT(map())); connect(button, SIGNAL(clicked()), m_additionalActionsMapper, SLOT(map()));
...@@ -327,7 +327,7 @@ void DeviceSettingsWidget::handleAdditionalActionRequest(int actionId) ...@@ -327,7 +327,7 @@ void DeviceSettingsWidget::handleAdditionalActionRequest(int actionId)
const IDevice::Ptr device = m_deviceManager->mutableDevice(currentDevice()->id()); const IDevice::Ptr device = m_deviceManager->mutableDevice(currentDevice()->id());
QTC_ASSERT(device, return); QTC_ASSERT(device, return);
updateDeviceFromUi(); 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. // Widget must be set up from scratch, because the action could have changed random attributes.
currentDeviceChanged(currentIndex()); currentDeviceChanged(currentIndex());
......
...@@ -51,7 +51,7 @@ static const int MARGIN = 12; ...@@ -51,7 +51,7 @@ static const int MARGIN = 12;
static const int OTHER_HEIGHT = 38; static const int OTHER_HEIGHT = 38;
static const int SELECTION_IMAGE_WIDTH = 10; static const int SELECTION_IMAGE_WIDTH = 10;
static const int SELECTION_IMAGE_HEIGHT = 20; 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) static void drawFirstLevelSeparator(QPainter *painter, QPoint top, QPoint bottom)
{ {
...@@ -170,7 +170,7 @@ void DoubleTabWidget::setTitle(const QString &title) ...@@ -170,7 +170,7 @@ void DoubleTabWidget::setTitle(const QString &title)
QSize DoubleTabWidget::minimumSizeHint() const QSize DoubleTabWidget::minimumSizeHint() const
{ {
return QSize(0,