mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-02-06 03:44:29 +00:00
Initialize variable at better place
This commit is contained in:
parent
40e432b127
commit
8ebb6dc559
@ -111,10 +111,6 @@
|
|||||||
QtLockedFile::QtLockedFile()
|
QtLockedFile::QtLockedFile()
|
||||||
: QFile()
|
: QFile()
|
||||||
{
|
{
|
||||||
#ifdef Q_OS_WIN
|
|
||||||
wmutex = 0;
|
|
||||||
rmutex = 0;
|
|
||||||
#endif
|
|
||||||
m_lock_mode = NoLock;
|
m_lock_mode = NoLock;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -128,10 +124,6 @@ QtLockedFile::QtLockedFile()
|
|||||||
QtLockedFile::QtLockedFile(const QString &name)
|
QtLockedFile::QtLockedFile(const QString &name)
|
||||||
: QFile(name)
|
: QFile(name)
|
||||||
{
|
{
|
||||||
#ifdef Q_OS_WIN
|
|
||||||
wmutex = 0;
|
|
||||||
rmutex = 0;
|
|
||||||
#endif
|
|
||||||
m_lock_mode = NoLock;
|
m_lock_mode = NoLock;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,8 +103,8 @@ namespace QtLP_Private
|
|||||||
Qt::HANDLE getMutexHandle(int idx, bool doCreate);
|
Qt::HANDLE getMutexHandle(int idx, bool doCreate);
|
||||||
bool waitMutex(Qt::HANDLE mutex, bool doBlock);
|
bool waitMutex(Qt::HANDLE mutex, bool doBlock);
|
||||||
|
|
||||||
Qt::HANDLE wmutex;
|
Qt::HANDLE wmutex = nullptr;
|
||||||
Qt::HANDLE rmutex;
|
Qt::HANDLE rmutex = nullptr;
|
||||||
QVector<Qt::HANDLE> rmutexes;
|
QVector<Qt::HANDLE> rmutexes;
|
||||||
QString mutexname;
|
QString mutexname;
|
||||||
#endif
|
#endif
|
||||||
|
@ -42,8 +42,8 @@ lt::storage_interface *customStorageConstructor(const lt::storage_params ¶ms
|
|||||||
|
|
||||||
CustomStorage::CustomStorage(const lt::storage_params ¶ms, lt::file_pool &filePool)
|
CustomStorage::CustomStorage(const lt::storage_params ¶ms, lt::file_pool &filePool)
|
||||||
: lt::default_storage {params, filePool}
|
: lt::default_storage {params, filePool}
|
||||||
|
, m_savePath {Utils::Fs::expandPathAbs(QString::fromStdString(params.path))}
|
||||||
{
|
{
|
||||||
m_savePath = Utils::Fs::expandPathAbs(QString::fromStdString(params.path));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CustomStorage::verify_resume_data(const lt::add_torrent_params &rd, const lt::aux::vector<std::string, lt::file_index_t> &links, lt::storage_error &ec)
|
bool CustomStorage::verify_resume_data(const lt::add_torrent_params &rd, const lt::aux::vector<std::string, lt::file_index_t> &links, lt::storage_error &ec)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user