From 5d644132787d37b561665233ccc383a8cfe3a294 Mon Sep 17 00:00:00 2001 From: akashihi Date: Wed, 19 May 2010 21:29:20 +0000 Subject: [PATCH] Fix:gui/qml:Removed unneeded version check - all qml enabled Qt have embeddable widgets git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@3284 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- navit/navit/gui/qml/gui_qml.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/navit/navit/gui/qml/gui_qml.cpp b/navit/navit/gui/qml/gui_qml.cpp index 2b0d73c..1edaaa2 100644 --- a/navit/navit/gui/qml/gui_qml.cpp +++ b/navit/navit/gui/qml/gui_qml.cpp @@ -98,21 +98,21 @@ struct gui_priv { #include "guiProxy.h" //Main window class for resizeEvent handling -#if defined Q_WS_X11 && QT_VERSION >= 0x040000 +#ifdef Q_WS_X11 #include class NGQMainWindow : public QX11EmbedWidget { #else class NGQMainWindow : public QWidget { -#endif /* Q_WS_X11 && QT_VERSION >= 0x040000 */ +#endif /* Q_WS_X11 */ public: -#if defined Q_WS_X11 && QT_VERSION >= 0x040000 +#ifdef Q_WS_X11 NGQMainWindow(struct gui_priv* this_,QWidget *parent) : QX11EmbedWidget(parent) { #else NGQMainWindow(struct gui_priv* this_,QWidget *parent) : QWidget(parent) { -#endif /* Q_WS_X11 && QT_VERSION >= 0x040000 */ +#endif /* Q_WS_X11 */ this->object=this_; } protected: @@ -281,12 +281,12 @@ static int gui_qml_set_graphics(struct gui_priv *this_, struct graphics *gra) //Create main window this_->switcherWidget = new QStackedLayout(); _mainWindow = new NGQMainWindow(this_, NULL); -#if defined Q_WS_X11 && QT_VERSION >= 0x040000 +#ifdef Q_WS_X11 xid=getenv("NAVIT_XID"); if (xid.length()>0) { _mainWindow->embedInto(xid.toULong(&ok,0)); } -#endif /* Q_WS_X11 && QT_VERSION >= 0x040000 */ +#endif /* Q_WS_X11 */ this_->mainWindow=_mainWindow; if ( this_->w && this_->h ) { this_->mainWindow->resize(this_->w,this_->h); -- 2.7.4