Peter Kümmel wrote:
Abdelrazak Younes wrote:
Joost Verburg wrote:
Interesting. Bo's README suggests that "all" doesn't depend on "po".
What happens if you specify individual targets:
boost, intl, support, mathed, insets, frontends, graphics,
controllers, client, qt3, qt4, lyxbase
I can get it to compile with the target 'install', but lyx.exe crashes
immediately.
Try to launch "lyx.exe -dbg any" to see how far it goes. Peter did you
try the debug mode compilation? It would help resolving this crash.
you need the qt4/lyx_gui.C patch I posted yesterday, at least:
I have merged your patch in my branch (attached). One thing though, I
had this error:
D:\devel\lyx\trunk\src\frontends\qt4\lyx_gui.C: In function `void
lyx_gui::parse_init(int&, char**)':
D:\devel\lyx\trunk\src\frontends\qt4\lyx_gui.C:152: error: 'class
QString' has no member named 'toStdString'
D:\devel\lyx\trunk\src\frontends\qt4\lyx_gui.C:156: error: 'class
QString' has no member named 'toStdString'
I used fromqstr instead.
Thanks,
Abdel.
Index: lyx_gui.C
===================================================================
--- lyx_gui.C (revision 14032)
+++ lyx_gui.C (working copy)
@@ -10,6 +10,8 @@
* Full author contact details are available in file CREDITS.
*/
+#undef QT3_SUPPORT
+
#include <config.h>
#include "lyx_gui.h"
@@ -34,10 +36,6 @@
#include "support/package.h"
#include "debug.h"
-// Dear Lord, deliver us from Evil, aka the Qt headers
-// Qt defines a macro 'signals' that clashes with a boost namespace.
-// All is well if the namespace is visible first.
-#include <boost/signal.hpp> // FIXME: Is this needed? (Lgb)
#include <boost/bind.hpp>
#include <boost/shared_ptr.hpp>
@@ -53,7 +51,11 @@
#include <QEventLoop>
#include <QTranslator>
#include <QTextCodec>
+#include <QLocale>
+#include <QLibraryInfo>
+
+
using lyx::support::ltrim;
using lyx::support::package;
@@ -132,24 +134,28 @@
app = new Application(argc, argv);
#endif
-/*
// install translation file for Qt built-in dialogs
// These are only installed since Qt 3.2.x
- static QTranslator qt_trans(0);
- if (qt_trans.load(QString("qt_") + QTextCodec::locale(),
- qInstallPathTranslations())) {
+
+ static QTranslator qt_trans;
+ QString language_name = QString("qt_") + QLocale::system().name();
+ language_name.truncate(5);
+ if (qt_trans.load(language_name,
+ QLibraryInfo::location(QLibraryInfo::TranslationsPath))
+ )
+ {
qApp->installTranslator(&qt_trans);
// even if the language calls for RtL, don't do that
- qApp->setReverseLayout(false);
+ qApp->setLayoutDirection(Qt::LeftToRight);
lyxerr[Debug::GUI]
<< "Successfully installed Qt translations for locale "
- << QTextCodec::locale() << std::endl;
+ << fromqstr(language_name) << std::endl;
} else
lyxerr[Debug::GUI]
<< "Could not find Qt translations for locale "
- << QTextCodec::locale() << std::endl;
-*/
+ << fromqstr(language_name) << std::endl;
+
/*#ifdef Q_WS_MACX
// These translations are meant to break Qt/Mac menu merging
// algorithm on some entries. It lists the menu names that
@@ -230,9 +236,7 @@
// During screen update/ redraw, this method is disabled to
// prevent keyboard events being handed to the LyX core, where
// they could cause re-entrant calls to screen update.
-#if QT_VERSION >= 0x030100
- qApp->processEvents(QEventLoop::ExcludeUserInput);
-#endif
+ qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
}