Remove qMacVersion()

Add QSysInfo::macVersion() instead, to match the windowsVersion()
function.

Change-Id: I783e59583ca21653d25586156cbb0cb1f301868b
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This commit is contained in:
Bradley T. Hughes 2012-02-20 09:43:02 +01:00 committed by Qt by Nokia
parent 69da8588d4
commit 84438a77cc
5 changed files with 15 additions and 17 deletions

3
dist/changes-5.0.0 vendored
View File

@ -216,6 +216,9 @@ information about a particular change.
- QSqlQueryModel::indexInQuery() is now virtual. See note below under QSql.
- qMacVersion() has been removed. Use QSysInfo::macVersion() or
QSysInfo::MacintoshVersion instead.
****************************************************************************
* General *
****************************************************************************

View File

@ -818,15 +818,6 @@ QT_BEGIN_NAMESPACE
\sa qMin(), qMax()
*/
/*!
\fn int qMacVersion()
\relates <QtGlobal>
Use QSysInfo::MacintoshVersion instead.
\sa QSysInfo
*/
/*!
\macro QT_VERSION_CHECK
\relates <QtGlobal>
@ -948,6 +939,13 @@ bool qSharedBuild()
the application is run (Mac only).
*/
/*!
\fn QSysInfo::MacVersion QSysInfo::macVersion()
Returns the version of Mac OS X on which the application is run (Mac OS X
Only).
*/
/*!
\enum QSysInfo::Endian
@ -1630,7 +1628,7 @@ Q_CORE_EXPORT QString qt_mac_from_pascal_string(const Str255 pstr) {
#if defined(Q_OS_MAC)
static QSysInfo::MacVersion macVersion()
QSysInfo::MacVersion QSysInfo::macVersion()
{
#ifndef QT_NO_CORESERVICES
SInt32 gestalt_version;
@ -1640,7 +1638,7 @@ static QSysInfo::MacVersion macVersion()
#endif
return QSysInfo::MV_Unknown;
}
const QSysInfo::MacVersion QSysInfo::MacintoshVersion = macVersion();
const QSysInfo::MacVersion QSysInfo::MacintoshVersion = QSysInfo::macVersion();
#elif defined(Q_OS_WIN) || defined(Q_OS_CYGWIN) || defined(Q_OS_WINCE)

View File

@ -941,16 +941,13 @@ public:
MV_LION = MV_10_7
};
static const MacVersion MacintoshVersion;
static MacVersion macVersion();
#endif
};
Q_CORE_EXPORT const char *qVersion();
Q_CORE_EXPORT bool qSharedBuild();
#if defined(Q_OS_MAC)
inline int qMacVersion() { return QSysInfo::MacintoshVersion; }
#endif
#ifndef Q_OUTOFLINE_TEMPLATE
# define Q_OUTOFLINE_TEMPLATE
#endif

View File

@ -5092,7 +5092,7 @@ void QMacStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex
uint sc = SC_TitleBarMinButton;
ThemeTitleBarWidget tbw = kThemeWidgetCollapseBox;
bool active = titlebar->state & State_Active;
if (qMacVersion() < QSysInfo::MV_10_6) {
if (QSysInfo::macVersion() < QSysInfo::MV_10_6) {
int border = 2;
titleBarRect.origin.x += border;
titleBarRect.origin.y -= border;

View File

@ -110,7 +110,7 @@ PlatformInfo PlatformInfo::localHostInfo()
pi.insert(PI_OSVersion, QString::number(QSysInfo::windowsVersion()));
#elif defined(Q_OS_MAC)
pi.insert(PI_OSName, QLS("MacOS"));
pi.insert(PI_OSVersion, QString::number(qMacVersion()));
pi.insert(PI_OSVersion, QString::number(QSysInfo::macVersion()));
#else
pi.insert(PI_OSName, QLS("Other"));
#endif