forked from qt-creator/qt-creator
Fix Utils::withNTFSPermissions with void function
Fix up of 9467ed42c3
Change-Id: I24343e5e1440210188742332ec6f725af3412100
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
committed by
Ivan Donchevskii
parent
38acd39f3a
commit
36c88ba5fb
@@ -792,6 +792,16 @@ QTextStream &operator<<(QTextStream &s, const FileName &fn)
|
|||||||
return s << fn.toString();
|
return s << fn.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
|
template <>
|
||||||
|
void withNTFSPermissions(const std::function<void()> &task)
|
||||||
|
{
|
||||||
|
qt_ntfs_permission_lookup++;
|
||||||
|
task();
|
||||||
|
qt_ntfs_permission_lookup--;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
} // namespace Utils
|
} // namespace Utils
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
@@ -133,7 +133,7 @@ public:
|
|||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
static T withNTFSPermissions(const std::function<T()> &task)
|
T withNTFSPermissions(const std::function<T()> &task)
|
||||||
{
|
{
|
||||||
qt_ntfs_permission_lookup++;
|
qt_ntfs_permission_lookup++;
|
||||||
T result = task();
|
T result = task();
|
||||||
@@ -141,10 +141,13 @@ static T withNTFSPermissions(const std::function<T()> &task)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <>
|
||||||
|
QTCREATOR_UTILS_EXPORT void withNTFSPermissions(const std::function<void()> &task);
|
||||||
|
|
||||||
#else // Q_OS_WIN
|
#else // Q_OS_WIN
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
static T withNTFSPermissions(const std::function<T()> &task)
|
T withNTFSPermissions(const std::function<T()> &task)
|
||||||
{
|
{
|
||||||
return task();
|
return task();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user