From: Ralf Jung Date: Thu, 11 Jul 2013 21:18:59 +0000 (+0200) Subject: Fix crash when running debug build; use QString instead of C string X-Git-Url: https://git.ralfj.de/multypo.git/commitdiff_plain/f10ceadf1f116abc5b5c4ec0b0e89096de9b1430 Fix crash when running debug build; use QString instead of C string --- diff --git a/qt/main.cpp b/qt/main.cpp index 5b77857..281bc97 100644 --- a/qt/main.cpp +++ b/qt/main.cpp @@ -12,7 +12,7 @@ MultiKBD *window; class QMyApplication : public QApplication { public: - QMyApplication(int argc, char **argv) + QMyApplication(int &argc, char **argv) : QApplication(argc, argv) {} virtual bool x11EventFilter ( XEvent * event ); diff --git a/qt/multikbd.cpp b/qt/multikbd.cpp index c43dd20..fb30f21 100644 --- a/qt/multikbd.cpp +++ b/qt/multikbd.cpp @@ -59,7 +59,7 @@ void MultiKBD::showEvent ( QShowEvent * ) setFocus(Qt::OtherFocusReason);*/ } -void MultiKBD::handleKeyPress(int device, const char *string) +void MultiKBD::handleKeyPress(int device, QString string) { qDebug() << "Device" << device << "String" << string; } diff --git a/qt/multikbd.h b/qt/multikbd.h index d7fd3c9..0244467 100644 --- a/qt/multikbd.h +++ b/qt/multikbd.h @@ -21,7 +21,7 @@ protected: virtual void showEvent (QShowEvent *); private: - void handleKeyPress(int device, const char *string); + void handleKeyPress(int device, QString string); private: Ui::MultiKBD *ui;