summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>2013-03-20 13:46:57 +0100
committerOswald Buddenhagen <oswald.buddenhagen@digia.com>2013-03-20 13:49:28 +0100
commit76c0be34cd4ff4564693162fa7528463e23ce9d8 (patch)
treef165b7bc319548fb0082365411a871028f92e89e /src/widgets/widgets
parent27b4fe96b59e9e63d1e570e802c072e9afdfb2d4 (diff)
parent36cb3f3f655a9090c82de609010cbfb88651a0f3 (diff)
Merge branch 'dev' into stable
This starts Qt 5.1 release cycle Conflicts: src/gui/text/qfontdatabase.cpp src/gui/text/qharfbuzz_copy_p.h src/widgets/kernel/qapplication.cpp src/widgets/kernel/qcoreapplication.cpp Change-Id: I72fbf83ab3c2206aeea1b089428b0fc2a89bd62b
Diffstat (limited to 'src/widgets/widgets')
-rw-r--r--src/widgets/widgets/qabstractbutton.cpp4
-rw-r--r--src/widgets/widgets/qabstractbutton.h6
-rw-r--r--src/widgets/widgets/qabstractbutton_p.h2
-rw-r--r--src/widgets/widgets/qabstractscrollarea.cpp4
-rw-r--r--src/widgets/widgets/qabstractscrollarea.h6
-rw-r--r--src/widgets/widgets/qabstractscrollarea_p.h2
-rw-r--r--src/widgets/widgets/qabstractslider.cpp4
-rw-r--r--src/widgets/widgets/qabstractslider.h6
-rw-r--r--src/widgets/widgets/qabstractslider_p.h4
-rw-r--r--src/widgets/widgets/qabstractspinbox.cpp40
-rw-r--r--src/widgets/widgets/qabstractspinbox.h6
-rw-r--r--src/widgets/widgets/qabstractspinbox_p.h2
-rw-r--r--src/widgets/widgets/qbuttongroup.cpp6
-rw-r--r--src/widgets/widgets/qbuttongroup.h6
-rw-r--r--src/widgets/widgets/qcalendartextnavigator_p.h2
-rw-r--r--src/widgets/widgets/qcalendarwidget.cpp4
-rw-r--r--src/widgets/widgets/qcalendarwidget.h6
-rw-r--r--src/widgets/widgets/qcheckbox.cpp2
-rw-r--r--src/widgets/widgets/qcheckbox.h6
-rw-r--r--src/widgets/widgets/qcocoatoolbardelegate_mac.mm2
-rw-r--r--src/widgets/widgets/qcocoatoolbardelegate_mac_p.h2
-rw-r--r--src/widgets/widgets/qcombobox.cpp2
-rw-r--r--src/widgets/widgets/qcombobox.h6
-rw-r--r--src/widgets/widgets/qcombobox_p.h6
-rw-r--r--src/widgets/widgets/qcommandlinkbutton.cpp2
-rw-r--r--src/widgets/widgets/qcommandlinkbutton.h6
-rw-r--r--src/widgets/widgets/qdatetimeedit.cpp18
-rw-r--r--src/widgets/widgets/qdatetimeedit.h6
-rw-r--r--src/widgets/widgets/qdatetimeedit_p.h2
-rw-r--r--src/widgets/widgets/qdial.cpp2
-rw-r--r--src/widgets/widgets/qdial.h6
-rw-r--r--src/widgets/widgets/qdialogbuttonbox.cpp2
-rw-r--r--src/widgets/widgets/qdialogbuttonbox.h6
-rw-r--r--src/widgets/widgets/qdockarealayout.cpp4
-rw-r--r--src/widgets/widgets/qdockarealayout_p.h2
-rw-r--r--src/widgets/widgets/qdockwidget.cpp2
-rw-r--r--src/widgets/widgets/qdockwidget.h6
-rw-r--r--src/widgets/widgets/qdockwidget_p.h2
-rw-r--r--src/widgets/widgets/qeffects.cpp6
-rw-r--r--src/widgets/widgets/qeffects_p.h2
-rw-r--r--src/widgets/widgets/qfocusframe.cpp2
-rw-r--r--src/widgets/widgets/qfocusframe.h6
-rw-r--r--src/widgets/widgets/qfontcombobox.cpp39
-rw-r--r--src/widgets/widgets/qfontcombobox.h6
-rw-r--r--src/widgets/widgets/qframe.cpp2
-rw-r--r--src/widgets/widgets/qframe.h6
-rw-r--r--src/widgets/widgets/qframe_p.h2
-rw-r--r--src/widgets/widgets/qgroupbox.cpp6
-rw-r--r--src/widgets/widgets/qgroupbox.h8
-rw-r--r--src/widgets/widgets/qlabel.cpp16
-rw-r--r--src/widgets/widgets/qlabel.h6
-rw-r--r--src/widgets/widgets/qlabel_p.h2
-rw-r--r--src/widgets/widgets/qlcdnumber.cpp2
-rw-r--r--src/widgets/widgets/qlcdnumber.h6
-rw-r--r--src/widgets/widgets/qlineedit.cpp13
-rw-r--r--src/widgets/widgets/qlineedit.h6
-rw-r--r--src/widgets/widgets/qlineedit_p.cpp4
-rw-r--r--src/widgets/widgets/qlineedit_p.h2
-rw-r--r--src/widgets/widgets/qmaccocoaviewcontainer_mac.h6
-rw-r--r--src/widgets/widgets/qmaccocoaviewcontainer_mac.mm4
-rw-r--r--src/widgets/widgets/qmacnativewidget_mac.h6
-rw-r--r--src/widgets/widgets/qmacnativewidget_mac.mm2
-rw-r--r--src/widgets/widgets/qmainwindow.cpp2
-rw-r--r--src/widgets/widgets/qmainwindow.h6
-rw-r--r--src/widgets/widgets/qmainwindowlayout.cpp2
-rw-r--r--src/widgets/widgets/qmainwindowlayout_mac.mm2
-rw-r--r--src/widgets/widgets/qmainwindowlayout_p.h2
-rw-r--r--src/widgets/widgets/qmdiarea.cpp2
-rw-r--r--src/widgets/widgets/qmdiarea.h6
-rw-r--r--src/widgets/widgets/qmdiarea_p.h2
-rw-r--r--src/widgets/widgets/qmdisubwindow.cpp10
-rw-r--r--src/widgets/widgets/qmdisubwindow.h6
-rw-r--r--src/widgets/widgets/qmdisubwindow_p.h2
-rw-r--r--src/widgets/widgets/qmenu.cpp149
-rw-r--r--src/widgets/widgets/qmenu.h15
-rw-r--r--src/widgets/widgets/qmenu_p.h6
-rw-r--r--src/widgets/widgets/qmenu_wince.cpp26
-rw-r--r--src/widgets/widgets/qmenu_wince.rc32
-rw-r--r--src/widgets/widgets/qmenu_wince_resource_p.h5
-rw-r--r--src/widgets/widgets/qmenubar.cpp2
-rw-r--r--src/widgets/widgets/qmenubar.h6
-rw-r--r--src/widgets/widgets/qmenubar_p.h2
-rw-r--r--src/widgets/widgets/qplaintextedit.cpp2
-rw-r--r--src/widgets/widgets/qplaintextedit.h6
-rw-r--r--src/widgets/widgets/qplaintextedit_p.h2
-rw-r--r--src/widgets/widgets/qprogressbar.cpp48
-rw-r--r--src/widgets/widgets/qprogressbar.h9
-rw-r--r--src/widgets/widgets/qpushbutton.cpp2
-rw-r--r--src/widgets/widgets/qpushbutton.h8
-rw-r--r--src/widgets/widgets/qpushbutton_p.h2
-rw-r--r--src/widgets/widgets/qradiobutton.cpp2
-rw-r--r--src/widgets/widgets/qradiobutton.h6
-rw-r--r--src/widgets/widgets/qrubberband.cpp2
-rw-r--r--src/widgets/widgets/qrubberband.h6
-rw-r--r--src/widgets/widgets/qscrollarea.cpp4
-rw-r--r--src/widgets/widgets/qscrollarea.h6
-rw-r--r--src/widgets/widgets/qscrollarea_p.h4
-rw-r--r--src/widgets/widgets/qscrollbar.cpp2
-rw-r--r--src/widgets/widgets/qscrollbar.h6
-rw-r--r--src/widgets/widgets/qscrollbar_p.h2
-rw-r--r--src/widgets/widgets/qsizegrip.cpp2
-rw-r--r--src/widgets/widgets/qsizegrip.h6
-rw-r--r--src/widgets/widgets/qslider.cpp2
-rw-r--r--src/widgets/widgets/qslider.h6
-rw-r--r--src/widgets/widgets/qspinbox.cpp3
-rw-r--r--src/widgets/widgets/qspinbox.h6
-rw-r--r--src/widgets/widgets/qsplashscreen.cpp4
-rw-r--r--src/widgets/widgets/qsplashscreen.h6
-rw-r--r--src/widgets/widgets/qsplitter.cpp4
-rw-r--r--src/widgets/widgets/qsplitter.h6
-rw-r--r--src/widgets/widgets/qsplitter_p.h2
-rw-r--r--src/widgets/widgets/qstackedwidget.cpp2
-rw-r--r--src/widgets/widgets/qstackedwidget.h6
-rw-r--r--src/widgets/widgets/qstatusbar.cpp8
-rw-r--r--src/widgets/widgets/qstatusbar.h6
-rw-r--r--src/widgets/widgets/qtabbar.cpp4
-rw-r--r--src/widgets/widgets/qtabbar.h6
-rw-r--r--src/widgets/widgets/qtabbar_p.h2
-rw-r--r--src/widgets/widgets/qtabwidget.cpp2
-rw-r--r--src/widgets/widgets/qtabwidget.h6
-rw-r--r--src/widgets/widgets/qtextbrowser.cpp31
-rw-r--r--src/widgets/widgets/qtextbrowser.h6
-rw-r--r--src/widgets/widgets/qtextedit.cpp4
-rw-r--r--src/widgets/widgets/qtextedit.h6
-rw-r--r--src/widgets/widgets/qtextedit_p.h2
-rw-r--r--src/widgets/widgets/qtoolbar.cpp2
-rw-r--r--src/widgets/widgets/qtoolbar.h6
-rw-r--r--src/widgets/widgets/qtoolbar_p.h2
-rw-r--r--src/widgets/widgets/qtoolbararealayout.cpp6
-rw-r--r--src/widgets/widgets/qtoolbararealayout_p.h6
-rw-r--r--src/widgets/widgets/qtoolbarextension.cpp2
-rw-r--r--src/widgets/widgets/qtoolbarextension_p.h2
-rw-r--r--src/widgets/widgets/qtoolbarlayout.cpp4
-rw-r--r--src/widgets/widgets/qtoolbarlayout_p.h2
-rw-r--r--src/widgets/widgets/qtoolbarseparator.cpp2
-rw-r--r--src/widgets/widgets/qtoolbarseparator_p.h2
-rw-r--r--src/widgets/widgets/qtoolbox.cpp2
-rw-r--r--src/widgets/widgets/qtoolbox.h6
-rw-r--r--src/widgets/widgets/qtoolbutton.cpp2
-rw-r--r--src/widgets/widgets/qtoolbutton.h6
-rw-r--r--src/widgets/widgets/qwidgetanimator.cpp2
-rw-r--r--src/widgets/widgets/qwidgetanimator_p.h2
-rw-r--r--src/widgets/widgets/qwidgetlinecontrol.cpp2
-rw-r--r--src/widgets/widgets/qwidgetlinecontrol_p.h6
-rw-r--r--src/widgets/widgets/qwidgetresizehandler.cpp2
-rw-r--r--src/widgets/widgets/qwidgetresizehandler_p.h2
-rw-r--r--src/widgets/widgets/qwidgettextcontrol.cpp5
-rw-r--r--src/widgets/widgets/qwidgettextcontrol_p.h6
-rw-r--r--src/widgets/widgets/qwidgettextcontrol_p_p.h2
-rw-r--r--src/widgets/widgets/widgets.pri2
150 files changed, 466 insertions, 521 deletions
diff --git a/src/widgets/widgets/qabstractbutton.cpp b/src/widgets/widgets/qabstractbutton.cpp
index 5e9d100214..3f9b28a883 100644
--- a/src/widgets/widgets/qabstractbutton.cpp
+++ b/src/widgets/widgets/qabstractbutton.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -380,7 +380,7 @@ void QAbstractButtonPrivate::moveFocus(int key)
QAbstractButton *fb = qobject_cast<QAbstractButton *>(f);
if (!fb || !buttonList.contains(fb))
return;
-
+
QAbstractButton *candidate = 0;
int bestScore = -1;
QRect target = f->rect().translated(f->mapToGlobal(QPoint(0,0)));
diff --git a/src/widgets/widgets/qabstractbutton.h b/src/widgets/widgets/qabstractbutton.h
index 9c27e3523f..4732f461e4 100644
--- a/src/widgets/widgets/qabstractbutton.h
+++ b/src/widgets/widgets/qabstractbutton.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -46,8 +46,6 @@
#include <QtGui/qkeysequence.h>
#include <QtWidgets/qwidget.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -155,6 +153,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QABSTRACTBUTTON_H
diff --git a/src/widgets/widgets/qabstractbutton_p.h b/src/widgets/widgets/qabstractbutton_p.h
index 2e347ae933..4585728848 100644
--- a/src/widgets/widgets/qabstractbutton_p.h
+++ b/src/widgets/widgets/qabstractbutton_p.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qabstractscrollarea.cpp b/src/widgets/widgets/qabstractscrollarea.cpp
index 391a06917c..900e95f4da 100644
--- a/src/widgets/widgets/qabstractscrollarea.cpp
+++ b/src/widgets/widgets/qabstractscrollarea.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -452,7 +452,7 @@ void QAbstractScrollAreaPrivate::layoutChildren()
// no corner widget. Also, on the Mac we paint if there is a native
// (transparent) sizegrip in the area where a corner widget would be.
if ((needv && needh && hasCornerWidget == false && scrollOverlap == 0)
- || ((needv || needh)
+ || ((needv || needh)
#ifdef Q_WS_MAC
&& hasMacSizeGrip
#endif
diff --git a/src/widgets/widgets/qabstractscrollarea.h b/src/widgets/widgets/qabstractscrollarea.h
index 79038e9fdd..ccf16b5e5c 100644
--- a/src/widgets/widgets/qabstractscrollarea.h
+++ b/src/widgets/widgets/qabstractscrollarea.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -44,8 +44,6 @@
#include <QtWidgets/qframe.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -140,6 +138,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QABSTRACTSCROLLAREA_H
diff --git a/src/widgets/widgets/qabstractscrollarea_p.h b/src/widgets/widgets/qabstractscrollarea_p.h
index 2766211732..34d767fe29 100644
--- a/src/widgets/widgets/qabstractscrollarea_p.h
+++ b/src/widgets/widgets/qabstractscrollarea_p.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qabstractslider.cpp b/src/widgets/widgets/qabstractslider.cpp
index 5932e1be9b..8c3dedb84f 100644
--- a/src/widgets/widgets/qabstractslider.cpp
+++ b/src/widgets/widgets/qabstractslider.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -724,7 +724,7 @@ bool QAbstractSliderPrivate::scrollByDelta(Qt::Orientation orientation, Qt::Keyb
#else
// Native UI-elements on Mac can scroll hundreds of lines at a time as
// a result of acceleration. So keep the same behaviour in Qt, and
- // don't restrict stepsToScroll to certain maximum (pageStep):
+ // don't restrict stepsToScroll to certain maximum (pageStep):
stepsToScroll = int(offset_accumulated);
#endif
offset_accumulated -= int(offset_accumulated);
diff --git a/src/widgets/widgets/qabstractslider.h b/src/widgets/widgets/qabstractslider.h
index a49970a2d5..82c8f409a0 100644
--- a/src/widgets/widgets/qabstractslider.h
+++ b/src/widgets/widgets/qabstractslider.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -44,8 +44,6 @@
#include <QtWidgets/qwidget.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -163,6 +161,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QABSTRACTSLIDER_H
diff --git a/src/widgets/widgets/qabstractslider_p.h b/src/widgets/widgets/qabstractslider_p.h
index 42f25501b1..35ee934096 100644
--- a/src/widgets/widgets/qabstractslider_p.h
+++ b/src/widgets/widgets/qabstractslider_p.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -87,7 +87,7 @@ public:
QBasicTimer repeatActionTimer;
int repeatActionTime;
QAbstractSlider::SliderAction repeatAction;
-
+
#ifdef QT_KEYPAD_NAVIGATION
int origValue;
diff --git a/src/widgets/widgets/qabstractspinbox.cpp b/src/widgets/widgets/qabstractspinbox.cpp
index 14d22c458b..765dcb8981 100644
--- a/src/widgets/widgets/qabstractspinbox.cpp
+++ b/src/widgets/widgets/qabstractspinbox.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -825,14 +825,13 @@ QSize QAbstractSpinBox::sizeHint() const
ensurePolished();
const QFontMetrics fm(fontMetrics());
- int h = d->edit->sizeHint().height() + 4;
+ int h = d->edit->sizeHint().height();
int w = 0;
QString s;
- s = d->prefix + d->textFromValue(d->minimum) + d->suffix + QLatin1Char(' ');
- s.truncate(18);
+ QString fixedContent = d->prefix + d->suffix + QLatin1Char(' ');
+ s = d->textFromValue(d->minimum) + fixedContent;
w = qMax(w, fm.width(s));
- s = d->prefix + d->textFromValue(d->maximum) + d->suffix + QLatin1Char(' ');
- s.truncate(18);
+ s = d->textFromValue(d->maximum) + fixedContent;
w = qMax(w, fm.width(s));
if (d->specialValueText.size()) {
s = d->specialValueText;
@@ -857,27 +856,29 @@ QSize QAbstractSpinBox::minimumSizeHint() const
{
Q_D(const QAbstractSpinBox);
if (d->cachedMinimumSizeHint.isEmpty()) {
+ //Use the prefix and range to calculate the minimumSizeHint
ensurePolished();
const QFontMetrics fm(fontMetrics());
int h = d->edit->minimumSizeHint().height();
- int w = fm.width(QLatin1String("1000"));
+ int w = 0;
+
+ QString s;
+ QString fixedContent = d->prefix + QLatin1Char(' ');
+ s = d->textFromValue(d->minimum) + fixedContent;
+ w = qMax(w, fm.width(s));
+ s = d->textFromValue(d->maximum) + fixedContent;
+ w = qMax(w, fm.width(s));
+
+ if (d->specialValueText.size()) {
+ s = d->specialValueText;
+ w = qMax(w, fm.width(s));
+ }
w += 2; // cursor blinking space
QStyleOptionSpinBox opt;
initStyleOption(&opt);
QSize hint(w, h);
- QSize extra(35, 6);
- opt.rect.setSize(hint + extra);
- extra += hint - style()->subControlRect(QStyle::CC_SpinBox, &opt,
- QStyle::SC_SpinBoxEditField, this).size();
- // get closer to final result by repeating the calculation
- opt.rect.setSize(hint + extra);
- extra += hint - style()->subControlRect(QStyle::CC_SpinBox, &opt,
- QStyle::SC_SpinBoxEditField, this).size();
- hint += extra;
-
- opt.rect = rect();
d->cachedMinimumSizeHint = style()->sizeFromContents(QStyle::CT_SpinBox, &opt, hint, this)
.expandedTo(QApplication::globalStrut());
@@ -1724,7 +1725,8 @@ void QAbstractSpinBoxPrivate::setRange(const QVariant &min, const QVariant &max)
clearCache();
minimum = min;
maximum = (variantCompare(min, max) < 0 ? max : min);
- cachedSizeHint = QSize(); // minimumSizeHint doesn't care about min/max
+ cachedSizeHint = QSize();
+ cachedMinimumSizeHint = QSize(); // minimumSizeHint cares about min/max
reset();
if (!(bound(value) == value)) {
diff --git a/src/widgets/widgets/qabstractspinbox.h b/src/widgets/widgets/qabstractspinbox.h
index 49cd8f38f1..4f6aad0cde 100644
--- a/src/widgets/widgets/qabstractspinbox.h
+++ b/src/widgets/widgets/qabstractspinbox.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -45,8 +45,6 @@
#include <QtWidgets/qwidget.h>
#include <QtGui/qvalidator.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -175,6 +173,4 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(QAbstractSpinBox::StepEnabled)
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QABSTRACTSPINBOX_H
diff --git a/src/widgets/widgets/qabstractspinbox_p.h b/src/widgets/widgets/qabstractspinbox_p.h
index d4484b7a56..0eeec02abc 100644
--- a/src/widgets/widgets/qabstractspinbox_p.h
+++ b/src/widgets/widgets/qabstractspinbox_p.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qbuttongroup.cpp b/src/widgets/widgets/qbuttongroup.cpp
index 3da81f8360..f22910007f 100644
--- a/src/widgets/widgets/qbuttongroup.cpp
+++ b/src/widgets/widgets/qbuttongroup.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -139,7 +139,7 @@
\fn void QButtonGroup::buttonPressed(QAbstractButton *button)
\since 4.2
- This signal is emitted when the given \a button is pressed down.
+ This signal is emitted when the given \a button is pressed down.
\sa QAbstractButton::pressed()
*/
@@ -158,7 +158,7 @@
\fn void QButtonGroup::buttonReleased(QAbstractButton *button)
\since 4.2
- This signal is emitted when the given \a button is released.
+ This signal is emitted when the given \a button is released.
\sa QAbstractButton::released()
*/
diff --git a/src/widgets/widgets/qbuttongroup.h b/src/widgets/widgets/qbuttongroup.h
index 76ce549d95..84fe26e0df 100644
--- a/src/widgets/widgets/qbuttongroup.h
+++ b/src/widgets/widgets/qbuttongroup.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -44,8 +44,6 @@
#include <QtCore/qobject.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -100,6 +98,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QBUTTONGROUP_H
diff --git a/src/widgets/widgets/qcalendartextnavigator_p.h b/src/widgets/widgets/qcalendartextnavigator_p.h
index b153e4a24e..88bd3c6a71 100644
--- a/src/widgets/widgets/qcalendartextnavigator_p.h
+++ b/src/widgets/widgets/qcalendartextnavigator_p.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qcalendarwidget.cpp b/src/widgets/widgets/qcalendarwidget.cpp
index 0fdf039bc3..82c5a29497 100644
--- a/src/widgets/widgets/qcalendarwidget.cpp
+++ b/src/widgets/widgets/qcalendarwidget.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -2591,7 +2591,7 @@ QCalendarWidget::HorizontalHeaderFormat QCalendarWidget::horizontalHeaderFormat(
}
-/*!
+/*!
\enum QCalendarWidget::VerticalHeaderFormat
This enum type defines the various formats the vertical header can display.
diff --git a/src/widgets/widgets/qcalendarwidget.h b/src/widgets/widgets/qcalendarwidget.h
index 5d4c1722b4..4a4d21ebd6 100644
--- a/src/widgets/widgets/qcalendarwidget.h
+++ b/src/widgets/widgets/qcalendarwidget.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -45,8 +45,6 @@
#include <QtWidgets/qwidget.h>
#include <QtCore/qdatetime.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -191,7 +189,5 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QCALENDARWIDGET_H
diff --git a/src/widgets/widgets/qcheckbox.cpp b/src/widgets/widgets/qcheckbox.cpp
index fb8ed6c890..50d0ab8276 100644
--- a/src/widgets/widgets/qcheckbox.cpp
+++ b/src/widgets/widgets/qcheckbox.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qcheckbox.h b/src/widgets/widgets/qcheckbox.h
index 1bf1bf56a0..9adf5f6567 100644
--- a/src/widgets/widgets/qcheckbox.h
+++ b/src/widgets/widgets/qcheckbox.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -44,8 +44,6 @@
#include <QtWidgets/qabstractbutton.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -92,6 +90,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QCHECKBOX_H
diff --git a/src/widgets/widgets/qcocoatoolbardelegate_mac.mm b/src/widgets/widgets/qcocoatoolbardelegate_mac.mm
index 2b637bc93c..2ea66b0d40 100644
--- a/src/widgets/widgets/qcocoatoolbardelegate_mac.mm
+++ b/src/widgets/widgets/qcocoatoolbardelegate_mac.mm
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qcocoatoolbardelegate_mac_p.h b/src/widgets/widgets/qcocoatoolbardelegate_mac_p.h
index 94534beaac..f74f608660 100644
--- a/src/widgets/widgets/qcocoatoolbardelegate_mac_p.h
+++ b/src/widgets/widgets/qcocoatoolbardelegate_mac_p.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp
index bb57fa336b..6103b9b4c2 100644
--- a/src/widgets/widgets/qcombobox.cpp
+++ b/src/widgets/widgets/qcombobox.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qcombobox.h b/src/widgets/widgets/qcombobox.h
index 0eb5881b93..d167ac7d11 100644
--- a/src/widgets/widgets/qcombobox.h
+++ b/src/widgets/widgets/qcombobox.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -47,8 +47,6 @@
#include <QtCore/qabstractitemmodel.h>
#include <QtCore/qvariant.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
#ifndef QT_NO_COMBOBOX
@@ -280,6 +278,4 @@ inline void QComboBox::insertItem(int aindex, const QString &atext,
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QCOMBOBOX_H
diff --git a/src/widgets/widgets/qcombobox_p.h b/src/widgets/widgets/qcombobox_p.h
index 0004e3d5ab..14cf9e7925 100644
--- a/src/widgets/widgets/qcombobox_p.h
+++ b/src/widgets/widgets/qcombobox_p.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -282,8 +282,8 @@ private:
QComboBox *mCombo;
};
-// Note that this class is intentionally not using QStyledItemDelegate
-// Vista does not use the new theme for combo boxes and there might
+// Note that this class is intentionally not using QStyledItemDelegate
+// Vista does not use the new theme for combo boxes and there might
// be other side effects from using the new class
class QComboBoxDelegate : public QItemDelegate
{ Q_OBJECT
diff --git a/src/widgets/widgets/qcommandlinkbutton.cpp b/src/widgets/widgets/qcommandlinkbutton.cpp
index f9be0053e8..18f7b1784e 100644
--- a/src/widgets/widgets/qcommandlinkbutton.cpp
+++ b/src/widgets/widgets/qcommandlinkbutton.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qcommandlinkbutton.h b/src/widgets/widgets/qcommandlinkbutton.h
index a74d6a7b84..e18fb0a4f0 100644
--- a/src/widgets/widgets/qcommandlinkbutton.h
+++ b/src/widgets/widgets/qcommandlinkbutton.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -44,8 +44,6 @@
#include <QtWidgets/qpushbutton.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -81,6 +79,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QCOMMANDLINKBUTTON
diff --git a/src/widgets/widgets/qdatetimeedit.cpp b/src/widgets/widgets/qdatetimeedit.cpp
index fb64850923..a0bbbbf7c7 100644
--- a/src/widgets/widgets/qdatetimeedit.cpp
+++ b/src/widgets/widgets/qdatetimeedit.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -981,9 +981,9 @@ QSize QDateTimeEdit::sizeHint() const
int h = d->edit->sizeHint().height();
int w = 0;
QString s;
- s = d->textFromValue(d->minimum) + QLatin1String(" ");
+ s = d->textFromValue(d->minimum) + QLatin1Char(' ');
w = qMax<int>(w, fm.width(s));
- s = d->textFromValue(d->maximum) + QLatin1String(" ");
+ s = d->textFromValue(d->maximum) + QLatin1Char(' ');
w = qMax<int>(w, fm.width(s));
if (d->specialValueText.size()) {
s = d->specialValueText;
@@ -1000,19 +1000,8 @@ QSize QDateTimeEdit::sizeHint() const
} else
#endif
{
- QSize extra(35, 6);
QStyleOptionSpinBox opt;
initStyleOption(&opt);
- opt.rect.setSize(hint + extra);
- extra += hint - style()->subControlRect(QStyle::CC_SpinBox, &opt,
- QStyle::SC_SpinBoxEditField, this).size();
- // get closer to final result by repeating the calculation
- opt.rect.setSize(hint + extra);
- extra += hint - style()->subControlRect(QStyle::CC_SpinBox, &opt,
- QStyle::SC_SpinBoxEditField, this).size();
- hint += extra;
-
- opt.rect = rect();
d->cachedSizeHint = style()->sizeFromContents(QStyle::CT_SpinBox, &opt, hint, this)
.expandedTo(QApplication::globalStrut());
}
@@ -1023,6 +1012,7 @@ QSize QDateTimeEdit::sizeHint() const
return d->cachedSizeHint;
}
+
/*!
\reimp
*/
diff --git a/src/widgets/widgets/qdatetimeedit.h b/src/widgets/widgets/qdatetimeedit.h
index d3197632cf..0b6dfb6e28 100644
--- a/src/widgets/widgets/qdatetimeedit.h
+++ b/src/widgets/widgets/qdatetimeedit.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -46,8 +46,6 @@
#include <QtCore/qvariant.h>
#include <QtWidgets/qabstractspinbox.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -235,6 +233,4 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(QDateTimeEdit::Sections)
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QDATETIMEEDIT_H
diff --git a/src/widgets/widgets/qdatetimeedit_p.h b/src/widgets/widgets/qdatetimeedit_p.h
index c8c9cd0e23..143979d4bc 100644
--- a/src/widgets/widgets/qdatetimeedit_p.h
+++ b/src/widgets/widgets/qdatetimeedit_p.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qdial.cpp b/src/widgets/widgets/qdial.cpp
index c7c6c51c53..b415b5254a 100644
--- a/src/widgets/widgets/qdial.cpp
+++ b/src/widgets/widgets/qdial.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qdial.h b/src/widgets/widgets/qdial.h
index c7be201b96..16c4001517 100644
--- a/src/widgets/widgets/qdial.h
+++ b/src/widgets/widgets/qdial.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -45,8 +45,6 @@
#include <QtWidgets/qabstractslider.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -105,6 +103,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QDIAL_H
diff --git a/src/widgets/widgets/qdialogbuttonbox.cpp b/src/widgets/widgets/qdialogbuttonbox.cpp
index 3ebad888a4..bc5d84e259 100644
--- a/src/widgets/widgets/qdialogbuttonbox.cpp
+++ b/src/widgets/widgets/qdialogbuttonbox.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qdialogbuttonbox.h b/src/widgets/widgets/qdialogbuttonbox.h
index 06776bbd93..6715c590e2 100644
--- a/src/widgets/widgets/qdialogbuttonbox.h
+++ b/src/widgets/widgets/qdialogbuttonbox.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -44,8 +44,6 @@
#include <QtWidgets/qwidget.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -162,6 +160,4 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(QDialogButtonBox::StandardButtons)
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QDIALOGBUTTONBOX_H
diff --git a/src/widgets/widgets/qdockarealayout.cpp b/src/widgets/widgets/qdockarealayout.cpp
index 7631014905..ca831f5a39 100644
--- a/src/widgets/widgets/qdockarealayout.cpp
+++ b/src/widgets/widgets/qdockarealayout.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -2004,7 +2004,7 @@ bool QDockAreaLayoutInfo::restoreState(QDataStream &stream, QList<QDockWidget*>
//we need to make sure the element is in the list so the dock widget can eventually be docked correctly
if (!testing)
item_list.append(item);
-
+
//here we need to make sure we change the item in the item_list
QDockAreaLayoutItem &lastItem = testing ? item : item_list.last();
diff --git a/src/widgets/widgets/qdockarealayout_p.h b/src/widgets/widgets/qdockarealayout_p.h
index 53e16911c1..86bf4d32e5 100644
--- a/src/widgets/widgets/qdockarealayout_p.h
+++ b/src/widgets/widgets/qdockarealayout_p.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qdockwidget.cpp b/src/widgets/widgets/qdockwidget.cpp
index a2e363f991..7485644a08 100644
--- a/src/widgets/widgets/qdockwidget.cpp
+++ b/src/widgets/widgets/qdockwidget.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qdockwidget.h b/src/widgets/widgets/qdockwidget.h
index 993ae6b914..ecf8c67e45 100644
--- a/src/widgets/widgets/qdockwidget.h
+++ b/src/widgets/widgets/qdockwidget.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -44,8 +44,6 @@
#include <QtWidgets/qwidget.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -140,6 +138,4 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(QDockWidget::DockWidgetFeatures)
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QDYNAMICDOCKWIDGET_H
diff --git a/src/widgets/widgets/qdockwidget_p.h b/src/widgets/widgets/qdockwidget_p.h
index 7b2e6f97d1..800f523825 100644
--- a/src/widgets/widgets/qdockwidget_p.h
+++ b/src/widgets/widgets/qdockwidget_p.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qeffects.cpp b/src/widgets/widgets/qeffects.cpp
index 8cd944e133..83060bb571 100644
--- a/src/widgets/widgets/qeffects.cpp
+++ b/src/widgets/widgets/qeffects.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -276,7 +276,7 @@ void QAlphaWidget::render()
#endif // Q_OS_WIN
widget->hide();
} else {
- //Since we are faking the visibility of the widget
+ //Since we are faking the visibility of the widget
//we need to unset the hidden state on it before calling show
widget->setAttribute(Qt::WA_WState_Hidden, true);
widget->show();
@@ -541,7 +541,7 @@ void QRollEffect::scroll()
#endif
widget->hide();
} else {
- //Since we are faking the visibility of the widget
+ //Since we are faking the visibility of the widget
//we need to unset the hidden state on it before calling show
widget->setAttribute(Qt::WA_WState_Hidden, true);
widget->show();
diff --git a/src/widgets/widgets/qeffects_p.h b/src/widgets/widgets/qeffects_p.h
index bbf11face4..a96a60a956 100644
--- a/src/widgets/widgets/qeffects_p.h
+++ b/src/widgets/widgets/qeffects_p.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qfocusframe.cpp b/src/widgets/widgets/qfocusframe.cpp
index 02d8d5aae9..70b335bfb1 100644
--- a/src/widgets/widgets/qfocusframe.cpp
+++ b/src/widgets/widgets/qfocusframe.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qfocusframe.h b/src/widgets/widgets/qfocusframe.h
index 2993ed5c7f..e1b0004ffc 100644
--- a/src/widgets/widgets/qfocusframe.h
+++ b/src/widgets/widgets/qfocusframe.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -44,8 +44,6 @@
#include <QtWidgets/qwidget.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -76,6 +74,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QFOCUSFRAME_H
diff --git a/src/widgets/widgets/qfontcombobox.cpp b/src/widgets/widgets/qfontcombobox.cpp
index 1b9a08b0d2..5f929caf03 100644
--- a/src/widgets/widgets/qfontcombobox.cpp
+++ b/src/widgets/widgets/qfontcombobox.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -56,46 +56,33 @@ QT_BEGIN_NAMESPACE
static QFontDatabase::WritingSystem writingSystemForFont(const QFont &font, bool *hasLatin)
{
- *hasLatin = true;
-
QList<QFontDatabase::WritingSystem> writingSystems = QFontDatabase().writingSystems(font.family());
// qDebug() << font.family() << writingSystems;
// this just confuses the algorithm below. Vietnamese is Latin with lots of special chars
- writingSystems.removeAll(QFontDatabase::Vietnamese);
+ writingSystems.removeOne(QFontDatabase::Vietnamese);
+ *hasLatin = writingSystems.removeOne(QFontDatabase::Latin);
+
+ if (writingSystems.isEmpty())
+ return QFontDatabase::Any;
- QFontDatabase::WritingSystem system = QFontDatabase::Any;
+ QFontDatabase::WritingSystem system = writingSystems.last();
- if (!writingSystems.contains(QFontDatabase::Latin)) {
- *hasLatin = false;
+ if (!*hasLatin) {
// we need to show something
- if (writingSystems.count())
- system = writingSystems.last();
- } else {
- writingSystems.removeAll(QFontDatabase::Latin);
+ return system;
}
- if (writingSystems.isEmpty())
+ if (writingSystems.count() == 1 && system > QFontDatabase::Cyrillic)
return system;
- if (writingSystems.count() == 1 && writingSystems.at(0) > QFontDatabase::Cyrillic) {
- system = writingSystems.at(0);
+ if (writingSystems.count() <= 2 && system > QFontDatabase::Armenian && system < QFontDatabase::Vietnamese)
return system;
- }
- if (writingSystems.count() <= 2
- && writingSystems.last() > QFontDatabase::Armenian
- && writingSystems.last() < QFontDatabase::Vietnamese) {
- system = writingSystems.last();
+ if (writingSystems.count() <= 5 && system >= QFontDatabase::SimplifiedChinese && system <= QFontDatabase::Korean)
return system;
- }
- if (writingSystems.count() <= 5
- && writingSystems.last() >= QFontDatabase::SimplifiedChinese
- && writingSystems.last() <= QFontDatabase::Korean)
- system = writingSystems.last();
-
- return system;
+ return QFontDatabase::Any;
}
class QFontFamilyDelegate : public QAbstractItemDelegate
diff --git a/src/widgets/widgets/qfontcombobox.h b/src/widgets/widgets/qfontcombobox.h
index e5e1580cdb..66fc9b4581 100644
--- a/src/widgets/widgets/qfontcombobox.h
+++ b/src/widgets/widgets/qfontcombobox.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -47,8 +47,6 @@
#ifndef QT_NO_FONTCOMBOBOX
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -105,7 +103,5 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(QFontComboBox::FontFilters)
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QT_NO_FONTCOMBOBOX
#endif
diff --git a/src/widgets/widgets/qframe.cpp b/src/widgets/widgets/qframe.cpp
index 3dc30674e2..b7ef2ed3b1 100644
--- a/src/widgets/widgets/qframe.cpp
+++ b/src/widgets/widgets/qframe.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qframe.h b/src/widgets/widgets/qframe.h
index 021d7f5ab0..f121c0d725 100644
--- a/src/widgets/widgets/qframe.h
+++ b/src/widgets/widgets/qframe.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -44,8 +44,6 @@
#include <QtWidgets/qwidget.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -125,6 +123,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QFRAME_H
diff --git a/src/widgets/widgets/qframe_p.h b/src/widgets/widgets/qframe_p.h
index faa170ae94..377f6f942e 100644
--- a/src/widgets/widgets/qframe_p.h
+++ b/src/widgets/widgets/qframe_p.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qgroupbox.cpp b/src/widgets/widgets/qgroupbox.cpp
index 6c8da10b8e..d82f151165 100644
--- a/src/widgets/widgets/qgroupbox.cpp
+++ b/src/widgets/widgets/qgroupbox.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -121,7 +121,7 @@ void QGroupBox::initStyleOption(QStyleOptionGroupBox *option) const
option->state |= QStyle::State_Sunken;
}
- if (!option->palette.isBrushSet(isEnabled() ? QPalette::Active :
+ if (!option->palette.isBrushSet(isEnabled() ? QPalette::Active :
QPalette::Disabled, QPalette::WindowText))
option->textColor = QColor(style()->styleHint(QStyle::SH_GroupBox_TextLabelColor,
option, this));
@@ -229,7 +229,7 @@ void QGroupBoxPrivate::init()
overCheckBox = false;
pressedControl = QStyle::SC_None;
calculateFrame();
- q->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred,
+ q->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred,
QSizePolicy::GroupBox));
}
diff --git a/src/widgets/widgets/qgroupbox.h b/src/widgets/widgets/qgroupbox.h
index d462a574fd..6c18cf8c0f 100644
--- a/src/widgets/widgets/qgroupbox.h
+++ b/src/widgets/widgets/qgroupbox.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -44,8 +44,6 @@
#include <QtWidgets/qframe.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -97,7 +95,7 @@ protected:
void changeEvent(QEvent *event);
void mousePressEvent(QMouseEvent *event);
void mouseMoveEvent(QMouseEvent *event);
- void mouseReleaseEvent(QMouseEvent *event);
+ void mouseReleaseEvent(QMouseEvent *event);
void initStyleOption(QStyleOptionGroupBox *option) const;
@@ -111,6 +109,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QGROUPBOX_H
diff --git a/src/widgets/widgets/qlabel.cpp b/src/widgets/widgets/qlabel.cpp
index a9a9c0cea5..7f2a7684eb 100644
--- a/src/widgets/widgets/qlabel.cpp
+++ b/src/widgets/widgets/qlabel.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -1032,20 +1032,6 @@ void QLabel::paintEvent(QPaintEvent *)
d->ensureTextLayouted();
QAbstractTextDocumentLayout::PaintContext context;
- if (!isEnabled() && !d->control &&
- // We cannot support etched for rich text controls because custom
- // colors and links will override the light palette
- style->styleHint(QStyle::SH_EtchDisabledText, &opt, this)) {
- context.palette = opt.palette;
- context.palette.setColor(QPalette::Text, context.palette.light().color());
- painter.save();
- painter.translate(lr.x() + 1, lr.y() + 1);
- painter.setClipRect(lr.translated(-lr.x() - 1, -lr.y() - 1));
- QAbstractTextDocumentLayout *layout = d->control->document()->documentLayout();
- layout->draw(&painter, context);
- painter.restore();
- }
-
// Adjust the palette
context.palette = opt.palette;
diff --git a/src/widgets/widgets/qlabel.h b/src/widgets/widgets/qlabel.h
index 114d239918..8edb099560 100644
--- a/src/widgets/widgets/qlabel.h
+++ b/src/widgets/widgets/qlabel.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -44,8 +44,6 @@
#include <QtWidgets/qframe.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -164,6 +162,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QLABEL_H
diff --git a/src/widgets/widgets/qlabel_p.h b/src/widgets/widgets/qlabel_p.h
index 2a8958099b..a82ae0653b 100644
--- a/src/widgets/widgets/qlabel_p.h
+++ b/src/widgets/widgets/qlabel_p.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qlcdnumber.cpp b/src/widgets/widgets/qlcdnumber.cpp
index 876acf4c0c..3ba9ad9ba3 100644
--- a/src/widgets/widgets/qlcdnumber.cpp
+++ b/src/widgets/widgets/qlcdnumber.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qlcdnumber.h b/src/widgets/widgets/qlcdnumber.h
index 4495f40f7f..3dde1527f2 100644
--- a/src/widgets/widgets/qlcdnumber.h
+++ b/src/widgets/widgets/qlcdnumber.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -45,8 +45,6 @@
#include <QtWidgets/qframe.h>
#include <QtCore/qbitarray.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -122,6 +120,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QLCDNUMBER_H
diff --git a/src/widgets/widgets/qlineedit.cpp b/src/widgets/widgets/qlineedit.cpp
index 65969a7ebb..ea58ec1429 100644
--- a/src/widgets/widgets/qlineedit.cpp
+++ b/src/widgets/widgets/qlineedit.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -139,9 +139,9 @@ 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. 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.
+ 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
@@ -1758,7 +1758,7 @@ void QLineEdit::focusOutEvent(QFocusEvent *e)
QObject::disconnect(d->control->completer(), 0, this, 0);
}
#endif
- update();
+ QWidget::focusOutEvent(e);
}
/*!\reimp
@@ -1801,7 +1801,7 @@ void QLineEdit::paintEvent(QPaintEvent *)
int minRB = qMax(0, -fm.minRightBearing());
if (d->control->text().isEmpty()) {
- if (!hasFocus() && !d->placeholderText.isEmpty()) {
+ if (!d->placeholderText.isEmpty()) {
QColor col = pal.text().color();
col.setAlpha(128);
QPen oldpen = p.pen();
@@ -1810,7 +1810,6 @@ void QLineEdit::paintEvent(QPaintEvent *)
QString elidedText = fm.elidedText(d->placeholderText, Qt::ElideRight, lineRect.width());
p.drawText(lineRect, va, elidedText);
p.setPen(oldpen);
- return;
}
}
diff --git a/src/widgets/widgets/qlineedit.h b/src/widgets/widgets/qlineedit.h
index af50170d3d..e2b944314b 100644
--- a/src/widgets/widgets/qlineedit.h
+++ b/src/widgets/widgets/qlineedit.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -47,8 +47,6 @@
#include <QtCore/qstring.h>
#include <QtCore/qmargins.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -248,6 +246,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QLINEEDIT_H
diff --git a/src/widgets/widgets/qlineedit_p.cpp b/src/widgets/widgets/qlineedit_p.cpp
index 7f800d831f..1999216e65 100644
--- a/src/widgets/widgets/qlineedit_p.cpp
+++ b/src/widgets/widgets/qlineedit_p.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -180,7 +180,7 @@ void QLineEditPrivate::init(const QString& txt)
#endif
QObject::connect(control, SIGNAL(cursorPositionChanged(int,int)),
q, SLOT(updateMicroFocus()));
-
+
QObject::connect(control, SIGNAL(textChanged(QString)),
q, SLOT(updateMicroFocus()));
diff --git a/src/widgets/widgets/qlineedit_p.h b/src/widgets/widgets/qlineedit_p.h
index 8f1ca48865..4eb35b7dc6 100644
--- a/src/widgets/widgets/qlineedit_p.h
+++ b/src/widgets/widgets/qlineedit_p.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qmaccocoaviewcontainer_mac.h b/src/widgets/widgets/qmaccocoaviewcontainer_mac.h
index 1bb631d296..b89b796819 100644
--- a/src/widgets/widgets/qmaccocoaviewcontainer_mac.h
+++ b/src/widgets/widgets/qmaccocoaviewcontainer_mac.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -44,8 +44,6 @@
#include <QtWidgets/QWidget>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -67,6 +65,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QCOCOAVIEWCONTAINER_H
diff --git a/src/widgets/widgets/qmaccocoaviewcontainer_mac.mm b/src/widgets/widgets/qmaccocoaviewcontainer_mac.mm
index 1eadb62d5c..2be11f34d5 100644
--- a/src/widgets/widgets/qmaccocoaviewcontainer_mac.mm
+++ b/src/widgets/widgets/qmaccocoaviewcontainer_mac.mm
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -112,7 +112,7 @@ QMacCocoaViewContainerPrivate::~QMacCocoaViewContainerPrivate()
/*!
\fn QMacCocoaViewContainer::QMacCocoaViewContainer(void *cocoaViewToWrap, QWidget *parent)
-
+
Create a new QMacCocoaViewContainer using the NSView pointer in \a
cocoaViewToWrap with parent, \a parent. QMacCocoaViewContainer will
retain \a cocoaViewToWrap.
diff --git a/src/widgets/widgets/qmacnativewidget_mac.h b/src/widgets/widgets/qmacnativewidget_mac.h
index 0a227f1756..796d7b38d4 100644
--- a/src/widgets/widgets/qmacnativewidget_mac.h
+++ b/src/widgets/widgets/qmacnativewidget_mac.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -44,8 +44,6 @@
#include <QtWidgets/QWidget>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -68,6 +66,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QMACNATIVEWIDGET_H
diff --git a/src/widgets/widgets/qmacnativewidget_mac.mm b/src/widgets/widgets/qmacnativewidget_mac.mm
index 240bd6d92e..50907b8dfc 100644
--- a/src/widgets/widgets/qmacnativewidget_mac.mm
+++ b/src/widgets/widgets/qmacnativewidget_mac.mm
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qmainwindow.cpp b/src/widgets/widgets/qmainwindow.cpp
index 5bb331a99a..436fb65dd2 100644
--- a/src/widgets/widgets/qmainwindow.cpp
+++ b/src/widgets/widgets/qmainwindow.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qmainwindow.h b/src/widgets/widgets/qmainwindow.h
index d00e75d7ae..d9edf711e0 100644
--- a/src/widgets/widgets/qmainwindow.h
+++ b/src/widgets/widgets/qmainwindow.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -45,8 +45,6 @@
#include <QtWidgets/qwidget.h>
#include <QtWidgets/qtabwidget.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -210,6 +208,4 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(QMainWindow::DockOptions)
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QDYNAMICMAINWINDOW_H
diff --git a/src/widgets/widgets/qmainwindowlayout.cpp b/src/widgets/widgets/qmainwindowlayout.cpp
index 17a3f06e79..cfeb0e2c67 100644
--- a/src/widgets/widgets/qmainwindowlayout.cpp
+++ b/src/widgets/widgets/qmainwindowlayout.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qmainwindowlayout_mac.mm b/src/widgets/widgets/qmainwindowlayout_mac.mm
index 4fea391339..38605c2e09 100644
--- a/src/widgets/widgets/qmainwindowlayout_mac.mm
+++ b/src/widgets/widgets/qmainwindowlayout_mac.mm
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qmainwindowlayout_p.h b/src/widgets/widgets/qmainwindowlayout_p.h
index 50fcf8a15f..f866a554dc 100644
--- a/src/widgets/widgets/qmainwindowlayout_p.h
+++ b/src/widgets/widgets/qmainwindowlayout_p.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qmdiarea.cpp b/src/widgets/widgets/qmdiarea.cpp
index 5135cf6962..b2409e300c 100644
--- a/src/widgets/widgets/qmdiarea.cpp
+++ b/src/widgets/widgets/qmdiarea.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qmdiarea.h b/src/widgets/widgets/qmdiarea.h
index 52278e35aa..87ecd432dc 100644
--- a/src/widgets/widgets/qmdiarea.h
+++ b/src/widgets/widgets/qmdiarea.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -45,8 +45,6 @@
#include <QtWidgets/qabstractscrollarea.h>
#include <QtWidgets/qtabwidget.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -172,7 +170,5 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(QMdiArea::AreaOptions)
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QT_NO_MDIAREA
#endif // QMDIAREA_H
diff --git a/src/widgets/widgets/qmdiarea_p.h b/src/widgets/widgets/qmdiarea_p.h
index 4c953b80ef..90db55438a 100644
--- a/src/widgets/widgets/qmdiarea_p.h
+++ b/src/widgets/widgets/qmdiarea_p.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qmdisubwindow.cpp b/src/widgets/widgets/qmdisubwindow.cpp
index 01ee2528f3..4259f75097 100644
--- a/src/widgets/widgets/qmdisubwindow.cpp
+++ b/src/widgets/widgets/qmdisubwindow.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -183,14 +183,6 @@ static const QStyle::SubControl SubControls[] =
};
static const int NumSubControls = sizeof(SubControls) / sizeof(SubControls[0]);
-static const QStyle::StandardPixmap ButtonPixmaps[] =
-{
- QStyle::SP_TitleBarMinButton,
- QStyle::SP_TitleBarNormalButton,
- QStyle::SP_TitleBarCloseButton
-};
-static const int NumButtonPixmaps = sizeof(ButtonPixmaps) / sizeof(ButtonPixmaps[0]);
-
static const Qt::WindowFlags CustomizeWindowFlags =
Qt::FramelessWindowHint
| Qt::CustomizeWindowHint
diff --git a/src/widgets/widgets/qmdisubwindow.h b/src/widgets/widgets/qmdisubwindow.h
index 9dac7e1ee0..915fef758b 100644
--- a/src/widgets/widgets/qmdisubwindow.h
+++ b/src/widgets/widgets/qmdisubwindow.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -44,8 +44,6 @@
#include <QtWidgets/qwidget.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -151,8 +149,6 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(QMdiSubWindow::SubWindowOptions)
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QT_NO_MDIAREA
#endif // QMDISUBWINDOW_H
diff --git a/src/widgets/widgets/qmdisubwindow_p.h b/src/widgets/widgets/qmdisubwindow_p.h
index 810fd3d27d..90369ff526 100644
--- a/src/widgets/widgets/qmdisubwindow_p.h
+++ b/src/widgets/widgets/qmdisubwindow_p.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qmenu.cpp b/src/widgets/widgets/qmenu.cpp
index 922a38b324..dfa906d2ea 100644
--- a/src/widgets/widgets/qmenu.cpp
+++ b/src/widgets/widgets/qmenu.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -67,6 +67,7 @@
#include "qwidgetaction.h"
#include "qtoolbutton.h"
#include "qpushbutton.h"
+#include "qtooltip.h"
#include <private/qpushbutton_p.h>
#include <private/qaction_p.h>
#include <private/qguiapplication_p.h>
@@ -259,12 +260,15 @@ void QMenuPrivate::updateActionRects(const QRect &screen) const
bool previousWasSeparator = true; // this is true to allow removing the leading separators
for(int i = 0; i <= lastVisibleAction; i++) {
QAction *action = actions.at(i);
+ const bool isSection = action->isSeparator() && (!action->text().isEmpty() || !action->icon().isNull());
+ const bool isPlainSeparator = (isSection && !q->style()->styleHint(QStyle::SH_Menu_SupportsSections))
+ || (action->isSeparator() && !isSection);
if (!action->isVisible() ||
- (collapsibleSeparators && previousWasSeparator && action->isSeparator()))
+ (collapsibleSeparators && previousWasSeparator && isPlainSeparator))
continue; // we continue, this action will get an empty QRect
- previousWasSeparator = action->isSeparator();
+ previousWasSeparator = isPlainSeparator;
//let the style modify the above size..
QStyleOptionMenuItem opt;
@@ -1510,6 +1514,54 @@ QAction *QMenu::addSeparator()
}
/*!
+ \since 5.1
+
+ This convenience function creates a new section action, i.e. an
+ action with QAction::isSeparator() returning true but also
+ having \a text hint, and adds the new action to this menu's list
+ of actions. It returns the newly created action.
+
+ The rendering of the hint is style and platform dependent. Widget
+ styles can use the text information in the rendering for sections,
+ or can choose to ignore it and render sections like simple separators.
+
+ QMenu takes ownership of the returned QAction.
+
+ \sa QWidget::addAction()
+*/
+QAction *QMenu::addSection(const QString &text)
+{
+ QAction *action = new QAction(text, this);
+ action->setSeparator(true);
+ addAction(action);
+ return action;
+}
+
+/*!
+ \since 5.1
+
+ This convenience function creates a new section action, i.e. an
+ action with QAction::isSeparator() returning true but also
+ having \a text and \a icon hints, and adds the new action to this menu's
+ list of actions. It returns the newly created action.
+
+ The rendering of the hints is style and platform dependent. Widget
+ styles can use the text and icon information in the rendering for sections,
+ or can choose to ignore them and render sections like simple separators.
+
+ QMenu takes ownership of the returned QAction.
+
+ \sa QWidget::addAction()
+*/
+QAction *QMenu::addSection(const QIcon &icon, const QString &text)
+{
+ QAction *action = new QAction(icon, text, this);
+ action->setSeparator(true);
+ addAction(action);
+ return action;
+}
+
+/*!
This convenience function inserts \a menu before action \a before
and returns the menus menuAction().
@@ -1541,6 +1593,55 @@ QAction *QMenu::insertSeparator(QAction *before)
}
/*!
+ \since 5.1
+
+ This convenience function creates a new title action, i.e. an
+ action with QAction::isSeparator() returning true but also having
+ \a text hint. The function inserts the newly created action
+ into this menu's list of actions before action \a before and
+ returns it.
+
+ The rendering of the hint is style and platform dependent. Widget
+ styles can use the text information in the rendering for sections,
+ or can choose to ignore it and render sections like simple separators.
+
+ QMenu takes ownership of the returned QAction.
+
+ \sa QWidget::insertAction(), addSection()
+*/
+QAction *QMenu::insertSection(QAction *before, const QString &text)
+{
+ QAction *action = new QAction(text, this);
+ action->setSeparator(true);
+ insertAction(before, action);
+ return action;
+}
+
+/*!
+ \since 5.1
+
+ This convenience function creates a new title action, i.e. an
+ action with QAction::isSeparator() returning true but also having
+ \a text and \a icon hints. The function inserts the newly created action
+ into this menu's list of actions before action \a before and returns it.
+
+ The rendering of the hints is style and platform dependent. Widget
+ styles can use the text and icon information in the rendering for sections,
+ or can choose to ignore them and render sections like simple separators.
+
+ QMenu takes ownership of the returned QAction.
+
+ \sa QWidget::insertAction(), addSection()
+*/
+QAction *QMenu::insertSection(QAction *before, const QIcon &icon, const QString &text)
+{
+ QAction *action = new QAction(icon, text, this);
+ action->setSeparator(true);
+ insertAction(before, action);
+ return action;
+}
+
+/*!
This sets the default action to \a act. The default action may have
a visual cue, depending on the current QStyle. A default action
usually indicates what will happen by default when a drop occurs.
@@ -2368,6 +2469,19 @@ QMenu::event(QEvent *e)
if (d->currentAction)
d->popupAction(d->currentAction, 0, false);
break;
+#ifndef QT_NO_TOOLTIP
+ case QEvent::ToolTip:
+ if (d->toolTipsVisible) {
+ const QHelpEvent *ev = static_cast<const QHelpEvent*>(e);
+ if (const QAction *action = actionAt(ev->pos())) {
+ const QString toolTip = action->d_func()->tooltip;
+ if (!toolTip.isEmpty())
+ QToolTip::showText(ev->globalPos(), toolTip, this);
+ return true;
+ }
+ }
+ break;
+#endif // QT_NO_TOOLTIP
#ifndef QT_NO_WHATSTHIS
case QEvent::QueryWhatsThis:
e->setAccepted(d->whatsThis.size());
@@ -2826,7 +2940,7 @@ QMenu::timerEvent(QTimerEvent *e)
}
}
-void copyActionToPlatformItem(const QAction *action, QPlatformMenuItem* item)
+static void copyActionToPlatformItem(const QAction *action, QPlatformMenuItem* item)
{
item->setText(action->text());
item->setIsSeparator(action->isSeparator());
@@ -2834,6 +2948,7 @@ void copyActionToPlatformItem(const QAction *action, QPlatformMenuItem* item)
item->setIcon(action->icon());
item->setVisible(action->isVisible());
item->setShortcut(action->shortcut());
+ item->setCheckable(action->isCheckable());
item->setChecked(action->isChecked());
item->setFont(action->font());
item->setRole((QPlatformMenuItem::MenuRole) action->menuRole());
@@ -3089,6 +3204,32 @@ void QMenu::setSeparatorsCollapsible(bool collapse)
d->platformMenu->syncSeparatorsCollapsible(collapse);
}
+/*!
+ \property QMenu::toolTipsVisible
+ \since 5.1
+
+ \brief whether tooltips of menu actions should be visible
+
+ This property specifies whether action menu entries show
+ their tooltip.
+
+ By default, this property is false.
+*/
+bool QMenu::toolTipsVisible() const
+{
+ Q_D(const QMenu);
+ return d->toolTipsVisible;
+}
+
+void QMenu::setToolTipsVisible(bool visible)
+{
+ Q_D(QMenu);
+ if (d->toolTipsVisible == visible)
+ return;
+
+ d->toolTipsVisible = visible;
+}
+
QT_END_NAMESPACE
// for private slots
diff --git a/src/widgets/widgets/qmenu.h b/src/widgets/widgets/qmenu.h
index e58e7a231f..518771d846 100644
--- a/src/widgets/widgets/qmenu.h
+++ b/src/widgets/widgets/qmenu.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -51,8 +51,6 @@
#include <windef.h> // for HMENU
#endif
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -72,6 +70,7 @@ private:
Q_PROPERTY(QString title READ title WRITE setTitle)
Q_PROPERTY(QIcon icon READ icon WRITE setIcon)
Q_PROPERTY(bool separatorsCollapsible READ separatorsCollapsible WRITE setSeparatorsCollapsible)
+ Q_PROPERTY(bool toolTipsVisible READ toolTipsVisible WRITE setToolTipsVisible)
public:
explicit QMenu(QWidget *parent = 0);
@@ -94,8 +93,13 @@ public:
QAction *addSeparator();
+ QAction *addSection(const QString &text);
+ QAction *addSection(const QIcon &icon, const QString &text);
+
QAction *insertMenu(QAction *before, QMenu *menu);
QAction *insertSeparator(QAction *before);
+ QAction *insertSection(QAction *before, const QString &text);
+ QAction *insertSection(QAction *before, const QIcon &icon, const QString &text);
bool isEmpty() const;
void clear();
@@ -141,6 +145,9 @@ public:
bool separatorsCollapsible() const;
void setSeparatorsCollapsible(bool collapse);
+ bool toolTipsVisible() const;
+ void setToolTipsVisible(bool visible);
+
Q_SIGNALS:
void aboutToShow();
void aboutToHide();
@@ -201,6 +208,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QMENU_H
diff --git a/src/widgets/widgets/qmenu_p.h b/src/widgets/widgets/qmenu_p.h
index 0b8137cff3..6cc88c56e2 100644
--- a/src/widgets/widgets/qmenu_p.h
+++ b/src/widgets/widgets/qmenu_p.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -84,7 +84,8 @@ class QMenuPrivate : public QWidgetPrivate
Q_DECLARE_PUBLIC(QMenu)
public:
QMenuPrivate() : itemsDirty(0), maxIconWidth(0), tabWidth(0), ncols(0),
- collapsibleSeparators(true), activationRecursionGuard(false), hasHadMouse(0), aboutToHide(0), motions(0),
+ collapsibleSeparators(true), toolTipsVisible(false),
+ activationRecursionGuard(false), hasHadMouse(0), aboutToHide(0), motions(0),
currentAction(0),
#ifdef QT_KEYPAD_NAVIGATION
selectAction(0),
@@ -123,6 +124,7 @@ public:
QRect popupGeometry(int screen = -1) const;
mutable uint ncols : 4; //4 bits is probably plenty
uint collapsibleSeparators : 1;
+ uint toolTipsVisible : 1;
QSize adjustMenuSizeForScreen(const QRect & screen);
int getLastVisibleAction() const;
diff --git a/src/widgets/widgets/qmenu_wince.cpp b/src/widgets/widgets/qmenu_wince.cpp
index 68a2022e97..a82cc4abb9 100644
--- a/src/widgets/widgets/qmenu_wince.cpp
+++ b/src/widgets/widgets/qmenu_wince.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -116,14 +116,14 @@ static void resolveAygLibs()
}
}
-static void qt_wce_enable_soft_key(HWND handle, uint command)
+static void qt_wce_enable_soft_key(HWND handle, uint command)
{
resolveAygLibs();
if (ptrEnableSoftKey)
ptrEnableSoftKey(handle, command, false, true);
}
-static void qt_wce_disable_soft_key(HWND handle, uint command)
+static void qt_wce_disable_soft_key(HWND handle, uint command)
{
resolveAygLibs();
if (ptrEnableSoftKey)
@@ -148,7 +148,7 @@ static QAction* qt_wce_get_quit_action(QList<QAction *> actionItems)
QAction *action = actionItems.at(i);
if (action->menuRole() == QAction::QuitRole)
returnAction = action;
- else
+ else
if (action->menu())
returnAction = qt_wce_get_quit_action(action->menu()->actions());
if (returnAction)
@@ -252,7 +252,7 @@ static void qt_wce_insert_action(HMENU menu, QWceMenuAction *action)
if (action->action->isCheckable())
if (action->action->isChecked())
CheckMenuItem(menu, action->command, MF_BYCOMMAND | MF_CHECKED);
- else
+ else
CheckMenuItem(menu, action->command, MF_BYCOMMAND | MF_UNCHECKED);
}
}
@@ -264,8 +264,8 @@ static void qt_wce_clear_menu(HMENU hMenu)
}
/*!
- \internal
-
+ \internal
+
This function refreshes the native Windows CE menu.
*/
@@ -281,8 +281,8 @@ void QMenuBarPrivate::wceRefresh()
}
/*!
- \internal
-
+ \internal
+
This function sends native Windows CE commands to Qt menus.
*/
@@ -293,8 +293,8 @@ QAction* QMenu::wceCommands(uint command)
}
/*!
- \internal
-
+ \internal
+
This function sends native Windows CE commands to Qt menu bars
and all their child menus.
*/
@@ -457,7 +457,7 @@ void QMenuPrivate::QWceMenuPrivate::addAction(QWceMenuAction *action, QWceMenuAc
/*!
\internal
-
+
This function will return the HMENU used to create the native
Windows CE menu bar bindings.
*/
@@ -642,7 +642,7 @@ void QMenuBarPrivate::QWceMenuBarPrivate::rebuild()
qt_wce_rename_menu_item(menubarHandle, leftButtonCommand, leftButtonAction->text());
qt_wce_enable_soft_key(menubarHandle, leftButtonCommand);
} else {
- qt_wce_rename_menu_item(menubarHandle, leftButtonCommand, QLatin1String(""));
+ qt_wce_rename_menu_item(menubarHandle, leftButtonCommand, QLatin1String(""));
qt_wce_disable_soft_key(menubarHandle, leftButtonCommand);
}
} else {
diff --git a/src/widgets/widgets/qmenu_wince.rc b/src/widgets/widgets/qmenu_wince.rc
index 631cd9d47a..0bcd32c7e5 100644
--- a/src/widgets/widgets/qmenu_wince.rc
+++ b/src/widgets/widgets/qmenu_wince.rc
@@ -14,19 +14,19 @@
#define I_IMAGENONE (-2)
#define NOMENU 0xFFFF
-IDR_MAIN_MENU MENU DISCARDABLE
+IDR_MAIN_MENU MENU DISCARDABLE
BEGIN
POPUP "Menu"
BEGIN
- MENUITEM "About", IDM_ABOUT
+ MENUITEM "About", IDM_ABOUT
END
END
-IDR_MAIN_MENU2 MENU DISCARDABLE
+IDR_MAIN_MENU2 MENU DISCARDABLE
BEGIN
POPUP "Menu"
BEGIN
- MENUITEM "About", IDM_ABOUT
+ MENUITEM "About", IDM_ABOUT
END
POPUP "Display"
BEGIN
@@ -35,7 +35,7 @@ BEGIN
END
-IDR_MAIN_MENU3 MENU DISCARDABLE
+IDR_MAIN_MENU3 MENU DISCARDABLE
BEGIN
POPUP "Menu1"
BEGIN
@@ -55,7 +55,7 @@ BEGIN
END
END
-IDR_MAIN_MENU4 MENU DISCARDABLE
+IDR_MAIN_MENU4 MENU DISCARDABLE
BEGIN
POPUP "Menu1"
BEGIN
@@ -83,7 +83,7 @@ BEGIN
END
END
-IDR_MAIN_MENU5 MENU DISCARDABLE
+IDR_MAIN_MENU5 MENU DISCARDABLE
BEGIN
POPUP "Menu1"
BEGIN
@@ -119,8 +119,8 @@ BEGIN
END
END
-STRINGTABLE
-BEGIN
+STRINGTABLE
+BEGIN
IDS_EXIT "Exit"
IDS_MENU "Menu"
IDS_LEFTMENU "Display"
@@ -136,31 +136,31 @@ END
IDR_MAIN_MENU SHMENUBAR DISCARDABLE
BEGIN
- IDR_MAIN_MENU,
+ IDR_MAIN_MENU,
2,
I_IMAGENONE, IDM_EXIT, TBSTATE_ENABLED, TBSTYLE_BUTTON | TBSTYLE_AUTOSIZE,
IDS_EXIT, 0, NOMENU,
-
+
I_IMAGENONE, IDM_MENU, TBSTATE_ENABLED, TBSTYLE_DROPDOWN | TBSTYLE_AUTOSIZE,
IDS_MENU, 0, 0,
END
IDR_MAIN_MENU2 SHMENUBAR DISCARDABLE
BEGIN
- IDR_MAIN_MENU2,
+ IDR_MAIN_MENU2,
2,
I_IMAGENONE, IDM_LEFTMENU, TBSTATE_ENABLED, TBSTYLE_DROPDOWN | TBSTYLE_AUTOSIZE,
IDS_LEFTMENU, 0, 1,
-
+
I_IMAGENONE, IDM_MENU, TBSTATE_ENABLED, TBSTYLE_DROPDOWN | TBSTYLE_AUTOSIZE,
IDS_MENU, 0, 0,
END
IDR_MAIN_MENU3 SHMENUBAR DISCARDABLE
BEGIN
- IDR_MAIN_MENU3,
+ IDR_MAIN_MENU3,
4,
I_IMAGENONE, IDM_MENU1, TBSTATE_ENABLED, TBSTYLE_DROPDOWN | TBSTYLE_AUTOSIZE,
@@ -178,7 +178,7 @@ END
IDR_MAIN_MENU4 SHMENUBAR DISCARDABLE
BEGIN
- IDR_MAIN_MENU4,
+ IDR_MAIN_MENU4,
6,
I_IMAGENONE, IDM_MENU1, TBSTATE_ENABLED, TBSTYLE_DROPDOWN | TBSTYLE_AUTOSIZE,
@@ -202,7 +202,7 @@ END
IDR_MAIN_MENU5 SHMENUBAR DISCARDABLE
BEGIN
- IDR_MAIN_MENU5,
+ IDR_MAIN_MENU5,
8,
I_IMAGENONE, IDM_MENU1, TBSTATE_ENABLED, TBSTYLE_DROPDOWN | TBSTYLE_AUTOSIZE,
diff --git a/src/widgets/widgets/qmenu_wince_resource_p.h b/src/widgets/widgets/qmenu_wince_resource_p.h
index c3ec386780..3ecf05a02a 100644
--- a/src/widgets/widgets/qmenu_wince_resource_p.h
+++ b/src/widgets/widgets/qmenu_wince_resource_p.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -50,7 +50,6 @@
// We mean it.
//
-QT_BEGIN_HEADER
#define IDR_MAIN_MENU 102
#define IDR_MAIN_MENU2 103
@@ -90,5 +89,3 @@ QT_BEGIN_HEADER
#define IDM_MENU7 40009
#define IDM_MENU8 40010
-QT_END_HEADER
-
diff --git a/src/widgets/widgets/qmenubar.cpp b/src/widgets/widgets/qmenubar.cpp
index 5fdd505f16..f22c48b26f 100644
--- a/src/widgets/widgets/qmenubar.cpp
+++ b/src/widgets/widgets/qmenubar.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qmenubar.h b/src/widgets/widgets/qmenubar.h
index 4b850ca3fe..e88a0c07c0 100644
--- a/src/widgets/widgets/qmenubar.h
+++ b/src/widgets/widgets/qmenubar.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -44,8 +44,6 @@
#include <QtWidgets/qmenu.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -159,6 +157,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QMENUBAR_H
diff --git a/src/widgets/widgets/qmenubar_p.h b/src/widgets/widgets/qmenubar_p.h
index b39d370c76..817df945c5 100644
--- a/src/widgets/widgets/qmenubar_p.h
+++ b/src/widgets/widgets/qmenubar_p.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qplaintextedit.cpp b/src/widgets/widgets/qplaintextedit.cpp
index 8f00201e70..95271adeb0 100644
--- a/src/widgets/widgets/qplaintextedit.cpp
+++ b/src/widgets/widgets/qplaintextedit.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qplaintextedit.h b/src/widgets/widgets/qplaintextedit.h
index 1e9fc373bb..42e8288cf3 100644
--- a/src/widgets/widgets/qplaintextedit.h
+++ b/src/widgets/widgets/qplaintextedit.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -53,8 +53,6 @@
#ifndef QT_NO_TEXTEDIT
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -319,8 +317,6 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QT_NO_TEXTEDIT
diff --git a/src/widgets/widgets/qplaintextedit_p.h b/src/widgets/widgets/qplaintextedit_p.h
index 6173234f5a..ab464676e5 100644
--- a/src/widgets/widgets/qplaintextedit_p.h
+++ b/src/widgets/widgets/qplaintextedit_p.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qprogressbar.cpp b/src/widgets/widgets/qprogressbar.cpp
index 72e937b604..e317933e4d 100644
--- a/src/widgets/widgets/qprogressbar.cpp
+++ b/src/widgets/widgets/qprogressbar.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -41,6 +41,7 @@
#include "qprogressbar.h"
#ifndef QT_NO_PROGRESSBAR
+#include <qlocale.h>
#include <qevent.h>
#include <qpainter.h>
#include <qstylepainter.h>
@@ -61,6 +62,7 @@ public:
QProgressBarPrivate();
void init();
+ void initDefaultFormat();
inline void resetLayoutItemMargins();
int minimum;
@@ -68,6 +70,7 @@ public:
int value;
Qt::Alignment alignment;
uint textVisible : 1;
+ uint defaultFormat: 1;
int lastPaintedValue;
Qt::Orientation orientation;
bool invertedAppearance;
@@ -79,9 +82,16 @@ public:
QProgressBarPrivate::QProgressBarPrivate()
: minimum(0), maximum(100), value(-1), alignment(Qt::AlignLeft), textVisible(true),
- lastPaintedValue(-1), orientation(Qt::Horizontal), invertedAppearance(false),
- textDirection(QProgressBar::TopToBottom), format(QLatin1String("%p%"))
+ defaultFormat(true), lastPaintedValue(-1), orientation(Qt::Horizontal), invertedAppearance(false),
+ textDirection(QProgressBar::TopToBottom)
{
+ initDefaultFormat();
+}
+
+void QProgressBarPrivate::initDefaultFormat()
+{
+ if (defaultFormat)
+ format = QLatin1String("%p") + locale.percent();
}
void QProgressBarPrivate::init()
@@ -466,19 +476,21 @@ QString QProgressBar::text() const
qint64 totalSteps = qint64(d->maximum) - d->minimum;
QString result = d->format;
- result.replace(QLatin1String("%m"), QString::number(totalSteps));
- result.replace(QLatin1String("%v"), QString::number(d->value));
+ QLocale locale = d->locale; // Omit group separators for compatibility with previous versions that were non-localized.
+ locale.setNumberOptions(locale.numberOptions() | QLocale::OmitGroupSeparator);
+ result.replace(QLatin1String("%m"), locale.toString(totalSteps));
+ result.replace(QLatin1String("%v"), locale.toString(d->value));
// If max and min are equal and we get this far, it means that the
// progress bar has one step and that we are on that step. Return
// 100% here in order to avoid division by zero further down.
if (totalSteps == 0) {
- result.replace(QLatin1String("%p"), QString::number(100));
+ result.replace(QLatin1String("%p"), locale.toString(int(100)));
return result;
}
int progress = (qreal(d->value) - d->minimum) * 100.0 / totalSteps;
- result.replace(QLatin1String("%p"), QString::number(progress));
+ result.replace(QLatin1String("%p"), locale.toString(progress));
return result;
}
@@ -568,12 +580,19 @@ QProgressBar::Direction QProgressBar::textDirection() const
bool QProgressBar::event(QEvent *e)
{
Q_D(QProgressBar);
- if (e->type() == QEvent::StyleChange
+ switch (e->type()) {
+ case QEvent::StyleChange:
#ifdef Q_OS_MAC
- || e->type() == QEvent::MacSizeChange
+ case QEvent::MacSizeChange:
#endif
- )
d->resetLayoutItemMargins();
+ break;
+ case QEvent::LocaleChange:
+ d->initDefaultFormat();
+ break;
+ default:
+ break;
+ }
return QWidget::event(e);
}
@@ -596,6 +615,15 @@ void QProgressBar::setFormat(const QString &format)
if (d->format == format)
return;
d->format = format;
+ d->defaultFormat = false;
+ update();
+}
+
+void QProgressBar::resetFormat()
+{
+ Q_D(QProgressBar);
+ d->defaultFormat = true;
+ d->initDefaultFormat();
update();
}
diff --git a/src/widgets/widgets/qprogressbar.h b/src/widgets/widgets/qprogressbar.h
index a1b0fcee1d..2f66aaad9e 100644
--- a/src/widgets/widgets/qprogressbar.h
+++ b/src/widgets/widgets/qprogressbar.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -44,8 +44,6 @@
#include <QtWidgets/qframe.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -67,7 +65,7 @@ class Q_WIDGETS_EXPORT QProgressBar : public QWidget
Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation)
Q_PROPERTY(bool invertedAppearance READ invertedAppearance WRITE setInvertedAppearance)
Q_PROPERTY(Direction textDirection READ textDirection WRITE setTextDirection)
- Q_PROPERTY(QString format READ format WRITE setFormat)
+ Q_PROPERTY(QString format READ format WRITE setFormat RESET resetFormat)
public:
enum Direction { TopToBottom, BottomToTop };
@@ -98,6 +96,7 @@ public:
QProgressBar::Direction textDirection() const;
void setFormat(const QString &format);
+ void resetFormat();
QString format() const;
public Q_SLOTS:
@@ -125,6 +124,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QPROGRESSBAR_H
diff --git a/src/widgets/widgets/qpushbutton.cpp b/src/widgets/widgets/qpushbutton.cpp
index 139e3949d1..a10d726e36 100644
--- a/src/widgets/widgets/qpushbutton.cpp
+++ b/src/widgets/widgets/qpushbutton.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qpushbutton.h b/src/widgets/widgets/qpushbutton.h
index 3aa3673478..7806e96763 100644
--- a/src/widgets/widgets/qpushbutton.h
+++ b/src/widgets/widgets/qpushbutton.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -44,8 +44,6 @@
#include <QtWidgets/qabstractbutton.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -105,13 +103,11 @@ public:
private:
Q_DISABLE_COPY(QPushButton)
Q_DECLARE_PRIVATE(QPushButton)
-#ifndef QT_NO_MENU
+#ifndef QT_NO_MENU
Q_PRIVATE_SLOT(d_func(), void _q_popupPressed())
#endif
};
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QPUSHBUTTON_H
diff --git a/src/widgets/widgets/qpushbutton_p.h b/src/widgets/widgets/qpushbutton_p.h
index 803bb0c4ac..93069d295f 100644
--- a/src/widgets/widgets/qpushbutton_p.h
+++ b/src/widgets/widgets/qpushbutton_p.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qradiobutton.cpp b/src/widgets/widgets/qradiobutton.cpp
index 1195b5fad4..7bc57df12b 100644
--- a/src/widgets/widgets/qradiobutton.cpp
+++ b/src/widgets/widgets/qradiobutton.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qradiobutton.h b/src/widgets/widgets/qradiobutton.h
index 13a73ba3c9..104d4a12e0 100644
--- a/src/widgets/widgets/qradiobutton.h
+++ b/src/widgets/widgets/qradiobutton.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -44,8 +44,6 @@
#include <QtWidgets/qabstractbutton.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -79,6 +77,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QRADIOBUTTON_H
diff --git a/src/widgets/widgets/qrubberband.cpp b/src/widgets/widgets/qrubberband.cpp
index 2adc81fd3e..112a9b66cd 100644
--- a/src/widgets/widgets/qrubberband.cpp
+++ b/src/widgets/widgets/qrubberband.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qrubberband.h b/src/widgets/widgets/qrubberband.h
index 34962e52cc..b603415d1a 100644
--- a/src/widgets/widgets/qrubberband.h
+++ b/src/widgets/widgets/qrubberband.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -44,8 +44,6 @@
#include <QtWidgets/qwidget.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -98,6 +96,4 @@ inline void QRubberBand::move(int ax, int ay)
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QRUBBERBAND_H
diff --git a/src/widgets/widgets/qscrollarea.cpp b/src/widgets/widgets/qscrollarea.cpp
index 590225e850..93c335c56b 100644
--- a/src/widgets/widgets/qscrollarea.cpp
+++ b/src/widgets/widgets/qscrollarea.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -240,7 +240,7 @@ QWidget *QScrollArea::widget() const
The \a widget becomes a child of the scroll area, and will be
destroyed when the scroll area is deleted or when a new widget is
set.
-
+
The widget's \l{QWidget::setAutoFillBackground()}{autoFillBackground}
property will be set to \c{true}.
diff --git a/src/widgets/widgets/qscrollarea.h b/src/widgets/widgets/qscrollarea.h
index 18a9fac598..576c9bc9e0 100644
--- a/src/widgets/widgets/qscrollarea.h
+++ b/src/widgets/widgets/qscrollarea.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -44,8 +44,6 @@
#include <QtWidgets/qabstractscrollarea.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -95,6 +93,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QSCROLLAREA_H
diff --git a/src/widgets/widgets/qscrollarea_p.h b/src/widgets/widgets/qscrollarea_p.h
index ee38221877..919d1c8df2 100644
--- a/src/widgets/widgets/qscrollarea_p.h
+++ b/src/widgets/widgets/qscrollarea_p.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -53,6 +53,8 @@
// We mean it.
//
+#include <QtCore/qglobal.h>
+
#ifndef QT_NO_SCROLLAREA
#include "private/qabstractscrollarea_p.h"
diff --git a/src/widgets/widgets/qscrollbar.cpp b/src/widgets/widgets/qscrollbar.cpp
index bddef57f5d..e1e2723a2d 100644
--- a/src/widgets/widgets/qscrollbar.cpp
+++ b/src/widgets/widgets/qscrollbar.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qscrollbar.h b/src/widgets/widgets/qscrollbar.h
index e9514c59a9..27d0169b40 100644
--- a/src/widgets/widgets/qscrollbar.h
+++ b/src/widgets/widgets/qscrollbar.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -45,8 +45,6 @@
#include <QtWidgets/qwidget.h>
#include <QtWidgets/qabstractslider.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -94,6 +92,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QSCROLLBAR_H
diff --git a/src/widgets/widgets/qscrollbar_p.h b/src/widgets/widgets/qscrollbar_p.h
index 75fea46e04..c62c337a40 100644
--- a/src/widgets/widgets/qscrollbar_p.h
+++ b/src/widgets/widgets/qscrollbar_p.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qsizegrip.cpp b/src/widgets/widgets/qsizegrip.cpp
index 0b9341de58..106a8d770a 100644
--- a/src/widgets/widgets/qsizegrip.cpp
+++ b/src/widgets/widgets/qsizegrip.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qsizegrip.h b/src/widgets/widgets/qsizegrip.h
index c79e4716da..11dadfa306 100644
--- a/src/widgets/widgets/qsizegrip.h
+++ b/src/widgets/widgets/qsizegrip.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -44,8 +44,6 @@
#include <QtWidgets/qwidget.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -83,6 +81,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QSIZEGRIP_H
diff --git a/src/widgets/widgets/qslider.cpp b/src/widgets/widgets/qslider.cpp
index f10a693117..2d91cd07e6 100644
--- a/src/widgets/widgets/qslider.cpp
+++ b/src/widgets/widgets/qslider.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qslider.h b/src/widgets/widgets/qslider.h
index 460d52e57c..a8d7019c1f 100644
--- a/src/widgets/widgets/qslider.h
+++ b/src/widgets/widgets/qslider.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -44,8 +44,6 @@
#include <QtWidgets/qabstractslider.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -106,6 +104,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QSLIDER_H
diff --git a/src/widgets/widgets/qspinbox.cpp b/src/widgets/widgets/qspinbox.cpp
index e61c1c877a..0ce5473ad8 100644
--- a/src/widgets/widgets/qspinbox.cpp
+++ b/src/widgets/widgets/qspinbox.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -268,6 +268,7 @@ void QSpinBox::setPrefix(const QString &prefix)
d->updateEdit();
d->cachedSizeHint = QSize();
+ d->cachedMinimumSizeHint = QSize(); // minimumSizeHint cares about the prefix
updateGeometry();
}
diff --git a/src/widgets/widgets/qspinbox.h b/src/widgets/widgets/qspinbox.h
index 7be16f460b..4963f87a1a 100644
--- a/src/widgets/widgets/qspinbox.h
+++ b/src/widgets/widgets/qspinbox.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -44,8 +44,6 @@
#include <QtWidgets/qabstractspinbox.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -172,6 +170,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QSPINBOX_H
diff --git a/src/widgets/widgets/qsplashscreen.cpp b/src/widgets/widgets/qsplashscreen.cpp
index 3711b2f43e..746c02e4e2 100644
--- a/src/widgets/widgets/qsplashscreen.cpp
+++ b/src/widgets/widgets/qsplashscreen.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -80,7 +80,7 @@ public:
be shown during application startup.
\inmodule QtWidgets
-
+
A splash screen is a widget that is usually displayed when an
application is being started. Splash screens are often used for
applications that have long start up times (e.g. database or
diff --git a/src/widgets/widgets/qsplashscreen.h b/src/widgets/widgets/qsplashscreen.h
index af97a38cf8..a1af8e45ef 100644
--- a/src/widgets/widgets/qsplashscreen.h
+++ b/src/widgets/widgets/qsplashscreen.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -45,8 +45,6 @@
#include <QtGui/qpixmap.h>
#include <QtWidgets/qwidget.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -88,6 +86,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QSPLASHSCREEN_H
diff --git a/src/widgets/widgets/qsplitter.cpp b/src/widgets/widgets/qsplitter.cpp
index a8399ed8d5..031763b80c 100644
--- a/src/widgets/widgets/qsplitter.cpp
+++ b/src/widgets/widgets/qsplitter.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -1665,7 +1665,7 @@ bool QSplitter::restoreState(const QByteArray &state)
have a stretch factor of \a stretch.
\a stretch is not the effective stretch factor; the effective
- stretch factor is calculated by taking the initial size of the
+ stretch factor is calculated by taking the initial size of the
widget and multiplying it with \a stretch.
This function is provided for convenience. It is equivalent to
diff --git a/src/widgets/widgets/qsplitter.h b/src/widgets/widgets/qsplitter.h
index 79785b257e..ed4102d31e 100644
--- a/src/widgets/widgets/qsplitter.h
+++ b/src/widgets/widgets/qsplitter.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -45,8 +45,6 @@
#include <QtWidgets/qframe.h>
#include <QtWidgets/qsizepolicy.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -170,6 +168,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QSPLITTER_H
diff --git a/src/widgets/widgets/qsplitter_p.h b/src/widgets/widgets/qsplitter_p.h
index e829fd2f69..f1e050b8f6 100644
--- a/src/widgets/widgets/qsplitter_p.h
+++ b/src/widgets/widgets/qsplitter_p.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qstackedwidget.cpp b/src/widgets/widgets/qstackedwidget.cpp
index 4dd11a00b8..4b7170a596 100644
--- a/src/widgets/widgets/qstackedwidget.cpp
+++ b/src/widgets/widgets/qstackedwidget.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qstackedwidget.h b/src/widgets/widgets/qstackedwidget.h
index 451de7fe40..a147577ba6 100644
--- a/src/widgets/widgets/qstackedwidget.h
+++ b/src/widgets/widgets/qstackedwidget.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -44,8 +44,6 @@
#include <QtWidgets/qframe.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -94,6 +92,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QSTACKEDWIDGET_H
diff --git a/src/widgets/widgets/qstatusbar.cpp b/src/widgets/widgets/qstatusbar.cpp
index 880ddfaf35..86fd10699c 100644
--- a/src/widgets/widgets/qstatusbar.cpp
+++ b/src/widgets/widgets/qstatusbar.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -534,7 +534,7 @@ void QStatusBar::reformat()
}
/*!
-
+
Hides the normal status indications and displays the given \a
message for the specified number of milli-seconds (\a{timeout}). If
\a{timeout} is 0 (default), the \a {message} remains displayed until
@@ -744,7 +744,7 @@ bool QStatusBar::event(QEvent *e)
}
}
}
-
+
// On Mac OS X Leopard it is possible to drag the window by clicking
// on the tool bar on most applications.
#ifndef Q_WS_MAC
@@ -755,7 +755,7 @@ bool QStatusBar::event(QEvent *e)
// Enable drag-click only if the status bar is the status bar for a
// QMainWindow with a unifed toolbar.
- if (parent() == 0 || qobject_cast<QMainWindow *>(parent()) == 0 ||
+ if (parent() == 0 || qobject_cast<QMainWindow *>(parent()) == 0 ||
qobject_cast<QMainWindow *>(parent())->unifiedTitleAndToolBarOnMac() == false )
return QWidget::event(e);
diff --git a/src/widgets/widgets/qstatusbar.h b/src/widgets/widgets/qstatusbar.h
index de3982cffd..4a5b1ee494 100644
--- a/src/widgets/widgets/qstatusbar.h
+++ b/src/widgets/widgets/qstatusbar.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -44,8 +44,6 @@
#include <QtWidgets/qwidget.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -101,6 +99,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QSTATUSBAR_H
diff --git a/src/widgets/widgets/qtabbar.cpp b/src/widgets/widgets/qtabbar.cpp
index e0ea3e798d..b975035dcf 100644
--- a/src/widgets/widgets/qtabbar.cpp
+++ b/src/widgets/widgets/qtabbar.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -80,7 +80,7 @@ inline static bool verticalTabs(QTabBar::Shape shape)
void QTabBarPrivate::updateMacBorderMetrics()
{
-#if (defined Q_WS_MAC) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
+#if defined(Q_WS_MAC)
if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_5) {
Q_Q(QTabBar);
::HIContentBorderMetrics metrics;
diff --git a/src/widgets/widgets/qtabbar.h b/src/widgets/widgets/qtabbar.h
index 0bb10c2aa9..72c19ab520 100644
--- a/src/widgets/widgets/qtabbar.h
+++ b/src/widgets/widgets/qtabbar.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -44,8 +44,6 @@
#include <QtWidgets/qwidget.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -212,6 +210,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QTABBAR_H
diff --git a/src/widgets/widgets/qtabbar_p.h b/src/widgets/widgets/qtabbar_p.h
index 2dc7569d27..7468144146 100644
--- a/src/widgets/widgets/qtabbar_p.h
+++ b/src/widgets/widgets/qtabbar_p.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qtabwidget.cpp b/src/widgets/widgets/qtabwidget.cpp
index 2f0acc3ea4..4df55e2537 100644
--- a/src/widgets/widgets/qtabwidget.cpp
+++ b/src/widgets/widgets/qtabwidget.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qtabwidget.h b/src/widgets/widgets/qtabwidget.h
index 54bf1e638d..1a1eb2ef2b 100644
--- a/src/widgets/widgets/qtabwidget.h
+++ b/src/widgets/widgets/qtabwidget.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -45,8 +45,6 @@
#include <QtWidgets/qwidget.h>
#include <QtGui/qicon.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -181,6 +179,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QTABWIDGET_H
diff --git a/src/widgets/widgets/qtextbrowser.cpp b/src/widgets/widgets/qtextbrowser.cpp
index 61e7a5fbfb..e05da51207 100644
--- a/src/widgets/widgets/qtextbrowser.cpp
+++ b/src/widgets/widgets/qtextbrowser.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -151,12 +151,18 @@ public:
QString QTextBrowserPrivate::findFile(const QUrl &name) const
{
QString fileName;
- if (name.scheme() == QLatin1String("qrc"))
+ if (name.scheme() == QLatin1String("qrc")) {
fileName = QLatin1String(":/") + name.path();
- else if (name.scheme().isEmpty())
+ } else if (name.scheme().isEmpty()) {
fileName = name.path();
- else
- fileName = name.toLocalFile();
+ } else {
+#if defined(Q_OS_ANDROID)
+ if (name.scheme() == QLatin1String("assets"))
+ fileName = QLatin1String("assets:") + name.path();
+ else
+#endif
+ fileName = name.toLocalFile();
+ }
if (QFileInfo(fileName).isAbsolute())
return fileName;
@@ -217,13 +223,14 @@ void QTextBrowserPrivate::_q_activateAnchor(const QString &href)
textOrSourceChanged = false;
#ifndef QT_NO_DESKTOPSERVICES
- if ((openExternalLinks
- && url.scheme() != QLatin1String("file")
- && url.scheme() != QLatin1String("qrc")
- && !url.isRelative())
- || (url.isRelative() && !currentURL.isRelative()
- && currentURL.scheme() != QLatin1String("file")
- && currentURL.scheme() != QLatin1String("qrc"))) {
+ bool isFileScheme =
+ url.scheme() == QLatin1String("file")
+#if defined(Q_OS_ANDROID)
+ || url.scheme() == QLatin1String("assets")
+#endif
+ || url.scheme() == QLatin1String("qrc");
+ if ((openExternalLinks && !isFileScheme && !url.isRelative())
+ || (url.isRelative() && !currentURL.isRelative() && !isFileScheme)) {
QDesktopServices::openUrl(url);
return;
}
diff --git a/src/widgets/widgets/qtextbrowser.h b/src/widgets/widgets/qtextbrowser.h
index 900dd27211..244d8a32df 100644
--- a/src/widgets/widgets/qtextbrowser.h
+++ b/src/widgets/widgets/qtextbrowser.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -45,8 +45,6 @@
#include <QtWidgets/qtextedit.h>
#include <QtCore/qurl.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -129,6 +127,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QTEXTBROWSER_H
diff --git a/src/widgets/widgets/qtextedit.cpp b/src/widgets/widgets/qtextedit.cpp
index f033b6544c..bf2c8a4495 100644
--- a/src/widgets/widgets/qtextedit.cpp
+++ b/src/widgets/widgets/qtextedit.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -182,7 +182,7 @@ void QTextEditPrivate::init(const QString &html)
q->setFocusPolicy(Qt::WheelFocus);
q->setAttribute(Qt::WA_KeyCompression);
q->setAttribute(Qt::WA_InputMethodEnabled);
-
+ q->setInputMethodHints(Qt::ImhMultiLine);
#ifndef QT_NO_CURSOR
viewport->setCursor(Qt::IBeamCursor);
#endif
diff --git a/src/widgets/widgets/qtextedit.h b/src/widgets/widgets/qtextedit.h
index b44083a502..e1471848e7 100644
--- a/src/widgets/widgets/qtextedit.h
+++ b/src/widgets/widgets/qtextedit.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -51,8 +51,6 @@
#ifndef QT_NO_TEXTEDIT
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -314,8 +312,6 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(QTextEdit::AutoFormatting)
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QT_NO_TEXTEDIT
#endif // QTEXTEDIT_H
diff --git a/src/widgets/widgets/qtextedit_p.h b/src/widgets/widgets/qtextedit_p.h
index a2ca2dc6f4..1ce68dc23e 100644
--- a/src/widgets/widgets/qtextedit_p.h
+++ b/src/widgets/widgets/qtextedit_p.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qtoolbar.cpp b/src/widgets/widgets/qtoolbar.cpp
index 907874fc0e..0c2dd20d77 100644
--- a/src/widgets/widgets/qtoolbar.cpp
+++ b/src/widgets/widgets/qtoolbar.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qtoolbar.h b/src/widgets/widgets/qtoolbar.h
index a706ccf46e..663497493f 100644
--- a/src/widgets/widgets/qtoolbar.h
+++ b/src/widgets/widgets/qtoolbar.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -44,8 +44,6 @@
#include <QtWidgets/qwidget.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -172,6 +170,4 @@ inline QAction *QToolBar::actionAt(int ax, int ay) const
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QDYNAMICTOOLBAR_H
diff --git a/src/widgets/widgets/qtoolbar_p.h b/src/widgets/widgets/qtoolbar_p.h
index 464f653059..9ff0b9d61c 100644
--- a/src/widgets/widgets/qtoolbar_p.h
+++ b/src/widgets/widgets/qtoolbar_p.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qtoolbararealayout.cpp b/src/widgets/widgets/qtoolbararealayout.cpp
index 02279ad014..94a1148ded 100644
--- a/src/widgets/widgets/qtoolbararealayout.cpp
+++ b/src/widgets/widgets/qtoolbararealayout.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -810,7 +810,7 @@ QLayoutItem *QToolBarAreaLayout::insertToolBar(QToolBar *before, QToolBar *toolB
QInternal::DockPosition pos = findToolBar(before);
if (pos == QInternal::DockCount)
return 0;
-
+
return docks[pos].insertToolBar(before, toolBar);
}
@@ -869,7 +869,7 @@ void QToolBarAreaLayout::insertItem(QToolBar *before, QLayoutItem *item)
QInternal::DockPosition pos = findToolBar(before);
if (pos == QInternal::DockCount)
return;
-
+
docks[pos].insertItem(before, item);
}
diff --git a/src/widgets/widgets/qtoolbararealayout_p.h b/src/widgets/widgets/qtoolbararealayout_p.h
index 5cbb4a4756..ec7d1f26f1 100644
--- a/src/widgets/widgets/qtoolbararealayout_p.h
+++ b/src/widgets/widgets/qtoolbararealayout_p.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -169,7 +169,7 @@ public:
void removeToolBar(QToolBar *toolBar);
void insertToolBarBreak(QToolBar *before);
void removeToolBarBreak(QToolBar *before);
- void moveToolBar(QToolBar *toolbar, int pos);
+ void moveToolBar(QToolBar *toolbar, int pos);
QList<int> gapIndex(const QPoint &pos, int *maxDistance) const;
bool insertGap(const QList<int> &path, QLayoutItem *item);
@@ -215,7 +215,7 @@ public:
void insertToolBarBreak(QToolBar *before);
void removeToolBarBreak(QToolBar *before);
void addToolBarBreak(QInternal::DockPosition pos);
- void moveToolBar(QToolBar *toolbar, int pos);
+ void moveToolBar(QToolBar *toolbar, int pos);
void insertItem(QInternal::DockPosition pos, QLayoutItem *item);
void insertItem(QToolBar *before, QLayoutItem *item);
diff --git a/src/widgets/widgets/qtoolbarextension.cpp b/src/widgets/widgets/qtoolbarextension.cpp
index 682ababc33..1e1999d4f3 100644
--- a/src/widgets/widgets/qtoolbarextension.cpp
+++ b/src/widgets/widgets/qtoolbarextension.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qtoolbarextension_p.h b/src/widgets/widgets/qtoolbarextension_p.h
index 5175d7bc2d..ccb2e411b0 100644
--- a/src/widgets/widgets/qtoolbarextension_p.h
+++ b/src/widgets/widgets/qtoolbarextension_p.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qtoolbarlayout.cpp b/src/widgets/widgets/qtoolbarlayout.cpp
index 1dde9c0a1d..3c0c84ee2f 100644
--- a/src/widgets/widgets/qtoolbarlayout.cpp
+++ b/src/widgets/widgets/qtoolbarlayout.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -409,7 +409,7 @@ void QToolBarLayout::setGeometry(const QRect &rect)
}
}
#endif
-
+
}
bool QToolBarLayout::layoutActions(const QSize &size)
diff --git a/src/widgets/widgets/qtoolbarlayout_p.h b/src/widgets/widgets/qtoolbarlayout_p.h
index 5796c21861..8605a9a6ac 100644
--- a/src/widgets/widgets/qtoolbarlayout_p.h
+++ b/src/widgets/widgets/qtoolbarlayout_p.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qtoolbarseparator.cpp b/src/widgets/widgets/qtoolbarseparator.cpp
index a5b5bb9569..140f26eaed 100644
--- a/src/widgets/widgets/qtoolbarseparator.cpp
+++ b/src/widgets/widgets/qtoolbarseparator.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qtoolbarseparator_p.h b/src/widgets/widgets/qtoolbarseparator_p.h
index bea892c6fb..8db7205b4f 100644
--- a/src/widgets/widgets/qtoolbarseparator_p.h
+++ b/src/widgets/widgets/qtoolbarseparator_p.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qtoolbox.cpp b/src/widgets/widgets/qtoolbox.cpp
index 52ab5465ae..1264a5b6f2 100644
--- a/src/widgets/widgets/qtoolbox.cpp
+++ b/src/widgets/widgets/qtoolbox.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qtoolbox.h b/src/widgets/widgets/qtoolbox.h
index 6d7166f2ac..3a15ca1850 100644
--- a/src/widgets/widgets/qtoolbox.h
+++ b/src/widgets/widgets/qtoolbox.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -45,8 +45,6 @@
#include <QtWidgets/qframe.h>
#include <QtGui/qicon.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -126,6 +124,4 @@ inline int QToolBox::insertItem(int index, QWidget *item, const QString &text)
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QTOOLBOX_H
diff --git a/src/widgets/widgets/qtoolbutton.cpp b/src/widgets/widgets/qtoolbutton.cpp
index 54c73588f7..88690f8bff 100644
--- a/src/widgets/widgets/qtoolbutton.cpp
+++ b/src/widgets/widgets/qtoolbutton.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qtoolbutton.h b/src/widgets/widgets/qtoolbutton.h
index 778f2d8f15..3310476b44 100644
--- a/src/widgets/widgets/qtoolbutton.h
+++ b/src/widgets/widgets/qtoolbutton.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -44,8 +44,6 @@
#include <QtWidgets/qabstractbutton.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -139,6 +137,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QTOOLBUTTON_H
diff --git a/src/widgets/widgets/qwidgetanimator.cpp b/src/widgets/widgets/qwidgetanimator.cpp
index c6520a010e..bbd96ca29a 100644
--- a/src/widgets/widgets/qwidgetanimator.cpp
+++ b/src/widgets/widgets/qwidgetanimator.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qwidgetanimator_p.h b/src/widgets/widgets/qwidgetanimator_p.h
index fa2421c1fa..776ca74b1f 100644
--- a/src/widgets/widgets/qwidgetanimator_p.h
+++ b/src/widgets/widgets/qwidgetanimator_p.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qwidgetlinecontrol.cpp b/src/widgets/widgets/qwidgetlinecontrol.cpp
index 579c1713aa..9212f942c5 100644
--- a/src/widgets/widgets/qwidgetlinecontrol.cpp
+++ b/src/widgets/widgets/qwidgetlinecontrol.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qwidgetlinecontrol_p.h b/src/widgets/widgets/qwidgetlinecontrol_p.h
index f5fd900681..1cee67bfd2 100644
--- a/src/widgets/widgets/qwidgetlinecontrol_p.h
+++ b/src/widgets/widgets/qwidgetlinecontrol_p.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -69,8 +69,6 @@
#include "qplatformdefs.h"
-QT_BEGIN_HEADER
-
#ifdef DrawText
# undef DrawText
#endif
@@ -533,8 +531,6 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QT_NO_LINEEDIT
#endif // QWidgetLineControl_P_H
diff --git a/src/widgets/widgets/qwidgetresizehandler.cpp b/src/widgets/widgets/qwidgetresizehandler.cpp
index 362f46ac6a..ba4e69126a 100644
--- a/src/widgets/widgets/qwidgetresizehandler.cpp
+++ b/src/widgets/widgets/qwidgetresizehandler.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qwidgetresizehandler_p.h b/src/widgets/widgets/qwidgetresizehandler_p.h
index 8c6b8cd669..6ace370e9d 100644
--- a/src/widgets/widgets/qwidgetresizehandler_p.h
+++ b/src/widgets/widgets/qwidgetresizehandler_p.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/qwidgettextcontrol.cpp b/src/widgets/widgets/qwidgettextcontrol.cpp
index 9a2a83503b..99493704b5 100644
--- a/src/widgets/widgets/qwidgettextcontrol.cpp
+++ b/src/widgets/widgets/qwidgettextcontrol.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -1726,12 +1726,13 @@ void QWidgetTextControlPrivate::mouseReleaseEvent(QEvent *e, Qt::MouseButton but
{
Q_Q(QWidgetTextControl);
+ const QTextCursor oldSelection = cursor;
if (sendMouseEventToInputContext(
e, QEvent::MouseButtonRelease, button, pos, modifiers, buttons, globalPos)) {
+ repaintOldAndNewSelection(oldSelection);
return;
}
- const QTextCursor oldSelection = cursor;
const int oldCursorPos = cursor.position();
#ifndef QT_NO_DRAGANDDROP
diff --git a/src/widgets/widgets/qwidgettextcontrol_p.h b/src/widgets/widgets/qwidgettextcontrol_p.h
index 070dc660c6..e857fffba5 100644
--- a/src/widgets/widgets/qwidgettextcontrol_p.h
+++ b/src/widgets/widgets/qwidgettextcontrol_p.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -65,8 +65,6 @@
#include <QtGui/qclipboard.h>
#include <QtCore/qmimedata.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
@@ -297,6 +295,4 @@ private:
QT_END_NAMESPACE
-QT_END_HEADER
-
#endif // QWidgetTextControl_H
diff --git a/src/widgets/widgets/qwidgettextcontrol_p_p.h b/src/widgets/widgets/qwidgettextcontrol_p_p.h
index 86a7f1e48e..727821015e 100644
--- a/src/widgets/widgets/qwidgettextcontrol_p_p.h
+++ b/src/widgets/widgets/qwidgettextcontrol_p_p.h
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
diff --git a/src/widgets/widgets/widgets.pri b/src/widgets/widgets/widgets.pri
index 797f3e9b76..9780d3c24c 100644
--- a/src/widgets/widgets/widgets.pri
+++ b/src/widgets/widgets/widgets.pri
@@ -145,7 +145,7 @@ SOURCES += \
false:mac {
HEADERS += widgets/qmacnativewidget_mac.h \
widgets/qmaccocoaviewcontainer_mac.h
- OBJECTIVE_HEADERS += widgets/qcocoatoolbardelegate_mac_p.h \
+ OBJECTIVE_HEADERS += widgets/qcocoatoolbardelegate_mac_p.h \
widgets/qcocoamenu_mac_p.h
OBJECTIVE_SOURCES += widgets/qmaccocoaviewcontainer_mac.mm \
widgets/qcocoatoolbardelegate_mac.mm \