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

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

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

David Barchiesi
View Revision
elvisangelaccio requested changes to this revision.
elvisangelaccio added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS
View Inlinedolphinmainwindow.cpp:82-83
#include <QToolButton>
#include <QWhatsThisClickedEvent>
#include <QDesktopServices>

Please keep the includes sorted by name.


View Inlinedolphinmainwindow.cpp:1155
KStandardAction::cut(this, &DolphinMainWindow::cut, actionCollection());
KStandardAction::copy(this, &DolphinMainWindow::copy, actionCollection());
// Cut, Copy and Paste
QString cutCopyPastePara = xi18nc("@info:whatsthis", "<para><emphasis>Cut, "
"Copy</emphasis> and <emphasis>Paste</emphasis> work between many "

Please add const


View Inlinedolphinmainwindow.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).


View Inlinedolphinmainwindow.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.


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

Please call it findAction.


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

Please call it selectAllAction.


View Inlinedolphinmainwindow.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


View Inlinedolphinmainwindow.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


View Inlinedolphinmainwindow.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


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

Please add const


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

Please add const


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

Please add const


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

Please add const


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

Please add const


View Inlinedolphinmainwindow.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) {

}

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

Unnecessary semicolon.


View Inlinedolphinmainwindow.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


To: felixernst, Dolphin, elvisangelaccio
Cc: elvisangelaccio, yurchor, kfm-devel, alexde, feverfew, meven, spoorun, navarromorales, firef, andrebarros, emmanuelp, mikesomov