Skip to content
Snippets Groups Projects
Commit fbc0e795 authored by Richard Linden's avatar Richard Linden
Browse files

added empty param blocks to registered widgets that didn't have them

made LLDefaultChildRegistry::Register errors actually crash the client...llerrs doesn't work in static initializers
parent 48b3ac20
No related branches found
No related tags found
No related merge requests found
......@@ -432,11 +432,15 @@ friend class LLMultiFloater;
class LLFloaterView : public LLUICtrl
{
public:
struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>{};
protected:
LLFloaterView (const Params& p);
friend class LLUICtrlFactory;
public:
/*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
void reshapeFloater(S32 width, S32 height, BOOL called_from_parent, BOOL adjust_vertical);
......
......@@ -435,7 +435,10 @@ void LLUICtrlFactory::registerWidget(const std::type_info* widget_type, const st
std::string* existing_tag = LLWidgetNameRegistry::instance().getValue(param_block_type);
if (existing_tag != NULL && *existing_tag != tag)
{
llerrs << "Duplicate entry for T::Params, try creating empty param block in derived classes that inherit T::Params" << llendl;
std::cerr << "Duplicate entry for T::Params, try creating empty param block in derived classes that inherit T::Params" << std::endl;
// forcing crash here
char* foo = 0;
*foo = 1;
}
LLWidgetNameRegistry ::instance().defaultRegistrar().add(param_block_type, tag);
// associate widget type with factory function
......
......@@ -921,6 +921,9 @@ class LLIMWellChiclet : public LLSysWellChiclet, LLIMSessionObserver
class LLNotificationChiclet : public LLSysWellChiclet
{
friend class LLUICtrlFactory;
public:
struct Params : public LLInitParam::Block<Params, LLSysWellChiclet::Params>{};
protected:
LLNotificationChiclet(const Params& p);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment