From 1baa56feda189c17edea3da0b356b901a8684c60 Mon Sep 17 00:00:00 2001 From: Kurt Hindenburg Date: Sun, 25 Dec 2011 13:13:55 -0500 Subject: [PATCH] White space changes - astyle and Qt normalize don't like each other. Use 'git diff -w --ignore-all-space' to see non-whitespace changes. --- src/Application.cpp | 12 ++-- src/EditProfileDialog.cpp | 106 +++++++++++++++++------------------ src/ManageProfilesDialog.cpp | 28 ++++----- src/Part.cpp | 10 ++-- src/ProfileList.cpp | 12 ++-- src/Session.cpp | 60 ++++++++++---------- src/SessionController.cpp | 70 +++++++++++------------ src/ViewContainer.cpp | 28 ++++----- src/ViewManager.cpp | 14 ++--- src/tests/PartTest.cpp | 4 +- 10 files changed, 172 insertions(+), 172 deletions(-) diff --git a/src/Application.cpp b/src/Application.cpp index 6577234be..1034618c6 100644 --- a/src/Application.cpp +++ b/src/Application.cpp @@ -82,13 +82,13 @@ MainWindow* Application::newMainWindow() window->setSessionList(new ProfileList(true, window)); connect(window, - SIGNAL(newSessionRequest(Profile::Ptr, QString, ViewManager*)), - this, SLOT(createSession(Profile::Ptr, QString, ViewManager*))); + SIGNAL(newSessionRequest(Profile::Ptr,QString,ViewManager*)), + this, SLOT(createSession(Profile::Ptr,QString,ViewManager*))); connect(window, - SIGNAL(newSSHSessionRequest(Profile::Ptr, KUrl, ViewManager*)), - this, SLOT(createSSHSession(Profile::Ptr, KUrl, ViewManager*))); - connect(window, SIGNAL(newWindowRequest(Profile::Ptr, QString)), - this, SLOT(createWindow(Profile::Ptr, QString))); + SIGNAL(newSSHSessionRequest(Profile::Ptr,KUrl,ViewManager*)), + this, SLOT(createSSHSession(Profile::Ptr,KUrl,ViewManager*))); + connect(window, SIGNAL(newWindowRequest(Profile::Ptr,QString)), + this, SLOT(createWindow(Profile::Ptr,QString))); connect(window->viewManager(), SIGNAL(viewDetached(Session*)), this, SLOT(detachView(Session*))); diff --git a/src/EditProfileDialog.cpp b/src/EditProfileDialog.cpp index a17807006..5534321a4 100644 --- a/src/EditProfileDialog.cpp +++ b/src/EditProfileDialog.cpp @@ -72,9 +72,9 @@ EditProfileDialog::EditProfileDialog(QWidget* parent) // disable the apply button , since no modification has been made enableButtonApply(false); - connect(this , SIGNAL(applyClicked()) , this , SLOT(save())); + connect(this, SIGNAL(applyClicked()), this, SLOT(save())); - connect(_delayedPreviewTimer , SIGNAL(timeout()) , this , SLOT(delayedPreviewActivate())); + connect(_delayedPreviewTimer, SIGNAL(timeout()), this, SLOT(delayedPreviewActivate())); _ui = new Ui::EditProfileDialog(); _ui->setupUi(mainWidget()); @@ -93,7 +93,7 @@ EditProfileDialog::EditProfileDialog(QWidget* parent) // not been updated since the last profile change and will need // to be refreshed when the user switches to them _pageNeedsUpdate.resize(_ui->tabWidget->count()); - connect(_ui->tabWidget , SIGNAL(currentChanged(int)) , this , + connect(_ui->tabWidget, SIGNAL(currentChanged(int)), this, SLOT(preparePage(int))); createTempProfile(); @@ -279,24 +279,24 @@ void EditProfileDialog::setupGeneralPage(const Profile::Ptr info) _ui->saveGeometryOnExitButton->setChecked(info->property(Profile::SaveGeometryOnExit)); // signals and slots - connect(_ui->dirSelectButton , SIGNAL(clicked()) , this , SLOT(selectInitialDir())); - connect(_ui->iconSelectButton , SIGNAL(clicked()) , this , SLOT(selectIcon())); - connect(_ui->startInSameDirButton , SIGNAL(toggled(bool)) , this , + connect(_ui->dirSelectButton, SIGNAL(clicked()), this, SLOT(selectInitialDir())); + connect(_ui->iconSelectButton, SIGNAL(clicked()), this, SLOT(selectIcon())); + connect(_ui->startInSameDirButton, SIGNAL(toggled(bool)), this , SLOT(startInSameDir(bool))); - connect(_ui->profileNameEdit , SIGNAL(textChanged(QString)) , this , + connect(_ui->profileNameEdit, SIGNAL(textChanged(QString)), this, SLOT(profileNameChanged(QString))); - connect(_ui->initialDirEdit , SIGNAL(textChanged(QString)) , this , + connect(_ui->initialDirEdit, SIGNAL(textChanged(QString)), this, SLOT(initialDirChanged(QString))); - connect(_ui->commandEdit , SIGNAL(textChanged(QString)) , this , + connect(_ui->commandEdit, SIGNAL(textChanged(QString)), this, SLOT(commandChanged(QString))); - connect(_ui->environmentEditButton , SIGNAL(clicked()) , this , + connect(_ui->environmentEditButton , SIGNAL(clicked()), this, SLOT(showEnvironmentEditor())); - connect(_ui->showMenuBarButton , SIGNAL(toggled(bool)) , this , + connect(_ui->showMenuBarButton, SIGNAL(toggled(bool)), this, SLOT(showMenuBar(bool))); - connect(_ui->saveGeometryOnExitButton , SIGNAL(toggled(bool)) , this , + connect(_ui->saveGeometryOnExitButton, SIGNAL(toggled(bool)), this, SLOT(saveGeometryOnExit(bool))); - connect(_ui->showTerminalSizeHintButton , SIGNAL(toggled(bool)) , this , + connect(_ui->showTerminalSizeHintButton, SIGNAL(toggled(bool)), this, SLOT(showTerminalSizeHint(bool))); } void EditProfileDialog::showEnvironmentEditor() @@ -361,35 +361,35 @@ void EditProfileDialog::setupTabsPage(const Profile::Ptr info) _ui->silenceSecondsSpinner->setValue(silenceSeconds); // signals and slots - connect(_ui->tabBarVisibilityCombo , SIGNAL(activated(int)) , this , + connect(_ui->tabBarVisibilityCombo, SIGNAL(activated(int)), this, SLOT(tabBarVisibilityChanged(int))); - connect(_ui->tabBarPositionCombo , SIGNAL(activated(int)) , this , + connect(_ui->tabBarPositionCombo, SIGNAL(activated(int)), this, SLOT(tabBarPositionChanged(int))); - connect(_ui->newTabBehaviorCombo , SIGNAL(activated(int)) , this , + connect(_ui->newTabBehaviorCombo, SIGNAL(activated(int)), this, SLOT(newTabBehaviorChanged(int))); - connect(_ui->newTabButton , SIGNAL(toggled(bool)) , this , + connect(_ui->newTabButton, SIGNAL(toggled(bool)), this, SLOT(showNewTabButton(bool))); - connect(_ui->tabTitleEdit , SIGNAL(textChanged(QString)) , this , + connect(_ui->tabTitleEdit, SIGNAL(textChanged(QString)), this, SLOT(tabTitleFormatChanged(QString))); - connect(_ui->remoteTabTitleEdit , SIGNAL(textChanged(QString)) , this , + connect(_ui->remoteTabTitleEdit, SIGNAL(textChanged(QString)), this, SLOT(remoteTabTitleFormatChanged(QString))); - connect(_ui->silenceSecondsSpinner , SIGNAL(valueChanged(int)) , - this , SLOT(silenceSecondsChanged(int))); + connect(_ui->silenceSecondsSpinner, SIGNAL(valueChanged(int)), + this, SLOT(silenceSecondsChanged(int))); // menus for local and remote tab title dynamic elements TabTitleFormatAction* localTabTitleAction = new TabTitleFormatAction(this); localTabTitleAction->setContext(Session::LocalTabTitle); _ui->tabTitleEditButton->setMenu(localTabTitleAction->menu()); - connect(localTabTitleAction , SIGNAL(dynamicElementSelected(QString)) , - this , SLOT(insertTabTitleText(QString))); + connect(localTabTitleAction, SIGNAL(dynamicElementSelected(QString)), + this, SLOT(insertTabTitleText(QString))); TabTitleFormatAction* remoteTabTitleAction = new TabTitleFormatAction(this); remoteTabTitleAction->setContext(Session::RemoteTabTitle); _ui->remoteTabTitleEditButton->setMenu(remoteTabTitleAction->menu()); - connect(remoteTabTitleAction , SIGNAL(dynamicElementSelected(QString)) , - this , SLOT(insertRemoteTabTitleText(QString))); + connect(remoteTabTitleAction, SIGNAL(dynamicElementSelected(QString)), + this, SLOT(insertRemoteTabTitleText(QString))); } void EditProfileDialog::showNewTabButton(bool show) { @@ -489,7 +489,7 @@ void EditProfileDialog::setupAppearancePage(const Profile::Ptr info) _colorSchemeAnimationTimeLine = new QTimeLine(500 , this); delegate->setEntryTimeLine(_colorSchemeAnimationTimeLine); - connect(_colorSchemeAnimationTimeLine , SIGNAL(valueChanged(qreal)) , this , + connect(_colorSchemeAnimationTimeLine, SIGNAL(valueChanged(qreal)), this, SLOT(colorSchemeAnimationUpdate())); _ui->transparencyWarningWidget->setVisible(false); @@ -504,19 +504,19 @@ void EditProfileDialog::setupAppearancePage(const Profile::Ptr info) _ui->colorSchemeList->installEventFilter(this); _ui->colorSchemeList->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn); - connect(_ui->colorSchemeList->selectionModel() , - SIGNAL(selectionChanged(QItemSelection, QItemSelection)) - , this , SLOT(colorSchemeSelected())); - connect(_ui->colorSchemeList , SIGNAL(entered(QModelIndex)) , this , + connect(_ui->colorSchemeList->selectionModel(), + SIGNAL(selectionChanged(QItemSelection,QItemSelection)), + this, SLOT(colorSchemeSelected())); + connect(_ui->colorSchemeList, SIGNAL(entered(QModelIndex)), this, SLOT(previewColorScheme(QModelIndex))); updateColorSchemeButtons(); - connect(_ui->editColorSchemeButton , SIGNAL(clicked()) , this , + connect(_ui->editColorSchemeButton, SIGNAL(clicked()), this, SLOT(editColorScheme())); - connect(_ui->removeColorSchemeButton , SIGNAL(clicked()) , this , + connect(_ui->removeColorSchemeButton, SIGNAL(clicked()), this, SLOT(removeColorScheme())); - connect(_ui->newColorSchemeButton , SIGNAL(clicked()) , this , + connect(_ui->newColorSchemeButton, SIGNAL(clicked()), this, SLOT(newColorScheme())); // setup font preview @@ -530,19 +530,19 @@ void EditProfileDialog::setupAppearancePage(const Profile::Ptr info) setFontSliderRange(font); setFontSliderValue(font); - connect(_ui->fontSizeSlider , SIGNAL(valueChanged(int)) , this , + connect(_ui->fontSizeSlider, SIGNAL(valueChanged(int)), this, SLOT(setFontSize(int))); - connect(_ui->editFontButton , SIGNAL(clicked()) , this , + connect(_ui->editFontButton, SIGNAL(clicked()), this, SLOT(showFontDialog())); // setup font smoothing _ui->antialiasTextButton->setChecked(antialias); - connect(_ui->antialiasTextButton , SIGNAL(toggled(bool)) , this , + connect(_ui->antialiasTextButton, SIGNAL(toggled(bool)), this, SLOT(setAntialiasText(bool))); bool boldIntense = info->property(Profile::BoldIntense); _ui->boldIntenseButton->setChecked(boldIntense); - connect(_ui->boldIntenseButton , SIGNAL(toggled(bool)) , this , + connect(_ui->boldIntenseButton, SIGNAL(toggled(bool)), this, SLOT(setBoldIntense(bool))); } void EditProfileDialog::setAntialiasText(bool enable) @@ -902,17 +902,17 @@ void EditProfileDialog::setupKeyboardPage(const Profile::Ptr /* info */) // setup translator list updateKeyBindingsList(true); - connect(_ui->keyBindingList->selectionModel() , - SIGNAL(selectionChanged(QItemSelection, QItemSelection)), + connect(_ui->keyBindingList->selectionModel(), + SIGNAL(selectionChanged(QItemSelection,QItemSelection)), SLOT(keyBindingSelected())); - connect(_ui->newKeyBindingsButton , SIGNAL(clicked()) , this , + connect(_ui->newKeyBindingsButton, SIGNAL(clicked()), this, SLOT(newKeyBinding())); updateKeyBindingsButtons(); - connect(_ui->editKeyBindingsButton , SIGNAL(clicked()) , this , + connect(_ui->editKeyBindingsButton, SIGNAL(clicked()), this, SLOT(editKeyBinding())); - connect(_ui->removeKeyBindingsButton , SIGNAL(clicked()) , this , + connect(_ui->removeKeyBindingsButton, SIGNAL(clicked()), this, SLOT(removeKeyBinding())); } void EditProfileDialog::keyBindingSelected() @@ -997,7 +997,7 @@ void EditProfileDialog::setupCheckBoxes(BooleanOption* options , const Profile:: { while (options->button != 0) { options->button->setChecked(profile->property(options->property)); - connect(options->button , SIGNAL(toggled(bool)) , this , options->slot); + connect(options->button, SIGNAL(toggled(bool)), this, options->slot); ++options; } @@ -1010,7 +1010,7 @@ void EditProfileDialog::setupRadio(RadioOption* possibilities , int actual) else possibilities->button->setChecked(false); - connect(possibilities->button , SIGNAL(clicked()) , this , possibilities->slot); + connect(possibilities->button, SIGNAL(clicked()), this, possibilities->slot); ++possibilities; } @@ -1046,7 +1046,7 @@ void EditProfileDialog::setupScrollingPage(const Profile::Ptr profile) // signals and slots - connect(_ui->scrollBackLinesSpinner , SIGNAL(valueChanged(int)) , this , + connect(_ui->scrollBackLinesSpinner, SIGNAL(valueChanged(int)), this, SLOT(scrollBackLinesChanged(int))); } @@ -1111,13 +1111,13 @@ void EditProfileDialog::setupAdvancedPage(const Profile::Ptr profile) // interaction options _ui->wordCharacterEdit->setText(profile->property(Profile::WordCharacters)); - connect(_ui->wordCharacterEdit , SIGNAL(textChanged(QString)) , this , + connect(_ui->wordCharacterEdit, SIGNAL(textChanged(QString)), this, SLOT(wordCharactersChanged(QString))); int tripleClickMode = profile->property(Profile::TripleClickMode); _ui->tripleClickModeCombo->setCurrentIndex(tripleClickMode); - connect(_ui->tripleClickModeCombo , SIGNAL(activated(int)) , this , + connect(_ui->tripleClickModeCombo, SIGNAL(activated(int)), this, SLOT(TripleClickModeChanged(int))); // cursor options @@ -1128,20 +1128,20 @@ void EditProfileDialog::setupAdvancedPage(const Profile::Ptr profile) _ui->customColorSelectButton->setColor(profile->property(Profile::CustomCursorColor)); - connect(_ui->customCursorColorButton , SIGNAL(clicked()) , this , SLOT(customCursorColor())); - connect(_ui->autoCursorColorButton , SIGNAL(clicked()) , this , SLOT(autoCursorColor())); - connect(_ui->customColorSelectButton , SIGNAL(changed(QColor)) , + connect(_ui->customCursorColorButton, SIGNAL(clicked()), this, SLOT(customCursorColor())); + connect(_ui->autoCursorColorButton, SIGNAL(clicked()), this, SLOT(autoCursorColor())); + connect(_ui->customColorSelectButton, SIGNAL(changed(QColor)), SLOT(customCursorColorChanged(QColor))); int shape = profile->property(Profile::CursorShape); _ui->cursorShapeCombo->setCurrentIndex(shape); - connect(_ui->cursorShapeCombo , SIGNAL(activated(int)) , this , SLOT(setCursorShape(int))); + connect(_ui->cursorShapeCombo, SIGNAL(activated(int)), this, SLOT(setCursorShape(int))); // encoding options QAction* codecAction = new KCodecAction(this); _ui->selectEncodingButton->setMenu(codecAction->menu()); - connect(codecAction , SIGNAL(triggered(QTextCodec*)) , this , SLOT(setDefaultCodec(QTextCodec*))); + connect(codecAction, SIGNAL(triggered(QTextCodec*)), this, SLOT(setDefaultCodec(QTextCodec*))); _ui->characterEncodingLabel->setText(profile->property(Profile::DefaultEncoding)); @@ -1224,7 +1224,7 @@ void EditProfileDialog::showFontDialog() KFontDialog* dialog = new KFontDialog(this, KFontChooser::FixedFontsOnly); dialog->setFont(currentFont, true); - connect(dialog , SIGNAL(fontSelected(QFont)) , this , SLOT(fontSelected(QFont))); + connect(dialog, SIGNAL(fontSelected(QFont)), this, SLOT(fontSelected(QFont))); if (dialog->exec() == QDialog::Rejected) fontSelected(currentFont); diff --git a/src/ManageProfilesDialog.cpp b/src/ManageProfilesDialog.cpp index 766143303..29ca39596 100644 --- a/src/ManageProfilesDialog.cpp +++ b/src/ManageProfilesDialog.cpp @@ -49,8 +49,8 @@ ManageProfilesDialog::ManageProfilesDialog(QWidget* parent) setButtons(KDialog::Close); //connect( this, SIGNAL(applyClicked()) , this , SLOT(setMenuOrder()) ); - connect(this, SIGNAL(finished()) , - SessionManager::instance() , SLOT(saveSettings())); + connect(this, SIGNAL(finished()), + SessionManager::instance(), SLOT(saveSettings())); _ui = new Ui::ManageProfilesDialog(); _ui->setupUi(mainWidget()); @@ -67,15 +67,15 @@ ManageProfilesDialog::ManageProfilesDialog(QWidget* parent) populateTable(); // listen for changes to profiles - connect(SessionManager::instance() , SIGNAL(profileAdded(Profile::Ptr)) , this, + connect(SessionManager::instance(), SIGNAL(profileAdded(Profile::Ptr)), this, SLOT(addItems(Profile::Ptr))); - connect(SessionManager::instance() , SIGNAL(profileRemoved(Profile::Ptr)) , this, + connect(SessionManager::instance(), SIGNAL(profileRemoved(Profile::Ptr)), this, SLOT(removeItems(Profile::Ptr))); - connect(SessionManager::instance() , SIGNAL(profileChanged(Profile::Ptr)) , this, + connect(SessionManager::instance(), SIGNAL(profileChanged(Profile::Ptr)), this, SLOT(updateItems(Profile::Ptr))); connect(SessionManager::instance() , - SIGNAL(favoriteStatusChanged(Profile::Ptr, bool)) , this , - SLOT(updateFavoriteStatus(Profile::Ptr, bool))); + SIGNAL(favoriteStatusChanged(Profile::Ptr,bool)), this, + SLOT(updateFavoriteStatus(Profile::Ptr,bool))); // resize the session table to the full width of the table _ui->sessionTable->horizontalHeader()->setHighlightSections(false); @@ -88,10 +88,10 @@ ManageProfilesDialog::ManageProfilesDialog(QWidget* parent) _ui->sessionTable->columnWidth(ShortcutColumn) + 100); // setup buttons - connect(_ui->newProfileButton , SIGNAL(clicked()) , this , SLOT(createProfile())); - connect(_ui->editProfileButton , SIGNAL(clicked()) , this , SLOT(editSelected())); - connect(_ui->deleteProfileButton , SIGNAL(clicked()) , this , SLOT(deleteSelected())); - connect(_ui->setAsDefaultButton , SIGNAL(clicked()) , this , SLOT(setSelectedAsDefault())); + connect(_ui->newProfileButton, SIGNAL(clicked()), this, SLOT(createProfile())); + connect(_ui->editProfileButton, SIGNAL(clicked()), this, SLOT(editSelected())); + connect(_ui->deleteProfileButton, SIGNAL(clicked()), this, SLOT(deleteSelected())); + connect(_ui->setAsDefaultButton, SIGNAL(clicked()), this, SLOT(setSelectedAsDefault())); } void ManageProfilesDialog::showEvent(QShowEvent*) @@ -243,7 +243,7 @@ void ManageProfilesDialog::populateTable() } updateDefaultItem(); - connect(_sessionModel , SIGNAL(itemChanged(QStandardItem*)) , this , + connect(_sessionModel, SIGNAL(itemChanged(QStandardItem*)), this, SLOT(itemDataChanged(QStandardItem*))); // listen for changes in the table selection and update the state of the form's buttons @@ -251,8 +251,8 @@ void ManageProfilesDialog::populateTable() // // it appears that the selection model is changed when the model itself is replaced, // so the signals need to be reconnected each time the model is updated. - connect(_ui->sessionTable->selectionModel() , - SIGNAL(selectionChanged(QItemSelection, QItemSelection)) , this , + connect(_ui->sessionTable->selectionModel(), + SIGNAL(selectionChanged(QItemSelection,QItemSelection)), this, SLOT(tableSelectionChanged(QItemSelection))); _ui->sessionTable->selectRow(0); diff --git a/src/Part.cpp b/src/Part.cpp index de100306c..95d1be10f 100644 --- a/src/Part.cpp +++ b/src/Part.cpp @@ -71,10 +71,10 @@ Part::Part(QWidget* parentWidget , QObject* parent, const QVariantList&) _viewManager = new ViewManager(this, actionCollection()); _viewManager->setNavigationMethod(ViewManager::NoNavigation); - connect(_viewManager , SIGNAL(activeViewChanged(SessionController*)) , this , + connect(_viewManager, SIGNAL(activeViewChanged(SessionController*)), this , SLOT(activeViewChanged(SessionController*))); - connect(_viewManager , SIGNAL(empty()) , this , SLOT(terminalExited())); - connect(_viewManager , SIGNAL(newViewRequest()) , this , SLOT(newTab())); + connect(_viewManager, SIGNAL(empty()), this, SLOT(terminalExited())); + connect(_viewManager, SIGNAL(newViewRequest()), this, SLOT(newTab())); _viewManager->widget()->setParent(parentWidget); @@ -219,8 +219,8 @@ void Part::activeViewChanged(SessionController* controller) SLOT(activeViewTitleChanged(ViewProperties*))); activeViewTitleChanged(controller); - const char* displaySignal = SIGNAL(overrideShortcutCheck(QKeyEvent*, bool&)); - const char* partSlot = SLOT(overrideTerminalShortcut(QKeyEvent*, bool&)); + const char* displaySignal = SIGNAL(overrideShortcutCheck(QKeyEvent*,bool&)); + const char* partSlot = SLOT(overrideTerminalShortcut(QKeyEvent*,bool&)); disconnect(controller->view(), displaySignal, this, partSlot); connect(controller->view(), displaySignal, this, partSlot); diff --git a/src/ProfileList.cpp b/src/ProfileList.cpp index 15199166f..642e89a7e 100644 --- a/src/ProfileList.cpp +++ b/src/ProfileList.cpp @@ -56,15 +56,15 @@ ProfileList::ProfileList(bool addShortcuts , QObject* parent) favoriteChanged(iter.next(), true); } - connect(_group , SIGNAL(triggered(QAction*)) , this , SLOT(triggered(QAction*))); + connect(_group, SIGNAL(triggered(QAction*)), this, SLOT(triggered(QAction*))); // listen for future changes to the profiles - connect(manager , SIGNAL(favoriteStatusChanged(Profile::Ptr, bool)) , this , - SLOT(favoriteChanged(Profile::Ptr, bool))); - connect(manager , SIGNAL(shortcutChanged(Profile::Ptr, QKeySequence)) , this , - SLOT(shortcutChanged(Profile::Ptr, QKeySequence))); - connect(manager , SIGNAL(profileChanged(Profile::Ptr)) , this , + connect(manager, SIGNAL(favoriteStatusChanged(Profile::Ptr,bool)), this, + SLOT(favoriteChanged(Profile::Ptr,bool))); + connect(manager, SIGNAL(shortcutChanged(Profile::Ptr,QKeySequence)), this, + SLOT(shortcutChanged(Profile::Ptr,QKeySequence))); + connect(manager, SIGNAL(profileChanged(Profile::Ptr)), this, SLOT(profileChanged(Profile::Ptr))); } void ProfileList::updateEmptyAction() diff --git a/src/Session.cpp b/src/Session.cpp index 642b84b0d..b79387c41 100644 --- a/src/Session.cpp +++ b/src/Session.cpp @@ -130,21 +130,21 @@ Session::Session(QObject* parent) : //create emulation backend _emulation = new Vt102Emulation(); - connect(_emulation, SIGNAL(titleChanged(int, QString)), - this, SLOT(setUserTitle(int, QString))); + connect(_emulation, SIGNAL(titleChanged(int,QString)), + this, SLOT(setUserTitle(int,QString))); connect(_emulation, SIGNAL(stateSet(int)), this, SLOT(activityStateSet(int))); - connect(_emulation, SIGNAL(zmodemDetected()), this , + connect(_emulation, SIGNAL(zmodemDetected()), this, SLOT(fireZModemDetected())); connect(_emulation, SIGNAL(changeTabTextColorRequest(int)), this, SIGNAL(changeTabTextColorRequest(int))); connect(_emulation, SIGNAL(profileChangeCommandReceived(QString)), this, SIGNAL(profileChangeCommandReceived(QString))); - connect(_emulation, SIGNAL(flowControlKeyPressed(bool)) , this, + connect(_emulation, SIGNAL(flowControlKeyPressed(bool)), this, SLOT(updateFlowControlState(bool))); - connect(_emulation, SIGNAL(primaryScreenInUse(bool)) , this, + connect(_emulation, SIGNAL(primaryScreenInUse(bool)), this, SLOT(onPrimaryScreenInUse(bool))); - connect(_emulation, SIGNAL(selectedText(QString)) , this, + connect(_emulation, SIGNAL(selectedText(QString)), this, SLOT(onSelectedText(QString))); //create new teletype for I/O with shell process @@ -177,14 +177,14 @@ void Session::openTeletype(int fd) _shellProcess->setUtf8Mode(_emulation->utf8()); //connect teletype to emulation backend - connect(_shellProcess, SIGNAL(receivedData(const char*, int)), this, - SLOT(onReceiveBlock(const char*, int))); - connect(_emulation, SIGNAL(sendData(const char*, int)), _shellProcess, - SLOT(sendData(const char*, int))); + connect(_shellProcess, SIGNAL(receivedData(const char*,int)), this, + SLOT(onReceiveBlock(const char*,int))); + connect(_emulation, SIGNAL(sendData(const char*,int)), _shellProcess, + SLOT(sendData(const char*,int))); connect(_emulation, SIGNAL(lockPtyRequest(bool)), _shellProcess, SLOT(lockPty(bool))); connect(_emulation, SIGNAL(useUtf8Request(bool)), _shellProcess, SLOT(setUtf8Mode(bool))); - connect(_shellProcess, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(done(int, QProcess::ExitStatus))); - connect(_emulation, SIGNAL(imageSizeChanged(int, int)), this, SLOT(updateWindowSize(int, int))); + connect(_shellProcess, SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(done(int,QProcess::ExitStatus))); + connect(_emulation, SIGNAL(imageSizeChanged(int,int)), this, SLOT(updateWindowSize(int,int))); connect(_emulation, SIGNAL(imageSizeInitialized()), this, SLOT(run())); } @@ -292,16 +292,16 @@ void Session::addView(TerminalDisplay* widget) if (_emulation != 0) { // connect emulation - view signals and slots - connect(widget , SIGNAL(keyPressedSignal(QKeyEvent*)) , _emulation , + connect(widget, SIGNAL(keyPressedSignal(QKeyEvent*)), _emulation, SLOT(sendKeyEvent(QKeyEvent*))); - connect(widget , SIGNAL(mouseSignal(int, int, int, int)) , _emulation , - SLOT(sendMouseEvent(int, int, int, int))); - connect(widget , SIGNAL(sendStringToEmu(const char*)) , _emulation , + connect(widget, SIGNAL(mouseSignal(int,int,int,int)), _emulation, + SLOT(sendMouseEvent(int,int,int,int))); + connect(widget, SIGNAL(sendStringToEmu(const char*)), _emulation, SLOT(sendString(const char*))); // allow emulation to notify view when the foreground process // indicates whether or not it is interested in mouse signals - connect(_emulation , SIGNAL(programUsesMouseChanged(bool)) , widget , + connect(_emulation, SIGNAL(programUsesMouseChanged(bool)), widget, SLOT(setUsesMouse(bool))); widget->setUsesMouse(_emulation->programUsesMouse()); @@ -310,10 +310,10 @@ void Session::addView(TerminalDisplay* widget) } //connect view signals and slots - QObject::connect(widget , SIGNAL(changedContentSizeSignal(int, int)), this, - SLOT(onViewSizeChange(int, int))); + QObject::connect(widget, SIGNAL(changedContentSizeSignal(int,int)), this, + SLOT(onViewSizeChange(int,int))); - QObject::connect(widget , SIGNAL(destroyed(QObject*)) , this , + QObject::connect(widget, SIGNAL(destroyed(QObject*)), this, SLOT(viewDestroyed(QObject*))); } @@ -342,7 +342,7 @@ void Session::removeView(TerminalDisplay* widget) disconnect(widget, 0, _emulation, 0); // disconnect state change signals emitted by emulation - disconnect(_emulation , 0 , widget , 0); + disconnect(_emulation, 0, widget, 0); } // close the session automatically when the last view is removed @@ -1119,13 +1119,13 @@ void Session::startZModem(const QString& zmodem, const QString& dir, const QStri this, SLOT(zmodemReadAndSendBlock())); connect(_zmodemProc, SIGNAL(readyReadStandardError()), this, SLOT(zmodemReadStatus())); - connect(_zmodemProc, SIGNAL(finished(int, QProcess::ExitStatus)), + connect(_zmodemProc, SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(zmodemFinished())); _zmodemProc->start(); - disconnect(_shellProcess, SIGNAL(receivedData(const char*, int)), this, SLOT(onReceiveBlock(const char*, int))); - connect(_shellProcess, SIGNAL(receivedData(const char*, int)), this, SLOT(zmodemRcvBlock(const char*, int))); + disconnect(_shellProcess, SIGNAL(receivedData(const char*,int)), this, SLOT(onReceiveBlock(const char*,int))); + connect(_shellProcess, SIGNAL(receivedData(const char*,int)), this, SLOT(zmodemRcvBlock(const char*,int))); _zmodemProgress = new ZModemDialog(QApplication::activeWindow(), false, i18n("ZModem Progress")); @@ -1188,8 +1188,8 @@ void Session::zmodemFinished() _zmodemBusy = false; delete process; // Now, the KProcess may be disposed safely. - disconnect(_shellProcess, SIGNAL(receivedData(const char*, int)), this , SLOT(zmodemRcvBlock(const char*, int))); - connect(_shellProcess, SIGNAL(receivedData(const char*, int)), this, SLOT(onReceiveBlock(const char*, int))); + disconnect(_shellProcess, SIGNAL(receivedData(const char*,int)), this , SLOT(zmodemRcvBlock(const char*,int))); + connect(_shellProcess, SIGNAL(receivedData(const char*,int)), this, SLOT(onReceiveBlock(const char*,int))); _shellProcess->sendData("\030\030\030\030", 4); // Abort _shellProcess->sendData("\001\013\n", 3); // Try to get prompt back @@ -1387,11 +1387,11 @@ void SessionGroup::setMasterStatus(Session* session , bool master) _sessions[session] = master; if (master) { - connect(session->emulation() , SIGNAL(sendData(const char*, int)) , this, - SLOT(forwardData(const char*, int))); + connect(session->emulation(), SIGNAL(sendData(const char*,int)), this, + SLOT(forwardData(const char*,int))); } else { - disconnect(session->emulation() , SIGNAL(sendData(const char*, int)) , this, - SLOT(forwardData(const char*, int))); + disconnect(session->emulation(), SIGNAL(sendData(const char*,int)), this, + SLOT(forwardData(const char*,int))); } } void SessionGroup::forwardData(const char* data, int size) diff --git a/src/SessionController.cpp b/src/SessionController.cpp index 9e1555d8c..60d3f3638 100644 --- a/src/SessionController.cpp +++ b/src/SessionController.cpp @@ -116,39 +116,39 @@ SessionController::SessionController(Session* session , TerminalDisplay* view, Q view->setSessionController(this); // listen for session resize requests - connect(_session , SIGNAL(resizeRequest(QSize)) , this , + connect(_session, SIGNAL(resizeRequest(QSize)), this, SLOT(sessionResizeRequest(QSize))); // listen for popup menu requests - connect(_view , SIGNAL(configureRequest(QPoint)) , this, + connect(_view, SIGNAL(configureRequest(QPoint)), this, SLOT(showDisplayContextMenu(QPoint))); // move view to newest output when keystrokes occur - connect(_view , SIGNAL(keyPressedSignal(QKeyEvent*)) , this , + connect(_view, SIGNAL(keyPressedSignal(QKeyEvent*)), this, SLOT(trackOutput(QKeyEvent*))); // listen to activity / silence notifications from session - connect(_session , SIGNAL(stateChanged(int)) , this , + connect(_session, SIGNAL(stateChanged(int)), this, SLOT(sessionStateChanged(int))); // listen to title and icon changes - connect(_session , SIGNAL(titleChanged()) , this , SLOT(sessionTitleChanged())); + connect(_session, SIGNAL(titleChanged()), this, SLOT(sessionTitleChanged())); // listen for color changes - connect(_session , SIGNAL(changeBackgroundColorRequest(QColor)) , _view , SLOT(setBackgroundColor(QColor))); - connect(_session , SIGNAL(changeForegroundColorRequest(QColor)) , _view , SLOT(setForegroundColor(QColor))); + connect(_session, SIGNAL(changeBackgroundColorRequest(QColor)), _view, SLOT(setBackgroundColor(QColor))); + connect(_session, SIGNAL(changeForegroundColorRequest(QColor)), _view, SLOT(setForegroundColor(QColor))); // update the title when the session starts - connect(_session , SIGNAL(started()) , this , SLOT(snapshot())); + connect(_session, SIGNAL(started()), this, SLOT(snapshot())); // listen for output changes to set activity flag - connect(_session->emulation() , SIGNAL(outputChanged()) , this , + connect(_session->emulation(), SIGNAL(outputChanged()), this, SLOT(fireActivity())); // listen for detection of ZModem transfer - connect(_session , SIGNAL(zmodemDetected()) , this , SLOT(zmodemDownload())); + connect(_session, SIGNAL(zmodemDetected()), this, SLOT(zmodemDownload())); // listen for flow control status changes - connect(_session , SIGNAL(flowControlEnabledChanged(bool)) , _view , + connect(_session, SIGNAL(flowControlEnabledChanged(bool)), _view, SLOT(setFlowControlWarningEnabled(bool))); _view->setFlowControlWarningEnabled(_session->flowControlEnabled()); @@ -160,8 +160,8 @@ SessionController::SessionController(Session* session , TerminalDisplay* view, Q QTimer* activityTimer = new QTimer(_session); activityTimer->setSingleShot(true); activityTimer->setInterval(2000); - connect(_view , SIGNAL(keyPressedSignal(QKeyEvent*)) , activityTimer , SLOT(start())); - connect(activityTimer , SIGNAL(timeout()) , this , SLOT(snapshot())); + connect(_view, SIGNAL(keyPressedSignal(QKeyEvent*)), activityTimer, SLOT(start())); + connect(activityTimer, SIGNAL(timeout()), this, SLOT(snapshot())); _allControllers.insert(this); } @@ -308,10 +308,10 @@ bool SessionController::eventFilter(QObject* watched , QEvent* event) // by the focused view // first, disconnect any other views which are listening for bell signals from the session - disconnect(_session , SIGNAL(bellRequest(QString)) , 0 , 0); + disconnect(_session, SIGNAL(bellRequest(QString)), 0, 0); // second, connect the newly focused view to listen for the session's bell signal - connect(_session , SIGNAL(bellRequest(QString)) , - _view , SLOT(bell(QString))); + connect(_session, SIGNAL(bellRequest(QString)), + _view, SLOT(bell(QString))); if (_copyToAllTabsAction->isChecked()) { // A session with "Copy To All Tabs" has come into focus: @@ -329,9 +329,9 @@ bool SessionController::eventFilter(QObject* watched , QEvent* event) (!_viewUrlFilter || _urlFilterUpdateRequired) && ((QMouseEvent*)event)->buttons() == Qt::NoButton) { if (_view->screenWindow() && !_viewUrlFilter) { - connect(_view->screenWindow() , SIGNAL(scrolled(int)) , this , + connect(_view->screenWindow(), SIGNAL(scrolled(int)), this, SLOT(requireUrlFilterUpdate())); - connect(_view->screenWindow() , SIGNAL(outputChanged()) , this , + connect(_view->screenWindow(), SIGNAL(outputChanged()), this, SLOT(requireUrlFilterUpdate())); // install filter on the view to highlight URLs @@ -361,8 +361,8 @@ void SessionController::setSearchBar(IncrementalSearchBar* searchBar) { // disconnect the existing search bar if (_searchBar) { - disconnect(this , 0 , _searchBar , 0); - disconnect(_searchBar , 0 , this , 0); + disconnect(this, 0, _searchBar, 0); + disconnect(_searchBar, 0, this, 0); } // remove any existing search filter @@ -371,11 +371,11 @@ void SessionController::setSearchBar(IncrementalSearchBar* searchBar) // connect new search bar _searchBar = searchBar; if (_searchBar) { - connect(_searchBar , SIGNAL(closeClicked()) , this , SLOT(searchClosed())); - connect(_searchBar , SIGNAL(findNextClicked()) , this , SLOT(findNextInHistory())); - connect(_searchBar , SIGNAL(findPreviousClicked()) , this , SLOT(findPreviousInHistory())); - connect(_searchBar , SIGNAL(highlightMatchesToggled(bool)) , this , SLOT(highlightMatches(bool))); - connect(_searchBar , SIGNAL(matchCaseToggled(bool)) , this , SLOT(changeSearchMatch())); + connect(_searchBar, SIGNAL(closeClicked()), this, SLOT(searchClosed())); + connect(_searchBar, SIGNAL(findNextClicked()), this, SLOT(findNextInHistory())); + connect(_searchBar, SIGNAL(findPreviousClicked()), this, SLOT(findPreviousInHistory())); + connect(_searchBar, SIGNAL(highlightMatchesToggled(bool)) , this , SLOT(highlightMatches(bool))); + connect(_searchBar, SIGNAL(matchCaseToggled(bool)), this, SLOT(changeSearchMatch())); // if the search bar was previously active // then re-enter search mode @@ -830,9 +830,9 @@ void SessionController::listenForScreenWindowUpdates() if (_listenForScreenWindowUpdates) return; - connect(_view->screenWindow() , SIGNAL(outputChanged()) , this , + connect(_view->screenWindow(), SIGNAL(outputChanged()), this, SLOT(updateSearchFilter())); - connect(_view->screenWindow() , SIGNAL(scrolled(int)) , this , + connect(_view->screenWindow(), SIGNAL(scrolled(int)), this, SLOT(updateSearchFilter())); _listenForScreenWindowUpdates = true; @@ -861,7 +861,7 @@ void SessionController::searchHistory(bool showSearchBar) _searchFilter = new RegExpFilter(); _view->filterChain()->addFilter(_searchFilter); - connect(_searchBar , SIGNAL(searchChanged(QString)) , this , + connect(_searchBar, SIGNAL(searchChanged(QString)), this, SLOT(searchTextChanged(QString))); // invoke search for matches for the current search text @@ -874,7 +874,7 @@ void SessionController::searchHistory(bool showSearchBar) } else { setFindNextPrevEnabled(false); - disconnect(_searchBar , SIGNAL(searchChanged(QString)) , this , + disconnect(_searchBar, SIGNAL(searchChanged(QString)), this, SLOT(searchTextChanged(QString))); removeSearchFilter(); @@ -921,7 +921,7 @@ void SessionController::beginSearch(const QString& text , int direction) if (!regExp.isEmpty()) { SearchHistoryTask* task = new SearchHistoryTask(this); - connect(task , SIGNAL(completed(bool)) , this , SLOT(searchCompleted(bool))); + connect(task, SIGNAL(completed(bool)), this, SLOT(searchCompleted(bool))); task->setRegExp(regExp); task->setSearchDirection((SearchHistoryTask::SearchDirection)direction); @@ -982,8 +982,8 @@ void SessionController::showHistoryOptions() dialog->setMode(HistorySizeDialog::NoHistory); } - connect(dialog , SIGNAL(optionsChanged(int, int)) , - this , SLOT(scrollBackOptionsChanged(int, int))); + connect(dialog, SIGNAL(optionsChanged(int,int)), + this, SLOT(scrollBackOptionsChanged(int,int))); dialog->show(); } @@ -1333,9 +1333,9 @@ void SaveHistoryTask::execute() _jobSession.insert(job, jobInfo); - connect(job , SIGNAL(dataReq(KIO::Job*, QByteArray&)), - this, SLOT(jobDataRequested(KIO::Job*, QByteArray&))); - connect(job , SIGNAL(result(KJob*)), + connect(job, SIGNAL(dataReq(KIO::Job*,QByteArray&)), + this, SLOT(jobDataRequested(KIO::Job*,QByteArray&))); + connect(job, SIGNAL(result(KJob*)), this, SLOT(jobResult(KJob*))); } diff --git a/src/ViewContainer.cpp b/src/ViewContainer.cpp index 616a9f420..598051a7f 100644 --- a/src/ViewContainer.cpp +++ b/src/ViewContainer.cpp @@ -147,7 +147,7 @@ void ViewContainer::addView(QWidget* view , ViewProperties* item, int index) _navigation[view] = item; - connect(view , SIGNAL(destroyed(QObject*)) , this , SLOT(viewDestroyed(QObject*))); + connect(view, SIGNAL(destroyed(QObject*)), this, SLOT(viewDestroyed(QObject*))); addViewWidget(view, index); @@ -179,7 +179,7 @@ void ViewContainer::removeView(QWidget* view) _views.removeAll(view); _navigation.remove(view); - disconnect(view , SIGNAL(destroyed(QObject*)) , this , SLOT(viewDestroyed(QObject*))); + disconnect(view, SIGNAL(destroyed(QObject*)), this, SLOT(viewDestroyed(QObject*))); removeViewWidget(view); @@ -436,13 +436,13 @@ TabbedViewContainer::TabbedViewContainer(NavigationPosition position , QObject* _tabBar->setFocusPolicy(Qt::NoFocus); _tabBar->setSelectionBehaviorOnRemove(QTabBar::SelectPreviousTab); - connect(_tabBar , SIGNAL(currentChanged(int)) , this , SLOT(currentTabChanged(int))); - connect(_tabBar , SIGNAL(tabDoubleClicked(int)) , this , SLOT(tabDoubleClicked(int))); - connect(_tabBar , SIGNAL(newTabRequest()) , this , SIGNAL(newViewRequest())); - connect(_tabBar , SIGNAL(wheelDelta(int)) , this , SLOT(wheelScrolled(int))); - connect(_tabBar , SIGNAL(initiateDrag(int)) , this , SLOT(startTabDrag(int))); - connect(_tabBar, SIGNAL(contextMenu(int, QPoint)), this, - SLOT(openTabContextMenu(int, QPoint))); + connect(_tabBar, SIGNAL(currentChanged(int)), this, SLOT(currentTabChanged(int))); + connect(_tabBar, SIGNAL(tabDoubleClicked(int)), this, SLOT(tabDoubleClicked(int))); + connect(_tabBar, SIGNAL(newTabRequest()), this, SIGNAL(newViewRequest())); + connect(_tabBar, SIGNAL(wheelDelta(int)), this, SLOT(wheelScrolled(int))); + connect(_tabBar, SIGNAL(initiateDrag(int)), this, SLOT(startTabDrag(int))); + connect(_tabBar, SIGNAL(contextMenu(int,QPoint)), this, + SLOT(openTabContextMenu(int,QPoint))); // The context menu of tab bar _contextPopupMenu = new KMenu(_tabBar); @@ -473,8 +473,8 @@ TabbedViewContainer::TabbedViewContainer(NavigationPosition position , QObject* _newTabButton->setHidden(true); _closeTabButton->setHidden(true); - connect(_newTabButton , SIGNAL(clicked()) , this , SIGNAL(newViewRequest())); - connect(_closeTabButton , SIGNAL(clicked()) , this , SLOT(closeCurrentTab())); + connect(_newTabButton, SIGNAL(clicked()), this, SIGNAL(newViewRequest())); + connect(_closeTabButton, SIGNAL(clicked()), this, SLOT(closeCurrentTab())); // Combin tab bar and 'new/close tab' buttons _tabBarLayout = new QHBoxLayout; @@ -748,11 +748,11 @@ void TabbedViewContainer::addViewWidget(QWidget* view , int index) _stackWidget->updateGeometry(); ViewProperties* item = viewProperties(view); - connect(item , SIGNAL(titleChanged(ViewProperties*)) , this , + connect(item, SIGNAL(titleChanged(ViewProperties*)), this , SLOT(updateTitle(ViewProperties*))); - connect(item , SIGNAL(iconChanged(ViewProperties*)) , this , + connect(item, SIGNAL(iconChanged(ViewProperties*)), this , SLOT(updateIcon(ViewProperties*))); - connect(item , SIGNAL(activity(ViewProperties*)) , this , + connect(item, SIGNAL(activity(ViewProperties*)), this , SLOT(updateActivity(ViewProperties*))); _tabBar->insertTab(index , item->icon() , item->title()); diff --git a/src/ViewManager.cpp b/src/ViewManager.cpp index ca508990b..5092f740c 100644 --- a/src/ViewManager.cpp +++ b/src/ViewManager.cpp @@ -641,14 +641,14 @@ ViewContainer* ViewManager::createContainer(const Profile::Ptr profile) new TabbedViewContainer(position, _viewSplitter); connect(container, - SIGNAL(detachTab(ViewContainer*, QWidget*)), + SIGNAL(detachTab(ViewContainer*,QWidget*)), this, - SLOT(detachView(ViewContainer*, QWidget*)) + SLOT(detachView(ViewContainer*,QWidget*)) ); connect(container, - SIGNAL(closeTab(ViewContainer*, QWidget*)), + SIGNAL(closeTab(ViewContainer*,QWidget*)), this, - SLOT(closeTabFromContainer(ViewContainer*, QWidget*))); + SLOT(closeTabFromContainer(ViewContainer*,QWidget*))); } break; @@ -660,15 +660,15 @@ ViewContainer* ViewManager::createContainer(const Profile::Ptr profile) applyProfileToContainer(container, profile); // connect signals and slots - connect(container , SIGNAL(viewAdded(QWidget*, ViewProperties*)) , _containerSignalMapper , + connect(container , SIGNAL(viewAdded(QWidget*,ViewProperties*)) , _containerSignalMapper , SLOT(map())); connect(container , SIGNAL(viewRemoved(QWidget*)) , _containerSignalMapper , SLOT(map())); _containerSignalMapper->setMapping(container, container); connect(container, SIGNAL(newViewRequest()), this, SIGNAL(newViewRequest())); - connect(container, SIGNAL(moveViewRequest(int, int, bool&)), - this , SLOT(containerMoveViewRequest(int, int, bool&))); + connect(container, SIGNAL(moveViewRequest(int,int,bool&)), + this , SLOT(containerMoveViewRequest(int,int,bool&))); connect(container , SIGNAL(viewRemoved(QWidget*)) , this , SLOT(viewCloseRequest(QWidget*))); connect(container , SIGNAL(closeRequest(QWidget*)) , this , SLOT(viewCloseRequest(QWidget*))); connect(container , SIGNAL(activeViewChanged(QWidget*)) , this , SLOT(viewActivated(QWidget*))); diff --git a/src/tests/PartTest.cpp b/src/tests/PartTest.cpp index df6ee90d0..e1117784d 100644 --- a/src/tests/PartTest.cpp +++ b/src/tests/PartTest.cpp @@ -117,8 +117,8 @@ void PartTest::testShortcutOverride() _shortcutTriggered = false; _override = false; _overrideCalled = false; - QVERIFY(connect(terminalPart, SIGNAL(overrideShortcut(QKeyEvent*, bool&)), - this, SLOT(overrideShortcut(QKeyEvent*, bool&)))); + QVERIFY(connect(terminalPart, SIGNAL(overrideShortcut(QKeyEvent*,bool&)), + this, SLOT(overrideShortcut(QKeyEvent*,bool&)))); //QTest::keyClick(terminalPart->widget(),Qt::Key_S,Qt::ControlModifier); _shortcutEventLoop = new QEventLoop();