Commit c8efe8e3 authored by Sylvain Thery's avatar Sylvain Thery
Browse files

resolve bug of menu on mac/Qt5

parent c32ed9f5
...@@ -19,7 +19,11 @@ IF (WIN32) ...@@ -19,7 +19,11 @@ IF (WIN32)
ENDIF() ENDIF()
ELSE() ELSE()
link_directories( ${CGoGN_ROOT_DIR}/lib/${CMAKE_BUILD_TYPE} ) link_directories( ${CGoGN_ROOT_DIR}/lib/${CMAKE_BUILD_TYPE} )
SET(EXECUTABLE_OUTPUT_PATH ${CGoGN_ROOT_DIR}/bin/${CMAKE_BUILD_TYPE} ) IF(APPLE)
SET(EXECUTABLE_OUTPUT_PATH ${CGoGN_ROOT_DIR}/bin/${CMAKE_BUILD_TYPE}/Contents/MacOS/ )
ELSE()
SET(EXECUTABLE_OUTPUT_PATH ${CGoGN_ROOT_DIR}/bin/${CMAKE_BUILD_TYPE} )
ENDIF()
ENDIF() ENDIF()
#include_directories( #include_directories(
......
...@@ -171,6 +171,11 @@ IF(WIN32) ...@@ -171,6 +171,11 @@ IF(WIN32)
LIST(APPEND CGoGN_DEFS -D_USE_MATH_DEFINES) LIST(APPEND CGoGN_DEFS -D_USE_MATH_DEFINES)
ENDIF () ENDIF ()
IF (APPLE)
LIST(APPEND CGoGN_DEFS -DCGOGN_APPLE)
ENDIF ()
IF (CGoGN_GCC_4_9) IF (CGoGN_GCC_4_9)
LIST(APPEND CGoGN_DEFS -DCGOGN_GCC_4_9) LIST(APPEND CGoGN_DEFS -DCGOGN_GCC_4_9)
ENDIF () ENDIF ()
......
...@@ -32,7 +32,11 @@ IF(WIN32) ...@@ -32,7 +32,11 @@ IF(WIN32)
link_directories( ${CGoGN_ROOT_DIR}/bin/${ConfigurationName} ) link_directories( ${CGoGN_ROOT_DIR}/bin/${ConfigurationName} )
ENDIF() ENDIF()
ELSE() ELSE()
SET(EXECUTABLE_OUTPUT_PATH ${SCHNApps_ROOT_DIR}/bin/${CMAKE_BUILD_TYPE}) IF(APPLE)
SET(EXECUTABLE_OUTPUT_PATH ${SCHNApps_ROOT_DIR}/bin/${CMAKE_BUILD_TYPE}/Contents/MacOS/ )
ELSE()
SET(EXECUTABLE_OUTPUT_PATH ${SCHNApps_ROOT_DIR}/bin/${CMAKE_BUILD_TYPE})
ENDIF()
# SET(LIBRARY_OUTPUT_PATH ${SCHNApps_ROOT_DIR}/lib/${CMAKE_BUILD_TYPE}) # SET(LIBRARY_OUTPUT_PATH ${SCHNApps_ROOT_DIR}/lib/${CMAKE_BUILD_TYPE})
link_directories( ${CGoGN_ROOT_DIR}/lib/${CMAKE_BUILD_TYPE} ) link_directories( ${CGoGN_ROOT_DIR}/lib/${CMAKE_BUILD_TYPE} )
ENDIF() ENDIF()
......
...@@ -385,7 +385,7 @@ Plugin* SCHNApps::enablePlugin(const QString& pluginName) ...@@ -385,7 +385,7 @@ Plugin* SCHNApps::enablePlugin(const QString& pluginName)
statusbar->showMessage(pluginName + QString(" successfully loaded."), 2000); statusbar->showMessage(pluginName + QString(" successfully loaded."), 2000);
DEBUG_EMIT("pluginEnabled"); DEBUG_EMIT("pluginEnabled");
emit(pluginEnabled(plugin)); emit(pluginEnabled(plugin));
// menubar->repaint();
// method success // method success
return plugin; return plugin;
} }
...@@ -692,7 +692,11 @@ void SCHNApps::addMenuAction(Plugin* plugin, const QString& menuPath, QAction* a ...@@ -692,7 +692,11 @@ void SCHNApps::addMenuAction(Plugin* plugin, const QString& menuPath, QAction* a
} }
} }
} }
// just for update the menu in buggy Qt5 on macOS
#if (defined CGOGN_APPLE) && ((QT_VERSION>>16) == 5)
QMenu* fakemenu = menuBar()->addMenu("X");
delete fakemenu;
#endif
m_pluginMenuActions[plugin].append(action); m_pluginMenuActions[plugin].append(action);
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment