Re: Review Request 128499: KNewFileMenu: Fix suggestion of new filename when file already exist in desktop

2016-07-22 Thread Chinmoy Ranjan Pradhan

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128499/
---

(Updated July 22, 2016, 10:01 p.m.)


Status
--

This change has been marked as submitted.


Review request for KDE Frameworks and David Faure.


Changes
---

Submitted with commit 2dd13d36f3f9810c8d92acfff89e9cd6e1c63689 by David Faure 
on behalf of Chinmoy Ranjan Pradhan to branch master.


Repository: kio


Description
---

When creating a new file, if a file with the default name already exist then a 
new name is suggested by KIO::suggestName. Now this works fine until the scheme 
of file's url is "file" but in case the scheme is "desktop" (like when the url 
in dolphin is set to desktop:/ or "Folder View Settings > Location" is set to 
desktop:/) then the check for file's existence fails because QFile::exists 
doesn't understand the "desktop" scheme. So KIO::suggestName is not called and 
no new filename is suggested in case a file with the same filename already 
exist. To fix this i used KNewFileMenuPrivate::mostLocalUrl in 
KNewFileFileMenu::executeRealFileorDir which will resolve "desktop:/" to the 
user's desktop path.


Diffs
-

  src/filewidgets/knewfilemenu.cpp 7374417 

Diff: https://git.reviewboard.kde.org/r/128499/diff/


Testing
---


Thanks,

Chinmoy Ranjan Pradhan

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Review Request 128499: KNewFileMenu: Fix suggestion of new filename when file already exist in desktop

2016-07-22 Thread David Faure

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128499/#review97767
---


Ship it!




Ship It!

- David Faure


On July 22, 2016, 2:48 p.m., Chinmoy Ranjan Pradhan wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/128499/
> ---
> 
> (Updated July 22, 2016, 2:48 p.m.)
> 
> 
> Review request for KDE Frameworks and David Faure.
> 
> 
> Repository: kio
> 
> 
> Description
> ---
> 
> When creating a new file, if a file with the default name already exist then 
> a new name is suggested by KIO::suggestName. Now this works fine until the 
> scheme of file's url is "file" but in case the scheme is "desktop" (like when 
> the url in dolphin is set to desktop:/ or "Folder View Settings > Location" 
> is set to desktop:/) then the check for file's existence fails because 
> QFile::exists doesn't understand the "desktop" scheme. So KIO::suggestName is 
> not called and no new filename is suggested in case a file with the same 
> filename already exist. To fix this i used KNewFileMenuPrivate::mostLocalUrl 
> in KNewFileFileMenu::executeRealFileorDir which will resolve "desktop:/" to 
> the user's desktop path.
> 
> 
> Diffs
> -
> 
>   src/filewidgets/knewfilemenu.cpp 7374417 
> 
> Diff: https://git.reviewboard.kde.org/r/128499/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Chinmoy Ranjan Pradhan
> 
>

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Review Request 128499: KNewFileMenu: Fix suggestion of new filename when file already exist in desktop

2016-07-22 Thread Chinmoy Ranjan Pradhan

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128499/
---

(Updated July 22, 2016, 2:48 p.m.)


Review request for KDE Frameworks and David Faure.


Repository: kio


Description
---

When creating a new file, if a file with the default name already exist then a 
new name is suggested by KIO::suggestName. Now this works fine until the scheme 
of file's url is "file" but in case the scheme is "desktop" (like when the url 
in dolphin is set to desktop:/ or "Folder View Settings > Location" is set to 
desktop:/) then the check for file's existence fails because QFile::exists 
doesn't understand the "desktop" scheme. So KIO::suggestName is not called and 
no new filename is suggested in case a file with the same filename already 
exist. To fix this i used KNewFileMenuPrivate::mostLocalUrl in 
KNewFileFileMenu::executeRealFileorDir which will resolve "desktop:/" to the 
user's desktop path.


Diffs (updated)
-

  src/filewidgets/knewfilemenu.cpp 7374417 

Diff: https://git.reviewboard.kde.org/r/128499/diff/


Testing
---


Thanks,

Chinmoy Ranjan Pradhan

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Review Request 128499: KNewFileMenu: Fix suggestion of new filename when file already exist in desktop

2016-07-22 Thread Chinmoy Ranjan Pradhan

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128499/
---

(Updated July 22, 2016, 12:05 p.m.)


Review request for KDE Frameworks and David Faure.


Repository: kio


Description
---

When creating a new file, if a file with the default name already exist then a 
new name is suggested by KIO::suggestName. Now this works fine until the scheme 
of file's url is "file" but in case the scheme is "desktop" (like when the url 
in dolphin is set to desktop:/ or "Folder View Settings > Location" is set to 
desktop:/) then the check for file's existence fails because QFile::exists 
doesn't understand the "desktop" scheme. So KIO::suggestName is not called and 
no new filename is suggested in case a file with the same filename already 
exist. To fix this i used KNewFileMenuPrivate::mostLocalUrl in 
KNewFileFileMenu::executeRealFileorDir which will resolve "desktop:/" to the 
user's desktop path.


Diffs (updated)
-

  src/filewidgets/knewfilemenu.cpp 2e613b1 

Diff: https://git.reviewboard.kde.org/r/128499/diff/


Testing
---


Thanks,

Chinmoy Ranjan Pradhan

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Review Request 128499: KNewFileMenu: Fix suggestion of new filename when file already exist in desktop

2016-07-22 Thread David Faure

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128499/#review97757
---




src/filewidgets/knewfilemenu.cpp (line 453)


Almost: this should be .toLocalFile() instead of .path()(same on Unix, 
but more correct on Windows).

I like this - both variables can be const now.

Thanks for yet another update, I'll look into adding a corresponding 
unittest (tonight).


- David Faure


On July 22, 2016, 9:45 a.m., Chinmoy Ranjan Pradhan wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/128499/
> ---
> 
> (Updated July 22, 2016, 9:45 a.m.)
> 
> 
> Review request for KDE Frameworks and David Faure.
> 
> 
> Repository: kio
> 
> 
> Description
> ---
> 
> When creating a new file, if a file with the default name already exist then 
> a new name is suggested by KIO::suggestName. Now this works fine until the 
> scheme of file's url is "file" but in case the scheme is "desktop" (like when 
> the url in dolphin is set to desktop:/ or "Folder View Settings > Location" 
> is set to desktop:/) then the check for file's existence fails because 
> QFile::exists doesn't understand the "desktop" scheme. So KIO::suggestName is 
> not called and no new filename is suggested in case a file with the same 
> filename already exist. To fix this i used KNewFileMenuPrivate::mostLocalUrl 
> in KNewFileFileMenu::executeRealFileorDir which will resolve "desktop:/" to 
> the user's desktop path.
> 
> 
> Diffs
> -
> 
>   src/filewidgets/knewfilemenu.cpp 2e613b1 
> 
> Diff: https://git.reviewboard.kde.org/r/128499/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Chinmoy Ranjan Pradhan
> 
>

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Review Request 128499: KNewFileMenu: Fix suggestion of new filename when file already exist in desktop

2016-07-22 Thread Chinmoy Ranjan Pradhan

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128499/
---

(Updated July 22, 2016, 9:45 a.m.)


Review request for KDE Frameworks and David Faure.


Changes
---

i guess this can be done without setPath at all.


Repository: kio


Description
---

When creating a new file, if a file with the default name already exist then a 
new name is suggested by KIO::suggestName. Now this works fine until the scheme 
of file's url is "file" but in case the scheme is "desktop" (like when the url 
in dolphin is set to desktop:/ or "Folder View Settings > Location" is set to 
desktop:/) then the check for file's existence fails because QFile::exists 
doesn't understand the "desktop" scheme. So KIO::suggestName is not called and 
no new filename is suggested in case a file with the same filename already 
exist. To fix this i used KNewFileMenuPrivate::mostLocalUrl in 
KNewFileFileMenu::executeRealFileorDir which will resolve "desktop:/" to the 
user's desktop path.


Diffs (updated)
-

  src/filewidgets/knewfilemenu.cpp 2e613b1 

Diff: https://git.reviewboard.kde.org/r/128499/diff/


Testing
---


Thanks,

Chinmoy Ranjan Pradhan

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Review Request 128499: KNewFileMenu: Fix suggestion of new filename when file already exist in desktop

2016-07-22 Thread Chinmoy Ranjan Pradhan


> On July 22, 2016, 7:22 a.m., David Faure wrote:
> > src/filewidgets/knewfilemenu.cpp, line 481
> > 
> >
> > Wait, isn't m_popupFiles the dir where we opened the popupmenu? Why the 
> > RemoveFilename then?

m_popupFiles may contain a url with desktop protocol. To get the path to 
desktop i had used RemoveFilename.


- Chinmoy


---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128499/#review97746
---


On July 22, 2016, 6:35 a.m., Chinmoy Ranjan Pradhan wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/128499/
> ---
> 
> (Updated July 22, 2016, 6:35 a.m.)
> 
> 
> Review request for KDE Frameworks and David Faure.
> 
> 
> Repository: kio
> 
> 
> Description
> ---
> 
> When creating a new file, if a file with the default name already exist then 
> a new name is suggested by KIO::suggestName. Now this works fine until the 
> scheme of file's url is "file" but in case the scheme is "desktop" (like when 
> the url in dolphin is set to desktop:/ or "Folder View Settings > Location" 
> is set to desktop:/) then the check for file's existence fails because 
> QFile::exists doesn't understand the "desktop" scheme. So KIO::suggestName is 
> not called and no new filename is suggested in case a file with the same 
> filename already exist. To fix this i used KNewFileMenuPrivate::mostLocalUrl 
> in KNewFileFileMenu::executeRealFileorDir which will resolve "desktop:/" to 
> the user's desktop path.
> 
> 
> Diffs
> -
> 
>   src/filewidgets/knewfilemenu.cpp 2e613b1 
> 
> Diff: https://git.reviewboard.kde.org/r/128499/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Chinmoy Ranjan Pradhan
> 
>

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Review Request 128499: KNewFileMenu: Fix suggestion of new filename when file already exist in desktop

2016-07-22 Thread Chinmoy Ranjan Pradhan

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128499/
---

(Updated July 22, 2016, 8:51 a.m.)


Review request for KDE Frameworks and David Faure.


Repository: kio


Description
---

When creating a new file, if a file with the default name already exist then a 
new name is suggested by KIO::suggestName. Now this works fine until the scheme 
of file's url is "file" but in case the scheme is "desktop" (like when the url 
in dolphin is set to desktop:/ or "Folder View Settings > Location" is set to 
desktop:/) then the check for file's existence fails because QFile::exists 
doesn't understand the "desktop" scheme. So KIO::suggestName is not called and 
no new filename is suggested in case a file with the same filename already 
exist. To fix this i used KNewFileMenuPrivate::mostLocalUrl in 
KNewFileFileMenu::executeRealFileorDir which will resolve "desktop:/" to the 
user's desktop path.


Diffs (updated)
-

  src/filewidgets/knewfilemenu.cpp 2e613b1 

Diff: https://git.reviewboard.kde.org/r/128499/diff/


Testing
---


Thanks,

Chinmoy Ranjan Pradhan

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Review Request 128499: KNewFileMenu: Fix suggestion of new filename when file already exist in desktop

2016-07-22 Thread David Faure

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128499/#review97746
---




src/filewidgets/knewfilemenu.cpp (line 481)


Wait, isn't m_popupFiles the dir where we opened the popupmenu? Why the 
RemoveFilename then?


- David Faure


On July 22, 2016, 6:35 a.m., Chinmoy Ranjan Pradhan wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/128499/
> ---
> 
> (Updated July 22, 2016, 6:35 a.m.)
> 
> 
> Review request for KDE Frameworks and David Faure.
> 
> 
> Repository: kio
> 
> 
> Description
> ---
> 
> When creating a new file, if a file with the default name already exist then 
> a new name is suggested by KIO::suggestName. Now this works fine until the 
> scheme of file's url is "file" but in case the scheme is "desktop" (like when 
> the url in dolphin is set to desktop:/ or "Folder View Settings > Location" 
> is set to desktop:/) then the check for file's existence fails because 
> QFile::exists doesn't understand the "desktop" scheme. So KIO::suggestName is 
> not called and no new filename is suggested in case a file with the same 
> filename already exist. To fix this i used KNewFileMenuPrivate::mostLocalUrl 
> in KNewFileFileMenu::executeRealFileorDir which will resolve "desktop:/" to 
> the user's desktop path.
> 
> 
> Diffs
> -
> 
>   src/filewidgets/knewfilemenu.cpp 2e613b1 
> 
> Diff: https://git.reviewboard.kde.org/r/128499/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Chinmoy Ranjan Pradhan
> 
>

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Review Request 128499: KNewFileMenu: Fix suggestion of new filename when file already exist in desktop

2016-07-22 Thread David Faure

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128499/#review97745
---



Looks good expect for the unrelated change


src/filewidgets/knewfilemenu.cpp (line 289)


This change belongs to another commit.


- David Faure


On July 22, 2016, 6:35 a.m., Chinmoy Ranjan Pradhan wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/128499/
> ---
> 
> (Updated July 22, 2016, 6:35 a.m.)
> 
> 
> Review request for KDE Frameworks and David Faure.
> 
> 
> Repository: kio
> 
> 
> Description
> ---
> 
> When creating a new file, if a file with the default name already exist then 
> a new name is suggested by KIO::suggestName. Now this works fine until the 
> scheme of file's url is "file" but in case the scheme is "desktop" (like when 
> the url in dolphin is set to desktop:/ or "Folder View Settings > Location" 
> is set to desktop:/) then the check for file's existence fails because 
> QFile::exists doesn't understand the "desktop" scheme. So KIO::suggestName is 
> not called and no new filename is suggested in case a file with the same 
> filename already exist. To fix this i used KNewFileMenuPrivate::mostLocalUrl 
> in KNewFileFileMenu::executeRealFileorDir which will resolve "desktop:/" to 
> the user's desktop path.
> 
> 
> Diffs
> -
> 
>   src/filewidgets/knewfilemenu.cpp 2e613b1 
> 
> Diff: https://git.reviewboard.kde.org/r/128499/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Chinmoy Ranjan Pradhan
> 
>

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Review Request 128499: KNewFileMenu: Fix suggestion of new filename when file already exist in desktop

2016-07-22 Thread Chinmoy Ranjan Pradhan

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128499/
---

(Updated July 22, 2016, 6:35 a.m.)


Review request for KDE Frameworks and David Faure.


Repository: kio


Description
---

When creating a new file, if a file with the default name already exist then a 
new name is suggested by KIO::suggestName. Now this works fine until the scheme 
of file's url is "file" but in case the scheme is "desktop" (like when the url 
in dolphin is set to desktop:/ or "Folder View Settings > Location" is set to 
desktop:/) then the check for file's existence fails because QFile::exists 
doesn't understand the "desktop" scheme. So KIO::suggestName is not called and 
no new filename is suggested in case a file with the same filename already 
exist. To fix this i used KNewFileMenuPrivate::mostLocalUrl in 
KNewFileFileMenu::executeRealFileorDir which will resolve "desktop:/" to the 
user's desktop path.


Diffs
-

  src/filewidgets/knewfilemenu.cpp 2e613b1 

Diff: https://git.reviewboard.kde.org/r/128499/diff/


Testing
---


Thanks,

Chinmoy Ranjan Pradhan

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel