summaryrefslogtreecommitdiffstats
path: root/src/gui/dialogs
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-07-05 16:06:20 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-07-05 16:06:20 (GMT)
commit013fb92b20db4fc3dc6a7a7d4cd0a3a0c941472f (patch)
treea010c01402ae8c9284e483da767a454489efb479 /src/gui/dialogs
parentc018f01b8a97e9ae3dee12777fd1bde4c51f231e (diff)
parent6adc6f500e1d2f65a493a76baf35c5f11180edeb (diff)
downloadQt-013fb92b20db4fc3dc6a7a7d4cd0a3a0c941472f.zip
Qt-013fb92b20db4fc3dc6a7a7d4cd0a3a0c941472f.tar.gz
Qt-013fb92b20db4fc3dc6a7a7d4cd0a3a0c941472f.tar.bz2
Merge branch 4.7 into qt-4.8-from-4.7
Diffstat (limited to 'src/gui/dialogs')
-rw-r--r--src/gui/dialogs/qerrormessage.cpp16
-rw-r--r--src/gui/dialogs/qmessagebox.cpp11
2 files changed, 21 insertions, 6 deletions
diff --git a/src/gui/dialogs/qerrormessage.cpp b/src/gui/dialogs/qerrormessage.cpp
index 890e6ca..0a6580a 100644
--- a/src/gui/dialogs/qerrormessage.cpp
+++ b/src/gui/dialogs/qerrormessage.cpp
@@ -249,12 +249,20 @@ QErrorMessage::QErrorMessage(QWidget * parent)
d->icon->setPixmap(QMessageBox::standardIcon(QMessageBox::Information));
d->icon->setAlignment(Qt::AlignHCenter | Qt::AlignTop);
#endif
- grid->addWidget(d->icon, 0, 0, Qt::AlignTop);
+#ifdef Q_WS_S60
+ //In Symbian, messagebox icons are in LtR UIs on right. Thus, layout needs to switch icon and text columns.
+ const int preferredIconColumn = (QApplication::layoutDirection() == Qt::LeftToRight) ? 1 : 0;
+ const int preferredTextColumn = (QApplication::layoutDirection() == Qt::LeftToRight) ? 0 : 1;
+#else
+ const int preferredIconColumn = 0;
+ const int preferredTextColumn = 1;
+#endif
+ grid->addWidget(d->icon, 0, preferredIconColumn, Qt::AlignTop);
d->errors = new QErrorMessageTextView(this);
- grid->addWidget(d->errors, 0, 1);
+ grid->addWidget(d->errors, 0, preferredTextColumn);
d->again = new QCheckBox(this);
d->again->setChecked(true);
- grid->addWidget(d->again, 1, 1, Qt::AlignTop);
+ grid->addWidget(d->again, 1, preferredTextColumn, Qt::AlignTop);
d->ok = new QPushButton(this);
#ifdef QT_SOFTKEYS_ENABLED
d->okAction = new QAction(d->ok);
@@ -270,7 +278,7 @@ QErrorMessage::QErrorMessage(QWidget * parent)
connect(d->ok, SIGNAL(clicked()), this, SLOT(accept()));
d->ok->setFocus();
grid->addWidget(d->ok, 2, 0, 1, 2, Qt::AlignCenter);
- grid->setColumnStretch(1, 42);
+ grid->setColumnStretch(preferredTextColumn, 42);
grid->setRowStretch(0, 42);
d->retranslateStrings();
}
diff --git a/src/gui/dialogs/qmessagebox.cpp b/src/gui/dialogs/qmessagebox.cpp
index 90ca080..c3a1084 100644
--- a/src/gui/dialogs/qmessagebox.cpp
+++ b/src/gui/dialogs/qmessagebox.cpp
@@ -259,8 +259,15 @@ void QMessageBoxPrivate::init(const QString &title, const QString &text)
QGridLayout *grid = new QGridLayout;
#ifndef Q_WS_MAC
- grid->addWidget(iconLabel, 0, 0, 2, 1, Qt::AlignTop);
- grid->addWidget(label, 0, 1, 1, 1);
+#ifdef Q_WS_S60
+ const int preferredIconColumn = (QApplication::layoutDirection() == Qt::LeftToRight) ? 1 : 0;
+ const int preferredTextColumn = (QApplication::layoutDirection() == Qt::LeftToRight) ? 0 : 1;
+#else
+ const int preferredIconColumn = 0;
+ const int preferredTextColumn = 1;
+#endif
+ grid->addWidget(iconLabel, 0, preferredIconColumn, 2, 1, Qt::AlignTop);
+ grid->addWidget(label, 0, preferredTextColumn, 1, 1);
// -- leave space for information label --
grid->addWidget(buttonBox, 2, 0, 1, 2);
#else