Commit a22d8bca authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

QbsPM: Use Qt5-style connects

The heavy lifting was done by clazy.

Change-Id: I841454b0815bc697ae2372dbc6d2caa59d7dc3e8
Reviewed-by: default avatarChristian Kandeler <christian.kandeler@theqtcompany.com>
parent 76781b40
...@@ -51,10 +51,12 @@ CustomQbsPropertiesDialog::CustomQbsPropertiesDialog(const QVariantMap &properti ...@@ -51,10 +51,12 @@ CustomQbsPropertiesDialog::CustomQbsPropertiesDialog(const QVariantMap &properti
m_ui->propertiesTable->setItem(currentRow, 1, valueItem); m_ui->propertiesTable->setItem(currentRow, 1, valueItem);
++currentRow; ++currentRow;
} }
connect(m_ui->addButton, SIGNAL(clicked()), SLOT(addProperty())); connect(m_ui->addButton, &QAbstractButton::clicked,
connect(m_ui->removeButton, SIGNAL(clicked()), SLOT(removeSelectedProperty())); this, &CustomQbsPropertiesDialog::addProperty);
connect(m_ui->propertiesTable, SIGNAL(currentItemChanged(QTableWidgetItem*,QTableWidgetItem*)), connect(m_ui->removeButton, &QAbstractButton::clicked,
SLOT(handleCurrentItemChanged())); this, &CustomQbsPropertiesDialog::removeSelectedProperty);
connect(m_ui->propertiesTable, &QTableWidget::currentItemChanged,
this, &CustomQbsPropertiesDialog::handleCurrentItemChanged);
handleCurrentItemChanged(); handleCurrentItemChanged();
} }
......
...@@ -42,7 +42,7 @@ public: ...@@ -42,7 +42,7 @@ public:
QVariantMap properties() const; QVariantMap properties() const;
~CustomQbsPropertiesDialog(); ~CustomQbsPropertiesDialog();
private slots: private:
void addProperty(); void addProperty();
void removeSelectedProperty(); void removeSelectedProperty();
void handleCurrentItemChanged(); void handleCurrentItemChanged();
......
...@@ -86,10 +86,9 @@ protected: ...@@ -86,10 +86,9 @@ protected:
QbsBuildConfiguration(ProjectExplorer::Target *target, Core::Id id); QbsBuildConfiguration(ProjectExplorer::Target *target, Core::Id id);
bool fromMap(const QVariantMap &map) override; bool fromMap(const QVariantMap &map) override;
private slots: private:
void buildStepInserted(int pos); void buildStepInserted(int pos);
private:
static QbsBuildConfiguration *setup(ProjectExplorer::Target *t, static QbsBuildConfiguration *setup(ProjectExplorer::Target *t,
const QString &defaultDisplayName, const QString &defaultDisplayName,
const QString &displayName, const QString &displayName,
......
...@@ -43,7 +43,7 @@ class QbsBuildConfigurationWidget : public ProjectExplorer::NamedWidget ...@@ -43,7 +43,7 @@ class QbsBuildConfigurationWidget : public ProjectExplorer::NamedWidget
public: public:
QbsBuildConfigurationWidget(Internal::QbsBuildConfiguration *bc); QbsBuildConfigurationWidget(Internal::QbsBuildConfiguration *bc);
private slots: private:
void buildDirEdited(); void buildDirEdited();
// Changes triggered from creator // Changes triggered from creator
......
...@@ -112,8 +112,10 @@ bool QbsBuildStep::init(QList<const BuildStep *> &earlierSteps) ...@@ -112,8 +112,10 @@ bool QbsBuildStep::init(QList<const BuildStep *> &earlierSteps)
m_activeFileTags = bc->activeFileTags(); m_activeFileTags = bc->activeFileTags();
m_products = bc->products(); m_products = bc->products();
connect(m_parser, SIGNAL(addOutput(QString,ProjectExplorer::BuildStep::OutputFormat)), connect(m_parser, &ProjectExplorer::IOutputParser::addOutput,
this, SIGNAL(addOutput(QString,ProjectExplorer::BuildStep::OutputFormat))); this, [this](const QString &string, ProjectExplorer::BuildStep::OutputFormat format) {
emit addOutput(string, format);
});
connect(m_parser, &ProjectExplorer::IOutputParser::addTask, this, &QbsBuildStep::addTask); connect(m_parser, &ProjectExplorer::IOutputParser::addTask, this, &QbsBuildStep::addTask);
return true; return true;
...@@ -259,7 +261,7 @@ void QbsBuildStep::buildingDone(bool success) ...@@ -259,7 +261,7 @@ void QbsBuildStep::buildingDone(bool success)
void QbsBuildStep::reparsingDone(bool success) void QbsBuildStep::reparsingDone(bool success)
{ {
disconnect(qbsProject(), SIGNAL(projectParsingDone(bool)), this, SLOT(reparsingDone(bool))); disconnect(qbsProject(), &QbsProject::projectParsingDone, this, &QbsBuildStep::reparsingDone);
m_parsingProject = false; m_parsingProject = false;
if (m_job) { // This was a scheduled reparsing after building. if (m_job) { // This was a scheduled reparsing after building.
finish(); finish();
...@@ -398,7 +400,7 @@ void QbsBuildStep::setCleanInstallRoot(bool clean) ...@@ -398,7 +400,7 @@ void QbsBuildStep::setCleanInstallRoot(bool clean)
void QbsBuildStep::parseProject() void QbsBuildStep::parseProject()
{ {
m_parsingProject = true; m_parsingProject = true;
connect(qbsProject(), SIGNAL(projectParsingDone(bool)), SLOT(reparsingDone(bool))); connect(qbsProject(), &QbsProject::projectParsingDone, this, &QbsBuildStep::reparsingDone);
qbsProject()->parseCurrentBuildConfiguration(); qbsProject()->parseCurrentBuildConfiguration();
} }
...@@ -419,15 +421,15 @@ void QbsBuildStep::build() ...@@ -419,15 +421,15 @@ void QbsBuildStep::build()
m_progressBase = 0; m_progressBase = 0;
connect(m_job, SIGNAL(finished(bool,qbs::AbstractJob*)), this, SLOT(buildingDone(bool))); connect(m_job, &qbs::AbstractJob::finished, this, &QbsBuildStep::buildingDone);
connect(m_job, SIGNAL(taskStarted(QString,int,qbs::AbstractJob*)), connect(m_job, &qbs::AbstractJob::taskStarted,
this, SLOT(handleTaskStarted(QString,int))); this, &QbsBuildStep::handleTaskStarted);
connect(m_job, SIGNAL(taskProgress(int,qbs::AbstractJob*)), connect(m_job, &qbs::AbstractJob::taskProgress,
this, SLOT(handleProgress(int))); this, &QbsBuildStep::handleProgress);
connect(m_job, SIGNAL(reportCommandDescription(QString,QString)), connect(m_job, &qbs::BuildJob::reportCommandDescription,
this, SLOT(handleCommandDescriptionReport(QString,QString))); this, &QbsBuildStep::handleCommandDescriptionReport);
connect(m_job, SIGNAL(reportProcessResult(qbs::ProcessResult)), connect(m_job, &qbs::BuildJob::reportProcessResult,
this, SLOT(handleProcessResultReport(qbs::ProcessResult))); this, &QbsBuildStep::handleProcessResultReport);
} }
...@@ -455,9 +457,12 @@ QbsBuildStepConfigWidget::QbsBuildStepConfigWidget(QbsBuildStep *step) : ...@@ -455,9 +457,12 @@ QbsBuildStepConfigWidget::QbsBuildStepConfigWidget(QbsBuildStep *step) :
m_step(step), m_step(step),
m_ignoreChange(false) m_ignoreChange(false)
{ {
connect(m_step, SIGNAL(displayNameChanged()), this, SLOT(updateState())); connect(m_step, &ProjectExplorer::ProjectConfiguration::displayNameChanged,
connect(m_step, SIGNAL(qbsConfigurationChanged()), this, SLOT(updateState())); this, &QbsBuildStepConfigWidget::updateState);
connect(m_step, SIGNAL(qbsBuildOptionsChanged()), this, SLOT(updateState())); connect(m_step, &QbsBuildStep::qbsConfigurationChanged,
this, &QbsBuildStepConfigWidget::updateState);
connect(m_step, &QbsBuildStep::qbsBuildOptionsChanged,
this, &QbsBuildStepConfigWidget::updateState);
connect(&QbsProjectManagerSettings::instance(), &QbsProjectManagerSettings::settingsBaseChanged, connect(&QbsProjectManagerSettings::instance(), &QbsProjectManagerSettings::settingsBaseChanged,
this, &QbsBuildStepConfigWidget::updateState); this, &QbsBuildStepConfigWidget::updateState);
connect(step->buildConfiguration()->target(), &ProjectExplorer::Target::buildDirectoryChanged, connect(step->buildConfiguration()->target(), &ProjectExplorer::Target::buildDirectoryChanged,
...@@ -474,10 +479,13 @@ QbsBuildStepConfigWidget::QbsBuildStepConfigWidget(QbsBuildStep *step) : ...@@ -474,10 +479,13 @@ QbsBuildStepConfigWidget::QbsBuildStepConfigWidget(QbsBuildStep *step) :
}); });
m_ui->qmlDebuggingWarningText->setPixmap(Core::Icons::WARNING.pixmap()); m_ui->qmlDebuggingWarningText->setPixmap(Core::Icons::WARNING.pixmap());
connect(m_ui->buildVariantComboBox, SIGNAL(currentIndexChanged(int)), connect(m_ui->buildVariantComboBox,
this, SLOT(changeBuildVariant(int))); static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
connect(m_ui->keepGoingCheckBox, SIGNAL(toggled(bool)), this, SLOT(changeKeepGoing(bool))); this, &QbsBuildStepConfigWidget::changeBuildVariant);
connect(m_ui->jobSpinBox, SIGNAL(valueChanged(int)), this, SLOT(changeJobCount(int))); connect(m_ui->keepGoingCheckBox, &QAbstractButton::toggled,
this, &QbsBuildStepConfigWidget::changeKeepGoing);
connect(m_ui->jobSpinBox, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged),
this, &QbsBuildStepConfigWidget::changeJobCount);
connect(m_ui->showCommandLinesCheckBox, &QCheckBox::toggled, this, connect(m_ui->showCommandLinesCheckBox, &QCheckBox::toggled, this,
&QbsBuildStepConfigWidget::changeShowCommandLines); &QbsBuildStepConfigWidget::changeShowCommandLines);
connect(m_ui->installCheckBox, &QCheckBox::toggled, this, connect(m_ui->installCheckBox, &QCheckBox::toggled, this,
...@@ -486,10 +494,10 @@ QbsBuildStepConfigWidget::QbsBuildStepConfigWidget(QbsBuildStep *step) : ...@@ -486,10 +494,10 @@ QbsBuildStepConfigWidget::QbsBuildStepConfigWidget(QbsBuildStep *step) :
&QbsBuildStepConfigWidget::changeCleanInstallRoot); &QbsBuildStepConfigWidget::changeCleanInstallRoot);
connect(m_ui->forceProbesCheckBox, &QCheckBox::toggled, this, connect(m_ui->forceProbesCheckBox, &QCheckBox::toggled, this,
&QbsBuildStepConfigWidget::changeForceProbes); &QbsBuildStepConfigWidget::changeForceProbes);
connect(m_ui->qmlDebuggingLibraryCheckBox, SIGNAL(toggled(bool)), connect(m_ui->qmlDebuggingLibraryCheckBox, &QAbstractButton::toggled,
this, SLOT(linkQmlDebuggingLibraryChecked(bool))); this, &QbsBuildStepConfigWidget::linkQmlDebuggingLibraryChecked);
connect(QtSupport::QtVersionManager::instance(), SIGNAL(dumpUpdatedFor(Utils::FileName)), connect(QtSupport::QtVersionManager::instance(), &QtSupport::QtVersionManager::dumpUpdatedFor,
this, SLOT(updateQmlDebuggingOption())); this, &QbsBuildStepConfigWidget::updateQmlDebuggingOption);
updateState(); updateState();
} }
......
...@@ -80,7 +80,7 @@ signals: ...@@ -80,7 +80,7 @@ signals:
void qbsConfigurationChanged(); void qbsConfigurationChanged();
void qbsBuildOptionsChanged(); void qbsBuildOptionsChanged();
private slots: private:
void buildingDone(bool success); void buildingDone(bool success);
void reparsingDone(bool success); void reparsingDone(bool success);
void handleTaskStarted(const QString &desciption, int max); void handleTaskStarted(const QString &desciption, int max);
...@@ -88,7 +88,6 @@ private slots: ...@@ -88,7 +88,6 @@ private slots:
void handleCommandDescriptionReport(const QString &highlight, const QString &message); void handleCommandDescriptionReport(const QString &highlight, const QString &message);
void handleProcessResultReport(const qbs::ProcessResult &result); void handleProcessResultReport(const qbs::ProcessResult &result);
private:
void createTaskAndOutput(ProjectExplorer::Task::TaskType type, void createTaskAndOutput(ProjectExplorer::Task::TaskType type,
const QString &message, const QString &file, int line); const QString &message, const QString &file, int line);
...@@ -137,7 +136,7 @@ public: ...@@ -137,7 +136,7 @@ public:
QString summaryText() const; QString summaryText() const;
QString displayName() const; QString displayName() const;
private slots: private:
void updateState(); void updateState();
void updateQmlDebuggingOption(); void updateQmlDebuggingOption();
void updatePropertyEdit(const QVariantMap &data); void updatePropertyEdit(const QVariantMap &data);
...@@ -154,7 +153,6 @@ private slots: ...@@ -154,7 +153,6 @@ private slots:
// QML debugging: // QML debugging:
void linkQmlDebuggingLibraryChecked(bool checked); void linkQmlDebuggingLibraryChecked(bool checked);
private:
bool validateProperties(Utils::FancyLineEdit *edit, QString *errorMessage); bool validateProperties(Utils::FancyLineEdit *edit, QString *errorMessage);
Ui::QbsBuildStepConfigWidget *m_ui; Ui::QbsBuildStepConfigWidget *m_ui;
......
...@@ -106,11 +106,11 @@ void QbsCleanStep::run(QFutureInterface<bool> &fi) ...@@ -106,11 +106,11 @@ void QbsCleanStep::run(QFutureInterface<bool> &fi)
m_progressBase = 0; m_progressBase = 0;
connect(m_job, SIGNAL(finished(bool,qbs::AbstractJob*)), this, SLOT(cleaningDone(bool))); connect(m_job, &qbs::AbstractJob::finished, this, &QbsCleanStep::cleaningDone);
connect(m_job, SIGNAL(taskStarted(QString,int,qbs::AbstractJob*)), connect(m_job, &qbs::AbstractJob::taskStarted,
this, SLOT(handleTaskStarted(QString,int))); this, &QbsCleanStep::handleTaskStarted);
connect(m_job, SIGNAL(taskProgress(int,qbs::AbstractJob*)), connect(m_job, &qbs::AbstractJob::taskProgress,
this, SLOT(handleProgress(int))); this, &QbsCleanStep::handleProgress);
} }
ProjectExplorer::BuildStepConfigWidget *QbsCleanStep::createConfigWidget() ProjectExplorer::BuildStepConfigWidget *QbsCleanStep::createConfigWidget()
...@@ -233,16 +233,20 @@ void QbsCleanStep::setMaxJobs(int jobcount) ...@@ -233,16 +233,20 @@ void QbsCleanStep::setMaxJobs(int jobcount)
QbsCleanStepConfigWidget::QbsCleanStepConfigWidget(QbsCleanStep *step) : QbsCleanStepConfigWidget::QbsCleanStepConfigWidget(QbsCleanStep *step) :
m_step(step) m_step(step)
{ {
connect(m_step, SIGNAL(displayNameChanged()), this, SLOT(updateState())); connect(m_step, &ProjectExplorer::ProjectConfiguration::displayNameChanged,
connect(m_step, SIGNAL(changed()), this, SLOT(updateState())); this, &QbsCleanStepConfigWidget::updateState);
connect(m_step, &QbsCleanStep::changed,
this, &QbsCleanStepConfigWidget::updateState);
setContentsMargins(0, 0, 0, 0); setContentsMargins(0, 0, 0, 0);
m_ui = new Ui::QbsCleanStepConfigWidget; m_ui = new Ui::QbsCleanStepConfigWidget;
m_ui->setupUi(this); m_ui->setupUi(this);
connect(m_ui->dryRunCheckBox, SIGNAL(toggled(bool)), this, SLOT(changeDryRun(bool))); connect(m_ui->dryRunCheckBox, &QAbstractButton::toggled,
connect(m_ui->keepGoingCheckBox, SIGNAL(toggled(bool)), this, SLOT(changeKeepGoing(bool))); this, &QbsCleanStepConfigWidget::changeDryRun);
connect(m_ui->keepGoingCheckBox, &QAbstractButton::toggled,
this, &QbsCleanStepConfigWidget::changeKeepGoing);
updateState(); updateState();
} }
......
...@@ -65,12 +65,11 @@ public: ...@@ -65,12 +65,11 @@ public:
signals: signals:
void changed(); void changed();
private slots: private:
void cleaningDone(bool success); void cleaningDone(bool success);
void handleTaskStarted(const QString &desciption, int max); void handleTaskStarted(const QString &desciption, int max);
void handleProgress(int value); void handleProgress(int value);
private:
void createTaskAndOutput(ProjectExplorer::Task::TaskType type, void createTaskAndOutput(ProjectExplorer::Task::TaskType type,
const QString &message, const QString &file, int line); const QString &message, const QString &file, int line);
...@@ -100,14 +99,13 @@ public: ...@@ -100,14 +99,13 @@ public:
QString summaryText() const; QString summaryText() const;
QString displayName() const; QString displayName() const;
private slots: private:
void updateState(); void updateState();
void changeDryRun(bool dr); void changeDryRun(bool dr);
void changeKeepGoing(bool kg); void changeKeepGoing(bool kg);
void changeJobCount(int jobcount); void changeJobCount(int jobcount);
private:
Ui::QbsCleanStepConfigWidget *m_ui; Ui::QbsCleanStepConfigWidget *m_ui;
QbsCleanStep *m_step; QbsCleanStep *m_step;
......
...@@ -99,11 +99,11 @@ void QbsInstallStep::run(QFutureInterface<bool> &fi) ...@@ -99,11 +99,11 @@ void QbsInstallStep::run(QFutureInterface<bool> &fi)
m_progressBase = 0; m_progressBase = 0;
connect(m_job, SIGNAL(finished(bool,qbs::AbstractJob*)), this, SLOT(installDone(bool))); connect(m_job, &qbs::AbstractJob::finished, this, &QbsInstallStep::installDone);
connect(m_job, SIGNAL(taskStarted(QString,int,qbs::AbstractJob*)), connect(m_job, &qbs::AbstractJob::taskStarted,
this, SLOT(handleTaskStarted(QString,int))); this, &QbsInstallStep::handleTaskStarted);
connect(m_job, SIGNAL(taskProgress(int,qbs::AbstractJob*)), connect(m_job, &qbs::AbstractJob::taskProgress,
this, SLOT(handleProgress(int))); this, &QbsInstallStep::handleProgress);
} }
ProjectExplorer::BuildStepConfigWidget *QbsInstallStep::createConfigWidget() ProjectExplorer::BuildStepConfigWidget *QbsInstallStep::createConfigWidget()
...@@ -261,8 +261,10 @@ void QbsInstallStep::setKeepGoing(bool kg) ...@@ -261,8 +261,10 @@ void QbsInstallStep::setKeepGoing(bool kg)
QbsInstallStepConfigWidget::QbsInstallStepConfigWidget(QbsInstallStep *step) : QbsInstallStepConfigWidget::QbsInstallStepConfigWidget(QbsInstallStep *step) :
m_step(step), m_ignoreChange(false) m_step(step), m_ignoreChange(false)
{ {
connect(m_step, SIGNAL(displayNameChanged()), this, SLOT(updateState())); connect(m_step, &ProjectExplorer::ProjectConfiguration::displayNameChanged,
connect(m_step, SIGNAL(changed()), this, SLOT(updateState())); this, &QbsInstallStepConfigWidget::updateState);
connect(m_step, &QbsInstallStep::changed,
this, &QbsInstallStepConfigWidget::updateState);
setContentsMargins(0, 0, 0, 0); setContentsMargins(0, 0, 0, 0);
...@@ -275,13 +277,17 @@ QbsInstallStepConfigWidget::QbsInstallStepConfigWidget(QbsInstallStep *step) : ...@@ -275,13 +277,17 @@ QbsInstallStepConfigWidget::QbsInstallStepConfigWidget(QbsInstallStep *step) :
m_ui->installRootChooser->setExpectedKind(Utils::PathChooser::Directory); m_ui->installRootChooser->setExpectedKind(Utils::PathChooser::Directory);
m_ui->installRootChooser->setHistoryCompleter(QLatin1String("Qbs.InstallRoot.History")); m_ui->installRootChooser->setHistoryCompleter(QLatin1String("Qbs.InstallRoot.History"));
connect(m_ui->installRootChooser, SIGNAL(rawPathChanged(QString)), this, connect(m_ui->installRootChooser, &Utils::PathChooser::rawPathChanged, this,
SLOT(changeInstallRoot())); &QbsInstallStepConfigWidget::changeInstallRoot);
connect(m_ui->removeFirstCheckBox, SIGNAL(toggled(bool)), this, SLOT(changeRemoveFirst(bool))); connect(m_ui->removeFirstCheckBox, &QAbstractButton::toggled,
connect(m_ui->dryRunCheckBox, SIGNAL(toggled(bool)), this, SLOT(changeDryRun(bool))); this, &QbsInstallStepConfigWidget::changeRemoveFirst);
connect(m_ui->keepGoingCheckBox, SIGNAL(toggled(bool)), this, SLOT(changeKeepGoing(bool))); connect(m_ui->dryRunCheckBox, &QAbstractButton::toggled,
this, &QbsInstallStepConfigWidget::changeDryRun);
connect(project, SIGNAL(projectParsingDone(bool)), this, SLOT(updateState())); connect(m_ui->keepGoingCheckBox, &QAbstractButton::toggled,
this, &QbsInstallStepConfigWidget::changeKeepGoing);
connect(project, &QbsProject::projectParsingDone,
this, &QbsInstallStepConfigWidget::updateState);
updateState(); updateState();
} }
......
...@@ -68,12 +68,11 @@ public: ...@@ -68,12 +68,11 @@ public:
signals: signals:
void changed(); void changed();
private slots: private:
void installDone(bool success); void installDone(bool success);
void handleTaskStarted(const QString &desciption, int max); void handleTaskStarted(const QString &desciption, int max);
void handleProgress(int value); void handleProgress(int value);
private:
void createTaskAndOutput(ProjectExplorer::Task::TaskType type, void createTaskAndOutput(ProjectExplorer::Task::TaskType type,
const QString &message, const QString &file, int line); const QString &message, const QString &file, int line);
...@@ -104,7 +103,7 @@ public: ...@@ -104,7 +103,7 @@ public:
QString summaryText() const; QString summaryText() const;
QString displayName() const; QString displayName() const;
private slots: private:
void updateState(); void updateState();
void changeInstallRoot(); void changeInstallRoot();
......
...@@ -36,6 +36,8 @@ ...@@ -36,6 +36,8 @@
#include <QMutexLocker> #include <QMutexLocker>
#include <QTimer> #include <QTimer>
using namespace ProjectExplorer;
namespace QbsProjectManager { namespace QbsProjectManager {
namespace Internal { namespace Internal {
...@@ -45,9 +47,9 @@ namespace Internal { ...@@ -45,9 +47,9 @@ namespace Internal {
QbsLogSink::QbsLogSink(QObject *parent) : QObject(parent) QbsLogSink::QbsLogSink(QObject *parent) : QObject(parent)
{ {
connect(this, SIGNAL(newTask(ProjectExplorer::Task)), connect(this, &QbsLogSink::newTask,
ProjectExplorer::TaskHub::instance(), TaskHub::instance(),
SLOT(addTask(ProjectExplorer::Task)), Qt::QueuedConnection); [](const Task &task) { TaskHub::addTask(task); }, Qt::QueuedConnection);
} }
void QbsLogSink::sendMessages() void QbsLogSink::sendMessages()
...@@ -66,11 +68,11 @@ void QbsLogSink::sendMessages() ...@@ -66,11 +68,11 @@ void QbsLogSink::sendMessages()
void QbsLogSink::doPrintWarning(const qbs::ErrorInfo &warning) void QbsLogSink::doPrintWarning(const qbs::ErrorInfo &warning)
{ {
foreach (const qbs::ErrorItem &item, warning.items()) foreach (const qbs::ErrorItem &item, warning.items())
emit newTask(ProjectExplorer::Task(ProjectExplorer::Task::Warning, emit newTask(Task(Task::Warning,
item.description(), item.description(),
Utils::FileName::fromString(item.codeLocation().filePath()), Utils::FileName::fromString(item.codeLocation().filePath()),
item.codeLocation().line(), item.codeLocation().line(),
ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)); Constants::TASK_CATEGORY_BUILDSYSTEM));
} }
void QbsLogSink::doPrintMessage(qbs::LoggerLevel level, const QString &message, const QString &tag) void QbsLogSink::doPrintMessage(qbs::LoggerLevel level, const QString &message, const QString &tag)
......
...@@ -45,10 +45,9 @@ public: ...@@ -45,10 +45,9 @@ public:
signals: signals:
void newTask(const ProjectExplorer::Task &task); void newTask(const ProjectExplorer::Task &task);
private slots:
void sendMessages();
private: private:
Q_INVOKABLE void sendMessages();
void doPrintWarning(const qbs::ErrorInfo &warning); void doPrintWarning(const qbs::ErrorInfo &warning);
void doPrintMessage(qbs::LoggerLevel level, const QString &message, const QString &tag); void doPrintMessage(qbs::LoggerLevel level, const QString &message, const QString &tag);
......
...@@ -41,12 +41,10 @@ class QbsParser : public ProjectExplorer::IOutputParser ...@@ -41,12 +41,10 @@ class QbsParser : public ProjectExplorer::IOutputParser
public: public:
explicit QbsParser(); explicit QbsParser();
private:
void setWorkingDirectory(const QString &workingDirectory); void setWorkingDirectory(const QString &workingDirectory);
public slots:
void taskAdded(const ProjectExplorer::Task &task, int linkedLines, int skipLines); void taskAdded(const ProjectExplorer::Task &task, int linkedLines, int skipLines);
private:
QDir m_workingDirectory; QDir m_workingDirectory;
}; };
......
...@@ -54,12 +54,10 @@ public: ...@@ -54,12 +54,10 @@ public:
void apply(); void apply();
private slots: private:
void refreshKitsList(); void refreshKitsList();
void displayCurrentProfile(); void displayCurrentProfile();
void editProfile(); void editProfile();
private:
void setupCustomProperties(const ProjectExplorer::Kit *kit); void setupCustomProperties(const ProjectExplorer::Kit *kit);
void mergeCustomPropertiesIntoModel(); void mergeCustomPropertiesIntoModel();
...@@ -123,9 +121,12 @@ QbsProfilesSettingsWidget::QbsProfilesSettingsWidget(QWidget *parent) ...@@ -123,9 +121,12 @@ QbsProfilesSettingsWidget::QbsProfilesSettingsWidget(QWidget *parent)
m_model.updateSettingsDir(QbsProjectManagerSettings::qbsSettingsBaseDir()); m_model.updateSettingsDir(QbsProjectManagerSettings::qbsSettingsBaseDir());
displayCurrentProfile(); displayCurrentProfile();
}); });
connect(m_ui.expandButton, SIGNAL(clicked()), m_ui.propertiesView, SLOT(expandAll())); connect(m_ui.expandButton, &QAbstractButton::clicked,
connect(m_ui.collapseButton, SIGNAL(clicked()), m_ui.propertiesView, SLOT(collapseAll())); m_ui.propertiesView, &QTreeView::expandAll);
connect(m_ui.editButton, SIGNAL(clicked()), SLOT(editProfile())); connect(m_ui.collapseButton, &QAbstractButton::clicked,
m_ui.propertiesView, &QTreeView::collapseAll);
connect(m_ui.editButton, &QAbstractButton::clicked,
this, &QbsProfilesSettingsWidget::editProfile);
refreshKitsList(); refreshKitsList();
} }
...@@ -175,7 +176,9 @@ void QbsProfilesSettingsWidget::refreshKitsList() ...@@ -175,7 +176,9 @@ void QbsProfilesSettingsWidget::refreshKitsList()
else if (hasKits)