Skip to content
This repository has been archived by the owner on May 16, 2020. It is now read-only.

Commit

Permalink
all models got a parent
Browse files Browse the repository at this point in the history
  • Loading branch information
velnias75 committed Mar 7, 2015
1 parent 2c7762d commit 26aaae4
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/connectionlogdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include "util.h"

ConnectionLogDialog::ConnectionLogDialog(QWidget *p) : NetMauMauDialog(p, Qt::Window),
m_entryFont("Monospace"), m_model(),
m_entryFont("Monospace"), m_model(this),
m_toIcon(QApplication::style()->standardIcon(QStyle::SP_ArrowRight)),
m_fromIcon(QApplication::style()->standardIcon(QStyle::SP_ArrowLeft)),
m_ctxPopup(new QMenu(this)) {
Expand Down
2 changes: 1 addition & 1 deletion src/deleteserversdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include "serverinfo.h"

DeleteServersDialog::DeleteServersDialog(const QStandardItemModel *model, QWidget *p) :
NetMauMauDialog(p), m_pModel(model), m_model(0, 1) {
NetMauMauDialog(p), m_pModel(model), m_model(0, 1, this) {

setupUi(this);

Expand Down
6 changes: 3 additions & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ int main(int argc, char *argv[]) {
QCoreApplication::setApplicationName(PACKAGE_NAME);
QCoreApplication::setApplicationVersion(PACKAGE_VERSION);

NetMauMauApplication a(argc, argv);

#ifdef _WIN32
QSettings::setDefaultFormat(QSettings::IniFormat);
#else
QSharedMemory sharedMemory;
QSharedMemory sharedMemory(&a);
sharedMemory.setKey(QCoreApplication::applicationName() + qgetenv("USER"));
#endif

NetMauMauApplication a(argc, argv);

QTranslator qtTranslator;
#ifndef _WIN32
qtTranslator.load("qt_" + QLocale::system().name(),
Expand Down
2 changes: 1 addition & 1 deletion src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ struct scoresPlayer : public std::binary_function<Client::SCORE, std::string, bo
MainWindow::MainWindow(QSplashScreen *splash, QWidget *p) : QMainWindow(p), m_client(0L),
m_ui(new Ui::MainWindow),m_serverDlg(new ServerDialog(splash, this)),
m_lsov(new LocalServerOutputView()),
m_launchDlg(new LaunchServerDialog(m_lsov, m_serverDlg, this)), m_model(0, 5),
m_launchDlg(new LaunchServerDialog(m_lsov, m_serverDlg, this)), m_model(0, 5, this),
m_jackChooseDialog(new JackChooseDialog(this)), m_stdForeground(), m_stdBackground(),
m_connectionLogDlg(new ConnectionLogDialog(0L)), m_remotePlayersHeader(0L),
m_playerImageDelegate(new PlayerImageDelegate(this)),
Expand Down
2 changes: 1 addition & 1 deletion src/scoresdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "client.h"

ScoresDialog::ScoresDialog(ServerDialog *sd, QWidget *p) : NetMauMauDialog(p), m_serverdialog(sd),
m_model(0, 2), m_server(QString::null) {
m_model(0, 2, this), m_server(QString::null) {

setupUi(this);

Expand Down
4 changes: 2 additions & 2 deletions src/serverdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ const char *NA = QT_TRANSLATE_NOOP("ServerDialog", "n/a");
const QRegExp nameRex("[^\\+]+.*");
}

ServerDialog::ServerDialog(QSplashScreen *splash, QWidget *p) : NetMauMauDialog(p), m_model(0, 4),
m_playerNameModel(), m_forceRefresh(false), m_lastServer(QString::null),
ServerDialog::ServerDialog(QSplashScreen *splash, QWidget *p) : NetMauMauDialog(p),
m_model(0, 4, this), m_playerNameModel(), m_forceRefresh(false), m_lastServer(QString::null),
m_deleteServersDlg(new DeleteServersDialog(&m_model, this)),
m_nameRexValidator(new QRegExpValidator(nameRex)), m_playerImage(), m_autoRefresh(this),
m_mutex(), m_blockAutoRefresh(false), m_splash(splash), m_lastPlayerName(QString::null),
Expand Down

0 comments on commit 26aaae4

Please sign in to comment.