Commit 5b083640 authored by Kurt Hindenburg's avatar Kurt Hindenburg

whitespace and style fixes

Use 'git diff -w --ignore-all-space' to see non-whitespace changes
parent 60e4e6a7
......@@ -200,7 +200,7 @@ void Application::processTabsFromFileArgs(KCmdLineArgs* args,
lineTokens[key] = value;
}
// should contain at least one of 'command' and 'profile'
if (lineTokens.contains("command") || lineTokens.contains("profile") ) {
if (lineTokens.contains("command") || lineTokens.contains("profile")) {
createTabFromArgs(args, window, lineTokens);
sessions++;
} else {
......@@ -326,7 +326,7 @@ void Application::listAvailableProfiles()
{
QStringList paths = ProfileManager::instance()->availableProfilePaths();
foreach ( const QString& path, paths) {
foreach(const QString& path, paths) {
QFileInfo info(path);
printf("%s\n", info.completeBaseName().toLocal8Bit().constData());
}
......@@ -339,7 +339,7 @@ void Application::listProfilePropertyInfo()
Profile::Ptr tempProfile = ProfileManager::instance()->defaultProfile();
const QStringList names = tempProfile->propertiesInfoList();
foreach ( const QString& name, names) {
foreach(const QString& name, names) {
printf("%s\n", name.toLocal8Bit().constData());
}
......@@ -373,17 +373,17 @@ Profile::Ptr Application::processProfileChangeArgs(KCmdLineArgs* args, Profile::
}
// run a custom command
if ( args->isSet("e") ) {
if (args->isSet("e")) {
QString commandExec;
QStringList commandArguments;
// Note: KCmdLineArgs::count() return the number of arguments
// that aren't options.
if ( args->count() > 0 ) { // example: konsole -e man ls
if (args->count() > 0) { // example: konsole -e man ls
commandExec = args->getOption("e");
commandArguments << commandExec;
for ( int i = 0 ; i < args->count() ; i++ )
for (int i = 0 ; i < args->count() ; i++)
commandArguments << args->arg(i);
} else { // example: konsole -e "man ls"
......@@ -402,7 +402,7 @@ Profile::Ptr Application::processProfileChangeArgs(KCmdLineArgs* args, Profile::
shouldUseNewProfile = true;
}
if ( shouldUseNewProfile ) {
if (shouldUseNewProfile) {
return newProfile;
} else {
return baseProfile;
......
......@@ -131,7 +131,7 @@ QList<QPair<QString, QString> > BookmarkHandler::currentBookmarkList() const
{
QList<QPair<QString, QString> > list;
foreach ( ViewProperties* view, _views ) {
foreach(ViewProperties* view, _views) {
list << QPair<QString, QString>(titleForView(view) , urlForView(view));
}
......
......@@ -269,18 +269,23 @@ inline const QColor color256(quint8 u, const ColorEntry* base)
// 232..255: gray, leaving out black and white
int gray = u * 10 + 8;
return QColor(gray, gray, gray);
}
inline QColor CharacterColor::color(const ColorEntry* base) const
{
switch (_colorSpace) {
case COLOR_SPACE_DEFAULT: return base[_u + 0 + (_v ? BASE_COLORS : 0)].color;
case COLOR_SPACE_SYSTEM: return base[_u + 2 + (_v ? BASE_COLORS : 0)].color;
case COLOR_SPACE_256: return color256(_u, base);
case COLOR_SPACE_RGB: return QColor(_u, _v, _w);
case COLOR_SPACE_UNDEFINED: return QColor();
case COLOR_SPACE_DEFAULT:
return base[_u + 0 + (_v ? BASE_COLORS : 0)].color;
case COLOR_SPACE_SYSTEM:
return base[_u + 2 + (_v ? BASE_COLORS : 0)].color;
case COLOR_SPACE_256:
return color256(_u, base);
case COLOR_SPACE_RGB:
return QColor(_u, _v, _w);
case COLOR_SPACE_UNDEFINED:
return QColor();
}
Q_ASSERT(false); // invalid color space
......
......@@ -33,8 +33,8 @@
#include <KConfigGroup>
namespace {
const int FGCOLOR_INDEX = 0;
const int BGCOLOR_INDEX = 1;
const int FGCOLOR_INDEX = 0;
const int BGCOLOR_INDEX = 1;
}
using namespace Konsole;
......
......@@ -198,7 +198,7 @@ void ColorSchemeEditor::setupColorTable(const ColorScheme* colors)
for (int row = 0 ; row < TABLE_COLORS ; row++) {
QTableWidgetItem* nameItem = new QTableWidgetItem(ColorScheme::translatedColorNameForIndex(row));
nameItem->setFlags( nameItem->flags() & ~Qt::ItemIsEditable );
nameItem->setFlags(nameItem->flags() & ~Qt::ItemIsEditable);
QTableWidgetItem* colorItem = new QTableWidgetItem();
colorItem->setBackground(table[row].color);
......
......@@ -181,7 +181,7 @@ void ColorSchemeManager::loadAllColorSchemes()
int failed = 0;
QStringList nativeColorSchemes = listColorSchemes();
foreach ( const QString& colorScheme, nativeColorSchemes) {
foreach(const QString& colorScheme, nativeColorSchemes) {
if (loadColorScheme(colorScheme))
success++;
else
......@@ -189,7 +189,7 @@ void ColorSchemeManager::loadAllColorSchemes()
}
QStringList kde3ColorSchemes = listKDE3ColorSchemes();
foreach ( const QString& colorScheme, kde3ColorSchemes) {
foreach(const QString& colorScheme, kde3ColorSchemes) {
if (loadKDE3ColorScheme(colorScheme))
success++;
else
......@@ -295,7 +295,7 @@ const ColorScheme* ColorSchemeManager::defaultColorScheme() const
void ColorSchemeManager::addColorScheme(ColorScheme* scheme)
{
// remove existing colorscheme with the same name
if ( _colorSchemes.contains(scheme->name()) ) {
if (_colorSchemes.contains(scheme->name())) {
delete _colorSchemes[scheme->name()];
_colorSchemes.remove(scheme->name());
}
......
......@@ -425,7 +425,7 @@ void EditProfileDialog::setupAppearancePage(const Profile::Ptr profile)
_ui->colorSchemeList->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
connect(_ui->colorSchemeList->selectionModel(),
SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
SIGNAL(selectionChanged(QItemSelection, QItemSelection)),
this, SLOT(colorSchemeSelected()));
connect(_ui->colorSchemeList, SIGNAL(entered(QModelIndex)), this,
SLOT(previewColorScheme(QModelIndex)));
......@@ -503,7 +503,7 @@ void EditProfileDialog::updateColorSchemeList(bool selectCurrentScheme)
QList<const ColorScheme*> schemeList = ColorSchemeManager::instance()->allColorSchemes();
foreach ( const ColorScheme* scheme, schemeList) {
foreach(const ColorScheme* scheme, schemeList) {
QStandardItem* item = new QStandardItem(scheme->description());
item->setData(QVariant::fromValue(scheme) , Qt::UserRole + 1);
item->setFlags(item->flags());
......@@ -544,7 +544,7 @@ void EditProfileDialog::updateKeyBindingsList(bool selectCurrentTranslator)
QStandardItem* selectedItem = 0;
QStringList translatorNames = keyManager->allTranslators();
foreach (const QString& translatorName, translatorNames) {
foreach(const QString& translatorName, translatorNames) {
const KeyboardTranslator* translator = keyManager->findTranslator(translatorName);
QStandardItem* item = new QStandardItem(translator->description());
......@@ -800,7 +800,7 @@ void EditProfileDialog::updateButtonApply()
userModified = true;
break;
}
// for not-previewed property
// for not-previewed property
} else if ((value != _profile->property<QVariant>(aProperty))) {
userModified = true;
break;
......@@ -816,7 +816,7 @@ void EditProfileDialog::setupKeyboardPage(const Profile::Ptr /* profile */)
updateKeyBindingsList(true);
connect(_ui->keyBindingList->selectionModel(),
SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
SIGNAL(selectionChanged(QItemSelection, QItemSelection)),
SLOT(keyBindingSelected()));
connect(_ui->newKeyBindingsButton, SIGNAL(clicked()), this,
SLOT(newKeyBinding()));
......
......@@ -94,7 +94,7 @@ void Emulation::checkSelectedText()
Emulation::~Emulation()
{
foreach ( ScreenWindow* window, _windows) {
foreach(ScreenWindow* window, _windows) {
delete window;
}
......
......@@ -245,7 +245,7 @@ Filter::HotSpot* Filter::hotSpotAt(int line , int column) const
{
QList<HotSpot*> hotspots = _hotspots.values(line);
foreach ( HotSpot* spot, hotspots ) {
foreach(HotSpot* spot, hotspots) {
if (spot->startLine() == line && spot->startColumn() > column)
continue;
if (spot->endLine() == line && spot->endColumn() < column)
......
......@@ -62,7 +62,7 @@ HistoryFile::HistoryFile()
_readWriteBalance(0)
{
const QString tmpFormat = KStandardDirs::locateLocal("tmp", QString())
+ "konsole-XXXXXX.history";
+ "konsole-XXXXXX.history";
_tmpFile.setFileTemplate(tmpFormat);
if (_tmpFile.open()) {
_tmpFile.setAutoRemove(true);
......
......@@ -55,13 +55,13 @@ HistorySizeWidget::HistorySizeWidget(QWidget* parent)
modeGroup->addButton(_ui->fixedSizeHistoryButton);
modeGroup->addButton(_ui->unlimitedHistoryButton);
connect(modeGroup, SIGNAL(buttonClicked(QAbstractButton*)),
this, SLOT(buttonClicked(QAbstractButton*)) );
this, SLOT(buttonClicked(QAbstractButton*)));
_ui->historyLineSpinner->setSuffix(ki18ncp("Unit of scrollback", " line", " lines"));
this->setLineCount(HistorySizeWidget::DefaultLineCount);
connect(_ui->historyLineSpinner, SIGNAL(valueChanged(int)),
this, SIGNAL(historySizeChanged(int)) );
this, SIGNAL(historySizeChanged(int)));
}
HistorySizeWidget::~HistorySizeWidget()
......
......@@ -177,7 +177,7 @@ void IncrementalSearchBar::setFoundMatch(bool match)
KStatefulBrush backgroundBrush(KColorScheme::View, KColorScheme::NegativeBackground);
QString matchStyleSheet = QString("QLineEdit{ background-color:%1 }")
.arg(backgroundBrush.brush(_searchEdit).color().name());
.arg(backgroundBrush.brush(_searchEdit).color().name());
_searchEdit->setStyleSheet(matchStyleSheet);
} else {
......
......@@ -71,7 +71,7 @@ void KeyBindingEditor::removeSelectedEntry()
{
QList<QTableWidgetItem*> uniqueList;
foreach ( QTableWidgetItem* item, _ui->keyBindingTable->selectedItems() ) {
foreach(QTableWidgetItem* item, _ui->keyBindingTable->selectedItems()) {
if (item->column() == 1) //Select item at the first column
item = _ui->keyBindingTable->item(item->row(), 0);
......@@ -79,7 +79,7 @@ void KeyBindingEditor::removeSelectedEntry()
uniqueList.append(item);
}
foreach ( QTableWidgetItem* item, uniqueList ) {
foreach(QTableWidgetItem* item, uniqueList) {
// get the first item in the row which has the entry
KeyboardTranslator::Entry existing = item->data(Qt::UserRole).
......
......@@ -281,7 +281,7 @@ bool KeyboardTranslatorReader::parseAsKeyCode(const QString& item , int& keyCode
if (sequence.count() > 1) {
kWarning() << "Unhandled key codes in sequence: " << item;
}
// additional cases implemented for backwards compatibility with KDE 3
// additional cases implemented for backwards compatibility with KDE 3
} else if (item == "prior")
keyCode = Qt::Key_PageUp;
else if (item == "next")
......@@ -436,8 +436,8 @@ bool KeyboardTranslator::Entry::matches(int testKeyCode,
// special handling for the 'Any Modifier' state, which checks for the presence of
// any or no modifiers. In this context, the 'keypad' modifier does not count.
bool anyModifiersSet = (testKeyboardModifiers != 0)
&& (testKeyboardModifiers != Qt::KeypadModifier);
bool anyModifiersSet = (testKeyboardModifiers != 0)
&& (testKeyboardModifiers != Qt::KeypadModifier);
bool wantAnyModifier = _state & KeyboardTranslator::AnyModifierState;
if (_stateMask & KeyboardTranslator::AnyModifierState) {
if (wantAnyModifier != anyModifiersSet)
......
......@@ -89,7 +89,7 @@ void KeyboardTranslatorManager::findTranslators()
// add the name of each translator to the list and associated
// the name with a null pointer to indicate that the translator
// has not yet been loaded from disk
foreach ( const QString& translatorPath, list) {
foreach(const QString& translatorPath, list) {
QString name = QFileInfo(translatorPath).baseName();
......@@ -136,8 +136,9 @@ bool KeyboardTranslatorManager::saveTranslator(const KeyboardTranslator* transla
KeyboardTranslatorWriter writer(&destination);
writer.writeHeader(translator->description());
foreach ( const KeyboardTranslator::Entry& entry, translator->entries() )
foreach(const KeyboardTranslator::Entry& entry, translator->entries()) {
writer.writeEntry(entry);
}
}
destination.close();
......
......@@ -82,24 +82,24 @@ MainWindow::MainWindow()
// create view manager
_viewManager = new ViewManager(this, actionCollection());
connect(_viewManager , SIGNAL(empty()) , this , SLOT(close()));
connect(_viewManager , SIGNAL(activeViewChanged(SessionController*)) , this ,
connect(_viewManager, SIGNAL(empty()), this, SLOT(close()));
connect(_viewManager, SIGNAL(activeViewChanged(SessionController*)), this,
SLOT(activeViewChanged(SessionController*)));
connect(_viewManager , SIGNAL(unplugController(SessionController*)) , this ,
connect(_viewManager, SIGNAL(unplugController(SessionController*)), this,
SLOT(disconnectController(SessionController*)));
connect(_viewManager , SIGNAL(viewPropertiesChanged(QList<ViewProperties*>)) ,
bookmarkHandler() , SLOT(setViews(QList<ViewProperties*>)));
connect(_viewManager, SIGNAL(viewPropertiesChanged(QList<ViewProperties*>)),
bookmarkHandler(), SLOT(setViews(QList<ViewProperties*>)));
connect(_viewManager , SIGNAL(setSaveGeometryOnExitRequest(bool)) , this ,
connect(_viewManager, SIGNAL(setSaveGeometryOnExitRequest(bool)), this,
SLOT(setSaveGeometryOnExit(bool)));
connect(_viewManager , SIGNAL(updateWindowIcon()) , this ,
connect(_viewManager, SIGNAL(updateWindowIcon()), this,
SLOT(updateWindowIcon()));
connect(_viewManager , SIGNAL(newViewRequest(Profile::Ptr)) ,
this , SLOT(newFromProfile(Profile::Ptr)));
connect(_viewManager , SIGNAL(newViewRequest()) ,
this , SLOT(newTab()));
connect(_viewManager , SIGNAL(viewDetached(Session*)) ,
this , SIGNAL(viewDetached(Session*)) );
connect(_viewManager, SIGNAL(newViewRequest(Profile::Ptr)),
this, SLOT(newFromProfile(Profile::Ptr)));
connect(_viewManager, SIGNAL(newViewRequest()),
this, SLOT(newTab()));
connect(_viewManager, SIGNAL(viewDetached(Session*)),
this, SIGNAL(viewDetached(Session*)));
// create main window widgets
setupWidgets();
......@@ -185,10 +185,10 @@ ViewManager* MainWindow::viewManager() const
void MainWindow::disconnectController(SessionController* controller)
{
disconnect(controller , SIGNAL(titleChanged(ViewProperties*))
, this , SLOT(activeViewTitleChanged(ViewProperties*)));
disconnect(controller , SIGNAL(rawTitleChanged())
, this , SLOT(updateWindowCaption()));
disconnect(controller, SIGNAL(titleChanged(ViewProperties*)),
this, SLOT(activeViewTitleChanged(ViewProperties*)));
disconnect(controller, SIGNAL(rawTitleChanged()),
this, SLOT(updateWindowCaption()));
// KXmlGuiFactory::removeClient() will try to access actions associated
// with the controller internally, which may not be valid after the controller
......@@ -204,8 +204,8 @@ void MainWindow::activeViewChanged(SessionController* controller)
{
// associate bookmark menu with current session
bookmarkHandler()->setActiveView(controller);
disconnect(bookmarkHandler() , SIGNAL(openUrl(KUrl)) , 0 , 0);
connect(bookmarkHandler() , SIGNAL(openUrl(KUrl)) , controller ,
disconnect(bookmarkHandler(), SIGNAL(openUrl(KUrl)), 0, 0);
connect(bookmarkHandler(), SIGNAL(openUrl(KUrl)), controller,
SLOT(openUrl(KUrl)));
if (_pluggedController)
......@@ -215,10 +215,10 @@ void MainWindow::activeViewChanged(SessionController* controller)
_pluggedController = controller;
// listen for title changes from the current session
connect(controller , SIGNAL(titleChanged(ViewProperties*)) ,
this , SLOT(activeViewTitleChanged(ViewProperties*)));
connect(controller , SIGNAL(rawTitleChanged()) ,
this , SLOT(updateWindowCaption()));
connect(controller, SIGNAL(titleChanged(ViewProperties*)),
this, SLOT(activeViewTitleChanged(ViewProperties*)));
connect(controller, SIGNAL(rawTitleChanged()),
this, SLOT(updateWindowCaption()));
controller->setShowMenuAction(_toggleMenuBarAction);
guiFactory()->addClient(controller);
......@@ -241,7 +241,7 @@ void MainWindow::activeViewTitleChanged(ViewProperties* properties)
void MainWindow::updateWindowCaption()
{
if ( !_pluggedController)
if (!_pluggedController)
return;
const QString& title = _pluggedController->title();
......@@ -251,7 +251,7 @@ void MainWindow::updateWindowCaption()
QString caption = title;
// use window title as caption only when enabled and it is not empty
if ( KonsoleSettings::showWindowTitleOnTitleBar() && !userTitle.isEmpty() ) {
if (KonsoleSettings::showWindowTitleOnTitleBar() && !userTitle.isEmpty()) {
caption = userTitle;
}
......@@ -283,10 +283,10 @@ void MainWindow::setupActions()
collection->addAction("new-tab", _newTabMenuAction);
menuAction = collection->addAction("clone-tab");
menuAction->setIcon( KIcon("tab-duplicate") );
menuAction->setText( i18nc("@action:inmenu", "&Clone Tab") );
menuAction->setShortcut( QKeySequence() );
menuAction->setAutoRepeat( false );
menuAction->setIcon(KIcon("tab-duplicate"));
menuAction->setText(i18nc("@action:inmenu", "&Clone Tab"));
menuAction->setShortcut(QKeySequence());
menuAction->setAutoRepeat(false);
connect(menuAction, SIGNAL(triggered()), this, SLOT(cloneTab()));
menuAction = collection->addAction("new-window");
......@@ -303,10 +303,10 @@ void MainWindow::setupActions()
connect(menuAction, SIGNAL(triggered()), this, SLOT(close()));
// Bookmark Menu
KActionMenu* bookmarkMenu = new KActionMenu(i18nc("@title:menu", "&Bookmarks") , collection);
_bookmarkHandler = new BookmarkHandler(collection , bookmarkMenu->menu() , true , this);
collection->addAction("bookmark" , bookmarkMenu);
connect(_bookmarkHandler , SIGNAL(openUrls(QList<KUrl>)) , this , SLOT(openUrls(QList<KUrl>)));
KActionMenu* bookmarkMenu = new KActionMenu(i18nc("@title:menu", "&Bookmarks"), collection);
_bookmarkHandler = new BookmarkHandler(collection, bookmarkMenu->menu(), true, this);
collection->addAction("bookmark", bookmarkMenu);
connect(_bookmarkHandler, SIGNAL(openUrls(QList<KUrl>)), this, SLOT(openUrls(QList<KUrl>)));
// Settings Menu
_toggleMenuBarAction = KStandardAction::showMenubar(menuBar(), SLOT(setVisible(bool)), collection);
......@@ -316,8 +316,8 @@ void MainWindow::setupActions()
menuAction = KStandardAction::fullScreen(this, SLOT(viewFullScreen(bool)), this, collection);
menuAction->setShortcut(QKeySequence());
KStandardAction::configureNotifications(this , SLOT(configureNotifications()) , collection);
KStandardAction::keyBindings(this , SLOT(showShortcutsDialog()) , collection);
KStandardAction::configureNotifications(this, SLOT(configureNotifications()), collection);
KStandardAction::keyBindings(this, SLOT(showShortcutsDialog()), collection);
KStandardAction::preferences(this, SLOT(showSettingsDialog()), collection);
menuAction = collection->addAction("manage-profiles");
......@@ -349,10 +349,10 @@ void MainWindow::setProfileList(ProfileList* list)
{
profileListChanged(list->actions());
connect(list , SIGNAL(profileSelected(Profile::Ptr)) , this ,
connect(list, SIGNAL(profileSelected(Profile::Ptr)), this,
SLOT(newFromProfile(Profile::Ptr)));
connect(list , SIGNAL(actionsChanged(QList<QAction*>)) , this ,
connect(list, SIGNAL(actionsChanged(QList<QAction*>)), this,
SLOT(profileListChanged(QList<QAction*>)));
}
......@@ -409,19 +409,19 @@ void MainWindow::openUrls(const QList<KUrl>& urls)
{
Profile::Ptr defaultProfile = ProfileManager::instance()->defaultProfile();
foreach(const KUrl& url , urls) {
foreach(const KUrl& url, urls) {
if (url.isLocalFile())
createSession(defaultProfile , url.path());
createSession(defaultProfile, url.path());
else if (url.protocol() == "ssh")
createSSHSession(defaultProfile , url );
createSSHSession(defaultProfile, url);
}
}
void MainWindow::newTab()
{
Profile::Ptr defaultProfile = ProfileManager::instance()->defaultProfile();
createSession(defaultProfile , activeSessionDir() );
createSession(defaultProfile, activeSessionDir());
}
void MainWindow::cloneTab()
......@@ -430,8 +430,8 @@ void MainWindow::cloneTab()
Session* session = _pluggedController->session();
Profile::Ptr profile = SessionManager::instance()->sessionProfile(session);
if ( profile) {
createSession( profile , activeSessionDir() );
if (profile) {
createSession(profile, activeSessionDir());
} else {
// something must be wrong: every session should be associated with profile
Q_ASSERT(false);
......@@ -446,10 +446,10 @@ Session* MainWindow::createSession(Profile::Ptr profile, const QString& director
Session* session = SessionManager::instance()->createSession(profile);
if (!directory.isEmpty() && profile->startInCurrentSessionDir() )
if (!directory.isEmpty() && profile->startInCurrentSessionDir())
session->setInitialWorkingDirectory(directory);
session->addEnvironmentEntry( QString("KONSOLE_DBUS_WINDOW=/Windows/%1").arg(_viewManager->managerId()) );
session->addEnvironmentEntry(QString("KONSOLE_DBUS_WINDOW=/Windows/%1").arg(_viewManager->managerId()));
// create view before starting the session process so that the session
// doesn't suffer a change in terminal size right after the session
......@@ -502,7 +502,7 @@ void MainWindow::setFocus()
void MainWindow::newWindow()
{
Profile::Ptr defaultProfile = ProfileManager::instance()->defaultProfile();
emit newWindowRequest(defaultProfile , activeSessionDir());
emit newWindowRequest(defaultProfile, activeSessionDir());
}
bool MainWindow::queryClose()
......@@ -517,9 +517,9 @@ bool MainWindow::queryClose()
int result = KMessageBox::warningYesNoCancel(this,
i18ncp("@info", "There are %1 tab open in this window. "
"Do you still want to quit?",
"There are %1 tabs open in this window. "
"Do you still want to quit?", openTabs),
"Do you still want to quit?",
"There are %1 tabs open in this window. "
"Do you still want to quit?", openTabs),
i18nc("@title", "Confirm Close"),
KStandardGuiItem::quit(),
KGuiItem(i18nc("@action:button", "Close Current Tab"), "tab-close"),
......@@ -601,7 +601,7 @@ void MainWindow::showShortcutsDialog()
void MainWindow::newFromProfile(Profile::Ptr profile)
{
createSession(profile, activeSessionDir() );
createSession(profile, activeSessionDir());
}
void MainWindow::showManageProfilesDialog()
{
......@@ -632,7 +632,7 @@ void MainWindow::showSettingsDialog()
void MainWindow::applyKonsoleSettings()
{
if ( KonsoleSettings::allowMenuAccelerators() ) {
if (KonsoleSettings::allowMenuAccelerators()) {
recoverMenuAccelerators();
} else {
removeMenuAccelerators();
......
......@@ -67,8 +67,8 @@ ManageProfilesDialog::ManageProfilesDialog(QWidget* aParent)
connect(ProfileManager::instance(), SIGNAL(profileChanged(Profile::Ptr)), this,
SLOT(updateItems(Profile::Ptr)));
connect(ProfileManager::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);
......@@ -228,7 +228,7 @@ 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,
SIGNAL(selectionChanged(QItemSelection, QItemSelection)), this,
SLOT(tableSelectionChanged(QItemSelection)));
_ui->sessionTable->selectRow(0);
......
......@@ -100,7 +100,7 @@ void Part::createGlobalActions()
void Part::setupActionsForSession(SessionController* controller)
{
KActionCollection* collection = controller->actionCollection();
collection->addAction("manage-profiles",_manageProfilesAction);
collection->addAction("manage-profiles", _manageProfilesAction);
}
bool Part::openFile()
......@@ -134,7 +134,7 @@ void Part::startProgram(const QString& program,
Q_ASSERT(activeSession());
// do nothing if the session has already started running
if ( activeSession()->isRunning() )
if (activeSession()->isRunning())
return;
if (!program.isEmpty() && !arguments.isEmpty()) {
......@@ -157,7 +157,7 @@ void Part::showShellInDir(const QString& dir)
Q_ASSERT(activeSession());
// do nothing if the session has already started running
if ( activeSession()->isRunning() )
if (activeSession()->isRunning())
return;
if (!dir.isEmpty())
......@@ -211,7 +211,7 @@ QString Part::currentWorkingDirectory() const
void Part::createSession(const QString& profileName, const QString& directory)
{
Profile::Ptr profile = ProfileManager::instance()->defaultProfile();
if ( !profileName.isEmpty() )
if (!profileName.isEmpty())
profile = ProfileManager::instance()->loadProfile(profileName);
Q_ASSERT(profile);
......@@ -219,7 +219,7 @@ void Part::createSession(const QString& profileName, const QString& directory)
Session* session = SessionManager::instance()->createSession(profile);
// override the default directory specified in the profile
if (!directory.isEmpty() && profile->startInCurrentSessionDir() )