mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 23:47:23 -06:00
Use QBT_EXT in all places
Cleanup headers on the way
This commit is contained in:
@@ -69,7 +69,7 @@ PreviewSelect::PreviewSelect(QWidget* parent, BitTorrent::TorrentHandle *const t
|
||||
int nbFiles = torrent->filesCount();
|
||||
for (int i = 0; i < nbFiles; ++i) {
|
||||
QString fileName = torrent->fileName(i);
|
||||
if (fileName.endsWith(".!qB"))
|
||||
if (fileName.endsWith(QB_EXT))
|
||||
fileName.chop(4);
|
||||
QString extension = Utils::Fs::fileExtension(fileName).toUpper();
|
||||
if (Utils::Misc::isPreviewable(extension)) {
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
*/
|
||||
|
||||
#include "torrentcontentmodelfile.h"
|
||||
|
||||
#include "base/bittorrent/torrenthandle.h"
|
||||
#include "torrentcontentmodelfolder.h"
|
||||
|
||||
TorrentContentModelFile::TorrentContentModelFile(const QString &fileName, qulonglong fileSize,
|
||||
@@ -41,7 +43,7 @@ TorrentContentModelFile::TorrentContentModelFile(const QString &fileName, qulong
|
||||
m_name = fileName;
|
||||
|
||||
// Do not display incomplete extensions
|
||||
if (m_name.endsWith(".!qB"))
|
||||
if (m_name.endsWith(QB_EXT))
|
||||
m_name.chop(4);
|
||||
|
||||
m_size = fileSize;
|
||||
|
||||
@@ -28,16 +28,17 @@
|
||||
* Contact : chris@qbittorrent.org
|
||||
*/
|
||||
|
||||
#include <QDebug>
|
||||
#include "torrentcontentmodelfolder.h"
|
||||
|
||||
#include "base/bittorrent/torrenthandle.h"
|
||||
|
||||
TorrentContentModelFolder::TorrentContentModelFolder(const QString &name, TorrentContentModelFolder *parent)
|
||||
: TorrentContentModelItem(parent)
|
||||
{
|
||||
Q_ASSERT(parent);
|
||||
m_name = name;
|
||||
// Do not display incomplete extensions
|
||||
if (m_name.endsWith(".!qB"))
|
||||
if (m_name.endsWith(QB_EXT))
|
||||
m_name.chop(4);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user