1
0
Fork 0
forked from len0rd/rockbox

rbutil: Modernize code to use C++11 nullptr.

Change-Id: I112cf95122a896cdb30a823b4c1f49831273dc7e
This commit is contained in:
Dominik Riebeling 2020-11-19 20:36:57 +01:00
parent f608de723c
commit 12764781c6
58 changed files with 111 additions and 111 deletions

View file

@ -250,7 +250,7 @@ void Autodetection::mergePatcher(void)
// try ipodpatcher // try ipodpatcher
// initialize sector buffer. Needed. // initialize sector buffer. Needed.
struct ipod_t ipod; struct ipod_t ipod;
ipod.sectorbuf = NULL; ipod.sectorbuf = nullptr;
ipod_alloc_buffer(&ipod, BUFFER_SIZE); ipod_alloc_buffer(&ipod, BUFFER_SIZE);
n = ipod_scan(&ipod); n = ipod_scan(&ipod);
// FIXME: handle more than one Ipod connected in ipodpatcher. // FIXME: handle more than one Ipod connected in ipodpatcher.

View file

@ -32,7 +32,7 @@ class Autodetection :public QObject
Q_OBJECT Q_OBJECT
public: public:
Autodetection(QObject* parent=0); Autodetection(QObject* parent=nullptr);
enum PlayerStatus { enum PlayerStatus {
PlayerOk, PlayerOk,

View file

@ -93,7 +93,7 @@ void BootloaderInstallAms::installStage2(void)
rb_packed = load_rockbox_file(bootfile.toLocal8Bit().data(), &model, rb_packed = load_rockbox_file(bootfile.toLocal8Bit().data(), &model,
&bootloader_size,&rb_packedsize, &bootloader_size,&rb_packedsize,
errstr,sizeof(errstr)); errstr,sizeof(errstr));
if (rb_packed == NULL) if (rb_packed == nullptr)
{ {
LOG_ERROR() << "could not load bootloader: " << bootfile; LOG_ERROR() << "could not load bootloader: " << bootfile;
emit logItem(errstr, LOGERROR); emit logItem(errstr, LOGERROR);
@ -106,7 +106,7 @@ void BootloaderInstallAms::installStage2(void)
buf = load_of_file(m_offile.toLocal8Bit().data(), model, &len, &sum, buf = load_of_file(m_offile.toLocal8Bit().data(), model, &len, &sum,
&firmware_size, &of_packed ,&of_packedsize, &firmware_size, &of_packed ,&of_packedsize,
errstr, sizeof(errstr)); errstr, sizeof(errstr));
if (buf == NULL) if (buf == nullptr)
{ {
LOG_ERROR() << "could not load OF: " << m_offile; LOG_ERROR() << "could not load OF: " << m_offile;
emit logItem(errstr, LOGERROR); emit logItem(errstr, LOGERROR);

View file

@ -246,7 +246,7 @@ bool BootloaderInstallBase::setOfFile(QString of, QStringList blfile)
delete zu; delete zu;
// if ZIP failed, try CAB // if ZIP failed, try CAB
if(util == 0) if(util == nullptr)
{ {
MsPackUtil *msu = new MsPackUtil(this); MsPackUtil *msu = new MsPackUtil(this);
if(msu->open(of)) if(msu->open(of))

View file

@ -57,7 +57,7 @@ void BootloaderThreadBSPatch::run(void)
BootloaderInstallBSPatch::BootloaderInstallBSPatch(QObject *parent) BootloaderInstallBSPatch::BootloaderInstallBSPatch(QObject *parent)
: BootloaderInstallBase(parent) : BootloaderInstallBase(parent)
{ {
m_thread = NULL; m_thread = nullptr;
} }
QString BootloaderInstallBSPatch::ofHint() QString BootloaderInstallBSPatch::ofHint()

View file

@ -27,7 +27,7 @@ class BootloaderInstallChinaChip : public BootloaderInstallBase
Q_OBJECT Q_OBJECT
public: public:
BootloaderInstallChinaChip(QObject *parent = 0); BootloaderInstallChinaChip(QObject *parent = nullptr);
bool install(void); bool install(void);
bool uninstall(void); bool uninstall(void);
BootloaderInstallBase::BootloaderType installed(void); BootloaderInstallBase::BootloaderType installed(void);

View file

@ -73,7 +73,7 @@ BootloaderInstallBase* BootloaderInstallHelper::createBootloaderInstaller(QObjec
return new BootloaderInstallBSPatch(parent); return new BootloaderInstallBSPatch(parent);
} }
else { else {
return NULL; return nullptr;
} }
} }

View file

@ -32,11 +32,11 @@ struct md5s {
struct md5s md5sums[] = { struct md5s md5sums[] = {
#include "irivertools/h100sums.h" #include "irivertools/h100sums.h"
{ 0, 0 }, { nullptr, nullptr },
#include "irivertools/h120sums.h" #include "irivertools/h120sums.h"
{ 0, 0 }, { nullptr, nullptr },
#include "irivertools/h300sums.h" #include "irivertools/h300sums.h"
{ 0, 0 } { nullptr, nullptr }
}; };
@ -86,7 +86,7 @@ bool BootloaderInstallHex::install(void)
m_model = 4; m_model = 4;
// 3: h300, 2: h120, 1: h100, 0:invalid // 3: h300, 2: h120, 1: h100, 0:invalid
while(i--) { while(i--) {
if(md5sums[i].orig == 0) if(md5sums[i].orig == nullptr)
m_model--; m_model--;
if(!qstrcmp(md5sums[i].orig, hash.toLatin1())) if(!qstrcmp(md5sums[i].orig, hash.toLatin1()))
break; break;

View file

@ -31,7 +31,7 @@ class BootloaderInstallHex : public BootloaderInstallBase
Q_OBJECT Q_OBJECT
public: public:
BootloaderInstallHex(QObject *parent = 0); BootloaderInstallHex(QObject *parent = nullptr);
bool install(void); bool install(void);
bool uninstall(void); bool uninstall(void);
BootloaderInstallBase::BootloaderType installed(void); BootloaderInstallBase::BootloaderType installed(void);

View file

@ -63,7 +63,7 @@ void BootloaderThreadImx::run(void)
BootloaderInstallImx::BootloaderInstallImx(QObject *parent) BootloaderInstallImx::BootloaderInstallImx(QObject *parent)
: BootloaderInstallBase(parent) : BootloaderInstallBase(parent)
{ {
m_thread = NULL; m_thread = nullptr;
} }

View file

@ -45,7 +45,7 @@ BootloaderInstallIpod::~BootloaderInstallIpod()
bool BootloaderInstallIpod::install(void) bool BootloaderInstallIpod::install(void)
{ {
if(ipod.sectorbuf == NULL) { if(ipod.sectorbuf == nullptr) {
emit logItem(tr("Error: can't allocate buffer memory!"), LOGERROR); emit logItem(tr("Error: can't allocate buffer memory!"), LOGERROR);
emit done(true); emit done(true);
return false; return false;

View file

@ -46,7 +46,7 @@ BootloaderInstallSansa::~BootloaderInstallSansa()
*/ */
bool BootloaderInstallSansa::install(void) bool BootloaderInstallSansa::install(void)
{ {
if(sansa.sectorbuf == NULL) { if(sansa.sectorbuf == nullptr) {
emit logItem(tr("Error: can't allocate buffer memory!"), LOGERROR); emit logItem(tr("Error: can't allocate buffer memory!"), LOGERROR);
return false; return false;
emit done(true); emit done(true);
@ -88,7 +88,7 @@ bool BootloaderInstallSansa::install(void)
*/ */
void BootloaderInstallSansa::installStage2(void) void BootloaderInstallSansa::installStage2(void)
{ {
unsigned char* buf = NULL; unsigned char* buf = nullptr;
unsigned int len; unsigned int len;
emit logItem(tr("Installing Rockbox bootloader"), LOGINFO); emit logItem(tr("Installing Rockbox bootloader"), LOGINFO);

View file

@ -30,7 +30,7 @@ class BootloaderInstallSansa : public BootloaderInstallBase
Q_OBJECT Q_OBJECT
public: public:
BootloaderInstallSansa(QObject *parent = 0); BootloaderInstallSansa(QObject *parent = nullptr);
~BootloaderInstallSansa(); ~BootloaderInstallSansa();
bool install(void); bool install(void);
bool uninstall(void); bool uninstall(void);

View file

@ -57,7 +57,7 @@ bool BootloaderInstallTcc::install(void)
void BootloaderInstallTcc::installStage2(void) void BootloaderInstallTcc::installStage2(void)
{ {
unsigned char *of_buf, *boot_buf = NULL, *patched_buf = NULL; unsigned char *of_buf, *boot_buf = nullptr, *patched_buf = nullptr;
int n, of_size, boot_size, patched_size; int n, of_size, boot_size, patched_size;
char errstr[200]; char errstr[200];
bool ret = false; bool ret = false;
@ -76,7 +76,7 @@ void BootloaderInstallTcc::installStage2(void)
/* Load original firmware file */ /* Load original firmware file */
of_buf = file_read(m_offile.toLocal8Bit().data(), &of_size); of_buf = file_read(m_offile.toLocal8Bit().data(), &of_size);
if (of_buf == NULL) if (of_buf == nullptr)
{ {
emit logItem(errstr, LOGERROR); emit logItem(errstr, LOGERROR);
emit logItem(tr("Could not load %1").arg(m_offile), LOGERROR); emit logItem(tr("Could not load %1").arg(m_offile), LOGERROR);
@ -93,7 +93,7 @@ void BootloaderInstallTcc::installStage2(void)
/* Load bootloader file */ /* Load bootloader file */
boot_buf = file_read(bootfile.toLocal8Bit().data(), &boot_size); boot_buf = file_read(bootfile.toLocal8Bit().data(), &boot_size);
if (boot_buf == NULL) if (boot_buf == nullptr)
{ {
emit logItem(errstr, LOGERROR); emit logItem(errstr, LOGERROR);
emit logItem(tr("Could not load %1").arg(bootfile), LOGERROR); emit logItem(tr("Could not load %1").arg(bootfile), LOGERROR);
@ -105,7 +105,7 @@ void BootloaderInstallTcc::installStage2(void)
patched_buf = patch_firmware_tcc(of_buf, of_size, boot_buf, boot_size, patched_buf = patch_firmware_tcc(of_buf, of_size, boot_buf, boot_size,
&patched_size); &patched_size);
if (patched_buf == NULL) if (patched_buf == nullptr)
{ {
emit logItem(errstr, LOGERROR); emit logItem(errstr, LOGERROR);
emit logItem(tr("Could not patch firmware"), LOGERROR); emit logItem(tr("Could not patch firmware"), LOGERROR);

View file

@ -34,7 +34,7 @@ class EncoderExe : public EncoderBase
Q_OBJECT Q_OBJECT
public: public:
EncoderExe(QString name,QObject *parent = NULL); EncoderExe(QString name,QObject *parent = nullptr);
bool encode(QString input,QString output); bool encode(QString input,QString output);
bool start(); bool start();
bool stop() {return true;} bool stop() {return true;}

View file

@ -83,11 +83,11 @@ bool EncoderRbSpeex::encode(QString input,QString output)
char errstr[512]; char errstr[512];
FILE *fin,*fout; FILE *fin,*fout;
if ((fin = fopen(input.toLocal8Bit(), "rb")) == NULL) { if ((fin = fopen(input.toLocal8Bit(), "rb")) == nullptr) {
LOG_ERROR() << "Error: could not open input file\n"; LOG_ERROR() << "Error: could not open input file\n";
return false; return false;
} }
if ((fout = fopen(output.toLocal8Bit(), "wb")) == NULL) { if ((fout = fopen(output.toLocal8Bit(), "wb")) == nullptr) {
LOG_ERROR() << "Error: could not open output file\n"; LOG_ERROR() << "Error: could not open output file\n";
fclose(fin); fclose(fin);
return false; return false;

View file

@ -34,7 +34,7 @@ class EncoderRbSpeex : public EncoderBase
Q_OBJECT Q_OBJECT
public: public:
EncoderRbSpeex(QObject *parent = NULL); EncoderRbSpeex(QObject *parent = nullptr);
bool encode(QString input,QString output); bool encode(QString input,QString output);
bool start(); bool start();
bool stop() {return true;} bool stop() {return true;}

View file

@ -32,7 +32,7 @@ class HttpGet : public QObject
Q_OBJECT Q_OBJECT
public: public:
HttpGet(QObject *parent = 0); HttpGet(QObject *parent = nullptr);
void getFile(const QUrl &url); void getFile(const QUrl &url);
void setProxy(const QUrl &url); void setProxy(const QUrl &url);

View file

@ -24,8 +24,8 @@
MsPackUtil::MsPackUtil(QObject* parent) MsPackUtil::MsPackUtil(QObject* parent)
:ArchiveUtil(parent) :ArchiveUtil(parent)
{ {
m_cabd = mspack_create_cab_decompressor(NULL); m_cabd = mspack_create_cab_decompressor(nullptr);
m_cabinet = NULL; m_cabinet = nullptr;
if(!m_cabd) if(!m_cabd)
LOG_ERROR() << "CAB decompressor creation failed!"; LOG_ERROR() << "CAB decompressor creation failed!";
} }
@ -41,20 +41,20 @@ bool MsPackUtil::open(QString& mspackfile)
{ {
close(); close();
if(m_cabd == NULL) if(m_cabd == nullptr)
{ {
LOG_ERROR() << "No CAB decompressor available: cannot open file!"; LOG_ERROR() << "No CAB decompressor available: cannot open file!";
return false; return false;
} }
m_cabinet = m_cabd->search(m_cabd, QFile::encodeName(mspackfile).constData()); m_cabinet = m_cabd->search(m_cabd, QFile::encodeName(mspackfile).constData());
return m_cabinet != NULL; return m_cabinet != nullptr;
} }
bool MsPackUtil::close(void) bool MsPackUtil::close(void)
{ {
if(m_cabd && m_cabinet) if(m_cabd && m_cabinet)
m_cabd->close(m_cabd, m_cabinet); m_cabd->close(m_cabd, m_cabinet);
m_cabinet = NULL; m_cabinet = nullptr;
return true; return true;
} }
@ -76,7 +76,7 @@ bool MsPackUtil::extractArchive(const QString& dest, QString file)
else if(!file.isEmpty()) else if(!file.isEmpty())
singleoutfile = dest; singleoutfile = dest;
struct mscabd_file *f = m_cabinet->files; struct mscabd_file *f = m_cabinet->files;
if(f == NULL) if(f == nullptr)
{ {
LOG_WARNING() << "CAB doesn't contain file" << file; LOG_WARNING() << "CAB doesn't contain file" << file;
return true; return true;

View file

@ -82,11 +82,11 @@ const static struct {
}; };
//! pointer to setting object to NULL //! pointer to setting object to NULL
QSettings* RbSettings::userSettings = NULL; QSettings* RbSettings::userSettings = nullptr;
void RbSettings::ensureRbSettingsExists() void RbSettings::ensureRbSettingsExists()
{ {
if(userSettings == NULL) if(userSettings == nullptr)
{ {
// portable installation: // portable installation:
// check for a configuration file in the program folder. // check for a configuration file in the program folder.
@ -96,13 +96,13 @@ void RbSettings::ensureRbSettingsExists()
if(config.isFile()) if(config.isFile())
{ {
userSettings = new QSettings(QCoreApplication::instance()->applicationDirPath() userSettings = new QSettings(QCoreApplication::instance()->applicationDirPath()
+ "/RockboxUtility.ini", QSettings::IniFormat, NULL); + "/RockboxUtility.ini", QSettings::IniFormat, nullptr);
LOG_INFO() << "configuration: portable"; LOG_INFO() << "configuration: portable";
} }
else else
{ {
userSettings = new QSettings(QSettings::IniFormat, userSettings = new QSettings(QSettings::IniFormat,
QSettings::UserScope, "rockbox.org", "RockboxUtility",NULL); QSettings::UserScope, "rockbox.org", "RockboxUtility",nullptr);
LOG_INFO() << "configuration: system"; LOG_INFO() << "configuration: system";
} }
} }
@ -123,7 +123,7 @@ void RbSettings::sync()
{ {
char* realuser = getenv("SUDO_UID"); char* realuser = getenv("SUDO_UID");
char* realgroup = getenv("SUDO_GID"); char* realgroup = getenv("SUDO_GID");
if(realuser != NULL && realgroup != NULL) if(realuser != nullptr && realgroup != nullptr)
{ {
int realuid = atoi(realuser); int realuid = atoi(realuser);
int realgid = atoi(realgroup); int realgid = atoi(realgroup);

View file

@ -242,18 +242,18 @@ QMultiMap<uint32_t, QString> System::listUsbDevices(void)
LOG_INFO() << "Searching for USB devices"; LOG_INFO() << "Searching for USB devices";
#if defined(Q_OS_LINUX) #if defined(Q_OS_LINUX)
libusb_device **devs; libusb_device **devs;
if(libusb_init(NULL) != 0) { if(libusb_init(nullptr) != 0) {
LOG_ERROR() << "Initializing libusb-1 failed."; LOG_ERROR() << "Initializing libusb-1 failed.";
return usbids; return usbids;
} }
if(libusb_get_device_list(NULL, &devs) < 1) { if(libusb_get_device_list(nullptr, &devs) < 1) {
LOG_ERROR() << "Error getting device list."; LOG_ERROR() << "Error getting device list.";
return usbids; return usbids;
} }
libusb_device *dev; libusb_device *dev;
int i = 0; int i = 0;
while((dev = devs[i++]) != NULL) { while((dev = devs[i++]) != nullptr) {
QString name; QString name;
unsigned char buf[256]; unsigned char buf[256];
uint32_t id; uint32_t id;
@ -279,7 +279,7 @@ QMultiMap<uint32_t, QString> System::listUsbDevices(void)
} }
libusb_free_device_list(devs, 1); libusb_free_device_list(devs, 1);
libusb_exit(NULL); libusb_exit(nullptr);
#endif #endif
#if defined(Q_OS_MACX) #if defined(Q_OS_MACX)

View file

@ -200,7 +200,7 @@ QMap<int, QStringList> SystemInfo::usbIdMap(enum MapType type)
int j = ids.size(); int j = ids.size();
while(j--) { while(j--) {
QStringList l; QStringList l;
int id = ids.at(j).toInt(0, 16); int id = ids.at(j).toInt(nullptr, 16);
if(id == 0) { if(id == 0) {
continue; continue;
} }

View file

@ -230,7 +230,7 @@ bool TalkFileCreator::copyTalkFiles(QString* errString)
int m_progress = 0; int m_progress = 0;
emit logProgress(m_progress,progressMax); emit logProgress(m_progress,progressMax);
QSettings installlog(m_mountpoint + "/.rockbox/rbutil.log", QSettings::IniFormat, 0); QSettings installlog(m_mountpoint + "/.rockbox/rbutil.log", QSettings::IniFormat, nullptr);
installlog.beginGroup("talkfiles"); installlog.beginGroup("talkfiles");
for(int i=0; i < m_talkList.size(); i++) for(int i=0; i < m_talkList.size(); i++)

View file

@ -69,7 +69,7 @@ void TTSBase::initTTSList()
TTSBase* TTSBase::getTTS(QObject* parent,QString ttsName) TTSBase* TTSBase::getTTS(QObject* parent,QString ttsName)
{ {
TTSBase* tts = 0; TTSBase* tts = nullptr;
#if defined(Q_OS_WIN) #if defined(Q_OS_WIN)
if(ttsName == "sapi") if(ttsName == "sapi")
tts = new TTSSapi(parent); tts = new TTSSapi(parent);

View file

@ -28,7 +28,7 @@ class TTSEspeak : public TTSExes
{ {
Q_OBJECT Q_OBJECT
public: public:
TTSEspeak(QObject* parent=NULL) : TTSExes(parent) TTSEspeak(QObject* parent=nullptr) : TTSExes(parent)
{ {
m_name = "espeak"; m_name = "espeak";

View file

@ -28,7 +28,7 @@ class TTSEspeakNG : public TTSExes
{ {
Q_OBJECT Q_OBJECT
public: public:
TTSEspeakNG(QObject* parent=NULL) : TTSExes(parent) TTSEspeakNG(QObject* parent=nullptr) : TTSExes(parent)
{ {
m_name = "espeak-ng"; m_name = "espeak-ng";

View file

@ -34,7 +34,7 @@ class TTSExes : public TTSBase
Q_OBJECT Q_OBJECT
public: public:
TTSExes(QObject* parent=NULL); TTSExes(QObject* parent=nullptr);
TTSStatus voice(QString text, QString wavfile, QString *errStr); TTSStatus voice(QString text, QString wavfile, QString *errStr);
bool start(QString *errStr); bool start(QString *errStr);
bool stop() {return true;} bool stop() {return true;}

View file

@ -36,7 +36,7 @@ class TTSFestival : public TTSBase
Q_OBJECT Q_OBJECT
public: public:
TTSFestival(QObject* parent=NULL) : TTSBase(parent) {} TTSFestival(QObject* parent=nullptr) : TTSBase(parent) {}
~TTSFestival(); ~TTSFestival();
bool start(QString *errStr); bool start(QString *errStr);
bool stop(); bool stop();

View file

@ -28,7 +28,7 @@ class TTSFlite : public TTSExes
{ {
Q_OBJECT Q_OBJECT
public: public:
TTSFlite(QObject* parent=NULL) : TTSExes(parent) TTSFlite(QObject* parent=nullptr) : TTSExes(parent)
{ {
m_name = "flite"; m_name = "flite";

View file

@ -28,7 +28,7 @@ class TTSMimic : public TTSExes
{ {
Q_OBJECT Q_OBJECT
public: public:
TTSMimic(QObject* parent=NULL) : TTSExes(parent) TTSMimic(QObject* parent=nullptr) : TTSExes(parent)
{ {
m_name = "mimic"; m_name = "mimic";

View file

@ -28,7 +28,7 @@ class TTSMssp: public TTSSapi
{ {
Q_OBJECT Q_OBJECT
public: public:
TTSMssp(QObject* parent=NULL) : TTSSapi(parent) TTSMssp(QObject* parent=nullptr) : TTSSapi(parent)
{ {
m_TTSTemplate = "cscript //nologo \"%exe\" " m_TTSTemplate = "cscript //nologo \"%exe\" "
"/language:%lang /voice:\"%voice\" " "/language:%lang /voice:\"%voice\" "

View file

@ -124,7 +124,7 @@ bool TTSSapi::start(QString *errStr)
execstring.replace("%speed",m_TTSSpeed); execstring.replace("%speed",m_TTSSpeed);
LOG_INFO() << "Start:" << execstring; LOG_INFO() << "Start:" << execstring;
voicescript = new QProcess(NULL); voicescript = new QProcess(nullptr);
//connect(voicescript,SIGNAL(readyReadStandardError()),this,SLOT(error())); //connect(voicescript,SIGNAL(readyReadStandardError()),this,SLOT(error()));
voicescript->start(execstring); voicescript->start(execstring);
LOG_INFO() << "wait for process"; LOG_INFO() << "wait for process";
@ -190,7 +190,7 @@ QStringList TTSSapi::getVoiceList(QString language)
execstring.replace("%lang",language); execstring.replace("%lang",language);
LOG_INFO() << "Start:" << execstring; LOG_INFO() << "Start:" << execstring;
voicescript = new QProcess(NULL); voicescript = new QProcess(nullptr);
voicescript->start(execstring); voicescript->start(execstring);
LOG_INFO() << "wait for process"; LOG_INFO() << "wait for process";
if(!voicescript->waitForStarted()) { if(!voicescript->waitForStarted()) {

View file

@ -36,7 +36,7 @@ class TTSSapi : public TTSBase
Q_OBJECT Q_OBJECT
public: public:
TTSSapi(QObject* parent=NULL); TTSSapi(QObject* parent=nullptr);
TTSStatus voice(QString text,QString wavfile, QString *errStr); TTSStatus voice(QString text,QString wavfile, QString *errStr);
bool start(QString *errStr); bool start(QString *errStr);

View file

@ -28,7 +28,7 @@ class TTSSapi4: public TTSSapi
{ {
Q_OBJECT Q_OBJECT
public: public:
TTSSapi4(QObject* parent=NULL) : TTSSapi(parent) TTSSapi4(QObject* parent=nullptr) : TTSSapi(parent)
{ {
m_TTSTemplate = "cscript //nologo \"%exe\" " m_TTSTemplate = "cscript //nologo \"%exe\" "
"/language:%lang /voice:\"%voice\" " "/language:%lang /voice:\"%voice\" "

View file

@ -28,7 +28,7 @@ class TTSSwift : public TTSExes
{ {
Q_OBJECT Q_OBJECT
public: public:
TTSSwift(QObject* parent=NULL) : TTSExes(parent) TTSSwift(QObject* parent=nullptr) : TTSExes(parent)
{ {
m_name = "swift"; m_name = "swift";
m_TTSTemplate = "\"%exe\" %options -o \"%wavfile\" -- \"%text\""; m_TTSTemplate = "\"%exe\" %options -o \"%wavfile\" -- \"%text\"";

View file

@ -112,7 +112,7 @@ void Uninstaller::uninstall(void)
QStringList Uninstaller::getAllSections() QStringList Uninstaller::getAllSections()
{ {
QSettings installlog(m_mountpoint + "/.rockbox/rbutil.log", QSettings::IniFormat, 0); QSettings installlog(m_mountpoint + "/.rockbox/rbutil.log", QSettings::IniFormat, nullptr);
QStringList allSections = installlog.childGroups(); QStringList allSections = installlog.childGroups();
allSections.removeAt(allSections.lastIndexOf("Bootloader")); allSections.removeAt(allSections.lastIndexOf("Bootloader"));
return allSections; return allSections;

View file

@ -300,7 +300,7 @@ void VoiceFileCreator::create(void)
//make voicefile //make voicefile
emit logItem(tr("Creating voicefiles..."),LOGINFO); emit logItem(tr("Creating voicefiles..."),LOGINFO);
FILE* ids2 = fopen(m_filename.toLocal8Bit(), "r"); FILE* ids2 = fopen(m_filename.toLocal8Bit(), "r");
if (ids2 == NULL) if (ids2 == nullptr)
{ {
cleanup(); cleanup();
emit logItem(tr("Error opening downloaded file"),LOGERROR); emit logItem(tr("Error opening downloaded file"),LOGERROR);
@ -310,7 +310,7 @@ void VoiceFileCreator::create(void)
FILE* output = fopen(QString(m_mountpoint + "/.rockbox/langs/" + m_lang FILE* output = fopen(QString(m_mountpoint + "/.rockbox/langs/" + m_lang
+ ".voice").toLocal8Bit(), "wb"); + ".voice").toLocal8Bit(), "wb");
if (output == NULL) if (output == nullptr)
{ {
cleanup(); cleanup();
fclose(ids2); fclose(ids2);
@ -327,7 +327,7 @@ void VoiceFileCreator::create(void)
cleanup(); cleanup();
// Add Voice file to the install log // Add Voice file to the install log
QSettings installlog(m_mountpoint + "/.rockbox/rbutil.log", QSettings::IniFormat, 0); QSettings installlog(m_mountpoint + "/.rockbox/rbutil.log", QSettings::IniFormat, nullptr);
installlog.beginGroup(QString("Voice (self created, %1)").arg(m_lang)); installlog.beginGroup(QString("Voice (self created, %1)").arg(m_lang));
installlog.setValue("/.rockbox/langs/" + m_lang + ".voice", m_versionstring); installlog.setValue("/.rockbox/langs/" + m_lang + ".voice", m_versionstring);
installlog.endGroup(); installlog.endGroup();

View file

@ -24,7 +24,7 @@
ZipInstaller::ZipInstaller(QObject* parent) : ZipInstaller::ZipInstaller(QObject* parent) :
QObject(parent), QObject(parent),
m_unzip(true), m_usecache(false), m_getter(0) m_unzip(true), m_usecache(false), m_getter(nullptr)
{ {
} }
@ -87,7 +87,7 @@ void ZipInstaller::installStart()
m_file = m_downloadFile->fileName(); m_file = m_downloadFile->fileName();
m_downloadFile->close(); m_downloadFile->close();
// get the real file. // get the real file.
if(m_getter != 0) m_getter->deleteLater(); if(m_getter != nullptr) m_getter->deleteLater();
m_getter = new HttpGet(this); m_getter = new HttpGet(this);
if(m_usecache) { if(m_usecache) {
m_getter->setCache(true); m_getter->setCache(true);
@ -188,7 +188,7 @@ void ZipInstaller::downloadDone(bool error)
} }
emit logItem(tr("Creating installation log"),LOGINFO); emit logItem(tr("Creating installation log"),LOGINFO);
QSettings installlog(m_mountpoint + "/.rockbox/rbutil.log", QSettings::IniFormat, 0); QSettings installlog(m_mountpoint + "/.rockbox/rbutil.log", QSettings::IniFormat, nullptr);
installlog.beginGroup(m_logsection); installlog.beginGroup(m_logsection);
for(int i = 0; i < zipContents.size(); i++) for(int i = 0; i < zipContents.size(); i++)

View file

@ -29,7 +29,7 @@
ZipUtil::ZipUtil(QObject* parent) : ArchiveUtil(parent) ZipUtil::ZipUtil(QObject* parent) : ArchiveUtil(parent)
{ {
m_zip = NULL; m_zip = nullptr;
} }
@ -65,7 +65,7 @@ bool ZipUtil::close(void)
error = m_zip->getZipError(); error = m_zip->getZipError();
} }
delete m_zip; delete m_zip;
m_zip = NULL; m_zip = nullptr;
return (error == UNZ_OK) ? true : false; return (error == UNZ_OK) ? true : false;
} }

View file

@ -370,7 +370,7 @@ void Config::setDevices()
QStringList brands = manuf.uniqueKeys(); QStringList brands = manuf.uniqueKeys();
QTreeWidgetItem *w; QTreeWidgetItem *w;
QTreeWidgetItem *w2; QTreeWidgetItem *w2;
QTreeWidgetItem *w3 = 0; QTreeWidgetItem *w3 = nullptr;
QString selected = RbSettings::value(RbSettings::Platform).toString(); QString selected = RbSettings::value(RbSettings::Platform).toString();
for(int c = 0; c < brands.size(); c++) { for(int c = 0; c < brands.size(); c++) {
@ -408,7 +408,7 @@ void Config::setDevices()
while(widgetitem); while(widgetitem);
// add new items // add new items
ui.treeDevices->insertTopLevelItems(0, items); ui.treeDevices->insertTopLevelItems(0, items);
if(w3 != 0) { if(w3 != nullptr) {
ui.treeDevices->setCurrentItem(w3); // hilight old selection ui.treeDevices->setCurrentItem(w3); // hilight old selection
ui.treeDevices->scrollToItem(w3); ui.treeDevices->scrollToItem(w3);
} }

View file

@ -30,7 +30,7 @@ class Config : public QDialog
{ {
Q_OBJECT Q_OBJECT
public: public:
Config(QWidget *parent = 0,int index=0); Config(QWidget *parent = nullptr,int index=0);
signals: signals:
void settingsUpdated(void); void settingsUpdated(void);

View file

@ -44,8 +44,8 @@ EncTtsCfgGui::EncTtsCfgGui(QDialog* parent, EncTtsSettingInterface* iface, QStri
m_busyDlg= new QProgressDialog("", "", 0, 0,this); m_busyDlg= new QProgressDialog("", "", 0, 0,this);
m_busyDlg->setWindowTitle(tr("Waiting for engine...")); m_busyDlg->setWindowTitle(tr("Waiting for engine..."));
m_busyDlg->setModal(true); m_busyDlg->setModal(true);
m_busyDlg->setLabel(0); m_busyDlg->setLabel(nullptr);
m_busyDlg->setCancelButton(0); m_busyDlg->setCancelButton(nullptr);
m_busyDlg->hide(); m_busyDlg->hide();
connect(iface,SIGNAL(busy()),this,SLOT(showBusy())); connect(iface,SIGNAL(busy()),this,SLOT(showBusy()));
connect(iface,SIGNAL(busyEnd()),this,SLOT(hideBusy())); connect(iface,SIGNAL(busyEnd()),this,SLOT(hideBusy()));
@ -74,7 +74,7 @@ void EncTtsCfgGui::setUpWindow()
gridLayout->addWidget(widget, i, 1); gridLayout->addWidget(widget, i, 1);
widget->setLayoutDirection(Qt::LeftToRight); widget->setLayoutDirection(Qt::LeftToRight);
QWidget *btn = createButton(m_settingsList.at(i)); QWidget *btn = createButton(m_settingsList.at(i));
if(btn != NULL) if(btn != nullptr)
{ {
gridLayout->addWidget(btn, i, 2); gridLayout->addWidget(btn, i, 2);
} }
@ -113,7 +113,7 @@ void EncTtsCfgGui::setUpWindow()
QWidget* EncTtsCfgGui::createWidgets(EncTtsSetting* setting) QWidget* EncTtsCfgGui::createWidgets(EncTtsSetting* setting)
{ {
// value display // value display
QWidget* value = NULL; QWidget* value = nullptr;
switch(setting->type()) switch(setting->type())
{ {
case EncTtsSetting::eDOUBLE: case EncTtsSetting::eDOUBLE:
@ -181,7 +181,7 @@ QWidget* EncTtsCfgGui::createWidgets(EncTtsSetting* setting)
} }
// remember widget // remember widget
if(value != NULL) if(value != nullptr)
{ {
m_settingsWidgetsMap.insert(setting,value); m_settingsWidgetsMap.insert(setting,value);
connect(setting,SIGNAL(updateGui()),this,SLOT(updateWidget())); connect(setting,SIGNAL(updateGui()),this,SLOT(updateWidget()));
@ -208,14 +208,14 @@ QWidget* EncTtsCfgGui::createButton(EncTtsSetting* setting)
return refreshbtn; return refreshbtn;
} }
else else
return NULL; return nullptr;
} }
void EncTtsCfgGui::updateSetting() void EncTtsCfgGui::updateSetting()
{ {
//cast and get the sender widget //cast and get the sender widget
QWidget* widget = qobject_cast<QWidget*>(QObject::sender()); QWidget* widget = qobject_cast<QWidget*>(QObject::sender());
if(widget == NULL) return; if(widget == nullptr) return;
// get the corresponding setting // get the corresponding setting
EncTtsSetting* setting = m_settingsWidgetsMap.key(widget); EncTtsSetting* setting = m_settingsWidgetsMap.key(widget);
@ -264,7 +264,7 @@ void EncTtsCfgGui::updateWidget()
{ {
// get sender setting // get sender setting
EncTtsSetting* setting = qobject_cast<EncTtsSetting*>(QObject::sender()); EncTtsSetting* setting = qobject_cast<EncTtsSetting*>(QObject::sender());
if(setting == NULL) return; if(setting == nullptr) return;
// get corresponding widget // get corresponding widget
QWidget* widget = m_settingsWidgetsMap.value(setting); QWidget* widget = m_settingsWidgetsMap.value(setting);
@ -370,7 +370,7 @@ void EncTtsCfgGui::browse(QObject* settingObj)
{ {
// cast top setting // cast top setting
EncTtsSetting* setting= qobject_cast<EncTtsSetting*>(settingObj); EncTtsSetting* setting= qobject_cast<EncTtsSetting*>(settingObj);
if(setting == NULL) return; if(setting == nullptr) return;
//current path //current path
QString curPath = setting->current().toString(); QString curPath = setting->current().toString();

View file

@ -29,7 +29,7 @@ class BackupDialog : public QDialog
{ {
Q_OBJECT Q_OBJECT
public: public:
BackupDialog(QWidget* parent = 0); BackupDialog(QWidget* parent = nullptr);
private slots: private slots:
void changeBackupPath(void); void changeBackupPath(void);

View file

@ -26,7 +26,7 @@ class Changelog : public QDialog
{ {
Q_OBJECT Q_OBJECT
public: public:
Changelog(QWidget *parent = 0); Changelog(QWidget *parent = nullptr);
public slots: public slots:
void accept(void); void accept(void);

View file

@ -22,7 +22,7 @@ class ComboBoxViewDelegate : public QStyledItemDelegate
{ {
Q_OBJECT Q_OBJECT
public: public:
ComboBoxViewDelegate(QObject* parent = 0) : QStyledItemDelegate(parent) { } ComboBoxViewDelegate(QObject* parent = nullptr) : QStyledItemDelegate(parent) { }
void paint(QPainter *painter, const QStyleOptionViewItem &option, void paint(QPainter *painter, const QStyleOptionViewItem &option,
const QModelIndex &index) const; const QModelIndex &index) const;

View file

@ -26,7 +26,7 @@ class InfoWidget : public QWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
InfoWidget(QWidget *parent = 0); InfoWidget(QWidget *parent = nullptr);
public slots: public slots:
void updateInfo(void); void updateInfo(void);

View file

@ -26,7 +26,7 @@ class ManualWidget : public QWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
ManualWidget(QWidget *parent = 0); ManualWidget(QWidget *parent = nullptr);
public slots: public slots:
void downloadManual(void); void downloadManual(void);

View file

@ -45,9 +45,9 @@ SelectiveInstallWidget::SelectiveInstallWidget(QWidget* parent) : QWidget(parent
RockboxInfo info(m_mountpoint); RockboxInfo info(m_mountpoint);
ui.bootloaderCheckbox->setChecked(!info.success()); ui.bootloaderCheckbox->setChecked(!info.success());
m_logger = NULL; m_logger = nullptr;
m_zipinstaller = NULL; m_zipinstaller = nullptr;
m_themesinstaller = NULL; m_themesinstaller = nullptr;
connect(ui.installButton, SIGNAL(clicked()), this, SLOT(startInstall())); connect(ui.installButton, SIGNAL(clicked()), this, SLOT(startInstall()));
connect(this, SIGNAL(installSkipped(bool)), this, SLOT(continueInstall(bool))); connect(this, SIGNAL(installSkipped(bool)), this, SLOT(continueInstall(bool)));
@ -84,9 +84,9 @@ void SelectiveInstallWidget::updateVersion(void)
m_blmethod = SystemInfo::platformValue( m_blmethod = SystemInfo::platformValue(
SystemInfo::BootloaderMethod, m_target).toString(); SystemInfo::BootloaderMethod, m_target).toString();
if(m_logger != NULL) { if(m_logger != nullptr) {
delete m_logger; delete m_logger;
m_logger = NULL; m_logger = nullptr;
} }
// re-populate all version items // re-populate all version items
@ -166,7 +166,7 @@ void SelectiveInstallWidget::startInstall(void)
saveSettings(); saveSettings();
m_installStage = 0; m_installStage = 0;
if(m_logger != NULL) delete m_logger; if(m_logger != nullptr) delete m_logger;
m_logger = new ProgressLoggerGui(this); m_logger = new ProgressLoggerGui(this);
QString warning = Utils::checkEnvironment(false); QString warning = Utils::checkEnvironment(false);
if(!warning.isEmpty()) if(!warning.isEmpty())
@ -238,7 +238,7 @@ void SelectiveInstallWidget::installBootloader(void)
BootloaderInstallBase *bl = BootloaderInstallBase *bl =
BootloaderInstallHelper::createBootloaderInstaller(this, BootloaderInstallHelper::createBootloaderInstaller(this,
SystemInfo::platformValue(SystemInfo::BootloaderMethod).toString()); SystemInfo::platformValue(SystemInfo::BootloaderMethod).toString());
if(bl == NULL) { if(bl == nullptr) {
m_logger->addItem(tr("No install method known."), LOGERROR); m_logger->addItem(tr("No install method known."), LOGERROR);
m_logger->setFinished(); m_logger->setFinished();
return; return;
@ -393,7 +393,7 @@ void SelectiveInstallWidget::installRockbox(void)
ServerInfo::RelCandidateUrl, m_target).toString(); ServerInfo::RelCandidateUrl, m_target).toString();
//! install build //! install build
if(m_zipinstaller != NULL) m_zipinstaller->deleteLater(); if(m_zipinstaller != nullptr) m_zipinstaller->deleteLater();
m_zipinstaller = new ZipInstaller(this); m_zipinstaller = new ZipInstaller(this);
m_zipinstaller->setUrl(url); m_zipinstaller->setUrl(url);
m_zipinstaller->setLogSection("Rockbox (Base)"); m_zipinstaller->setLogSection("Rockbox (Base)");
@ -437,7 +437,7 @@ void SelectiveInstallWidget::installFonts(void)
fontsurl.replace("%RELEASEVER%", relversion); fontsurl.replace("%RELEASEVER%", relversion);
// create new zip installer // create new zip installer
if(m_zipinstaller != NULL) m_zipinstaller->deleteLater(); if(m_zipinstaller != nullptr) m_zipinstaller->deleteLater();
m_zipinstaller = new ZipInstaller(this); m_zipinstaller = new ZipInstaller(this);
m_zipinstaller->setUrl(fontsurl); m_zipinstaller->setUrl(fontsurl);
m_zipinstaller->setLogSection("Fonts"); m_zipinstaller->setLogSection("Fonts");
@ -460,7 +460,7 @@ void SelectiveInstallWidget::installFonts(void)
void SelectiveInstallWidget::customizeThemes(void) void SelectiveInstallWidget::customizeThemes(void)
{ {
if(m_themesinstaller == NULL) if(m_themesinstaller == nullptr)
m_themesinstaller = new ThemesInstallWindow(this); m_themesinstaller = new ThemesInstallWindow(this);
m_themesinstaller->setSelectOnly(true); m_themesinstaller->setSelectOnly(true);
@ -472,7 +472,7 @@ void SelectiveInstallWidget::installThemes(void)
{ {
if(ui.themesCheckbox->isChecked()) { if(ui.themesCheckbox->isChecked()) {
LOG_INFO() << "installing themes"; LOG_INFO() << "installing themes";
if(m_themesinstaller == NULL) if(m_themesinstaller == nullptr)
m_themesinstaller = new ThemesInstallWindow(this); m_themesinstaller = new ThemesInstallWindow(this);
connect(m_themesinstaller, SIGNAL(done(bool)), this, SLOT(continueInstall(bool))); connect(m_themesinstaller, SIGNAL(done(bool)), this, SLOT(continueInstall(bool)));
@ -526,7 +526,7 @@ void SelectiveInstallWidget::installGamefiles(void)
LOG_INFO() << "installing gamefiles"; LOG_INFO() << "installing gamefiles";
// create new zip installer // create new zip installer
if(m_zipinstaller != NULL) m_zipinstaller->deleteLater(); if(m_zipinstaller != nullptr) m_zipinstaller->deleteLater();
m_zipinstaller = new ZipInstaller(this); m_zipinstaller = new ZipInstaller(this);
m_zipinstaller->setUrl(gameUrls); m_zipinstaller->setUrl(gameUrls);

View file

@ -29,7 +29,7 @@ class SelectiveInstallWidget : public QWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
SelectiveInstallWidget(QWidget* parent = 0); SelectiveInstallWidget(QWidget* parent = nullptr);
public slots: public slots:
void updateVersion(void); void updateVersion(void);

View file

@ -32,7 +32,7 @@ class InstallTalkWindow : public QDialog
{ {
Q_OBJECT Q_OBJECT
public: public:
InstallTalkWindow(QWidget *parent = 0); InstallTalkWindow(QWidget *parent = nullptr);
public slots: public slots:
void accept(void); void accept(void);

View file

@ -65,7 +65,7 @@ int main( int argc, char ** argv ) {
// check for a configuration file in the program folder. // check for a configuration file in the program folder.
QSettings *user; QSettings *user;
if(QFileInfo(absolutePath + "/RockboxUtility.ini").isFile()) if(QFileInfo(absolutePath + "/RockboxUtility.ini").isFile())
user = new QSettings(absolutePath + "/RockboxUtility.ini", QSettings::IniFormat, 0); user = new QSettings(absolutePath + "/RockboxUtility.ini", QSettings::IniFormat, nullptr);
else user = new QSettings(QSettings::IniFormat, QSettings::UserScope, "rockbox.org", "RockboxUtility"); else user = new QSettings(QSettings::IniFormat, QSettings::UserScope, "rockbox.org", "RockboxUtility");
QString applang = QLocale::system().name(); QString applang = QLocale::system().name();
@ -98,7 +98,7 @@ int main( int argc, char ** argv ) {
QList<QTranslator*> translators; QList<QTranslator*> translators;
translators.append(&translator); translators.append(&translator);
translators.append(&qttrans); translators.append(&qttrans);
RbUtilQt window(0); RbUtilQt window(nullptr);
RbUtilQt::translators = translators; RbUtilQt::translators = translators;
window.show(); window.show();

View file

@ -33,7 +33,7 @@ class PreviewDlg : public QDialog
Q_OBJECT Q_OBJECT
public: public:
PreviewDlg(QWidget *parent = 0); PreviewDlg(QWidget *parent = nullptr);
void setPixmap(QPixmap p); void setPixmap(QPixmap p);
void setText(QString text); void setText(QString text);
@ -54,7 +54,7 @@ class PreviewLabel : public QLabel
Q_OBJECT Q_OBJECT
public: public:
PreviewLabel(QWidget * parent = 0, Qt::WindowFlags f = Qt::WindowFlags()); PreviewLabel(QWidget * parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
void setPixmap(QPixmap p); void setPixmap(QPixmap p);
void setText(QString text); void setText(QString text);

View file

@ -161,7 +161,7 @@ void ProgressLoggerGui::saveErrorLog()
int i=0; int i=0;
loggerTexts = ""; loggerTexts = "";
while(dp.listProgress->item(i) != NULL) while(dp.listProgress->item(i) != nullptr)
{ {
loggerTexts.append(dp.listProgress->item(i)->text()); loggerTexts.append(dp.listProgress->item(i)->text());
loggerTexts.append("\n"); loggerTexts.append("\n");

View file

@ -371,7 +371,7 @@ void RbUtilQt::updateSettings()
" or review your settings.")); " or review your settings."));
configDialog(); configDialog();
} }
else if(chkConfig(0)) { else if(chkConfig(nullptr)) {
QApplication::processEvents(); QApplication::processEvents();
QMessageBox::critical(this, tr("Configuration error"), QMessageBox::critical(this, tr("Configuration error"),
tr("Your configuration is invalid. This is most likely due " tr("Your configuration is invalid. This is most likely due "
@ -400,7 +400,7 @@ void RbUtilQt::updateDevice()
ui.actionRemove_bootloader->setEnabled(bootloaderUninstallable); ui.actionRemove_bootloader->setEnabled(bootloaderUninstallable);
/* Disable the whole tab widget if configuration is invalid */ /* Disable the whole tab widget if configuration is invalid */
bool configurationValid = !chkConfig(0); bool configurationValid = !chkConfig(nullptr);
ui.tabWidget->setEnabled(configurationValid); ui.tabWidget->setEnabled(configurationValid);
ui.menuA_ctions->setEnabled(configurationValid); ui.menuA_ctions->setEnabled(configurationValid);
@ -562,7 +562,7 @@ void RbUtilQt::uninstallBootloader(void)
= BootloaderInstallHelper::createBootloaderInstaller(this, = BootloaderInstallHelper::createBootloaderInstaller(this,
SystemInfo::platformValue(SystemInfo::BootloaderMethod).toString()); SystemInfo::platformValue(SystemInfo::BootloaderMethod).toString());
if(bl == NULL) { if(bl == nullptr) {
logger->addItem(tr("No uninstall method for this target known."), LOGERROR); logger->addItem(tr("No uninstall method for this target known."), LOGERROR);
logger->setFinished(); logger->setFinished();
return; return;

View file

@ -42,9 +42,9 @@ class RbUtilQt : public QMainWindow
Q_OBJECT Q_OBJECT
public: public:
RbUtilQt(QWidget *parent = 0); RbUtilQt(QWidget *parent = nullptr);
static QList<QTranslator*> translators; static QList<QTranslator*> translators;
static bool chkConfig(QWidget *parent = 0); static bool chkConfig(QWidget *parent = nullptr);
private: private:
ManualWidget *manual; ManualWidget *manual;

View file

@ -34,7 +34,7 @@ class Sysinfo : public QDialog
InfoHtml, InfoHtml,
InfoText, InfoText,
}; };
Sysinfo(QWidget *parent = 0); Sysinfo(QWidget *parent = nullptr);
static QString getInfo(InfoType type = InfoHtml); static QString getInfo(InfoType type = InfoHtml);
private: private:

View file

@ -63,7 +63,7 @@ ThemesInstallWindow::ThemesInstallWindow(QWidget *parent) : QDialog(parent)
igetter.setCache(infocachedir); igetter.setCache(infocachedir);
} }
logger = NULL; logger = nullptr;
} }
ThemesInstallWindow::~ThemesInstallWindow() ThemesInstallWindow::~ThemesInstallWindow()
@ -347,7 +347,7 @@ void ThemesInstallWindow::install()
} }
LOG_INFO() << "installing:" << themes; LOG_INFO() << "installing:" << themes;
if(logger == NULL) if(logger == nullptr)
logger = new ProgressLoggerGui(this); logger = new ProgressLoggerGui(this);
logger->show(); logger->show();
QString mountPoint = RbSettings::value(RbSettings::Mountpoint).toString(); QString mountPoint = RbSettings::value(RbSettings::Mountpoint).toString();

View file

@ -31,7 +31,7 @@ class UninstallWindow : public QDialog
{ {
Q_OBJECT Q_OBJECT
public: public:
UninstallWindow(QWidget *parent = 0); UninstallWindow(QWidget *parent = nullptr);
public slots: public slots:
void accept(void); void accept(void);