mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
Placeholders: Add an checkbox in the FolderWizard to enable the placeholder feature
This commit is contained in:
parent
1049fb74d9
commit
7eeb99ba24
@ -497,6 +497,7 @@ void AccountSettings::slotFolderWizardAccepted()
|
||||
folderWizard->field(QLatin1String("sourceFolder")).toString());
|
||||
definition.targetPath = FolderDefinition::prepareTargetPath(
|
||||
folderWizard->property("targetPath").toString());
|
||||
definition.usePlaceholders = folderWizard->property("usePlaceholders").toBool();
|
||||
|
||||
{
|
||||
QDir dir(definition.localPath);
|
||||
|
||||
@ -36,6 +36,7 @@
|
||||
#include <QTreeWidget>
|
||||
#include <QVBoxLayout>
|
||||
#include <QEvent>
|
||||
#include <QCheckBox>
|
||||
|
||||
#include <cstdlib>
|
||||
|
||||
@ -492,6 +493,8 @@ FolderWizardSelectiveSync::FolderWizardSelectiveSync(const AccountPtr &account)
|
||||
auto *layout = new QVBoxLayout(this);
|
||||
_selectiveSync = new SelectiveSyncWidget(account, this);
|
||||
layout->addWidget(_selectiveSync);
|
||||
_placeholderCheckBox = new QCheckBox(tr("Download placeholders instead of downloading the files (Experimental)"));
|
||||
layout->addWidget(_placeholderCheckBox);
|
||||
}
|
||||
|
||||
FolderWizardSelectiveSync::~FolderWizardSelectiveSync() = default;
|
||||
@ -517,6 +520,7 @@ void FolderWizardSelectiveSync::initializePage()
|
||||
bool FolderWizardSelectiveSync::validatePage()
|
||||
{
|
||||
wizard()->setProperty("selectiveSyncBlackList", QVariant(_selectiveSync->createBlackList()));
|
||||
wizard()->setProperty("usePlaceholders", QVariant(_placeholderCheckBox->isChecked()));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@ -25,6 +25,8 @@
|
||||
#include "ui_folderwizardsourcepage.h"
|
||||
#include "ui_folderwizardtargetpage.h"
|
||||
|
||||
class QCheckBox;
|
||||
|
||||
namespace OCC {
|
||||
|
||||
class SelectiveSyncWidget;
|
||||
@ -130,6 +132,7 @@ public:
|
||||
|
||||
private:
|
||||
SelectiveSyncWidget *_selectiveSync;
|
||||
QCheckBox *_placeholderCheckBox;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user