Skip to content

Commit

Permalink
Fixed|libshell|libdeng2: DENG2_PIMPL required by DENG2_PRIVATE
Browse files Browse the repository at this point in the history
The private instance must be derived from de::IPrivate for destruction
to work correctly.
  • Loading branch information
skyjake committed Mar 8, 2013
1 parent f359350 commit e860f73
Show file tree
Hide file tree
Showing 14 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion doomsday/libdeng2/src/net/listensocket.cpp
Expand Up @@ -27,7 +27,7 @@

namespace de {

struct ListenSocket::Instance
DENG2_PIMPL_NOREF(ListenSocket)
{
QTcpServer *socket;
duint16 port;
Expand Down
2 changes: 1 addition & 1 deletion doomsday/libdeng2/src/net/socket.cpp
Expand Up @@ -182,7 +182,7 @@ struct MessageHeader : public ISerializable

using namespace internal;

struct Socket::Instance
DENG2_PIMPL_NOREF(Socket)
{
Address target;
bool quiet;
Expand Down
2 changes: 1 addition & 1 deletion doomsday/libshell/src/dialogwidget.cpp
Expand Up @@ -24,7 +24,7 @@
namespace de {
namespace shell {

struct DialogWidget::Instance
DENG2_PIMPL_NOREF(DialogWidget)
{
QEventLoop subloop;
};
Expand Down
2 changes: 1 addition & 1 deletion doomsday/libshell/src/inputdialog.cpp
Expand Up @@ -25,7 +25,7 @@
namespace de {
namespace shell {

struct InputDialog::Instance
DENG2_PIMPL_NOREF(InputDialog)
{
LabelWidget *label;
LineEditWidget *edit;
Expand Down
2 changes: 1 addition & 1 deletion doomsday/libshell/src/labelwidget.cpp
Expand Up @@ -23,7 +23,7 @@
namespace de {
namespace shell {

struct LabelWidget::Instance
DENG2_PIMPL_NOREF(LabelWidget)
{
TextCanvas::Char background;
String label;
Expand Down
2 changes: 1 addition & 1 deletion doomsday/libshell/src/localserver.cpp
Expand Up @@ -26,7 +26,7 @@
namespace de {
namespace shell {

struct LocalServer::Instance
DENG2_PIMPL_NOREF(LocalServer)
{
Link *link;
duint16 port;
Expand Down
9 changes: 5 additions & 4 deletions doomsday/libshell/src/logwidget.cpp
Expand Up @@ -82,7 +82,7 @@ class Sink : public LogSink, public Lockable
QList<LogEntry *> _entries;
};

struct LogWidget::Instance
DENG2_PIMPL(LogWidget)
{
Sink sink;
MonospaceLogSinkFormatter formatter;
Expand All @@ -91,8 +91,9 @@ struct LogWidget::Instance
int maxEntries;
int visibleOffset;

Instance(LogWidget &inst)
: sink(inst),
Instance(Public *inst)
: Base(inst),
sink(*inst),
cacheWidth(0),
maxEntries(1000),
visibleOffset(0)
Expand Down Expand Up @@ -145,7 +146,7 @@ struct LogWidget::Instance
}
};

LogWidget::LogWidget(String const &name) : TextWidget(name), d(new Instance(*this))
LogWidget::LogWidget(String const &name) : TextWidget(name), d(new Instance(this))
{}

LogSink &LogWidget::logSink()
Expand Down
2 changes: 1 addition & 1 deletion doomsday/libshell/src/protocol.cpp
Expand Up @@ -110,7 +110,7 @@ Packet *LogEntryPacket::fromBlock(Block const &block)

static char const *MAP_OUTLINE_PACKET_TYPE = "MpOL";

struct MapOutlinePacket::Instance
DENG2_PIMPL_NOREF(MapOutlinePacket)
{
QList<Line> lines;
};
Expand Down
2 changes: 1 addition & 1 deletion doomsday/libshell/src/textcanvas.cpp
Expand Up @@ -23,7 +23,7 @@
namespace de {
namespace shell {

struct TextCanvas::Instance
DENG2_PIMPL_NOREF(TextCanvas)
{
Size size;
QList<Char *> lines;
Expand Down
2 changes: 1 addition & 1 deletion doomsday/libshell/src/textwidget.cpp
Expand Up @@ -24,7 +24,7 @@
namespace de {
namespace shell {

struct TextWidget::Instance
DENG2_PIMPL_NOREF(TextWidget)
{
TextCanvas *canvas;
RuleRectangle *rule;
Expand Down
2 changes: 1 addition & 1 deletion doomsday/tools/shell/shell-gui/src/guishellapp.cpp
Expand Up @@ -32,7 +32,7 @@ Q_DECLARE_METATYPE(de::Address)
using namespace de;
using namespace de::shell;

struct GuiShellApp::Instance
DENG2_PIMPL_NOREF(GuiShellApp)
{
ServerFinder finder;

Expand Down
5 changes: 2 additions & 3 deletions doomsday/tools/shell/shell-gui/src/qttextcanvas.cpp
Expand Up @@ -24,7 +24,7 @@
using namespace de;
using namespace de::shell;

struct QtTextCanvas::Instance
DENG2_PIMPL_NOREF(QtTextCanvas)
{
Size dims;
QImage backBuffer;
Expand Down Expand Up @@ -103,8 +103,7 @@ struct QtTextCanvas::Instance
}
};

QtTextCanvas::QtTextCanvas(TextCanvas::Size const &size)
: d(new Instance)
QtTextCanvas::QtTextCanvas(TextCanvas::Size const &size) : d(new Instance)
{
d->dims = size;

Expand Down
2 changes: 1 addition & 1 deletion doomsday/tools/shell/shell-text/src/cursestextcanvas.cpp
Expand Up @@ -18,7 +18,7 @@

#include "cursestextcanvas.h"

struct CursesTextCanvas::Instance
DENG2_PIMPL_NOREF(CursesTextCanvas)
{
WINDOW *window;
Coord origin;
Expand Down
2 changes: 1 addition & 1 deletion doomsday/tools/shell/shell-text/src/localserverdialog.cpp
Expand Up @@ -28,7 +28,7 @@
using namespace de;
using namespace de::shell;

struct LocalServerDialog::Instance
DENG2_PIMPL_NOREF(LocalServerDialog)
{
ChoiceWidget *choice;
LineEditWidget *port;
Expand Down

0 comments on commit e860f73

Please sign in to comment.