-
Notifications
You must be signed in to change notification settings - Fork 807
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6153 from nextcloud/backport/6140/stable-3.10
[stable-3.10] Show more informative error message when VFS hydration fails. Displaya popup and put an error into activity list. More detailed logs.
- Loading branch information
Showing
10 changed files
with
295 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* Copyright (C) 2023 by Oleksandr Zolotov <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, but | ||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | ||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
* for more details. | ||
*/ | ||
#include "vfsdownloaderrordialog.h" | ||
#include "ui_vfsdownloaderrordialog.h" | ||
|
||
namespace OCC { | ||
|
||
VfsDownloadErrorDialog::VfsDownloadErrorDialog(const QString &fileName, const QString &errorMessage, QWidget *parent) | ||
: QDialog(parent) | ||
, _ui(new Ui::VfsDownloadErrorDialog) | ||
{ | ||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); | ||
|
||
_ui->setupUi(this); | ||
_ui->descriptionLabel->setText(tr("Error downloading %1").arg(fileName)); | ||
_ui->explanationLabel->setText(tr("%1 could not be downloaded.").arg(fileName)); | ||
_ui->moreDetailsLabel->setText(errorMessage); | ||
_ui->moreDetailsLabel->setVisible(false); | ||
|
||
connect(_ui->buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept); | ||
} | ||
|
||
VfsDownloadErrorDialog::~VfsDownloadErrorDialog() = default; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* Copyright (C) 2023 by Oleksandr Zolotov <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, but | ||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | ||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
* for more details. | ||
*/ | ||
#pragma once | ||
#include <QDialog> | ||
#include <QScopedPointer> | ||
|
||
namespace OCC { | ||
|
||
namespace Ui { | ||
class VfsDownloadErrorDialog; | ||
} | ||
|
||
class VfsDownloadErrorDialog : public QDialog | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
explicit VfsDownloadErrorDialog(const QString &fileName, const QString &errorMessage, QWidget *parent = nullptr); | ||
~VfsDownloadErrorDialog() override; | ||
|
||
private: | ||
QScopedPointer<Ui::VfsDownloadErrorDialog> _ui; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,166 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ui version="4.0"> | ||
<class>OCC::VfsDownloadErrorDialog</class> | ||
<widget class="QDialog" name="OCC::VfsDownloadErrorDialog"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>397</width> | ||
<height>155</height> | ||
</rect> | ||
</property> | ||
<property name="windowTitle"> | ||
<string>Download error</string> | ||
</property> | ||
<layout class="QVBoxLayout" name="verticalLayout"> | ||
<property name="sizeConstraint"> | ||
<enum>QLayout::SetDefaultConstraint</enum> | ||
</property> | ||
<item> | ||
<widget class="QLabel" name="descriptionLabel"> | ||
<property name="text"> | ||
<string>Error downloading</string> | ||
</property> | ||
<property name="textFormat"> | ||
<enum>Qt::PlainText</enum> | ||
</property> | ||
<property name="alignment"> | ||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> | ||
</property> | ||
<property name="wordWrap"> | ||
<bool>false</bool> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QLabel" name="explanationLabel"> | ||
<property name="text"> | ||
<string>could not be downloaded</string> | ||
</property> | ||
<property name="textFormat"> | ||
<enum>Qt::PlainText</enum> | ||
</property> | ||
<property name="alignment"> | ||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> | ||
</property> | ||
<property name="wordWrap"> | ||
<bool>false</bool> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QPushButton" name="moreDetailsButton"> | ||
<property name="sizePolicy"> | ||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> | ||
<horstretch>0</horstretch> | ||
<verstretch>0</verstretch> | ||
</sizepolicy> | ||
</property> | ||
<property name="text"> | ||
<string>> More details</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QLabel" name="moreDetailsLabel"> | ||
<property name="text"> | ||
<string>More details</string> | ||
</property> | ||
<property name="wordWrap"> | ||
<bool>true</bool> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QDialogButtonBox" name="buttonBox"> | ||
<property name="standardButtons"> | ||
<set>QDialogButtonBox::Ok</set> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QLabel" name="errorLabel"> | ||
<property name="palette"> | ||
<palette> | ||
<active> | ||
<colorrole role="WindowText"> | ||
<brush brushstyle="SolidPattern"> | ||
<color alpha="200"> | ||
<red>255</red> | ||
<green>0</green> | ||
<blue>0</blue> | ||
</color> | ||
</brush> | ||
</colorrole> | ||
</active> | ||
<inactive> | ||
<colorrole role="WindowText"> | ||
<brush brushstyle="SolidPattern"> | ||
<color alpha="200"> | ||
<red>255</red> | ||
<green>0</green> | ||
<blue>0</blue> | ||
</color> | ||
</brush> | ||
</colorrole> | ||
</inactive> | ||
<disabled> | ||
<colorrole role="WindowText"> | ||
<brush brushstyle="SolidPattern"> | ||
<color alpha="115"> | ||
<red>255</red> | ||
<green>255</green> | ||
<blue>255</blue> | ||
</color> | ||
</brush> | ||
</colorrole> | ||
</disabled> | ||
</palette> | ||
</property> | ||
<property name="text"> | ||
<string/> | ||
</property> | ||
<property name="textFormat"> | ||
<enum>Qt::PlainText</enum> | ||
</property> | ||
</widget> | ||
</item> | ||
</layout> | ||
</widget> | ||
<resources/> | ||
<connections> | ||
<connection> | ||
<sender>moreDetailsButton</sender> | ||
<signal>clicked()</signal> | ||
<receiver>moreDetailsLabel</receiver> | ||
<slot>show()</slot> | ||
<hints> | ||
<hint type="sourcelabel"> | ||
<x>47</x> | ||
<y>112</y> | ||
</hint> | ||
<hint type="destinationlabel"> | ||
<x>198</x> | ||
<y>141</y> | ||
</hint> | ||
</hints> | ||
</connection> | ||
<connection> | ||
<sender>moreDetailsButton</sender> | ||
<signal>clicked()</signal> | ||
<receiver>moreDetailsButton</receiver> | ||
<slot>hide()</slot> | ||
<hints> | ||
<hint type="sourcelabel"> | ||
<x>47</x> | ||
<y>63</y> | ||
</hint> | ||
<hint type="destinationlabel"> | ||
<x>47</x> | ||
<y>63</y> | ||
</hint> | ||
</hints> | ||
</connection> | ||
</connections> | ||
</ui> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters