summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/widgets')
-rw-r--r--src/widgets/widgets/qcombobox.cpp2
-rw-r--r--src/widgets/widgets/qspinbox.cpp2
-rw-r--r--src/widgets/widgets/qwidgettextcontrol.cpp6
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"));