mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-28 15:41:13 -04:00
minor cleanup; less pointer usage
This commit is contained in:
parent
ba5ca5beed
commit
6c4bdc0101
@ -35,7 +35,7 @@ namespace CSVDoc
|
|||||||
CSVDoc::SubView *SubViewFactoryWithCreator<SubViewT, CreatorFactoryT>::makeSubView (
|
CSVDoc::SubView *SubViewFactoryWithCreator<SubViewT, CreatorFactoryT>::makeSubView (
|
||||||
const CSMWorld::UniversalId& id, CSMDoc::Document& document)
|
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"
|
#include "creator.hpp"
|
||||||
|
|
||||||
CSVWorld::TableSubView::TableSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document,
|
CSVWorld::TableSubView::TableSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document,
|
||||||
Creator *creator)
|
const CreatorFactoryBase& creatorFactory)
|
||||||
: SubView (id)
|
: SubView (id)
|
||||||
{
|
{
|
||||||
bool createAndDelete = creator!=0;
|
|
||||||
delete creator;
|
|
||||||
|
|
||||||
QVBoxLayout *layout = new QVBoxLayout;
|
QVBoxLayout *layout = new QVBoxLayout;
|
||||||
|
|
||||||
layout->setContentsMargins (QMargins (0, 0, 0, 0));
|
layout->setContentsMargins (QMargins (0, 0, 0, 0));
|
||||||
|
|
||||||
|
Creator *creator = creatorFactory.makeCreator();
|
||||||
|
bool createAndDelete = creator!=0;
|
||||||
|
delete creator;
|
||||||
|
|
||||||
layout->addWidget (
|
layout->addWidget (
|
||||||
mTable = new Table (id, document.getData(), document.getUndoStack(), createAndDelete), 2);
|
mTable = new Table (id, document.getData(), document.getUndoStack(), createAndDelete), 2);
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ namespace CSVWorld
|
|||||||
{
|
{
|
||||||
class Table;
|
class Table;
|
||||||
class TableBottomBox;
|
class TableBottomBox;
|
||||||
class Creator;
|
class CreatorFactoryBase;
|
||||||
|
|
||||||
class TableSubView : public CSVDoc::SubView
|
class TableSubView : public CSVDoc::SubView
|
||||||
{
|
{
|
||||||
@ -26,8 +26,7 @@ namespace CSVWorld
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
TableSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document,
|
TableSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document,
|
||||||
Creator *creator = 0);
|
const CreatorFactoryBase& creatorFactory);
|
||||||
///< The ownership of \a creator is transferred to this.
|
|
||||||
|
|
||||||
virtual void setEditLock (bool locked);
|
virtual void setEditLock (bool locked);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user