couple of missing Qt prototypes

Shut up two missing prototype warnings.
This commit is contained in:
PatR
2021-01-23 15:58:23 -08:00
parent 8affbf5a24
commit 31046826f5
3 changed files with 13 additions and 7 deletions

View File

@@ -1062,7 +1062,10 @@ struct window_procs Qt_procs = {
};
#ifndef WIN32
extern "C" void
extern "C" void play_usersound(const char *, int);
/* called from core, sounds.c */
void
play_usersound(const char *filename, int volume UNUSED)
{
#if defined(USER_SOUNDS) && !defined(QT_NO_SOUND)

View File

@@ -76,13 +76,14 @@ extern "C" {
namespace nethack_qt_ {
void
centerOnMain( QWidget* w )
centerOnMain(QWidget *w)
{
QWidget* m = NetHackQtBind::mainWidget();
if (!m) m = qApp->desktop();
QPoint p = m->mapToGlobal(QPoint(0,0));
w->move( p.x() + m->width()/2 - w->width()/2,
p.y() + m->height()/2 - w->height()/2 );
QWidget *m = NetHackQtBind::mainWidget();
if (!m)
m = qApp->desktop();
QPoint p = m->mapToGlobal(QPoint(0, 0));
w->move(p.x() + m->width() / 2 - w->width() / 2,
p.y() + m->height() / 2 - w->height() / 2);
}
NetHackQtWindow::NetHackQtWindow()

View File

@@ -17,6 +17,8 @@
namespace nethack_qt_ {
void centerOnMain(QWidget *); /* in the namespace but not in any class */
class NetHackQtWindow {
public:
NetHackQtWindow();