mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-13 15:09:43 +00:00
minor cleanup; less pointer usage
This commit is contained in:
parent
ba5ca5beed
commit
6c4bdc0101
3 changed files with 8 additions and 7 deletions
|
@ -35,7 +35,7 @@ namespace CSVDoc
|
|||
CSVDoc::SubView *SubViewFactoryWithCreator<SubViewT, CreatorFactoryT>::makeSubView (
|
||||
const CSMWorld::UniversalId& id, CSMDoc::Document& document)
|
||||
{
|
||||
return new SubViewT (id, document, CreatorFactoryT().makeCreator());
|
||||
return new SubViewT (id, document, CreatorFactoryT());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -10,16 +10,18 @@
|
|||
#include "creator.hpp"
|
||||
|
||||
CSVWorld::TableSubView::TableSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document,
|
||||
Creator *creator)
|
||||
const CreatorFactoryBase& creatorFactory)
|
||||
: SubView (id)
|
||||
{
|
||||
bool createAndDelete = creator!=0;
|
||||
delete creator;
|
||||
|
||||
QVBoxLayout *layout = new QVBoxLayout;
|
||||
|
||||
layout->setContentsMargins (QMargins (0, 0, 0, 0));
|
||||
|
||||
Creator *creator = creatorFactory.makeCreator();
|
||||
bool createAndDelete = creator!=0;
|
||||
delete creator;
|
||||
|
||||
layout->addWidget (
|
||||
mTable = new Table (id, document.getData(), document.getUndoStack(), createAndDelete), 2);
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace CSVWorld
|
|||
{
|
||||
class Table;
|
||||
class TableBottomBox;
|
||||
class Creator;
|
||||
class CreatorFactoryBase;
|
||||
|
||||
class TableSubView : public CSVDoc::SubView
|
||||
{
|
||||
|
@ -26,8 +26,7 @@ namespace CSVWorld
|
|||
public:
|
||||
|
||||
TableSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document,
|
||||
Creator *creator = 0);
|
||||
///< The ownership of \a creator is transferred to this.
|
||||
const CreatorFactoryBase& creatorFactory);
|
||||
|
||||
virtual void setEditLock (bool locked);
|
||||
|
||||
|
|
Loading…
Reference in a new issue