summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/qcombobox.cpp2
-rw-r--r--src/gui/widgets/qlineedit.cpp5
-rw-r--r--src/gui/widgets/qmainwindow.cpp6
-rw-r--r--src/gui/widgets/qmainwindowlayout_p.h1
-rw-r--r--src/gui/widgets/qmenubar.cpp30
5 files changed, 28 insertions, 16 deletions
diff --git a/src/gui/widgets/qcombobox.cpp b/src/gui/widgets/qcombobox.cpp
index b857e944ca..ced0d73ff0 100644
--- a/src/gui/widgets/qcombobox.cpp
+++ b/src/gui/widgets/qcombobox.cpp
@@ -2486,7 +2486,7 @@ void QComboBox::showPopup()
listRect.setWidth(listRect.height());
//by default popup is centered on screen in landscape
listRect.moveCenter(screen.center());
- if (staConTopRect.IsEmpty()) {
+ if (staConTopRect.IsEmpty() && AknLayoutUtils::CbaLocation() != AknLayoutUtils::EAknCbaLocationBottom) {
// landscape without stacon, menu should be at the right
(opt.direction == Qt::LeftToRight) ? listRect.setRight(screen.right()) :
listRect.setLeft(screen.left());
diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp
index caaef6866e..0a33220128 100644
--- a/src/gui/widgets/qlineedit.cpp
+++ b/src/gui/widgets/qlineedit.cpp
@@ -139,7 +139,10 @@ void QLineEdit::initStyleOption(QStyleOptionFrame *option) const
The length of the text can be constrained to maxLength(). The text
can be arbitrarily constrained using a validator() or an
- inputMask(), or both.
+ inputMask(), or both. When switching between a validator and an input mask
+ on the same line edit, it is best to clear the validator or input mask to
+ prevent undefined behavior.
+
A related class is QTextEdit which allows multi-line, rich text
editing.
diff --git a/src/gui/widgets/qmainwindow.cpp b/src/gui/widgets/qmainwindow.cpp
index d4118bd486..da902d5154 100644
--- a/src/gui/widgets/qmainwindow.cpp
+++ b/src/gui/widgets/qmainwindow.cpp
@@ -78,6 +78,7 @@ public:
: layout(0), explicitIconSize(false), toolButtonStyle(Qt::ToolButtonIconOnly)
#ifdef Q_WS_MAC
, useHIToolBar(false)
+ , activateUnifiedToolbarAfterFullScreen(false)
#endif
#if !defined(QT_NO_DOCKWIDGET) && !defined(QT_NO_CURSOR)
, hasOldCursor(false) , cursorAdjusted(false)
@@ -89,6 +90,7 @@ public:
Qt::ToolButtonStyle toolButtonStyle;
#ifdef Q_WS_MAC
bool useHIToolBar;
+ bool activateUnifiedToolbarAfterFullScreen;
#endif
void init();
QList<int> hoverSeparator;
@@ -502,7 +504,7 @@ void QMainWindow::setToolButtonStyle(Qt::ToolButtonStyle toolButtonStyle)
*/
QMenuBar *QMainWindow::menuBar() const
{
- QMenuBar *menuBar = qobject_cast<QMenuBar *>(d_func()->layout->menuBar());
+ QMenuBar *menuBar = qobject_cast<QMenuBar *>(layout()->menuBar());
if (!menuBar) {
QMainWindow *self = const_cast<QMainWindow *>(this);
menuBar = new QMenuBar(self);
@@ -1501,8 +1503,6 @@ bool QMainWindow::event(QEvent *event)
\i Before Qt 4.5, if you called showFullScreen() on the main window, the QToolbar would
disappear since it is considered to be part of the title bar. Qt 4.5 and up will now work around this by pulling
the toolbars out and back into the regular toolbar and vice versa when you swap out.
- However, a good practice would be that turning off the unified toolbar before you call
- showFullScreen() and restoring it after you call showNormal().
\endlist
Setting this back to false will remove these restrictions.
diff --git a/src/gui/widgets/qmainwindowlayout_p.h b/src/gui/widgets/qmainwindowlayout_p.h
index e882d118e7..a37221686d 100644
--- a/src/gui/widgets/qmainwindowlayout_p.h
+++ b/src/gui/widgets/qmainwindowlayout_p.h
@@ -339,6 +339,7 @@ public:
void cleanUpMacToolbarItems();
void fixSizeInUnifiedToolbar(QToolBar *tb) const;
bool useHIToolBar;
+ bool activateUnifiedToolbarAfterFullScreen;
void syncUnifiedToolbarVisibility();
bool blockVisiblityCheck;
diff --git a/src/gui/widgets/qmenubar.cpp b/src/gui/widgets/qmenubar.cpp
index df16f7f83a..ae56fa53f4 100644
--- a/src/gui/widgets/qmenubar.cpp
+++ b/src/gui/widgets/qmenubar.cpp
@@ -1628,10 +1628,10 @@ bool QMenuBar::eventFilter(QObject *object, QEvent *event)
}
/*!
- \internal
+ Returns the QAction at \a pt. Returns 0 if there is no action at \a pt or if
+the location has a separator.
- Return the item at \a pt, or 0 if there is no item there or if it is
- a separator item.
+ \sa addAction(), addSeparator()
*/
QAction *QMenuBar::actionAt(const QPoint &pt) const
{
@@ -1640,9 +1640,9 @@ QAction *QMenuBar::actionAt(const QPoint &pt) const
}
/*!
- \internal
+ Returns the geometry of action \a act as a QRect.
- Returns the geometry of action \a act.
+ \sa actionAt()
*/
QRect QMenuBar::actionGeometry(QAction *act) const
{
@@ -1836,10 +1836,17 @@ void QMenuBarPrivate::_q_updateLayout()
}
/*!
- \internal
+ \fn void QMenuBar::setCornerWidget(QWidget *widget, Qt::Corner corner)
- This sets widget \a w to be shown directly on the left of the first or
- the right of the last menu item, depending on \a corner.
+ This sets the given \a widget to be shown directly on the left of the first
+ menu item, or on the right of the last menu item, depending on \a corner.
+
+ The menu bar takes ownership of \a widget, reparenting it into the menu bar.
+ However, if the \a corner already contains a widget, this previous widget
+ will no longer be managed and will still be a visible child of the menu bar.
+
+ \note Using a corner other than Qt::TopRightCorner or Qt::TopLeftCorner
+ will result in a warning.
*/
void QMenuBar::setCornerWidget(QWidget *w, Qt::Corner corner)
{
@@ -1869,10 +1876,11 @@ void QMenuBar::setCornerWidget(QWidget *w, Qt::Corner corner)
}
/*!
- \internal
+ Returns the widget on the left of the first or on the right of the last menu
+ item, depending on \a corner.
- Returns the widget in the left of the first or the right of the last menu
- item, depending on \a corner.
+ \note Using a corner other than Qt::TopRightCorner or Qt::TopLeftCorner
+ will result in a warning.
*/
QWidget *QMenuBar::cornerWidget(Qt::Corner corner) const
{