Work around QMessageBox not showing its title on Mac

This is a bit hacky and simply adds the title to the message text when
compiling on a Mac, but hopefully this will be enough.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2013-11-21 04:23:10 -08:00
parent 8aadd4d372
commit 995192c5fb
6 changed files with 18 additions and 13 deletions

View file

@ -385,10 +385,10 @@ void CylindersModel::remove(const QModelIndex& index)
}
cylinder_t *cyl = &current->cylinder[index.row()];
if (DivePlannerPointsModel::instance()->tankInUse(cyl->gasmix.o2.permille, cyl->gasmix.he.permille)) {
QMessageBox::warning(mainWindow(),
tr("Cylinder cannot be removed"),
tr("This gas in use. Only cylinders that are not used in the dive can be removed."),
QMessageBox::Ok);
QMessageBox::warning(mainWindow(), TITLE_OR_TEXT(
tr("Cylinder cannot be removed"),
tr("This gas in use. Only cylinders that are not used in the dive can be removed.")),
QMessageBox::Ok);
return;
}
beginRemoveRows(QModelIndex(), index.row(), index.row()); // yah, know, ugly.