Fix crash when running debug build; use QString instead of C string
authorRalf Jung <post@ralfj.de>
Thu, 11 Jul 2013 21:18:59 +0000 (23:18 +0200)
committerRalf Jung <post@ralfj.de>
Thu, 11 Jul 2013 21:18:59 +0000 (23:18 +0200)
qt/main.cpp
qt/multikbd.cpp
qt/multikbd.h

index 5b778571fb21ddccdbe78cab30b16ab032568ef1..281bc971d6aa837a39cfd9a782a2a2f105f18a44 100644 (file)
@@ -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 );
index c43dd20d18c80ac694dc701f7453de85ebaba33a..fb30f2125bf923e4748ae6fd955a7185dcecd1aa 100644 (file)
@@ -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;
 }
index d7fd3c9d9605e5548cf92c63ceed0946378ab5b0..0244467e59634094cc349252ea509d67d43fe1c5 100644 (file)
@@ -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;