]> cloud.milkyroute.net Git - dolphin.git/commitdiff
display an error message if the the user tries to set an invalid home URL in the...
authorPeter Penz <peter.penz19@gmail.com>
Thu, 14 Feb 2008 21:35:57 +0000 (21:35 +0000)
committerPeter Penz <peter.penz19@gmail.com>
Thu, 14 Feb 2008 21:35:57 +0000 (21:35 +0000)
svn path=/trunk/KDE/kdebase/apps/; revision=775098

src/startupsettingspage.cpp

index e3f237ca9bb5a21be47b566a1816210a3b902a62..a7c62254e55b8f02c11b718c55d7ea5580aa6a0a 100644 (file)
@@ -29,6 +29,7 @@
 #include <kdialog.h>
 #include <kfiledialog.h>
 #include <klocale.h>
+#include <kmessagebox.h>
 #include <kvbox.h>
 
 #include <QCheckBox>
@@ -103,9 +104,11 @@ void StartupSettingsPage::applySettings()
     GeneralSettings* settings = DolphinSettings::instance().generalSettings();
 
     const KUrl url(m_homeUrl->text());
-    KFileItem fileItem(S_IFDIR, KFileItem::Unknown, url);
+    KFileItem fileItem(KFileItem::Unknown, KFileItem::Unknown, url);
     if (url.isValid() && fileItem.isDir()) {
         settings->setHomeUrl(url.prettyUrl());
+    } else {
+        KMessageBox::error(this, i18n("The location for the home folder is invalid and will not get applied."));
     }
 
     settings->setSplitView(m_splitView->isChecked());