diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2017-09-28 13:15:59 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2017-10-05 08:44:48 +0000 |
commit | 53fb2c48ef472ee74a2a2a47d3a460a0ee74d38b (patch) | |
tree | 3cd4ed2ed874997ff9e072e6e39e2f36e3c3856b /src | |
parent | ee84db4c18562c5dfeb1e7cf2d9fb1fcd4490dfa (diff) |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/io/qprocess_win.cpp | 4 | ||||
-rw-r--r-- | src/corelib/tools/qcollator_win.cpp | 8 | ||||
-rw-r--r-- | src/corelib/tools/qlocale_win.cpp | 12 |
3 files changed, 6 insertions, 18 deletions
diff --git a/src/corelib/io/qprocess_win.cpp b/src/corelib/io/qprocess_win.cpp index 2bbc4eddd0..fbbfac26f6 100644 --- a/src/corelib/io/qprocess_win.cpp +++ b/src/corelib/io/qprocess_win.cpp @@ -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, diff --git a/src/corelib/tools/qcollator_win.cpp b/src/corelib/tools/qcollator_win.cpp index bce896278e..5a838c1b50 100644 --- a/src/corelib/tools/qcollator_win.cpp +++ b/src/corelib/tools/qcollator_win.cpp @@ -70,12 +70,8 @@ void QCollatorPrivate::init() if (caseSensitivity == Qt::CaseInsensitive) collator |= NORM_IGNORECASE; - if (numericMode) { - if (QSysInfo::windowsVersion() >= QSysInfo::WV_WINDOWS7) - collator |= SORT_DIGITSASNUMBERS; - else - qWarning("Numeric sorting unsupported on Windows versions older than Windows 7."); - } + if (numericMode) + collator |= SORT_DIGITSASNUMBERS; if (ignorePunctuation) collator |= NORM_IGNORESYMBOLS; diff --git a/src/corelib/tools/qlocale_win.cpp b/src/corelib/tools/qlocale_win.cpp index 1d80320d8e..30aefb71c1 100644 --- a/src/corelib/tools/qlocale_win.cpp +++ b/src/corelib/tools/qlocale_win.cpp @@ -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 + return winToQtFormat(getLocaleInfo(LOCALE_SSHORTTIME)); 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); } |