Changed: #1190 build app bundle and use QWidget instead of QGLWidget

This commit is contained in:
rti 2010-11-14 15:59:32 +01:00
parent 436980f2e8
commit 8c61ab8fb0
3 changed files with 6 additions and 4 deletions

View file

@ -14,7 +14,7 @@ QT4_ADD_RESOURCES( GEORGES_EDITOR_RC_SRCS ${GEORGES_EDITOR_RCS} )
QT4_WRAP_CPP( GEORGES_EDITOR_MOC_SRCS ${GEORGES_EDITOR_HDR} ) QT4_WRAP_CPP( GEORGES_EDITOR_MOC_SRCS ${GEORGES_EDITOR_HDR} )
QT4_WRAP_UI( GEORGES_EDITOR_UI_HDRS ${GEORGES_EDITOR_UIS} ) QT4_WRAP_UI( GEORGES_EDITOR_UI_HDRS ${GEORGES_EDITOR_UIS} )
ADD_EXECUTABLE(georges_editor_qt WIN32 ${GEORGES_EDITOR_SRC} ${GEORGES_EDITOR_MOC_SRCS} ${GEORGES_EDITOR_RC_SRCS} ${GEORGES_EDITOR_UI_HDRS}) ADD_EXECUTABLE(georges_editor_qt WIN32 MACOSX_BUNDLE ${GEORGES_EDITOR_SRC} ${GEORGES_EDITOR_MOC_SRCS} ${GEORGES_EDITOR_RC_SRCS} ${GEORGES_EDITOR_UI_HDRS})
TARGET_LINK_LIBRARIES(georges_editor_qt TARGET_LINK_LIBRARIES(georges_editor_qt
nelmisc nelmisc
@ -32,4 +32,4 @@ IF(WITH_PCH)
ADD_NATIVE_PRECOMPILED_HEADER(georges_editor_qt ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.h ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.cpp) ADD_NATIVE_PRECOMPILED_HEADER(georges_editor_qt ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.h ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.cpp)
ENDIF(WITH_PCH) ENDIF(WITH_PCH)
INSTALL(TARGETS georges_editor_qt RUNTIME DESTINATION bin COMPONENT runtime) INSTALL(TARGETS georges_editor_qt RUNTIME DESTINATION bin COMPONENT runtime BUNDLE DESTINATION /Applications)

View file

@ -77,9 +77,9 @@ namespace NLQT
//H_AUTO2 //H_AUTO2
nldebug("CObjectViewerDialog::init %d",_nlw->winId()); nldebug("CObjectViewerDialog::init %d",_nlw->winId());
#ifdef NL_OS_UNIX #if defined(NL_OS_UNIX) && !defined(NL_OS_MAC)
dynamic_cast<QNLWidget*>(widget())->makeCurrent(); dynamic_cast<QNLWidget*>(widget())->makeCurrent();
#endif // NL_OS_UNIX #endif // defined(NL_OS_UNIX) && !defined(NL_OS_MAC)
Modules::objView().init((nlWindow)_nlw->winId(), 20, 20); Modules::objView().init((nlWindow)_nlw->winId(), 20, 20);
setMouseTracking(true); setMouseTracking(true);

View file

@ -39,6 +39,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
//typedef QDockWidget QNLWidget; //typedef QDockWidget QNLWidget;
typedef QWidget QNLWidget; typedef QWidget QNLWidget;
#elif defined(NL_OS_MAC)
typedef QWidget QNLWidget;
#else // NL_OS_UNIX #else // NL_OS_UNIX
typedef QGLWidget QNLWidget; typedef QGLWidget QNLWidget;
#endif // NL_OS_UNIX #endif // NL_OS_UNIX