┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/panels/places/placesitemeditdialog.cpp
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2012-04-30 18:26:21 +0200
committerPeter Penz <[email protected]>2012-04-30 18:27:56 +0200
commitcb1f42a1eb3584742fa33e28759ed8fbab199c5b (patch)
tree84aee132d0fdb4d00abefb6b4ee4acdb3c6a36a0 /src/panels/places/placesitemeditdialog.cpp
parentb419cfc5974192f3445b6a439b40bae4af119615 (diff)
Places Panel: Minor fixes/improvements
- Determine group of a new entry dependent from the protocol - Allow panels to forward error-messages to the view-container (also applied to Folders Panel)
Diffstat (limited to 'src/panels/places/placesitemeditdialog.cpp')
-rw-r--r--src/panels/places/placesitemeditdialog.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/panels/places/placesitemeditdialog.cpp b/src/panels/places/placesitemeditdialog.cpp
index 0fdd03060..f8b985f6f 100644
--- a/src/panels/places/placesitemeditdialog.cpp
+++ b/src/panels/places/placesitemeditdialog.cpp
@@ -25,6 +25,7 @@
#include <KAboutData>
#include <KComponentData>
+#include <KDebug>
#include <KFile>
#include <KIconButton>
#include <KLineEdit>
@@ -69,7 +70,12 @@ void PlacesItemEditDialog::setText(const QString& text)
QString PlacesItemEditDialog::text() const
{
- return m_textEdit->text().isEmpty() ? m_urlEdit->url().fileName() : m_textEdit->text();
+ QString text = m_textEdit->text();
+ if (text.isEmpty()) {
+ const KUrl url = m_urlEdit->url();
+ text = url.fileName().isEmpty() ? url.prettyUrl() : url.fileName();
+ }
+ return text;
}
void PlacesItemEditDialog::setUrl(const KUrl& url)