Qt4: Don't segfault with QT_COMPACT

This commit is contained in:
Pasi Kallinen
2017-10-10 20:18:04 +03:00
parent 2fa61f9038
commit 257f17f8df
2 changed files with 8 additions and 4 deletions

View File

@@ -20,7 +20,7 @@ VARDIR = $(HACKDIR)
POSTINSTALL= cp -n sys/unix/sysconf $(INSTDIR)/sysconf; $(CHOWN) $(GAMEUID) $(INSTDIR)/sysconf; $(CHGRP) $(GAMEGRP) $(INSTDIR)/sysconf; chmod $(VARFILEPERM) $(INSTDIR)/sysconf;
POSTINSTALL+= bdftopcf win/X11/nh10.bdf > $(INSTDIR)/nh10.pcf; (cd $(INSTDIR); mkfontdir);
CFLAGS=-O -I../include -DNOTPARMDECL
CFLAGS=-g -O -I../include -DNOTPARMDECL
CFLAGS+=-DHACKDIR=\"$(HACKDIR)\"
CFLAGS+=-DSYSCF -DSYSCF_FILE=\"$(HACKDIR)/sysconf\"
CFLAGS+=-DCOMPRESS=\"/bin/gzip\" -DCOMPRESS_EXTENSION=\".gz\"

View File

@@ -861,14 +861,17 @@ void NetHackQtMainWindow::doKeys(const QString& k)
void NetHackQtMainWindow::AddMessageWindow(NetHackQtMessageWindow* window)
{
message=window;
hsplitter->insertWidget(0, message->Widget());
if (!qt_compact_mode)
hsplitter->insertWidget(0, message->Widget());
ShowIfReady();
}
void NetHackQtMainWindow::AddMapWindow(NetHackQtMapWindow2* window)
{
map=window;
vsplitter->insertWidget(1, map->Widget());
if (!qt_compact_mode)
vsplitter->insertWidget(1, map->Widget());
ShowIfReady();
connect(map,SIGNAL(resized()),this,SLOT(layout()));
}
@@ -876,7 +879,8 @@ void NetHackQtMainWindow::AddMapWindow(NetHackQtMapWindow2* window)
void NetHackQtMainWindow::AddStatusWindow(NetHackQtStatusWindow* window)
{
status=window;
hsplitter->insertWidget(2, status->Widget());
if (!qt_compact_mode)
hsplitter->insertWidget(2, status->Widget());
ShowIfReady();
}