Qt Core: Remove code for Windows < 7
Change-Id: I919827c6016156af596fd90fc5563445e0ae4228 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
ee84db4c18
commit
53fb2c48ef
@ -115,9 +115,7 @@ static void qt_create_pipe(Q_PIPE *pipe, bool isInputPipe)
|
||||
dwOpenMode |= PIPE_ACCESS_INBOUND;
|
||||
dwInputBufferSize = dwPipeBufferSize;
|
||||
}
|
||||
DWORD dwPipeFlags = PIPE_TYPE_BYTE | PIPE_WAIT;
|
||||
if (QSysInfo::windowsVersion() >= QSysInfo::WV_VISTA)
|
||||
dwPipeFlags |= PIPE_REJECT_REMOTE_CLIENTS;
|
||||
DWORD dwPipeFlags = PIPE_TYPE_BYTE | PIPE_WAIT | PIPE_REJECT_REMOTE_CLIENTS;
|
||||
hServer = CreateNamedPipe(pipeName,
|
||||
dwOpenMode,
|
||||
dwPipeFlags,
|
||||
|
@ -70,12 +70,8 @@ void QCollatorPrivate::init()
|
||||
if (caseSensitivity == Qt::CaseInsensitive)
|
||||
collator |= NORM_IGNORECASE;
|
||||
|
||||
if (numericMode) {
|
||||
if (QSysInfo::windowsVersion() >= QSysInfo::WV_WINDOWS7)
|
||||
if (numericMode)
|
||||
collator |= SORT_DIGITSASNUMBERS;
|
||||
else
|
||||
qWarning("Numeric sorting unsupported on Windows versions older than Windows 7.");
|
||||
}
|
||||
|
||||
if (ignorePunctuation)
|
||||
collator |= NORM_IGNORESYMBOLS;
|
||||
|
@ -326,9 +326,7 @@ QVariant QSystemLocalePrivate::timeFormat(QLocale::FormatType type)
|
||||
{
|
||||
switch (type) {
|
||||
case QLocale::ShortFormat:
|
||||
if (QSysInfo::windowsVersion() >= QSysInfo::WV_WINDOWS7)
|
||||
return winToQtFormat(getLocaleInfo(LOCALE_SSHORTTIME));
|
||||
// fall through
|
||||
case QLocale::LongFormat:
|
||||
return winToQtFormat(getLocaleInfo(LOCALE_STIMEFORMAT));
|
||||
case QLocale::NarrowFormat:
|
||||
@ -367,7 +365,7 @@ QVariant QSystemLocalePrivate::dayName(int day, QLocale::FormatType type)
|
||||
|
||||
if (type == QLocale::LongFormat)
|
||||
return getLocaleInfo(long_day_map[day]);
|
||||
else if (type == QLocale::NarrowFormat && QSysInfo::windowsVersion() >= QSysInfo::WV_VISTA)
|
||||
else if (type == QLocale::NarrowFormat)
|
||||
return getLocaleInfo(narrow_day_map[day]);
|
||||
return getLocaleInfo(short_day_map[day]);
|
||||
}
|
||||
@ -425,7 +423,7 @@ QVariant QSystemLocalePrivate::toString(const QTime &time, QLocale::FormatType t
|
||||
|
||||
DWORD flags = 0;
|
||||
// keep the same conditional as timeFormat() above
|
||||
if (type == QLocale::ShortFormat && QSysInfo::windowsVersion() >= QSysInfo::WV_WINDOWS7)
|
||||
if (type == QLocale::ShortFormat)
|
||||
flags = TIME_NOSECONDS;
|
||||
|
||||
wchar_t buf[255];
|
||||
@ -656,15 +654,11 @@ QVariant QSystemLocalePrivate::uiLanguages()
|
||||
|
||||
QVariant QSystemLocalePrivate::nativeLanguageName()
|
||||
{
|
||||
if (QSysInfo::windowsVersion() < QSysInfo::WV_WINDOWS7)
|
||||
return getLocaleInfo(LOCALE_SNATIVELANGNAME);
|
||||
return getLocaleInfo(LOCALE_SNATIVELANGUAGENAME);
|
||||
}
|
||||
|
||||
QVariant QSystemLocalePrivate::nativeCountryName()
|
||||
{
|
||||
if (QSysInfo::windowsVersion() < QSysInfo::WV_WINDOWS7)
|
||||
return getLocaleInfo(LOCALE_SNATIVECTRYNAME);
|
||||
return getLocaleInfo(LOCALE_SNATIVECOUNTRYNAME);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user