From kde-core-devel Fri Apr 11 15:04:29 2008 From: =?UTF-8?B?SmFyb3PFgmF3IFN0YW5pZWs=?= Date: Fri, 11 Apr 2008 15:04:29 +0000 To: kde-core-devel Subject: [patch] KFileWidget: fix changing the current dir using url combo box Message-Id: <47FF7DFD.9030201 () iidea ! pl> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=120792630102472 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--------------010900000602020503020406" This is a multi-part message in MIME format. --------------010900000602020503020406 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit for review: Fix changing the current dir using the 'recent url' combo box. Upon accepting new url in the 'directory' url combo box, append '/' if needed: the combo does not add it, but tokenize() expects it because uses KUrl::setFileName(), which would silently remove the last segment of the path. I guess it was a crossplatform issue. Without the patch, if you select /home/js/foo/bar from the url combo box, and click on file.txt, the resulting url would be /home/js/foo/file.txt, not the expected /home/js/foo/bar/file.txt. -- regards / pozdrawiam, Jaroslaw Staniek Sponsored by OpenOffice Polska (http://www.openoffice.com.pl/en) to work on Kexi & KOffice (http://www.kexi.pl/en, http://www.koffice.org/kexi) KDE Libraries for MS Windows (http://windows.kde.org) --------------010900000602020503020406 Content-Type: text/plain; name="kfilewidget-urlcombo.patch" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="kfilewidget-urlcombo.patch" SW5kZXg6IGtmaWxlL2tmaWxld2lkZ2V0LmNwcA0KPT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KLS0tIGtmaWxl L2tmaWxld2lkZ2V0LmNwcAkod2Vyc2phIDc5NTgzNykNCisrKyBrZmlsZS9rZmlsZXdpZGdl dC5jcHAJKGtvcGlhIHJvYm9jemEpDQpAQCAtMTIwMiwxMiArMTIwMiwxNiBAQA0KIAogdm9p ZCBLRmlsZVdpZGdldFByaXZhdGU6Ol9rX2VudGVyVXJsKCBjb25zdCBLVXJsJiB1cmwgKQog ewotICAgIHEtPnNldFVybCggdXJsICk7CisgICAgS1VybCBmaXhlZFVybCggdXJsICk7Cisg ICAgLy8gYXBwZW5kICcvJyBpZiBuZWVkZWQ6IHVybCBjb21ibyBkb2VzIG5vdCBhZGQgaXQK KyAgICAvLyB0b2tlbml6ZSgpIGV4cGVjdHMgaXQgYmVjYXVzZSB1c2VzIEtVcmw6OnNldEZp bGVOYW1lKCkKKyAgICBmaXhlZFVybC5hZGp1c3RQYXRoKCBLVXJsOjpBZGRUcmFpbGluZ1Ns YXNoICk7CisgICAgcS0+c2V0VXJsKCBmaXhlZFVybCApOwogfQogCiB2b2lkIEtGaWxlV2lk Z2V0UHJpdmF0ZTo6X2tfZW50ZXJVcmwoIGNvbnN0IFFTdHJpbmcmIHVybCApCiB7Ci0gICAg cS0+c2V0VXJsKCBLVXJsKCBLVXJsQ29tcGxldGlvbjo6cmVwbGFjZWRQYXRoKCB1cmwsIHRy dWUsIHRydWUgKSkgKTsKKyAgICBfa19lbnRlclVybCggS1VybCggS1VybENvbXBsZXRpb246 OnJlcGxhY2VkUGF0aCggdXJsLCB0cnVlLCB0cnVlICkpICk7CiB9CiAKIAo= --------------010900000602020503020406--