mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 23:17:21 -06:00
Initial port to libtorrent v0.16
This commit is contained in:
11
src/misc.h
11
src/misc.h
@@ -31,6 +31,9 @@
|
||||
#ifndef MISC_H
|
||||
#define MISC_H
|
||||
|
||||
#include <libtorrent/version.hpp>
|
||||
#include <libtorrent/torrent_info.hpp>
|
||||
#include <libtorrent/torrent_handle.hpp>
|
||||
#include <sstream>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
@@ -45,9 +48,6 @@
|
||||
#include <QIcon>
|
||||
#endif
|
||||
|
||||
#include <libtorrent/torrent_info.hpp>
|
||||
#include <libtorrent/torrent_handle.hpp>
|
||||
|
||||
const qlonglong MAX_ETA = 8640000;
|
||||
|
||||
/* Miscellaneaous functions that can be useful */
|
||||
@@ -104,8 +104,9 @@ public:
|
||||
|
||||
static inline QString file_extension(const QString &filename) {
|
||||
QString extension;
|
||||
if(filename.contains(".")) {
|
||||
extension = filename.mid(filename.lastIndexOf(".")+1);
|
||||
int point_index = filename.lastIndexOf(".");
|
||||
if(point_index >= 0) {
|
||||
extension = filename.mid(point_index+1);
|
||||
}
|
||||
return extension;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user