...
 
Commits (4)
......@@ -404,12 +404,28 @@ void Core::slotTextureUpdated( QString _textureName , int _identifier ) {
/** Called by plugins if texture mode should be switched
*/
void Core::slotSwitchTexture( QString _textureName, int _id ) {
if ( OpenFlipper::Options::doSlotDebugging() ) {
if ( sender() != 0 ) {
if ( sender()->metaObject() != 0 ) {
emit log(LOGINFO,"switchTexture( " + _textureName + " , " + QString::number(_id) + tr(" ) called by ") +
QString( sender()->metaObject()->className() ) );
}
}
}
emit switchTexture(_textureName, _id);
}
/** Called by plugins if texture mode should be switched
*/
void Core::slotSwitchTexture( QString _textureName ) {
if ( OpenFlipper::Options::doSlotDebugging() ) {
if ( sender() != 0 ) {
if ( sender()->metaObject() != 0 ) {
emit log(LOGINFO,"switchTexture( " + _textureName + tr(" ) called by ") +
QString( sender()->metaObject()->className() ) );
}
}
}
emit switchTexture(_textureName);
}
......
......@@ -1739,19 +1739,19 @@ void Core::loadPlugin(const QString& _filename,const bool _silent, QString& _lic
if ( checkSignal(plugin,"switchTexture(QString,int)") )
connect(plugin , SIGNAL(switchTexture(QString, int )),
this , SLOT(slotSwitchTexture(QString, int )),Qt::AutoConnection);
this , SLOT(slotSwitchTexture(QString, int )),Qt::QueuedConnection);
if ( checkSlot( plugin , "slotSwitchTexture(QString,int)" ) )
connect(this , SIGNAL(switchTexture(QString, int )),
plugin , SLOT(slotSwitchTexture(QString, int )),Qt::DirectConnection);
plugin , SLOT(slotSwitchTexture(QString, int )),Qt::QueuedConnection);
if ( checkSignal(plugin,"switchTexture(QString)") )
connect(plugin , SIGNAL(switchTexture(QString )),
this , SLOT(slotSwitchTexture(QString )),Qt::AutoConnection);
this , SLOT(slotSwitchTexture(QString )),Qt::QueuedConnection);
if ( checkSlot( plugin , "slotSwitchTexture(QString)" ) )
connect(this , SIGNAL(switchTexture(QString )),
plugin , SLOT(slotSwitchTexture(QString )),Qt::DirectConnection);
plugin , SLOT(slotSwitchTexture(QString )),Qt::QueuedConnection);
......
......@@ -75,6 +75,7 @@ set (directories
# collect all header,source and ui files
acg_append_files (headers "*.hh" ${directories})
acg_append_files (sources "*.cc" ${directories})
acg_append_files (ui-files "*.ui" ${directories})
# remove template cc files from source file list
acg_drop_templates (sources)
......@@ -106,7 +107,7 @@ file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/static_plugins.cc" ";\n} /* namespace c
list(APPEND RC_SRC "${CMAKE_CURRENT_BINARY_DIR}/static_plugins.cc")
RECURSE_GROUPS( ${CMAKE_CURRENT_SOURCE_DIR}/../../ )
source_group(TREE ${CMAKE_SOURCE_DIR} FILES ${sources} ${headers} ${ui-files} )
if (WIN32)
# add app icon rc file to windows build
......
......@@ -110,6 +110,10 @@ set (directories
# collect all header,source and ui files
acg_append_files (headers "*.hh" ${directories})
acg_append_files (sources "*.cc" ${directories})
acg_append_files (ui-files "*.ui" ${directories})
source_group(TREE ${CMAKE_SOURCE_DIR} FILES ${sources} ${headers} ${ui-files} )
#=======================================================
# Cleanup
......@@ -121,7 +125,6 @@ acg_drop_templates (sources)
#=======================================================
# Create library
#=======================================================
RECURSE_GROUPS( ${CMAKE_CURRENT_SOURCE_DIR}/../../ )
if (QT5_FOUND)
acg_add_library (OpenFlipperPluginLib SHARED ${sources} ${headers} )
......
# Force minimal cmake version
# Required 3.1 to set C++11
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
# Required 3.8 to use source_group TREE
cmake_minimum_required(VERSION 3.8.0 FATAL_ERROR)
file(SHA512 ${CMAKE_SOURCE_DIR}/CMakeLists.txt HASH_TOPLEVEL_CMAKEFILE)
file(SHA512 ${CMAKE_SOURCE_DIR}/OpenFlipper/cmake/CMakeLists.txt HASH_LATEST_CMAKEFILE)
......
......@@ -11,26 +11,6 @@ if(${MSVC_GROUPING})
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
endif(${MSVC_GROUPING})
MACRO (RECURSE_GROUPS dirname)
if(${MSVC_GROUPING})
SET(ALL_FILES)
FILE(GLOB_RECURSE allfiles "${dirname}/*.*")
SET(ALL_FILES ${ALL_FILES} ${allfiles})
STRING(REGEX REPLACE ".*/([^/]*)" "\\1" maindir "${dirname}")
FOREACH(file ${allfiles})
STRING(REGEX REPLACE "${dirname}/(.*)/[^/]*" "\\1" loopdirname "${file}")
STRING(REGEX REPLACE "/" "\\\\" loopdirname "${loopdirname}")
IF(NOT "${file}" MATCHES "${dirname}/(.*)/[^/]*")
source_group("${maindir}" FILES ${file})
ELSE()
source_group("${maindir}\\${loopdirname}" FILES ${file})
ENDIF()
ENDFOREACH()
endif(${MSVC_GROUPING})
ENDMACRO (RECURSE_GROUPS)
MACRO (GROUP_PROJECT targetname groupname)
if(${MSVC_GROUPING})
set_target_properties(${targetname}
......
......@@ -612,9 +612,12 @@ function (_build_openflipper_plugin plugin)
acg_append_files (headers "*.hh" ${directories})
acg_append_files (sources "*.cc" ${directories})
acg_append_files (sources "*.cpp" ${directories})
acg_append_files (ui-files "*.ui" ${directories})
acg_append_files (sources "*.c" ${directories})
acg_append_files (qrc "*.qrc" ${directories})
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${sources} ${headers} ${ui-files} ${qrc})
# remove template cc files from source file list
acg_drop_templates (sources)
......@@ -834,8 +837,6 @@ macro (openflipper_plugin)
)
if (NOT DISABLE_PLUGIN_${_PLUGIN})
#group the files in msvc
RECURSE_GROUPS( ${CMAKE_CURRENT_SOURCE_DIR} )
_build_openflipper_plugin (${_plugin} ${ARGN})
set(LOADED_PACKAGES ${LOADED_PACKAGES} PARENT_SCOPE)
set(INSTALLDATA_DIRS ${INSTALLDATA_DIRS} PARENT_SCOPE)
......
......@@ -107,8 +107,11 @@ endif ()
# collect all header,source and ui files
acg_append_files (headers "*.hh" ${directories})
acg_append_files (sources "*.cc" ${directories})
acg_append_files (ui-files "*.ui" ${directories})
acg_append_files (qrc "*.qrc" ${directories} .)
source_group(TREE ${CMAKE_SOURCE_DIR} FILES ${sources} ${headers} ${ui-files} ${qrc})
# remove template cc files from source file list
acg_drop_templates (sources)
......@@ -128,8 +131,6 @@ endif ()
# display results
acg_print_configure_header (ACG "ACG")
RECURSE_GROUPS( ${CMAKE_CURRENT_SOURCE_DIR} )
if ( NOT WIN32 )
# Allow targets depending on ACG find the autogenerated header files
target_include_directories( ACG PUBLIC
......