~ubuntu-branches/ubuntu/jaunty/kdebase/jaunty-backports

« back to all changes in this revision

Viewing changes to apps/keditbookmarks/bookmarkinfo.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Steve Stalcup
  • Date: 2009-01-08 09:49:20 UTC
  • mfrom: (1.1.22 upstream)
  • Revision ID: james.westby@ubuntu.com-20090108094920-zbm1d1y0y3t5rpff
Tags: 4:4.1.96-0ubuntu1
* New upstream release
* Updated various .install files:
  + dolphin.install
  + kappfinder.install
  + kfind.install
  + konqueror.install
* Bumped build-dep versions

Show diffs side-by-side

added added

removed removed

Lines of Context:
79
79
        m_title_le->setText(bk.fullText());
80
80
 
81
81
    m_url_le->setReadOnly(bk.isGroup() || bk.isSeparator());
82
 
    QString urlText = bk.isGroup() ? QString() : bk.url().pathOrUrl();
83
 
    if (m_url_le->text() != urlText) {
84
 
        const int cursorPosition = m_url_le->cursorPosition(); 
85
 
        m_url_le->setText(urlText);
86
 
        m_url_le->setCursorPosition(cursorPosition); 
 
82
    if (bk.isGroup()) {
 
83
         m_url_le->setText(QString());
 
84
    }
 
85
    else {
 
86
        // Update the text if and only if the text represents a different URL to that
 
87
        // of the current bookmark - the old method, "m_url_le->text() != bk.url().pathOrUrl()",
 
88
        // created difficulties due to the ambiguity of converting URLs to text. (#172647)
 
89
        if (KUrl(m_url_le->text()) != bk.url()) {
 
90
            const int cursorPosition = m_url_le->cursorPosition(); 
 
91
            m_url_le->setText(bk.url().pathOrUrl());
 
92
            m_url_le->setCursorPosition(cursorPosition);
 
93
        }
87
94
    }
88
95
 
89
96
    m_comment_le->setReadOnly((bk.isSeparator()|| !bk.hasParent()) ? true : false );