D20471: Add "What's This?" to nearly everything in the main window

Elvis Angelaccio noreply at phabricator.kde.org
Sun May 19 11:09:51 BST 2019


elvisangelaccio requested changes to this revision.
elvisangelaccio added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> dolphinmainwindow.cpp:82-83
>  #include <QToolButton>
> +#include <QWhatsThisClickedEvent>
> +#include <QDesktopServices>
>  

Please keep the includes sorted by name.

> dolphinmainwindow.cpp:1155
> +    // Cut, Copy and Paste
> +    QString cutCopyPastePara = xi18nc("@info:whatsthis", "<para><emphasis>Cut, "
> +        "Copy</emphasis> and <emphasis>Paste</emphasis> work between many "

Please add `const`

> dolphinmainwindow.cpp:1161
> +        "<shortcut>Ctrl+C</shortcut> and <shortcut>Ctrl+V</shortcut>.</para>");
> +    QAction* cut = KStandardAction::cut(this, &DolphinMainWindow::cut, actionCollection());
> +    cut->setWhatsThis(xi18nc("@info:whatsthis cut", "Copies the items in your "

Please call it `cutAction`. (I know we use `paste` below for the paste action, but that's old code).

> dolphinmainwindow.cpp:1167
> +        + cutCopyPastePara);
> +    QAction* copy = KStandardAction::copy(this, &DolphinMainWindow::copy, actionCollection());
> +    copy->setWhatsThis(xi18nc("@info:whatsthis copy", "Copies the items in your "

Please call it `copyAction`.

> dolphinmainwindow.cpp:1182
> +
> +    QAction* find = KStandardAction::find(this, &DolphinMainWindow::find, actionCollection());
> +    find->setToolTip(i18nc("@info:tooltip", "Find files and folders"));

Please call it `findAction`.

> dolphinmainwindow.cpp:1191
> +
> +    QAction* selectAll = KStandardAction::selectAll(this, &DolphinMainWindow::selectAll, actionCollection());
> +    selectAll->setWhatsThis(xi18nc("@info:whatsthis", "Selects all files "

Please call it `selectAllAction`.

> dolphinmainwindow.cpp:1427
> +    // i18n: This is the last paragraph for the "What's This"-texts of all four panels.
> +    QString panelWhatsThis = xi18nc("@info:whatsthis", "<para>To show or "
> +        "hide panels like this go to <interface>Control|Panels</interface> "

Please add `const`

> dolphinmainwindow.cpp:1912
> +    // The same is in my opinion true for every external link you translate.
> +    QString whatsThisHelpContents = xi18nc("@info:whatsthis handbook","<para>This "
> +        "opens the Handbook for this application. It provides explanations "

Please add `const`

> dolphinmainwindow.cpp:1928
> +        
> +    QString whatsThisWhatsThis = xi18nc("@info:whatsthis whatsthis button",
> +        "<para>This is the button that invokes the help feature you are "

Funny name :D

Please add `const` here as well

> dolphinmainwindow.cpp:1950
> +    
> +    QString whatsThisReportBug = xi18nc("@info:whatsthis","<para>This opens a "
> +        "window that will guide you through reporting errors or flaws "

Please add `const`

> dolphinmainwindow.cpp:1962
> +        
> +    QString whatsThisDonate = xi18nc("@info:whatsthis","<para>This opens a "
> +        "<emphasis>web page</emphasis> where you can donate to "

Please add `const`

> dolphinmainwindow.cpp:1976
> +        
> +    QString whatsThisSwitchLanguage = xi18nc("@info:whatsthis",
> +        "With this you can change the language this application uses."

Please add `const`

> dolphinmainwindow.cpp:1984
> +        
> +    QString whatsThisAboutApp = xi18nc("@info:whatsthis","This opens a "
> +        "window that informs you about the version, license, "

Please add `const`

> dolphinmainwindow.cpp:1991
> +        
> +    QString whatsThisAboutKDE = xi18nc("@info:whatsthis","This opens a "
> +        "window with information about <emphasis>KDE</emphasis>. "

Please add `const`

> dolphinmainwindow.cpp:2003-2009
> +    if(event->type()==QEvent::WhatsThisClicked)
> +    {
> +        event->accept();
> +        QWhatsThisClickedEvent* whatsThisEvent = dynamic_cast<QWhatsThisClickedEvent*>(event);
> +        QDesktopServices::openUrl(QUrl(whatsThisEvent->href()));
> +        return true;
> +    }

Coding style: please use

  if (event->type() == QEvent::WhatsThisClicked) {
  
  }

> dolphinmainwindow.cpp:2014
> +{
> +    Q_UNUSED(obj);
> +    if(event->type()==QEvent::WhatsThisClicked)

Unnecessary semicolon.

> dolphinmainwindow.cpp:2015-2021
> +    if(event->type()==QEvent::WhatsThisClicked)
> +    {
> +        event->accept();
> +        QWhatsThisClickedEvent* whatsThisEvent = dynamic_cast<QWhatsThisClickedEvent*>(event);
> +        QDesktopServices::openUrl(QUrl(whatsThisEvent->href()));
> +        return true;
> +    }

Coding style (same as above).

REPOSITORY
  R318 Dolphin

REVISION DETAIL
  https://phabricator.kde.org/D20471

To: felixernst, #dolphin, elvisangelaccio
Cc: elvisangelaccio, yurchor, kfm-devel, alexde, feverfew, meven, spoorun, navarromorales, firef, andrebarros, emmanuelp, mikesomov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20190519/922f0392/attachment.htm>


More information about the kfm-devel mailing list