Skip to content

Commit

Permalink
Merge 'render-tidy' branch back into master.
Browse files Browse the repository at this point in the history
  • Loading branch information
linuxdude42 committed Dec 2, 2019
2 parents 4fbabd9 + d2130d0 commit 2916f55
Show file tree
Hide file tree
Showing 895 changed files with 8,129 additions and 8,783 deletions.
32 changes: 6 additions & 26 deletions .clang-tidy
Expand Up @@ -24,18 +24,10 @@
Checks: '-*,
bugprone-*,
# A handful of warnings
bugprone-integer-division,
# Bunch of warnings.... ,
# Comment out this and the cppcoreguidelines version. ,
-bugprone-narrowing-conversions,
# Errors in code? GroupAnimation overrides several parent
# functions with an explicit nullptr. Shouldnt it just call
# up? ,
bugprone-parent-virtual-call,
# Prevent self-assignment. Needs to be investigated.
-bugprone-unhandled-self-assignment,
Expand Down Expand Up @@ -112,10 +104,9 @@ Checks: '-*,
-cppcoreguidelines-no-malloc,
# No gsl. ,
-cppcoreguidelines-owning-memory,
# No gsl. ,
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
# No gsl. ,
-cppcoreguidelines-pro-bounds-constant-array-index,
# Bunch of warnings.... ,
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
cppcoreguidelines-pro-type-const-cast,
Expand Down Expand Up @@ -160,19 +151,9 @@ Checks: '-*,
# Noisy!!! foo(void) => foo() ,
-modernize-redundant-void-arg,
# Not investigated yet. ,
-modernize-use-auto,
# One weirdness in videooutput_xv.cpp. Making the proposed
# change causes one of the programs to fail in the link stage. ,
-modernize-use-emplace,
# Why would anyone want this? ,
-modernize-use-trailing-return-type,
# Noisy. Needs work.,
-modernize-use-using,
## C++14 modernize-make-unique,
## C++14 modernize-use-transparent-functors,
## C++17 modernize-concat-nested-namespaces,
Expand All @@ -188,12 +169,6 @@ Checks: '-*,
# Not investigated yet. ,
-readability-function-size,
# Will fix member names, but not any uses of the changed
# memeber names.
#
# Done for all but libmythtv and libmythui. ,
-readability-identifier-naming,
# Wants to convert all "if (x)" pointer validity checks to be
# "if (x != nullptr)". These should be ignored as the
# AllowPointerConditions key is set to "1", but tidy complains
Expand Down Expand Up @@ -280,3 +255,8 @@ CheckOptions:
value: 'camelBack'
- key: readability-identifier-naming.StaticVariablePrefix
value: 's_'

- key: google-runtime-int.Signedtypeprefix
value: 'qint'
- key: google-runtime-int.UnsignedTypePrefix
value: 'quint'
56 changes: 28 additions & 28 deletions mythplugins/mytharchive/mytharchive/archivesettings.cpp
Expand Up @@ -15,7 +15,7 @@

static HostFileBrowserSetting *MythArchiveTempDir()
{
HostFileBrowserSetting *gc = new HostFileBrowserSetting("MythArchiveTempDir");
auto *gc = new HostFileBrowserSetting("MythArchiveTempDir");

gc->setLabel(ArchiveSettings::tr("MythArchive Temp Directory"));
gc->setValue("");
Expand All @@ -30,7 +30,7 @@ static HostFileBrowserSetting *MythArchiveTempDir()

static HostFileBrowserSetting *MythArchiveShareDir()
{
HostFileBrowserSetting *gc = new HostFileBrowserSetting("MythArchiveShareDir");
auto *gc = new HostFileBrowserSetting("MythArchiveShareDir");

gc->setLabel(ArchiveSettings::tr("MythArchive Share Directory"));
gc->setValue(GetShareDir() + "mytharchive/");
Expand All @@ -45,7 +45,7 @@ static HostFileBrowserSetting *MythArchiveShareDir()

static HostComboBoxSetting *PALNTSC()
{
HostComboBoxSetting *gc = new HostComboBoxSetting("MythArchiveVideoFormat");
auto *gc = new HostComboBoxSetting("MythArchiveVideoFormat");

gc->setLabel(ArchiveSettings::tr("Video format"));

Expand All @@ -59,7 +59,7 @@ static HostComboBoxSetting *PALNTSC()

static HostTextEditSetting *MythArchiveFileFilter()
{
HostTextEditSetting *gc = new HostTextEditSetting("MythArchiveFileFilter");
auto *gc = new HostTextEditSetting("MythArchiveFileFilter");

gc->setLabel(ArchiveSettings::tr("File Selector Filter"));
gc->setValue("*.mpg *.mov *.avi *.mpeg *.nuv");
Expand All @@ -71,7 +71,7 @@ static HostTextEditSetting *MythArchiveFileFilter()

static HostFileBrowserSetting *MythArchiveDVDLocation()
{
HostFileBrowserSetting *gc = new HostFileBrowserSetting("MythArchiveDVDLocation");
auto *gc = new HostFileBrowserSetting("MythArchiveDVDLocation");

gc->setLabel(ArchiveSettings::tr("Location of DVD"));
gc->setValue("/dev/dvd");
Expand All @@ -84,7 +84,7 @@ static HostFileBrowserSetting *MythArchiveDVDLocation()

static HostSpinBoxSetting *MythArchiveDriveSpeed()
{
HostSpinBoxSetting *gc = new HostSpinBoxSetting("MythArchiveDriveSpeed", 0, 48, 1);
auto *gc = new HostSpinBoxSetting("MythArchiveDriveSpeed", 0, 48, 1);

gc->setLabel(ArchiveSettings::tr("DVD Drive Write Speed"));
gc->setValue(0);
Expand All @@ -98,7 +98,7 @@ static HostSpinBoxSetting *MythArchiveDriveSpeed()

static HostTextEditSetting *MythArchiveDVDPlayerCmd()
{
HostTextEditSetting *gc = new HostTextEditSetting("MythArchiveDVDPlayerCmd");
auto *gc = new HostTextEditSetting("MythArchiveDVDPlayerCmd");

gc->setLabel(ArchiveSettings::tr("Command to play DVD"));
gc->setValue("Internal");
Expand All @@ -114,7 +114,7 @@ static HostTextEditSetting *MythArchiveDVDPlayerCmd()

static HostCheckBoxSetting *MythArchiveCopyRemoteFiles()
{
HostCheckBoxSetting *gc = new HostCheckBoxSetting("MythArchiveCopyRemoteFiles");
auto *gc = new HostCheckBoxSetting("MythArchiveCopyRemoteFiles");

gc->setLabel(ArchiveSettings::tr("Copy remote files"));
gc->setValue(false);
Expand All @@ -129,7 +129,7 @@ static HostCheckBoxSetting *MythArchiveCopyRemoteFiles()

static HostCheckBoxSetting *MythArchiveAlwaysUseMythTranscode()
{
HostCheckBoxSetting *gc = new HostCheckBoxSetting("MythArchiveAlwaysUseMythTranscode");
auto *gc = new HostCheckBoxSetting("MythArchiveAlwaysUseMythTranscode");

gc->setLabel(ArchiveSettings::tr("Always Use Mythtranscode"));
gc->setValue(true);
Expand All @@ -144,7 +144,7 @@ static HostCheckBoxSetting *MythArchiveAlwaysUseMythTranscode()

static HostCheckBoxSetting *MythArchiveUseProjectX()
{
HostCheckBoxSetting *gc = new HostCheckBoxSetting("MythArchiveUseProjectX");
auto *gc = new HostCheckBoxSetting("MythArchiveUseProjectX");

gc->setLabel(ArchiveSettings::tr("Use ProjectX"));
gc->setValue(false);
Expand All @@ -158,7 +158,7 @@ static HostCheckBoxSetting *MythArchiveUseProjectX()

static HostCheckBoxSetting *MythArchiveUseFIFO()
{
HostCheckBoxSetting *gc = new HostCheckBoxSetting("MythArchiveUseFIFO");
auto *gc = new HostCheckBoxSetting("MythArchiveUseFIFO");

gc->setLabel(ArchiveSettings::tr("Use FIFOs"));
gc->setValue(true);
Expand All @@ -174,7 +174,7 @@ static HostCheckBoxSetting *MythArchiveUseFIFO()

static HostCheckBoxSetting *MythArchiveAddSubtitles()
{
HostCheckBoxSetting *gc = new HostCheckBoxSetting("MythArchiveAddSubtitles");
auto *gc = new HostCheckBoxSetting("MythArchiveAddSubtitles");

gc->setLabel(ArchiveSettings::tr("Add Subtitles"));
gc->setValue(false);
Expand All @@ -187,7 +187,7 @@ static HostCheckBoxSetting *MythArchiveAddSubtitles()

static HostComboBoxSetting *MainMenuAspectRatio()
{
HostComboBoxSetting *gc = new HostComboBoxSetting("MythArchiveMainMenuAR");
auto *gc = new HostComboBoxSetting("MythArchiveMainMenuAR");

gc->setLabel(ArchiveSettings::tr("Main Menu Aspect Ratio"));

Expand All @@ -203,7 +203,7 @@ static HostComboBoxSetting *MainMenuAspectRatio()

static HostComboBoxSetting *ChapterMenuAspectRatio()
{
HostComboBoxSetting *gc = new HostComboBoxSetting("MythArchiveChapterMenuAR");
auto *gc = new HostComboBoxSetting("MythArchiveChapterMenuAR");

gc->setLabel(ArchiveSettings::tr("Chapter Menu Aspect Ratio"));

Expand All @@ -224,7 +224,7 @@ static HostComboBoxSetting *ChapterMenuAspectRatio()

static HostComboBoxSetting *MythArchiveDateFormat()
{
HostComboBoxSetting *gc = new HostComboBoxSetting("MythArchiveDateFormat");
auto *gc = new HostComboBoxSetting("MythArchiveDateFormat");
gc->setLabel(ArchiveSettings::tr("Date format"));

QDate sampdate = MythDate::current().toLocalTime().date();
Expand Down Expand Up @@ -260,7 +260,7 @@ static HostComboBoxSetting *MythArchiveDateFormat()

static HostComboBoxSetting *MythArchiveTimeFormat()
{
HostComboBoxSetting *gc = new HostComboBoxSetting("MythArchiveTimeFormat");
auto *gc = new HostComboBoxSetting("MythArchiveTimeFormat");
gc->setLabel(ArchiveSettings::tr("Time format"));

QTime samptime = QTime::currentTime();
Expand All @@ -278,7 +278,7 @@ static HostComboBoxSetting *MythArchiveTimeFormat()

static HostComboBoxSetting *MythArchiveDefaultEncProfile()
{
HostComboBoxSetting *gc = new HostComboBoxSetting("MythArchiveDefaultEncProfile");
auto *gc = new HostComboBoxSetting("MythArchiveDefaultEncProfile");
gc->setLabel(ArchiveSettings::tr("Default Encoder Profile"));

gc->addSelection(ArchiveSettings::tr("HQ", "Encoder profile"), "HQ");
Expand All @@ -295,7 +295,7 @@ static HostComboBoxSetting *MythArchiveDefaultEncProfile()

static HostTextEditSetting *MythArchiveMplexCmd()
{
HostTextEditSetting *gc = new HostTextEditSetting("MythArchiveMplexCmd");
auto *gc = new HostTextEditSetting("MythArchiveMplexCmd");

gc->setLabel(ArchiveSettings::tr("mplex Command"));

Expand All @@ -308,7 +308,7 @@ static HostTextEditSetting *MythArchiveMplexCmd()

static HostTextEditSetting *MythArchiveDvdauthorCmd()
{
HostTextEditSetting *gc = new HostTextEditSetting("MythArchiveDvdauthorCmd");
auto *gc = new HostTextEditSetting("MythArchiveDvdauthorCmd");

gc->setLabel(ArchiveSettings::tr("dvdauthor command"));

Expand All @@ -321,7 +321,7 @@ static HostTextEditSetting *MythArchiveDvdauthorCmd()

static HostTextEditSetting *MythArchiveMkisofsCmd()
{
HostTextEditSetting *gc = new HostTextEditSetting("MythArchiveMkisofsCmd");
auto *gc = new HostTextEditSetting("MythArchiveMkisofsCmd");

gc->setLabel(ArchiveSettings::tr("mkisofs command"));

Expand All @@ -334,7 +334,7 @@ static HostTextEditSetting *MythArchiveMkisofsCmd()

static HostTextEditSetting *MythArchiveGrowisofsCmd()
{
HostTextEditSetting *gc = new HostTextEditSetting("MythArchiveGrowisofsCmd");
auto *gc = new HostTextEditSetting("MythArchiveGrowisofsCmd");

gc->setLabel(ArchiveSettings::tr("growisofs command"));

Expand All @@ -347,7 +347,7 @@ static HostTextEditSetting *MythArchiveGrowisofsCmd()

static HostTextEditSetting *MythArchiveM2VRequantiserCmd()
{
HostTextEditSetting *gc = new HostTextEditSetting("MythArchiveM2VRequantiserCmd");
auto *gc = new HostTextEditSetting("MythArchiveM2VRequantiserCmd");

gc->setLabel(ArchiveSettings::tr("M2VRequantiser command"));

Expand All @@ -361,7 +361,7 @@ static HostTextEditSetting *MythArchiveM2VRequantiserCmd()

static HostTextEditSetting *MythArchiveJpeg2yuvCmd()
{
HostTextEditSetting *gc = new HostTextEditSetting("MythArchiveJpeg2yuvCmd");
auto *gc = new HostTextEditSetting("MythArchiveJpeg2yuvCmd");

gc->setLabel(ArchiveSettings::tr("jpeg2yuv command"));

Expand All @@ -374,7 +374,7 @@ static HostTextEditSetting *MythArchiveJpeg2yuvCmd()

static HostTextEditSetting *MythArchiveSpumuxCmd()
{
HostTextEditSetting *gc = new HostTextEditSetting("MythArchiveSpumuxCmd");
auto *gc = new HostTextEditSetting("MythArchiveSpumuxCmd");

gc->setLabel(ArchiveSettings::tr("spumux command"));

Expand All @@ -387,7 +387,7 @@ static HostTextEditSetting *MythArchiveSpumuxCmd()

static HostTextEditSetting *MythArchiveMpeg2encCmd()
{
HostTextEditSetting *gc = new HostTextEditSetting("MythArchiveMpeg2encCmd");
auto *gc = new HostTextEditSetting("MythArchiveMpeg2encCmd");

gc->setLabel(ArchiveSettings::tr("mpeg2enc command"));

Expand All @@ -400,7 +400,7 @@ static HostTextEditSetting *MythArchiveMpeg2encCmd()

static HostTextEditSetting *MythArchiveProjectXCmd()
{
HostTextEditSetting *gc = new HostTextEditSetting("MythArchiveProjectXCmd");
auto *gc = new HostTextEditSetting("MythArchiveProjectXCmd");

gc->setLabel(ArchiveSettings::tr("projectx command"));

Expand Down Expand Up @@ -430,15 +430,15 @@ ArchiveSettings::ArchiveSettings()
addChild(MythArchiveUseFIFO());
addChild(MythArchiveDefaultEncProfile());

GroupSetting* DVDSettings = new GroupSetting();
auto* DVDSettings = new GroupSetting();
DVDSettings->setLabel(ArchiveSettings::tr("DVD Menu Settings"));
DVDSettings->addChild(MainMenuAspectRatio());
DVDSettings->addChild(ChapterMenuAspectRatio());
DVDSettings->addChild(MythArchiveDateFormat());
DVDSettings->addChild(MythArchiveTimeFormat());
addChild(DVDSettings);

GroupSetting* externalCmdSettings = new GroupSetting();
auto* externalCmdSettings = new GroupSetting();
externalCmdSettings->setLabel(ArchiveSettings::tr("MythArchive External Commands"));
externalCmdSettings->addChild(MythArchiveMplexCmd());
externalCmdSettings->addChild(MythArchiveDvdauthorCmd());
Expand Down
2 changes: 1 addition & 1 deletion mythplugins/mytharchive/mytharchive/archiveutil.cpp
Expand Up @@ -288,7 +288,7 @@ bool getFileDetails(ArchiveItem *a)
void showWarningDialog(const QString &msg)
{
MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
MythConfirmationDialog *dialog = new MythConfirmationDialog(popupStack, msg, false);
auto *dialog = new MythConfirmationDialog(popupStack, msg, false);

if (dialog->Create())
popupStack->AddScreen(dialog);
Expand Down
20 changes: 10 additions & 10 deletions mythplugins/mytharchive/mytharchive/archiveutil.h
Expand Up @@ -13,42 +13,42 @@

class ProgramInfo;

typedef enum
enum ARCHIVEDESTINATION
{
AD_DVD_SL = 0,
AD_DVD_DL = 1,
AD_DVD_RW = 2,
AD_FILE = 3
} ARCHIVEDESTINATION;
};

Q_DECLARE_METATYPE (ARCHIVEDESTINATION);

typedef struct ArchiveDestination
struct ArchiveDestination
{
ARCHIVEDESTINATION type;
const char *name;
const char *description;
int64_t freeSpace;
}_ArchiveDestination;
};

extern struct ArchiveDestination ArchiveDestinations[];
extern int ArchiveDestinationsCount;

typedef struct
struct EncoderProfile
{
QString name;
QString description;
float bitrate;
} EncoderProfile;
};

typedef struct ThumbImage
struct ThumbImage
{
QString caption;
QString filename;
qint64 frame;
} ThumbImage;
};

typedef struct
struct ArchiveItem
{
int id;
QString type;
Expand All @@ -70,7 +70,7 @@ typedef struct
bool useCutlist;
bool editedDetails;
QList<ThumbImage*> thumbList;
} ArchiveItem;
};

QString formatSize(int64_t sizeKB, int prec = 2);
QString getTempDirectory(bool showError = false);
Expand Down

0 comments on commit 2916f55

Please sign in to comment.