QLockFile: remove unneeded tryLock_impl middle-man
It's perfectly ok to de-inline a function, even an exported one, so remove the tryLock_impl() middle-man and pull the Qt 7 pre-programming into the here and now. Amends 5cea5fc80b9e1b19d620ec6be1acd5cdbd220971. Change-Id: I7e9626a91d8ebd64e02c3784c74621950da669fb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Ahmad Samir <a.samirh78@gmail.com> (cherry picked from commit 508629522d8c6580161a2fd9bfd2fe26f6c4c034) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
5d19dfb915
commit
c5f650af76
@ -257,7 +257,7 @@ bool QLockFile::tryLock(int timeout)
|
|||||||
return tryLock(std::chrono::milliseconds{ timeout });
|
return tryLock(std::chrono::milliseconds{ timeout });
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \fn bool QLockFile::tryLock(std::chrono::milliseconds timeout)
|
/*!
|
||||||
\overload
|
\overload
|
||||||
\since 6.2
|
\since 6.2
|
||||||
|
|
||||||
@ -275,11 +275,7 @@ bool QLockFile::tryLock(int timeout)
|
|||||||
|
|
||||||
\sa lock(), unlock()
|
\sa lock(), unlock()
|
||||||
*/
|
*/
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(7, 0, 0)
|
|
||||||
bool QLockFile::tryLock(std::chrono::milliseconds timeout)
|
bool QLockFile::tryLock(std::chrono::milliseconds timeout)
|
||||||
#else
|
|
||||||
bool QLockFile::tryLock_impl(std::chrono::milliseconds timeout)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
using namespace std::chrono_literals;
|
using namespace std::chrono_literals;
|
||||||
using Msec = std::chrono::milliseconds;
|
using Msec = std::chrono::milliseconds;
|
||||||
|
@ -28,14 +28,7 @@ public:
|
|||||||
void setStaleLockTime(int);
|
void setStaleLockTime(int);
|
||||||
int staleLockTime() const;
|
int staleLockTime() const;
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(7, 0, 0)
|
|
||||||
bool tryLock(std::chrono::milliseconds timeout = std::chrono::milliseconds::zero());
|
bool tryLock(std::chrono::milliseconds timeout = std::chrono::milliseconds::zero());
|
||||||
#else
|
|
||||||
bool tryLock(std::chrono::milliseconds timeout = std::chrono::milliseconds::zero())
|
|
||||||
{
|
|
||||||
return tryLock_impl(timeout);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void setStaleLockTime(std::chrono::milliseconds value);
|
void setStaleLockTime(std::chrono::milliseconds value);
|
||||||
std::chrono::milliseconds staleLockTimeAsDuration() const;
|
std::chrono::milliseconds staleLockTimeAsDuration() const;
|
||||||
@ -58,10 +51,6 @@ protected:
|
|||||||
private:
|
private:
|
||||||
Q_DECLARE_PRIVATE(QLockFile)
|
Q_DECLARE_PRIVATE(QLockFile)
|
||||||
Q_DISABLE_COPY(QLockFile)
|
Q_DISABLE_COPY(QLockFile)
|
||||||
|
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0)
|
|
||||||
bool tryLock_impl(std::chrono::milliseconds timeout);
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user