diff --git a/src/HistorySizeWidget.cpp b/src/HistorySizeWidget.cpp --- a/src/HistorySizeWidget.cpp +++ b/src/HistorySizeWidget.cpp @@ -74,7 +74,7 @@ this, &Konsole::HistorySizeWidget::buttonClicked); _ui->historyLineSpinner->setSuffix(ki18ncp("@label:textbox Unit of scrollback", " line", " lines")); - this->setLineCount(HistorySizeWidget::DefaultLineCount); + setLineCount(HistorySizeWidget::DefaultLineCount); connect(_ui->historyLineSpinner, static_cast(&KPluralHandlingSpinBox::valueChanged), diff --git a/src/Session.cpp b/src/Session.cpp --- a/src/Session.cpp +++ b/src/Session.cpp @@ -1486,10 +1486,10 @@ { switch (role) { case 0: - this->setTitle(Session::NameRole, title); + setTitle(Session::NameRole, title); break; case 1: - this->setTitle(Session::DisplayedTitleRole, title); + setTitle(Session::DisplayedTitleRole, title); // without these, that title will be overridden by the expansion of // title format shortly after, which will confuses users. @@ -1504,9 +1504,9 @@ { switch (role) { case 0: - return this->title(Session::NameRole); + return title(Session::NameRole); case 1: - return this->title(Session::DisplayedTitleRole); + return title(Session::DisplayedTitleRole); default: return QString(); } @@ -1516,21 +1516,21 @@ { switch (context) { case 0: - this->setTabTitleFormat(Session::LocalTabTitle, format); + setTabTitleFormat(Session::LocalTabTitle, format); break; case 1: - this->setTabTitleFormat(Session::RemoteTabTitle, format); + setTabTitleFormat(Session::RemoteTabTitle, format); break; } } QString Session::tabTitleFormat(int context) const { switch (context) { case 0: - return this->tabTitleFormat(Session::LocalTabTitle); + return tabTitleFormat(Session::LocalTabTitle); case 1: - return this->tabTitleFormat(Session::RemoteTabTitle); + return tabTitleFormat(Session::RemoteTabTitle); default: return QString(); } diff --git a/src/TerminalDisplay.cpp b/src/TerminalDisplay.cpp --- a/src/TerminalDisplay.cpp +++ b/src/TerminalDisplay.cpp @@ -1080,12 +1080,12 @@ // internal image - 2, so that the height of 'region' is strictly less // than the height of the internal image. QRect region = screenWindowRegion; - region.setBottom(qMin(region.bottom(), this->_lines - 2)); + region.setBottom(qMin(region.bottom(), _lines - 2)); // return if there is nothing to do if (!region.isValid() || (region.top() + abs(lines)) >= region.bottom() - || this->_lines <= region.height()) { + || _lines <= region.height()) { return; } @@ -1114,23 +1114,23 @@ scrollRect.setLeft(0); scrollRect.setRight(width() - scrollBarWidth - SCROLLBAR_CONTENT_GAP); } - void* firstCharPos = &_image[ region.top() * this->_columns ]; - void* lastCharPos = &_image[(region.top() + abs(lines)) * this->_columns ]; + void* firstCharPos = &_image[ region.top() * _columns ]; + void* lastCharPos = &_image[(region.top() + abs(lines)) * _columns ]; const int top = _contentRect.top() + (region.top() * _fontHeight); const int linesToMove = region.height() - abs(lines); - const int bytesToMove = linesToMove * this->_columns * sizeof(Character); + const int bytesToMove = linesToMove * _columns * sizeof(Character); Q_ASSERT(linesToMove > 0); Q_ASSERT(bytesToMove > 0); //scroll internal image if (lines > 0) { // check that the memory areas that we are going to move are valid Q_ASSERT((char*)lastCharPos + bytesToMove < - (char*)(_image + (this->_lines * this->_columns))); + (char*)(_image + (_lines * _columns))); - Q_ASSERT((lines * this->_columns) < _imageSize); + Q_ASSERT((lines * _columns) < _imageSize); //scroll internal image down memmove(firstCharPos , lastCharPos , bytesToMove); @@ -1140,7 +1140,7 @@ } else { // check that the memory areas that we are going to move are valid Q_ASSERT((char*)firstCharPos + bytesToMove < - (char*)(_image + (this->_lines * this->_columns))); + (char*)(_image + (_lines * _columns))); //scroll internal image up memmove(lastCharPos , firstCharPos , bytesToMove); @@ -1247,8 +1247,8 @@ setScroll(_screenWindow->currentLine() , _screenWindow->lineCount()); - Q_ASSERT(this->_usedLines <= this->_lines); - Q_ASSERT(this->_usedColumns <= this->_columns); + Q_ASSERT(_usedLines <= _lines); + Q_ASSERT(_usedColumns <= _columns); int y, x, len; @@ -1259,8 +1259,8 @@ CharacterColor cf; // undefined - const int linesToUpdate = qMin(this->_lines, qMax(0, lines)); - const int columnsToUpdate = qMin(this->_columns, qMax(0, columns)); + const int linesToUpdate = qMin(_lines, qMax(0, lines)); + const int columnsToUpdate = qMin(_columns, qMax(0, columns)); auto dirtyMask = new char[columnsToUpdate + 2]; QRegion dirtyRegion; @@ -1271,7 +1271,7 @@ int dirtyLineCount = 0; for (y = 0; y < linesToUpdate; ++y) { - const Character* currentLine = &_image[y * this->_columns]; + const Character* currentLine = &_image[y * _columns]; const Character* const newLine = &newimg[y * columns]; bool updateLine = false; @@ -1374,16 +1374,16 @@ if (linesToUpdate < _usedLines) { dirtyRegion |= QRect(_contentRect.left() + tLx , _contentRect.top() + tLy + _fontHeight * linesToUpdate , - _fontWidth * this->_columns , + _fontWidth * _columns , _fontHeight * (_usedLines - linesToUpdate)); } _usedLines = linesToUpdate; if (columnsToUpdate < _usedColumns) { dirtyRegion |= QRect(_contentRect.left() + tLx + columnsToUpdate * _fontWidth , _contentRect.top() + tLy , _fontWidth * (_usedColumns - columnsToUpdate) , - _fontHeight * this->_lines); + _fontHeight * _lines); } _usedColumns = columnsToUpdate; diff --git a/src/ViewContainerTabBar.cpp b/src/ViewContainerTabBar.cpp --- a/src/ViewContainerTabBar.cpp +++ b/src/ViewContainerTabBar.cpp @@ -266,7 +266,7 @@ QPixmap tabPixmap(rect.width() + borderWidth, rect.height() + borderWidth); QPainter painter(&tabPixmap); - painter.drawPixmap(0, 0, this->grab(rect)); + painter.drawPixmap(0, 0, grab(rect)); QPen borderPen; borderPen.setBrush(palette().dark()); borderPen.setWidth(borderWidth); diff --git a/src/ViewManager.cpp b/src/ViewManager.cpp --- a/src/ViewManager.cpp +++ b/src/ViewManager.cpp @@ -1102,7 +1102,7 @@ int ViewManager::sessionCount() { - return this->_sessionMap.size(); + return _sessionMap.size(); } QStringList ViewManager::sessionList() @@ -1148,7 +1148,7 @@ session->addEnvironmentEntry(QStringLiteral("KONSOLE_DBUS_WINDOW=/Windows/%1").arg(managerId())); - this->createView(session); + createView(session); session->run(); return session->sessionId(); @@ -1170,7 +1170,7 @@ session->addEnvironmentEntry(QStringLiteral("KONSOLE_DBUS_WINDOW=/Windows/%1").arg(managerId())); - this->createView(session); + createView(session); session->run(); return session->sessionId(); @@ -1193,7 +1193,7 @@ session->addEnvironmentEntry(QStringLiteral("KONSOLE_DBUS_WINDOW=/Windows/%1").arg(managerId())); - this->createView(session); + createView(session); session->run(); return session->sessionId(); @@ -1211,22 +1211,22 @@ void ViewManager::nextSession() { - this->nextView(); + nextView(); } void ViewManager::prevSession() { - this->previousView(); + previousView(); } void ViewManager::moveSessionLeft() { - this->moveActiveViewLeft(); + moveActiveViewLeft(); } void ViewManager::moveSessionRight() { - this->moveActiveViewRight(); + moveActiveViewRight(); } void ViewManager::setTabWidthToText(bool useTextWidth) diff --git a/src/settings/GeneralSettings.cpp b/src/settings/GeneralSettings.cpp --- a/src/settings/GeneralSettings.cpp +++ b/src/settings/GeneralSettings.cpp @@ -31,7 +31,7 @@ connect(enableAllMessagesButton, &QPushButton::clicked, this, &Konsole::GeneralSettings::slotEnableAllMessages); - this->kcfg_ShowTerminalSizeHint->setVisible(false); + kcfg_ShowTerminalSizeHint->setVisible(false); } GeneralSettings::~GeneralSettings() = default;