diff options
author | Graham Bloice <graham.bloice@trihedral.com> | 2018-03-01 00:01:45 +0000 |
---|---|---|
committer | Graham Bloice <graham.bloice@trihedral.com> | 2018-03-01 22:32:04 +0000 |
commit | bf4c2fd82b30d8b088fcb1235263dce9173d4cd7 (patch) | |
tree | e1488d70ee99709e6fb89ef80d5ab4aa9c198433 /ui/qt/packet_list.cpp | |
parent | 92bb9ec9da549991f402082794638a4458e77a81 (diff) |
Windows: Remove cruft for unsupported versons
Remove all the existing LoadDLL\GetProcAddress combinations
that allowed conditional Win32 API usage if supported on the
running OS version.
All the required functions are present in the versions we support.
Change-Id: Ibc43e51cefcd1c7562d4e251784362509f224ed6
Reviewed-on: https://code.wireshark.org/review/26215
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Diffstat (limited to 'ui/qt/packet_list.cpp')
-rw-r--r-- | ui/qt/packet_list.cpp | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/ui/qt/packet_list.cpp b/ui/qt/packet_list.cpp index dd2582227d..5934523c5b 100644 --- a/ui/qt/packet_list.cpp +++ b/ui/qt/packet_list.cpp @@ -69,6 +69,7 @@ #ifdef Q_OS_WIN #include "wsutil/file_util.h" #include <QSysInfo> +#include <Uxtheme.h> #endif // To do: @@ -264,18 +265,8 @@ PacketList::PacketList(QWidget *parent) : #ifdef Q_OS_WIN // && Qt version >= 4.8.6 if (QSysInfo::windowsVersion() < QSysInfo::WV_WINDOWS8) { - // See if we're running Vista or 7 and we have a theme applied. - HMODULE uxtheme_lib = (HMODULE) ws_load_library("uxtheme.dll"); - - if (uxtheme_lib) { - typedef BOOL (WINAPI *IsAppThemedHandler)(void); - typedef BOOL (WINAPI *IsThemeActiveHandler)(void); - - IsAppThemedHandler PIsAppThemed = (IsAppThemedHandler) GetProcAddress(uxtheme_lib, "IsAppThemed"); - IsThemeActiveHandler PIsThemeActive = (IsThemeActiveHandler) GetProcAddress(uxtheme_lib, "IsThemeActive"); - if (PIsAppThemed && PIsAppThemed() && PIsThemeActive && PIsThemeActive()) { - style_inactive_selected = false; - } + if (IsAppThemed() && IsThemeActive()) { + style_inactive_selected = false; } } #endif |