ShareDialog: Reenable user input textedit on error #5694
authorChristian Kamm <mail@ckamm.de>
Tue, 11 Apr 2017 13:50:32 +0000 (15:50 +0200)
committerChristian Kamm <mail@ckamm.de>
Tue, 11 Apr 2017 13:50:32 +0000 (15:50 +0200)
src/gui/shareusergroupwidget.cpp

index 56edc33e202c87cdd53564147a977e54ee009083..7f530f13096d51e139f9d6251ee67d119b21d4fd 100644 (file)
@@ -280,9 +280,16 @@ void ShareUserGroupWidget::slotCompleterHighlighted(const QModelIndex & index)
 void ShareUserGroupWidget::displayError(int code, const QString& message)
 {
     _pi_sharee.stopAnimation();
+
+    // Also remove the spinner in the widget list, if any
+    foreach (auto pi, _ui->scrollArea->findChildren<QProgressIndicator*>()) {
+        delete pi;
+    }
+
     qDebug() << "Error from server" << code << message;
     _ui->errorLabel->setText(message);
     _ui->errorLabel->show();
+    _ui->shareeLineEdit->setEnabled(true);
 }
 
 ShareWidget::ShareWidget(QSharedPointer<Share> share,