mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-19 12:59:56 -07:00
Don't use hardcoded path for temp folder
This commit is contained in:
parent
fe2b49cf81
commit
dba998fea0
1 changed files with 3 additions and 3 deletions
|
@ -151,10 +151,10 @@ namespace
|
||||||
*/
|
*/
|
||||||
bool doesQFileIconProviderWork()
|
bool doesQFileIconProviderWork()
|
||||||
{
|
{
|
||||||
const QString PSEUDO_UNIQUE_FILE_NAME = u"/tmp/qBittorrent-test-QFileIconProvider-845eb448-7ad5-4cdb-b764-b3f322a266a9"_qs;
|
const Path PSEUDO_UNIQUE_FILE_NAME = Utils::Fs::tempPath() / Path(u"qBittorrent-test-QFileIconProvider-845eb448-7ad5-4cdb-b764-b3f322a266a9"_qs);
|
||||||
QFileIconProvider provider;
|
QFileIconProvider provider;
|
||||||
const QIcon testIcon1 = provider.icon(QFileInfo(PSEUDO_UNIQUE_FILE_NAME + u".pdf"));
|
const QIcon testIcon1 = provider.icon(QFileInfo((PSEUDO_UNIQUE_FILE_NAME + u".pdf").data()));
|
||||||
const QIcon testIcon2 = provider.icon(QFileInfo(PSEUDO_UNIQUE_FILE_NAME + u".png"));
|
const QIcon testIcon2 = provider.icon(QFileInfo((PSEUDO_UNIQUE_FILE_NAME + u".png").data()));
|
||||||
return (!testIcon1.isNull() || !testIcon2.isNull());
|
return (!testIcon1.isNull() || !testIcon2.isNull());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue