bool KstEventMonitorI::newObject() { QString tag_name = _tagName->text(); tag_name.replace("<New_Event>", _w->lineEditEquation->text()); // verify that the event name is unique if (KstData::self()->dataTagNameNotUnique(tag_name)) { _tagName->setFocus(); return false; } EventMonitorEntryPtr event = new EventMonitorEntry(tag_name); fillEvent(event); if (!event->isValid()) { event = 0L; KMessageBox::sorry(this, i18n("There is a syntax error in the equation you entered.")); return false; } KST::dataObjectList.lock().writeLock(); KST::dataObjectList.append(event.data()); KST::dataObjectList.lock().unlock(); event = 0L; // drop the reference before we update emit modified(); return true; }