Commit df1b3971 authored by Jan Möbius's avatar Jan Möbius

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 3f9d23fa
......@@ -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) {
......
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