Skip to content

Commit

Permalink
Merge changes to use the C++11 override keyword.
Browse files Browse the repository at this point in the history
This keyword replaces the 'virtual' keyword in derived classes that
are overriding the base class function.  It has the additional benefit
of ensuring that the type signatures are an exact match.
  • Loading branch information
linuxdude42 committed Oct 27, 2018
2 parents 3b69c51 + 98f7f69 commit 76774fe
Show file tree
Hide file tree
Showing 587 changed files with 4,413 additions and 4,050 deletions.
4 changes: 2 additions & 2 deletions mythplugins/mytharchive/mytharchive/editmetadata.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ class EditMetadataDialog : public MythScreenType
EditMetadataDialog(MythScreenStack *parent, ArchiveItem *source_metadata);
~EditMetadataDialog();

bool Create(void);
bool keyPressEvent(QKeyEvent *e);
bool Create(void) override; // MythScreenType
bool keyPressEvent(QKeyEvent *e) override; // MythScreenType

signals:
void haveResult(bool ok, ArchiveItem *item);
Expand Down
4 changes: 2 additions & 2 deletions mythplugins/mytharchive/mytharchive/exportnative.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ class ExportNative : public MythScreenType

~ExportNative(void);

bool Create(void);
bool keyPressEvent(QKeyEvent *);
bool Create(void) override; // MythScreenType
bool keyPressEvent(QKeyEvent *) override; // MythScreenType

void createConfigFile(const QString &filename);

Expand Down
4 changes: 2 additions & 2 deletions mythplugins/mytharchive/mytharchive/fileselector.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ class FileSelector : public MythScreenType
FSTYPE type, const QString &startDir, const QString &filemask);
~FileSelector();

bool Create(void);
bool keyPressEvent(QKeyEvent *e);
bool Create(void) override; // MythScreenType
bool keyPressEvent(QKeyEvent *e) override; // MythScreenType

QString getSelected(void);

Expand Down
6 changes: 3 additions & 3 deletions mythplugins/mytharchive/mytharchive/importnative.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class ArchiveFileSelector : public FileSelector
explicit ArchiveFileSelector(MythScreenStack *parent);
~ArchiveFileSelector(void);

bool Create(void);
bool Create(void) override; // FileSelector

private slots:
void nextPressed(void);
Expand Down Expand Up @@ -79,8 +79,8 @@ class ImportNative : public MythScreenType
const QString &xmlFile, FileDetails details);
~ImportNative();

bool Create(void);
bool keyPressEvent(QKeyEvent *e);
bool Create(void) override; // MythScreenType
bool keyPressEvent(QKeyEvent *e) override; // MythScreenType

private slots:
void finishedPressed();
Expand Down
6 changes: 3 additions & 3 deletions mythplugins/mytharchive/mytharchive/logviewer.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ class LogViewer : public MythScreenType
explicit LogViewer(MythScreenStack *parent);
~LogViewer(void);

bool Create(void);
bool keyPressEvent(QKeyEvent *e);
bool Create(void) override; // MythScreenType
bool keyPressEvent(QKeyEvent *e) override; // MythScreenType

void setFilenames(const QString &progressLog, const QString &fullLog);

Expand All @@ -39,7 +39,7 @@ class LogViewer : public MythScreenType
void updateLogItem(MythUIButtonListItem *item);

private:
void Init(void);
void Init(void) override; // MythScreenType
QString getSetting(const QString &key);

bool m_autoUpdate;
Expand Down
8 changes: 4 additions & 4 deletions mythplugins/mytharchive/mytharchive/mythburn.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class ProfileDialog : public MythScreenType
ProfileDialog(MythScreenStack *parent, ArchiveItem *archiveItem,
QList<EncoderProfile *> profileList);

bool Create();
bool Create() override; // MythScreenType

signals:
void haveResult(int profile);
Expand Down Expand Up @@ -57,8 +57,8 @@ class MythBurn : public MythScreenType

~MythBurn(void);

bool Create(void);
bool keyPressEvent(QKeyEvent *);
bool Create(void) override; // MythScreenType
bool keyPressEvent(QKeyEvent *) override; // MythScreenType

void createConfigFile(const QString &filename);

Expand Down Expand Up @@ -140,7 +140,7 @@ class BurnMenu : public QObject
void start(void);

private:
void customEvent(QEvent *event);
void customEvent(QEvent *event) override; // QObject
void doBurn(int mode);
};

Expand Down
2 changes: 1 addition & 1 deletion mythplugins/mytharchive/mytharchive/recordingselector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class GetRecordingListThread : public MThread
start();
}

virtual void run(void)
void run(void) override // MThread
{
RunProlog();
m_parent->getRecordingList();
Expand Down
6 changes: 3 additions & 3 deletions mythplugins/mytharchive/mytharchive/recordingselector.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ class RecordingSelector : public MythScreenType

~RecordingSelector(void);

bool Create();
bool keyPressEvent(QKeyEvent *e);
bool Create() override; // MythScreenType
bool keyPressEvent(QKeyEvent *e) override; // MythScreenType

signals:
void haveResult(bool ok);
Expand All @@ -55,7 +55,7 @@ class RecordingSelector : public MythScreenType
void toggleSelected(MythUIButtonListItem *item);

private:
void Init(void);
void Init(void) override; // MythScreenType
void updateRecordingList(void);
void updateSelectedList(void);
void updateCategorySelector(void);
Expand Down
4 changes: 2 additions & 2 deletions mythplugins/mytharchive/mytharchive/selectdestination.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ class SelectDestination : public MythScreenType
SelectDestination(MythScreenStack *parent, bool nativeMode, QString name);
~SelectDestination(void);

bool Create(void);
bool keyPressEvent(QKeyEvent *);
bool Create(void) override; // MythScreenType
bool keyPressEvent(QKeyEvent *) override; // MythScreenType

public slots:

Expand Down
4 changes: 2 additions & 2 deletions mythplugins/mytharchive/mytharchive/themeselector.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ class DVDThemeSelector : public MythScreenType
ArchiveDestination archiveDestination, QString name);
~DVDThemeSelector(void);

bool Create(void);
bool keyPressEvent(QKeyEvent *);
bool Create(void) override; // MythScreenType
bool keyPressEvent(QKeyEvent *) override; // MythScreenType

protected slots:
void handleNextPage(void);
Expand Down
6 changes: 3 additions & 3 deletions mythplugins/mytharchive/mytharchive/thumbfinder.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ class ThumbFinder : public MythScreenType
const QString &menuTheme);
~ThumbFinder();

bool Create(void);
bool keyPressEvent(QKeyEvent *);
bool Create(void) override; // MythScreenType
bool keyPressEvent(QKeyEvent *) override; // MythScreenType


private slots:
Expand All @@ -58,7 +58,7 @@ class ThumbFinder : public MythScreenType
void updateThumb(void);

private:
void Init(void);
void Init(void) override; // MythScreenType
bool getThumbImages(void);
int getChapterCount(const QString &menuTheme);
void changeSeekAmount(bool up);
Expand Down
4 changes: 2 additions & 2 deletions mythplugins/mytharchive/mytharchive/videoselector.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ class VideoSelector : public MythScreenType

~VideoSelector(void);

bool Create();
bool keyPressEvent(QKeyEvent *e);
bool Create() override; // MythScreenType
bool keyPressEvent(QKeyEvent *e) override; // MythScreenType

signals:
void haveResult(bool ok);
Expand Down
2 changes: 1 addition & 1 deletion mythplugins/mytharchive/mytharchivehelper/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2245,7 +2245,7 @@ class MPUBLIC MythArchiveHelperCommandLineParser : public MythCommandLineParser
{
public:
MythArchiveHelperCommandLineParser();
void LoadArguments(void);
void LoadArguments(void) override; // MythCommandLineParser
};

MythArchiveHelperCommandLineParser::MythArchiveHelperCommandLineParser() :
Expand Down
4 changes: 2 additions & 2 deletions mythplugins/mythbrowser/mythbrowser/bookmarkeditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ class BookmarkEditor : public MythScreenType
const char *name);
~BookmarkEditor() = default;

bool Create(void);
bool keyPressEvent(QKeyEvent *event);
bool Create(void) override; // MythScreenType
bool keyPressEvent(QKeyEvent *event) override; // MythScreenType

private:
Bookmark *m_site;
Expand Down
8 changes: 4 additions & 4 deletions mythplugins/mythbrowser/mythbrowser/bookmarkmanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ class BrowserConfig : public MythScreenType
BrowserConfig(MythScreenStack *parent, const char *name = nullptr);
~BrowserConfig() = default;

bool Create(void);
bool keyPressEvent(QKeyEvent *);
bool Create(void) override; // MythScreenType
bool keyPressEvent(QKeyEvent *) override; // MythScreenType

private:
MythUITextEdit *m_commandEdit;
Expand All @@ -64,8 +64,8 @@ class BookmarkManager : public MythScreenType
BookmarkManager(MythScreenStack *parent, const char *name);
~BookmarkManager();

bool Create(void);
bool keyPressEvent(QKeyEvent *);
bool Create(void) override; // MythScreenType
bool keyPressEvent(QKeyEvent *) override; // MythScreenType

private slots:
void slotGroupSelected(MythUIButtonListItem *item);
Expand Down
4 changes: 2 additions & 2 deletions mythplugins/mythbrowser/mythbrowser/mythbrowser.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ class MythBrowser : public MythScreenType
MythBrowser(MythScreenStack *parent, QStringList &urlList);
~MythBrowser();

bool Create(void);
bool keyPressEvent(QKeyEvent *);
bool Create(void) override; // MythScreenType
bool keyPressEvent(QKeyEvent *) override; // MythScreenType

void setDefaultSaveDirectory(const QString &saveDir) { m_defaultSaveDir = saveDir; }
void setDefaultSaveFilename(const QString &saveFile) { m_defaultSaveFilename = saveFile; }
Expand Down
4 changes: 2 additions & 2 deletions mythplugins/mythbrowser/mythbrowser/mythflashplayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ class MythFlashPlayer : public MythScreenType
MythFlashPlayer(MythScreenStack *parent, QStringList &urlList);
~MythFlashPlayer();

bool Create(void);
bool keyPressEvent(QKeyEvent *);
bool Create(void) override; // MythScreenType
bool keyPressEvent(QKeyEvent *) override; // MythScreenType

private:
QVariant evaluateJavaScript(const QString&);
Expand Down
4 changes: 2 additions & 2 deletions mythplugins/mythgallery/dcrawplugin/dcrawhandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
class DcrawHandler : public QImageIOHandler
{
public:
bool canRead() const;
bool read(QImage *image);
bool canRead() const override; // QImageIOHandler
bool read(QImage *image) override; // QImageIOHandler
static int loadThumbnail(QImage *image, QString fileName);
};

6 changes: 4 additions & 2 deletions mythplugins/mythgallery/dcrawplugin/dcrawplugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ class DcrawPlugin : public QImageIOPlugin
public:

QStringList keys() const;
Capabilities capabilities(QIODevice *device, const QByteArray &format) const;
QImageIOHandler *create(QIODevice *device, const QByteArray &format) const;
Capabilities capabilities(QIODevice *device,
const QByteArray &format) const override; // QImageIOPlugin
QImageIOHandler *create(QIODevice *device,
const QByteArray &format) const override; // QImageIOPlugin
};
2 changes: 1 addition & 1 deletion mythplugins/mythgallery/mythgallery/galleryfilterdlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class FilterScanThread : public MThread
public:
FilterScanThread(const QString& dir, const GalleryFilter& flt,
int *dirCount, int *imageCount, int *movieCount);
virtual void run();
void run() override; // MThread

private:
GalleryFilter m_filter;
Expand Down
2 changes: 1 addition & 1 deletion mythplugins/mythgallery/mythgallery/galleryfilterdlg.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class GalleryFilterDialog : public MythScreenType
GalleryFilter *filter);
~GalleryFilterDialog();

bool Create();
bool Create() override; // MythScreenType

signals:
void filterChanged();
Expand Down
26 changes: 13 additions & 13 deletions mythplugins/mythgallery/mythgallery/glsingleview.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class GLSDialog : public MythDialog
MythMainWindow *parent, const char *name="GLSDialog");

protected:
void closeEvent(QCloseEvent *e);
void closeEvent(QCloseEvent *e) override; // QWidget

private:
GLSingleView *m_view;
Expand All @@ -72,30 +72,30 @@ class GLSingleView : public QGLWidget, public ImageView


protected:
void initializeGL(void);
void initializeGL(void) override; // QGLWidget

// Commands
virtual void Rotate(int angle);
virtual void DisplayNext(bool reset, bool loadImage);
virtual void DisplayPrev(bool reset, bool loadImage);
virtual void Load(void);
void resizeGL(int w, int h);
void Rotate(int angle) override; // ImageView
void DisplayNext(bool reset, bool loadImage) override; // ImageView
void DisplayPrev(bool reset, bool loadImage) override; // ImageView
void Load(void) override; // ImageView
void resizeGL(int w, int h) override; // QGLWidget

void paintGL(void);
void paintGL(void) override; // QGLWidget
void paintTexture(void);
void createTexInfo(void);
virtual void keyPressEvent(QKeyEvent *e);
void keyPressEvent(QKeyEvent *e) override; // QWidget
void checkPosition(void);

// Sets
virtual void SetZoom(float zoom);
void SetZoom(float zoom) override; // ImageView
void SetTransitionTimeout(int timeout);

// Gets
int GetNearestGLTextureSize(int) const;

virtual void RegisterEffects(void);
virtual void RunEffect(const QString &effect);
void RegisterEffects(void) override; // ImageView
void RunEffect(const QString &effect) override; // ImageView

void EffectNone(void);
void EffectBlend(void);
Expand Down Expand Up @@ -162,7 +162,7 @@ class KenBurnsImageLoader : public MThread
{
public:
KenBurnsImageLoader(GLSingleView *singleView, QSize m_texSize, QSize m_screenSize);
void run();
void run() override; // MThread
private:
GLSingleView *m_singleView;
QSize m_screenSize;
Expand Down
2 changes: 1 addition & 1 deletion mythplugins/mythgallery/mythgallery/iconview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class FileCopyThread : public MThread
{
public:
FileCopyThread(IconView *parent, bool move);
virtual void run();
void run() override; // MThread
int GetProgress(void) { return m_progress; }

private:
Expand Down
10 changes: 5 additions & 5 deletions mythplugins/mythgallery/mythgallery/iconview.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ class IconView : public MythScreenType
const QString &galleryDir, MythMediaDevice *initialDevice);
~IconView();

bool Create(void);
bool keyPressEvent(QKeyEvent *);
void customEvent(QEvent*);
bool Create(void) override; // MythScreenType
bool keyPressEvent(QKeyEvent *) override; // MythScreenType
void customEvent(QEvent*) override; // MythUIType
void HandleRandomShow(void);
void HandleSeasonalShow(void);

Expand Down Expand Up @@ -191,7 +191,7 @@ class ChildCountThread : public MThread
void cancel();

protected:
void run();
void run() override; // MThread

private:

Expand All @@ -207,7 +207,7 @@ class ImportThread: public MThread
{
public:
explicit ImportThread(const QString &cmd);
virtual void run();
void run() override; // MThread
private:
QString m_command;
};
Expand Down
2 changes: 1 addition & 1 deletion mythplugins/mythgallery/mythgallery/imageview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class ImageView::LoadAlbumRunnable : public QRunnable {
int slideshow_sequencing);

void abort();
virtual void run();
void run() override; // QRunnable

/** Separate the input into files and directories */
static void filterDirectories(const ThumbList &input,
Expand Down
Loading

0 comments on commit 76774fe

Please sign in to comment.