Abdelrazak Younes wrote:
// more tricky?
QLyXKeySym.C:#include <Q3CString>
Maybe not.
the attached works for me
Index: src/frontends/qt4/QLyXKeySym.C
===================================================================
--- src/frontends/qt4/QLyXKeySym.C (revision 13796)
+++ src/frontends/qt4/QLyXKeySym.C (working copy)
@@ -14,15 +14,14 @@
#include "QLyXKeySym.h"
#include "qlkey.h"
#include "qt_helpers.h"
-//Added by qt3to4:
-#include <QKeyEvent>
-#include <Q3CString>
+
#include "debug.h"
-#include <q3accel.h>
-#include <qevent.h>
-#include <qtextcodec.h>
+#include <QKeyEvent>
+#include <QKeySequence>
+#include <QEvent>
+#include <QTextCodec>
#include <map>
#include "support/lstrings.h"
@@ -68,8 +67,7 @@
return 0;
}
- Q3CString tmpstr = codec->fromUnicode(str);
- char const * tmpcstr = tmpstr;
+ char const * tmpcstr = codec->fromUnicode(str).data();
return tmpcstr[0];
}
@@ -220,7 +218,7 @@
if (mod & key_modifier::alt)
tmpkey += Qt::ALT;
- return Q3Accel::keyToString(tmpkey);
+ return QKeySequence(tmpkey).toString();
}
Index: src/frontends/qt4/QLyXKeySym.h
===================================================================
--- src/frontends/qt4/QLyXKeySym.h (revision 13796)
+++ src/frontends/qt4/QLyXKeySym.h (working copy)
@@ -15,8 +15,7 @@
#include "frontends/LyXKeySym.h"
-#include <qstring.h>
-//Added by qt3to4:
+#include <QString>
#include <QKeyEvent>
class QKeyEvent;