diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2013-12-23 22:44:13 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-12-23 22:44:13 +0100 |
commit | d776937df91e46536f404c6868d64016b6038d7b (patch) | |
tree | dde5a5ab39d27a5b0bc3327127c7d6dd1b1ae5f8 /src/widgets/widgets | |
parent | e14503d353de7246a1d6e36894dd77bb32c4af3b (diff) | |
parent | 3f3be55835427ea9f1bbcc046e05ee538ca214d7 (diff) |
Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev
Diffstat (limited to 'src/widgets/widgets')
-rw-r--r-- | src/widgets/widgets/qcombobox.cpp | 2 | ||||
-rw-r--r-- | src/widgets/widgets/qspinbox.cpp | 2 | ||||
-rw-r--r-- | src/widgets/widgets/qwidgettextcontrol.cpp | 6 |
3 files changed, 7 insertions, 3 deletions
diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp index fd74ab7595..17a6ededfe 100644 --- a/src/widgets/widgets/qcombobox.cpp +++ b/src/widgets/widgets/qcombobox.cpp @@ -3073,7 +3073,7 @@ void QComboBox::wheelEvent(QWheelEvent *e) newIndex--; while ((newIndex >= 0) && !(d->model->flags(d->model->index(newIndex,d->modelColumn,d->root)) & Qt::ItemIsEnabled)) newIndex--; - } else { + } else if (e->delta() < 0) { newIndex++; while ((newIndex < count()) && !(d->model->flags(d->model->index(newIndex,d->modelColumn,d->root)) & Qt::ItemIsEnabled)) newIndex++; diff --git a/src/widgets/widgets/qspinbox.cpp b/src/widgets/widgets/qspinbox.cpp index a43b937951..e198dae168 100644 --- a/src/widgets/widgets/qspinbox.cpp +++ b/src/widgets/widgets/qspinbox.cpp @@ -1042,7 +1042,7 @@ QVariant QSpinBoxPrivate::validateAndInterpret(QString &input, int &pos, if (max != min && (copy.isEmpty() || (min < 0 && copy == QLatin1String("-")) - || (min >= 0 && copy == QLatin1String("+")))) { + || (max >= 0 && copy == QLatin1String("+")))) { state = QValidator::Intermediate; QSBDEBUG() << __FILE__ << __LINE__<< "num is set to" << num; } else if (copy.startsWith(QLatin1Char('-')) && min >= 0) { diff --git a/src/widgets/widgets/qwidgettextcontrol.cpp b/src/widgets/widgets/qwidgettextcontrol.cpp index 0255183c87..b8f8762240 100644 --- a/src/widgets/widgets/qwidgettextcontrol.cpp +++ b/src/widgets/widgets/qwidgettextcontrol.cpp @@ -2158,11 +2158,14 @@ QMenu *QWidgetTextControl::createStandardContextMenu(const QPointF &pos, QWidget setActionIcon(a, QStringLiteral("edit-redo")); menu->addSeparator(); +#ifndef QT_NO_CLIPBOARD a = menu->addAction(tr("Cu&t") + ACCEL_KEY(QKeySequence::Cut), this, SLOT(cut())); a->setEnabled(d->cursor.hasSelection()); setActionIcon(a, QStringLiteral("edit-cut")); +#endif } +#ifndef QT_NO_CLIPBOARD if (showTextSelectionActions) { a = menu->addAction(tr("&Copy") + ACCEL_KEY(QKeySequence::Copy), this, SLOT(copy())); a->setEnabled(d->cursor.hasSelection()); @@ -2175,9 +2178,10 @@ QMenu *QWidgetTextControl::createStandardContextMenu(const QPointF &pos, QWidget a = menu->addAction(tr("Copy &Link Location"), this, SLOT(_q_copyLink())); a->setEnabled(!d->linkToCopy.isEmpty()); } +#endif // QT_NO_CLIPBOARD if (d->interactionFlags & Qt::TextEditable) { -#if !defined(QT_NO_CLIPBOARD) +#ifndef QT_NO_CLIPBOARD a = menu->addAction(tr("&Paste") + ACCEL_KEY(QKeySequence::Paste), this, SLOT(paste())); a->setEnabled(canPaste()); setActionIcon(a, QStringLiteral("edit-paste")); |