Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Flag Warnings #162

Merged
merged 1 commit into from
Aug 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -433,8 +433,8 @@ void MainWindow::on_actionExploreENIGMA_triggered() { QDesktopServices::openUrl(

void MainWindow::on_actionAbout_triggered() {
QMessageBox aboutBox(QMessageBox::Information, tr("About"),
tr("ENIGMA is a free, open-source, and cross-platform game engine."), QMessageBox::Ok, this,
nullptr);
tr("ENIGMA is a free, open-source, and cross-platform game engine."),
QMessageBox::Ok, this);
QAbstractButton *aboutQtButton = aboutBox.addButton(tr("About Qt"), QMessageBox::HelpRole);
aboutBox.exec();

Expand Down
2 changes: 1 addition & 1 deletion Models/MessageModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ QModelIndex MessageModel::index(int row, int column, const QModelIndex & /*paren
}

Qt::ItemFlags MessageModel::flags(const QModelIndex &index) const {
if (!index.isValid()) return nullptr;
if (!index.isValid()) return Qt::NoItemFlags;
auto flags = QAbstractItemModel::flags(index);
// Row 0 isn't a valid field in messages. We use it as header data
if (index.row() > 0) flags |= Qt::ItemIsEditable;
Expand Down
2 changes: 1 addition & 1 deletion Models/ProtoModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ bool ProtoModel::IsDirty() { return _dirty; }
QModelIndex ProtoModel::parent(const QModelIndex & /*index*/) const { return QModelIndex(); }

Qt::ItemFlags ProtoModel::flags(const QModelIndex &index) const {
if (!index.isValid()) return nullptr;
if (!index.isValid()) return Qt::NoItemFlags;
auto flags = QAbstractItemModel::flags(index);
flags |= Qt::ItemIsEditable;
return flags;
Expand Down