Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit cf56e5db authored by Kurt Hindenburg's avatar Kurt Hindenburg

sync declarations with definitions (have .h and .cpp variable names match)

parent f60d9fc4
......@@ -149,12 +149,12 @@ public:
void setFaint();
/**
* Returns the color within the specified color @p palette
* Returns the color within the specified color @p base
*
* The @p palette is only used if this color is one of the 16 system colors, otherwise
* The @p base is only used if this color is one of the 16 system colors, otherwise
* it is ignored.
*/
QColor color(const ColorEntry *palette) const;
QColor color(const ColorEntry *base) const;
/**
* Compares two colors and returns true if they represent the same color value and
......
......@@ -200,9 +200,9 @@ ColorScheme::~ColorScheme()
delete[] _randomTable;
}
void ColorScheme::setDescription(const QString &aDescription)
void ColorScheme::setDescription(const QString &description)
{
_description = aDescription;
_description = description;
}
QString ColorScheme::description() const
......@@ -210,9 +210,9 @@ QString ColorScheme::description() const
return _description;
}
void ColorScheme::setName(const QString &aName)
void ColorScheme::setName(const QString &name)
{
_name = aName;
_name = name;
}
QString ColorScheme::name() const
......@@ -348,9 +348,9 @@ bool ColorScheme::hasDarkBackground() const
return backgroundColor().value() < 127;
}
void ColorScheme::setOpacity(qreal aOpacity)
void ColorScheme::setOpacity(qreal opacity)
{
_opacity = aOpacity;
_opacity = opacity;
}
qreal ColorScheme::opacity() const
......@@ -449,8 +449,8 @@ ColorSchemeWallpaper::Ptr ColorScheme::wallpaper() const
return _wallpaper;
}
ColorSchemeWallpaper::ColorSchemeWallpaper(const QString &aPath) :
_path(aPath),
ColorSchemeWallpaper::ColorSchemeWallpaper(const QString &path) :
_path(path),
_picture(nullptr)
{
}
......
......@@ -229,14 +229,14 @@ void ColorSchemeEditor::wallpaperPathChanged(const QString &path)
}
}
void ColorSchemeEditor::setDescription(const QString &text)
void ColorSchemeEditor::setDescription(const QString &description)
{
if (_colors != nullptr) {
_colors->setDescription(text);
_colors->setDescription(description);
}
if (_ui->descriptionEdit->text() != text) {
_ui->descriptionEdit->setText(text);
if (_ui->descriptionEdit->text() != description) {
_ui->descriptionEdit->setText(description);
}
}
......@@ -248,9 +248,9 @@ void ColorSchemeEditor::setTransparencyPercentLabel(int percent)
_colors->setOpacity(opacity);
}
void ColorSchemeEditor::setRandomizedBackgroundColor(bool randomize)
void ColorSchemeEditor::setRandomizedBackgroundColor(bool randomized)
{
_colors->setRandomizedBackgroundColor(randomize);
_colors->setRandomizedBackgroundColor(randomized);
}
void ColorSchemeEditor::setup(const ColorScheme *scheme, bool isNewScheme)
......
......@@ -57,7 +57,7 @@ public:
* other sessions. This session is displayed grayed out in the list
* and cannot be unchecked.
*/
void setMasterSession(Session *master);
void setMasterSession(Session *session);
/** See setMasterSession() */
Session *masterSession() const;
......
......@@ -482,12 +482,12 @@ void EditProfileDialog::selectIcon()
}
}
void EditProfileDialog::profileNameChanged(const QString &text)
void EditProfileDialog::profileNameChanged(const QString &name)
{
_ui->emptyNameWarningWidget->setVisible(text.isEmpty());
_ui->emptyNameWarningWidget->setVisible(name.isEmpty());
updateTempProfileProperty(Profile::Name, text);
updateTempProfileProperty(Profile::UntranslatedName, text);
updateTempProfileProperty(Profile::Name, name);
updateTempProfileProperty(Profile::UntranslatedName, name);
updateCaption(_tempProfile);
}
......@@ -723,21 +723,21 @@ void EditProfileDialog::updateKeyBindingsList(bool selectCurrentTranslator)
}
}
bool EditProfileDialog::eventFilter(QObject *watched, QEvent *aEvent)
bool EditProfileDialog::eventFilter(QObject *watched, QEvent *event)
{
if (watched == _ui->colorSchemeList && aEvent->type() == QEvent::Leave) {
if (watched == _ui->colorSchemeList && event->type() == QEvent::Leave) {
if (_tempProfile->isPropertySet(Profile::ColorScheme)) {
preview(Profile::ColorScheme, _tempProfile->colorScheme());
} else {
unpreview(Profile::ColorScheme);
}
}
if (watched == _ui->fontPreviewLabel && aEvent->type() == QEvent::FontChange) {
if (watched == _ui->fontPreviewLabel && event->type() == QEvent::FontChange) {
const QFont &labelFont = _ui->fontPreviewLabel->font();
_ui->fontPreviewLabel->setText(i18n("%1", labelFont.family()));
}
return QDialog::eventFilter(watched, aEvent);
return QDialog::eventFilter(watched, event);
}
void EditProfileDialog::unpreviewAll()
......@@ -758,24 +758,24 @@ void EditProfileDialog::unpreviewAll()
}
}
void EditProfileDialog::unpreview(int aProperty)
void EditProfileDialog::unpreview(int property)
{
_delayedPreviewProperties.remove(aProperty);
_delayedPreviewProperties.remove(property);
if (!_previewedProperties.contains(aProperty)) {
if (!_previewedProperties.contains(property)) {
return;
}
QHash<Profile::Property, QVariant> map;
map.insert(static_cast<Profile::Property>(aProperty), _previewedProperties[aProperty]);
map.insert(static_cast<Profile::Property>(property), _previewedProperties[property]);
ProfileManager::instance()->changeProfile(_profile, map, false);
_previewedProperties.remove(aProperty);
_previewedProperties.remove(property);
}
void EditProfileDialog::delayedPreview(int aProperty, const QVariant &value)
void EditProfileDialog::delayedPreview(int property, const QVariant &value)
{
_delayedPreviewProperties.insert(aProperty, value);
_delayedPreviewProperties.insert(property, value);
_delayedPreviewTimer->stop();
_delayedPreviewTimer->start(300);
......@@ -792,12 +792,12 @@ void EditProfileDialog::delayedPreviewActivate()
}
}
void EditProfileDialog::preview(int aProperty, const QVariant &value)
void EditProfileDialog::preview(int property, const QVariant &value)
{
QHash<Profile::Property, QVariant> map;
map.insert(static_cast<Profile::Property>(aProperty), value);
map.insert(static_cast<Profile::Property>(property), value);
_delayedPreviewProperties.remove(aProperty);
_delayedPreviewProperties.remove(property);
const Profile::Ptr original = lookupProfile();
......@@ -807,13 +807,13 @@ void EditProfileDialog::preview(int aProperty, const QVariant &value)
// TODO - Save the original values for each profile and use to unpreview properties
ProfileGroup::Ptr group = original->asGroup();
if (group && group->profiles().count() > 1
&& original->property<QVariant>(static_cast<Profile::Property>(aProperty)).isNull()) {
&& original->property<QVariant>(static_cast<Profile::Property>(property)).isNull()) {
return;
}
if (!_previewedProperties.contains(aProperty)) {
_previewedProperties.insert(aProperty,
original->property<QVariant>(static_cast<Profile::Property>(aProperty)));
if (!_previewedProperties.contains(property)) {
_previewedProperties.insert(property,
original->property<QVariant>(static_cast<Profile::Property>(property)));
}
// temporary change to color scheme
......@@ -966,9 +966,9 @@ void EditProfileDialog::createTempProfile()
_tempProfile->setHidden(true);
}
void EditProfileDialog::updateTempProfileProperty(Profile::Property aProperty, const QVariant &value)
void EditProfileDialog::updateTempProfileProperty(Profile::Property property, const QVariant &value)
{
_tempProfile->setProperty(aProperty, value);
_tempProfile->setProperty(property, value);
updateButtonApply();
}
......@@ -980,17 +980,17 @@ void EditProfileDialog::updateButtonApply()
while (iter.hasNext()) {
iter.next();
Profile::Property aProperty = iter.key();
Profile::Property property = iter.key();
QVariant value = iter.value();
// for previewed property
if (_previewedProperties.contains(static_cast<int>(aProperty))) {
if (value != _previewedProperties.value(static_cast<int>(aProperty))) {
if (_previewedProperties.contains(static_cast<int>(property))) {
if (value != _previewedProperties.value(static_cast<int>(property))) {
userModified = true;
break;
}
// for not-previewed property
} else if ((value != _profile->property<QVariant>(aProperty))) {
} else if ((value != _profile->property<QVariant>(property))) {
userModified = true;
break;
}
......
......@@ -107,12 +107,12 @@ private Q_SLOTS:
void selectInitialDir();
void selectIcon();
void profileNameChanged(const QString &text);
void initialDirChanged(const QString &text);
void profileNameChanged(const QString &name);
void initialDirChanged(const QString &dir);
void startInSameDir(bool);
void commandChanged(const QString &text);
void tabTitleFormatChanged(const QString &text);
void remoteTabTitleFormatChanged(const QString &text);
void commandChanged(const QString &command);
void tabTitleFormatChanged(const QString &format);
void remoteTabTitleFormatChanged(const QString &format);
void terminalColumnsEntryChanged(int);
void terminalRowsEntryChanged(int);
......@@ -206,7 +206,7 @@ private:
void showColorSchemeEditor(bool isNewScheme);
void closeColorSchemeEditor();
void showKeyBindingEditor(bool newTranslator);
void showKeyBindingEditor(bool isNewTranslator);
void preview(int property, const QVariant &value);
void delayedPreview(int property, const QVariant &value);
......
......@@ -257,10 +257,10 @@ public Q_SLOTS:
* to be emitted when it expires. The timer allows multiple updates in quick
* succession to be buffered into a single outputChanged() signal emission.
*
* @param buffer A string of characters received from the terminal program.
* @param len The length of @p buffer
* @param text A string of characters received from the terminal program.
* @param length The length of @p text
*/
void receiveData(const char *buffer, int len);
void receiveData(const char *text, int length);
/**
* Sends information about the focus lost event to the terminal.
......@@ -432,9 +432,9 @@ protected:
/**
* Processes an incoming character. See receiveData()
* @p ch A unicode character code.
* @p c A unicode character code.
*/
virtual void receiveChar(int ch);
virtual void receiveChar(int c);
/**
* Sets the active screen. The terminal has two screens, primary and alternate.
......
......@@ -213,7 +213,7 @@ public:
* Regular expressions which match the empty string are treated as not matching
* anything.
*/
void setRegExp(const QRegularExpression &text);
void setRegExp(const QRegularExpression &regExp);
/** Returns the regular expression which the filter searches for in blocks of text */
QRegularExpression regExp() const;
......
......@@ -192,11 +192,11 @@ void IncrementalSearchBar::setSearchText(const QString &text)
}
}
bool IncrementalSearchBar::eventFilter(QObject *watched, QEvent *aEvent)
bool IncrementalSearchBar::eventFilter(QObject *watched, QEvent *event)
{
if (watched == _searchEdit) {
if (aEvent->type() == QEvent::KeyPress) {
QKeyEvent *keyEvent = static_cast<QKeyEvent *>(aEvent);
if (event->type() == QEvent::KeyPress) {
QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event);
if (keyEvent->key() == Qt::Key_Escape) {
emit closeClicked();
......@@ -222,7 +222,7 @@ bool IncrementalSearchBar::eventFilter(QObject *watched, QEvent *aEvent)
}
}
return QWidget::eventFilter(watched, aEvent);
return QWidget::eventFilter(watched, event);
}
void IncrementalSearchBar::keyPressEvent(QKeyEvent *event)
......
......@@ -154,17 +154,17 @@ bool KeyBindingEditor::eventFilter(QObject *watched, QEvent *event)
return false;
}
void KeyBindingEditor::setDescription(const QString &newDescription)
void KeyBindingEditor::setDescription(const QString &description)
{
_ui->descriptionEdit->setText(newDescription);
_ui->descriptionEdit->setText(description);
setTranslatorDescription(newDescription);
setTranslatorDescription(description);
}
void KeyBindingEditor::setTranslatorDescription(const QString &newDescription)
void KeyBindingEditor::setTranslatorDescription(const QString &description)
{
if (_translator != nullptr) {
_translator->setDescription(newDescription);
_translator->setDescription(description);
}
}
......
......@@ -540,9 +540,9 @@ QByteArray KeyboardTranslator::Entry::escapedText(bool expandWildCards,
return result;
}
QByteArray KeyboardTranslator::Entry::unescape(const QByteArray &input) const
QByteArray KeyboardTranslator::Entry::unescape(const QByteArray &text) const
{
QByteArray result(input);
QByteArray result(text);
for (int i = 0; i < result.count() - 1; i++) {
QByteRef ch = result[i];
......
......@@ -187,7 +187,7 @@ public:
/** See modifiers() */
void setModifiers(Qt::KeyboardModifiers modifiers);
/** See modifierMask() and modifiers() */
void setModifierMask(Qt::KeyboardModifiers modifiers);
void setModifierMask(Qt::KeyboardModifiers mask);
/**
* Returns a bitwise-OR of the enabled state flags associated with this entry.
......@@ -231,9 +231,9 @@ public:
/**
* Returns true if this entry matches the given key sequence, specified
* as a combination of @p keyCode , @p modifiers and @p state.
* as a combination of @p testKeyCode , @p testKeyboardModifiers and @p testState.
*/
bool matches(int keyCode, Qt::KeyboardModifiers modifiers, States flags) const;
bool matches(int testKeyCode, Qt::KeyboardModifiers testKeyboardModifiers, States testState) const;
bool operator==(const Entry &rhs) const;
......@@ -396,11 +396,11 @@ private:
QList<Token> tokenize(const QString &);
void readNext();
bool decodeSequence(const QString &, int &keyCode, Qt::KeyboardModifiers &modifiers,
Qt::KeyboardModifiers &modifierMask, KeyboardTranslator::States &state,
KeyboardTranslator::States &stateFlags);
Qt::KeyboardModifiers &modifierMask, KeyboardTranslator::States &flags,
KeyboardTranslator::States &flagMask);
static bool parseAsModifier(const QString &item, Qt::KeyboardModifier &modifier);
static bool parseAsStateFlag(const QString &item, KeyboardTranslator::State &state);
static bool parseAsStateFlag(const QString &item, KeyboardTranslator::State &flag);
static bool parseAsKeyCode(const QString &item, int &keyCode);
static bool parseAsCommand(const QString &text, KeyboardTranslator::Command &command);
......@@ -447,9 +447,9 @@ inline void KeyboardTranslator::Entry::setKeyCode(int aKeyCode)
_keyCode = aKeyCode;
}
inline void KeyboardTranslator::Entry::setModifiers(Qt::KeyboardModifiers modifier)
inline void KeyboardTranslator::Entry::setModifiers(Qt::KeyboardModifiers modifiers)
{
_modifiers = modifier;
_modifiers = modifiers;
}
inline Qt::KeyboardModifiers KeyboardTranslator::Entry::modifiers() const
......
......@@ -669,7 +669,7 @@ public:
typedef QExplicitlySharedDataPointer<ProfileGroup> Ptr;
/** Construct a new profile group, which is hidden by default. */
explicit ProfileGroup(Profile::Ptr parent = Profile::Ptr());
explicit ProfileGroup(Profile::Ptr profileParent = Profile::Ptr());
/** Add a profile to the group. Calling setProperty() will update this
* profile. When creating a group, add the profiles to the group then
......
......@@ -167,9 +167,9 @@ void ViewContainer::addView(QWidget *view, ViewProperties *item, int index)
emit viewAdded(view, item);
}
void ViewContainer::viewDestroyed(QObject *object)
void ViewContainer::viewDestroyed(QObject *view)
{
QWidget *widget = qobject_cast<QWidget *>(object);
QWidget *widget = qobject_cast<QWidget *>(view);
forgetView(widget);
}
......@@ -256,11 +256,11 @@ void ViewContainer::activatePreviousView()
setActiveView(_views.at(index));
}
ViewProperties *ViewContainer::viewProperties(QWidget *widget) const
ViewProperties *ViewContainer::viewProperties(QWidget *view) const
{
Q_ASSERT(_navigation.contains(widget));
Q_ASSERT(_navigation.contains(view));
return _navigation[widget];
return _navigation[view];
}
QList<QWidget *> ViewContainer::widgetsForItem(ViewProperties *item) const
......@@ -497,11 +497,11 @@ TabbedViewContainer::~TabbedViewContainer()
}
}
void TabbedViewContainer::startTabDrag(int tab)
void TabbedViewContainer::startTabDrag(int index)
{
QPointer<QDrag> drag = new QDrag(_tabBar);
const QRect tabRect = _tabBar->tabRect(tab);
QPixmap tabPixmap = _tabBar->dragDropPixmap(tab);
const QRect tabRect = _tabBar->tabRect(index);
QPixmap tabPixmap = _tabBar->dragDropPixmap(index);
drag->setPixmap(tabPixmap);
......@@ -512,8 +512,8 @@ void TabbedViewContainer::startTabDrag(int tab)
drag->setHotSpot(mappedPos);
const int id = viewProperties(views()[tab])->identifier();
QWidget *view = views()[tab];
const int id = viewProperties(views()[index])->identifier();
QWidget *view = views()[index];
drag->setMimeData(ViewProperties::createMimeData(id));
// start dragging
......@@ -599,13 +599,13 @@ void TabbedViewContainer::renameTab(int index)
viewProperties(views()[index])->rename();
}
void TabbedViewContainer::openTabContextMenu(const QPoint &pos)
void TabbedViewContainer::openTabContextMenu(const QPoint &point)
{
if (pos.isNull()) {
if (point.isNull()) {
return;
}
_contextMenuTabIndex = _tabBar->tabAt(pos);
_contextMenuTabIndex = _tabBar->tabAt(point);
if (_contextMenuTabIndex < 0) {
return;
}
......@@ -617,7 +617,7 @@ void TabbedViewContainer::openTabContextMenu(const QPoint &pos)
detachAction->setEnabled(_tabBar->count() > 1);
#endif
_contextPopupMenu->exec(_tabBar->mapToGlobal(pos));
_contextPopupMenu->exec(_tabBar->mapToGlobal(point));
}
void TabbedViewContainer::tabContextMenuCloseTab()
......
......@@ -415,7 +415,7 @@ protected:
void navigationVisibilityChanged(NavigationVisibility mode) Q_DECL_OVERRIDE;
void navigationPositionChanged(NavigationPosition position) Q_DECL_OVERRIDE;
void navigationTabWidthExpandingChanged(bool expand) Q_DECL_OVERRIDE;
void navigationTextModeChanged(bool mode) Q_DECL_OVERRIDE;
void navigationTextModeChanged(bool useTextWidth) Q_DECL_OVERRIDE;
void moveViewWidget(int fromIndex, int toIndex) Q_DECL_OVERRIDE;
private Q_SLOTS:
......
......@@ -370,13 +370,13 @@ void ViewManager::detachActiveView()
detachView(container, container->activeView());
}
void ViewManager::detachView(ViewContainer *container, QWidget *widgetView)
void ViewManager::detachView(ViewContainer *container, QWidget *view)
{
#if !defined(ENABLE_DETACHING)
return;
#endif
TerminalDisplay *viewToDetach = qobject_cast<TerminalDisplay *>(widgetView);
TerminalDisplay *viewToDetach = qobject_cast<TerminalDisplay *>(view);
if (viewToDetach == nullptr) {
return;
......@@ -712,7 +712,7 @@ ViewContainer *ViewManager::createContainer()
return container;
}
void ViewManager::containerMoveViewRequest(int index, int id, bool &moved,
void ViewManager::containerMoveViewRequest(int index, int id, bool &success,
TabbedViewContainer *sourceTabbedContainer)
{
ViewContainer *container = qobject_cast<ViewContainer *>(sender());
......@@ -740,7 +740,7 @@ void ViewManager::containerMoveViewRequest(int index, int id, bool &moved,
createView(controller->session(), container, index);
controller->session()->refresh();
moved = true;
success = true;
}
void ViewManager::setNavigationMethod(NavigationMethod method)
......
......@@ -309,7 +309,7 @@ private Q_SLOTS:
// views associated with the session
void sessionFinished();
// called when one view has been destroyed
void viewDestroyed(QWidget *widget);
void viewDestroyed(QWidget *view);
// controller detects when an associated view is given the focus
// and emits a signal. ViewManager listens for that signal
......@@ -359,7 +359,7 @@ private Q_SLOTS:
void detachView(ViewContainer *container, QWidget *view);
void closeTabFromContainer(ViewContainer *container, QWidget *view);
void closeTabFromContainer(ViewContainer *container, QWidget *tab);
private:
Q_DISABLE_COPY(ViewManager)
......@@ -388,7 +388,7 @@ private:
// creates a new controller for a session/display pair which provides the menu
// actions associated with that view, and exposes basic information
// about the session ( such as title and associated icon ) to the display.
SessionController *createController(Session *session, TerminalDisplay *display);
SessionController *createController(Session *session, TerminalDisplay *view);
private:
QPointer<ViewSplitter> _viewSplitter;
......
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