summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs/qmessagebox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/dialogs/qmessagebox.cpp')
-rw-r--r--src/widgets/dialogs/qmessagebox.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/widgets/dialogs/qmessagebox.cpp b/src/widgets/dialogs/qmessagebox.cpp
index 1bab8b7785..e93850c1b7 100644
--- a/src/widgets/dialogs/qmessagebox.cpp
+++ b/src/widgets/dialogs/qmessagebox.cpp
@@ -240,7 +240,7 @@ void QMessageBoxPrivate::init(const QString &title, const QString &text)
label->setTextInteractionFlags(Qt::TextInteractionFlags(q->style()->styleHint(QStyle::SH_MessageBox_TextInteractionFlags, 0, q)));
label->setAlignment(Qt::AlignVCenter | Qt::AlignLeft);
label->setOpenExternalLinks(true);
-#if defined(Q_WS_MAC)
+#if defined(Q_OS_MAC)
label->setContentsMargins(16, 0, 0, 0);
#else
label->setContentsMargins(2, 0, 0, 0);
@@ -258,7 +258,7 @@ void QMessageBoxPrivate::init(const QString &title, const QString &text)
q, SLOT(_q_buttonClicked(QAbstractButton*)));
QGridLayout *grid = new QGridLayout;
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
grid->addWidget(iconLabel, 0, 0, 2, 1, Qt::AlignTop);
grid->addWidget(label, 0, 1, 1, 1);
// -- leave space for information label --
@@ -285,7 +285,7 @@ void QMessageBoxPrivate::init(const QString &title, const QString &text)
}
q->setModal(true);
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
QFont f = q->font();
f.setBold(true);
label->setFont(f);
@@ -316,7 +316,7 @@ void QMessageBoxPrivate::updateSize()
if (screenSize.width() <= 1024)
hardLimit = screenSize.width();
#endif
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
int softLimit = qMin(screenSize.width()/2, 420);
#else
// note: ideally on windows, hard and soft limits but it breaks compat
@@ -1328,7 +1328,7 @@ void QMessageBox::changeEvent(QEvent *ev)
}
case QEvent::FontChange:
case QEvent::ApplicationFontChange:
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
{
QFont f = font();
f.setBold(true);
@@ -1348,12 +1348,12 @@ void QMessageBox::keyPressEvent(QKeyEvent *e)
{
Q_D(QMessageBox);
if (e->key() == Qt::Key_Escape
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
|| (e->modifiers() == Qt::ControlModifier && e->key() == Qt::Key_Period)
#endif
) {
if (d->detectedEscapeButton) {
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
d->detectedEscapeButton->animateClick();
#else
d->detectedEscapeButton->click();
@@ -1687,7 +1687,7 @@ QMessageBox::StandardButton QMessageBox::critical(QWidget *parent, const QString
*/
void QMessageBox::about(QWidget *parent, const QString &title, const QString &text)
{
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
static QPointer<QMessageBox> oldMsgBox;
if (oldMsgBox && oldMsgBox->text() == text) {
@@ -1699,7 +1699,7 @@ void QMessageBox::about(QWidget *parent, const QString &title, const QString &te
#endif
QMessageBox *msgBox = new QMessageBox(title, text, Information, 0, 0, 0, parent
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
, Qt::WindowTitleHint | Qt::WindowSystemMenuHint
#endif
);
@@ -1709,7 +1709,7 @@ void QMessageBox::about(QWidget *parent, const QString &title, const QString &te
msgBox->setIconPixmap(icon.pixmap(size));
// should perhaps be a style hint
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
oldMsgBox = msgBox;
#if 0
// ### doesn't work until close button is enabled in title bar
@@ -1740,7 +1740,7 @@ void QMessageBox::about(QWidget *parent, const QString &title, const QString &te
*/
void QMessageBox::aboutQt(QWidget *parent, const QString &title)
{
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
static QPointer<QMessageBox> oldMsgBox;
if (oldMsgBox) {
@@ -1802,7 +1802,7 @@ void QMessageBox::aboutQt(QWidget *parent, const QString &title)
#endif
// should perhaps be a style hint
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
oldMsgBox = msgBox;
#if 0
// ### doesn't work until close button is enabled in title bar
@@ -2467,7 +2467,7 @@ void QMessageBox::setInformativeText(const QString &text)
layout()->removeWidget(d->informativeLabel);
delete d->informativeLabel;
d->informativeLabel = 0;
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
d->label->setContentsMargins(2, 0, 0, 0);
#endif
d->updateSize();
@@ -2481,7 +2481,7 @@ void QMessageBox::setInformativeText(const QString &text)
label->setAlignment(Qt::AlignTop | Qt::AlignLeft);
label->setOpenExternalLinks(true);
label->setWordWrap(true);
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
d->label->setContentsMargins(2, 0, 0, 0);
label->setContentsMargins(2, 0, 0, 6);
label->setIndent(9);
@@ -2511,7 +2511,7 @@ void QMessageBox::setInformativeText(const QString &text)
void QMessageBox::setWindowTitle(const QString &title)
{
// Message boxes on the mac do not have a title
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
QDialog::setWindowTitle(title);
#else
Q_UNUSED(title);