diff options
Diffstat (limited to 'src/widgets/widgets')
-rw-r--r-- | src/widgets/widgets/qabstractspinbox.cpp | 7 | ||||
-rw-r--r-- | src/widgets/widgets/qcombobox.cpp | 5 | ||||
-rw-r--r-- | src/widgets/widgets/qmenu.h | 8 | ||||
-rw-r--r-- | src/widgets/widgets/qmenu_mac.mm | 3 | ||||
-rw-r--r-- | src/widgets/widgets/qmenubar.h | 6 | ||||
-rw-r--r-- | src/widgets/widgets/qspinbox.cpp | 24 |
6 files changed, 38 insertions, 15 deletions
diff --git a/src/widgets/widgets/qabstractspinbox.cpp b/src/widgets/widgets/qabstractspinbox.cpp index 822d896ee6..1eafb73ba8 100644 --- a/src/widgets/widgets/qabstractspinbox.cpp +++ b/src/widgets/widgets/qabstractspinbox.cpp @@ -127,6 +127,13 @@ QT_BEGIN_NAMESPACE */ /*! + \enum QAbstractSpinBox::StepType + + \value DefaultStepType + \value AdaptiveDecimalStepType +*/ + +/*! \fn void QAbstractSpinBox::editingFinished() This signal is emitted editing is finished. This happens when the diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp index 04a44e1f37..e20a0892b4 100644 --- a/src/widgets/widgets/qcombobox.cpp +++ b/src/widgets/widgets/qcombobox.cpp @@ -3160,7 +3160,6 @@ void QComboBoxPrivate::showPopupFromMouseEvent(QMouseEvent *e) #endif // We've restricted the next couple of lines, because by not calling // viewContainer(), we avoid creating the QComboBoxPrivateContainer. - viewContainer()->blockMouseReleaseTimer.start(QApplication::doubleClickInterval()); viewContainer()->initialClickPosition = q->mapToGlobal(e->pos()); #ifdef QT_KEYPAD_NAVIGATION } @@ -3169,8 +3168,10 @@ void QComboBoxPrivate::showPopupFromMouseEvent(QMouseEvent *e) // The code below ensures that regular mousepress and pick item still works // If it was not called the viewContainer would ignore event since it didn't have // a mousePressEvent first. - if (viewContainer()) + if (viewContainer()) { + viewContainer()->blockMouseReleaseTimer.start(QApplication::doubleClickInterval()); viewContainer()->maybeIgnoreMouseButtonRelease = false; + } } else { #ifdef QT_KEYPAD_NAVIGATION if (QApplication::keypadNavigationEnabled() && sc == QStyle::SC_ComboBoxEditField && lineEdit) { diff --git a/src/widgets/widgets/qmenu.h b/src/widgets/widgets/qmenu.h index 86d927e919..628f818b5e 100644 --- a/src/widgets/widgets/qmenu.h +++ b/src/widgets/widgets/qmenu.h @@ -46,7 +46,7 @@ #include <QtGui/qicon.h> #include <QtWidgets/qaction.h> -#ifdef Q_OS_OSX +#if defined(Q_OS_MACOS) || defined(Q_CLANG_QDOC) Q_FORWARD_DECLARE_OBJC_CLASS(NSMenu); #endif @@ -81,7 +81,7 @@ public: QAction *addAction(const QString &text, const QObject *receiver, const char* member, const QKeySequence &shortcut = 0); QAction *addAction(const QIcon &icon, const QString &text, const QObject *receiver, const char* member, const QKeySequence &shortcut = 0); -#ifdef Q_QDOC +#ifdef Q_CLANG_QDOC template<typename PointerToMemberFunction> QAction *addAction(const QString &text, const QObject *receiver, PointerToMemberFunction method, const QKeySequence &shortcut = 0); template<typename Functor> @@ -151,7 +151,7 @@ public: connect(result, &QAction::triggered, std::move(slot)); return result; } -#endif // !Q_QDOC +#endif // !Q_CLANG_QDOC QAction *addMenu(QMenu *menu); QMenu *addMenu(const QString &title); @@ -211,7 +211,7 @@ public: QPlatformMenu *platformMenu(); void setPlatformMenu(QPlatformMenu *platformMenu); -#ifdef Q_OS_OSX +#if defined(Q_OS_MACOS) || defined(Q_CLANG_QDOC) NSMenu* toNSMenu(); void setAsDockMenu(); #endif diff --git a/src/widgets/widgets/qmenu_mac.mm b/src/widgets/widgets/qmenu_mac.mm index 0d680fb4dc..0872da803d 100644 --- a/src/widgets/widgets/qmenu_mac.mm +++ b/src/widgets/widgets/qmenu_mac.mm @@ -73,6 +73,7 @@ inline QPlatformNativeInterface::NativeResourceForIntegrationFunction resolvePla /*! + \fn NSMenu *QMenu::toNSMenu() \since 5.2 Returns the native NSMenu for this menu. Available on \macos only. @@ -94,6 +95,7 @@ NSMenu *QMenu::toNSMenu() /*! + \fn void QMenu::setAsDockMenu() \since 5.2 Set this menu to be the dock menu available by option-clicking @@ -149,6 +151,7 @@ void QMenuPrivate::moveWidgetToPlatformItem(QWidget *widget, QPlatformMenuItem* #if QT_CONFIG(menubar) /*! + \fn NSMenu *QMenuBar::toNSMenu() \since 5.2 Returns the native NSMenu for this menu bar. Available on \macos only. diff --git a/src/widgets/widgets/qmenubar.h b/src/widgets/widgets/qmenubar.h index 2f071e7e3b..cf6663f94a 100644 --- a/src/widgets/widgets/qmenubar.h +++ b/src/widgets/widgets/qmenubar.h @@ -67,7 +67,7 @@ public: QAction *addAction(const QString &text); QAction *addAction(const QString &text, const QObject *receiver, const char* member); -#ifdef Q_QDOC +#ifdef Q_CLANG_QDOC template<typename Obj, typename PointerToMemberFunctionOrFunctor> QAction *addAction(const QString &text, const Obj *receiver, PointerToMemberFunctionOrFunctor method); template<typename Functor> @@ -91,7 +91,7 @@ public: connect(result, &QAction::triggered, std::move(slot)); return result; } -#endif // !Q_QDOC +#endif // !Q_CLANG_QDOC QAction *addMenu(QMenu *menu); QMenu *addMenu(const QString &title); @@ -121,7 +121,7 @@ public: void setCornerWidget(QWidget *w, Qt::Corner corner = Qt::TopRightCorner); QWidget *cornerWidget(Qt::Corner corner = Qt::TopRightCorner) const; -#ifdef Q_OS_OSX +#if defined(Q_OS_MACOS) || defined(Q_CLANG_QDOC) NSMenu* toNSMenu(); #endif diff --git a/src/widgets/widgets/qspinbox.cpp b/src/widgets/widgets/qspinbox.cpp index 7f29c0c52c..dcf3906dd7 100644 --- a/src/widgets/widgets/qspinbox.cpp +++ b/src/widgets/widgets/qspinbox.cpp @@ -421,8 +421,8 @@ void QSpinBox::setRange(int minimum, int maximum) } /*! - Sets the step type for the spin box: single step or adaptive - decimal step. + Sets the step type for the spin box to \a stepType, which is single + step or adaptive decimal step. Adaptive decimal step means that the step size will continuously be adjusted to one power of ten below the current \l value. So when @@ -439,7 +439,6 @@ void QSpinBox::setRange(int minimum, int maximum) \l singleStep, although it is preserved so that \l singleStep comes into effect if adaptive decimal step is later turned off. - \sa QAbstractSpinBox::groupSeparator() \since 5.12 */ @@ -449,6 +448,13 @@ void QSpinBox::setStepType(QAbstractSpinBox::StepType stepType) d->stepType = stepType; } +/*! + \property QSpinBox::stepType + \brief The step type. + + The step type can be single step or adaptive decimal step. +*/ + QAbstractSpinBox::StepType QSpinBox::stepType() const { Q_D(const QSpinBox); @@ -888,8 +894,8 @@ void QDoubleSpinBox::setRange(double minimum, double maximum) } /*! - Sets the step type for the spin box: single step or adaptive - decimal step. + Sets the step type for the spin box to \a stepType, which is single + step or adaptive decimal step. Adaptive decimal step means that the step size will continuously be adjusted to one power of ten below the current \l value. So when @@ -909,7 +915,6 @@ void QDoubleSpinBox::setRange(double minimum, double maximum) \l singleStep, although it is preserved so that \l singleStep comes into effect if adaptive decimal step is later turned off. - \sa QAbstractSpinBox::groupSeparator() \since 5.12 */ @@ -919,6 +924,13 @@ void QDoubleSpinBox::setStepType(StepType stepType) d->stepType = stepType; } +/*! + \property QDoubleSpinBox::stepType + \brief The step type. + + The step type can be single step or adaptive decimal step. +*/ + QAbstractSpinBox::StepType QDoubleSpinBox::stepType() const { Q_D(const QDoubleSpinBox); |