Unsolved QtIF script - Mac signals not being called
-
What I am attempting to accomplish, is that when the maintenance tool is run to uninstall my app, I need to call a script to remove a shortcut from the Mac folder
/Applications
, that was created by a script when the finish button was clicked on the initial installation.As per the documentation
https://doc.qt.io/qtinstallerframework/scripting-installer.html#finishButtonClicked-signalThe following connect functions as expected, but only in the context of being an 'installer' :
installer.finishButtonClicked.connect(this, finishClicked); finishClicked = function(){ if(installer.isInstaller()) { // This code is ALWAYS called at the end of the install process console.log(" *** - This is an installer!"); var result = QMessageBox["question"]("test.quit", "Installer", " - This is an installer!", QMessageBox.Ok); } else if(installer.isUninstaller()) { // This code is NEVER called console.log(" *** - This is an UN-installer!"); var result = QMessageBox["question"]("test.quit", "UN-Installer", " - This is an UN-installer!", QMessageBox.Ok); } }
The next 2 connect functions do not get called at all
https://doc.qt.io/qtinstallerframework/scripting-installer.html#uninstallationStarted-signal
https://doc.qt.io/qtinstallerframework/scripting-installer.html#uninstallationFinished-signalinstaller.installationFinished.connect(this, installDone); installer.uninstallationFinished.connect(this, uninstallComplete); installDone = function(){ // This code is NEVER called QMessageBox["question"]("test.quit", "Installer", " signalled by Installer::installationFinished", QMessageBox.Ok); } uninstallComplete = function(){ // This code is NEVER called QMessageBox["question"]("test.quit", "Installer", " signalled by Installer::uninstallationFinished", QMessageBox.Ok); }
The use of QMessageBox is not the only thing that I have tried to get feedback for these signals. I have tried calling scripts, and console.log().
I also attempted to tie into the same button clicked signal, by differentiating the install from the uninstall by
installer.isInstaller()
andinstaller.isUninstaller()
, respectively. The case ofinstaller.isUninstaller
appears to never be true. Also, there does not appear to be any means to specify the connection type, ie:Qt::QueuedConnection
, etc.