forked from qt-creator/qt-creator
ProjectExplorer: Modernize
* Use override where appropriate * Use pragma once * Make more constructors explicit Change-Id: I2865fe10f288e3de570826058e43b70a0cb4ee37 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -544,10 +544,10 @@ static std::function<bool(const Kit *)> cdbMatcher(char wordWidth = 0)
|
||||
static Kit *findUniversalCdbKit()
|
||||
{
|
||||
if (Utils::is64BitWindowsSystem()) {
|
||||
if (Kit *cdb64Kit = KitManager::find(cdbMatcher(64)))
|
||||
if (Kit *cdb64Kit = KitManager::find(KitMatcher(cdbMatcher(64))))
|
||||
return cdb64Kit;
|
||||
}
|
||||
return KitManager::find(cdbMatcher());
|
||||
return KitManager::find(KitMatcher(cdbMatcher()));
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -367,20 +367,20 @@ void DebuggerRunControlCreator::enrich(const RunConfiguration *runConfig, const
|
||||
|
||||
if (!abis.isEmpty()) {
|
||||
// Try exact abis.
|
||||
m_kit = KitManager::find(std::function<bool (const Kit *)>([abis](const Kit *k) -> bool {
|
||||
m_kit = KitManager::find(KitMatcher(std::function<bool (const Kit *)>([abis](const Kit *k) -> bool {
|
||||
if (const ToolChain *tc = ToolChainKitInformation::toolChain(k))
|
||||
return abis.contains(tc->targetAbi()) && DebuggerKitInformation::isValidDebugger(k);
|
||||
return false;
|
||||
}));
|
||||
})));
|
||||
if (!m_kit) {
|
||||
// Or something compatible.
|
||||
m_kit = KitManager::find(std::function<bool (const Kit *)>([abis](const Kit *k) -> bool {
|
||||
m_kit = KitManager::find(KitMatcher(std::function<bool (const Kit *)>([abis](const Kit *k) -> bool {
|
||||
if (const ToolChain *tc = ToolChainKitInformation::toolChain(k))
|
||||
foreach (const Abi &a, abis)
|
||||
if (a.isCompatibleWith(tc->targetAbi()) && DebuggerKitInformation::isValidDebugger(k))
|
||||
return true;
|
||||
return false;
|
||||
}));
|
||||
})));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef PROJECTEXPLORER_ABI_H
|
||||
#define PROJECTEXPLORER_ABI_H
|
||||
#pragma once
|
||||
|
||||
#include "projectexplorer_export.h"
|
||||
|
||||
@@ -156,6 +155,5 @@ inline int qHash(const ProjectExplorer::Abi &abi)
|
||||
+ (abi.wordWidth() << 13);
|
||||
return QT_PREPEND_NAMESPACE(qHash)(h);
|
||||
}
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // PROJECTEXPLORER_ABI_H
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef PROJECTEXPLORER_ABIWIDGET_H
|
||||
#define PROJECTEXPLORER_ABIWIDGET_H
|
||||
#pragma once
|
||||
|
||||
#include "projectexplorer_export.h"
|
||||
|
||||
@@ -45,7 +44,7 @@ class PROJECTEXPLORER_EXPORT AbiWidget : public QWidget
|
||||
|
||||
public:
|
||||
AbiWidget(QWidget *parent = 0);
|
||||
~AbiWidget();
|
||||
~AbiWidget() override;
|
||||
|
||||
void setAbis(const QList<Abi> &, const Abi ¤t);
|
||||
QList<Abi> supportedAbis() const;
|
||||
@@ -66,5 +65,3 @@ private:
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // PROJECTEXPLORER_ABIWIDGET_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef ABSTRACTMSVCTOOLCHAIN_H
|
||||
#define ABSTRACTMSVCTOOLCHAIN_H
|
||||
#pragma once
|
||||
|
||||
#include "toolchain.h"
|
||||
#include "abi.h"
|
||||
@@ -100,5 +99,3 @@ protected:
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // ABSTRACTMSVCTOOLCHAIN_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef ABSTRACTPROCESSSTEP_H
|
||||
#define ABSTRACTPROCESSSTEP_H
|
||||
#pragma once
|
||||
|
||||
#include "buildstep.h"
|
||||
#include "processparameters.h"
|
||||
@@ -100,5 +99,3 @@ private:
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // ABSTRACTPROCESSSTEP_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef ALLPROJECTSFILTER_H
|
||||
#define ALLPROJECTSFILTER_H
|
||||
#pragma once
|
||||
|
||||
#include <coreplugin/locator/basefilefilter.h>
|
||||
|
||||
@@ -39,8 +38,8 @@ class AllProjectsFilter : public Core::BaseFileFilter
|
||||
|
||||
public:
|
||||
AllProjectsFilter();
|
||||
void refresh(QFutureInterface<void> &future);
|
||||
void prepareSearch(const QString &entry);
|
||||
void refresh(QFutureInterface<void> &future) override;
|
||||
void prepareSearch(const QString &entry) override;
|
||||
|
||||
private:
|
||||
void markFilesAsOutOfDate();
|
||||
@@ -48,5 +47,3 @@ private:
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // ALLPROJECTSFILTER_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef ALLPROJECTSFIND_H
|
||||
#define ALLPROJECTSFIND_H
|
||||
#pragma once
|
||||
|
||||
#include <texteditor/basefilefind.h>
|
||||
|
||||
@@ -43,24 +42,24 @@ class AllProjectsFind : public TextEditor::BaseFileFind
|
||||
public:
|
||||
AllProjectsFind();
|
||||
|
||||
QString id() const;
|
||||
QString displayName() const;
|
||||
QString id() const override;
|
||||
QString displayName() const override;
|
||||
|
||||
bool isEnabled() const;
|
||||
bool isEnabled() const override;
|
||||
|
||||
QWidget *createConfigWidget();
|
||||
void writeSettings(QSettings *settings);
|
||||
void readSettings(QSettings *settings);
|
||||
QWidget *createConfigWidget() override;
|
||||
void writeSettings(QSettings *settings) override;
|
||||
void readSettings(QSettings *settings) override;
|
||||
|
||||
protected:
|
||||
Utils::FileIterator *files(const QStringList &nameFilters,
|
||||
const QVariant &additionalParameters) const;
|
||||
const QVariant &additionalParameters) const override;
|
||||
Utils::FileIterator *filesForProjects(const QStringList &nameFilters,
|
||||
const QList<Project *> &projects) const;
|
||||
const QList<Project *> &projects) const;
|
||||
|
||||
QVariant additionalParameters() const;
|
||||
QString label() const;
|
||||
QString toolTip() const;
|
||||
QVariant additionalParameters() const override;
|
||||
QString label() const override;
|
||||
QString toolTip() const override;
|
||||
|
||||
private:
|
||||
void handleFileListChanged();
|
||||
@@ -70,5 +69,3 @@ private:
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // ALLPROJECTSFIND_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef ANSIFILTERPARSER_H
|
||||
#define ANSIFILTERPARSER_H
|
||||
#pragma once
|
||||
|
||||
#include "ioutputparser.h"
|
||||
|
||||
@@ -36,13 +35,11 @@ class AnsiFilterParser : public IOutputParser
|
||||
|
||||
public:
|
||||
AnsiFilterParser();
|
||||
void stdOutput(const QString &line);
|
||||
void stdError(const QString &line);
|
||||
void stdOutput(const QString &line) override;
|
||||
void stdError(const QString &line) override;
|
||||
|
||||
private:
|
||||
QString filterLine(const QString &line);
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // ANSIFILTERPARSER_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef APPLICATIONLAUNCHER_H
|
||||
#define APPLICATIONLAUNCHER_H
|
||||
#pragma once
|
||||
|
||||
#include "projectexplorer_export.h"
|
||||
|
||||
@@ -49,7 +48,7 @@ public:
|
||||
};
|
||||
|
||||
explicit ApplicationLauncher(QObject *parent = 0);
|
||||
~ApplicationLauncher();
|
||||
~ApplicationLauncher() override;
|
||||
|
||||
void setProcessChannelMode(QProcess::ProcessChannelMode mode);
|
||||
void start(const ProjectExplorer::StandardRunnable &runnable);
|
||||
@@ -85,5 +84,3 @@ private:
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // APPLICATIONLAUNCHER_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef APPOUTPUTPANE_H
|
||||
#define APPOUTPUTPANE_H
|
||||
#pragma once
|
||||
|
||||
#include <coreplugin/ioutputpane.h>
|
||||
|
||||
@@ -62,23 +61,23 @@ public:
|
||||
};
|
||||
|
||||
AppOutputPane();
|
||||
virtual ~AppOutputPane();
|
||||
~AppOutputPane() override;
|
||||
|
||||
QWidget *outputWidget(QWidget *);
|
||||
QList<QWidget *> toolBarWidgets() const;
|
||||
QString displayName() const;
|
||||
int priorityInStatusBar() const;
|
||||
void clearContents();
|
||||
void visibilityChanged(bool);
|
||||
bool canFocus() const;
|
||||
bool hasFocus() const;
|
||||
void setFocus();
|
||||
QWidget *outputWidget(QWidget *) override;
|
||||
QList<QWidget *> toolBarWidgets() const override;
|
||||
QString displayName() const override;
|
||||
int priorityInStatusBar() const override;
|
||||
void clearContents() override;
|
||||
void visibilityChanged(bool) override;
|
||||
bool canFocus() const override;
|
||||
bool hasFocus() const override;
|
||||
void setFocus() override;
|
||||
|
||||
bool canNext() const;
|
||||
bool canPrevious() const;
|
||||
void goToNext();
|
||||
void goToPrev();
|
||||
bool canNavigate() const;
|
||||
bool canNext() const override;
|
||||
bool canPrevious() const override;
|
||||
void goToNext() override;
|
||||
void goToPrev() override;
|
||||
bool canNavigate() const override;
|
||||
|
||||
void createNewOutputWindow(RunControl *rc);
|
||||
void showTabFor(RunControl *rc);
|
||||
@@ -162,5 +161,3 @@ private:
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // APPOUTPUTPANE_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef BASEPROJECTWIZARDDIALOG_H
|
||||
#define BASEPROJECTWIZARDDIALOG_H
|
||||
#pragma once
|
||||
|
||||
#include "projectexplorer_export.h"
|
||||
|
||||
@@ -51,7 +50,7 @@ public:
|
||||
explicit BaseProjectWizardDialog(const Core::BaseFileWizardFactory *factory, QWidget *parent,
|
||||
const Core::WizardDialogParameters ¶meters);
|
||||
|
||||
virtual ~BaseProjectWizardDialog();
|
||||
~BaseProjectWizardDialog() override;
|
||||
|
||||
QString projectName() const;
|
||||
QString path() const;
|
||||
@@ -81,11 +80,9 @@ protected:
|
||||
private:
|
||||
void init();
|
||||
void slotAccepted();
|
||||
bool validateCurrentPage();
|
||||
bool validateCurrentPage() override;
|
||||
|
||||
BaseProjectWizardDialogPrivate *d;
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // BASEPROJECTWIZARDDIALOG_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef BUILDCONFIGURATION_H
|
||||
#define BUILDCONFIGURATION_H
|
||||
#pragma once
|
||||
|
||||
#include "projectexplorer_export.h"
|
||||
#include "projectconfiguration.h"
|
||||
@@ -155,5 +154,3 @@ signals:
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
Q_DECLARE_METATYPE(ProjectExplorer::BuildConfiguration *)
|
||||
|
||||
#endif // BUILDCONFIGURATION_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef BUILDCONFIGURATIONMODEL_H
|
||||
#define BUILDCONFIGURATIONMODEL_H
|
||||
#pragma once
|
||||
|
||||
#include <QAbstractItemModel>
|
||||
|
||||
@@ -39,21 +38,21 @@ class BuildConfigurationModel : public QAbstractListModel
|
||||
public:
|
||||
explicit BuildConfigurationModel(Target *target, QObject *parent = 0);
|
||||
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
||||
int columnCount(const QModelIndex &parent = QModelIndex()) const;
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||
|
||||
BuildConfiguration *buildConfigurationAt(int i);
|
||||
BuildConfiguration *buildConfigurationFor(const QModelIndex &idx);
|
||||
QModelIndex indexFor(BuildConfiguration *rc);
|
||||
|
||||
private:
|
||||
void addedBuildConfiguration(ProjectExplorer::BuildConfiguration*);
|
||||
void removedBuildConfiguration(ProjectExplorer::BuildConfiguration*);
|
||||
void displayNameChanged();
|
||||
|
||||
Target *m_target;
|
||||
QList<BuildConfiguration *> m_buildConfigurations;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // RUNCONFIGURATIONMODEL_H
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef BUILDENVIRONMENTWIDGET_H
|
||||
#define BUILDENVIRONMENTWIDGET_H
|
||||
#pragma once
|
||||
|
||||
#include <projectexplorer/namedwidget.h>
|
||||
|
||||
@@ -42,7 +41,7 @@ class PROJECTEXPLORER_EXPORT BuildEnvironmentWidget : public NamedWidget
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
BuildEnvironmentWidget(BuildConfiguration *bc);
|
||||
explicit BuildEnvironmentWidget(BuildConfiguration *bc);
|
||||
|
||||
private:
|
||||
void environmentModelUserChangesChanged();
|
||||
@@ -55,5 +54,3 @@ private:
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // BUILDENVIRONMENTWIDGET_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef BUILDINFO_H
|
||||
#define BUILDINFO_H
|
||||
#pragma once
|
||||
|
||||
#include "projectexplorer_export.h"
|
||||
|
||||
@@ -74,5 +73,3 @@ private:
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // BUILDINFO_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef BUILDMANAGER_H
|
||||
#define BUILDMANAGER_H
|
||||
#pragma once
|
||||
|
||||
#include "projectexplorer_export.h"
|
||||
#include "buildstep.h"
|
||||
@@ -43,7 +42,7 @@ class PROJECTEXPLORER_EXPORT BuildManager : public QObject
|
||||
|
||||
public:
|
||||
explicit BuildManager(QObject *parent, QAction *cancelBuildAction);
|
||||
~BuildManager();
|
||||
~BuildManager() override;
|
||||
static BuildManager *instance();
|
||||
|
||||
static void extensionsInitialized();
|
||||
@@ -104,5 +103,3 @@ private:
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // BUILDMANAGER_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef BUILDPROGRESS_H
|
||||
#define BUILDPROGRESS_H
|
||||
#pragma once
|
||||
|
||||
#include "taskwindow.h"
|
||||
|
||||
@@ -39,8 +38,9 @@ namespace Internal {
|
||||
class BuildProgress : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
BuildProgress(TaskWindow *taskWindow, Qt::Orientation orientation = Qt::Vertical);
|
||||
explicit BuildProgress(TaskWindow *taskWindow, Qt::Orientation orientation = Qt::Vertical);
|
||||
|
||||
private:
|
||||
void updateState();
|
||||
@@ -55,5 +55,3 @@ private:
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // BUILDPROGRESS_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef BUILDSETTINGSPROPERTIESPAGE_H
|
||||
#define BUILDSETTINGSPROPERTIESPAGE_H
|
||||
#pragma once
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
@@ -49,7 +48,7 @@ class BuildSettingsWidget : public QWidget
|
||||
Q_OBJECT
|
||||
public:
|
||||
BuildSettingsWidget(Target *target);
|
||||
~BuildSettingsWidget();
|
||||
~BuildSettingsWidget() override;
|
||||
|
||||
void clearWidgets();
|
||||
void addSubWidget(NamedWidget *widget);
|
||||
@@ -86,5 +85,3 @@ private:
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // BUILDSETTINGSPROPERTIESPAGE_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef BUILDSTEP_H
|
||||
#define BUILDSTEP_H
|
||||
#pragma once
|
||||
|
||||
#include "projectconfiguration.h"
|
||||
#include "projectexplorer_export.h"
|
||||
@@ -94,8 +93,7 @@ private:
|
||||
bool m_enabled;
|
||||
};
|
||||
|
||||
class PROJECTEXPLORER_EXPORT IBuildStepFactory :
|
||||
public QObject
|
||||
class PROJECTEXPLORER_EXPORT IBuildStepFactory : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -116,14 +114,10 @@ public:
|
||||
virtual BuildStep *clone(BuildStepList *parent, BuildStep *product) = 0;
|
||||
};
|
||||
|
||||
class PROJECTEXPLORER_EXPORT BuildStepConfigWidget
|
||||
: public QWidget
|
||||
class PROJECTEXPLORER_EXPORT BuildStepConfigWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
BuildStepConfigWidget()
|
||||
: QWidget()
|
||||
{}
|
||||
virtual QString summaryText() const = 0;
|
||||
virtual QString additionalSummaryText() const { return QString(); }
|
||||
virtual QString displayName() const = 0;
|
||||
@@ -134,20 +128,16 @@ signals:
|
||||
void updateAdditionalSummary();
|
||||
};
|
||||
|
||||
class PROJECTEXPLORER_EXPORT SimpleBuildStepConfigWidget
|
||||
: public BuildStepConfigWidget
|
||||
class PROJECTEXPLORER_EXPORT SimpleBuildStepConfigWidget : public BuildStepConfigWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SimpleBuildStepConfigWidget(BuildStep *step)
|
||||
: m_step(step)
|
||||
SimpleBuildStepConfigWidget(BuildStep *step) : m_step(step)
|
||||
{
|
||||
connect(m_step, &ProjectConfiguration::displayNameChanged,
|
||||
this, &BuildStepConfigWidget::updateSummary);
|
||||
}
|
||||
|
||||
~SimpleBuildStepConfigWidget() {}
|
||||
|
||||
QString summaryText() const { return QLatin1String("<b>") + displayName() + QLatin1String("</b>"); }
|
||||
QString displayName() const { return m_step->displayName(); }
|
||||
bool showWidget() const { return false; }
|
||||
@@ -161,5 +151,3 @@ private:
|
||||
|
||||
Q_DECLARE_METATYPE(ProjectExplorer::BuildStep::OutputFormat)
|
||||
Q_DECLARE_METATYPE(ProjectExplorer::BuildStep::OutputNewlineSetting)
|
||||
|
||||
#endif // BUILDSTEP_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef PROJECTEXPLORER_BUILDSTEPLIST_H
|
||||
#define PROJECTEXPLORER_BUILDSTEPLIST_H
|
||||
#pragma once
|
||||
|
||||
#include "projectexplorer_export.h"
|
||||
|
||||
@@ -81,5 +80,3 @@ private:
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
Q_DECLARE_METATYPE(ProjectExplorer::BuildStepList *)
|
||||
|
||||
#endif // PROJECTEXPLORER_BUILDSTEPLIST_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef BUILDSTEPSPAGE_H
|
||||
#define BUILDSTEPSPAGE_H
|
||||
#pragma once
|
||||
|
||||
#include "buildstep.h"
|
||||
#include "namedwidget.h"
|
||||
@@ -52,7 +51,7 @@ class ToolWidget : public Utils::FadingPanel
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ToolWidget(QWidget *parent = 0);
|
||||
explicit ToolWidget(QWidget *parent = 0);
|
||||
|
||||
void fadeTo(qreal value);
|
||||
void setOpacity(qreal value);
|
||||
@@ -63,6 +62,7 @@ public:
|
||||
void setRemoveEnabled(bool b);
|
||||
void setUpVisible(bool b);
|
||||
void setDownVisible(bool b);
|
||||
|
||||
signals:
|
||||
void disabledClicked();
|
||||
void upClicked();
|
||||
@@ -154,5 +154,3 @@ private:
|
||||
|
||||
} // Internal
|
||||
} // ProjectExplorer
|
||||
|
||||
#endif // BUILDSTEPSPAGE_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef BUILDTARGETINFO_H
|
||||
#define BUILDTARGETINFO_H
|
||||
#pragma once
|
||||
|
||||
#include "projectexplorer_export.h"
|
||||
|
||||
@@ -39,14 +38,13 @@ namespace ProjectExplorer {
|
||||
class PROJECTEXPLORER_EXPORT BuildTargetInfo
|
||||
{
|
||||
public:
|
||||
BuildTargetInfo() {}
|
||||
BuildTargetInfo() = default;
|
||||
BuildTargetInfo(const QString &targetName, const Utils::FileName &targetFilePath,
|
||||
const Utils::FileName &projectFilePath)
|
||||
: targetName(targetName)
|
||||
, targetFilePath(targetFilePath)
|
||||
, projectFilePath(projectFilePath)
|
||||
{
|
||||
}
|
||||
const Utils::FileName &projectFilePath) :
|
||||
targetName(targetName),
|
||||
targetFilePath(targetFilePath),
|
||||
projectFilePath(projectFilePath)
|
||||
{ }
|
||||
|
||||
QString targetName;
|
||||
Utils::FileName targetFilePath;
|
||||
@@ -71,7 +69,6 @@ inline uint qHash(const BuildTargetInfo &ti)
|
||||
return qHash(ti.targetName);
|
||||
}
|
||||
|
||||
|
||||
class PROJECTEXPLORER_EXPORT BuildTargetInfoList
|
||||
{
|
||||
public:
|
||||
@@ -115,5 +112,3 @@ inline bool operator!=(const BuildTargetInfoList &til1, const BuildTargetInfoLis
|
||||
}
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // BUILDTARGETINFO_H
|
||||
|
||||
@@ -48,10 +48,6 @@ void CeSdkInfo::addToEnvironment(Environment &env)
|
||||
env.prependOrSetPath(m_bin);
|
||||
}
|
||||
|
||||
CeSdkHandler::CeSdkHandler()
|
||||
{
|
||||
}
|
||||
|
||||
bool CeSdkHandler::parse(const QString &vsdir)
|
||||
{
|
||||
// look at the file at %VCInstallDir%/vcpackages/WCE.VCPlatform.config
|
||||
|
||||
@@ -23,10 +23,9 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CE_SDK_HANDLER_H
|
||||
#define CE_SDK_HANDLER_H
|
||||
#pragma once
|
||||
|
||||
#include <projectexplorer/projectexplorer.h>
|
||||
#include "projectexplorer.h"
|
||||
|
||||
#include <QDir>
|
||||
|
||||
@@ -38,6 +37,7 @@ class PROJECTEXPLORER_EXPORT CeSdkInfo
|
||||
{
|
||||
public:
|
||||
CeSdkInfo();
|
||||
|
||||
inline QString name() const;
|
||||
inline QString binPath() const;
|
||||
inline QString includePath() const;
|
||||
@@ -47,6 +47,7 @@ public:
|
||||
inline int majorVersion() const;
|
||||
inline int minorVersion() const;
|
||||
inline bool isSupported() const;
|
||||
|
||||
private:
|
||||
friend class CeSdkHandler;
|
||||
QString m_name;
|
||||
@@ -69,16 +70,15 @@ inline bool CeSdkInfo::isSupported() const { return m_major >= 5; }
|
||||
class PROJECTEXPLORER_EXPORT CeSdkHandler
|
||||
{
|
||||
public:
|
||||
CeSdkHandler();
|
||||
bool parse(const QString &path);
|
||||
inline QList<CeSdkInfo> listAll() const;
|
||||
CeSdkInfo find(const QString &name) const;
|
||||
static QString platformName(const QString &qtpath);
|
||||
bool parse(const QString &path);
|
||||
inline QList<CeSdkInfo> listAll() const;
|
||||
CeSdkInfo find(const QString &name) const;
|
||||
static QString platformName(const QString &qtpath);
|
||||
private:
|
||||
inline QString fixPaths(QString path) const;
|
||||
QList<CeSdkInfo> m_list;
|
||||
QString VCInstallDir;
|
||||
QString VSInstallDir;
|
||||
inline QString fixPaths(QString path) const;
|
||||
QList<CeSdkInfo> m_list;
|
||||
QString VCInstallDir;
|
||||
QString VSInstallDir;
|
||||
};
|
||||
|
||||
inline QList<CeSdkInfo> CeSdkHandler::listAll() const
|
||||
@@ -98,5 +98,3 @@ inline QString CeSdkHandler::fixPaths(QString path) const
|
||||
}
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // CE_SDK_HANDLER_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CLANGPARSER_H
|
||||
#define CLANGPARSER_H
|
||||
#pragma once
|
||||
|
||||
#include "gccparser.h"
|
||||
#include "task.h"
|
||||
@@ -51,5 +50,3 @@ private:
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // CLANGPARSER_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CODESTYLESETTINGSPROPERTIESPAGE_H
|
||||
#define CODESTYLESETTINGSPROPERTIESPAGE_H
|
||||
#pragma once
|
||||
|
||||
#include "ui_codestylesettingspropertiespage.h"
|
||||
|
||||
@@ -38,7 +37,7 @@ class CodeStyleSettingsWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
CodeStyleSettingsWidget(Project *project);
|
||||
explicit CodeStyleSettingsWidget(Project *project);
|
||||
|
||||
private:
|
||||
Ui::CodeStyleSettingsPropertiesPage m_ui;
|
||||
@@ -47,6 +46,3 @@ private:
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
|
||||
#endif // CODESTYLESETTINGSPROPERTIESPAGE_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef COMPILEOUTPUTWINDOW_H
|
||||
#define COMPILEOUTPUTWINDOW_H
|
||||
#pragma once
|
||||
|
||||
#include "buildstep.h"
|
||||
#include <coreplugin/ioutputpane.h>
|
||||
@@ -55,25 +54,26 @@ class CompileOutputWindow : public Core::IOutputPane
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CompileOutputWindow(QAction *cancelBuildAction);
|
||||
~CompileOutputWindow();
|
||||
explicit CompileOutputWindow(QAction *cancelBuildAction);
|
||||
~CompileOutputWindow() override;
|
||||
|
||||
QWidget *outputWidget(QWidget *) override;
|
||||
QList<QWidget *> toolBarWidgets() const override;
|
||||
QString displayName() const override { return tr("Compile Output"); }
|
||||
int priorityInStatusBar() const override;
|
||||
void clearContents() override;
|
||||
void visibilityChanged(bool visible) override;
|
||||
bool canFocus() const override;
|
||||
bool hasFocus() const override;
|
||||
void setFocus() override;
|
||||
|
||||
bool canNext() const override;
|
||||
bool canPrevious() const override;
|
||||
void goToNext() override;
|
||||
void goToPrev() override;
|
||||
bool canNavigate() const override;
|
||||
|
||||
QWidget *outputWidget(QWidget *);
|
||||
QList<QWidget *> toolBarWidgets() const;
|
||||
QString displayName() const { return tr("Compile Output"); }
|
||||
int priorityInStatusBar() const;
|
||||
void clearContents();
|
||||
void visibilityChanged(bool visible);
|
||||
void appendText(const QString &text, BuildStep::OutputFormat format);
|
||||
bool canFocus() const;
|
||||
bool hasFocus() const;
|
||||
void setFocus();
|
||||
|
||||
bool canNext() const;
|
||||
bool canPrevious() const;
|
||||
void goToNext();
|
||||
void goToPrev();
|
||||
bool canNavigate() const;
|
||||
|
||||
void registerPositionOf(const Task &task, int linkedOutputLines, int skipLines);
|
||||
bool knowsPositionOf(const Task &task);
|
||||
@@ -87,7 +87,7 @@ private:
|
||||
|
||||
CompileOutputTextEdit *m_outputWindow;
|
||||
QHash<unsigned int, QPair<int, int>> m_taskPositions;
|
||||
ShowOutputTaskHandler * m_handler;
|
||||
ShowOutputTaskHandler *m_handler;
|
||||
QToolButton *m_cancelBuildButton;
|
||||
QToolButton *m_zoomInButton;
|
||||
QToolButton *m_zoomOutButton;
|
||||
@@ -96,5 +96,3 @@ private:
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // COMPILEOUTPUTWINDOW_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef PROJECTEXPLORER_CONFIGTASKHANDLER_H
|
||||
#define PROJECTEXPLORER_CONFIGTASKHANDLER_H
|
||||
#pragma once
|
||||
|
||||
#include "itaskhandler.h"
|
||||
|
||||
@@ -40,9 +39,9 @@ class ConfigTaskHandler : public ITaskHandler
|
||||
public:
|
||||
ConfigTaskHandler(const Task &pattern, Core::Id page);
|
||||
|
||||
bool canHandle(const Task &task) const;
|
||||
void handle(const Task &task);
|
||||
QAction *createAction(QObject *parent) const;
|
||||
bool canHandle(const Task &task) const override;
|
||||
void handle(const Task &task) override;
|
||||
QAction *createAction(QObject *parent) const override;
|
||||
|
||||
private:
|
||||
const Task m_pattern;
|
||||
@@ -51,5 +50,3 @@ private:
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // PROJECTEXPLORER_CONFIGTASKHANDLER_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef PROJECTEXPLORER_COPYTASKHANDLER_H
|
||||
#define PROJECTEXPLORER_COPYTASKHANDLER_H
|
||||
#pragma once
|
||||
|
||||
#include "itaskhandler.h"
|
||||
|
||||
@@ -36,15 +35,11 @@ class CopyTaskHandler : public ITaskHandler
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CopyTaskHandler() {}
|
||||
|
||||
bool canHandle(const Task &) const { return true; }
|
||||
void handle(const Task &task);
|
||||
Core::Id actionManagerId() const;
|
||||
QAction *createAction(QObject *parent) const;
|
||||
bool canHandle(const Task &) const override { return true; }
|
||||
void handle(const Task &task) override;
|
||||
Core::Id actionManagerId() const override;
|
||||
QAction *createAction(QObject *parent) const override;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // PROJECTEXPLORER_COPYTASKHANDLER_H
|
||||
|
||||
@@ -36,8 +36,7 @@ using namespace Core;
|
||||
using namespace ProjectExplorer;
|
||||
using namespace ProjectExplorer::Internal;
|
||||
|
||||
CurrentProjectFilter::CurrentProjectFilter()
|
||||
: BaseFileFilter(), m_project(0)
|
||||
CurrentProjectFilter::CurrentProjectFilter() : BaseFileFilter(), m_project(0)
|
||||
{
|
||||
setId("Files in current project");
|
||||
setDisplayName(tr("Files in Current Project"));
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CURRENTPROJECTFILTER_H
|
||||
#define CURRENTPROJECTFILTER_H
|
||||
#pragma once
|
||||
|
||||
#include <coreplugin/locator/basefilefilter.h>
|
||||
|
||||
@@ -43,8 +42,8 @@ class CurrentProjectFilter : public Core::BaseFileFilter
|
||||
|
||||
public:
|
||||
CurrentProjectFilter();
|
||||
void refresh(QFutureInterface<void> &future);
|
||||
void prepareSearch(const QString &entry);
|
||||
void refresh(QFutureInterface<void> &future) override;
|
||||
void prepareSearch(const QString &entry) override;
|
||||
|
||||
private:
|
||||
void currentProjectChanged();
|
||||
@@ -55,5 +54,3 @@ private:
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // CURRENTPROJECTFILTER_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CURRENTPROJECTFIND_H
|
||||
#define CURRENTPROJECTFIND_H
|
||||
#pragma once
|
||||
|
||||
#include "allprojectsfind.h"
|
||||
|
||||
@@ -41,19 +40,19 @@ class CurrentProjectFind : public AllProjectsFind
|
||||
public:
|
||||
CurrentProjectFind();
|
||||
|
||||
QString id() const;
|
||||
QString displayName() const;
|
||||
QString id() const override;
|
||||
QString displayName() const override;
|
||||
|
||||
bool isEnabled() const;
|
||||
bool isEnabled() const override;
|
||||
|
||||
void writeSettings(QSettings *settings);
|
||||
void readSettings(QSettings *settings);
|
||||
void writeSettings(QSettings *settings) override;
|
||||
void readSettings(QSettings *settings) override;
|
||||
|
||||
protected:
|
||||
Utils::FileIterator *files(const QStringList &nameFilters,
|
||||
const QVariant &additionalParameters) const;
|
||||
QVariant additionalParameters() const;
|
||||
QString label() const;
|
||||
const QVariant &additionalParameters) const override;
|
||||
QVariant additionalParameters() const override;
|
||||
QString label() const override;
|
||||
|
||||
private:
|
||||
void handleProjectChanged();
|
||||
@@ -62,5 +61,3 @@ private:
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // CURRENTPROJECTFIND_H
|
||||
|
||||
@@ -118,10 +118,6 @@ CustomParser::CustomParser(const CustomParserSettings &settings)
|
||||
setSettings(settings);
|
||||
}
|
||||
|
||||
CustomParser::~CustomParser()
|
||||
{
|
||||
}
|
||||
|
||||
void CustomParser::stdError(const QString &line)
|
||||
{
|
||||
if (parseLine(line, CustomParserExpression::ParseStdErrChannel))
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CUSTOMPARSER_H
|
||||
#define CUSTOMPARSER_H
|
||||
#pragma once
|
||||
|
||||
#include "ioutputparser.h"
|
||||
|
||||
@@ -86,9 +85,9 @@ class CustomParser : public ProjectExplorer::IOutputParser
|
||||
{
|
||||
public:
|
||||
CustomParser(const CustomParserSettings &settings = CustomParserSettings());
|
||||
~CustomParser();
|
||||
void stdError(const QString &line);
|
||||
void stdOutput(const QString &line);
|
||||
|
||||
void stdError(const QString &line) override;
|
||||
void stdOutput(const QString &line) override;
|
||||
|
||||
void setSettings(const CustomParserSettings &settings);
|
||||
|
||||
@@ -104,5 +103,3 @@ private:
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
Q_DECLARE_METATYPE(ProjectExplorer::CustomParserExpression::CustomParserChannel);
|
||||
|
||||
#endif // CUSTOMPARSER_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CUSTOMPARSERCONFIGDIALOG_H
|
||||
#define CUSTOMPARSERCONFIGDIALOG_H
|
||||
#pragma once
|
||||
|
||||
#include "customparser.h"
|
||||
|
||||
@@ -45,7 +44,7 @@ class CustomParserConfigDialog : public QDialog
|
||||
|
||||
public:
|
||||
explicit CustomParserConfigDialog(QDialog *parent = 0);
|
||||
~CustomParserConfigDialog();
|
||||
~CustomParserConfigDialog() override;
|
||||
|
||||
void setExampleSettings();
|
||||
void setSettings(const CustomParserSettings &settings);
|
||||
@@ -89,5 +88,3 @@ private:
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // CUSTOMPARSERCONFIGDIALOG_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CUSTOMTOOLCHAIN_H
|
||||
#define CUSTOMTOOLCHAIN_H
|
||||
#pragma once
|
||||
|
||||
#include "projectexplorer_export.h"
|
||||
|
||||
@@ -50,6 +49,7 @@ namespace ProjectExplorer {
|
||||
class AbiWidget;
|
||||
|
||||
namespace Internal { class CustomToolChainFactory; }
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// CustomToolChain
|
||||
// --------------------------------------------------------------------------
|
||||
@@ -199,5 +199,3 @@ protected:
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // CUSTOMTOOLCHAIN_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef DEPENDENCIESPANEL_H
|
||||
#define DEPENDENCIESPANEL_H
|
||||
#pragma once
|
||||
|
||||
#include <QAbstractListModel>
|
||||
|
||||
@@ -53,11 +52,11 @@ class DependenciesModel : public QAbstractListModel
|
||||
public:
|
||||
explicit DependenciesModel(Project *project, QObject *parent = 0);
|
||||
|
||||
int rowCount(const QModelIndex &index) const;
|
||||
int columnCount(const QModelIndex &index) const;
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
|
||||
bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
|
||||
Qt::ItemFlags flags(const QModelIndex &index) const;
|
||||
int rowCount(const QModelIndex &index) const override;
|
||||
int columnCount(const QModelIndex &index) const override;
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||
bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
|
||||
Qt::ItemFlags flags(const QModelIndex &index) const override;
|
||||
|
||||
private:
|
||||
void resetModel();
|
||||
@@ -71,10 +70,10 @@ class DependenciesView : public QTreeView
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DependenciesView(QWidget *parent);
|
||||
explicit DependenciesView(QWidget *parent);
|
||||
|
||||
QSize sizeHint() const;
|
||||
void setModel(QAbstractItemModel *model);
|
||||
QSize sizeHint() const override;
|
||||
void setModel(QAbstractItemModel *model) override;
|
||||
|
||||
private:
|
||||
void updateSizeHint();
|
||||
@@ -98,5 +97,3 @@ private:
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // DEPENDENCIESPANEL_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef DEPLOYABLEFILE_H
|
||||
#define DEPLOYABLEFILE_H
|
||||
#pragma once
|
||||
|
||||
#include "projectexplorer_export.h"
|
||||
|
||||
@@ -77,5 +76,3 @@ inline bool operator!=(const DeployableFile &d1, const DeployableFile &d2)
|
||||
PROJECTEXPLORER_EXPORT uint qHash(const DeployableFile &d);
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // DEPLOYABLEFILE_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef PROJECTEXPLORER_DEPLOYCONFIGURATION_H
|
||||
#define PROJECTEXPLORER_DEPLOYCONFIGURATION_H
|
||||
#pragma once
|
||||
|
||||
#include "projectexplorer_export.h"
|
||||
|
||||
@@ -80,6 +79,7 @@ class PROJECTEXPLORER_EXPORT DefaultDeployConfiguration : public DeployConfigura
|
||||
{
|
||||
Q_OBJECT
|
||||
friend class DefaultDeployConfigurationFactory; // for the ctors
|
||||
|
||||
protected:
|
||||
DefaultDeployConfiguration(Target *target, Core::Id id);
|
||||
DefaultDeployConfiguration(Target *target, DeployConfiguration *source);
|
||||
@@ -132,5 +132,3 @@ private:
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
Q_DECLARE_METATYPE(ProjectExplorer::DeployConfiguration *)
|
||||
|
||||
#endif // PROJECTEXPLORER_DEPLOYCONFIGURATION_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef PROJECTEXPLORER_DEPLOYCONFIGURATIONMODEL_H
|
||||
#define PROJECTEXPLORER_DEPLOYCONFIGURATIONMODEL_H
|
||||
#pragma once
|
||||
|
||||
#include <QAbstractItemModel>
|
||||
|
||||
@@ -40,21 +39,21 @@ class DeployConfigurationModel : public QAbstractListModel
|
||||
public:
|
||||
explicit DeployConfigurationModel(Target *target, QObject *parent = 0);
|
||||
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
||||
int columnCount(const QModelIndex &parent = QModelIndex()) const;
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||
|
||||
DeployConfiguration *deployConfigurationAt(int i);
|
||||
DeployConfiguration *deployConfigurationFor(const QModelIndex &idx);
|
||||
QModelIndex indexFor(DeployConfiguration *rc);
|
||||
|
||||
private:
|
||||
void addedDeployConfiguration(ProjectExplorer::DeployConfiguration*);
|
||||
void removedDeployConfiguration(ProjectExplorer::DeployConfiguration*);
|
||||
void displayNameChanged();
|
||||
|
||||
Target *m_target;
|
||||
QList<DeployConfiguration *> m_deployConfigurations;
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // PROJECTEXPLORER_DEPLOYCONFIGURATIONMODEL_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef DEPLOYMENTDATA_H
|
||||
#define DEPLOYMENTDATA_H
|
||||
#pragma once
|
||||
|
||||
#include "deployablefile.h"
|
||||
#include "projectexplorer_export.h"
|
||||
@@ -84,5 +83,3 @@ inline bool operator!=(const DeploymentData &d1, const DeploymentData &d2)
|
||||
}
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // DEPLOYMENTDATA_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef DEPLOYMENTDATAMODEL_H
|
||||
#define DEPLOYMENTDATAMODEL_H
|
||||
#pragma once
|
||||
|
||||
#include "deploymentdata.h"
|
||||
#include "projectexplorer_export.h"
|
||||
@@ -42,14 +41,12 @@ public:
|
||||
void setDeploymentData(const DeploymentData &deploymentData);
|
||||
|
||||
private:
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
||||
int columnCount(const QModelIndex &parent = QModelIndex()) const;
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||
|
||||
DeploymentData m_deploymentData;
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // Include guard
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef DEPLOYMENTDATAVIEW_H
|
||||
#define DEPLOYMENTDATAVIEW_H
|
||||
#pragma once
|
||||
|
||||
#include "namedwidget.h"
|
||||
#include "projectexplorer_export.h"
|
||||
@@ -40,7 +39,7 @@ class PROJECTEXPLORER_EXPORT DeploymentDataView : public NamedWidget
|
||||
|
||||
public:
|
||||
explicit DeploymentDataView(Target *target, QWidget *parent = 0);
|
||||
~DeploymentDataView();
|
||||
~DeploymentDataView() override;
|
||||
|
||||
private:
|
||||
void updateDeploymentDataModel();
|
||||
@@ -49,5 +48,3 @@ private:
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // Include guard
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef DESKTOPDEVICE_H
|
||||
#define DESKTOPDEVICE_H
|
||||
#pragma once
|
||||
|
||||
#include "../projectexplorer_export.h"
|
||||
|
||||
@@ -39,22 +38,22 @@ namespace Internal { class DesktopDeviceFactory; }
|
||||
class PROJECTEXPLORER_EXPORT DesktopDevice : public IDevice
|
||||
{
|
||||
public:
|
||||
IDevice::DeviceInfo deviceInformation() const;
|
||||
IDevice::DeviceInfo deviceInformation() const override;
|
||||
|
||||
QString displayType() const;
|
||||
IDeviceWidget *createWidget();
|
||||
QList<Core::Id> actionIds() const;
|
||||
QString displayNameForActionId(Core::Id actionId) const;
|
||||
void executeAction(Core::Id actionId, QWidget *parent = 0);
|
||||
bool canAutoDetectPorts() const;
|
||||
bool canCreateProcessModel() const;
|
||||
DeviceProcessList *createProcessListModel(QObject *parent) const;
|
||||
bool canCreateProcess() const { return true; }
|
||||
DeviceProcess *createProcess(QObject *parent) const;
|
||||
DeviceProcessSignalOperation::Ptr signalOperation() const;
|
||||
QString qmlProfilerHost() const;
|
||||
QString displayType() const override;
|
||||
IDeviceWidget *createWidget() override;
|
||||
QList<Core::Id> actionIds() const override;
|
||||
QString displayNameForActionId(Core::Id actionId) const override;
|
||||
void executeAction(Core::Id actionId, QWidget *parent = 0) override;
|
||||
bool canAutoDetectPorts() const override;
|
||||
bool canCreateProcessModel() const override;
|
||||
DeviceProcessList *createProcessListModel(QObject *parent) const override;
|
||||
bool canCreateProcess() const override { return true; }
|
||||
DeviceProcess *createProcess(QObject *parent) const override;
|
||||
DeviceProcessSignalOperation::Ptr signalOperation() const override;
|
||||
QString qmlProfilerHost() const override;
|
||||
|
||||
IDevice::Ptr clone() const;
|
||||
IDevice::Ptr clone() const override;
|
||||
|
||||
protected:
|
||||
DesktopDevice();
|
||||
@@ -65,5 +64,3 @@ protected:
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // DESKTOPDEVICE_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef DESKTOPDEVICECONFIGURATIONWIDGET_H
|
||||
#define DESKTOPDEVICECONFIGURATIONWIDGET_H
|
||||
#pragma once
|
||||
|
||||
#include "idevicewidget.h"
|
||||
|
||||
@@ -36,9 +35,9 @@ class DesktopDeviceConfigurationWidget : public IDeviceWidget
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit DesktopDeviceConfigurationWidget(const IDevice::Ptr &device, QWidget *parent = 0);
|
||||
~DesktopDeviceConfigurationWidget();
|
||||
~DesktopDeviceConfigurationWidget() override;
|
||||
|
||||
void updateDeviceFromUi();
|
||||
void updateDeviceFromUi() override;
|
||||
|
||||
private:
|
||||
void updateFreePorts();
|
||||
@@ -50,5 +49,3 @@ private:
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // DESKTOPDEVICECONFIGURATIONWIDGET_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef DESKTOPDEVICEFACTORY_H
|
||||
#define DESKTOPDEVICEFACTORY_H
|
||||
#pragma once
|
||||
|
||||
#include "idevicefactory.h"
|
||||
|
||||
@@ -38,16 +37,14 @@ class DesktopDeviceFactory : public IDeviceFactory
|
||||
public:
|
||||
explicit DesktopDeviceFactory(QObject *parent = 0);
|
||||
|
||||
QString displayNameForId(Core::Id type) const;
|
||||
QList<Core::Id> availableCreationIds() const;
|
||||
QString displayNameForId(Core::Id type) const override;
|
||||
QList<Core::Id> availableCreationIds() const override;
|
||||
|
||||
bool canCreate() const;
|
||||
IDevice::Ptr create(Core::Id id) const;
|
||||
bool canRestore(const QVariantMap &map) const;
|
||||
IDevice::Ptr restore(const QVariantMap &map) const;
|
||||
bool canCreate() const override;
|
||||
IDevice::Ptr create(Core::Id id) const override;
|
||||
bool canRestore(const QVariantMap &map) const override;
|
||||
IDevice::Ptr restore(const QVariantMap &map) const override;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // DESKTOPDEVICE_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QTC_DESKTOPDEVICEPROCESS_H
|
||||
#define QTC_DESKTOPDEVICEPROCESS_H
|
||||
#pragma once
|
||||
|
||||
#include "deviceprocess.h"
|
||||
|
||||
@@ -59,5 +58,3 @@ private:
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // Include guard
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef WINDOWSPROCESSSIGNALOPERATION_H
|
||||
#define WINDOWSPROCESSSIGNALOPERATION_H
|
||||
#pragma once
|
||||
|
||||
#include "idevice.h"
|
||||
|
||||
@@ -36,11 +35,10 @@ class PROJECTEXPLORER_EXPORT DesktopProcessSignalOperation : public DeviceProces
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
~DesktopProcessSignalOperation() {}
|
||||
void killProcess(qint64 pid);
|
||||
void killProcess(const QString &filePath);
|
||||
void interruptProcess(qint64 pid);
|
||||
void interruptProcess(const QString &filePath);
|
||||
void killProcess(qint64 pid) override;
|
||||
void killProcess(const QString &filePath) override;
|
||||
void interruptProcess(qint64 pid) override;
|
||||
void interruptProcess(const QString &filePath) override;
|
||||
|
||||
private:
|
||||
void killProcessSilently(qint64 pid);
|
||||
@@ -50,10 +48,9 @@ private:
|
||||
void appendMsgCannotInterrupt(qint64 pid, const QString &why);
|
||||
|
||||
protected:
|
||||
explicit DesktopProcessSignalOperation() {}
|
||||
DesktopProcessSignalOperation() = default;
|
||||
|
||||
friend class DesktopDevice;
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
#endif // WINDOWSPROCESSSIGNALOPERATION_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef ONDEVICEAPPLICATIONRUNNER_H
|
||||
#define ONDEVICEAPPLICATIONRUNNER_H
|
||||
#pragma once
|
||||
|
||||
#include "idevice.h"
|
||||
|
||||
@@ -43,7 +42,7 @@ class PROJECTEXPLORER_EXPORT DeviceApplicationRunner : public QObject
|
||||
|
||||
public:
|
||||
explicit DeviceApplicationRunner(QObject *parent = 0);
|
||||
~DeviceApplicationRunner();
|
||||
~DeviceApplicationRunner() override;
|
||||
|
||||
void start(const IDevice::ConstPtr &device, const Runnable &runnable);
|
||||
void stop();
|
||||
@@ -70,5 +69,3 @@ private:
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // ONDEVICEAPPLICATIONRUNNER_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef PROJECTEXPLORER_DEVICECHECKBUILDSTEP_H
|
||||
#define PROJECTEXPLORER_DEVICECHECKBUILDSTEP_H
|
||||
#pragma once
|
||||
|
||||
#include "../buildstep.h"
|
||||
#include "../projectexplorer_export.h"
|
||||
@@ -51,5 +50,3 @@ public:
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // PROJECTEXPLORER_DEVICECHECKBUILDSTEP_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef DEVICEFACTORYSELECTIONDIALOG_H
|
||||
#define DEVICEFACTORYSELECTIONDIALOG_H
|
||||
#pragma once
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
@@ -42,7 +41,7 @@ class DeviceFactorySelectionDialog : public QDialog
|
||||
|
||||
public:
|
||||
explicit DeviceFactorySelectionDialog(QWidget *parent = 0);
|
||||
~DeviceFactorySelectionDialog();
|
||||
~DeviceFactorySelectionDialog() override;
|
||||
Core::Id selectedId() const;
|
||||
|
||||
private:
|
||||
@@ -53,5 +52,3 @@ private:
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // DEVICEFACTORYSELECTIONDIALOG_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef DEVICEMANAGER_H
|
||||
#define DEVICEMANAGER_H
|
||||
#pragma once
|
||||
|
||||
#include "idevice.h"
|
||||
|
||||
@@ -53,7 +52,7 @@ class PROJECTEXPLORER_EXPORT DeviceManager : public QObject
|
||||
friend class IDevice;
|
||||
|
||||
public:
|
||||
~DeviceManager();
|
||||
~DeviceManager() override;
|
||||
|
||||
static DeviceManager *instance();
|
||||
|
||||
@@ -116,5 +115,3 @@ private:
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // DEVICEMANAGER_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef DEVICEMANAGERMODEL_H
|
||||
#define DEVICEMANAGERMODEL_H
|
||||
#pragma once
|
||||
|
||||
#include "../projectexplorer_export.h"
|
||||
#include "idevice.h"
|
||||
@@ -41,7 +40,7 @@ class PROJECTEXPLORER_EXPORT DeviceManagerModel : public QAbstractListModel
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit DeviceManagerModel(const DeviceManager *deviceManager, QObject *parent = 0);
|
||||
~DeviceManagerModel();
|
||||
~DeviceManagerModel() override;
|
||||
|
||||
void setFilter(const QList<Core::Id> &filter);
|
||||
void setTypeFilter(Core::Id type);
|
||||
@@ -50,7 +49,7 @@ public:
|
||||
Core::Id deviceId(int pos) const;
|
||||
int indexOf(IDevice::ConstPtr dev) const;
|
||||
int indexForId(Core::Id id) const;
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
|
||||
void updateDevice(Core::Id id);
|
||||
|
||||
@@ -60,12 +59,10 @@ private:
|
||||
void handleDeviceUpdated(Core::Id id);
|
||||
void handleDeviceListChanged();
|
||||
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||
bool matchesTypeFilter(const IDevice::ConstPtr &dev) const;
|
||||
|
||||
Internal::DeviceManagerModelPrivate * const d;
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // DEVICEMANAGERMODEL_H
|
||||
|
||||
@@ -36,10 +36,6 @@ DeviceProcess::DeviceProcess(const IDevice::ConstPtr &device, QObject *parent)
|
||||
{
|
||||
}
|
||||
|
||||
DeviceProcess::~DeviceProcess()
|
||||
{
|
||||
}
|
||||
|
||||
IDevice::ConstPtr DeviceProcess::device() const
|
||||
{
|
||||
return m_device;
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QTC_DEVICEPROCESS_H
|
||||
#define QTC_DEVICEPROCESS_H
|
||||
#pragma once
|
||||
|
||||
#include "../projectexplorer_export.h"
|
||||
#include "../runconfiguration.h"
|
||||
@@ -43,8 +42,6 @@ class PROJECTEXPLORER_EXPORT DeviceProcess : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
virtual ~DeviceProcess();
|
||||
|
||||
virtual void start(const Runnable &runnable) = 0;
|
||||
virtual void interrupt() = 0;
|
||||
virtual void terminate() = 0;
|
||||
@@ -69,7 +66,7 @@ signals:
|
||||
void readyReadStandardError();
|
||||
|
||||
protected:
|
||||
DeviceProcess(const QSharedPointer<const IDevice> &device, QObject *parent = 0);
|
||||
explicit DeviceProcess(const QSharedPointer<const IDevice> &device, QObject *parent = 0);
|
||||
QSharedPointer<const IDevice> device() const;
|
||||
|
||||
private:
|
||||
@@ -77,5 +74,3 @@ private:
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // Include guard.
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef DEVICEPROCESSESDIALOG_H
|
||||
#define DEVICEPROCESSESDIALOG_H
|
||||
#pragma once
|
||||
|
||||
#include "../projectexplorer_export.h"
|
||||
|
||||
@@ -45,7 +44,7 @@ class PROJECTEXPLORER_EXPORT DeviceProcessesDialog : public QDialog
|
||||
|
||||
public:
|
||||
explicit DeviceProcessesDialog(QWidget *parent = 0);
|
||||
~DeviceProcessesDialog();
|
||||
~DeviceProcessesDialog() override;
|
||||
void addAcceptButton(const QString &label);
|
||||
void addCloseButton();
|
||||
|
||||
@@ -63,5 +62,3 @@ private:
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // DEVICEPROCESSESDIALOG_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef DEVICEPROCESSLIST_H
|
||||
#define DEVICEPROCESSLIST_H
|
||||
#pragma once
|
||||
|
||||
#include "idevice.h"
|
||||
|
||||
@@ -52,7 +51,7 @@ class PROJECTEXPLORER_EXPORT DeviceProcessList : public QAbstractItemModel
|
||||
|
||||
public:
|
||||
DeviceProcessList(const IDevice::ConstPtr &device, QObject *parent = 0);
|
||||
~DeviceProcessList();
|
||||
~DeviceProcessList() override;
|
||||
|
||||
void update();
|
||||
void killProcess(int row);
|
||||
@@ -73,14 +72,14 @@ protected:
|
||||
IDevice::ConstPtr device() const;
|
||||
|
||||
private:
|
||||
QModelIndex index(int row, int column, const QModelIndex &parent) const;
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
||||
int columnCount(const QModelIndex &parent = QModelIndex()) const;
|
||||
QModelIndex index(int row, int column, const QModelIndex &parent) const override;
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
QVariant headerData(int section, Qt::Orientation orientation,
|
||||
int role = Qt::DisplayRole) const;
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
|
||||
QModelIndex parent(const QModelIndex &) const;
|
||||
bool hasChildren(const QModelIndex &parent) const;
|
||||
int role = Qt::DisplayRole) const override;
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||
QModelIndex parent(const QModelIndex &) const override;
|
||||
bool hasChildren(const QModelIndex &parent) const override;
|
||||
|
||||
virtual void doUpdate() = 0;
|
||||
virtual void doKillProcess(const DeviceProcessItem &process) = 0;
|
||||
@@ -91,5 +90,3 @@ private:
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // DEVICEPROCESSLIST_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef DEVICESETTINGSPAGE_H
|
||||
#define DEVICESETTINGSPAGE_H
|
||||
#pragma once
|
||||
|
||||
#include <coreplugin/dialogs/ioptionspage.h>
|
||||
|
||||
@@ -42,9 +41,9 @@ class DeviceSettingsPage : public Core::IOptionsPage
|
||||
public:
|
||||
DeviceSettingsPage(QObject *parent = 0);
|
||||
|
||||
QWidget *widget();
|
||||
void apply();
|
||||
void finish();
|
||||
QWidget *widget() override;
|
||||
void apply() override;
|
||||
void finish() override;
|
||||
|
||||
private:
|
||||
QPointer<DeviceSettingsWidget> m_widget;
|
||||
@@ -52,5 +51,3 @@ private:
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // DEVICESETTINGSPAGE_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef DEVICESETTINGSWIDGET_H
|
||||
#define DEVICESETTINGSWIDGET_H
|
||||
#pragma once
|
||||
|
||||
#include "idevice.h"
|
||||
|
||||
@@ -51,7 +50,7 @@ class DeviceSettingsWidget : public QWidget
|
||||
Q_OBJECT
|
||||
public:
|
||||
DeviceSettingsWidget(QWidget *parent = 0);
|
||||
~DeviceSettingsWidget();
|
||||
~DeviceSettingsWidget() override;
|
||||
|
||||
void saveSettings();
|
||||
|
||||
@@ -87,5 +86,3 @@ private:
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // DEVICESETTINGSWIDGET_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef DEVICETESTDIALOG_H
|
||||
#define DEVICETESTDIALOG_H
|
||||
#pragma once
|
||||
|
||||
#include "idevice.h"
|
||||
|
||||
@@ -39,9 +38,9 @@ class DeviceTestDialog : public QDialog
|
||||
|
||||
public:
|
||||
DeviceTestDialog(const IDevice::ConstPtr &deviceConfiguration, QWidget *parent = 0);
|
||||
~DeviceTestDialog();
|
||||
~DeviceTestDialog() override;
|
||||
|
||||
void reject();
|
||||
void reject() override;
|
||||
|
||||
private:
|
||||
void handleProgressMessage(const QString &message);
|
||||
@@ -56,5 +55,3 @@ private:
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // Include guard.
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef DEVICEUSEDPORTSGATHERER_H
|
||||
#define DEVICEUSEDPORTSGATHERER_H
|
||||
#pragma once
|
||||
|
||||
#include "idevice.h"
|
||||
|
||||
@@ -39,7 +38,7 @@ class PROJECTEXPLORER_EXPORT DeviceUsedPortsGatherer : public QObject
|
||||
|
||||
public:
|
||||
DeviceUsedPortsGatherer(QObject *parent = 0);
|
||||
~DeviceUsedPortsGatherer();
|
||||
~DeviceUsedPortsGatherer() override;
|
||||
|
||||
void start(const ProjectExplorer::IDevice::ConstPtr &device);
|
||||
void stop();
|
||||
@@ -63,5 +62,3 @@ private:
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // DEVICEUSEDPORTSGATHERER_H
|
||||
|
||||
@@ -155,7 +155,6 @@ public:
|
||||
};
|
||||
} // namespace Internal
|
||||
|
||||
PortsGatheringMethod::~PortsGatheringMethod() { }
|
||||
DeviceTester::DeviceTester(QObject *parent) : QObject(parent) { }
|
||||
|
||||
IDevice::IDevice() : d(new Internal::IDevicePrivate)
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef IDEVICE_H
|
||||
#define IDEVICE_H
|
||||
#pragma once
|
||||
|
||||
#include "../projectexplorer_export.h"
|
||||
|
||||
@@ -58,7 +57,6 @@ class PROJECTEXPLORER_EXPORT DeviceProcessSignalOperation : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
~DeviceProcessSignalOperation() {}
|
||||
typedef QSharedPointer<DeviceProcessSignalOperation> Ptr;
|
||||
|
||||
virtual void killProcess(qint64 pid) = 0;
|
||||
@@ -84,7 +82,7 @@ class PROJECTEXPLORER_EXPORT PortsGatheringMethod
|
||||
public:
|
||||
typedef QSharedPointer<const PortsGatheringMethod> Ptr;
|
||||
|
||||
virtual ~PortsGatheringMethod();
|
||||
virtual ~PortsGatheringMethod() = default;
|
||||
virtual QByteArray commandLine(QAbstractSocket::NetworkLayerProtocol protocol) const = 0;
|
||||
virtual QList<int> usedPorts(const QByteArray &commandOutput) const = 0;
|
||||
};
|
||||
@@ -207,5 +205,3 @@ protected:
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // IDEVICE_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef IDEVICEFACTORY_H
|
||||
#define IDEVICEFACTORY_H
|
||||
#pragma once
|
||||
|
||||
#include "idevice.h"
|
||||
#include <projectexplorer/projectexplorer_export.h>
|
||||
@@ -51,19 +50,15 @@ public:
|
||||
virtual QList<Core::Id> availableCreationIds() const = 0;
|
||||
|
||||
virtual bool canCreate() const;
|
||||
|
||||
virtual IDevice::Ptr create(Core::Id id) const = 0;
|
||||
|
||||
virtual bool canRestore(const QVariantMap &map) const = 0;
|
||||
|
||||
virtual IDevice::Ptr restore(const QVariantMap &map) const = 0;
|
||||
|
||||
static IDeviceFactory *find(Core::Id type);
|
||||
|
||||
protected:
|
||||
IDeviceFactory(QObject *parent = 0);
|
||||
explicit IDeviceFactory(QObject *parent = 0);
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // IDEVICEFACTORY_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef IDEVICEWIDGET_H
|
||||
#define IDEVICEWIDGET_H
|
||||
#pragma once
|
||||
|
||||
#include "idevice.h"
|
||||
#include <projectexplorer/projectexplorer_export.h>
|
||||
@@ -41,8 +40,9 @@ public:
|
||||
virtual void updateDeviceFromUi() = 0;
|
||||
|
||||
protected:
|
||||
IDeviceWidget(const IDevice::Ptr &device, QWidget *parent = 0)
|
||||
: QWidget(parent), m_device(device) {}
|
||||
explicit IDeviceWidget(const IDevice::Ptr &device, QWidget *parent = 0) : QWidget(parent),
|
||||
m_device(device)
|
||||
{ }
|
||||
|
||||
IDevice::Ptr device() const { return m_device; }
|
||||
|
||||
@@ -51,5 +51,3 @@ private:
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // IDEVICEWIDGET_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef LOCALPROCESSLIST_H
|
||||
#define LOCALPROCESSLIST_H
|
||||
#pragma once
|
||||
|
||||
#include "deviceprocesslist.h"
|
||||
|
||||
@@ -42,24 +41,21 @@ class LocalProcessList : public DeviceProcessList
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
LocalProcessList(const IDevice::ConstPtr &device, QObject *parent = 0);
|
||||
virtual Qt::ItemFlags flags(const QModelIndex &index) const;
|
||||
explicit LocalProcessList(const IDevice::ConstPtr &device, QObject *parent = 0);
|
||||
Qt::ItemFlags flags(const QModelIndex &index) const override;
|
||||
|
||||
static QList<DeviceProcessItem> getLocalProcesses();
|
||||
|
||||
private:
|
||||
void doUpdate();
|
||||
void doKillProcess(const DeviceProcessItem &process);
|
||||
void doUpdate() override;
|
||||
void doKillProcess(const DeviceProcessItem &process) override;
|
||||
|
||||
private:
|
||||
void handleUpdate();
|
||||
void reportDelayedKillStatus(const QString &errorMessage);
|
||||
|
||||
const qint64 m_myPid;
|
||||
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // LOCALPROCESSLIST_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QTC_SSHDEVICEPROCESS_H
|
||||
#define QTC_SSHDEVICEPROCESS_H
|
||||
#pragma once
|
||||
|
||||
#include "deviceprocess.h"
|
||||
|
||||
@@ -36,23 +35,23 @@ class PROJECTEXPLORER_EXPORT SshDeviceProcess : public DeviceProcess
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SshDeviceProcess(const QSharedPointer<const IDevice> &device, QObject *parent = 0);
|
||||
~SshDeviceProcess();
|
||||
explicit SshDeviceProcess(const QSharedPointer<const IDevice> &device, QObject *parent = 0);
|
||||
~SshDeviceProcess() override;
|
||||
|
||||
void start(const Runnable &runnable);
|
||||
void interrupt();
|
||||
void terminate();
|
||||
void kill();
|
||||
void start(const Runnable &runnable) override;
|
||||
void interrupt() override;
|
||||
void terminate() override;
|
||||
void kill() override;
|
||||
|
||||
QProcess::ProcessState state() const;
|
||||
QProcess::ExitStatus exitStatus() const;
|
||||
int exitCode() const;
|
||||
QString errorString() const;
|
||||
QProcess::ProcessState state() const override;
|
||||
QProcess::ExitStatus exitStatus() const override;
|
||||
int exitCode() const override;
|
||||
QString errorString() const override;
|
||||
|
||||
QByteArray readAllStandardOutput();
|
||||
QByteArray readAllStandardError();
|
||||
QByteArray readAllStandardOutput() override;
|
||||
QByteArray readAllStandardError() override;
|
||||
|
||||
qint64 write(const QByteArray &data);
|
||||
qint64 write(const QByteArray &data) override;
|
||||
|
||||
// Default is "false" due to OpenSSH not implementing this feature for some reason.
|
||||
void setSshServerSupportsSignals(bool signalsSupported);
|
||||
@@ -76,5 +75,3 @@ private:
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // Include guard.
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef SSHDEVICEPROCESSLIST_H
|
||||
#define SSHDEVICEPROCESSLIST_H
|
||||
#pragma once
|
||||
|
||||
#include "deviceprocesslist.h"
|
||||
|
||||
@@ -35,7 +34,7 @@ class PROJECTEXPLORER_EXPORT SshDeviceProcessList : public DeviceProcessList
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit SshDeviceProcessList(const IDevice::ConstPtr &device, QObject *parent = 0);
|
||||
~SshDeviceProcessList();
|
||||
~SshDeviceProcessList() override;
|
||||
|
||||
private:
|
||||
void handleConnectionError();
|
||||
@@ -45,8 +44,8 @@ private:
|
||||
virtual QString listProcessesCommandLine() const = 0;
|
||||
virtual QList<DeviceProcessItem> buildProcessList(const QString &listProcessesReply) const = 0;
|
||||
|
||||
void doUpdate();
|
||||
void doKillProcess(const DeviceProcessItem &process);
|
||||
void doUpdate() override;
|
||||
void doKillProcess(const DeviceProcessItem &process) override;
|
||||
|
||||
void handleProcessError(const QString &errorMessage);
|
||||
void setFinished();
|
||||
@@ -56,5 +55,3 @@ private:
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // SSHDEVICEPROCESSLIST_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef DOUBLETABWIDGET_H
|
||||
#define DOUBLETABWIDGET_H
|
||||
#pragma once
|
||||
|
||||
#include <QVector>
|
||||
#include <QWidget>
|
||||
@@ -39,8 +38,8 @@ class DoubleTabWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
DoubleTabWidget(QWidget *parent = 0);
|
||||
~DoubleTabWidget();
|
||||
explicit DoubleTabWidget(QWidget *parent = 0);
|
||||
~DoubleTabWidget() override;
|
||||
|
||||
void setTitle(const QString &title);
|
||||
QString title() const { return m_title; }
|
||||
@@ -63,10 +62,10 @@ signals:
|
||||
void currentIndexChanged(int index, int subIndex);
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *event);
|
||||
void mousePressEvent(QMouseEvent *event);
|
||||
bool event(QEvent *event);
|
||||
QSize minimumSizeHint() const;
|
||||
void paintEvent(QPaintEvent *event) override;
|
||||
void mousePressEvent(QMouseEvent *event) override;
|
||||
bool event(QEvent *event) override;
|
||||
QSize minimumSizeHint() const override;
|
||||
|
||||
private:
|
||||
struct Tab {
|
||||
@@ -97,5 +96,3 @@ private:
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // DOUBLETABWIDGET_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef EDITORCONFIGURATION_H
|
||||
#define EDITORCONFIGURATION_H
|
||||
#pragma once
|
||||
|
||||
#include "projectexplorer_export.h"
|
||||
|
||||
@@ -60,7 +59,7 @@ class PROJECTEXPLORER_EXPORT EditorConfiguration : public QObject
|
||||
|
||||
public:
|
||||
EditorConfiguration();
|
||||
~EditorConfiguration();
|
||||
~EditorConfiguration() override;
|
||||
|
||||
void setUseGlobalSettings(bool use);
|
||||
bool useGlobalSettings() const;
|
||||
@@ -117,6 +116,4 @@ private:
|
||||
PROJECTEXPLORER_EXPORT TextEditor::TabSettings actualTabSettings(
|
||||
const QString &fileName, const TextEditor::TextDocument *baseTextDocument);
|
||||
|
||||
} // ProjectExplorer
|
||||
|
||||
#endif // EDITORCONFIGURATION_H
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef EDITORSETTINGSPROPERTIESPAGE_H
|
||||
#define EDITORSETTINGSPROPERTIESPAGE_H
|
||||
#pragma once
|
||||
|
||||
#include "ui_editorsettingspropertiespage.h"
|
||||
|
||||
@@ -38,7 +37,7 @@ class EditorSettingsWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
EditorSettingsWidget(Project *project);
|
||||
explicit EditorSettingsWidget(Project *project);
|
||||
|
||||
private:
|
||||
void globalSettingsActivated(int index);
|
||||
@@ -52,5 +51,3 @@ private:
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // EDITORSETTINGSPROPERTIESPAGE_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef ENVIRONMENTASPECT_H
|
||||
#define ENVIRONMENTASPECT_H
|
||||
#pragma once
|
||||
|
||||
#include "projectexplorer_export.h"
|
||||
|
||||
@@ -43,7 +42,7 @@ class PROJECTEXPLORER_EXPORT EnvironmentAspect : public IRunConfigurationAspect
|
||||
|
||||
public:
|
||||
// IRunConfigurationAspect:
|
||||
RunConfigWidget *createConfigurationWidget();
|
||||
RunConfigWidget *createConfigurationWidget() override;
|
||||
|
||||
virtual QList<int> possibleBaseEnvironments() const = 0;
|
||||
virtual QString baseEnvironmentDisplayName(int base) const = 0;
|
||||
@@ -64,8 +63,8 @@ signals:
|
||||
|
||||
protected:
|
||||
explicit EnvironmentAspect(RunConfiguration *rc);
|
||||
void fromMap(const QVariantMap &map);
|
||||
void toMap(QVariantMap &map) const;
|
||||
void fromMap(const QVariantMap &map) override;
|
||||
void toMap(QVariantMap &map) const override;
|
||||
|
||||
private:
|
||||
mutable int m_base;
|
||||
@@ -73,5 +72,3 @@ private:
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // ENVIRONMENTASPECT_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef ENVIRONMENTASPECTWIDGET_H
|
||||
#define ENVIRONMENTASPECTWIDGET_H
|
||||
#pragma once
|
||||
|
||||
#include "projectexplorer_export.h"
|
||||
|
||||
@@ -51,9 +50,9 @@ class PROJECTEXPLORER_EXPORT EnvironmentAspectWidget : public RunConfigWidget
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
EnvironmentAspectWidget(EnvironmentAspect *aspect, QWidget *additionalWidget = 0);
|
||||
explicit EnvironmentAspectWidget(EnvironmentAspect *aspect, QWidget *additionalWidget = 0);
|
||||
|
||||
QString displayName() const;
|
||||
QString displayName() const override;
|
||||
virtual EnvironmentAspect *aspect() const;
|
||||
|
||||
QWidget *additionalWidget() const;
|
||||
@@ -75,5 +74,3 @@ private:
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // ENVIRONMENTASPECTWIDGET_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef ENVIRONMENTITEMSWIDGET_H
|
||||
#define ENVIRONMENTITEMSWIDGET_H
|
||||
#pragma once
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
@@ -38,7 +37,7 @@ class EnvironmentItemsWidget : public QWidget
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit EnvironmentItemsWidget(QWidget *parent = 0);
|
||||
~EnvironmentItemsWidget();
|
||||
~EnvironmentItemsWidget() override;
|
||||
|
||||
void setEnvironmentItems(const QList<Utils::EnvironmentItem> &items);
|
||||
QList<Utils::EnvironmentItem> environmentItems() const;
|
||||
@@ -55,18 +54,16 @@ class EnvironmentItemsDialog : public QDialog
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit EnvironmentItemsDialog(QWidget *parent = 0);
|
||||
~EnvironmentItemsDialog();
|
||||
~EnvironmentItemsDialog() override;
|
||||
|
||||
void setEnvironmentItems(const QList<Utils::EnvironmentItem> &items);
|
||||
QList<Utils::EnvironmentItem> environmentItems() const;
|
||||
|
||||
static QList<Utils::EnvironmentItem> getEnvironmentItems(QWidget *parent,
|
||||
const QList<Utils::EnvironmentItem> &initial, bool *ok = 0);
|
||||
static QList<Utils::EnvironmentItem>
|
||||
getEnvironmentItems(QWidget *parent, const QList<Utils::EnvironmentItem> &initial, bool *ok = 0);
|
||||
|
||||
private:
|
||||
EnvironmentItemsDialogPrivate *d;
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // ENVIRONMENTITEMSWIDGET_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef ENVIRONMENTWIDGET_H
|
||||
#define ENVIRONMENTWIDGET_H
|
||||
#pragma once
|
||||
|
||||
#include "projectexplorer_export.h"
|
||||
|
||||
@@ -36,7 +35,7 @@ QT_FORWARD_DECLARE_CLASS(QModelIndex)
|
||||
namespace Utils {
|
||||
class Environment;
|
||||
class EnvironmentItem;
|
||||
}
|
||||
} // namespace Utils
|
||||
|
||||
namespace ProjectExplorer {
|
||||
namespace Internal {
|
||||
@@ -48,7 +47,7 @@ protected:
|
||||
QModelIndex moveCursor(CursorAction cursorAction, Qt::KeyboardModifiers modifiers);
|
||||
void keyPressEvent(QKeyEvent *event);
|
||||
};
|
||||
}
|
||||
} // namespace Internal
|
||||
|
||||
class EnvironmentWidgetPrivate;
|
||||
|
||||
@@ -58,7 +57,7 @@ class PROJECTEXPLORER_EXPORT EnvironmentWidget : public QWidget
|
||||
|
||||
public:
|
||||
explicit EnvironmentWidget(QWidget *parent, QWidget *additionalDetailsWidget = 0);
|
||||
virtual ~EnvironmentWidget();
|
||||
~EnvironmentWidget() override;
|
||||
|
||||
void setBaseEnvironmentText(const QString &text);
|
||||
void setBaseEnvironment(const Utils::Environment &env);
|
||||
@@ -87,5 +86,3 @@ private:
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // ENVIRONMENTWIDGET_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef EXPANDDATA_H
|
||||
#define EXPANDDATA_H
|
||||
#pragma once
|
||||
|
||||
#include <QString>
|
||||
#include <QHash>
|
||||
@@ -49,5 +48,3 @@ int qHash(const ExpandData &data);
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // EXPANDDATA_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef FOLDERNAVIGATIONWIDGET_H
|
||||
#define FOLDERNAVIGATIONWIDGET_H
|
||||
#pragma once
|
||||
|
||||
#include <coreplugin/inavigationwidgetfactory.h>
|
||||
|
||||
@@ -49,7 +48,7 @@ class FolderNavigationWidget : public QWidget
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(bool autoSynchronization READ autoSynchronization WRITE setAutoSynchronization)
|
||||
public:
|
||||
FolderNavigationWidget(QWidget *parent = 0);
|
||||
explicit FolderNavigationWidget(QWidget *parent = 0);
|
||||
|
||||
bool autoSynchronization() const;
|
||||
bool hiddenFilesFilter() const;
|
||||
@@ -65,7 +64,7 @@ private:
|
||||
void ensureCurrentIndex();
|
||||
|
||||
protected:
|
||||
virtual void contextMenuEvent(QContextMenuEvent *ev);
|
||||
void contextMenuEvent(QContextMenuEvent *ev) override;
|
||||
|
||||
private:
|
||||
void setCurrentTitle(QString dirName, const QString &fullPath);
|
||||
@@ -91,12 +90,10 @@ class FolderNavigationWidgetFactory : public Core::INavigationWidgetFactory
|
||||
public:
|
||||
FolderNavigationWidgetFactory();
|
||||
|
||||
Core::NavigationView createWidget();
|
||||
void saveSettings(int position, QWidget *widget);
|
||||
void restoreSettings(int position, QWidget *widget);
|
||||
Core::NavigationView createWidget() override;
|
||||
void saveSettings(int position, QWidget *widget) override;
|
||||
void restoreSettings(int position, QWidget *widget) override;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // FOLDERNAVIGATIONWIDGET_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef GCCPARSER_H
|
||||
#define GCCPARSER_H
|
||||
#pragma once
|
||||
|
||||
#include "ioutputparser.h"
|
||||
|
||||
@@ -41,12 +40,12 @@ class PROJECTEXPLORER_EXPORT GccParser : public ProjectExplorer::IOutputParser
|
||||
public:
|
||||
GccParser();
|
||||
|
||||
void stdError(const QString &line);
|
||||
void stdOutput(const QString &line);
|
||||
void stdError(const QString &line) override;
|
||||
void stdOutput(const QString &line) override;
|
||||
|
||||
protected:
|
||||
void newTask(const Task &task);
|
||||
void doFlush();
|
||||
void doFlush() override;
|
||||
|
||||
void amendDescription(const QString &desc, bool monospaced);
|
||||
|
||||
@@ -60,5 +59,3 @@ private:
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // GCCPARSER_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef GCCTOOLCHAIN_H
|
||||
#define GCCTOOLCHAIN_H
|
||||
#pragma once
|
||||
|
||||
#include "projectexplorer_export.h"
|
||||
|
||||
@@ -222,5 +221,3 @@ private:
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // GCCTOOLCHAIN_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef GCCTOOLCHAINFACTORIES_H
|
||||
#define GCCTOOLCHAINFACTORIES_H
|
||||
#pragma once
|
||||
|
||||
#include "toolchain.h"
|
||||
#include "toolchainconfigwidget.h"
|
||||
@@ -51,13 +50,13 @@ class GccToolChainFactory : public ToolChainFactory
|
||||
public:
|
||||
GccToolChainFactory();
|
||||
|
||||
QList<ToolChain *> autoDetect(const QList<ToolChain *> &alreadyKnown);
|
||||
QList<ToolChain *> autoDetect(const QList<ToolChain *> &alreadyKnown) override;
|
||||
|
||||
bool canCreate();
|
||||
ToolChain *create();
|
||||
bool canCreate() override;
|
||||
ToolChain *create() override;
|
||||
|
||||
bool canRestore(const QVariantMap &data);
|
||||
ToolChain *restore(const QVariantMap &data);
|
||||
bool canRestore(const QVariantMap &data) override;
|
||||
ToolChain *restore(const QVariantMap &data) override;
|
||||
|
||||
protected:
|
||||
virtual GccToolChain *createToolChain(bool autoDetect);
|
||||
@@ -75,7 +74,7 @@ class GccToolChainConfigWidget : public ToolChainConfigWidget
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
GccToolChainConfigWidget(GccToolChain *);
|
||||
explicit GccToolChainConfigWidget(GccToolChain *tc);
|
||||
static QStringList splitString(const QString &s);
|
||||
|
||||
private:
|
||||
@@ -83,10 +82,10 @@ private:
|
||||
void handlePlatformCodeGenFlagsChange();
|
||||
void handlePlatformLinkerFlagsChange();
|
||||
|
||||
void applyImpl();
|
||||
void discardImpl() { setFromToolchain(); }
|
||||
bool isDirtyImpl() const;
|
||||
void makeReadOnlyImpl();
|
||||
void applyImpl() override;
|
||||
void discardImpl() override { setFromToolchain(); }
|
||||
bool isDirtyImpl() const override;
|
||||
void makeReadOnlyImpl() override;
|
||||
|
||||
void setFromToolchain();
|
||||
|
||||
@@ -110,12 +109,12 @@ class ClangToolChainFactory : public GccToolChainFactory
|
||||
public:
|
||||
ClangToolChainFactory();
|
||||
|
||||
QList<ToolChain *> autoDetect(const QList<ToolChain *> &alreadyKnown);
|
||||
QList<ToolChain *> autoDetect(const QList<ToolChain *> &alreadyKnown) override;
|
||||
|
||||
bool canRestore(const QVariantMap &data);
|
||||
bool canRestore(const QVariantMap &data) override;
|
||||
|
||||
protected:
|
||||
GccToolChain *createToolChain(bool autoDetect);
|
||||
GccToolChain *createToolChain(bool autoDetect) override;
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
@@ -129,12 +128,12 @@ class MingwToolChainFactory : public GccToolChainFactory
|
||||
public:
|
||||
MingwToolChainFactory();
|
||||
|
||||
QList<ToolChain *> autoDetect(const QList<ToolChain *> &alreadyKnown);
|
||||
QList<ToolChain *> autoDetect(const QList<ToolChain *> &alreadyKnown) override;
|
||||
|
||||
bool canRestore(const QVariantMap &data);
|
||||
bool canRestore(const QVariantMap &data) override;
|
||||
|
||||
protected:
|
||||
GccToolChain *createToolChain(bool autoDetect);
|
||||
GccToolChain *createToolChain(bool autoDetect) override;
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
@@ -148,15 +147,13 @@ class LinuxIccToolChainFactory : public GccToolChainFactory
|
||||
public:
|
||||
LinuxIccToolChainFactory();
|
||||
|
||||
QList<ToolChain *> autoDetect(const QList<ToolChain *> &alreadyKnown);
|
||||
QList<ToolChain *> autoDetect(const QList<ToolChain *> &alreadyKnown) override;
|
||||
|
||||
bool canRestore(const QVariantMap &data);
|
||||
bool canRestore(const QVariantMap &data) override;
|
||||
|
||||
protected:
|
||||
GccToolChain *createToolChain(bool autoDetect);
|
||||
GccToolChain *createToolChain(bool autoDetect) override;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // GCCTOOLCHAINFACTORIES_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef GNUMAKEPARSER_H
|
||||
#define GNUMAKEPARSER_H
|
||||
#pragma once
|
||||
|
||||
#include "ioutputparser.h"
|
||||
|
||||
@@ -40,16 +39,16 @@ class PROJECTEXPLORER_EXPORT GnuMakeParser : public ProjectExplorer::IOutputPars
|
||||
public:
|
||||
explicit GnuMakeParser();
|
||||
|
||||
void stdOutput(const QString &line);
|
||||
void stdError(const QString &line);
|
||||
void stdOutput(const QString &line) override;
|
||||
void stdError(const QString &line) override;
|
||||
|
||||
void setWorkingDirectory(const QString &workingDirectory);
|
||||
void setWorkingDirectory(const QString &workingDirectory) override;
|
||||
|
||||
QStringList searchDirectories() const;
|
||||
|
||||
bool hasFatalErrors() const;
|
||||
bool hasFatalErrors() const override;
|
||||
|
||||
void taskAdded(const ProjectExplorer::Task &task, int linkedLines, int skippedLines);
|
||||
void taskAdded(const ProjectExplorer::Task &task, int linkedLines, int skippedLines) override;
|
||||
|
||||
private:
|
||||
void addDirectory(const QString &dir);
|
||||
@@ -85,5 +84,3 @@ public:
|
||||
#endif
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // GNUMAKEPARSER_H
|
||||
|
||||
@@ -23,9 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef HEADERPATH_H
|
||||
#define HEADERPATH_H
|
||||
|
||||
#pragma once
|
||||
#include <QString>
|
||||
|
||||
#include "projectexplorer_export.h"
|
||||
@@ -41,12 +39,10 @@ public:
|
||||
FrameworkHeaderPath
|
||||
};
|
||||
|
||||
HeaderPath()
|
||||
: m_kind(GlobalHeaderPath)
|
||||
HeaderPath() : m_kind(GlobalHeaderPath)
|
||||
{ }
|
||||
|
||||
HeaderPath(const QString &path, Kind kind)
|
||||
: m_path(path), m_kind(kind)
|
||||
HeaderPath(const QString &path, Kind kind) : m_path(path), m_kind(kind)
|
||||
{ }
|
||||
|
||||
QString path() const { return m_path; }
|
||||
@@ -54,8 +50,7 @@ public:
|
||||
|
||||
bool operator==(const HeaderPath &other) const
|
||||
{
|
||||
return m_kind == other.m_kind
|
||||
&& m_path == other.m_path;
|
||||
return m_kind == other.m_kind && m_path == other.m_path;
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -64,5 +59,3 @@ private:
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // HEADERPATH_H
|
||||
|
||||
@@ -64,9 +64,6 @@ ImportWidget::ImportWidget(QWidget *parent) :
|
||||
detailsWidget->setWidget(widget);
|
||||
}
|
||||
|
||||
ImportWidget::~ImportWidget()
|
||||
{ }
|
||||
|
||||
void ImportWidget::setCurrentDirectory(const Utils::FileName &dir)
|
||||
{
|
||||
m_pathChooser->setBaseFileName(dir);
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef IMPORTWIDGET_H
|
||||
#define IMPORTWIDGET_H
|
||||
#pragma once
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
@@ -42,7 +41,6 @@ class ImportWidget : public QWidget
|
||||
|
||||
public:
|
||||
explicit ImportWidget(QWidget *parent = 0);
|
||||
~ImportWidget();
|
||||
|
||||
void setCurrentDirectory(const Utils::FileName &dir);
|
||||
|
||||
@@ -57,5 +55,3 @@ private:
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // IMPORTWIDGET_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef IOUTPUTPARSER_H
|
||||
#define IOUTPUTPARSER_H
|
||||
#pragma once
|
||||
|
||||
#include "projectexplorer_export.h"
|
||||
#include "buildstep.h"
|
||||
@@ -40,7 +39,7 @@ class PROJECTEXPLORER_EXPORT IOutputParser : public QObject
|
||||
Q_OBJECT
|
||||
public:
|
||||
IOutputParser() = default;
|
||||
~IOutputParser();
|
||||
~IOutputParser() override;
|
||||
|
||||
virtual void appendOutputParser(IOutputParser *parser);
|
||||
|
||||
@@ -77,5 +76,3 @@ private:
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
Q_DECLARE_METATYPE(ProjectExplorer::IOutputParser*)
|
||||
|
||||
#endif // IOUTPUTPARSER_H
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of Qt Creator.
|
||||
**
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "ipotentialkit.h"
|
||||
|
||||
ProjectExplorer::IPotentialKit::~IPotentialKit()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef IPOTENTIALKIT_H
|
||||
#define IPOTENTIALKIT_H
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
#include <QMetaType>
|
||||
@@ -36,7 +35,6 @@ class PROJECTEXPLORER_EXPORT IPotentialKit : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
virtual ~IPotentialKit();
|
||||
virtual QString displayName() const = 0;
|
||||
virtual void executeFromMenu() = 0;
|
||||
virtual QWidget *createWidget(QWidget *parent) const = 0;
|
||||
@@ -45,5 +43,3 @@ public:
|
||||
|
||||
}
|
||||
Q_DECLARE_METATYPE(ProjectExplorer::IPotentialKit*)
|
||||
|
||||
#endif // IPOTENTIALKIT_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef PROJECTMANAGER_H
|
||||
#define PROJECTMANAGER_H
|
||||
#pragma once
|
||||
|
||||
#include "projectexplorer_export.h"
|
||||
|
||||
@@ -34,19 +33,14 @@ namespace ProjectExplorer {
|
||||
|
||||
class Project;
|
||||
|
||||
class PROJECTEXPLORER_EXPORT IProjectManager
|
||||
: public QObject
|
||||
class PROJECTEXPLORER_EXPORT IProjectManager : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
IProjectManager() {}
|
||||
|
||||
virtual QString mimeType() const = 0;
|
||||
// fileName is a canonical path!
|
||||
virtual Project *openProject(const QString &fileName, QString *errorString) = 0;
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif //PROJECTMANAGER_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef PROJECTEXPLORER_ITASKHANDLER_H
|
||||
#define PROJECTEXPLORER_ITASKHANDLER_H
|
||||
#pragma once
|
||||
|
||||
#include "projectexplorer_export.h"
|
||||
|
||||
@@ -45,8 +44,6 @@ class PROJECTEXPLORER_EXPORT ITaskHandler : public QObject
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ITaskHandler() {}
|
||||
|
||||
virtual bool isDefaultHandler() const { return false; }
|
||||
virtual bool canHandle(const Task &) const = 0;
|
||||
virtual void handle(const Task &) = 0;
|
||||
@@ -55,5 +52,3 @@ public:
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // PROJECTEXPLORER_ITASKHANDLER_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef JOURNALDWATCHER_H
|
||||
#define JOURNALDWATCHER_H
|
||||
#pragma once
|
||||
|
||||
#include <QByteArray>
|
||||
#include <QMap>
|
||||
@@ -44,7 +43,7 @@ public:
|
||||
typedef QMap<QByteArray, QByteArray> LogEntry;
|
||||
typedef std::function<void(LogEntry)> Subscription;
|
||||
|
||||
~JournaldWatcher();
|
||||
~JournaldWatcher() override;
|
||||
|
||||
static JournaldWatcher *instance();
|
||||
|
||||
@@ -67,5 +66,3 @@ private:
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // JOURNALDWATCHER_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef KIT_H
|
||||
#define KIT_H
|
||||
#pragma once
|
||||
|
||||
#include "projectexplorer_export.h"
|
||||
#include "task.h"
|
||||
@@ -56,7 +55,7 @@ class KitPrivate;
|
||||
class PROJECTEXPLORER_EXPORT Kit
|
||||
{
|
||||
public:
|
||||
Kit(Core::Id id = Core::Id());
|
||||
explicit Kit(Core::Id id = Core::Id());
|
||||
|
||||
// Do not trigger evaluations
|
||||
void blockNotification();
|
||||
@@ -157,5 +156,3 @@ private:
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
Q_DECLARE_METATYPE(ProjectExplorer::Kit *)
|
||||
|
||||
#endif // KIT_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef PROJECTEXPLORER_KITCHOOSER_H
|
||||
#define PROJECTEXPLORER_KITCHOOSER_H
|
||||
#pragma once
|
||||
|
||||
#include "projectexplorer_export.h"
|
||||
|
||||
@@ -81,5 +80,3 @@ private:
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // PROJECTEXPLORER_KITCHOOSER_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef KITCONFIGWIDGET_H
|
||||
#define KITCONFIGWIDGET_H
|
||||
#pragma once
|
||||
|
||||
#include "projectexplorer_export.h"
|
||||
|
||||
@@ -80,5 +79,3 @@ protected:
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // KITCONFIGWIDGET_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef KITFEATUREPROVIDER_H
|
||||
#define KITFEATUREPROVIDER_H
|
||||
#pragma once
|
||||
|
||||
#include <coreplugin/id.h>
|
||||
#include <coreplugin/featureprovider.h>
|
||||
@@ -35,12 +34,10 @@ namespace Internal {
|
||||
class KitFeatureProvider : public Core::IFeatureProvider
|
||||
{
|
||||
public:
|
||||
QSet<Core::Id> availableFeatures(Core::Id id) const;
|
||||
QSet<Core::Id> availablePlatforms() const;
|
||||
QString displayNameForPlatform(Core::Id id) const;
|
||||
QSet<Core::Id> availableFeatures(Core::Id id) const override;
|
||||
QSet<Core::Id> availablePlatforms() const override;
|
||||
QString displayNameForPlatform(Core::Id id) const override;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // KITFEATUREPROVIDER_H
|
||||
|
||||
@@ -332,9 +332,9 @@ void DeviceTypeKitInformation::setDeviceTypeId(Kit *k, Core::Id type)
|
||||
|
||||
KitMatcher DeviceTypeKitInformation::deviceTypeMatcher(Core::Id type)
|
||||
{
|
||||
return std::function<bool(const Kit *)>([type](const Kit *kit) {
|
||||
return KitMatcher(std::function<bool(const Kit *)>([type](const Kit *kit) {
|
||||
return type.isValid() && deviceTypeId(kit) == type;
|
||||
});
|
||||
}));
|
||||
}
|
||||
|
||||
QSet<Core::Id> DeviceTypeKitInformation::supportedPlatforms(const Kit *k) const
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef KITINFORMATION_H
|
||||
#define KITINFORMATION_H
|
||||
#pragma once
|
||||
|
||||
#include "kitmanager.h"
|
||||
#include "kit.h"
|
||||
@@ -197,5 +196,3 @@ public:
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // KITINFORMATION_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef KITINFORMATIONCONFIGWIDGET_H
|
||||
#define KITINFORMATIONCONFIGWIDGET_H
|
||||
#pragma once
|
||||
|
||||
#include "kitconfigwidget.h"
|
||||
|
||||
@@ -193,5 +192,3 @@ private:
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // KITINFORMATIONCONFIGWIDGET_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef KITMANAGER_H
|
||||
#define KITMANAGER_H
|
||||
#pragma once
|
||||
|
||||
#include "projectexplorer_export.h"
|
||||
|
||||
@@ -109,8 +108,9 @@ class PROJECTEXPLORER_EXPORT KitMatcher
|
||||
{
|
||||
public:
|
||||
typedef std::function<bool(const Kit *)> Matcher;
|
||||
KitMatcher(const Matcher &m) : m_matcher(m) {}
|
||||
KitMatcher() {}
|
||||
|
||||
explicit KitMatcher(const Matcher &m) : m_matcher(m) {}
|
||||
KitMatcher() = default;
|
||||
|
||||
bool isValid() const { return !!m_matcher; }
|
||||
bool matches(const Kit *kit) const { return m_matcher(kit); }
|
||||
@@ -125,7 +125,7 @@ class PROJECTEXPLORER_EXPORT KitManager : public QObject
|
||||
|
||||
public:
|
||||
static KitManager *instance();
|
||||
~KitManager();
|
||||
~KitManager() override;
|
||||
|
||||
static QList<Kit *> kits();
|
||||
static QList<Kit *> matchingKits(const KitMatcher &matcher);
|
||||
@@ -176,8 +176,7 @@ private:
|
||||
class KitList
|
||||
{
|
||||
public:
|
||||
KitList()
|
||||
{ }
|
||||
KitList() { }
|
||||
Core::Id defaultKit;
|
||||
QList<Kit *> kits;
|
||||
};
|
||||
@@ -193,5 +192,3 @@ private:
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // KITMANAGER_H
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef KITMANAGERCONFIGWIDGET_H
|
||||
#define KITMANAGERCONFIGWIDGET_H
|
||||
#pragma once
|
||||
|
||||
#include "kitconfigwidget.h"
|
||||
|
||||
@@ -48,7 +47,7 @@ class KitManagerConfigWidget : public QWidget
|
||||
|
||||
public:
|
||||
explicit KitManagerConfigWidget(Kit *k);
|
||||
~KitManagerConfigWidget();
|
||||
~KitManagerConfigWidget() override;
|
||||
|
||||
QString displayName() const;
|
||||
|
||||
@@ -87,7 +86,7 @@ private:
|
||||
ButtonColumn
|
||||
};
|
||||
|
||||
void showEvent(QShowEvent *event);
|
||||
void showEvent(QShowEvent *event) override;
|
||||
QLabel *createLabel(const QString &name, const QString &toolTip);
|
||||
|
||||
QGridLayout *m_layout;
|
||||
@@ -107,5 +106,3 @@ private:
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // KITMANAGERCONFIGWIDGET_H
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user