diff options
author | Pierre Rossi <pierre.rossi@theqtcompany.com> | 2015-01-14 17:06:03 +0100 |
---|---|---|
committer | Pierre Rossi <pierre.rossi@theqtcompany.com> | 2015-01-22 20:01:40 +0100 |
commit | 82bef8eb423bc7a9f607fda95cd980a8b2816056 (patch) | |
tree | 4e49034442bb2bad4fb84beb0cf3fd719e197a99 /src/core/web_contents_delegate_qt.cpp | |
parent | 4c724c022664286191558803632d45cd28749ae4 (diff) |
Introduce ASSERT_ENUMS_MATCH macro
For our common use case of compile-time checking enums that
we want to keep in sync.
Change-Id: I102d737ad986bf3dfff4d11a91afa3f3819a7947
Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
Diffstat (limited to 'src/core/web_contents_delegate_qt.cpp')
-rw-r--r-- | src/core/web_contents_delegate_qt.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp index 18b61cd2d..94c6a9a15 100644 --- a/src/core/web_contents_delegate_qt.cpp +++ b/src/core/web_contents_delegate_qt.cpp @@ -224,8 +224,8 @@ bool WebContentsDelegateQt::IsFullscreenForTabOrPending(const content::WebConten return m_viewClient->isFullScreen(); } -Q_STATIC_ASSERT_X(static_cast<int>(WebContentsAdapterClient::Open) == static_cast<int>(content::FileChooserParams::Open), "Enums out of sync"); -Q_STATIC_ASSERT_X(static_cast<int>(WebContentsAdapterClient::Save) == static_cast<int>(content::FileChooserParams::Save), "Enums out of sync"); +ASSERT_ENUMS_MATCH(WebContentsAdapterClient::Open, content::FileChooserParams::Open) +ASSERT_ENUMS_MATCH(WebContentsAdapterClient::Save, content::FileChooserParams::Save) void WebContentsDelegateQt::RunFileChooser(content::WebContents *web_contents, const content::FileChooserParams ¶ms) { |