diff options
| author | Peter Penz <[email protected]> | 2012-04-30 18:26:21 +0200 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2012-04-30 18:27:56 +0200 |
| commit | cb1f42a1eb3584742fa33e28759ed8fbab199c5b (patch) | |
| tree | 84aee132d0fdb4d00abefb6b4ee4acdb3c6a36a0 /src/panels/places/placesitemeditdialog.cpp | |
| parent | b419cfc5974192f3445b6a439b40bae4af119615 (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.cpp | 8 |
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) |
