Menu

#3 RollingFileAppender: "maxFileSize" property is write-only.

open-accepted
5
2009-03-23
2009-03-23
Jeff Adams
No

src/log4qt/rollingfileappender.h:79: Warning: Property declaration maxFileSize has no READ accessor function. The property will be invalid.

Per the QT docs (http://doc.trolltech.com/4.5/properties.html):
"A READ accessor function is required. It is for reading the property value. It must be const and must return either the property's type or a pointer or reference to that type. e.g., QWidget::focus is a read-only property with READ function QWidget::hasFocus()."

I wasn't clear on where that accessor was being used, but if it is used, my suggestion would be switch to using the function directly if possible. Or save the string on a "set" and return that for a "get" (or return null if "set" with a string was never called).

Discussion

  • Martin Heinrich

    Martin Heinrich - 2009-03-23
    • status: open --> open-accepted
     
  • Martin Heinrich

    Martin Heinrich - 2009-03-23

    The accessor is needed by the PropertyConfigurator to set the property on the RollingFileAppender. I will add a corresponding get method.

     

Log in to post a comment.

MongoDB Logo MongoDB