Commit be675547 authored by Kurt Hindenburg's avatar Kurt Hindenburg

uncrustify using kf5 config

parent 9ba7594e
......@@ -30,36 +30,36 @@
using namespace Konsole;
const TabTitleFormatButton::Element TabTitleFormatButton::_localElements[] = {
{ QStringLiteral("%n") , I18N_NOOP("Program Name: %n") },
{ QStringLiteral("%d") , I18N_NOOP("Current Directory (Short): %d") },
{ QStringLiteral("%D") , I18N_NOOP("Current Directory (Long): %D") },
{ QStringLiteral("%w") , I18N_NOOP("Window Title Set by Shell: %w") },
{ QStringLiteral("%#") , I18N_NOOP("Session Number: %#") },
{ QStringLiteral("%u") , I18N_NOOP("User Name: %u") },
{ QStringLiteral("%h") , I18N_NOOP("Local Host: %h") }
{ QStringLiteral("%n"), I18N_NOOP("Program Name: %n") },
{ QStringLiteral("%d"), I18N_NOOP("Current Directory (Short): %d") },
{ QStringLiteral("%D"), I18N_NOOP("Current Directory (Long): %D") },
{ QStringLiteral("%w"), I18N_NOOP("Window Title Set by Shell: %w") },
{ QStringLiteral("%#"), I18N_NOOP("Session Number: %#") },
{ QStringLiteral("%u"), I18N_NOOP("User Name: %u") },
{ QStringLiteral("%h"), I18N_NOOP("Local Host: %h") }
};
const int TabTitleFormatButton::_localElementCount =
sizeof(_localElements) / sizeof(TabTitleFormatButton::Element);
const int TabTitleFormatButton::_localElementCount
= sizeof(_localElements) / sizeof(TabTitleFormatButton::Element);
const TabTitleFormatButton::Element TabTitleFormatButton::_remoteElements[] = {
{ QStringLiteral("%u") , I18N_NOOP("User Name: %u") },
{ QStringLiteral("%U") , I18N_NOOP("User Name@ (if given): %U") },
{ QStringLiteral("%h") , I18N_NOOP("Remote Host (Short): %h") },
{ QStringLiteral("%H") , I18N_NOOP("Remote Host (Long): %H") },
{ QStringLiteral("%c") , I18N_NOOP("Command and arguments: %c") },
{ QStringLiteral("%w") , I18N_NOOP("Window Title Set by Shell: %w") },
{ QStringLiteral("%#") , I18N_NOOP("Session Number: %#") }
{ QStringLiteral("%u"), I18N_NOOP("User Name: %u") },
{ QStringLiteral("%U"), I18N_NOOP("User Name@ (if given): %U") },
{ QStringLiteral("%h"), I18N_NOOP("Remote Host (Short): %h") },
{ QStringLiteral("%H"), I18N_NOOP("Remote Host (Long): %H") },
{ QStringLiteral("%c"), I18N_NOOP("Command and arguments: %c") },
{ QStringLiteral("%w"), I18N_NOOP("Window Title Set by Shell: %w") },
{ QStringLiteral("%#"), I18N_NOOP("Session Number: %#") }
};
const int TabTitleFormatButton::_remoteElementCount =
sizeof(_remoteElements) / sizeof(TabTitleFormatButton::Element);
const int TabTitleFormatButton::_remoteElementCount
= sizeof(_remoteElements) / sizeof(TabTitleFormatButton::Element);
TabTitleFormatButton::TabTitleFormatButton(QWidget* aParent)
: QPushButton(aParent)
, _context(Session::LocalTabTitle)
TabTitleFormatButton::TabTitleFormatButton(QWidget *aParent) :
QPushButton(aParent),
_context(Session::LocalTabTitle)
{
setText(i18n("Insert"));
setMenu(new QMenu());
connect(menu() , &QMenu::triggered , this , &Konsole::TabTitleFormatButton::fireElementSelected);
connect(menu(), &QMenu::triggered, this, &Konsole::TabTitleFormatButton::fireElementSelected);
}
TabTitleFormatButton::~TabTitleFormatButton()
......@@ -67,7 +67,7 @@ TabTitleFormatButton::~TabTitleFormatButton()
menu()->deleteLater();
}
void TabTitleFormatButton::fireElementSelected(QAction* action)
void TabTitleFormatButton::fireElementSelected(QAction *action)
{
emit dynamicElementSelected(action->data().toString());
}
......@@ -79,7 +79,7 @@ void TabTitleFormatButton::setContext(Session::TabTitleContext titleContext)
menu()->clear();
int count = 0;
const Element* array = 0;
const Element *array = 0;
if (titleContext == Session::LocalTabTitle) {
setToolTip(i18nc("@info:tooltip", "Insert title format"));
......@@ -91,11 +91,11 @@ void TabTitleFormatButton::setContext(Session::TabTitleContext titleContext)
count = _remoteElementCount;
}
QList<QAction*> menuActions;
QList<QAction *> menuActions;
menuActions.reserve(count);
for (int i = 0 ; i < count ; i++) {
QAction* action = new QAction(i18n(array[i].description), this);
for (int i = 0; i < count; i++) {
QAction *action = new QAction(i18n(array[i].description), this);
action->setData(array[i].element);
menuActions << action;
}
......@@ -107,4 +107,3 @@ Session::TabTitleContext TabTitleFormatButton::context() const
{
return _context;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment