Browse Source

Don't use hardcoded path for temp folder

adaptive-webui-19844
Chocobo1 3 years ago
parent
commit
dba998fea0
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 6
      src/gui/torrentcontentmodel.cpp

6
src/gui/torrentcontentmodel.cpp

@ -151,10 +151,10 @@ namespace @@ -151,10 +151,10 @@ namespace
*/
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;
const QIcon testIcon1 = provider.icon(QFileInfo(PSEUDO_UNIQUE_FILE_NAME + u".pdf"));
const QIcon testIcon2 = provider.icon(QFileInfo(PSEUDO_UNIQUE_FILE_NAME + u".png"));
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").data()));
return (!testIcon1.isNull() || !testIcon2.isNull());
}

Loading…
Cancel
Save