first thoughts about downloads path changing

This commit is contained in:
Blue 2022-02-17 20:26:15 +03:00
parent da19eb86bb
commit 243edff8bd
Signed by: blue
GPG key ID: 9B203B252A63EE38
11 changed files with 122 additions and 10 deletions

View file

@ -28,8 +28,11 @@ Core::NetworkAccess::NetworkAccess(QObject* parent):
manager(0),
storage("fileURLStorage"),
downloads(),
uploads()
uploads(),
currentPath()
{
QSettings settings;
currentPath = settings.value("downloadsPath").toString();
}
Core::NetworkAccess::~NetworkAccess()
@ -515,8 +518,7 @@ bool Core::NetworkAccess::checkAndAddToUploading(const QString& acc, const QStri
QString Core::NetworkAccess::prepareDirectory(const QString& jid)
{
QString path = QStandardPaths::writableLocation(QStandardPaths::DownloadLocation);
path += "/" + QApplication::applicationName();
QString path = currentPath;
if (jid.size() > 0) {
path += "/" + jid;
}
@ -563,3 +565,8 @@ std::list<Shared::MessageInfo> Core::NetworkAccess::reportPathInvalid(const QStr
{
return storage.deletedFile(path);
}
void Core::NetworkAccess::moveFilesDirectory(const QString& newPath)
{
}