diff options
Diffstat (limited to 'src/corelib/global')
-rw-r--r-- | src/corelib/global/qglobal.cpp | 120 | ||||
-rw-r--r-- | src/corelib/global/qglobal.h | 15 | ||||
-rw-r--r-- | src/corelib/global/qnamespace.qdoc | 131 |
3 files changed, 7 insertions, 259 deletions
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index bbc9a15e74..a59cbf9382 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -833,126 +833,6 @@ QT_BEGIN_NAMESPACE */ /*! - \typedef Q_INT8 - \relates <QtGlobal> - \compat - - Use \l qint8 instead. -*/ - -/*! - \typedef Q_UINT8 - \relates <QtGlobal> - \compat - - Use \l quint8 instead. -*/ - -/*! - \typedef Q_INT16 - \relates <QtGlobal> - \compat - - Use \l qint16 instead. -*/ - -/*! - \typedef Q_UINT16 - \relates <QtGlobal> - \compat - - Use \l quint16 instead. -*/ - -/*! - \typedef Q_INT32 - \relates <QtGlobal> - \compat - - Use \l qint32 instead. -*/ - -/*! - \typedef Q_UINT32 - \relates <QtGlobal> - \compat - - Use \l quint32 instead. -*/ - -/*! - \typedef Q_INT64 - \relates <QtGlobal> - \compat - - Use \l qint64 instead. -*/ - -/*! - \typedef Q_UINT64 - \relates <QtGlobal> - \compat - - Use \l quint64 instead. -*/ - -/*! - \typedef Q_LLONG - \relates <QtGlobal> - \compat - - Use \l qint64 instead. -*/ - -/*! - \typedef Q_ULLONG - \relates <QtGlobal> - \compat - - Use \l quint64 instead. -*/ - -/*! - \typedef Q_LONG - \relates <QtGlobal> - \compat - - Use \c{void *} instead. -*/ - -/*! - \typedef Q_ULONG - \relates <QtGlobal> - \compat - - Use \c{void *} instead. -*/ - -/*! \fn bool qSysInfo(int *wordSize, bool *bigEndian) - \relates <QtGlobal> - - Use QSysInfo::WordSize and QSysInfo::ByteOrder instead. -*/ - -/*! - \fn bool qt_winUnicode() - \relates <QtGlobal> - - This function always returns true. - - \sa QSysInfo -*/ - -/*! - \fn int qWinVersion() - \relates <QtGlobal> - - Use QSysInfo::WindowsVersion instead. - - \sa QSysInfo -*/ - -/*! \fn int qMacVersion() \relates <QtGlobal> diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 4960d2a245..e4084ed91f 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -1158,16 +1158,15 @@ typedef double qreal; template <typename T> Q_DECL_CONSTEXPR inline T qAbs(const T &t) { return t >= 0 ? t : -t; } -Q_DECL_CONSTEXPR inline int qRound(qreal d) -{ return d >= qreal(0.0) ? int(d + qreal(0.5)) : int(d - int(d-1) + qreal(0.5)) + int(d-1); } +Q_DECL_CONSTEXPR inline int qRound(double d) +{ return d >= 0.0 ? int(d + 0.5) : int(d - int(d-1) + 0.5) + int(d-1); } +Q_DECL_CONSTEXPR inline int qRound(float d) +{ return d >= 0.0f ? int(d + 0.5f) : int(d - int(d-1) + 0.5f) + int(d-1); } -#if defined(QT_NO_FPU) || defined(QT_ARCH_ARM) || defined(QT_ARCH_WINDOWSCE) || defined(QT_ARCH_SYMBIAN) Q_DECL_CONSTEXPR inline qint64 qRound64(double d) -{ return d >= 0.0 ? qint64(d + 0.5) : qint64(d - qreal(qint64(d-1)) + 0.5) + qint64(d-1); } -#else -Q_DECL_CONSTEXPR inline qint64 qRound64(qreal d) -{ return d >= qreal(0.0) ? qint64(d + qreal(0.5)) : qint64(d - qreal(qint64(d-1)) + qreal(0.5)) + qint64(d-1); } -#endif +{ return d >= 0.0 ? qint64(d + 0.5) : qint64(d - double(qint64(d-1)) + 0.5) + qint64(d-1); } +Q_DECL_CONSTEXPR inline qint64 qRound64(float d) +{ return d >= 0.0f ? qint64(d + 0.5f) : qint64(d - float(qint64(d-1)) + 0.5f) + qint64(d-1); } template <typename T> Q_DECL_CONSTEXPR inline const T &qMin(const T &a, const T &b) { return (a < b) ? a : b; } diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index 2d102e7ba1..9dd7cda24f 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -612,33 +612,6 @@ */ /*! - \enum Qt::BackgroundMode - - \compat - - \value FixedColor - \value FixedPixmap - \value NoBackground - \value PaletteForeground - \value PaletteButton - \value PaletteLight - \value PaletteMidlight - \value PaletteDark - \value PaletteMid - \value PaletteText - \value PaletteBrightText - \value PaletteBase - \value PaletteBackground - \value PaletteShadow - \value PaletteHighlight - \value PaletteHighlightedText - \value PaletteButtonText - \value PaletteLink - \value PaletteLinkVisited - \value X11ParentRelative -*/ - -/*! \enum Qt::ImageConversionFlag The options marked "(default)" are set if no other values from @@ -693,17 +666,6 @@ rendering operation for example. */ -/*! \enum Qt::GUIStyle - - \compat - - \value WindowsStyle - \value MotifStyle - \value MacStyle - \value Win3Style - \value PMStyle -*/ - /*! \enum Qt::UIEffect @@ -755,21 +717,6 @@ \sa QSize::scale(), QImage::scaled() */ -/*! \typedef Qt::ScaleMode - \compat - - Use Qt::AspectRatioMode instead. - - The enum values have been renamed as follows: - - \table - \row \i Old enum value \i New enum value - \row \i Qt::ScaleFree \i Qt::IgnoreAspectRatio - \row \i Qt::ScaleMin \i Qt::KeepAspectRatio - \row \i Qt::ScaleMax \i Qt::KeepAspectRatioByExpanding - \endtable -*/ - /*! \enum Qt::TransformationMode This enum type defines whether image transformations (e.g., @@ -1764,26 +1711,6 @@ */ /*! - \enum Qt::ButtonState_enum - \compat - \value ShiftButton - \value ControlButton - \value AltButton - \value MetaButton - \value Keypad - \value KeyButtonMask - - Use Qt::KeyboardModifier instead. -*/ - -/*! - \typedef Qt::ButtonState - \compat - - Use Qt::KeyboardModifier instead. -*/ - -/*! \enum Qt::CheckState This enum describes the state of checkable items, controls, and widgets. @@ -2201,44 +2128,6 @@ TargetMoveAction is not used on the Mac. */ -/*! \typedef Qt::ToolBarDock - \compat - - Use Qt::Dock instead. -*/ - -/*! - \enum Qt::Dock - \compat - - Each dock window can be in one of the following positions: - - \value DockUnmanaged not managed by a Q3MainWindow. - - \value DockTornOff the dock window floats as its own top level - window which always stays on top of the main window. - - \value DockTop above the central widget, below the menu bar. - - \value DockBottom below the central widget, above the status bar. - - \value DockRight to the right of the central widget. - - \value DockLeft to the left of the central widget. - - \value DockMinimized the dock window is not shown (this is - effectively a 'hidden' dock area); the handles of all minimized - dock windows are drawn in one row below the menu bar. - - \omitvalue Bottom - \omitvalue Left - \omitvalue Minimized - \omitvalue Right - \omitvalue Top - \omitvalue TornOff - \omitvalue Unmanaged -*/ - /*! \enum Qt::AnchorAttribute @@ -2339,19 +2228,6 @@ */ /*! - \enum Qt::PaintUnit - - \compat - - \value PixelUnit - \value LoMetricUnit Obsolete - \value HiMetricUnit Obsolete - \value LoEnglishUnit Obsolete - \value HiEnglishUnit Obsolete - \value TwipsUnit Obsolete -*/ - -/*! \enum Qt::TextFormat This enum is used in widgets that can display both plain text and @@ -2479,13 +2355,6 @@ */ /*! - \typedef Qt::TextFlags - \compat - - Use Qt::TextFlag instead. -*/ - -/*! \enum Qt::LayoutDirection Specifies the direction of Qt's layouts and text handling. |