diff options
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/qdatetimeedit.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/qdialogbuttonbox.cpp | 1 | ||||
-rw-r--r-- | src/gui/widgets/qgroupbox.cpp | 4 | ||||
-rw-r--r-- | src/gui/widgets/qlabel.cpp | 8 | ||||
-rw-r--r-- | src/gui/widgets/qlinecontrol.cpp | 4 | ||||
-rw-r--r-- | src/gui/widgets/qmenu_wince.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/qplaintextedit.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/qprogressbar.cpp | 16 | ||||
-rw-r--r-- | src/gui/widgets/qtextbrowser.cpp | 3 | ||||
-rw-r--r-- | src/gui/widgets/qtoolbar.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/qvalidator.cpp | 3 |
11 files changed, 37 insertions, 10 deletions
diff --git a/src/gui/widgets/qdatetimeedit.cpp b/src/gui/widgets/qdatetimeedit.cpp index d9ff8a6..62c6e20 100644 --- a/src/gui/widgets/qdatetimeedit.cpp +++ b/src/gui/widgets/qdatetimeedit.cpp @@ -2532,8 +2532,10 @@ void QDateTimeEditPrivate::syncCalendarWidget() { Q_Q(QDateTimeEdit); if (monthCalendar) { + const bool sb = monthCalendar->blockSignals(true); monthCalendar->setDateRange(q->minimumDate(), q->maximumDate()); monthCalendar->setDate(q->date()); + monthCalendar->blockSignals(sb); } } diff --git a/src/gui/widgets/qdialogbuttonbox.cpp b/src/gui/widgets/qdialogbuttonbox.cpp index 6c29141..e6842b3 100644 --- a/src/gui/widgets/qdialogbuttonbox.cpp +++ b/src/gui/widgets/qdialogbuttonbox.cpp @@ -94,6 +94,7 @@ QT_BEGIN_NAMESPACE specifying their role. \snippet examples/dialogs/extension/finddialog.cpp 1 + \snippet examples/dialogs/extension/finddialog.cpp 6 Alternatively, QDialogButtonBox provides several standard buttons (e.g. OK, Cancel, Save) that you can use. They exist as flags so you can OR them together in the constructor. diff --git a/src/gui/widgets/qgroupbox.cpp b/src/gui/widgets/qgroupbox.cpp index 56fb2dd..db068cf 100644 --- a/src/gui/widgets/qgroupbox.cpp +++ b/src/gui/widgets/qgroupbox.cpp @@ -733,6 +733,10 @@ void QGroupBox::mouseReleaseEvent(QMouseEvent *event) } Q_D(QGroupBox); + if (!d->overCheckBox) { + event->ignore(); + return; + } QStyleOptionGroupBox box; initStyleOption(&box); QStyle::SubControl released = style()->hitTestComplexControl(QStyle::CC_GroupBox, &box, diff --git a/src/gui/widgets/qlabel.cpp b/src/gui/widgets/qlabel.cpp index ab88f38..2b6eeb7 100644 --- a/src/gui/widgets/qlabel.cpp +++ b/src/gui/widgets/qlabel.cpp @@ -59,6 +59,10 @@ #include <qaccessible.h> #endif +#ifdef Q_OS_SYMBIAN +#include "private/qt_s60_p.h" +#endif + QT_BEGIN_NAMESPACE /*! @@ -698,7 +702,11 @@ QSize QLabelPrivate::sizeForWidth(int w) const bool tryWidth = (w < 0) && (align & Qt::TextWordWrap); if (tryWidth) +#ifdef Q_OS_SYMBIAN + w = qMin(S60->clientRect().Width(), q->maximumSize().width()); +#else w = qMin(fm.averageCharWidth() * 80, q->maximumSize().width()); +#endif else if (w < 0) w = 2000; w -= (hextra + contentsMargin.width()); diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp index d58da37..0af2e59 100644 --- a/src/gui/widgets/qlinecontrol.cpp +++ b/src/gui/widgets/qlinecontrol.cpp @@ -445,6 +445,8 @@ void QLineControl::moveCursor(int pos, bool mark) void QLineControl::processInputMethodEvent(QInputMethodEvent *event) { int priorState = 0; + int originalSelectionStart = m_selstart; + int originalSelectionEnd = m_selend; bool isGettingInput = !event->commitString().isEmpty() || event->preeditString() != preeditAreaText() || event->replacementLength() > 0; @@ -523,6 +525,8 @@ void QLineControl::processInputMethodEvent(QInputMethodEvent *event) } m_textLayout.setAdditionalFormats(formats); updateDisplayText(/*force*/ true); + if (originalSelectionStart != m_selstart || originalSelectionEnd != m_selend) + emit selectionChanged(); if (cursorPositionChanged) emitCursorPositionChanged(); else if (m_preeditCursor != oldPreeditCursor) diff --git a/src/gui/widgets/qmenu_wince.cpp b/src/gui/widgets/qmenu_wince.cpp index b0c6c1b..d45daf8 100644 --- a/src/gui/widgets/qmenu_wince.cpp +++ b/src/gui/widgets/qmenu_wince.cpp @@ -111,10 +111,10 @@ static AygEnableSoftKey ptrEnableSoftKey = 0; static void resolveAygLibs() { if (!aygResolved) { - aygResolved = true; QLibrary aygLib(QLatin1String("aygshell")); ptrCreateMenuBar = (AygCreateMenuBar) aygLib.resolve("SHCreateMenuBar"); ptrEnableSoftKey = (AygEnableSoftKey) aygLib.resolve("SHEnableSoftkey"); + aygResolved = true; } } diff --git a/src/gui/widgets/qplaintextedit.cpp b/src/gui/widgets/qplaintextedit.cpp index f2fca8f..3b2c8fd 100644 --- a/src/gui/widgets/qplaintextedit.cpp +++ b/src/gui/widgets/qplaintextedit.cpp @@ -1900,7 +1900,7 @@ void QPlainTextEdit::paintEvent(QPaintEvent *e) } } - bool drawCursor = (editable + bool drawCursor = ((editable || (textInteractionFlags() & Qt::TextSelectableByKeyboard)) && context.cursorPosition >= blpos && context.cursorPosition < blpos + bllen); diff --git a/src/gui/widgets/qprogressbar.cpp b/src/gui/widgets/qprogressbar.cpp index dd92bda..c583a78 100644 --- a/src/gui/widgets/qprogressbar.cpp +++ b/src/gui/widgets/qprogressbar.cpp @@ -341,11 +341,17 @@ int QProgressBar::value() const void QProgressBar::setRange(int minimum, int maximum) { Q_D(QProgressBar); - d->minimum = minimum; - d->maximum = qMax(minimum, maximum); - if ( d->value <(d->minimum-1) || d->value > d->maximum) - reset(); + if (minimum != d->minimum || maximum != d->maximum) { + d->minimum = minimum; + d->maximum = qMax(minimum, maximum); + + if (d->value < (d->minimum - 1) || d->value > d->maximum) + reset(); + else + update(); + } } + /*! \property QProgressBar::textVisible \brief whether the current completed percentage should be displayed @@ -462,7 +468,7 @@ QString QProgressBar::text() const return result; } - int progress = (qreal(d->value) - d->minimum) * 100.0 / totalSteps; + int progress = (qreal(d->value) - d->minimum) * qreal(100.0) / totalSteps; result.replace(QLatin1String("%p"), QString::number(progress)); return result; } diff --git a/src/gui/widgets/qtextbrowser.cpp b/src/gui/widgets/qtextbrowser.cpp index cd8fa11..e786c5c 100644 --- a/src/gui/widgets/qtextbrowser.cpp +++ b/src/gui/widgets/qtextbrowser.cpp @@ -619,7 +619,8 @@ void QTextBrowserPrivate::restoreHistoryEntry(const HistoryEntry entry) If you want to load documents stored in the Qt resource system use \c{qrc} as the scheme in the URL to load. For example, for the document resource path \c{:/docs/index.html} use \c{qrc:/docs/index.html} as - the URL with setSource(). + the URL with setSource(). To access local files, use \c{file} as the + scheme in the URL. \sa QTextEdit, QTextDocument */ diff --git a/src/gui/widgets/qtoolbar.cpp b/src/gui/widgets/qtoolbar.cpp index e0e8ce6..c7ae73f 100644 --- a/src/gui/widgets/qtoolbar.cpp +++ b/src/gui/widgets/qtoolbar.cpp @@ -440,7 +440,7 @@ void QToolBarPrivate::plug(const QRect &r) pop up a menu containing the items that does not currently fit in the toolbar. - When a QToolBar is not a child of a QMainWindow, it looses the ability + When a QToolBar is not a child of a QMainWindow, it loses the ability to populate the extension pop up with widgets added to the toolbar using addWidget(). Please use widget actions created by inheriting QWidgetAction and implementing QWidgetAction::createWidget() instead. diff --git a/src/gui/widgets/qvalidator.cpp b/src/gui/widgets/qvalidator.cpp index b32bea8..4362f2b 100644 --- a/src/gui/widgets/qvalidator.cpp +++ b/src/gui/widgets/qvalidator.cpp @@ -400,8 +400,9 @@ QValidator::State QIntValidator::validate(QString & input, int&) const qlonglong entered = QLocalePrivate::bytearrayToLongLong(buff.constData(), 10, &ok, &overflow); if (overflow || !ok) return Invalid; + if (entered >= b && entered <= t) { - locale().toInt(input, &ok); + locale().toInt(input, &ok, 10); return ok ? Acceptable : Intermediate; } |