Skip to content

Commit

Permalink
Merge branch 'develop' into KDESKTOP-830-Implement-functions-to-gener…
Browse files Browse the repository at this point in the history
…ate-the-support-log-arrchive
  • Loading branch information
herve-er authored May 6, 2024
2 parents bc177d1 + a206e2b commit 4d11482
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
5 changes: 2 additions & 3 deletions src/gui/drivepreferenceswidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,8 @@ void DrivePreferencesWidget::refreshStatus() {

if (const auto driveInfoMapIt = _gui->driveInfoMap().find(_driveDbId); driveInfoMapIt != _gui->driveInfoMap().cend()) {
const auto &driveInfo = driveInfoMapIt->second;
if (!_mainVBox->isEnabled() && !driveInfo.isBeingDeleted()) {
// Re-enable the drive preferences widget after a deletion attempt.
if (!driveInfo.isBeingDeleted()) {
// Re-enable the drive preferences widget after a failed deletion attempt.
setCustomToolTipText("");
GuiUtility::setEnabledRecursively(this, true);
}
Expand Down Expand Up @@ -1043,7 +1043,6 @@ void DrivePreferencesWidget::onDriveBeingRemoved() {
driveInfoIt->second.setIsBeingDeleted(true);

// Lock all GUI drive-related actions during drive deletion.
GuiUtility::setEnabledRecursively<QLayout>(_mainVBox, false);
for (auto *child : findChildren<QWidget *>()) {
GuiUtility::setEnabledRecursively<QWidget>(child, false);
}
Expand Down
10 changes: 5 additions & 5 deletions src/gui/driveselectionwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ QSize DriveSelectionWidget::sizeHint() const {
void DriveSelectionWidget::clear() {
_currentDriveDbId = 0;
_downIconLabel->setVisible(false);
setDriveIcon();
setDriveIcon(defaultDriveColor);
retranslateUi();
}

Expand Down Expand Up @@ -188,17 +188,17 @@ void DriveSelectionWidget::setDriveIcon() {
}

ExitCode exitCode;
QColor defaultDriveColor;
exitCode = GuiRequests::getDriveDefaultColor(defaultDriveColor);
QColor driveColor;
exitCode = GuiRequests::getDriveDefaultColor(driveColor);
if (exitCode != ExitCodeOk) {
qCWarning(lcDriveSelectionWidget()) << "Error in Requests::getDriveDefaultColor";
return;
}

setDriveIcon(defaultDriveColor);
setDriveIcon(driveColor);
}

void DriveSelectionWidget::setDriveIcon(const QColor &color = defaultDriveColor) {
void DriveSelectionWidget::setDriveIcon(const QColor &color) {
if (_driveIconLabel) {
_driveIconLabel->setPixmap(
KDC::GuiUtility::getIconWithColor(":/client/resources/icons/actions/drive.svg", color).pixmap(_driveIconSize));
Expand Down
2 changes: 2 additions & 0 deletions src/gui/guiutility.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ bool getLinuxDesktopType(QString &type, QString &version);
#endif
template <class C>
void setEnabledRecursively(C *root, bool enabled) {
if (!root) return;

root->setEnabled(enabled);
for (auto *child : root->template findChildren<QLayout *>()) {
setEnabledRecursively(child, enabled);
Expand Down
3 changes: 3 additions & 0 deletions src/libsyncengine/propagation/executor/executorworker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2138,6 +2138,9 @@ bool ExecutorWorker::propagateCreateToDbAndTree(SyncOpPtr syncOp, const NodeId &
updateTree->insertNode(node);

newCorrespondingParentNode->insertChildren(node);

// Affected node does not have a valid DB ID yet, update it
syncOp->affectedNode()->setIdb(newDbNodeId);
}

return true;
Expand Down

0 comments on commit 4d11482

Please sign in to comment.