mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 15:37:26 -06:00
Remember last selected paths in torrent creation dialog
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
|
||||
#include <sstream>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <QThread>
|
||||
#include <ctime>
|
||||
#include <boost/date_time/posix_time/posix_time_types.hpp>
|
||||
@@ -74,6 +75,14 @@ public:
|
||||
return QString(o.str().c_str());
|
||||
}
|
||||
|
||||
static inline QString removeLastPathPart(QString path) {
|
||||
if(path.isEmpty()) return path;
|
||||
path = path.replace("\\", "/");
|
||||
QStringList tmp = path.split("/");
|
||||
tmp.removeLast();
|
||||
return tmp.join("/");
|
||||
}
|
||||
|
||||
static inline sha1_hash QStringToSha1(const QString& s) {
|
||||
std::string str(s.toLocal8Bit().data());
|
||||
std::istringstream i(str);
|
||||
|
||||
Reference in New Issue
Block a user