Commit 369f9905 authored by Kurt Hindenburg's avatar Kurt Hindenburg

Fix numerous clazy issues

container-anti-pattern, detaching-temporary, incorrect-emit
parent c2251227
......@@ -1608,7 +1608,8 @@ void SessionGroup::forwardData(const QByteArray& data)
}
_inForwardData = true;
foreach(Session* other, _sessions.keys()) {
const QList<Session*> sessionsKeys = _sessions.keys();
foreach(Session* other, sessionsKeys) {
if (!_sessions[other]) {
other->emulation()->sendString(data);
}
......
......@@ -796,7 +796,8 @@ EditProfileDialog* SessionController::profileDialogPointer()
void SessionController::editCurrentProfile()
{
// Searching for Edit profile dialog opened with the same profile
foreach (SessionController* session, _allControllers.values()) {
const QList<SessionController*> allSessionsControllers = _allControllers.values();
foreach (SessionController* session, allSessionsControllers) {
if (session->profileDialogPointer()
&& session->profileDialogPointer()->isVisible()
&& session->profileDialogPointer()->lookupProfile() == SessionManager::instance()->sessionProfile(_session)) {
......
......@@ -1387,7 +1387,8 @@ void TerminalDisplay::paintFilters(QPainter& painter)
if (_showUrlHint && urlNumber < 10) {
// Position at the beginning of the URL
QRect hintRect(region.rects().first());
const QVector<QRect> regionRects = region.rects();
QRect hintRect(regionRects.first());
hintRect.setWidth(r.height());
painter.fillRect(hintRect, QColor(0, 0, 0, 128));
painter.setPen(Qt::white);
......
......@@ -531,7 +531,7 @@ void TabbedViewContainer::tabDoubleClicked(int index)
if (index >= 0)
renameTab(index);
else
newViewRequest();
emit newViewRequest();
}
void TabbedViewContainer::renameTab(int index)
......
......@@ -866,7 +866,8 @@ void ViewManager::updateViewsForSession(Session* session)
{
const Profile::Ptr profile = SessionManager::instance()->sessionProfile(session);
foreach(TerminalDisplay* view, _sessionMap.keys(session)) {
const QList<TerminalDisplay*> sessionMapKeys = _sessionMap.keys(session);
foreach(TerminalDisplay* view, sessionMapKeys) {
applyProfileToView(view, profile);
}
}
......
......@@ -1095,7 +1095,7 @@ void Vt102Emulation::sendKeyEvent(QKeyEvent* event)
else
textToSend += _codec->fromUnicode(event->text());
sendData(textToSend);
emit sendData(textToSend);
}
else
{
......
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