From d975416a534ccc26483a3ce06bd1d2a94f1aaf8f Mon Sep 17 00:00:00 2001 From: Volker Lanz Date: Sat, 16 Jan 2010 22:31:39 +0000 Subject: [PATCH] allow removing a mount point by clearing its mount path svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1075868 --- src/gui/editmountpointdialog.cpp | 7 ------- src/gui/editmountpointdialogwidget.cpp | 3 +++ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/gui/editmountpointdialog.cpp b/src/gui/editmountpointdialog.cpp index ef5307c..f3b8170 100644 --- a/src/gui/editmountpointdialog.cpp +++ b/src/gui/editmountpointdialog.cpp @@ -38,13 +38,6 @@ EditMountPointDialog::EditMountPointDialog(QWidget* parent, Partition& p) : void EditMountPointDialog::accept() { - if (widget().editPath().text().isEmpty()) - { - KMessageBox::sorry(this, i18n("The path can not be empty\n\nPlease fill in a valid path or \"none\" if the file system does not require a path to be set (e.g. swap)."), i18n("Error")); - widget().editPath().setFocus(Qt::OtherFocusReason); - return; - } - if (KMessageBox::warningContinueCancel(this, i18nc("@info", "Are you sure you want to save the changes you made to the system table file /etc/fstab?" "This will overwrite the existing file on your hard drive now. This can not be undone."), diff --git a/src/gui/editmountpointdialogwidget.cpp b/src/gui/editmountpointdialogwidget.cpp index 12a5416..f859a32 100644 --- a/src/gui/editmountpointdialogwidget.cpp +++ b/src/gui/editmountpointdialogwidget.cpp @@ -254,6 +254,9 @@ static void writeEntry(QFile& output, const MountEntry* entry) if (entry == NULL) return; + if (entry->path.isEmpty()) + return; + QTextStream s(&output); s << entry->name << "\t"