diff --git a/companion/src/helpers.cpp b/companion/src/helpers.cpp index 3fae62153..0d52756fd 100644 --- a/companion/src/helpers.cpp +++ b/companion/src/helpers.cpp @@ -864,7 +864,7 @@ void startSimulation(QWidget * parent, RadioData & radioData, int modelIdx) } dialog->exec(); - delete dialog; + dialog->deleteLater(); delete simuData; #if defined(WIN32) && defined(WIN_USE_CONSOLE_STDIO) FreeConsole(); @@ -941,10 +941,9 @@ QString index2version(int index) } } -int qunlink(const QString & fileName) +bool qunlink(const QString & fileName) { - QByteArray ba = fileName.toLatin1(); - return unlink(ba.constData()); + return QFile::remove(fileName); } QString generateProcessUniqueTempFileName(const QString & fileName) diff --git a/companion/src/helpers.h b/companion/src/helpers.h index 88ffc6d70..9b2647b9e 100644 --- a/companion/src/helpers.h +++ b/companion/src/helpers.h @@ -187,7 +187,7 @@ class QTimeS : public QTime int seconds() const { return hour()*3600 + minute()*60 + second(); }; }; -int qunlink(const QString & fileName); +bool qunlink(const QString & fileName); QString generateProcessUniqueTempFileName(const QString & fileName); bool isTempFileName(const QString & fileName); diff --git a/companion/src/modeledit/mixes.cpp b/companion/src/modeledit/mixes.cpp index 0c8087dfa..dd2dba750 100644 --- a/companion/src/modeledit/mixes.cpp +++ b/companion/src/modeledit/mixes.cpp @@ -78,7 +78,7 @@ void MixesPanel::update() QString str = ""; while (curDest < mix.destCh-1) { curDest++; - AddMixerLine(-curDest); + AddMixerLine(-int(curDest)); } if (AddMixerLine(i)) { curDest++; @@ -87,7 +87,7 @@ void MixesPanel::update() while (curDest < outputs) { curDest++; - AddMixerLine(-curDest); + AddMixerLine(-int(curDest)); } } diff --git a/companion/src/modeledit/setup.cpp b/companion/src/modeledit/setup.cpp index 7a8a00747..e17bb2f4c 100644 --- a/companion/src/modeledit/setup.cpp +++ b/companion/src/modeledit/setup.cpp @@ -950,7 +950,7 @@ void SetupPanel::startupSwitchEdited(int value) } else { shift = index+1; - mask = 0x01ul << shift; + mask = 0x01ull << shift; } } diff --git a/companion/src/process_flash.cpp b/companion/src/process_flash.cpp index a0b201a3f..e434cb429 100644 --- a/companion/src/process_flash.cpp +++ b/companion/src/process_flash.cpp @@ -93,13 +93,12 @@ void FlashProcess::onStarted() progress->addSeparator(); } -# if !__GNUC__ +#if !__GNUC__ bool killProcessByName(const char *szProcessToKill) { HANDLE hProcessSnap; HANDLE hProcess; PROCESSENTRY32 pe32; - DWORD dwPriorityClass; hProcessSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); // Takes a snapshot of all the processes @@ -129,7 +128,7 @@ bool killProcessByName(const char *szProcessToKill) void FlashProcess::onKillTimerElapsed() { -# if !__GNUC__ +#if !__GNUC__ // trick to accelerate SAM-BA startup killProcessByName("tasklist.exe"); #endif