mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-15 01:33:07 -07:00
Use QBT_EXT in all places
Cleanup headers on the way
This commit is contained in:
parent
b18bf48014
commit
b9403774e6
4 changed files with 13 additions and 10 deletions
|
@ -37,8 +37,9 @@
|
|||
#include <QDirIterator>
|
||||
#include <QCoreApplication>
|
||||
|
||||
#ifndef Q_OS_WIN
|
||||
#if defined(Q_OS_MAC) || defined(Q_OS_FREEBSD)
|
||||
#if defined(Q_OS_WIN)
|
||||
#include <Windows.h>
|
||||
#elif defined(Q_OS_MAC) || defined(Q_OS_FREEBSD)
|
||||
#include <sys/param.h>
|
||||
#include <sys/mount.h>
|
||||
#elif defined(Q_OS_HAIKU)
|
||||
|
@ -46,9 +47,8 @@
|
|||
#else
|
||||
#include <sys/vfs.h>
|
||||
#endif
|
||||
#else
|
||||
#include <Windows.h>
|
||||
#endif
|
||||
|
||||
#include "base/bittorrent/torrenthandle.h"
|
||||
|
||||
/**
|
||||
* Converts a path to a string suitable for display.
|
||||
|
@ -70,7 +70,7 @@ QString Utils::Fs::fromNativePath(const QString &path)
|
|||
*/
|
||||
QString Utils::Fs::fileExtension(const QString &filename)
|
||||
{
|
||||
QString ext = QString(filename).remove(".!qB");
|
||||
QString ext = QString(filename).remove(QB_EXT);
|
||||
const int point_index = ext.lastIndexOf(".");
|
||||
return (point_index >= 0) ? ext.mid(point_index + 1) : QString();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue