}
// File can't have public upload set.
- if (_isFile) {
- _ui->checkBox_editing->setEnabled(false);
- } else {
- if (!_account->capabilities().sharePublicLinkAllowUpload()) {
- _ui->checkBox_editing->setEnabled(false);
- }
- }
+ _ui->widget_editing->setVisible(!_isFile);
+ _ui->checkBox_editing->setEnabled(
+ _account->capabilities().sharePublicLinkAllowUpload());
/*
* Create the share manager and connect it properly
* Only directories can have public upload set
* For public links the server sets CREATE and UPDATE permissions.
*/
+ _ui->checkBox_editing->setEnabled(
+ _account->capabilities().sharePublicLinkAllowUpload());
if (!_isFile) {
- _ui->checkBox_editing->setEnabled(true);
- if (_share->getPublicUpload()) {
- _ui->checkBox_editing->setChecked(true);
- } else {
- _ui->checkBox_editing->setChecked(false);
- }
+ _ui->checkBox_editing->setChecked(_share->getPublicUpload());
}
setShareLink(_share->getLink().toString());
<x>0</x>
<y>0</y>
<width>372</width>
- <height>212</height>
+ <height>237</height>
</rect>
</property>
<property name="windowTitle">
</layout>
</item>
<item row="3" column="0">
- <layout class="QHBoxLayout" name="horizontalLayout_editing">
- <item>
- <widget class="QCheckBox" name="checkBox_editing">
- <property name="text">
- <string>Allow editing</string>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
+ <widget class="QWidget" name="widget_editing" native="true">
+ <layout class="QHBoxLayout" name="horizontalLayout_editing">
+ <property name="leftMargin">
+ <number>0</number>
+ </property>
+ <property name="topMargin">
+ <number>0</number>
+ </property>
+ <property name="rightMargin">
+ <number>0</number>
+ </property>
+ <property name="bottomMargin">
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QCheckBox" name="checkBox_editing">
+ <property name="text">
+ <string>Allow editing</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
</item>
</layout>
</widget>