From ad056e67675124e47d7fccf50c70ece86c01b04e Mon Sep 17 00:00:00 2001 From: Tobias Weber Date: Mon, 29 Jun 2020 13:47:51 +0200 Subject: [PATCH] qapp argc bugfix --- tools/taz/taz_main.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/taz/taz_main.cpp b/tools/taz/taz_main.cpp index 39e2ceb..2d1b1d0 100644 --- a/tools/taz/taz_main.cpp +++ b/tools/taz/taz_main.cpp @@ -118,7 +118,10 @@ protected: protected: public: - TakAppl(int argc, char** argv) : QApplication(argc, argv) {} + // need a reference to argc, because the QApplication constructor + // would otherwise take the temporary stack variable + // see: https://doc.qt.io/qt-5/qapplication.html#QApplication + TakAppl(/*const*/ int& argc, /*const*/ char** argv) : QApplication(argc, argv) {} virtual ~TakAppl() {} void SetTakDlg(std::shared_ptr pDlg) { m_pTakDlg = pDlg; } -- GitLab