Skip to content

Commit

Permalink
Fix use of __has_include
Browse files Browse the repository at this point in the history
  • Loading branch information
rmisev committed Oct 19, 2024
1 parent fd2aa36 commit 015ed58
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions include/upa/url_for_qt.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@

#include "url.h" // IWYU pragma: export
#include <QString>
#if defined(__has_include) && __has_include(<QtVersionChecks>)
#ifdef __has_include
#if __has_include(<QtVersionChecks>)
# include <QtVersionChecks>
#else
#endif
#endif // __has_include
#ifndef QT_VERSION
# include <QtGlobal>
#endif
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
Expand Down
7 changes: 5 additions & 2 deletions test/test-url_for_.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@
#ifdef UPA_TEST_URL_FOR_QT
# include "upa/url_for_qt.h"
# include <QString>
# if defined(__has_include) && __has_include(<QtVersionChecks>)
# ifdef __has_include
# if __has_include(<QtVersionChecks>)
# include <QtVersionChecks>
# else
# endif
# endif // __has_include
# ifndef QT_VERSION
# include <QtGlobal>
# endif
# if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
Expand Down

0 comments on commit 015ed58

Please sign in to comment.