Erik Johansson wrote:
2007/7/1, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
--- branches/qt-gui_qt4/src/widgets/infofield.h (added)
+ InfoField(bool ro = false, QWidget* parent = 0);
I think the first argument should be an enum. So you can write
InfoField(ReadOnly), and not InfoField(true). Or remove the argument
completely use setReadOnly(bool).
It is a bool in Qt and it was a bool in old CInfoField code, I never
thought about changing that.
As the InfoField widget is used on a whole bunch of places (especially
in userinfodlg) and many of them needs to set read only as well, it
keeps the rest of the code shorter if the constructor takes it as a
parameter to save calling setReadOnly directly.
+ /**
+ * Old constructor with reversed paremeter order
+ */
+ InfoField(QWidget* parent, bool ro);
This one has to go, its confusing. But maybe that was your plan.
Yes, this is just temporary until the other classes are updated to use
the new constructor.
+ using QLineEdit::setText;
Add a comment that this is to get the QString variant.
Will do. (But I'm lazy so might save it until I go back to remove the
temporary functions =)
+ void setData(const char* data)
+ { setText(data); }
I think inline functions should be put after the class declaration,
and not within it. I guess you will remove theses functions later, but
I just wanted to comment on inline in general.
These will also be removed when not needed anymore, that's why I really
didn't care much where they ended up or adding doxygen comments for them.
+// Keep old code working until all classes has been updated
+typedef InfoField CInfoField;
sed -i 's/CInfoField/InfoField/g' *
I wanted to keep the commit to just changing to essential needed to move
the class and not change more than necessary in other files. And there
are a lot of CInfoFields out there.
When I updated code in other files to not use Qt3Support I will also
change these.
/Anders