mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-05-02 07:07:32 +02:00
* GroupObjectDialog.h (class GroupObjectDialog): fixed #1499
"GroupObjectDialogTest.cpp does not compile with gcc 3.4.6" and SF bug 3015307. There is no reason to make method insertObject() protected which caused problems (and hacky workaround) in the unit test.
This commit is contained in:
parent
38adeae00a
commit
26ae247aac
@ -1,5 +1,11 @@
|
||||
2010-06-12 Vadim Kurland <vadim@vk.crocodile.org>
|
||||
|
||||
* GroupObjectDialog.h (class GroupObjectDialog): fixed #1499
|
||||
"GroupObjectDialogTest.cpp does not compile with gcc 3.4.6" and SF
|
||||
bug 3015307. There is no reason to make method insertObject()
|
||||
protected which caused problems (and hacky workaround) in the unit
|
||||
test.
|
||||
|
||||
* IPTImporter.cpp (IPTImporter::finalize): fixed SF bug #3015305
|
||||
"compile error XML validity ". The problem was introduced with a
|
||||
change that made policy importer cabaple of reproducing default
|
||||
|
||||
@ -65,15 +65,15 @@ class GroupObjectDialog : public BaseObjectDialog
|
||||
void setupPopupMenu(const QPoint&);
|
||||
void saveColumnWidths();
|
||||
|
||||
protected:
|
||||
void insertObject(libfwbuilder::FWObject *o);
|
||||
|
||||
public:
|
||||
GroupObjectDialog(QWidget *parent);
|
||||
~GroupObjectDialog();
|
||||
|
||||
enum viewType { Icon, List };
|
||||
|
||||
// making insertObject() public so we can use it in unit tests
|
||||
void insertObject(libfwbuilder::FWObject *o);
|
||||
|
||||
public slots:
|
||||
virtual void applyChanges();
|
||||
virtual void loadFWObject(libfwbuilder::FWObject *obj);
|
||||
|
||||
@ -160,18 +160,9 @@ template <class FWTYPE> FWTYPE* GroupObjectDialogTest::createObject(QString name
|
||||
return FWTYPE::cast(om->createObject(FWBTree().getStandardSlotForObject(findUserLibrary(), FWTYPE::TYPENAME), FWTYPE::TYPENAME, name));
|
||||
}
|
||||
|
||||
class PublicGroupDialog: public GroupObjectDialog
|
||||
{
|
||||
public:
|
||||
void insertObject(FWObject *o)
|
||||
{
|
||||
GroupObjectDialog::insertObject(o);
|
||||
}
|
||||
};
|
||||
|
||||
bool checkObjectInsertion(GroupObjectDialog *dlg, Group *grp, FWObject *obj)
|
||||
{
|
||||
static_cast<PublicGroupDialog*>(dlg)->insertObject(obj);
|
||||
dlg->insertObject(obj);
|
||||
for (Group::iterator i = grp->begin(); i!= grp->end(); i++)
|
||||
{
|
||||
if (FWObjectReference::cast(*i)->getPointer() == obj)
|
||||
@ -184,7 +175,7 @@ bool checkObjectInsertion(GroupObjectDialog *dlg, Group *grp, FWObject *obj)
|
||||
|
||||
bool checkObjectInsertion2(GroupObjectDialog *dlg, ServiceGroup *grp, FWObject *obj)
|
||||
{
|
||||
static_cast<PublicGroupDialog*>(dlg)->insertObject(obj);
|
||||
dlg->insertObject(obj);
|
||||
for (ServiceGroup::iterator i = grp->begin(); i!= grp->end(); i++)
|
||||
{
|
||||
if (FWServiceReference::cast(*i)->getPointer() == obj)
|
||||
|
||||
@ -51,7 +51,8 @@
|
||||
|
||||
class GroupObjectDialogTest : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_OBJECT;
|
||||
|
||||
libfwbuilder::Library* findUserLibrary();
|
||||
template <class FWTYPE> FWTYPE* createObject(QString name);
|
||||
ObjectManipulator *om;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user