Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit f11fb296 authored by Laurent Montel's avatar Laurent Montel 😁

Add override + nullptr

parent 55ff5600
......@@ -42,7 +42,7 @@ class BasicTab : public QTabWidget
Q_OBJECT
public:
explicit BasicTab( QWidget *parent=0 );
explicit BasicTab( QWidget *parent=nullptr );
void apply();
......
......@@ -27,13 +27,13 @@ class KLineSpellChecking : public KLineEdit
{
Q_OBJECT
public:
KLineSpellChecking( QWidget *parent = 0 );
~KLineSpellChecking();
explicit KLineSpellChecking( QWidget *parent = nullptr );
~KLineSpellChecking() override;
void highLightWord( unsigned int length, unsigned int pos );
protected:
void contextMenuEvent(QContextMenuEvent *e) Q_DECL_OVERRIDE;
void contextMenuEvent(QContextMenuEvent *e) override;
private Q_SLOTS:
void slotCheckSpelling();
......
......@@ -33,7 +33,7 @@ class KMenuEdit : public KXmlGuiWindow
public:
KMenuEdit();
~KMenuEdit();
~KMenuEdit() override;
void selectMenu(const QString &menu);
void selectMenuEntry(const QString &menuEntry);
......@@ -44,7 +44,7 @@ public:
protected:
void setupView();
void setupActions();
bool queryClose() Q_DECL_OVERRIDE;
bool queryClose() override;
protected Q_SLOTS:
void slotSave();
......
......@@ -30,7 +30,7 @@ public:
static const QString MF_MENU, MF_PUBLIC_ID, MF_SYSTEM_ID, MF_NAME, MF_INCLUDE, MF_EXCLUDE, MF_FILENAME, MF_DELETED, MF_NOTDELETED,
MF_MOVE, MF_OLD, MF_NEW, MF_DIRECTORY, MF_LAYOUT, MF_MENUNAME, MF_SEPARATOR, MF_MERGE;
MenuFile(const QString &file);
explicit MenuFile(const QString &file);
~MenuFile();
bool load();
......
......@@ -34,7 +34,7 @@ class PreferencesDialog : public KPageDialog
{
Q_OBJECT
public:
PreferencesDialog( QWidget *parent );
explicit PreferencesDialog( QWidget *parent );
protected Q_SLOTS:
void slotSave();
......@@ -48,7 +48,7 @@ class SpellCheckingPage : public QWidget
{
Q_OBJECT
public:
SpellCheckingPage( QWidget * );
explicit SpellCheckingPage( QWidget * );
void saveOptions();
private:
Sonnet::ConfigWidget *m_confPage;
......@@ -58,7 +58,7 @@ class MiscPage : public QWidget
{
Q_OBJECT
public:
MiscPage( QWidget * );
explicit MiscPage( QWidget * );
void saveOptions();
private:
QCheckBox *m_showHiddenEntries;
......
......@@ -74,7 +74,7 @@ public:
}
protected:
void paintEvent(QPaintEvent * /*event*/) Q_DECL_OVERRIDE
void paintEvent(QPaintEvent * /*event*/) override
{
QPainter p(this);
// Draw Separator
......@@ -225,7 +225,7 @@ bool TreeItem::isLayoutDirty() const
return false;
}
TreeView::TreeView( KActionCollection *ac, QWidget *parent, const char *name )
TreeView::TreeView(KActionCollection *ac, QWidget *parent)
: QTreeWidget(parent), m_ac(ac), m_popupMenu(0), m_clipboard(0),
m_clipboardFolderInfo(0), m_clipboardEntryInfo(0),
m_layoutDirty(false),
......@@ -233,7 +233,6 @@ TreeView::TreeView( KActionCollection *ac, QWidget *parent, const char *name )
{
m_dropMimeTypes << s_internalMimeType << KUrl::List::mimeDataTypes();
qRegisterMetaType<TreeItem *>("TreeItem");
setObjectName(name);
setAllColumnsShowFocus(true);
setRootIsDecorated(true);
setSortingEnabled(false);
......
......@@ -115,8 +115,8 @@ class TreeView : public QTreeWidget
friend class TreeItem;
Q_OBJECT
public:
explicit TreeView(KActionCollection *ac, QWidget *parent=0, const char *name=0);
~TreeView();
explicit TreeView(KActionCollection *ac, QWidget *parent=nullptr);
~TreeView() override;
void readMenuFolderInfo(MenuFolderInfo *folderInfo=0, KServiceGroup::Ptr folder=KServiceGroup::Ptr(), const QString &prefix=QString());
void setViewMode(bool showHidden);
......@@ -143,7 +143,7 @@ Q_SIGNALS:
protected Q_SLOTS:
void itemSelected(QTreeWidgetItem *);
bool dropMimeData(QTreeWidgetItem *parent, int index, const QMimeData *data, Qt::DropAction action) Q_DECL_OVERRIDE;
bool dropMimeData(QTreeWidgetItem *parent, int index, const QMimeData *data, Qt::DropAction action) override;
void newsubmenu();
void newitem();
......@@ -165,9 +165,9 @@ protected:
SortAllByDescription
};
void contextMenuEvent(QContextMenuEvent *event) Q_DECL_OVERRIDE;
void dropEvent(QDropEvent *event) Q_DECL_OVERRIDE;
void startDrag(Qt::DropActions supportedActions) Q_DECL_OVERRIDE;
void contextMenuEvent(QContextMenuEvent *event) override;
void dropEvent(QDropEvent *event) override;
void startDrag(Qt::DropActions supportedActions) override;
QTreeWidgetItem *selectedItem();
TreeItem *createTreeItem(TreeItem *parent, QTreeWidgetItem *after, MenuFolderInfo *folderInfo, bool _init = false);
TreeItem *createTreeItem(TreeItem *parent, QTreeWidgetItem *after, MenuEntryInfo *entryInfo, bool _init = false);
......@@ -197,9 +197,9 @@ protected:
QStringList fileList(const QString& relativePath);
QStringList dirList(const QString& relativePath);
QStringList mimeTypes() const Q_DECL_OVERRIDE;
QMimeData *mimeData(const QList<QTreeWidgetItem *> items) const Q_DECL_OVERRIDE;
Qt::DropActions supportedDropActions() const Q_DECL_OVERRIDE;
QStringList mimeTypes() const override;
QMimeData *mimeData(const QList<QTreeWidgetItem *> items) const override;
Qt::DropActions supportedDropActions() const override;
void sendReloadMenu();
......@@ -226,12 +226,12 @@ class MenuItemMimeData : public QMimeData
{
public:
MenuItemMimeData(TreeItem *item);
QStringList formats() const Q_DECL_OVERRIDE;
bool hasFormat(const QString &mimeType) const Q_DECL_OVERRIDE;
QStringList formats() const override;
bool hasFormat(const QString &mimeType) const override;
TreeItem *item() const;
protected:
QVariant retrieveData(const QString &mimeType, QVariant::Type type) const Q_DECL_OVERRIDE;
QVariant retrieveData(const QString &mimeType, QVariant::Type type) const override;
private:
TreeItem *m_item;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment