Skip to content

Commit 49fce76

Browse files
marcmutzQt Cherry-pick Bot
authored andcommitted
qcore_unix_p.h: fix unqualified names [1/N]: SteadyClockClockId
The name is in the global namespace and lacks a Q prefix, so might clash with names in other projects. Fix by prepending Q. Amends 5642b99. There's a ton more where this came from, more than I care to fix on the spot, so created QTBUG-144825 and QTBUG-144823 to keep track of them. Pick-to: 6.10 Task-number: QTBUG-144825 Change-Id: I3383380da7c40af80be2a1a469a1fa5470d8f57f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit cdec70e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
1 parent eadffe3 commit 49fce76

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/corelib/kernel/qcore_unix_p.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ QT_BEGIN_NAMESPACE
6666

6767
Q_DECLARE_TYPEINFO(pollfd, Q_PRIMITIVE_TYPE);
6868

69-
static inline constexpr clockid_t SteadyClockClockId =
69+
static inline constexpr clockid_t QSteadyClockClockId =
7070
#if !defined(CLOCK_MONOTONIC)
7171
// we don't know how to set the monotonic clock
7272
CLOCK_REALTIME
@@ -100,7 +100,7 @@ static inline constexpr clockid_t QWaitConditionClockId =
100100
// unknown why use of the monotonic clock causes failures
101101
CLOCK_REALTIME
102102
#else
103-
SteadyClockClockId;
103+
QSteadyClockClockId;
104104
#endif
105105
;
106106

@@ -219,7 +219,7 @@ inline timespec qAbsTimespec(timespec ts)
219219
return normalizedTimespec(ts);
220220
}
221221

222-
template <clockid_t ClockId = SteadyClockClockId>
222+
template <clockid_t ClockId = QSteadyClockClockId>
223223
inline timespec deadlineToAbstime(QDeadlineTimer deadline)
224224
{
225225
using namespace std::chrono;

src/corelib/thread/qthread_unix.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -974,7 +974,7 @@ bool QThreadPrivate::wait(QMutexLocker<QMutex> &locker, QDeadlineTimer deadline)
974974
pthread_cleanup_push(&CancelState::run, &nocancel);
975975
pthread_t thrId = from_HANDLE<pthread_t>(data->threadId.loadRelaxed());
976976
if constexpr (QT_CONFIG(pthread_clockjoin))
977-
r = pthread_clockjoin_np(thrId, nullptr, SteadyClockClockId, pts);
977+
r = pthread_clockjoin_np(thrId, nullptr, QSteadyClockClockId, pts);
978978
else
979979
r = pthread_timedjoin_np(thrId, nullptr, pts);
980980
Q_ASSERT(r == 0 || r == ETIMEDOUT);

0 commit comments

Comments
 (0)