D13805: Present error dialog when user tries to create directory named "." or ".."
Elvis Angelaccio
noreply at phabricator.kde.org
Sun Jul 1 21:14:25 BST 2018
elvisangelaccio requested changes to this revision.
elvisangelaccio added inline comments.
This revision now requires changes to proceed.
INLINE COMMENTS
> knewfilemenu.cpp:860
> + // Test to see if the user has given "." or ".." as a name
> + if (name == "." || name == "..") {
> + KGuiItem cancelGuiItem(KStandardGuiItem::cancel());
Please use `QLatin1String` here, which is faster for string comparisons.
> knewfilemenu.cpp:874
> + KMessageBox::createKMessageBox(confirmDialog, buttonBox, QMessageBox::Critical,
> + i18n("Folder \"%1\" could not be created:\n\"%1\" is reserved for use by the operating system.", name),
> + QStringList(),
Please use semantic markup here: https://api.kde.org/frameworks/ki18n/html/prg_guide.html#kuit_markup
tl;dr use `<filename>%1</filename>` instead of `\"%1\"` and `<nl/>` instead of `\n`
> knewfilemenu.cpp:876
> + QStringList(),
> + "",
> + nullptr,
Please use `QString()` here
> knewfilemenu.cpp:884
> + confirmDialog->show();
> + m_text = "";
> + return;
`m_text = QString()`, like we already do in `_k_slotAbortDialog()`.
REPOSITORY
R241 KIO
REVISION DETAIL
https://phabricator.kde.org/D13805
To: tmarshall, #dolphin, #frameworks, ngraham, dfaure, elvisangelaccio
Cc: cfeck, elvisangelaccio, dfaure, tmarshall, bruns, ngraham, kde-frameworks-devel, michaelh, spoorun, navarromorales, isidorov, firef, andrebarros, emmanuelp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20180701/13e343a9/attachment.htm>
More information about the kfm-devel
mailing list