forked from qt-creator/qt-creator
Utils: Use override consistently
clang-tidy fixes from modernize-use-override check. Change-Id: I89d27f359b6ee507153cb3712f61f81471ff0858 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
86b368f912
commit
07e67b2188
@@ -35,7 +35,7 @@ class QTCREATOR_UTILS_EXPORT AnnotatedItemDelegate : public QStyledItemDelegate
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
AnnotatedItemDelegate(QObject *parent = 0);
|
AnnotatedItemDelegate(QObject *parent = 0);
|
||||||
virtual ~AnnotatedItemDelegate();
|
~AnnotatedItemDelegate() override;
|
||||||
|
|
||||||
void setAnnotationRole(int role);
|
void setAnnotationRole(int role);
|
||||||
int annotationRole() const;
|
int annotationRole() const;
|
||||||
@@ -44,10 +44,10 @@ public:
|
|||||||
const QString &delimiter() const;
|
const QString &delimiter() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void paint(QPainter *painter,
|
void paint(QPainter *painter,
|
||||||
const QStyleOptionViewItem &option,
|
const QStyleOptionViewItem &option,
|
||||||
const QModelIndex &index) const;
|
const QModelIndex &index) const override;
|
||||||
virtual QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int m_annotationRole;
|
int m_annotationRole;
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
BaseTreeView(QWidget *parent = 0);
|
BaseTreeView(QWidget *parent = 0);
|
||||||
~BaseTreeView();
|
~BaseTreeView() override;
|
||||||
|
|
||||||
void setSettings(QSettings *settings, const QByteArray &key);
|
void setSettings(QSettings *settings, const QByteArray &key);
|
||||||
|
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ class QTCREATOR_UTILS_EXPORT CheckableMessageBox : public QDialog
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
explicit CheckableMessageBox(QWidget *parent);
|
explicit CheckableMessageBox(QWidget *parent);
|
||||||
virtual ~CheckableMessageBox();
|
~CheckableMessageBox() override;
|
||||||
|
|
||||||
static QDialogButtonBox::StandardButton
|
static QDialogButtonBox::StandardButton
|
||||||
question(QWidget *parent,
|
question(QWidget *parent,
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ class QTCREATOR_UTILS_EXPORT ClassNameValidatingLineEdit : public FancyLineEdit
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ClassNameValidatingLineEdit(QWidget *parent = 0);
|
explicit ClassNameValidatingLineEdit(QWidget *parent = 0);
|
||||||
virtual ~ClassNameValidatingLineEdit();
|
~ClassNameValidatingLineEdit() override;
|
||||||
|
|
||||||
bool namespacesEnabled() const;
|
bool namespacesEnabled() const;
|
||||||
void setNamespacesEnabled(bool b);
|
void setNamespacesEnabled(bool b);
|
||||||
@@ -63,8 +63,8 @@ signals:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool validateClassName(FancyLineEdit *edit, QString *errorMessage) const;
|
bool validateClassName(FancyLineEdit *edit, QString *errorMessage) const;
|
||||||
void handleChanged(const QString &t);
|
void handleChanged(const QString &t) override;
|
||||||
QString fixInputString(const QString &string);
|
QString fixInputString(const QString &string) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void updateRegExp() const;
|
void updateRegExp() const;
|
||||||
|
|||||||
@@ -38,8 +38,8 @@ public:
|
|||||||
explicit CompletingLineEdit(QWidget *parent = 0);
|
explicit CompletingLineEdit(QWidget *parent = 0);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool event(QEvent *e);
|
bool event(QEvent *e) override;
|
||||||
void keyPressEvent(QKeyEvent *e);
|
void keyPressEvent(QKeyEvent *e) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Utils
|
} // namespace Utils
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ class QTCREATOR_UTILS_EXPORT CompletingTextEdit : public QTextEdit
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
CompletingTextEdit(QWidget *parent = 0);
|
CompletingTextEdit(QWidget *parent = 0);
|
||||||
~CompletingTextEdit();
|
~CompletingTextEdit() override;
|
||||||
|
|
||||||
void setCompleter(QCompleter *c);
|
void setCompleter(QCompleter *c);
|
||||||
QCompleter *completer() const;
|
QCompleter *completer() const;
|
||||||
@@ -53,9 +53,9 @@ public:
|
|||||||
void setCompletionLengthThreshold(int len);
|
void setCompletionLengthThreshold(int len);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void keyPressEvent(QKeyEvent *e);
|
void keyPressEvent(QKeyEvent *e) override;
|
||||||
void focusInEvent(QFocusEvent *e);
|
void focusInEvent(QFocusEvent *e) override;
|
||||||
bool event(QEvent *e);
|
bool event(QEvent *e) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
class CompletingTextEditPrivate *d;
|
class CompletingTextEditPrivate *d;
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ class QTCREATOR_UTILS_EXPORT ConsoleProcess : public QObject
|
|||||||
public:
|
public:
|
||||||
enum Mode { Run, Debug, Suspend };
|
enum Mode { Run, Debug, Suspend };
|
||||||
ConsoleProcess(QObject *parent = 0);
|
ConsoleProcess(QObject *parent = 0);
|
||||||
~ConsoleProcess();
|
~ConsoleProcess() override;
|
||||||
|
|
||||||
void setWorkingDirectory(const QString &dir);
|
void setWorkingDirectory(const QString &dir);
|
||||||
QString workingDirectory() const;
|
QString workingDirectory() const;
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ class QTCREATOR_UTILS_EXPORT CrumblePath : public QWidget
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
explicit CrumblePath(QWidget *parent = nullptr);
|
explicit CrumblePath(QWidget *parent = nullptr);
|
||||||
~CrumblePath();
|
~CrumblePath() override;
|
||||||
|
|
||||||
QVariant dataForIndex(int index) const;
|
QVariant dataForIndex(int index) const;
|
||||||
QVariant dataForLastIndex() const;
|
QVariant dataForLastIndex() const;
|
||||||
|
|||||||
@@ -49,9 +49,9 @@ class QTCREATOR_UTILS_EXPORT FadingWidget : public FadingPanel
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
FadingWidget(QWidget *parent = 0);
|
FadingWidget(QWidget *parent = 0);
|
||||||
void fadeTo(qreal value);
|
void fadeTo(qreal value) override;
|
||||||
qreal opacity();
|
qreal opacity();
|
||||||
void setOpacity(qreal value);
|
void setOpacity(qreal value) override;
|
||||||
protected:
|
protected:
|
||||||
QGraphicsOpacityEffect *m_opacityEffect;
|
QGraphicsOpacityEffect *m_opacityEffect;
|
||||||
};
|
};
|
||||||
@@ -64,13 +64,13 @@ class QTCREATOR_UTILS_EXPORT DetailsButton : public QAbstractButton
|
|||||||
public:
|
public:
|
||||||
DetailsButton(QWidget *parent = 0);
|
DetailsButton(QWidget *parent = 0);
|
||||||
|
|
||||||
QSize sizeHint() const;
|
QSize sizeHint() const override;
|
||||||
float fader() { return m_fader; }
|
float fader() { return m_fader; }
|
||||||
void setFader(float value) { m_fader = value; update(); }
|
void setFader(float value) { m_fader = value; update(); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void paintEvent(QPaintEvent *e);
|
void paintEvent(QPaintEvent *e) override;
|
||||||
bool event(QEvent *e);
|
bool event(QEvent *e) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QPixmap cacheRendering(const QSize &size, bool checked);
|
QPixmap cacheRendering(const QSize &size, bool checked);
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
explicit DetailsWidget(QWidget *parent = 0);
|
explicit DetailsWidget(QWidget *parent = 0);
|
||||||
virtual ~DetailsWidget();
|
~DetailsWidget() override;
|
||||||
|
|
||||||
void setSummaryText(const QString &text);
|
void setSummaryText(const QString &text);
|
||||||
QString summaryText() const;
|
QString summaryText() const;
|
||||||
@@ -91,9 +91,9 @@ private:
|
|||||||
void setExpanded(bool);
|
void setExpanded(bool);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void paintEvent(QPaintEvent *paintEvent);
|
void paintEvent(QPaintEvent *paintEvent) override;
|
||||||
virtual void enterEvent(QEvent *event);
|
void enterEvent(QEvent *event) override;
|
||||||
virtual void leaveEvent(QEvent *event);
|
void leaveEvent(QEvent *event) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DetailsWidgetPrivate *d;
|
DetailsWidgetPrivate *d;
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ public:
|
|||||||
bool isValueDrop(QDropEvent *event) const;
|
bool isValueDrop(QDropEvent *event) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool eventFilter(QObject *obj, QEvent *event);
|
bool eventFilter(QObject *obj, QEvent *event) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void emitFilesDropped();
|
void emitFilesDropped();
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ public:
|
|||||||
void setElideMode(const Qt::TextElideMode &elideMode);
|
void setElideMode(const Qt::TextElideMode &elideMode);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void paintEvent(QPaintEvent *event);
|
void paintEvent(QPaintEvent *event) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Qt::TextElideMode m_elideMode;
|
Qt::TextElideMode m_elideMode;
|
||||||
|
|||||||
@@ -41,14 +41,15 @@ class QTCREATOR_UTILS_EXPORT EnvironmentModel : public QAbstractTableModel
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
explicit EnvironmentModel(QObject *parent = 0);
|
explicit EnvironmentModel(QObject *parent = 0);
|
||||||
~EnvironmentModel();
|
~EnvironmentModel() override;
|
||||||
|
|
||||||
int rowCount(const QModelIndex &parent) const;
|
int rowCount(const QModelIndex &parent) const override;
|
||||||
int columnCount(const QModelIndex &parent) const;
|
int columnCount(const QModelIndex &parent) const override;
|
||||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
|
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||||
bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
|
bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
|
||||||
Qt::ItemFlags flags(const QModelIndex &index) const;
|
Qt::ItemFlags flags(const QModelIndex &index) const override;
|
||||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
|
QVariant headerData(int section, Qt::Orientation orientation,
|
||||||
|
int role = Qt::DisplayRole) const override;
|
||||||
|
|
||||||
QModelIndex addVariable();
|
QModelIndex addVariable();
|
||||||
QModelIndex addVariable(const EnvironmentItem &item);
|
QModelIndex addVariable(const EnvironmentItem &item);
|
||||||
|
|||||||
@@ -39,8 +39,8 @@ public:
|
|||||||
explicit FakeToolTip(QWidget *parent = 0);
|
explicit FakeToolTip(QWidget *parent = 0);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void paintEvent(QPaintEvent *e);
|
void paintEvent(QPaintEvent *e) override;
|
||||||
void resizeEvent(QResizeEvent *e);
|
void resizeEvent(QResizeEvent *e) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Utils
|
} // namespace Utils
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ class QTCREATOR_UTILS_EXPORT IconButton: public QAbstractButton
|
|||||||
Q_PROPERTY(bool autoHide READ hasAutoHide WRITE setAutoHide)
|
Q_PROPERTY(bool autoHide READ hasAutoHide WRITE setAutoHide)
|
||||||
public:
|
public:
|
||||||
explicit IconButton(QWidget *parent = 0);
|
explicit IconButton(QWidget *parent = 0);
|
||||||
void paintEvent(QPaintEvent *event);
|
void paintEvent(QPaintEvent *event) override;
|
||||||
float iconOpacity() { return m_iconOpacity; }
|
float iconOpacity() { return m_iconOpacity; }
|
||||||
void setIconOpacity(float value) { m_iconOpacity = value; update(); }
|
void setIconOpacity(float value) { m_iconOpacity = value; update(); }
|
||||||
void animateShow(bool visible);
|
void animateShow(bool visible);
|
||||||
@@ -55,11 +55,11 @@ public:
|
|||||||
void setAutoHide(bool hide) { m_autoHide = hide; }
|
void setAutoHide(bool hide) { m_autoHide = hide; }
|
||||||
bool hasAutoHide() const { return m_autoHide; }
|
bool hasAutoHide() const { return m_autoHide; }
|
||||||
|
|
||||||
QSize sizeHint() const;
|
QSize sizeHint() const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void keyPressEvent(QKeyEvent *ke);
|
void keyPressEvent(QKeyEvent *ke) override;
|
||||||
void keyReleaseEvent(QKeyEvent *ke);
|
void keyReleaseEvent(QKeyEvent *ke) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
float m_iconOpacity;
|
float m_iconOpacity;
|
||||||
@@ -80,7 +80,7 @@ public:
|
|||||||
enum Side {Left = 0, Right = 1};
|
enum Side {Left = 0, Right = 1};
|
||||||
|
|
||||||
explicit FancyLineEdit(QWidget *parent = 0);
|
explicit FancyLineEdit(QWidget *parent = 0);
|
||||||
~FancyLineEdit();
|
~FancyLineEdit() override;
|
||||||
|
|
||||||
QIcon buttonIcon(Side side) const;
|
QIcon buttonIcon(Side side) const;
|
||||||
void setButtonIcon(Side side, const QIcon &icon);
|
void setButtonIcon(Side side, const QIcon &icon);
|
||||||
@@ -154,7 +154,7 @@ signals:
|
|||||||
void validReturnPressed();
|
void validReturnPressed();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void resizeEvent(QResizeEvent *e);
|
void resizeEvent(QResizeEvent *e) override;
|
||||||
|
|
||||||
virtual QString fixInputString(const QString &string);
|
virtual QString fixInputString(const QString &string);
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ class QTCREATOR_UTILS_EXPORT FancyMainWindow : public QMainWindow
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
explicit FancyMainWindow(QWidget *parent = 0);
|
explicit FancyMainWindow(QWidget *parent = 0);
|
||||||
virtual ~FancyMainWindow();
|
~FancyMainWindow() override;
|
||||||
|
|
||||||
/* The widget passed in should have an objectname set
|
/* The widget passed in should have an objectname set
|
||||||
* which will then be used as key for QSettings. */
|
* which will then be used as key for QSettings. */
|
||||||
@@ -76,9 +76,9 @@ public slots:
|
|||||||
void setDockActionsVisible(bool v);
|
void setDockActionsVisible(bool v);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void hideEvent(QHideEvent *event);
|
void hideEvent(QHideEvent *event) override;
|
||||||
void showEvent(QShowEvent *event);
|
void showEvent(QShowEvent *event) override;
|
||||||
void contextMenuEvent(QContextMenuEvent *event);
|
void contextMenuEvent(QContextMenuEvent *event) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void onDockActionTriggered();
|
void onDockActionTriggered();
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ public:
|
|||||||
void setRequiredExtensions(const QStringList &extensionList);
|
void setRequiredExtensions(const QStringList &extensionList);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual QString fixInputString(const QString &string);
|
QString fixInputString(const QString &string) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_allowDirectories;
|
bool m_allowDirectories;
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ public:
|
|||||||
const QStringList &filters,
|
const QStringList &filters,
|
||||||
const QStringList &exclusionFilters,
|
const QStringList &exclusionFilters,
|
||||||
QTextCodec *encoding = 0);
|
QTextCodec *encoding = 0);
|
||||||
~SubDirFileIterator();
|
~SubDirFileIterator() override;
|
||||||
|
|
||||||
int maxProgress() const override;
|
int maxProgress() const override;
|
||||||
int currentProgress() const override;
|
int currentProgress() const override;
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ public:
|
|||||||
|
|
||||||
explicit FileSystemWatcher(QObject *parent = 0);
|
explicit FileSystemWatcher(QObject *parent = 0);
|
||||||
explicit FileSystemWatcher(int id, QObject *parent = 0);
|
explicit FileSystemWatcher(int id, QObject *parent = 0);
|
||||||
virtual ~FileSystemWatcher();
|
~FileSystemWatcher() override;
|
||||||
|
|
||||||
void addFile(const QString &file, WatchMode wm);
|
void addFile(const QString &file, WatchMode wm);
|
||||||
void addFiles(const QStringList &files, WatchMode wm);
|
void addFiles(const QStringList &files, WatchMode wm);
|
||||||
|
|||||||
@@ -215,9 +215,10 @@ class QTCREATOR_UTILS_EXPORT FileSaver : public FileSaverBase
|
|||||||
{
|
{
|
||||||
Q_DECLARE_TR_FUNCTIONS(Utils::FileUtils) // sic!
|
Q_DECLARE_TR_FUNCTIONS(Utils::FileUtils) // sic!
|
||||||
public:
|
public:
|
||||||
explicit FileSaver(const QString &filename, QIODevice::OpenMode mode = QIODevice::NotOpen); // QIODevice::WriteOnly is implicit
|
// QIODevice::WriteOnly is implicit
|
||||||
|
explicit FileSaver(const QString &filename, QIODevice::OpenMode mode = QIODevice::NotOpen);
|
||||||
|
|
||||||
virtual bool finalize();
|
bool finalize() override;
|
||||||
using FileSaverBase::finalize;
|
using FileSaverBase::finalize;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -229,7 +230,7 @@ class QTCREATOR_UTILS_EXPORT TempFileSaver : public FileSaverBase
|
|||||||
Q_DECLARE_TR_FUNCTIONS(Utils::FileUtils) // sic!
|
Q_DECLARE_TR_FUNCTIONS(Utils::FileUtils) // sic!
|
||||||
public:
|
public:
|
||||||
explicit TempFileSaver(const QString &templ = QString());
|
explicit TempFileSaver(const QString &templ = QString());
|
||||||
~TempFileSaver();
|
~TempFileSaver() override;
|
||||||
|
|
||||||
void setAutoRemove(bool on) { m_autoRemove = on; }
|
void setAutoRemove(bool on) { m_autoRemove = on; }
|
||||||
|
|
||||||
|
|||||||
@@ -41,12 +41,12 @@ class QTCREATOR_UTILS_EXPORT FileWizardPage : public WizardPage
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
explicit FileWizardPage(QWidget *parent = 0);
|
explicit FileWizardPage(QWidget *parent = 0);
|
||||||
~FileWizardPage();
|
~FileWizardPage() override;
|
||||||
|
|
||||||
QString fileName() const;
|
QString fileName() const;
|
||||||
QString path() const;
|
QString path() const;
|
||||||
|
|
||||||
bool isComplete() const;
|
bool isComplete() const override;
|
||||||
|
|
||||||
void setFileNameLabel(const QString &label);
|
void setFileNameLabel(const QString &label);
|
||||||
void setPathLabel(const QString &label);
|
void setPathLabel(const QString &label);
|
||||||
|
|||||||
@@ -40,14 +40,14 @@ public:
|
|||||||
|
|
||||||
void setText(const QString &text, const QString &maxText);
|
void setText(const QString &text, const QString &maxText);
|
||||||
using QLabel::setText;
|
using QLabel::setText;
|
||||||
QSize sizeHint() const;
|
QSize sizeHint() const override;
|
||||||
|
|
||||||
QString maxText() const;
|
QString maxText() const;
|
||||||
void setMaxText(const QString &maxText);
|
void setMaxText(const QString &maxText);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void mousePressEvent(QMouseEvent *ev);
|
void mousePressEvent(QMouseEvent *ev) override;
|
||||||
void mouseReleaseEvent(QMouseEvent *ev);
|
void mouseReleaseEvent(QMouseEvent *ev) override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void clicked();
|
void clicked();
|
||||||
|
|||||||
@@ -37,20 +37,20 @@ class QTCREATOR_UTILS_EXPORT FlowLayout : public QLayout
|
|||||||
public:
|
public:
|
||||||
explicit FlowLayout(QWidget *parent, int margin = -1, int hSpacing = -1, int vSpacing = -1);
|
explicit FlowLayout(QWidget *parent, int margin = -1, int hSpacing = -1, int vSpacing = -1);
|
||||||
FlowLayout(int margin = -1, int hSpacing = -1, int vSpacing = -1);
|
FlowLayout(int margin = -1, int hSpacing = -1, int vSpacing = -1);
|
||||||
~FlowLayout();
|
~FlowLayout() override;
|
||||||
|
|
||||||
void addItem(QLayoutItem *item);
|
void addItem(QLayoutItem *item) override;
|
||||||
int horizontalSpacing() const;
|
int horizontalSpacing() const;
|
||||||
int verticalSpacing() const;
|
int verticalSpacing() const;
|
||||||
Qt::Orientations expandingDirections() const;
|
Qt::Orientations expandingDirections() const override;
|
||||||
bool hasHeightForWidth() const;
|
bool hasHeightForWidth() const override;
|
||||||
int heightForWidth(int) const;
|
int heightForWidth(int) const override;
|
||||||
int count() const;
|
int count() const override;
|
||||||
QLayoutItem *itemAt(int index) const;
|
QLayoutItem *itemAt(int index) const override;
|
||||||
QSize minimumSize() const;
|
QSize minimumSize() const override;
|
||||||
void setGeometry(const QRect &rect);
|
void setGeometry(const QRect &rect) override;
|
||||||
QSize sizeHint() const;
|
QSize sizeHint() const override;
|
||||||
QLayoutItem *takeAt(int index);
|
QLayoutItem *takeAt(int index) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int doLayout(const QRect &rect, bool testOnly) const;
|
int doLayout(const QRect &rect, bool testOnly) const;
|
||||||
|
|||||||
@@ -45,11 +45,13 @@ class QTCREATOR_UTILS_EXPORT HighlightingItemDelegate : public QItemDelegate
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
HighlightingItemDelegate(int tabWidth, QObject *parent = 0);
|
HighlightingItemDelegate(int tabWidth, QObject *parent = 0);
|
||||||
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
void paint(QPainter *painter, const QStyleOptionViewItem &option,
|
||||||
|
const QModelIndex &index) const override;
|
||||||
void setTabWidth(int width);
|
void setTabWidth(int width);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int drawLineNumber(QPainter *painter, const QStyleOptionViewItem &option, const QRect &rect, const QModelIndex &index) const;
|
int drawLineNumber(QPainter *painter, const QStyleOptionViewItem &option, const QRect &rect,
|
||||||
|
const QModelIndex &index) const;
|
||||||
void drawText(QPainter *painter, const QStyleOptionViewItem &option,
|
void drawText(QPainter *painter, const QStyleOptionViewItem &option,
|
||||||
const QRect &rect, const QModelIndex &index) const;
|
const QRect &rect, const QModelIndex &index) const;
|
||||||
using QItemDelegate::drawDisplay;
|
using QItemDelegate::drawDisplay;
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ public:
|
|||||||
static bool historyExistsFor(const QString &historyKey);
|
static bool historyExistsFor(const QString &historyKey);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
~HistoryCompleter();
|
~HistoryCompleter() override;
|
||||||
int historySize() const;
|
int historySize() const;
|
||||||
int maximalHistorySize() const;
|
int maximalHistorySize() const;
|
||||||
void setMaximalHistorySize(int numberOfEntries);
|
void setMaximalHistorySize(int numberOfEntries);
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ public:
|
|||||||
return v.toBool() ? SingleClickActivation : DoubleClickActivation;
|
return v.toBool() ? SingleClickActivation : DoubleClickActivation;
|
||||||
}
|
}
|
||||||
|
|
||||||
void keyPressEvent(QKeyEvent *event)
|
void keyPressEvent(QKeyEvent *event) override
|
||||||
{
|
{
|
||||||
// Note: This always eats the event
|
// Note: This always eats the event
|
||||||
// whereas QAbstractItemView never eats it
|
// whereas QAbstractItemView never eats it
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ public:
|
|||||||
, m_value(value)
|
, m_value(value)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
virtual JsonStringValue *toString() { return this; }
|
JsonStringValue *toString() override { return this; }
|
||||||
|
|
||||||
const QString &value() const { return m_value; }
|
const QString &value() const { return m_value; }
|
||||||
|
|
||||||
@@ -136,7 +136,7 @@ public:
|
|||||||
, m_value(value)
|
, m_value(value)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
virtual JsonDoubleValue *toDouble() { return this; }
|
JsonDoubleValue *toDouble() override { return this; }
|
||||||
|
|
||||||
double value() const { return m_value; }
|
double value() const { return m_value; }
|
||||||
|
|
||||||
@@ -155,7 +155,7 @@ public:
|
|||||||
, m_value(value)
|
, m_value(value)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
virtual JsonIntValue *toInt() { return this; }
|
JsonIntValue *toInt() override { return this; }
|
||||||
|
|
||||||
int value() const { return m_value; }
|
int value() const { return m_value; }
|
||||||
|
|
||||||
@@ -174,7 +174,7 @@ public:
|
|||||||
: JsonValue(Object)
|
: JsonValue(Object)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
virtual JsonObjectValue *toObject() { return this; }
|
JsonObjectValue *toObject() override { return this; }
|
||||||
|
|
||||||
void addMember(const QString &name, JsonValue *value) { m_members.insert(name, value); }
|
void addMember(const QString &name, JsonValue *value) { m_members.insert(name, value); }
|
||||||
bool hasMember(const QString &name) const { return m_members.contains(name); }
|
bool hasMember(const QString &name) const { return m_members.contains(name); }
|
||||||
@@ -202,7 +202,7 @@ public:
|
|||||||
: JsonValue(Array)
|
: JsonValue(Array)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
virtual JsonArrayValue *toArray() { return this; }
|
JsonArrayValue *toArray() override { return this; }
|
||||||
|
|
||||||
void addElement(JsonValue *value) { m_elements.append(value); }
|
void addElement(JsonValue *value) { m_elements.append(value); }
|
||||||
QList<JsonValue *> elements() const { return m_elements; }
|
QList<JsonValue *> elements() const { return m_elements; }
|
||||||
@@ -224,7 +224,7 @@ public:
|
|||||||
, m_value(value)
|
, m_value(value)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
virtual JsonBooleanValue *toBoolean() { return this; }
|
JsonBooleanValue *toBoolean() override { return this; }
|
||||||
|
|
||||||
bool value() const { return m_value; }
|
bool value() const { return m_value; }
|
||||||
|
|
||||||
@@ -239,7 +239,7 @@ public:
|
|||||||
: JsonValue(Null)
|
: JsonValue(Null)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
virtual JsonNullValue *toNull() { return this; }
|
JsonNullValue *toNull() override { return this; }
|
||||||
};
|
};
|
||||||
|
|
||||||
class JsonSchemaManager;
|
class JsonSchemaManager;
|
||||||
|
|||||||
@@ -42,7 +42,8 @@ public:
|
|||||||
static NetworkAccessManager *instance();
|
static NetworkAccessManager *instance();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual QNetworkReply* createRequest(Operation op, const QNetworkRequest &request, QIODevice *outgoingData);
|
QNetworkReply* createRequest(Operation op, const QNetworkRequest &request,
|
||||||
|
QIODevice *outgoingData) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
explicit NewClassWidget(QWidget *parent = 0);
|
explicit NewClassWidget(QWidget *parent = 0);
|
||||||
~NewClassWidget();
|
~NewClassWidget() override;
|
||||||
|
|
||||||
bool namespacesEnabled() const;
|
bool namespacesEnabled() const;
|
||||||
bool isBaseClassInputVisible() const;
|
bool isBaseClassInputVisible() const;
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ class QTCREATOR_UTILS_EXPORT OutputFormatter : public QObject
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
OutputFormatter();
|
OutputFormatter();
|
||||||
virtual ~OutputFormatter();
|
~OutputFormatter() override;
|
||||||
|
|
||||||
QPlainTextEdit *plainTextEdit() const;
|
QPlainTextEdit *plainTextEdit() const;
|
||||||
virtual void setPlainTextEdit(QPlainTextEdit *plainText);
|
virtual void setPlainTextEdit(QPlainTextEdit *plainText);
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ public:
|
|||||||
static QString browseButtonLabel();
|
static QString browseButtonLabel();
|
||||||
|
|
||||||
explicit PathChooser(QWidget *parent = nullptr);
|
explicit PathChooser(QWidget *parent = nullptr);
|
||||||
virtual ~PathChooser();
|
~PathChooser() override;
|
||||||
|
|
||||||
enum Kind {
|
enum Kind {
|
||||||
ExistingDirectory,
|
ExistingDirectory,
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ class QTCREATOR_UTILS_EXPORT PathListEditor : public QWidget
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
explicit PathListEditor(QWidget *parent = 0);
|
explicit PathListEditor(QWidget *parent = 0);
|
||||||
virtual ~PathListEditor();
|
~PathListEditor() override;
|
||||||
|
|
||||||
QString pathListString() const;
|
QString pathListString() const;
|
||||||
QStringList pathList() const;
|
QStringList pathList() const;
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ class QTCREATOR_UTILS_EXPORT ProjectIntroPage : public WizardPage
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ProjectIntroPage(QWidget *parent = 0);
|
explicit ProjectIntroPage(QWidget *parent = 0);
|
||||||
virtual ~ProjectIntroPage();
|
~ProjectIntroPage() override;
|
||||||
|
|
||||||
QString projectName() const;
|
QString projectName() const;
|
||||||
QString path() const;
|
QString path() const;
|
||||||
@@ -53,7 +53,7 @@ public:
|
|||||||
// Insert an additional control into the form layout for the target.
|
// Insert an additional control into the form layout for the target.
|
||||||
void insertControl(int row, QWidget *label, QWidget *control);
|
void insertControl(int row, QWidget *label, QWidget *control);
|
||||||
|
|
||||||
virtual bool isComplete() const;
|
bool isComplete() const override;
|
||||||
|
|
||||||
bool forceSubProject() const;
|
bool forceSubProject() const;
|
||||||
void setForceSubProject(bool force);
|
void setForceSubProject(bool force);
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ class QTCREATOR_UTILS_EXPORT ProxyCredentialsDialog : public QDialog
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ProxyCredentialsDialog(const QNetworkProxy &proxy, QWidget *parent = 0);
|
explicit ProxyCredentialsDialog(const QNetworkProxy &proxy, QWidget *parent = 0);
|
||||||
~ProxyCredentialsDialog();
|
~ProxyCredentialsDialog() override;
|
||||||
|
|
||||||
QString userName() const;
|
QString userName() const;
|
||||||
void setUserName(const QString &username);
|
void setUserName(const QString &username);
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ class QTCREATOR_UTILS_EXPORT QtColorButton : public QToolButton
|
|||||||
Q_PROPERTY(QColor color READ color WRITE setColor)
|
Q_PROPERTY(QColor color READ color WRITE setColor)
|
||||||
public:
|
public:
|
||||||
QtColorButton(QWidget *parent = 0);
|
QtColorButton(QWidget *parent = 0);
|
||||||
~QtColorButton();
|
~QtColorButton() override;
|
||||||
|
|
||||||
bool isBackgroundCheckered() const;
|
bool isBackgroundCheckered() const;
|
||||||
void setBackgroundCheckered(bool checkered);
|
void setBackgroundCheckered(bool checkered);
|
||||||
@@ -55,13 +55,13 @@ public slots:
|
|||||||
signals:
|
signals:
|
||||||
void colorChanged(const QColor &color);
|
void colorChanged(const QColor &color);
|
||||||
protected:
|
protected:
|
||||||
void paintEvent(QPaintEvent *event);
|
void paintEvent(QPaintEvent *event) override;
|
||||||
void mousePressEvent(QMouseEvent *event);
|
void mousePressEvent(QMouseEvent *event) override;
|
||||||
void mouseMoveEvent(QMouseEvent *event);
|
void mouseMoveEvent(QMouseEvent *event) override;
|
||||||
#ifndef QT_NO_DRAGANDDROP
|
#ifndef QT_NO_DRAGANDDROP
|
||||||
void dragEnterEvent(QDragEnterEvent *event);
|
void dragEnterEvent(QDragEnterEvent *event) override;
|
||||||
void dragLeaveEvent(QDragLeaveEvent *event);
|
void dragLeaveEvent(QDragLeaveEvent *event) override;
|
||||||
void dropEvent(QDropEvent *event);
|
void dropEvent(QDropEvent *event) override;
|
||||||
#endif
|
#endif
|
||||||
private:
|
private:
|
||||||
class QtColorButtonPrivate *d_ptr;
|
class QtColorButtonPrivate *d_ptr;
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ class QTCREATOR_UTILS_EXPORT RemoveFileDialog : public QDialog
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
explicit RemoveFileDialog(const QString &filePath, QWidget *parent = 0);
|
explicit RemoveFileDialog(const QString &filePath, QWidget *parent = 0);
|
||||||
virtual ~RemoveFileDialog();
|
~RemoveFileDialog() override;
|
||||||
|
|
||||||
void setDeleteFileVisible(bool visible);
|
void setDeleteFileVisible(bool visible);
|
||||||
bool isDeleteFileChecked() const;
|
bool isDeleteFileChecked() const;
|
||||||
|
|||||||
@@ -325,7 +325,7 @@ public:
|
|||||||
futureInterface.reportStarted();
|
futureInterface.reportStarted();
|
||||||
}
|
}
|
||||||
|
|
||||||
~AsyncJob()
|
~AsyncJob() override
|
||||||
{
|
{
|
||||||
// QThreadPool can delete runnables even if they were never run (e.g. QThreadPool::clear).
|
// QThreadPool can delete runnables even if they were never run (e.g. QThreadPool::clear).
|
||||||
// Since we reported them as started, we make sure that we always report them as finished.
|
// Since we reported them as started, we make sure that we always report them as finished.
|
||||||
@@ -382,7 +382,7 @@ public:
|
|||||||
explicit RunnableThread(QRunnable *runnable, QObject *parent = 0);
|
explicit RunnableThread(QRunnable *runnable, QObject *parent = 0);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void run();
|
void run() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QRunnable *m_runnable;
|
QRunnable *m_runnable;
|
||||||
|
|||||||
@@ -39,9 +39,9 @@ class QTCREATOR_UTILS_EXPORT SaveFile : public QFile
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
explicit SaveFile(const QString &filename);
|
explicit SaveFile(const QString &filename);
|
||||||
virtual ~SaveFile();
|
~SaveFile() override;
|
||||||
|
|
||||||
bool open(OpenMode flags = QIODevice::WriteOnly);
|
bool open(OpenMode flags = QIODevice::WriteOnly) override;
|
||||||
|
|
||||||
void rollback();
|
void rollback();
|
||||||
bool commit();
|
bool commit();
|
||||||
|
|||||||
@@ -172,9 +172,9 @@ public:
|
|||||||
BackingUpSettingsAccessor(std::unique_ptr<BackUpStrategy> &&strategy, const QString &docType,
|
BackingUpSettingsAccessor(std::unique_ptr<BackUpStrategy> &&strategy, const QString &docType,
|
||||||
const QString &displayName, const QString &applicationDisplayName);
|
const QString &displayName, const QString &applicationDisplayName);
|
||||||
|
|
||||||
RestoreData readData(const Utils::FileName &path, QWidget *parent) const;
|
RestoreData readData(const Utils::FileName &path, QWidget *parent) const override;
|
||||||
Utils::optional<Issue> writeData(const Utils::FileName &path, const QVariantMap &data,
|
Utils::optional<Issue> writeData(const Utils::FileName &path, const QVariantMap &data,
|
||||||
QWidget *parent) const;
|
QWidget *parent) const override;
|
||||||
|
|
||||||
BackUpStrategy *strategy() const { return m_strategy.get(); }
|
BackUpStrategy *strategy() const { return m_strategy.get(); }
|
||||||
|
|
||||||
|
|||||||
@@ -46,17 +46,17 @@ public:
|
|||||||
enum State { Idle, Running, Failed, Succeeded };
|
enum State { Idle, Running, Failed, Succeeded };
|
||||||
|
|
||||||
explicit ShellCommandPage(QWidget *parent = nullptr);
|
explicit ShellCommandPage(QWidget *parent = nullptr);
|
||||||
~ShellCommandPage();
|
~ShellCommandPage() override;
|
||||||
|
|
||||||
void setStartedStatus(const QString &startedStatus);
|
void setStartedStatus(const QString &startedStatus);
|
||||||
void start(ShellCommand *command);
|
void start(ShellCommand *command);
|
||||||
|
|
||||||
virtual bool isComplete() const;
|
bool isComplete() const override;
|
||||||
bool isRunning() const{ return m_state == Running; }
|
bool isRunning() const{ return m_state == Running; }
|
||||||
|
|
||||||
void terminate();
|
void terminate();
|
||||||
|
|
||||||
bool handleReject();
|
bool handleReject() override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void finished(bool success);
|
void finished(bool success);
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ public:
|
|||||||
bool isLightColored() const;
|
bool isLightColored() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void paintEvent(QPaintEvent *event);
|
void paintEvent(QPaintEvent *event) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class QTCREATOR_UTILS_EXPORT StyledSeparator : public QWidget
|
class QTCREATOR_UTILS_EXPORT StyledSeparator : public QWidget
|
||||||
@@ -52,7 +52,7 @@ class QTCREATOR_UTILS_EXPORT StyledSeparator : public QWidget
|
|||||||
public:
|
public:
|
||||||
StyledSeparator(QWidget *parent = 0);
|
StyledSeparator(QWidget *parent = 0);
|
||||||
protected:
|
protected:
|
||||||
void paintEvent(QPaintEvent *event);
|
void paintEvent(QPaintEvent *event) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // Utils
|
} // Utils
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
SynchronousProcess();
|
SynchronousProcess();
|
||||||
virtual ~SynchronousProcess();
|
~SynchronousProcess() override;
|
||||||
|
|
||||||
/* Timeout for hanging processes (triggers after no more output
|
/* Timeout for hanging processes (triggers after no more output
|
||||||
* occurs on stderr/stdout). */
|
* occurs on stderr/stdout). */
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ class QTCREATOR_UTILS_EXPORT Theme : public QObject
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
Theme(const QString &id, QObject *parent = 0);
|
Theme(const QString &id, QObject *parent = 0);
|
||||||
~Theme();
|
~Theme() override;
|
||||||
|
|
||||||
enum Color {
|
enum Color {
|
||||||
BackgroundColorAlternate,
|
BackgroundColorAlternate,
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ protected:
|
|||||||
ToolTip();
|
ToolTip();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
~ToolTip();
|
~ToolTip() override;
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
ColorContent = 0,
|
ColorContent = 0,
|
||||||
@@ -67,7 +67,7 @@ public:
|
|||||||
WidgetContent = 42
|
WidgetContent = 42
|
||||||
};
|
};
|
||||||
|
|
||||||
bool eventFilter(QObject *o, QEvent *event);
|
bool eventFilter(QObject *o, QEvent *event) override;
|
||||||
|
|
||||||
static ToolTip *instance();
|
static ToolTip *instance();
|
||||||
|
|
||||||
|
|||||||
@@ -46,12 +46,12 @@ class QTCREATOR_UTILS_EXPORT TreeViewComboBox : public QComboBox
|
|||||||
public:
|
public:
|
||||||
TreeViewComboBox(QWidget *parent = 0);
|
TreeViewComboBox(QWidget *parent = 0);
|
||||||
|
|
||||||
void wheelEvent(QWheelEvent *e);
|
void wheelEvent(QWheelEvent *e) override;
|
||||||
void keyPressEvent(QKeyEvent *e);
|
void keyPressEvent(QKeyEvent *e) override;
|
||||||
void setCurrentIndex(const QModelIndex &index);
|
void setCurrentIndex(const QModelIndex &index);
|
||||||
bool eventFilter(QObject* object, QEvent* event);
|
bool eventFilter(QObject* object, QEvent* event) override;
|
||||||
void showPopup();
|
void showPopup() override;
|
||||||
void hidePopup();
|
void hidePopup() override;
|
||||||
|
|
||||||
TreeViewComboBoxView *view() const;
|
TreeViewComboBoxView *view() const;
|
||||||
|
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ class QTCREATOR_UTILS_EXPORT WizardProgress : public QObject
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
WizardProgress(QObject *parent = 0);
|
WizardProgress(QObject *parent = 0);
|
||||||
~WizardProgress();
|
~WizardProgress() override;
|
||||||
|
|
||||||
WizardProgressItem *addItem(const QString &title);
|
WizardProgressItem *addItem(const QString &title);
|
||||||
void removeItem(WizardProgressItem *item);
|
void removeItem(WizardProgressItem *item);
|
||||||
|
|||||||
Reference in New Issue
Block a user