Fix missing MsgBox on packet.dll missing

started is emitted before the missing dll is detected, so user a timer
to disconnect the signal-slot connection
This commit is contained in:
Srivats P 2017-09-23 18:53:12 +05:30
parent d32253b699
commit ce7f9d808f

View File

@ -41,6 +41,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
#include <QMessageBox>
#include <QProcess>
#include <QProgressDialog>
#include <QTimer>
#include <QUrl>
#ifdef Q_OS_WIN32
@ -75,11 +76,11 @@ MainWindow::MainWindow(QWidget *parent)
qDebug("staring local server - %s", qPrintable(serverApp));
localServer_ = new QProcess(this);
connect(localServer_, SIGNAL(started()), SLOT(onLocalServerStarted()));
connect(localServer_, SIGNAL(error(QProcess::ProcessError)),
SLOT(onLocalServerError(QProcess::ProcessError)));
localServer_->setProcessChannelMode(QProcess::ForwardedChannels);
localServer_->start(serverApp, QStringList());
QTimer::singleShot(5000, this, SLOT(onLocalServerStarted()));
}
else
localServer_ = NULL;