Skip to content
Snippets Groups Projects
Commit f85b9224 authored by Jan Möbius's avatar Jan Möbius
Browse files

Output warning to log if updated all is called with -1

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@15765 383ad7c9-94d9-4d36-a494-682f7c89f535
parent c540a95d
No related branches found
No related tags found
No related merge requests found
......@@ -102,7 +102,14 @@ void Core::slotObjectUpdated(int _identifier, const UpdateType& _type) {
// If the identifier is -1 we force an update of all objects in the scene (Bad idea for scenes with many objects)
if ( _identifier == -1 ) {
std::cerr << "Warning, updated object called with -1" << std::endl;
if ( sender() != 0 ) {
if ( sender()->metaObject() != 0 ) {
emit log(LOGWARN,"updatedObject( " + QString::number(_identifier) + ", " + updateTypeName(_type)
+ tr(" ) called by ") + QString( sender()->metaObject()->className() + tr(" which is inefficient)") ) );
}
} else {
emit log(LOGWARN,"updatedObject( " + QString::number(_identifier) + ", " + updateTypeName(_type) + tr(" ) called by Core, which is inefficient!") );
}
for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::ALL_OBJECTS,DATA_ALL ) ; o_it != PluginFunctions::objectsEnd(); ++o_it) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment