Commit c8efe8e3 authored by Sylvain Thery's avatar Sylvain Thery

resolve bug of menu on mac/Qt5

parent c32ed9f5
......@@ -19,7 +19,11 @@ IF (WIN32)
ENDIF()
ELSE()
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()
#include_directories(
......
......@@ -171,6 +171,11 @@ IF(WIN32)
LIST(APPEND CGoGN_DEFS -D_USE_MATH_DEFINES)
ENDIF ()
IF (APPLE)
LIST(APPEND CGoGN_DEFS -DCGOGN_APPLE)
ENDIF ()
IF (CGoGN_GCC_4_9)
LIST(APPEND CGoGN_DEFS -DCGOGN_GCC_4_9)
ENDIF ()
......
......@@ -32,7 +32,11 @@ IF(WIN32)
link_directories( ${CGoGN_ROOT_DIR}/bin/${ConfigurationName} )
ENDIF()
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})
link_directories( ${CGoGN_ROOT_DIR}/lib/${CMAKE_BUILD_TYPE} )
ENDIF()
......
......@@ -385,7 +385,7 @@ Plugin* SCHNApps::enablePlugin(const QString& pluginName)
statusbar->showMessage(pluginName + QString(" successfully loaded."), 2000);
DEBUG_EMIT("pluginEnabled");
emit(pluginEnabled(plugin));
// menubar->repaint();
// method success
return plugin;
}
......@@ -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);
}
}
......
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